body {
    background: linear-gradient(135deg, var(--navy) 0%, #0f172a 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Login Screen */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    max-width: 450px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-family: var(--font-heading);
    color: var(--navy);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--muted);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-main);
}

.form-group input:focus {
    outline: none;
    border-color: var(--blue);
}

.btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-main);
}

.btn-primary {
    background: var(--blue);
    color: white;
}

.btn-primary:hover {
    background: var(--navy);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--muted);
    color: white;
    margin-top: 1rem;
}

.btn-secondary:hover {
    background: var(--text);
}

.error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
}

.success-message {
    background: #d1fae5;
    color: #065f46;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
}

/* Portal Views */
.portal-page {
    display: none;
    min-height: 100vh;
}

.portal-page.active {
    display: block;
}

.portal-header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.portal-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.portal-header h1 {
    font-family: var(--font-heading);
    color: var(--navy);
    font-size: 1.5rem;
}

.btn-logout {
    padding: 0.5rem 1rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-logout:hover {
    background: #dc2626;
}

.welcome-banner {
    background: linear-gradient(135deg, var(--blue) 0%, var(--navy) 100%);
    color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.welcome-banner h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.stat-card h3 {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-card .stat-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.progress-bar {
    background: var(--light);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.75rem;
}

.progress-fill {
    background: #22c55e;
    height: 100%;
    transition: width 0.3s;
}

.content-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.content-section h3 {
    font-family: var(--font-heading);
    color: var(--navy);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--light);
}

th {
    text-align: left;
    padding: 1rem;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

td {
    padding: 1rem;
    border-top: 1px solid var(--border);
    color: var(--text);
}

tbody tr:hover {
    background: var(--light);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: white;
}

.spinner {
    border: 4px solid rgba(255,255,255,0.1);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.document-list {
    display: grid;
    gap: 1rem;
}

.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s;
}

.document-item:hover {
    background: var(--light);
    border-color: var(--muted);
}

.document-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.document-icon {
    width: 48px;
    height: 48px;
    background: var(--light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.btn-download {
    padding: 0.5rem 1.5rem;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-download:hover {
    background: var(--navy);
}
