/* ============================================================================
   UHEX SYSTEM — Kurumsal Tasarım Sistemi v2.0
   Renk: #1b3155 | Font: Inter + Sora | %100 Responsive
   ----------------------------------------------------------------------------
   İçindekiler:
   01. Tasarım Token'ları        06. Topbar & Akıllı Arama
   02. Taban / Tipografi          07. İçerik Bileşenleri
   03. Butonlar & Formlar         08. Sayfa Özel Bileşenler
   04. Uygulama İskeleti          09. Login (Modern)
   05. Sidebar                    10. Kurulum Sihirbazı (Modern)
                                  11. Responsive & Print
   ============================================================================ */

/* == 01. TASARIM TOKEN'LARI ============================================== */
:root {
    /* Marka */
    --brand: #1b3155;
    --brand-600: #16294a;
    --brand-700: #12233f;
    --brand-800: #0d1a30;
    --brand-900: #091223;
    --brand-400: #2a4470;
    --brand-300: #3d5a8c;
    --brand-100: #dce5f2;
    --brand-50: #eef3fa;
    --accent: #4f8cff;
    --accent-soft: #e6efff;

    /* Nötrler (soğuk) */
    --ink: #16203a;
    --ink-soft: #3c4a68;
    --gray-700: #4a5670;
    --gray-500: #6b7793;
    --gray-400: #8d98b2;
    --gray-300: #c3cddf;
    --line: #e2e8f3;
    --line-soft: #edf1f8;
    --surface: #ffffff;
    --surface-alt: #f7f9fd;
    --page-bg: #f2f5fa;

    /* Anlamsal */
    --success: #16794c;
    --success-soft: #e5f6ee;
    --warning: #a86a00;
    --warning-soft: #fdf3df;
    --danger: #b42332;
    --danger-soft: #fdecee;
    --info: #1b5e8a;
    --info-soft: #e7f2f9;

    /* Geometri & Gölge */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --shadow-xs: 0 1px 2px rgba(13, 26, 48, 0.06);
    --shadow-sm: 0 2px 8px rgba(13, 26, 48, 0.07);
    --shadow-md: 0 10px 30px rgba(13, 26, 48, 0.1);
    --shadow-lg: 0 24px 60px rgba(13, 26, 48, 0.16);
    --ring: 0 0 0 0.22rem rgba(27, 49, 85, 0.14);

    /* Yerleşim */
    --sidebar-w: 272px;
    --sidebar-w-collapsed: 86px;
    --topbar-h: 72px;

    /* Eski kod uyumluluğu */
    --site-red: var(--brand);
    --site-red-deep: var(--brand-700);
    --site-ink: var(--ink);
    --site-ink-soft: var(--ink-soft);
    --site-mist: var(--page-bg);
    --site-paper: var(--surface);
    --site-line: var(--line);
    --site-success: var(--success);
    --site-warn: var(--warning);
    --site-danger: var(--danger);
    --radius-md: var(--radius);
    --shadow-soft: var(--shadow-md);
    --app-topbar-height: var(--topbar-h);
}

/* == 02. TABAN / TİPOGRAFİ =============================================== */
* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
    font-family: "Inter", "Sora", system-ui, -apple-system, sans-serif;
    font-size: 0.925rem;
    color: var(--ink);
    background:
        radial-gradient(1100px 300px at 70% -80px, rgba(27, 49, 85, 0.055), transparent 70%),
        var(--page-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .page-heading, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: "Sora", "Inter", sans-serif;
    color: var(--ink);
    letter-spacing: -0.015em;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-700); }

code { font-family: "IBM Plex Mono", ui-monospace, monospace; color: var(--brand); word-break: break-all; }

.text-muted { color: var(--gray-500) !important; }

.eyebrow {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-400);
    margin-bottom: 0.3rem;
}

::selection { background: rgba(27, 49, 85, 0.85); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--brand-400); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* == 03. BUTONLAR & FORMLAR ============================================== */
.btn {
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease, border-color 0.14s ease;
}

.btn:active { transform: translateY(1px); }

.btn-brand {
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand-700);
    --bs-btn-hover-border-color: var(--brand-700);
    --bs-btn-active-bg: var(--brand-800);
    --bs-btn-active-border-color: var(--brand-800);
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
    box-shadow: 0 5px 14px rgba(27, 49, 85, 0.28);
}

.btn-brand:hover { box-shadow: 0 8px 20px rgba(27, 49, 85, 0.34); }
.btn-brand:focus-visible, .btn-brand:focus { box-shadow: var(--ring); }

.btn-outline-dark {
    --bs-btn-color: var(--brand);
    --bs-btn-border-color: var(--gray-300);
    --bs-btn-hover-bg: var(--brand-50);
    --bs-btn-hover-border-color: var(--brand);
    --bs-btn-hover-color: var(--brand);
    --bs-btn-active-bg: var(--brand-100);
    --bs-btn-active-border-color: var(--brand);
    --bs-btn-active-color: var(--brand-700);
    background: var(--surface);
}

.btn-outline-danger {
    --bs-btn-color: var(--danger);
    --bs-btn-border-color: #ecc4c9;
    --bs-btn-hover-bg: var(--danger);
    --bs-btn-hover-border-color: var(--danger);
}

.form-label { font-weight: 600; font-size: 0.82rem; color: var(--ink-soft); }

