/* Sandat Klinik MS — clean medical/business theme.
   White and light, no animation, no dark mode. */

:root {
    --km-primary: #1d4935;
    --km-primary-dark: #183b2f;
    --km-primary-soft: #e5f0e8;
    --km-accent: #285b40;
    --km-border: #dce5df;
    --km-ink: #17251e;
    --km-muted: #667770;
    --km-bg: #f4f7f4;
    --km-danger: #b3261e;
    --km-warn: #a16207;
    --km-sidebar-w: 240px;
}

* {
    box-shadow: none !important;
}

html, body {
    height: 100%;
}

body.app-body {
    margin: 0;
    background: var(--km-bg);
    color: var(--km-ink);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

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

a:hover {
    color: var(--km-primary-dark);
    text-decoration: underline;
}

/* ---------- shell ---------- */

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-content {
    flex: 1 1 auto;
    padding: 1.25rem 1.5rem 2rem;
}

.app-footer {
    border-top: 1px solid var(--km-border);
    padding: 0.75rem 1.5rem;
    color: var(--km-muted);
    font-size: 0.8rem;
    background: #fff;
}

/* ---------- sidebar ---------- */

.app-sidebar {
    width: var(--km-sidebar-w);
    flex: 0 0 var(--km-sidebar-w);
    background: #fff;
    border-right: 1px solid var(--km-border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1rem 0.9rem;
    border-bottom: 1px solid var(--km-border);
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--km-ink);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.brand-link:hover {
    text-decoration: none;
    color: var(--km-primary);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--km-primary);
    color: #fff;
    font-weight: 700;
}

.sidebar-nav {
    padding: 0.75rem 0.6rem;
    overflow-y: auto;
    flex: 1 1 auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    color: var(--km-ink);
    font-weight: 500;
}

.nav-item:hover {
    background: var(--km-primary-soft);
    color: var(--km-primary-dark);
    text-decoration: none;
}

.nav-item.active {
    background: var(--km-primary);
    color: #fff;
}

.nav-ico {
    width: 1.1rem;
    text-align: center;
    opacity: 0.9;
}

.nav-sep {
    height: 1px;
    background: var(--km-border);
    margin: 0.6rem 0.4rem;
}

.sidebar-foot {
    border-top: 1px solid var(--km-border);
    padding: 0.85rem 1rem 1rem;
}

.sidebar-backdrop {
    display: none;
}

/* ---------- topbar ---------- */

.app-topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    border-bottom: 1px solid var(--km-border);
    padding: 0.7rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.topbar-right {
    margin-left: auto;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--km-primary-soft);
    color: var(--km-primary-dark);
    font-weight: 600;
    font-size: 0.85rem;
}

/* ---------- cards & panels ---------- */

.card, .panel {
    background: #fff;
    border: 1px solid var(--km-border);
    border-radius: 10px;
}

.panel-head {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--km-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.panel-head h2, .panel-head h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.panel-body {
    padding: 1rem;
}

.page-head {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.page-head h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0 0 0.15rem;
}

.page-head .sub {
    color: var(--km-muted);
    font-size: 0.9rem;
}

.page-actions {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ---------- stat tiles ---------- */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
}

.stat {
    background: #fff;
    border: 1px solid var(--km-border);
    border-radius: 10px;
    padding: 1rem;
}

.stat-label {
    color: var(--km-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--km-primary-dark);
    line-height: 1.2;
    margin-top: 0.25rem;
}

.stat-hint {
    color: var(--km-muted);
    font-size: 0.82rem;
}

/* ---------- dashboard home ---------- */

.dashboard-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    min-height: 230px;
    padding: 1.25rem 1.4rem 1rem 1.65rem;
    border: 1px solid #d8e5dc;
    border-radius: 14px;
    background: linear-gradient(115deg, #fff 0%, #eef4ef 100%);
    overflow: hidden;
}

.dashboard-welcome-copy { position: relative; z-index: 1; flex: 1 1 450px; }
.dashboard-illustration { display: block; width: min(42%, 420px); max-height: 220px; align-self: stretch; object-fit: cover; object-position: center 48%; border-radius: 10px; mix-blend-mode: multiply; }

.dashboard-eyebrow {
    color: var(--km-primary);
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.12em;
}

.dashboard-live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin: 0 0.3rem 1px 0;
    border-radius: 50%;
    background: var(--km-accent);
}

