:root {
    --primary: #6366f1;
    --sidebar: #0f172a;
    --bg: #f8fafc;
    --card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --paid: #10b981;
    --unpaid: #ef4444;
    --upcoming: #f59e0b;
}

/* Document Badge */
.doc-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #eef2ff;
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    margin-bottom: 10px;
}

body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text-main); margin: 0; display: flex; min-height: 100vh; }

/* Desktop Sidebar */
.sidebar { width: 260px; background: var(--sidebar); color: white; padding: 2rem 1.5rem; position: fixed; height: 100vh; display: flex; flex-direction: column; box-sizing: border-box; z-index: 100; }
.sidebar h2 { font-size: 1.1rem; color: #38bdf8; letter-spacing: 1.5px; margin-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 15px; }

/* Main Content */
.main { margin-left: 260px; padding: 3rem; width: 100%; box-sizing: border-box; transition: 0.3s; }
.glass-card { background: var(--card); padding: 3rem; border-radius: 20px; box-shadow: 0 4px 30px rgba(0,0,0,0.03); max-width: 1000px; margin: auto; }

/* Navigation Links */
.nav-link { display: block; padding: 0.8rem 1rem; color: #94a3b8; text-decoration: none; border-radius: 8px; margin-bottom: 0.5rem; font-weight: 500; transition: 0.3s; -webkit-border-radius: 8px; -moz-border-radius: 8px; -ms-border-radius: 8px; -o-border-radius: 8px; }
.nav-link:hover, .nav-link.active { background: var(--primary); color: white; }

/* Mobile Navigation */
.mobile-nav { display: none; background: var(--sidebar); position: fixed; bottom: 0; left: 0; width: 100%; z-index: 1000; padding: 1rem 0; justify-content: space-around; box-shadow: 0 -2px 10px rgba(0,0,0,0.3); }
.mobile-nav a { color: #94a3b8; text-decoration: none; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.mobile-nav a.active { color: #38bdf8; }

/* Highlighting logic */
tr.color-a td { background-color: #ffffff; }
tr.color-b td { background-color: #f1f5f9; }

/* Contract Styling */
.contract-body h1 { font-size: 1.8rem; font-weight: 800; border-bottom: 2px solid #eee; padding-bottom: 10px; margin-bottom: 1.5rem; }
.contract-body h3 { font-size: 1rem; margin-top: 2rem; color: var(--primary); text-transform: uppercase; border-left: 4px solid var(--primary); padding-left: 15px; }
.contract-body ul { padding-left: 1.2rem; line-height: 1.7; }

/* Table and Status */
.table-container { width: 100%; overflow-x: auto; margin-top: 20px; border-radius: 8px; border: 1px solid #e2e8f0; }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th { text-align: left; padding: 1rem; border-bottom: 2px solid #e2e8f0; color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; background: #f8fafc; }
td { padding: 1.2rem 1rem; border-bottom: 1px solid #e2e8f0; font-size: 0.95rem; }

.status { padding: 0.4rem 0.6rem; border-radius: 4px; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; }
.status-paid { background: #dcfce7; color: var(--paid); }
.status-unpaid { background: #fee2e2; color: var(--unpaid); }
.status-upcoming { background: #fef3c7; color: var(--upcoming); }

@media (max-width: 992px) {
    .sidebar { display: none; }
    .mobile-nav { display: flex; }
    .main { margin-left: 0; padding: 1.5rem; padding-bottom: 80px; }
    .glass-card { padding: 1.5rem; border-radius: 12px; }
}
/* Professional Input & Select Styling */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="password"],
select {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-sizing: border-box; /* Crucial for responsiveness */
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: #fff;
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1rem;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}