.form-control, .form-select {
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    padding: 0.55rem 0.8rem;
    font-size: 0.9rem;
    color: var(--ink);
    background-color: var(--surface);
    transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.form-control::placeholder { color: var(--gray-400); }

.form-control:focus, .form-select:focus {
    border-color: var(--brand);
    box-shadow: var(--ring);
}

.form-control:disabled, .form-select:disabled { background: var(--line-soft); }

.money-input, .money-input-group .form-control { font-variant-numeric: tabular-nums; }

.alert { border-radius: var(--radius); border-width: 1px; font-size: 0.88rem; box-shadow: var(--shadow-sm); }
.alert-success { background: var(--success-soft); border-color: #bfe6d2; color: #0f5a38; }
.alert-danger { background: var(--danger-soft); border-color: #f2c6cc; color: #8c1b28; }
.alert-warning { background: var(--warning-soft); border-color: #efd9a8; color: #7c4f00; }
.alert-info { background: var(--info-soft); border-color: #bedaeb; color: #14496b; }
.alert-light { background: var(--surface-alt); border-color: var(--line); color: var(--ink-soft); }

/* == 04. UYGULAMA İSKELETİ =============================================== */
.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    transition: grid-template-columns 0.22s ease;
}

.app-main { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; }

.app-content { padding: 1.4rem 1.6rem 2rem; }

.app-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem 1.4rem;
    padding: 0.9rem 1.5rem;
    font-size: 0.78rem;
    color: var(--gray-500);
    background: var(--surface);
    border-top: 1px solid var(--line);
}

.app-footer span strong { color: var(--brand); font-family: "Sora", sans-serif; }

.mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(9, 18, 35, 0.55);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

body.sidebar-open .mobile-sidebar-backdrop { opacity: 1; pointer-events: auto; }

.mobile-menu-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    position: relative;
    flex: 0 0 auto;
}

.mobile-menu-bubble span,
.mobile-menu-bubble span::before,
.mobile-menu-bubble span::after {
    content: "";
    display: block;
    width: 17px;
    height: 2px;
    border-radius: 2px;
    background: var(--brand);
    position: relative;
    transition: transform 0.2s ease;
}

.mobile-menu-bubble span::before { position: absolute; top: -5.5px; }
.mobile-menu-bubble span::after { position: absolute; top: 5.5px; }

/* == 05. SIDEBAR ========================================================= */
.app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-w);
    padding: 0.9rem 0.85rem;
    background:
        radial-gradient(340px 220px at 20% -40px, rgba(79, 140, 255, 0.1), transparent 60%),
        linear-gradient(176deg, var(--brand-900) 0%, var(--brand-700) 46%, var(--brand) 100%);
    color: #eaf0fa;
    overflow: hidden;
    z-index: 1050;
    transition: width 0.22s ease;
}

.brand-block, .brand-block.refined-brand {
    flex: 0 0 auto;
    margin: -0.9rem -0.85rem 0.8rem;
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.system-logo-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(6, 12, 24, 0.35);
    transition: transform 0.16s ease;
}

.system-logo-card:hover { transform: translateY(-1px); }

.brand-logo { width: 100%; max-height: 34px; object-fit: contain; }
.brand-logo-mark { display: none; width: 34px; height: 34px; object-fit: contain; }

.menu-nav {
    flex: 1 1 auto;
    display: grid;
    align-content: start;
    gap: 0.3rem;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0 -0.35rem;
    padding: 0 0.35rem 0.6rem;
    scrollbar-width: thin;
}

.menu-nav::-webkit-scrollbar { width: 5px; }
.menu-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.18); }

.menu-group { display: grid; gap: 0.22rem; }

.menu-group-toggle {
    display: flex;
    align-items: center;
    gap: 0.68rem;
    width: 100%;
    padding: 0.62rem 0.72rem;
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    color: rgba(234, 240, 250, 0.9);
    font-size: 0.845rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.menu-group-toggle:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.menu-group.is-open > .menu-group-toggle { background: rgba(255, 255, 255, 0.07); color: #fff; }

.menu-group-title { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.menu-icon {
    display: inline-flex;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
}

.menu-icon svg { width: 18px; height: 18px; fill: currentColor; opacity: 0.92; }

.menu-chevron { display: inline-flex; transition: transform 0.18s ease; opacity: 0.65; }
.menu-chevron svg { width: 15px; height: 15px; fill: currentColor; }
.menu-group.is-open .menu-chevron { transform: rotate(180deg); }

.menu-group-items {
    display: none;
    position: relative;
    margin-left: 1.15rem;
    padding-left: 0.7rem;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.menu-group-items.is-open { display: grid; gap: 0.14rem; }

.menu-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.48rem 0.6rem;
    border: 1px solid transparent;
    border-radius: 9px;
    color: rgba(222, 231, 245, 0.82);
    font-size: 0.815rem;
    font-weight: 500;
    transition: background-color 0.13s ease, color 0.13s ease;
}

.menu-link .menu-icon svg { width: 15px; height: 15px; }

.menu-link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.menu-link.active,
.menu-group-toggle.menu-direct-link.active {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--accent);
}

.menu-link span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-status-clock {
    flex: 0 0 auto;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.35rem 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(222, 231, 245, 0.7);
    font-size: 0.72rem;
}

.sidebar-time { font-family: "IBM Plex Mono", monospace; font-size: 0.8rem; color: rgba(255, 255, 255, 0.85); }

.sidebar-collapse-toggle {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.45rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(234, 240, 250, 0.85);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.14s ease;
}

.sidebar-collapse-toggle:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.sidebar-collapse-toggle .menu-icon svg { width: 15px; height: 15px; }

/* Daraltılmış sidebar (masaüstü) */
@media (min-width: 992px) {
    body.sidebar-collapsed .app-shell { grid-template-columns: var(--sidebar-w-collapsed) minmax(0, 1fr); }
    body.sidebar-collapsed .app-sidebar { width: var(--sidebar-w-collapsed); padding: 0.9rem 0.55rem; }
    body.sidebar-collapsed .brand-logo { display: none; }
    body.sidebar-collapsed .brand-logo-mark { display: block; }
    body.sidebar-collapsed .system-logo-card { padding: 0.45rem; }
    body.sidebar-collapsed .menu-group-title,
    body.sidebar-collapsed .menu-chevron,
    body.sidebar-collapsed .sidebar-status-clock,
    body.sidebar-collapsed .sidebar-collapse-toggle span:last-child { display: none; }
    body.sidebar-collapsed .menu-group-toggle { justify-content: center; padding: 0.62rem 0.4rem; }
    body.sidebar-collapsed .menu-group-items { margin-left: 0; padding-left: 0; border-left: 0; }
    body.sidebar-collapsed .menu-link { justify-content: center; padding: 0.5rem 0.4rem; }
    body.sidebar-collapsed .menu-link span:last-child { display: none; }
    body.sidebar-collapsed .sidebar-collapse-toggle { justify-content: center; }
}

/* == 06. TOPBAR & AKILLI ARAMA =========================================== */
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--topbar-h);
    padding: 0.7rem 1.6rem;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.topbar-title { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }

.page-heading {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--brand);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.smart-search { position: relative; flex: 1 1 400px; max-width: 520px; }

.smart-search .form-control {
    padding-left: 2.3rem;
    border-radius: 999px;
    background: var(--surface-alt);
    border-color: var(--line);
}

.smart-search .form-control:focus { background: var(--surface); }

.smart-search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 5;
}

