/* Client portal — standalone styles */
:root {
    --primary: #2c5282;
    --accent: #4299e1;
    --bg: #eef2f7;
    --surface: #ffffff;
    --border: #dde4ec;
    --text: #3d4f63;
    --muted: #6b7c93;
    --danger: #c0392b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "DM Sans", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

body.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(145deg, #2c5282 0%, #4299e1 50%, #2a4365 100%);
}

.login-panel {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border-radius: 16px;
    padding: 2.25rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.login-brand { text-align: center; margin-bottom: 1.75rem; }
.login-brand h1 { font-size: 1.35rem; color: var(--primary); margin-bottom: 0.35rem; }
.login-brand p { color: var(--muted); font-size: 0.92rem; }
.login-brand .badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.65rem;
    border-radius: 99px;
    margin-bottom: 0.75rem;
}

.login-logo {
    display: block;
    max-width: 200px;
    width: 100%;
    height: auto;
    margin: 0 auto 0.75rem;
    object-fit: contain;
}

.app-header { background: var(--primary); color: #fff; padding: 0.85rem 1.25rem; }
.app-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.app-brand { color: #fff; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }
.app-brand span { color: #90cdf4; }
.app-brand-logo { border-radius: 6px; object-fit: contain; flex-shrink: 0; }
.app-nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.app-nav a { color: rgba(255,255,255,0.9); font-size: 0.9rem; }
.app-nav a:hover { color: #fff; }

.app-main { max-width: 1100px; margin: 0 auto; padding: 2rem 1.25rem 3rem; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 12px rgba(21,37,54,0.05);
}
.card h1, .card h2 { color: #152536; font-size: 1.3rem; margin-bottom: 0.75rem; }
.card p { color: var(--muted); margin-bottom: 1rem; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.35rem; }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
}
.form-hint { font-size: 0.82rem; color: var(--muted); margin-top: 0.3rem; }
.pin-input { letter-spacing: 0.3em; text-align: center; font-size: 1.2rem; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--accent); color: #fff; }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.85rem; width: auto; }

.login-panel-wide { max-width: 460px; }
.login-footer-links { text-align: center; margin-top: 1.25rem; font-size: 0.9rem; color: var(--muted); }
.login-footer-links a { font-weight: 600; }
.required { color: #c0392b; }

.profile-form .form-group input:disabled { background: #f4f6f9; color: var(--muted); cursor: not-allowed; }
.profile-form .btn-primary { width: auto; display: inline-flex; }

.alert { padding: 0.85rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.92rem; }
.alert-error { background: #f8d7da; color: #721c24; }
.alert-success { background: #d4edda; color: #155724; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 0.75rem; }
th, td { padding: 0.7rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { font-size: 0.8rem; text-transform: uppercase; color: var(--muted); }

@media (max-width: 600px) {
    .login-panel { padding: 1.5rem 1.25rem; }
    .app-header-inner { flex-direction: column; align-items: flex-start; }
}
