:root {
    --as-primary: #315CF5;
    --as-dark: #172033;
    --as-bg: #F7F8FC;
    --as-white: #FFFFFF;
    --as-success: #16A36A;
    --as-border: #E8EAF0;
    --as-muted: #6b7280;
    --as-danger: #dc2626;
    --as-radius: 12px;
    --as-shadow: 0 4px 20px rgba(23, 32, 51, .06);
}

.as-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 80vh;
    background: var(--as-white);
    border-radius: var(--as-radius);
    overflow: hidden;
    box-shadow: var(--as-shadow);
    max-width: 1000px;
    margin: 40px auto;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--as-dark);
}
.as-auth__brand {
    background: linear-gradient(135deg, #315CF5, #1e3a8a);
    color: #fff;
    padding: 60px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.as-auth__brand h1 { font-size: 2rem; margin: 0 0 12px; font-weight: 700; }
.as-auth__brand p { opacity: .9; line-height: 1.6; margin: 0 0 24px; }
.as-auth__brand ul { padding-left: 18px; opacity: .9; line-height: 1.9; }
.as-auth__form { padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.as-auth__form h2 { margin: 0 0 20px; font-size: 1.4rem; }
.as-auth__form label {
    display: block; font-size: .875rem; font-weight: 500;
    margin-bottom: 14px; color: var(--as-dark);
}
.as-auth__form input[type="text"],
.as-auth__form input[type="email"],
.as-auth__form input[type="password"] {
    width: 100%; margin-top: 6px; padding: 11px 14px;
    border: 1px solid var(--as-border); border-radius: 10px;
    background: var(--as-bg); font-size: .95rem; color: var(--as-dark);
    box-sizing: border-box;
}
.as-auth__form input:focus {
    outline: none; border-color: var(--as-primary); background: #fff;
    box-shadow: 0 0 0 3px rgba(49, 92, 245, .12);
}
.as-check { display: flex; align-items: center; gap: 8px; font-size: .875rem; }
.as-check input { margin: 0; }
.as-pass-wrap { position: relative; display: block; margin-top: 6px; }
.as-pass-wrap input { margin-top: 0 !important; }
.as-pass-toggle {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: 0; color: var(--as-primary);
    font-size: .8rem; cursor: pointer; padding: 4px 6px;
}
.as-btn {
    display: inline-block; width: 100%; padding: 12px 20px;
    border: 0; border-radius: 10px; font-size: .95rem;
    font-weight: 600; cursor: pointer; transition: .15s;
    margin-top: 8px; font-family: inherit;
}
.as-btn--primary { background: var(--as-primary); color: #fff; }
.as-btn--primary:hover { background: #2548c9; }
.as-auth__switch {
    margin-top: 20px; font-size: .875rem; text-align: center; color: var(--as-muted);
}
.as-auth__switch a { color: var(--as-primary); text-decoration: none; font-weight: 500; }
.as-auth__switch a:hover { text-decoration: underline; }
.as-alert {
    padding: 11px 14px; border-radius: 10px; font-size: .875rem;
    margin-bottom: 16px; border: 1px solid transparent;
}
.as-alert--error   { background: #fef2f2; color: var(--as-danger); border-color: #fecaca; }
.as-alert--success { background: #ecfdf5; color: var(--as-success); border-color: #a7f3d0; }

@media (max-width: 820px) {
    .as-auth { grid-template-columns: 1fr; margin: 16px; }
    .as-auth__brand { padding: 32px 24px; }
    .as-auth__form  { padding: 28px 24px; }
}

/* Dashboard */
.as-dash {
    display: grid; grid-template-columns: 260px 1fr;
     margin: 32px auto;
    font-family: 'Inter', system-ui, sans-serif; color: var(--as-dark);
}
.as-dash__sidebar {
    background: #0f172a; color: #cbd5e1; border-radius: var(--as-radius);
    padding: 22px; height: fit-content; position: sticky; top: 20px;
}
.as-dash__user { display: flex; gap: 12px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid #1e293b; }
.as-dash__user strong { display: block; color: #fff; font-size: .95rem; }
.as-dash__user span   { font-size: .78rem; color: #94a3b8; }
.as-avatar { border-radius: 50%; }
.as-dash__nav { display: flex; flex-direction: column; gap: 4px; margin: 18px 0; }
.as-dash__nav a {
    padding: 10px 12px; border-radius: 8px; color: #cbd5e1;
    text-decoration: none; font-size: .9rem; transition: .15s;
}
.as-dash__nav a:hover  { background: #1e293b; color: #fff; }
.as-dash__nav a.is-active { background: var(--as-primary); color: #fff; }
.as-dash__logout {
    display: block; padding: 10px 12px; color: #f87171;
    text-decoration: none; font-size: .85rem; border-top: 1px solid #1e293b; padding-top: 14px;
}
.as-dash__main h1 { margin: 0 0 6px; font-size: 1.75rem; }
.as-muted { color: var(--as-muted); font-size: .9rem; }
.as-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 24px 0; }
.as-stat {
    background: var(--as-white); border: 1px solid var(--as-border);
    border-radius: var(--as-radius); padding: 20px; text-align: center;
    box-shadow: var(--as-shadow);
}
.as-stat span  { display: block; font-size: 1.6rem; font-weight: 700; color: var(--as-primary); }
.as-stat small { color: var(--as-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.as-card {
    background: var(--as-white); border: 1px solid var(--as-border);
    border-radius: var(--as-radius); padding: 22px; margin-bottom: 16px;
    box-shadow: var(--as-shadow);
}
.as-card h2 { margin: 0 0 10px; font-size: 1.05rem; }
.as-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.as-badge--ok   { background: #ecfdf5; color: var(--as-success); }
.as-badge--warn { background: #fef3c7; color: #b45309; }

@media (max-width: 820px) {
    .as-dash { grid-template-columns: 1fr; }
    .as-dash__sidebar { position: static; }
    .as-stats { grid-template-columns: repeat(2, 1fr); }
}