.smart-search-icon svg { width: 15px; height: 15px; fill: var(--gray-400); }

.smart-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 1060;
    max-height: 380px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.35rem;
}

.smart-search-item {
    display: block;
    padding: 0.55rem 0.7rem;
    border-radius: 9px;
    color: var(--ink);
}

.smart-search-item small { display: block; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand-400); font-weight: 700; }
.smart-search-item strong { font-size: 0.85rem; font-weight: 600; }
.smart-search-item:hover, .smart-search-item.active { background: var(--brand-50); }
.smart-search-item.muted { color: var(--gray-500); cursor: default; }

.topbar-right { display: flex; align-items: center; gap: 0.6rem; flex: 0 0 auto; }

.notification-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    cursor: pointer;
    transition: border-color 0.14s ease, background-color 0.14s ease;
}

.notification-bell:hover { border-color: var(--brand); background: var(--brand-50); }
.notification-bell svg { width: 19px; height: 19px; fill: var(--brand); }

.notification-bell span {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    font-size: 0.66rem;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(13, 26, 48, 0.3);
}

.notification-bell.has-notifications { animation: bell-nudge 5s ease infinite; }

@keyframes bell-nudge {
    0%, 92%, 100% { transform: rotate(0); }
    94% { transform: rotate(9deg); }
    96% { transform: rotate(-7deg); }
    98% { transform: rotate(4deg); }
}

.notification-panel { width: min(340px, 92vw); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }

.notification-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.75rem 0.9rem;
    background: var(--surface-alt);
    border-bottom: 1px solid var(--line);
}

.notification-panel-head strong { display: block; font-size: 0.85rem; color: var(--brand); }
.notification-panel-head small { color: var(--gray-500); font-size: 0.72rem; }

.notification-item {
    display: block;
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid var(--line-soft);
    color: var(--ink);
    transition: background-color 0.12s ease;
}

.notification-item:hover { background: var(--brand-50); }
.notification-item strong { display: block; font-size: 0.8rem; font-weight: 650; color: var(--brand); }
.notification-item span { display: block; font-size: 0.75rem; color: var(--gray-500); }

.notification-empty { padding: 1.4rem 0.9rem; text-align: center; color: var(--gray-500); font-size: 0.82rem; }

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.32rem 0.4rem 0.32rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    transition: border-color 0.14s ease;
}

.user-chip:hover { border-color: var(--brand); }
.user-chip::after { color: var(--gray-400); }

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(160deg, var(--brand-300), var(--brand-700));
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}

.user-avatar.lg { width: 44px; height: 44px; font-size: 1rem; }

.user-card-menu { width: min(280px, 92vw); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.5rem 0; }

.user-card-summary { display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 1rem 0.7rem; }
.user-card-summary strong { display: block; font-size: 0.88rem; }
.user-card-summary small { color: var(--gray-500); }

/* == 07. İÇERİK BİLEŞENLERİ ============================================== */
.panel-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.45rem;
    box-shadow: var(--shadow-sm);
}

.dashboard-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.6rem 1.7rem;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(500px 200px at 88% -60px, rgba(79, 140, 255, 0.16), transparent 60%),
        radial-gradient(700px 300px at -10% 120%, rgba(61, 90, 140, 0.35), transparent 65%),
        linear-gradient(135deg, var(--brand-800) 0%, var(--brand) 68%, var(--brand-400) 100%);
    color: #fff;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.dashboard-hero .eyebrow { color: var(--accent); }
.dashboard-hero h2 { color: #fff; font-size: 1.45rem; margin-bottom: 0.25rem; }
.dashboard-hero p { color: rgba(233, 240, 250, 0.82); margin: 0; max-width: 560px; font-size: 0.88rem; }

.dashboard-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.dashboard-live-badge span {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--accent);
    animation: pulse-dot 1.6s ease infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79, 140, 255, 0.55); }
    60% { box-shadow: 0 0 0 7px rgba(79, 140, 255, 0); }
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.9rem;
}

.stat-card {
    position: relative;
    display: block;
    padding: 1rem 1.05rem 1.05rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.stat-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--brand-100);
    transition: background-color 0.16s ease;
}

.stat-card h3 {
    font-family: "Inter", sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray-500);
    margin-bottom: 0.4rem;
}