.dashboard-welcome h2 {
    margin: 0.45rem 0 0.25rem;
    color: #17251e;
    font-size: clamp(1.65rem, 3vw, 2.15rem);
    font-weight: 750;
    letter-spacing: -0.04em;
}

.dashboard-welcome p {
    margin: 0;
    color: var(--km-muted);
}

.dashboard-welcome-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.dashboard-date {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.48rem 0.75rem;
    border: 1px solid var(--km-border);
    border-radius: 8px;
    background: #fff;
    color: var(--km-muted);
    font-size: 0.85rem;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.65rem;
}

.dashboard-stat {
    display: block;
    min-width: 0;
    padding: 1rem 1.1rem;
    border: 1px solid var(--km-border);
    border-radius: 11px;
    background: #fff;
    color: inherit;
    transition: border-color 120ms ease, transform 120ms ease;
}

.dashboard-stat:hover {
    border-color: #b4ccb9;
    color: inherit;
    text-decoration: none;
    transform: translateY(-1px);
}

.dashboard-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.dashboard-stat-label {
    color: var(--km-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.dashboard-stat-icon {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    border-radius: 9px;
    background: var(--km-primary-soft);
    color: var(--km-primary);
    font-size: 1rem;
    font-weight: 700;
}

.stat-visits .dashboard-stat-icon { background: #e5f0e8; color: #1d4935; }
.stat-revenue .dashboard-stat-icon { background: #f1edfa; color: #66509a; font-size: 0.75rem; }
.stat-appointments .dashboard-stat-icon { background: #fff4e6; color: #a16207; }

.dashboard-stat-value {
    margin-top: 0.65rem;
    color: #17251e;
    font-size: 2rem;
    font-weight: 750;
    letter-spacing: -0.045em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.dashboard-stat-money { font-size: clamp(1.2rem, 2vw, 1.65rem); }

.dashboard-stat-hint {
    margin-top: 0.35rem;
    color: var(--km-muted);
    font-size: 0.8rem;
}

.dashboard-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.dashboard-section-heading h3 {
    margin: 0.2rem 0 0;
    color: var(--km-ink);
    font-size: 1.15rem;
    font-weight: 700;
}

.dashboard-section-heading > a,
.dashboard-panel .panel-head > a {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.dashboard-panel { overflow: hidden; border-radius: 11px; }
.dashboard-panel .panel-head { min-height: 68px; justify-content: space-between; }
.dashboard-panel-sub { margin-top: 0.2rem; color: var(--km-muted); font-size: 0.8rem; }
.dashboard-panel-count {
    display: inline-flex;
    min-width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: var(--km-primary-soft);
    color: var(--km-primary-dark);
    font-size: 0.8rem;
    font-weight: 700;
}

.dashboard-primary-link { font-weight: 600; }
.dashboard-time { color: var(--km-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 991.98px) {
    .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .dashboard-welcome { padding: 1.15rem; }
    .dashboard-welcome-copy { flex-basis: 100%; }
    .dashboard-illustration { width: 100%; max-height: 170px; object-position: center 42%; }
    .dashboard-welcome-actions { width: 100%; margin-top: 0.85rem; }
    .dashboard-date { width: 100%; }
    .dashboard-stats { gap: 0.6rem; }
    .dashboard-stat { padding: 0.85rem; }
    .dashboard-stat-label { font-size: 0.69rem; }
    .dashboard-stat-value { font-size: 1.7rem; }
    .dashboard-stat-money { font-size: 1.15rem; }
}

/* ---------- tables ---------- */

.table-wrap {
    overflow-x: auto;
}

table.km {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

table.km th {
    text-align: left;
    font-weight: 600;
    color: var(--km-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--km-border);
    background: #fafbfc;
    white-space: nowrap;
}

table.km td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--km-border);
    vertical-align: middle;
}

table.km tbody tr:hover {
    background: #fafcfc;
}

table.km td.num, table.km th.num {
    text-align: right;
    white-space: nowrap;
}

.empty-state {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--km-muted);
}

/* ---------- badges ---------- */

.badge-soft {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
}

.badge-soft.ok       { background: #e7f4ee; color: #14663f; border-color: #c6e6d6; }
.badge-soft.info     { background: #e7f0f7; color: #1d4e79; border-color: #cbdff0; }
.badge-soft.warn     { background: #fdf3e2; color: var(--km-warn); border-color: #f2e0bd; }
.badge-soft.danger   { background: #fbeae9; color: var(--km-danger); border-color: #f3cfcc; }
.badge-soft.muted    { background: #eef1f3; color: #54646c; border-color: #dee4e8; }

/* ---------- forms ---------- */

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.form-control, .form-select {
    border-color: var(--km-border);
    font-size: 0.92rem;
    padding: 0.45rem 0.65rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--km-primary);
    box-shadow: 0 0 0 3px var(--km-primary-soft) !important;
}

.required::after {
    content: " *";
    color: var(--km-danger);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--km-muted);
    margin-top: 0.2rem;
}

.field-error {
    font-size: 0.8rem;
    color: var(--km-danger);
    margin-top: 0.2rem;
}

.has-error .form-control, .has-error .form-select {
    border-color: var(--km-danger);
}

.form-section {
    border-top: 1px solid var(--km-border);
    margin-top: 1.25rem;
    padding-top: 1rem;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--km-border);
    margin-top: 1.5rem;
    padding-top: 1rem;
}

/* ---------- buttons ---------- */

.btn-primary {
    background: var(--km-primary);
    border-color: var(--km-primary);
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--km-primary-dark);
    border-color: var(--km-primary-dark);
}

.btn-outline-primary {
    color: var(--km-primary);
    border-color: var(--km-primary);
}

.btn-outline-primary:hover {
    background: var(--km-primary);
    border-color: var(--km-primary);
}

/* ---------- filters & pagination ---------- */

.filter-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.pagination-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--km-border);
    color: var(--km-muted);
    font-size: 0.85rem;
}

/* ---------- detail lists ---------- */

.dl {
    display: grid;
    grid-template-columns: minmax(140px, 200px) 1fr;
    gap: 0.4rem 1rem;
    margin: 0;
    font-size: 0.92rem;
}

.dl dt {
    color: var(--km-muted);
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding-top: 0.15rem;
}

.dl dd {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ---------- timeline ---------- */

.timeline {
    border-left: 2px solid var(--km-border);
    margin-left: 0.5rem;
    padding-left: 1rem;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.1rem;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -1.42rem;
    top: 0.35rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--km-primary);
}

.timeline-date {
    font-size: 0.8rem;
    color: var(--km-muted);
    font-weight: 600;
}

/* ---------- auth ---------- */

.landing-shell {
    min-height: 100vh;
    padding: 0 clamp(1.25rem, 6vw, 6rem);
    overflow: hidden;
    background: #eef4ef;
    color: #17251e;
}

.landing-page { max-width: 1320px; margin: 0 auto; }
.landing-header { display: flex; min-height: 80px; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #dce5df; }
.landing-brand { display: inline-flex; align-items: center; gap: 0.75rem; color: #17251e; text-decoration: none; }
.landing-brand:hover { color: #17251e; text-decoration: none; }
.landing-brand-mark { display: inline-grid; width: 40px; height: 40px; place-items: center; border-radius: 11px; background: #1d4935; color: #fff; font-size: 1.25rem; }
.landing-brand strong { display: block; font-size: 1rem; font-weight: 750; line-height: 1.2; color: #17251e; }
.landing-brand small { display: block; margin-top: 3px; color: #557b65; font-size: 0.61rem; font-weight: 700; letter-spacing: 0.09em; }
.landing-login { border-radius: 8px; font-size: 0.88rem; font-weight: 650; }

.landing-hero { display: grid; min-height: 490px; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); align-items: center; gap: clamp(1.5rem, 4.5vw, 4rem); padding: 2.75rem 0 2.25rem; }
.landing-copy { position: relative; z-index: 1; padding: 0.75rem 0; }
.landing-eyebrow { display: flex; align-items: center; gap: 0.55rem; color: #557b65; font-size: 0.72rem; font-weight: 750; letter-spacing: 0.12em; }
.landing-eyebrow span { width: 8px; height: 8px; border-radius: 50%; background: #1d4935; }
.landing-copy h1 { max-width: 580px; margin: 0.85rem 0; color: #17251e; font-size: clamp(2.1rem, 3.8vw, 3.1rem); font-weight: 760; letter-spacing: -0.04em; line-height: 1.12; }
.landing-copy h1 em { color: #1d4935; font-style: normal; }
.landing-description { max-width: 520px; margin: 0; color: #586960; font-size: 1rem; line-height: 1.7; }
.landing-cta-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.landing-cta { padding: 0.7rem 1.1rem; border-radius: 9px; font-weight: 650; background: #1d4935; border-color: #1d4935; }
.landing-cta:hover, .landing-cta:focus { background: #285b40; border-color: #285b40; }
.landing-cta span { padding-left: 0.35rem; }
.landing-note { color: #586960; font-size: 0.82rem; }
.landing-note span { margin-right: 0.25rem; color: #1d4935; font-weight: 800; }
.landing-trust { display: flex; align-items: center; gap: 0.75rem; margin-top: 2rem; padding-top: 1.1rem; border-top: 1px solid #dce5df; }
.landing-trust-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 10px; background: #e5f0e8; color: #1d4935; font-size: 1.1rem; }
.landing-trust strong, .landing-trust small { display: block; }
.landing-trust strong { color: #17251e; font-size: 0.84rem; }
.landing-trust small { margin-top: 2px; color: #667770; font-size: 0.76rem; }

.landing-visual { position: relative; min-width: 0; margin: 0; padding: 0.5rem 0.5rem 1.15rem; }
.landing-visual-glow { display: none; }
.landing-visual img { position: relative; display: block; width: 100%; max-height: 410px; aspect-ratio: 1.5; border-radius: 18px; object-fit: cover; border: 1px solid #dce5df; box-shadow: 0 12px 28px rgba(24, 59, 47, 0.12); }
.landing-visual figcaption { position: absolute; right: 0; bottom: 0; display: flex; align-items: center; gap: 0.65rem; padding: 0.7rem 0.9rem; border: 1px solid #dce5df; border-radius: 11px; background: rgba(255,255,255,.97); box-shadow: 0 6px 18px rgba(24, 59, 47, 0.1); }
.landing-caption-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: #e5f0e8; color: #1d4935; }
.landing-visual figcaption strong, .landing-visual figcaption small { display: block; }
.landing-visual figcaption strong { color: #17251e; font-size: 0.8rem; }
.landing-visual figcaption small { margin-top: 2px; color: #667770; font-size: 0.72rem; }

.landing-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; padding: 1.35rem 0; border-top: 1px solid #dce5df; border-bottom: 1px solid #dce5df; }
.landing-features article { display: flex; align-items: flex-start; gap: 0.8rem; padding: 0.45rem 0.75rem; }
.landing-feature-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 10px; background: #e5f0e8; color: #1d4935; font-size: 1.05rem; }
.landing-features h2 { margin: 0 0 0.2rem; color: #17251e; font-size: 0.87rem; font-weight: 700; }
.landing-features p { margin: 0; color: #586960; font-size: 0.79rem; line-height: 1.55; }
.landing-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0 1.5rem; color: #667770; font-size: 0.76rem; }

@media (max-width: 850px) {
    .landing-hero { min-height: unset; grid-template-columns: 1fr 0.9fr; gap: 1rem; padding: 2.25rem 0 1.75rem; }
    .landing-copy h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
    .landing-trust { margin-top: 1.5rem; }
    .landing-features article { padding: 0.35rem; }
}

@media (max-width: 640px) {
    .landing-shell { padding: 0 1.15rem; }
    .landing-header { min-height: 70px; }
    .landing-brand-mark { width: 36px; height: 36px; }
    .landing-brand strong { font-size: 0.9rem; }
    .landing-brand small { font-size: 0.53rem; }
    .landing-login { padding: 0.4rem 0.6rem; font-size: 0.78rem; }
    .landing-hero { grid-template-columns: 1fr; gap: 0.6rem; padding: 1.75rem 0 1.5rem; }
    .landing-copy h1 { max-width: 500px; font-size: clamp(1.85rem, 8vw, 2.4rem); }
    .landing-description { font-size: 0.95rem; }
    .landing-visual { grid-row: 1; padding: 0 0.15rem 1rem; }
    .landing-visual img { max-height: 260px; aspect-ratio: 1.5; border-radius: 14px; }
    .landing-visual figcaption { right: 0.25rem; bottom: 0.2rem; padding: 0.55rem 0.7rem; }
    .landing-visual figcaption small { font-size: 0.64rem; }
    .landing-trust { margin-top: 1.4rem; }
    .landing-features { grid-template-columns: 1fr; gap: 0.5rem; padding: 1rem 0; }
    .landing-features article { padding: 0.35rem 0; }
    .landing-footer { font-size: 0.68rem; }
}

.auth-shell {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 2rem;
    background: #eef4ef;
}

.auth-blob {
    pointer-events: none;
    position: absolute;
    border-radius: 9999px;
}

.auth-blob-tl {
    left: -10rem;
    top: -10rem;
    width: 24rem;
    height: 24rem;
    background: rgba(215, 243, 107, 0.32);
}

.auth-blob-br {
    right: -8rem;
    bottom: -12rem;
    width: 30rem;
    height: 30rem;
    background: rgba(191, 232, 255, 0.42);
}

.auth-split-card {
    position: relative;
    z-index: 1;
    display: grid;
    width: 100%;
    max-width: 64rem;
    overflow: hidden;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: #ffffff;
    box-shadow: 0 28px 90px rgba(24, 59, 47, 0.16);
    grid-template-columns: 1fr 0.92fr;
}

.auth-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    background: #183b2f;
    padding: 3rem;
    color: #ffffff;
}

.auth-aside-ring {
    pointer-events: none;
    position: absolute;
    right: -7rem;
    top: -7rem;
    width: 20rem;
    height: 20rem;
    border-radius: 9999px;
    border: 44px solid rgba(255, 255, 255, 0.05);
}

.auth-aside-top {
    position: relative;
}

.auth-aside-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #ffffff;
    text-decoration: none;
}

.auth-aside-brand:hover {
    color: #ffffff;
    text-decoration: none;
}

.auth-brand-badge {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    border-radius: 0.75rem;
    background: #d7f36b;
    color: #183b2f;
    font-size: 1rem;
    font-weight: 900;
}

.auth-brand-name {
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #ffffff;
}

.auth-aside-copy {
    margin-top: 6rem;
}

.auth-aside-eyebrow {
    margin: 0 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #c9e39d;
}

.auth-aside-dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 9999px;
    background: #d7f36b;
}

.auth-aside-copy h1 {
    margin: 0;
    max-width: 28rem;
    font-size: clamp(2.15rem, 3.2vw, 2.85rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.045em;
    color: #ffffff;
}

.auth-aside-copy > p:not(.auth-aside-eyebrow) {
    margin: 1.25rem 0 0;
    max-width: 24rem;
    font-size: 0.875rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.7);
}

.auth-aside-list {
    position: relative;
    margin-top: 3.5rem;
    display: grid;
    gap: 0.75rem;
}

.auth-aside-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    padding: 0.875rem;
}

.auth-aside-num {
    display: grid;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    place-items: center;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    font-weight: 700;
    color: #d7f36b;
}

.auth-aside-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.auth-form-pane {
    padding: 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

.auth-mobile-brand {
    display: none;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 2.5rem;
}

.auth-mobile-brand .auth-brand-badge {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.875rem;
}

.auth-mobile-brand-name {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #183b2f;
}

.auth-form-eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #557b65;
}

.auth-form-head h2 {
    margin: 0;
    font-size: 1.875rem;
    font-weight: 800;
    letter-spacing: -0.045em;
    color: #17251e;
}

.auth-form-sub {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #77837c;
}

.auth-form-pane > .alert {
    margin: 1.25rem 0 0;
    border-radius: 0.75rem;
    font-size: 0.85rem;
}

.auth-login-form {
    margin-top: 2rem;
    display: grid;
    gap: 1.25rem;
}

.auth-field {
    display: grid;
    gap: 0.5rem;
}

.auth-field label {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: #3f5147;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    pointer-events: none;
    position: absolute;
    left: 0.875rem;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #8b9890;
}

.auth-input-wrap input {
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid #dce5df;
    background: #f9fbf9;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    font-size: 0.875rem;
    color: #1a2d23;
    transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.auth-input-wrap input::placeholder {
    color: #a0aaa4;
}

.auth-input-wrap input:focus {
    border-color: #5a9472;
    background: #ffffff;
    outline: none;
    box-shadow: 0 0 0 4px #e5f0e8;
}

.auth-submit-btn {
    display: flex;
    min-height: 3rem;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    border: none;
    border-radius: 0.75rem;
    background: #1d4935;
    padding: 0 1.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(29, 73, 53, 0.15);
    transition: transform 150ms ease, background-color 150ms ease;
    cursor: pointer;
}

.auth-submit-btn:hover {
    background: #285b40;
    transform: translateY(-1px);
}

.auth-submit-arrow {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
}

.auth-form-footer {
    margin-top: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-top: 1px solid #edf1ed;
    padding-top: 1.25rem;
    font-size: 11px;
    color: #8a968e;
}

.auth-footer-icon {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
}

@media (max-width: 991.98px) {
    .auth-split-card {
        max-width: 32rem;
        grid-template-columns: 1fr;
    }
    .auth-aside {
        display: none;
    }
    .auth-mobile-brand {
        display: flex;
    }
    .auth-form-pane {
        padding: 2.25rem 1.75rem;
    }
}

.demo-box {
    margin-top: 1.25rem;
    font-size: 0.82rem;
    color: var(--km-muted);
}

.demo-box code {
    color: var(--km-ink);
}

.demo-account {
    padding: 0.3rem 0;
    line-height: 1.45;
    user-select: text;
}

.demo-account + .demo-account {
    border-top: 1px solid #edf1f4;
    padding-top: 0.45rem;
    margin-top: 0.15rem;
}

.demo-who {
    color: var(--km-ink);
    font-weight: 600;
}

.demo-credentials {
    display: block;
    overflow-wrap: anywhere;
}

.demo-sep {
    color: var(--km-muted);
}

/* ---------- invoice / prescription items editor ---------- */

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

.items-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--km-muted);
    font-weight: 600;
    padding: 0.35rem 0.4rem;
    text-align: left;
}

.items-table td {
    padding: 0.25rem 0.4rem;
    vertical-align: top;
}

.item-row-remove {
    color: var(--km-danger);
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0.4rem;
    font-size: 1rem;
    line-height: 1;
}

/* ---------- alerts ---------- */

.alert {
    border-radius: 8px;
    font-size: 0.92rem;
}

/* ---------- print helpers ---------- */

.print-only {
    display: none;
}

/* ---------- responsive ---------- */

@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 1040;
        transform: translateX(-100%);
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 32, 38, 0.35);
        z-index: 1030;
    }

    .sidebar-backdrop.open {
        display: block;
    }

    .app-content {
        padding: 1rem;
    }

    .app-topbar {
        padding: 0.65rem 1rem;
    }

    .dl {
        grid-template-columns: 1fr;
        gap: 0.1rem;
    }

    .dl dt {
        padding-top: 0.5rem;
    }
}

@media (max-width: 575.98px) {
    .stat-value {
        font-size: 1.45rem;
    }

    .page-actions {
        width: 100%;
        margin-left: 0;
    }

    .page-actions .btn {
        flex: 1 1 auto;
    }
}
