/* Valmo Report Dashboard — shared design system */

:root {
    --bg: #0b0e14;
    --bg-elev: #12151f;
    --card: #161a26;
    --card-border: #262b3a;
    --text: #eef0f6;
    --text-dim: #9aa1b4;
    --text-faint: #6b7186;
    --accent: #7c6cff;
    --accent-2: #4fd1c5;
    --accent-grad: linear-gradient(135deg, #7c6cff 0%, #4fd1c5 100%);
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.12);
    --success-bg: rgba(52, 211, 153, 0.12);
    --warning-bg: rgba(251, 191, 36, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: radial-gradient(circle at 20% -10%, #1a1f33 0%, var(--bg) 55%);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { color: var(--accent-2); }

.container {
    max-width: 920px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

/* ---- Top bar ---- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    max-width: 920px;
    margin: 0 auto;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.01em;
}
.brand .dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--accent-grad);
    box-shadow: 0 0 12px rgba(124, 108, 255, 0.7);
}

/* ---- Cards ---- */
.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}
.card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.card-subtitle {
    color: var(--text-dim);
    font-size: 13px;
    margin: 4px 0 0;
}

/* ---- Buttons ---- */
button, .btn {
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    cursor: pointer;
    transition: transform 0.1s ease, opacity 0.15s ease, box-shadow 0.15s ease;
    min-height: 44px;
}
button:active { transform: scale(0.98); }
.btn-primary {
    background: var(--accent-grad);
    color: #0b0e14;
    box-shadow: 0 8px 24px -8px rgba(124, 108, 255, 0.6);
}
.btn-primary:hover { opacity: 0.92; }
.btn-secondary {
    background: var(--bg-elev);
    color: var(--text);
    border: 1px solid var(--card-border);
}
.btn-secondary:hover { border-color: var(--accent); }
.btn-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(248, 113, 113, 0.3);
}
.btn-block { width: 100%; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Inputs ---- */
label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
    margin: 14px 0 6px;
}
input[type="text"], input[type="password"], input[type="tel"] {
    width: 100%;
    font-family: var(--font);
    font-size: 15px;
    background: var(--bg-elev);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124, 108, 255, 0.15);
}
input::placeholder { color: var(--text-faint); }

/* ---- Badges / status pills ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-neutral { background: rgba(154, 161, 180, 0.15); color: var(--text-dim); }
.badge .pulse {
    width: 6px; height: 6px; border-radius: 50%; background: currentColor;
    animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---- Alerts ---- */
.alert {
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 13px;
    margin-top: 14px;
    display: none;
    line-height: 1.5;
    white-space: pre-wrap;
}
.alert.show { display: block; }
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(248,113,113,0.25); }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(52,211,153,0.25); }

/* ---- Login page ---- */
.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 36px 30px;
    box-shadow: var(--shadow);
}
.login-logo {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--accent-grad);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    margin: 0 auto 18px;
    box-shadow: 0 10px 30px -8px rgba(124, 108, 255, 0.7);
}
.login-title { text-align: center; font-size: 20px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.01em; }
.login-subtitle { text-align: center; color: var(--text-dim); font-size: 13px; margin: 0 0 8px; }

/* ---- Misc ---- */
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }
.muted { color: var(--text-dim); font-size: 13px; }
.small { font-size: 12px; color: var(--text-faint); }
.divider { height: 1px; background: var(--card-border); margin: 18px 0; border: none; }
.hidden { display: none !important; }
.spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: currentColor;
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.qr-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: var(--bg-elev);
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
}
.qr-box img {
    width: 220px; height: 220px;
    border-radius: 12px;
    background: white;
    padding: 10px;
}

.account-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-top: 1px solid var(--card-border);
    gap: 12px;
    flex-wrap: wrap;
}
.account-item:first-of-type { border-top: none; padding-top: 0; }
.account-meta { font-size: 13px; color: var(--text-dim); }
.account-mobile { font-weight: 600; font-size: 15px; }

@media (max-width: 560px) {
    .card { padding: 18px; border-radius: 14px; }
    .container { padding: 16px 14px 50px; }
    .topbar { padding: 14px 16px; }
    .login-card { padding: 28px 22px; }
    .account-item { flex-direction: column; align-items: flex-start; }
}