.stat-card p {
    font-family: "Sora", sans-serif;
    font-size: 1.32rem;
    font-weight: 700;
    color: var(--brand);
    margin: 0;
    font-variant-numeric: tabular-nums;
}

.stat-card-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-100);
}

.stat-card-link:hover::before { background: var(--brand); }

.stat-card.is-live::after {
    content: "";
    position: absolute;
    top: 12px;
    right: 12px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--accent);
    animation: pulse-dot 1.6s ease infinite;
}

.stat-card.is-live::before { background: var(--accent); }

.mini-list { display: grid; gap: 0.55rem; }

.outlook-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-alt);
    color: var(--ink);
    transition: border-color 0.14s ease, background-color 0.14s ease, transform 0.14s ease;
}

a.outlook-item:hover { border-color: var(--brand); background: var(--brand-50); transform: translateX(2px); }

.outlook-item strong { display: block; font-size: 0.86rem; font-weight: 650; }
.outlook-item span { display: block; font-size: 0.76rem; color: var(--brand-400); font-weight: 600; }
.outlook-item p { margin: 0.1rem 0 0; font-size: 0.75rem; color: var(--gray-500); }

.outlook-item.is-alert { border-left: 3px solid var(--warning); }

.timeline-list { display: grid; gap: 0.45rem; }

.timeline-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    transition: border-color 0.14s ease, background-color 0.14s ease;
}

.timeline-item:hover { border-color: var(--brand); background: var(--brand-50); }

.timeline-item > span {
    flex: 0 0 auto;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand);
    background: var(--brand-50);
    border-radius: 8px;
    padding: 0.3rem 0.5rem;
}

.timeline-item strong { display: block; font-size: 0.85rem; }
.timeline-item small { color: var(--gray-500); }

.timeline-item.is-done { opacity: 0.62; }
.timeline-item.is-done > span { background: var(--success-soft); color: var(--success); }

.activity-list { display: grid; gap: 0.5rem; }

.activity-item {
    display: flex;
    gap: 0.7rem;
    padding: 0.6rem 0.8rem;
    border-left: 3px solid var(--brand-100);
    background: var(--surface-alt);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.83rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 0.75rem;
}

.detail-item {
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-alt);
}

.detail-item > span {
    display: block;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.detail-item strong { font-size: 0.9rem; color: var(--ink); word-break: break-word; }
.detail-item a { font-weight: 600; }

/* Tablolar — modern nötr görünüm (mavi dolgu yok) */
.table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: #f7f8f9;
    font-size: 0.865rem;
    border-color: #edeff2;
}

.table thead th {
    background: transparent;
    color: #6e7683;
    font-size: 0.67rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid #e4e7eb;
    padding: 0.6rem 0.75rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.7rem 0.75rem;
    border-color: #f0f1f4;
    vertical-align: middle;
    color: var(--ink);
}

.table tbody tr { transition: background-color 0.1s ease; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #f7f8f9; }

/* Durum rozetleri */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.28rem 0.62rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: var(--line-soft);
    color: var(--gray-700);
    white-space: nowrap;
}

.badge-status::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; opacity: 0.65; }

.badge-status.status-paid, .badge-status.status-approved, .badge-status.status-active,
.badge-status.status-done, .badge-status.status-completed, .badge-status.status-sent,
.badge-status.status-valid, .badge-status.status-published, .badge-status.status-processed,
.badge-status.status-created { background: var(--success-soft); color: var(--success); }

.badge-status.status-unpaid, .badge-status.status-overdue, .badge-status.status-failed,
.badge-status.status-rejected, .badge-status.status-cancelled, .badge-status.status-expired,
.badge-status.status-demo_expired, .badge-status.status-verify_failed { background: var(--danger-soft); color: var(--danger); }

.badge-status.status-partial, .badge-status.status-pending, .badge-status.status-pending_approval,
.badge-status.status-eft_pending, .badge-status.status-reviewing, .badge-status.status-in_progress,
.badge-status.status-queued, .badge-status.status-late, .badge-status.status-manual_review,
.badge-status.status-demo, .badge-status.status-expiring, .badge-status.status-delayed { background: var(--warning-soft); color: var(--warning); }

.badge-status.status-new, .badge-status.status-open, .badge-status.status-planned,
.badge-status.status-started, .badge-status.status-test, .badge-status.status-draft { background: var(--info-soft); color: var(--info); }

.badge-status.status-passive, .badge-status.status-closed, .badge-status.status-archived,
.badge-status.status-duplicate, .badge-status.status-outside_location, .badge-status.status-missed,
.badge-status.status-inactive { background: var(--line-soft); color: var(--gray-500); }

/* Modül filtre çubuğu */
.module-filter { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }

/* Rapor & yönetim gridleri */
.report-grid, .system-management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.9rem;
}

.system-management-card, .report-grid > a, .report-grid > article {
    display: block;
    padding: 1.1rem 1.2rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    color: var(--ink);
    box-shadow: var(--shadow-xs);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.system-management-card:hover, .report-grid > a:hover {
    transform: translateY(-3px);
    border-color: var(--brand-100);
    box-shadow: var(--shadow-md);
}

/* Profil */
.profile-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.4rem 1.5rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--brand-800), var(--brand));
    color: #fff;
    box-shadow: var(--shadow-md);
}

.profile-hero h2, .profile-hero h4, .profile-hero strong { color: #fff; }
.profile-hero small, .profile-hero p { color: rgba(233, 240, 250, 0.75); }

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

.password-force-overlay {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(9, 18, 35, 0.66);
    backdrop-filter: blur(4px);
}

.password-force-card {
    width: min(440px, 100%);
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    box-shadow: var(--shadow-lg);
}

/* Lisans */
.license-hero {
    padding: 1.5rem 1.6rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--brand-800), var(--brand) 70%, var(--brand-400));
    color: #fff;
    box-shadow: var(--shadow-md);
}

.license-hero .eyebrow { color: var(--accent); }
.license-hero h2, .license-hero h3 { color: #fff; }
.license-hero p { color: rgba(233, 240, 250, 0.8); }

.license-key-input {
    font-family: "IBM Plex Mono", monospace;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.license-status-card { border-left: 4px solid var(--brand); }

.license-summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.75rem; }

.license-summary-item {
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-alt);
}

.license-summary-item span { display: block; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray-500); }
.license-summary-item strong { font-size: 0.92rem; color: var(--brand); }

/* SMS */
.sms-template-list, .automation-list { display: grid; gap: 0.8rem; }

.sms-template-card, .automation-card {
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-alt);
}

.company-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: var(--brand-50);
    color: var(--brand);
    font-size: 0.75rem;
    font-weight: 700;
}

/* Konfigürasyon */
.configuration-head { margin-bottom: 1rem; }
.configuration-row { display: grid; gap: 0.6rem; }
.configuration-table td, .configuration-table th { vertical-align: middle; }

/* Cari bakiye özeti */
.current-balance-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.8rem; }

/* Taşınma */
.move-resident-card {
    padding: 1rem 1.1rem;
    border: 1px dashed var(--gray-300);
    border-radius: var(--radius);
    background: var(--surface-alt);
}

/* Ödeme ekranları */
.payment-frame-card { overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-md); }
.payment-frame-card iframe { display: block; width: 100%; min-height: 560px; border: 0; }

.payment-result-card {
    width: min(560px, 100%);
    margin: 0 auto;
    text-align: center;
    padding: 2.2rem 1.8rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.payment-result-meta { display: grid; gap: 0.4rem; margin-top: 1rem; color: var(--gray-500); font-size: 0.85rem; }

.dashboard-pay-row form { flex: 0 0 auto; }

/* Bekçi ekranları */
.guard-page-intro { margin-bottom: 1.2rem; }

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

.guard-scan-card { text-align: center; padding: 1.6rem 1.3rem; }

.guard-action-stack { display: grid; gap: 0.6rem; margin-top: 1rem; }

.guard-last-scan, .guard-next-step, .guard-location-state {
    padding: 0.75rem 0.95rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface-alt);
    font-size: 0.84rem;
}

.guard-plan-rows { display: grid; gap: 0.6rem; }

.guard-plan-row, .guard-plan-row-simple {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-alt);
}

.guard-plan-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 700;
}

/* QR baskı kartları */
.guard-qr-print-wrap { display: grid; place-items: center; padding: 1rem 0 2rem; }

.guard-qr-card {
    width: min(360px, 100%);
    text-align: center;
    padding: 1.8rem 1.6rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.guard-qr-brand { display: grid; gap: 0.4rem; justify-items: center; margin-bottom: 1.1rem; }
.guard-qr-brand img { max-width: 170px; max-height: 30px; object-fit: contain; }
.guard-qr-brand span { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-400); }

.guard-qr-code { display: grid; place-items: center; margin: 0 auto 1rem; }
.guard-qr-code img, .guard-qr-code canvas { border: 8px solid #fff; outline: 1px solid var(--line); border-radius: 8px; }

.guard-qr-card h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.guard-qr-card p { color: var(--gray-500); font-size: 0.82rem; margin-bottom: 0.6rem; }
.guard-qr-card code { display: block; font-size: 0.68rem; color: var(--gray-500); }

/* QR public sayfası */
.qr-public-page { width: min(100%, 660px); margin: 0 auto; }
.qr-public-header { text-align: center; margin-bottom: 1.1rem; }

/* Auth genel (guard scan/incident, 500, public QR) */
.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.6rem 1rem;
    background:
        radial-gradient(800px 300px at 80% -100px, rgba(27, 49, 85, 0.08), transparent 65%),
        var(--page-bg);
}

.auth-container { width: min(100%, 620px); }

.auth-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 1.8rem;
    box-shadow: var(--shadow-md);
}

.auth-logo { max-height: 40px; object-fit: contain; }

/* == 09. LOGIN (MODERN) ================================================== */
.auth-body.login-shell {
    padding: 0;
    place-items: stretch;
    background: var(--brand-900);
}

.auth-container.login-shell {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 560px);
}

.login-visual-panel {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(1.8rem, 4vw, 3.4rem);
    color: #fff;
    overflow: hidden;
    background:
        linear-gradient(118deg, rgba(9, 18, 35, 0.62) 12%, rgba(13, 26, 48, 0.93) 78%),
        url("../img/login-site-bg.png") center / cover no-repeat;
}

.login-visual-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(620px 340px at 12% 108%, rgba(79, 140, 255, 0.2), transparent 60%),
        radial-gradient(700px 420px at 90% -10%, rgba(61, 90, 140, 0.4), transparent 65%);
}

.login-visual-panel::after {
    content: "";
    position: absolute;
    inset: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-xl);
    pointer-events: none;
}

.login-visual-copy { position: relative; z-index: 1; max-width: 480px; display: grid; gap: 0.7rem; }

.login-visual-copy span {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    backdrop-filter: blur(4px);
}

.login-visual-copy strong {
    font-family: "Sora", sans-serif;
    font-size: clamp(1.35rem, 2.6vw, 1.9rem);
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
}

.login-visual-copy p { color: rgba(226, 235, 248, 0.8); font-size: 0.92rem; margin: 0; }

.login-feature-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.4rem; }

.login-feature-chip {
    padding: 0.32rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(232, 239, 250, 0.9);
    font-size: 0.73rem;
    font-weight: 600;
}

.auth-container.login-shell .auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: clamp(1.8rem, 4vw, 3.4rem);
    background: var(--surface);
}

.login-form-shell { width: min(400px, 100%); margin: 0 auto; }

.login-brand-panel { display: grid; gap: 0.7rem; margin-bottom: 1.9rem; }
.login-brand-panel img { max-height: 44px; width: fit-content; max-width: 240px; object-fit: contain; }
.login-brand-panel strong { font-family: "Sora", sans-serif; font-size: 1.28rem; color: var(--brand); letter-spacing: -0.01em; }
.login-brand-panel p { margin: 0; color: var(--gray-500); font-size: 0.88rem; }

.login-eyebrow {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-400);
}

.login-form-grid { display: grid; gap: 1.05rem; }

.login-field .form-label { margin-bottom: 0.35rem; }

.login-form-grid .form-control {
    padding: 0.72rem 0.95rem;
    border-radius: 12px;
    font-size: 0.95rem;
    background: var(--surface-alt);
}

.login-form-grid .form-control:focus { background: var(--surface); }

.login-captcha-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem; align-items: center; }
.login-captcha-row img { height: 46px; border-radius: 10px; border: 1px solid var(--line); }

.login-form-grid .btn-brand {
    padding: 0.78rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    margin-top: 0.3rem;
}

.login-page-footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 10;
    pointer-events: none;
}

.login-page-footer .app-footer {
    background: transparent;
    border: 0;
    color: rgba(233, 240, 250, 0.55);
    justify-content: flex-start;
    padding-left: clamp(1.8rem, 4vw, 3.4rem);
}

.login-page-footer .app-footer span strong { color: rgba(255, 255, 255, 0.85); }

/* == 10. KURULUM SİHİRBAZI (MODERN) ====================================== */
.auth-body.install-shell {
    display: block;
    padding: 0;
    background:
        radial-gradient(900px 340px at 85% -120px, rgba(79, 140, 255, 0.12), transparent 65%),
        linear-gradient(180deg, var(--brand-900) 0%, var(--brand-700) 340px, var(--page-bg) 340px, var(--page-bg) 100%);
}

.auth-container.install-shell { width: 100%; }

.install-shell .auth-card { background: transparent; border: 0; box-shadow: none; padding: 0; }

.setup-container { width: min(1040px, calc(100% - 2rem)); margin: 0 auto; padding: 2.4rem 0 2rem; }

.setup-header { text-align: center; color: #fff; margin-bottom: 1.8rem; }

.setup-brand { display: flex; justify-content: center; margin-bottom: 1.1rem; }

.setup-brand-logo {
    max-width: min(300px, 72vw);
    max-height: 40px;
    object-fit: contain;
    background: #ffffff;
    padding: 0.7rem 1.3rem;
    border-radius: 14px;
    box-sizing: content-box;
    box-shadow: var(--shadow-lg);
}

.setup-header h1 { color: #fff; font-size: clamp(1.25rem, 3vw, 1.7rem); margin-bottom: 0.4rem; }
.setup-header p { color: rgba(226, 235, 248, 0.78); max-width: 620px; margin: 0 auto; font-size: 0.9rem; }

.setup-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: clamp(1.3rem, 3vw, 2.2rem);
    box-shadow: var(--shadow-lg);
    counter-reset: setup-step;
}

.setup-section-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 1.7rem 0 0.95rem;
    font-family: "Sora", sans-serif;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--brand);
    counter-increment: setup-step;
}

.setup-section-title:first-of-type { margin-top: 0.2rem; }

.setup-section-title::before {
    content: counter(setup-step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
}

.setup-section-title::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }

.setup-checks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 0.55rem;
}

.setup-check-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-alt);
    font-size: 0.82rem;
    font-weight: 500;
}

.setup-check-ok, .setup-check-fail {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
}

.setup-check-ok { background: var(--success-soft); color: var(--success); }
.setup-check-ok::before { content: "✓"; }
.setup-check-fail { background: var(--danger-soft); color: var(--danger); }
.setup-check-fail::before { content: "!"; }

.setup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem 1.1rem; }

.setup-field label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 0.3rem; }

.setup-field input {
    width: 100%;
    padding: 0.62rem 0.85rem;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--ink);
    background: var(--surface);
    transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.setup-field input:focus { outline: 0; border-color: var(--brand); box-shadow: var(--ring); }

.setup-full { grid-column: 1 / -1; }

.setup-field-error { min-height: 0.95rem; margin-top: 0.22rem; font-size: 0.73rem; color: var(--danger); }

.setup-hint { font-size: 0.78rem; color: var(--gray-500); margin-top: 0.35rem; line-height: 1.5; }

.setup-demo-option {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    border: 1px dashed var(--gray-300);
    border-radius: var(--radius);
    background: var(--accent-soft);
    cursor: pointer;
    transition: border-color 0.14s ease;
}

.setup-demo-option:hover { border-color: var(--accent); }
.setup-demo-option input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--brand); }
.setup-demo-option strong { display: block; font-size: 0.86rem; color: var(--ink); }
.setup-demo-option small { color: var(--gray-500); font-size: 0.76rem; }

.setup-service-details {
    margin-top: 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-alt);
    overflow: hidden;
}

.setup-service-details summary {
    padding: 0.8rem 1rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--brand);
    cursor: pointer;
    user-select: none;
}

.setup-service-details[open] summary { border-bottom: 1px solid var(--line); }
.setup-service-body { padding: 1rem; }

.setup-db-check-row { display: flex; justify-content: flex-start; }

.setup-status-box {
    margin-top: 0.8rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-alt);
    font-size: 0.84rem;
    color: var(--ink-soft);
}

.setup-error-box {
    display: grid;
    gap: 0.3rem;
    margin-bottom: 1.1rem;
    padding: 0.85rem 1rem;
    border: 1px solid #f2c6cc;
    border-radius: var(--radius);
    background: var(--danger-soft);
    color: #8c1b28;
    font-size: 0.84rem;
}

.setup-progress-box {
    display: none;
    margin: 1rem 0;
    padding: 0.9rem 1.05rem;
    border: 1px solid #bedaeb;
    border-radius: var(--radius);
    background: var(--info-soft);
    color: #14496b;
    font-size: 0.86rem;
    font-weight: 500;
}

.setup-progress-box.show { display: block; animation: setup-pulse 1.8s ease infinite; }

@keyframes setup-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.72; } }

.setup-actions { display: flex; justify-content: flex-end; gap: 0.7rem; margin-top: 1.7rem; }

.setup-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.72rem 1.7rem;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, var(--brand-400), var(--brand));
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(27, 49, 85, 0.32);
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.setup-button:hover { transform: translateY(-1px); box-shadow: 0 9px 24px rgba(27, 49, 85, 0.4); color: #fff; }
.setup-button:disabled { opacity: 0.6; cursor: wait; transform: none; }

.setup-secondary-button {
    background: var(--surface);
    color: var(--brand);
    border: 1px solid var(--gray-300);
    box-shadow: none;
}

.setup-secondary-button:hover { color: var(--brand); border-color: var(--brand); box-shadow: var(--shadow-sm); }

.setup-footer { text-align: center; margin-top: 1.6rem; color: var(--gray-500); font-size: 0.78rem; }
.setup-footer small { display: block; margin-top: 0.3rem; }
.setup-no-link { color: var(--gray-500); }

/* == 11. RESPONSIVE & PRINT ============================================== */
@media (max-width: 1200px) {
    .dashboard-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
}

@media (max-width: 991.98px) {
    .app-shell { grid-template-columns: minmax(0, 1fr); }

    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100dvh;
        width: min(300px, 84vw);
        transform: translateX(-104%);
        transition: transform 0.24s ease;
        box-shadow: var(--shadow-lg);
    }

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

    .app-topbar { flex-wrap: wrap; padding: 0.65rem 1rem; gap: 0.6rem; }
    .topbar-title { order: 1; flex: 1 1 auto; }
    .topbar-right { order: 2; }
    .smart-search { order: 3; flex: 1 1 100%; max-width: none; }

    .app-content { padding: 1rem; }

    .auth-container.login-shell { grid-template-columns: minmax(0, 1fr); }
    .login-visual-panel { display: none; }
    .auth-container.login-shell .auth-card { min-height: 100vh; }
    .login-page-footer { display: none; }
}

@media (max-width: 768px) {
    .panel-card { padding: 1rem 1.05rem; }

    .dashboard-hero { padding: 1.2rem 1.25rem; }
    .dashboard-hero h2 { font-size: 1.2rem; }

    .setup-grid { grid-template-columns: minmax(0, 1fr); }
    .setup-actions { flex-direction: column-reverse; }
    .setup-actions .setup-button { width: 100%; }

    /* Tabloları kart görünümüne çevir (app.js td'lere data-label basar) */
    .table-responsive .table thead { display: none; }

    .table-responsive .table tbody tr {
        display: block;
        margin-bottom: 0.7rem;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--surface);
        box-shadow: var(--shadow-xs);
        overflow: hidden;
    }

    .table-responsive .table tbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.8rem;
        padding: 0.55rem 0.85rem;
        border: 0;
        border-bottom: 1px solid var(--line-soft);
        text-align: right;
    }

    .table-responsive .table tbody td:last-child { border-bottom: 0; }

    .table-responsive .table tbody td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        font-size: 0.66rem;
        font-weight: 700;
        letter-spacing: 0.07em;
        text-transform: uppercase;
        color: var(--gray-500);
        text-align: left;
    }

    .table-responsive .table tbody td:not([data-label])::before { content: none; }

    .detail-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 480px) {
    body { font-size: 0.9rem; }
    .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
    .stat-card p { font-size: 1.1rem; }
    .topbar-right .user-chip > span:first-child { display: none; }
    .user-chip { padding: 0.3rem; border: 0; background: transparent; }
    .app-footer { flex-direction: column; gap: 0.2rem; text-align: center; }
    .outlook-item { flex-direction: column; align-items: stretch; }
    .login-captcha-row { grid-template-columns: minmax(0, 1fr); }
}

@media print {
    .app-sidebar, .app-topbar, .app-footer, .mobile-sidebar-backdrop,
    .btn, .setup-actions, .sidebar-collapse-toggle { display: none !important; }

    body { background: #fff; }
    .app-shell { display: block; }
    .app-content { padding: 0; }
    .panel-card { border: 0; box-shadow: none; padding: 0.4rem 0; }

    .guard-qr-print-wrap { padding: 0; }
    .guard-qr-card { border: 1.4px solid #111; border-radius: 12px; box-shadow: none; width: 92mm; padding: 8mm 6mm; }
}

/* Araç kartı baskısı (eski uyumluluk) */
.vehicle-card-print-page { min-height: 100vh; display: grid; place-items: center; padding: 14mm; background: #f4f4f4; }
.vehicle-print-card { width: 148mm; min-height: 105mm; background: #fff; border: 1.4px solid #111; color: #000; font-family: Arial, sans-serif; overflow: hidden; }
.vehicle-print-header { text-align: center; padding: 7mm 6mm 5mm; border-bottom: 1.2px solid #111; }
.vehicle-print-header h1, .vehicle-print-header h2 { margin: 0; font-weight: 900; }
.vehicle-print-header h1 { font-size: 18pt; }
.vehicle-print-header h2 { margin-top: 3mm; color: #60656b; font-size: 15pt; }
.vehicle-print-row { border-bottom: 1.2px solid #111; text-align: center; }
.vehicle-print-row strong, .vehicle-print-row span { display: block; }
.vehicle-print-row strong { background: #d8d8d8; padding: 1.4mm 2mm; font-size: 11pt; }
.vehicle-print-row span { padding: 3mm 4mm; min-height: 11mm; font-size: 13pt; }
.vehicle-print-footer { display: grid; grid-template-columns: 28mm minmax(0, 1fr) 36mm; align-items: center; gap: 4mm; min-height: 20mm; padding: 2.5mm 4mm; }
.vehicle-print-logo img { max-width: 27mm; max-height: 14mm; object-fit: contain; }
.vehicle-print-company { text-align: center; line-height: 1.25; }
.vehicle-print-company strong, .vehicle-print-company span, .vehicle-print-company small { display: block; }

/* == 12. REZERVASYON TAKVİMİ ============================================ */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.calendar-weekday {
    text-align: center;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-500);
    padding: 0.3rem 0;
}

.calendar-cell {
    min-height: 92px;
    padding: 0.4rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-alt);
    display: grid;
    align-content: start;
    gap: 0.25rem;
}

.calendar-cell-empty { background: transparent; border-style: dashed; opacity: 0.4; }

.calendar-cell.is-today { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--brand-50); }

.calendar-day-no { font-size: 0.72rem; font-weight: 700; color: var(--gray-500); }
.calendar-cell.is-today .calendar-day-no { color: var(--brand); }

.calendar-event {
    display: block;
    padding: 0.22rem 0.4rem;
    border-radius: 7px;
    background: var(--brand);
    color: #fff;
    font-size: 0.66rem;
    line-height: 1.25;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.calendar-event:hover { color: #fff; background: var(--brand-700); }
.calendar-event.is-pending { background: var(--warning-soft); color: var(--warning); }
.calendar-event strong { font-family: "IBM Plex Mono", monospace; margin-right: 0.2rem; }

@media (max-width: 768px) {
    .calendar-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
    .calendar-cell { min-height: 54px; padding: 0.2rem; }
    .calendar-event { font-size: 0; padding: 0; height: 6px; }
    .calendar-event strong { font-size: 0; }
}

/* == 13. KARANLIK MOD ==================================================== */
html[data-theme="dark"] {
    --ink: #e6ecf7;
    --ink-soft: #c0cade;
    --gray-700: #aeb9d0;
    --gray-500: #8b97b3;
    --gray-400: #6d7994;
    --gray-300: #3d4a66;
    --line: #26314b;
    --line-soft: #202b43;
    --surface: #141e33;
    --surface-alt: #18233b;
    --page-bg: #0d1526;
    --brand-50: #1c2942;
    --brand-100: #24334f;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
    --success-soft: #123527;
    --warning-soft: #33270e;
    --danger-soft: #371520;
    --info-soft: #10293a;
    --accent-soft: #16233f;
}

html[data-theme="dark"] body {
    background: radial-gradient(1100px 300px at 70% -80px, rgba(61, 90, 140, 0.14), transparent 70%), var(--page-bg);
}

html[data-theme="dark"] .app-topbar { background: rgba(13, 21, 38, 0.88); }
html[data-theme="dark"] .system-logo-card { background: #ffffff; }
html[data-theme="dark"] .table { --bs-table-hover-bg: #1a2236; border-color: #232c42; }
html[data-theme="dark"] .table thead th { background: transparent; color: #8b93a5; border-bottom-color: #2a3349; }
html[data-theme="dark"] .table tbody td { border-color: #202940; }
html[data-theme="dark"] .table tbody tr:hover { background: #1a2236; }
html[data-theme="dark"] .btn-outline-dark { background: transparent; }
html[data-theme="dark"] .form-control, html[data-theme="dark"] .form-select { background-color: var(--surface-alt); color: var(--ink); }
html[data-theme="dark"] .form-control:focus, html[data-theme="dark"] .form-select:focus { background-color: var(--surface); }
html[data-theme="dark"] .alert-success { color: #7fd8ab; }
html[data-theme="dark"] .alert-danger { color: #f093a3; }
html[data-theme="dark"] .alert-warning { color: #ecc06b; }
html[data-theme="dark"] .alert-info { color: #7cc0e8; }
html[data-theme="dark"] .guard-qr-card { background: #ffffff; color: #16203a; }
html[data-theme="dark"] .auth-container.login-shell .auth-card { background: var(--surface); }
html[data-theme="dark"] .setup-panel { background: var(--surface); }
html[data-theme="dark"] .setup-field input { background: var(--surface-alt); color: var(--ink); }
html[data-theme="dark"] .dropdown-menu { background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] .dropdown-item { color: var(--ink); }
html[data-theme="dark"] .dropdown-item:hover { background: var(--surface-alt); color: var(--ink); }
html[data-theme="dark"] .dropdown-item-text { color: var(--gray-500); }
html[data-theme="dark"] .table { --bs-table-bg: transparent; --bs-table-color: var(--ink); }
html[data-theme="dark"] .btn-close { filter: invert(1) grayscale(100%); }

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    cursor: pointer;
    color: var(--brand);
    transition: border-color 0.14s ease, background-color 0.14s ease;
}

.theme-toggle:hover { border-color: var(--brand); background: var(--brand-50); }
.theme-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle { color: #9dc1ff; }

/* == 14. DEMO HESAP KARTI =============================================== */
.demo-accounts-card {
    padding: 0.9rem 1rem;
    border: 1px dashed var(--gray-300);
    border-radius: var(--radius);
    background: var(--surface-alt);
}
