  /* =====================================================================
     0) RESET & BASE
     ===================================================================== */
  *, *::before, *::after { box-sizing: border-box; }
  html, body { height: 100%; }
  body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 14px;
    line-height: 1.5;
  }
  ul, ol { list-style: none; margin: 0; padding: 0; }
  a { color: inherit; text-decoration: none; }
  button { font-family: inherit; cursor: pointer; }
  input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
  table { border-collapse: collapse; width: 100%; }
  svg { display: block; }
  h1, h2, h3, h4, p { margin: 0; }
  img { max-width: 100%; display: block; }

  /* =====================================================================
     1) TASARIM TOKENLARI (Design Tokens)
     ===================================================================== */
  :root {
    /* Nötr yüzeyler */
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-alt: #fbfbfd;
    --surface-sunken: #f1f2f5;
    --border: #e6e8ec;
    --border-strong: #d7dae0;

    /* Metin */
    --text-primary: #14161c;
    --text-secondary: #62676f;
    --text-tertiary: #9aa0a8;
    --text-on-accent: #ffffff;

    /* Marka / vurgu rengi */
    --accent: #4f46e5;
    --accent-hover: #4338ca;
    --accent-soft: #eef1ff;
    --accent-soft-strong: #e0e3ff;

    /* Sidebar (koyu panel) */
    --sidebar-bg: #14151b;
    --sidebar-bg-elevated: #1b1c24;
    --sidebar-text: #a7abb8;
    --sidebar-text-active: #ffffff;
    --sidebar-border: #24252e;

    /* Semantik renkler */
    --danger: #dc2626;
    --danger-soft: #fdecec;
    --warning: #b45309;
    --warning-soft: #fef3c7;
    --success: #15803d;
    --success-soft: #dcfce7;
    --info: #1d4ed8;
    --info-soft: #dbeafe;
    --allergy: #c2410c;
    --allergy-soft: #ffedd5;
    --neutral-soft: #eef0f3;

    /* Ölçüler */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(20, 22, 28, 0.04), 0 1px 1px rgba(20, 22, 28, 0.03);
    --shadow-md: 0 4px 14px rgba(20, 22, 28, 0.07), 0 1px 3px rgba(20, 22, 28, 0.05);
    --shadow-lg: 0 20px 45px rgba(20, 22, 28, 0.16), 0 4px 12px rgba(20, 22, 28, 0.08);

    --sidebar-w: 264px;
    --topbar-h: 72px;
  }

  /* =====================================================================
     2) İKON SPRITE (saf SVG — JS gerektirmez)
     ===================================================================== */

  .icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
  .icon--sm { width: 16px; height: 16px; }
  .icon--lg { width: 26px; height: 26px; }

  /* =====================================================================
     3) GENEL DÜZEN (Layout)
     ===================================================================== */

  /* JS bu sınıfı ekleyip çıkararak ekranlar arasında geçiş yapacak. */
  .screen { min-height: 100vh; }
  .screen--hidden { display: none !important; }

  /* --------------------------- LOGIN EKRANI --------------------------- */
  #login-screen {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: 100vh;
    background: var(--surface);
  }

  .login-brand-panel {
    position: relative;
    background: radial-gradient(120% 140% at 15% 10%, #6b63f0 0%, #4f46e5 45%, #3730a3 100%);
    color: #fff;
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
  }
  .login-brand-panel::before {
    content: "";
    position: absolute;
    inset: -20% -10% auto auto;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
  }
  .login-brand-panel::after {
    content: "";
    position: absolute;
    left: -140px;
    bottom: -140px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
  }

  .brand-mark { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
  .brand-mark .paw-badge {
    width: 44px; height: 44px; border-radius: var(--radius-md);
    background: rgba(255,255,255,0.16);
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(6px);
    overflow: hidden;
  }
  .brand-mark .paw-badge .icon { width: 24px; height: 24px; stroke: #fff; }
  .paw-badge img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .brand-mark .brand-name { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
  .brand-mark .brand-name span { display: block; font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.72); letter-spacing: 0.02em; }

  .login-brand-copy { position: relative; z-index: 1; max-width: 420px; }
  .login-brand-copy h1 { font-size: 34px; font-weight: 800; line-height: 1.22; letter-spacing: -0.02em; margin-bottom: 16px; }
  .login-brand-copy p { font-size: 15px; color: rgba(255,255,255,0.78); line-height: 1.65; }

  .login-iletisim { margin-top: 22px; font-size: 14px; color: rgba(255,255,255,0.85); }
  .login-iletisim a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
  .login-destek { margin: 16px 0 0; font-size: 13px; color: var(--text-secondary); text-align: center; }
  .login-destek a { color: var(--accent); font-weight: 600; }
  .login-brand-stats { position: relative; z-index: 1; display: flex; gap: 32px; }
  .login-brand-stats div { display: flex; flex-direction: column; gap: 4px; }
  .login-brand-stats strong { font-size: 22px; font-weight: 800; }
  .login-brand-stats span { font-size: 12px; color: rgba(255,255,255,0.68); }

  .login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
  }
  .login-form-card { width: 100%; max-width: 380px; }
  .login-form-card .login-heading { margin-bottom: 32px; }
  .login-form-card .login-heading h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 6px; }
  .login-form-card .login-heading p { font-size: 13.5px; color: var(--text-secondary); }

  .form-field { margin-bottom: 18px; }
  .form-field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 7px;
    letter-spacing: 0.01em;
  }
  .input-wrap { position: relative; }
  .input-wrap .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-tertiary); }
  .input-wrap input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  }
  .input-wrap input:hover { border-color: var(--border-strong); }
  .input-wrap input:focus {
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: 0 0 0 4px var(--accent-soft);
  }

  .form-row-between { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
  .checkbox-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
  .checkbox-line input { width: 15px; height: 15px; accent-color: var(--accent); }
  .link-muted { font-size: 13px; color: var(--accent); font-weight: 600; }
  .link-muted:hover { color: var(--accent-hover); }

  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    font-size: 14px;
    font-weight: 600;
    transition: transform .06s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
    white-space: nowrap;
  }
  .btn:active { transform: translateY(1px); }
  .btn--primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(79,70,229,0.15), 0 8px 20px -8px rgba(79,70,229,0.55); }
  .btn--primary:hover { background: var(--accent-hover); }
  .btn--secondary { background: var(--surface); color: var(--text-primary); border-color: var(--border-strong); }
  .btn--secondary:hover { background: var(--surface-sunken); }
  .btn--ghost { background: transparent; color: var(--text-secondary); }
  .btn--ghost:hover { background: var(--surface-sunken); color: var(--text-primary); }
  .btn--danger { background: var(--danger); color: #fff; }
  .btn--danger:hover { background: #b91c1c; }
  .btn--block { width: 100%; }
  .btn--lg { padding: 15px 22px; font-size: 15px; border-radius: var(--radius-md); }
  .btn--sm { padding: 7px 12px; font-size: 12.5px; border-radius: 7px; }
  .btn--icon-only { padding: 9px; }

  .login-footnote { margin-top: 24px; text-align: center; font-size: 12.5px; color: var(--text-tertiary); }

  .login-legal-links {
    margin-top: 12px; display: flex; flex-wrap: wrap; justify-content: center;
    gap: 5px 12px;
  }
  .login-legal-links a { font-size: 11.5px; color: var(--text-tertiary); text-decoration: none; }
  .login-legal-links a:hover { color: var(--accent); text-decoration: underline; }
  .login-payment-band { display: block; margin: 16px auto 0; max-width: 220px; width: 100%; height: auto; opacity: 0.92; }

  /* --------------------------- UYGULAMA YÜKLEME BANNER'I --------------------------- */
  .install-banner {
    display: flex; align-items: center; gap: 12px;
    background: var(--accent-soft); border: 1px solid var(--accent-soft-strong);
    border-radius: 12px; padding: 12px 14px; margin-bottom: 24px;
  }
  .install-banner-icon {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent); color: #fff;
  }
  .install-banner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
  .install-banner-text strong { font-size: 13.5px; color: var(--text-primary); }
  .install-banner-text span { font-size: 12px; color: var(--text-secondary); }
  .install-banner-close {
    width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-tertiary); border: none; background: transparent;
  }
  .install-banner-close:hover { background: var(--surface-sunken); color: var(--text-primary); }

  /* --------------------------- LİSANS BİTİŞ TARİHİ BANNER'I --------------------------- */
  .lisans-banner {
    display: flex; align-items: center; gap: 12px;
    background: var(--accent-soft); border: 1px solid var(--accent-soft-strong);
    border-radius: 12px; padding: 12px 14px; margin-bottom: 24px;
  }
  .lisans-banner-icon {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent); color: #fff;
  }
  .lisans-banner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
  .lisans-banner-text strong { font-size: 13.5px; color: var(--text-primary); }
  .lisans-banner-text span { font-size: 12px; color: var(--text-secondary); }
  .lisans-banner.is-warning { background: var(--warning-soft); border-color: #fde6a8; }
  .lisans-banner.is-warning .lisans-banner-icon { background: var(--warning); }
  .lisans-banner.is-danger { background: var(--danger-soft); border-color: #f6c9c9; }
  .lisans-banner.is-danger .lisans-banner-icon { background: var(--danger); }

  /* --------------------------- YÜKLEME REHBERİ MODALI --------------------------- */
  .install-guide-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
  .install-guide-tab {
    flex: 1; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text-secondary); font-size: 13px; font-weight: 600;
    cursor: pointer;
  }
  .install-guide-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
  .install-guide-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
  .install-guide-steps li { display: flex; align-items: flex-start; gap: 12px; }
  .install-guide-step-icon {
    width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface-sunken); color: var(--accent);
  }
  .install-guide-steps li div { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
  .install-guide-steps li strong { font-size: 13.5px; color: var(--text-primary); }
  .install-guide-steps li span { font-size: 12.5px; color: var(--text-secondary); }
  #login-error {
    display: none; /* JS: hata varsa 'is-visible' ekler */
    align-items: center;
    gap: 8px;
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid #f6c9c9;
    padding: 11px 13px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 18px;
  }
  #login-error.is-visible { display: flex; }

  /* --------------------------- LOGIN: SADE CAM GÖRÜNÜMÜ --------------------------- */
  #login-screen .login-brand-panel {
    background:
      linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 52px 52px,
      linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 52px 52px,
      linear-gradient(160deg, #3b3fb8 0%, #2a2d86 55%, #1f2266 100%);
  }
  #login-screen .login-brand-stats div { padding: 14px 18px; border-radius: 14px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

  #login-screen .login-form-panel { position: relative; overflow: hidden; background: #f2f4f9; }
  #login-screen .login-form-panel::before, #login-screen .login-form-panel::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; }
  #login-screen .login-form-panel::before { width: 380px; height: 380px; right: -110px; top: -110px; background: rgba(79,70,229,.13); }
  #login-screen .login-form-panel::after { width: 340px; height: 340px; left: -90px; bottom: -110px; background: rgba(20,184,166,.12); }
  #login-screen .login-form-card {
    position: relative; z-index: 1; max-width: 410px; padding: 36px 32px 28px; border-radius: 20px;
    background: rgba(255,255,255,.74); border: 1px solid rgba(255,255,255,.95);
    box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 24px 48px -26px rgba(16,24,40,.28);
    backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
    animation: login-kart-giris .5s ease-out both;
  }
  @keyframes login-kart-giris { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  @media (prefers-reduced-motion: reduce) { #login-screen .login-form-card { animation: none; } }

  /* --------------------------- UYGULAMA KABUĞU --------------------------- */
  #app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    min-height: 100vh;
  }

  /* ------------------------------ SIDEBAR ------------------------------ */
  .sidebar {
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
  }
  .sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 8px 10px 22px; }
  .sidebar-brand .paw-badge {
    width: 34px; height: 34px; border-radius: 10px;
    background: var(--accent);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
  }
  .sidebar-brand .paw-badge .icon { width: 18px; height: 18px; stroke: #fff; }
  .sidebar-brand .brand-name { font-size: 14.5px; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
  .sidebar-brand .brand-name span { display: block; font-size: 10.5px; font-weight: 500; color: var(--sidebar-text); margin-top: 1px; }

  .sidebar-section-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5b5f6c;
    padding: 14px 12px 8px;
  }

  .nav-list { display: flex; flex-direction: column; gap: 2px; }
  .nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--sidebar-text);
    position: relative;
    transition: background .15s ease, color .15s ease;
  }
  .nav-link .icon { color: #7d818e; transition: color .15s ease; }
  .nav-link:hover { background: var(--sidebar-bg-elevated); color: #fff; }
  .nav-link:hover .icon { color: #fff; }
  .nav-link .nav-badge {
    margin-left: auto;
    font-size: 10.5px;
    font-weight: 700;
    background: rgba(255,255,255,0.09);
    color: #d7d9e2;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
  }
  /* JS: aktif sekmeye 'is-active' sınıfı eklenecek */
  .nav-link.is-active { background: var(--sidebar-bg-elevated); color: #fff; }
  .nav-link.is-active .icon { color: var(--text-on-accent); }
  .nav-link.is-active::before {
    content: "";
    position: absolute;
    left: -14px; top: 50%; transform: translateY(-50%);
    width: 3px; height: 20px;
    background: var(--accent);
    border-radius: 0 4px 4px 0;
  }

  .sidebar-spacer { flex: 1; }

  .sidebar-tenant-card {
    background: var(--sidebar-bg-elevated);
    border: 1px solid var(--sidebar-border);
    border-radius: var(--radius-md);
    padding: 13px;
    margin: 6px 2px 12px;
  }
  .sidebar-tenant-card .tenant-name { font-size: 12.5px; font-weight: 700; color: #fff; margin-bottom: 6px; }
  .plan-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 10.5px; font-weight: 700;
    color: #6ee7b7; background: rgba(110,231,183,0.12);
    padding: 3px 8px; border-radius: var(--radius-pill);
  }
  .plan-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: #34d399; }
  .plan-badge.is-warning { color: #fcd34d; background: rgba(252,211,77,0.14); }
  .plan-badge.is-warning .dot { background: #fbbf24; }
  .plan-badge.is-danger { color: #fca5a5; background: rgba(252,165,165,0.14); }
  .plan-badge.is-danger .dot { background: #f87171; }

  .sidebar-user {
    display: flex; align-items: center; gap: 10px;
    padding: 10px; border-radius: var(--radius-md);
    border: 1px solid var(--sidebar-border);
  }
  .avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, #818cf8, #4f46e5);
    color: #fff; font-size: 12.5px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .sidebar-user .user-meta { min-width: 0; }
  .sidebar-user .user-name { font-size: 12.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sidebar-user .user-role { font-size: 11px; color: var(--sidebar-text); }
  .sidebar-user .btn-logout {
    margin-left: auto; color: var(--sidebar-text);
    padding: 6px; border-radius: 7px;
  }
  .sidebar-user .btn-logout:hover { background: rgba(255,255,255,0.06); color: #fff; }

  /* ---------------------------- ANA İÇERİK ---------------------------- */
  .main {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .topbar {
    height: var(--topbar-h);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 32px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 20;
  }
  .topbar-title h1 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
  .topbar-title p { font-size: 12.5px; color: var(--text-tertiary); margin-top: 2px; }

  .topbar-right { display: flex; align-items: center; gap: 14px; }
  .topbar-search {
    display: flex; align-items: center; gap: 8px;
    background: var(--surface-sunken);
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    padding: 8px 14px;
    width: 240px;
    color: var(--text-tertiary);
    transition: border-color .15s ease, background .15s ease;
  }
  .topbar-search:focus-within { background: var(--surface); border-color: var(--border-strong); }
  .topbar-search input { border: none; background: transparent; outline: none; width: 100%; color: var(--text-primary); font-size: 13px; }
  .icon-btn {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    background: var(--surface);
    position: relative;
  }
  .icon-btn:hover { background: var(--surface-sunken); color: var(--text-primary); }
  .icon-btn.is-active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft-strong); }
  .icon-btn .dot-alert {
    position: absolute; top: 7px; right: 7px;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--danger); border: 1.5px solid var(--surface);
  }

  .content { padding: 28px 32px 60px; flex: 1; }

  /* JS bu sınıfı sekmeler arası geçişte kullanacak (tab-panel'lerden yalnızca
     'is-active' olan gösterilir). */
  .tab-panel { display: none; }
  .tab-panel.is-active { display: block; }

  .content-header {
    display: flex; align-items: flex-end; justify-content: space-between;
    margin-bottom: 22px; gap: 16px; flex-wrap: wrap;
  }
  .content-header h2 { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 4px; }
  .content-header p { font-size: 13px; color: var(--text-secondary); }

  /* =====================================================================
     4) DASHBOARD İSTATİSTİK KARTLARI
     ===================================================================== */
  .stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 30px;
  }
  .stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s ease, transform .2s ease;
    position: relative;
    overflow: hidden;
  }
  .stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
  .stat-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
  .stat-icon {
    width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
  }
  .stat-icon .icon { width: 21px; height: 21px; }
  .stat-icon--indigo { background: var(--accent-soft); color: var(--accent); }
  .stat-icon--info { background: var(--info-soft); color: var(--info); }
  .stat-icon--danger { background: var(--danger-soft); color: var(--danger); }
  .stat-icon--success { background: var(--success-soft); color: var(--success); }

  .stat-trend { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-pill); }
  .stat-trend--up { color: var(--success); background: var(--success-soft); }
  .stat-trend--alert { color: var(--danger); background: var(--danger-soft); }

  .stat-value { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; margin-bottom: 6px; }
  .stat-label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }

  .stat-card--urgent { border-color: #f6c9c9; background: linear-gradient(180deg, #fff 0%, #fff8f8 100%); }
  .stat-card--urgent .stat-value { color: var(--danger); }

  /* =====================================================================
     5) PANEL / KART (genel amaçlı içerik kutusu)
     ===================================================================== */
  .panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
  }
  .panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px; border-bottom: 1px solid var(--border);
    gap: 14px; flex-wrap: wrap;
  }
  .panel-header h3 { font-size: 15.5px; font-weight: 700; }
  .panel-header p { font-size: 12.5px; color: var(--text-tertiary); margin-top: 2px; }
  .panel-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .panel-body { padding: 22px; }
  .panel-body--flush { padding: 0; }

  /* Dekont Geçmişi: gün bazlı sayfalama — her "sayfa" bir takvim gününün
     işlemlerini gösterir, görüntü kirliliği olmasın diye tüm geçmiş tek
     seferde listelenmez. */
  .dekont-gun-baslik {
    padding: 12px 22px; border-bottom: 1px solid var(--border);
    font-size: 13px; font-weight: 700; color: var(--text-primary);
    background: var(--surface-sunken);
    display: flex; align-items: center; justify-content: space-between;
  }
  .dekont-gun-baslik .adet { font-weight: 500; color: var(--text-tertiary); }
  .dekont-sayfalama {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 16px 22px; border-top: 1px solid var(--border); flex-wrap: wrap;
  }
  .dekont-sayfalama button {
    min-width: 34px; height: 34px; padding: 0 8px;
    border: 1px solid var(--border-strong); border-radius: 8px;
    background: var(--surface); color: var(--text-secondary);
    font-size: 13px; font-weight: 600;
  }
  .dekont-sayfalama button:hover:not(:disabled) { background: var(--surface-sunken); color: var(--text-primary); }
  .dekont-sayfalama button.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
  .dekont-sayfalama button:disabled { opacity: 0.4; cursor: not-allowed; }
  .dekont-sayfalama .ellipsis { color: var(--text-tertiary); padding: 0 2px; }

  /* Filtre çubuğu */
  .filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .select-field, .text-field {
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 13px;
    color: var(--text-secondary);
    outline: none;
  }
  .select-field:focus, .text-field:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); color: var(--text-primary); }
  .search-field { display: flex; align-items: center; gap: 8px; background: var(--surface-sunken); border-radius: var(--radius-sm); padding: 9px 12px; min-width: 200px; }
  .search-field .icon { color: var(--text-tertiary); }
  .search-field input { background: transparent; border: none; outline: none; width: 100%; font-size: 13px; }

  .toggle-chip {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12.5px; font-weight: 600; color: var(--text-secondary);
    background: var(--surface-sunken); border: 1px solid var(--border);
    padding: 8px 12px; border-radius: var(--radius-pill);
  }
  .toggle-chip input { accent-color: var(--accent); width: 14px; height: 14px; }

  /* =====================================================================
     6) TABLO
     ===================================================================== */
  .data-table thead th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    padding: 13px 22px;
    background: var(--surface-alt);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
  }
  .data-table tbody td {
    padding: 15px 22px;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
    vertical-align: middle;
  }
  .data-table tbody tr:last-child td { border-bottom: none; }
  .data-table tbody tr { transition: background .12s ease; }
  .data-table tbody tr:hover { background: var(--surface-alt); }
  .data-table tbody tr.is-muted { opacity: 0.62; }

  .cell-guest { display: flex; align-items: center; gap: 12px; }
  .guest-avatar {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--accent-soft); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; flex-shrink: 0;
  }
  .cell-guest .guest-name { font-weight: 600; color: var(--text-primary); }
  .cell-guest .guest-breed { font-size: 12px; color: var(--text-tertiary); margin-top: 1px; }
  .cell-tags { display: flex; flex-wrap: wrap; gap: 6px; max-width: 260px; }
  .cell-dates { display: flex; flex-direction: column; gap: 2px; }
  .cell-dates .date-main { font-weight: 600; }
  .cell-dates .date-sub { font-size: 11.5px; color: var(--text-tertiary); }
  .cell-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }

  /* Eylem menüsü (dropdown) — satır başına çok sayıda buton yerine tek bir
     "⋮" tetikleyici + üzerine tıklanınca açılan temiz bir liste.
     NOT: Bu menü artık satırın İÇİNDE değil — tek bir PAYLAŞILAN eleman
     olarak body'nin sonunda yaşıyor (bkz. #shared-actions-menu, app.js
     openSharedActionsMenu). Satırlar `.panel` (overflow:hidden) içinde
     olduğu için, menü satır içinde absolute konumlansaydı panel az sayıda
     satır içerdiğinde (kısa panel) menü panelin altına taşıp KIRPILIYORDU.
     position:fixed + body'ye eklenmiş tek eleman bu sorunu ortadan kaldırır
     ve gerekirse (alt tarafta yer yoksa) yukarı doğru da açılabilir. */
  .actions-menu-toggle {
    width: 32px; height: 32px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .actions-menu-toggle .icon { width: 16px; height: 16px; }
  .actions-menu-list {
    display: none;
    position: fixed; top: 0; left: 0; z-index: 1000;
    min-width: 190px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 10px);
    box-shadow: var(--shadow-lg);
    padding: 6px;
  }
  .actions-menu-list.is-open { display: block; }
  .actions-menu-list button {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    width: 100%; text-align: left; background: none; border: none;
    padding: 8px 10px; border-radius: 7px;
    font-size: 13px; font-weight: 500; color: var(--text-primary);
  }
  .actions-menu-list button:hover { background: var(--surface-sunken); }
  .actions-menu-list button.is-danger { color: var(--danger); }
  .actions-menu-list button.is-danger:hover { background: var(--danger-soft); }

  /* Misafir Detayı modalındaki Finansal Özet kartı: günlük ücret, toplam
     tutar, ödenen kapora ve kalan (ödenmesi gereken) tutarı tek bakışta
     gösterir — bkz. server.js finansalOzetHesapla / finans_ozeti alanı. */
  .finans-ozeti-card {
    margin-top: 4px;
    padding: 14px 16px;
    background: var(--surface-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 10px);
  }
  .finans-ozeti-title {
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--text-secondary); margin-bottom: 10px;
  }
  .finans-ozeti-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px;
  }
  .finans-ozeti-item { display: flex; flex-direction: column; gap: 2px; }
  .finans-ozeti-label { font-size: 12px; color: var(--text-secondary); }
  .finans-ozeti-value { font-size: 15px; font-weight: 700; color: var(--text-primary); }
  .finans-ozeti-item--highlight { grid-column: 1 / -1; padding-top: 10px; border-top: 1px dashed var(--border); }
  .finans-ozeti-item--highlight .finans-ozeti-value { font-size: 18px; color: var(--danger); }
  .finans-ozeti-item--highlight.is-paid .finans-ozeti-value { color: var(--success); }
  /* Ek Hizmetler / Genel Toplam / İade satırları — tam genişlikte ama
     Kalan Tutar kadar "vurgulu" (büyük/renkli) değil, sadece ayırıcı
     çizgiyle bölümlenmiş normal bir satır. */
  .finans-ozeti-item--full { grid-column: 1 / -1; padding-top: 8px; border-top: 1px dashed var(--border); }
  .finans-ozeti-item--full .finans-ozeti-value { color: var(--warning); }
  .finans-ozeti-item.is-refund .finans-ozeti-value { color: var(--info); }
  .finans-ozeti-alt-liste {
    list-style: none; margin: 6px 0 0; padding: 0;
    display: flex; flex-direction: column; gap: 3px;
  }
  .finans-ozeti-alt-liste li {
    display: flex; justify-content: space-between; gap: 10px;
    font-size: 12px; color: var(--text-secondary);
  }
  .finans-ozeti-alt-liste li span:last-child { font-weight: 600; color: var(--text-primary); white-space: nowrap; }
  @media (max-width: 640px) {
    .finans-ozeti-grid { grid-template-columns: 1fr; }
  }
  .actions-menu-list button:disabled { color: var(--text-tertiary); cursor: not-allowed; }
  .actions-menu-list button:disabled:hover { background: none; }

  /* Not sayısı rozeti — okunmamış not varsa sarı, tüm notlar görülmüşse yeşil */
  .note-count-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: var(--radius-pill); font-size: 10.5px; font-weight: 700;
  }
  .note-count-badge--unread { background: var(--warning-soft); color: var(--warning); }
  .note-count-badge--read { background: var(--success-soft); color: var(--success); }

  /* =====================================================================
     7) HAP ETİKETLER (BADGES) — Görsel uyarı sistemi
     ===================================================================== */
  .badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    line-height: 1.4;
    white-space: nowrap;
    border: 1px solid transparent;
  }
  .badge .icon { width: 12px; height: 12px; }
  .badge-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

  /* Durum rozetleri (aktif / arşiv) */
  .badge-status--active { background: var(--success-soft); color: var(--success); }
  .badge-status--active .badge-dot { background: var(--success); }
  .badge-status--archived { background: var(--neutral-soft); color: var(--text-secondary); }
  .badge-status--archived .badge-dot { background: var(--text-tertiary); }
  .badge-status--danger-soft { background: var(--danger-soft); color: var(--danger); }
  .badge-status--danger-soft .badge-dot { background: var(--danger); }

  /* İstenen özel etiketler */
  .badge-agressive { background: var(--danger-soft); color: var(--danger); border-color: #f6c9c9; }
  .badge-allergy { background: var(--allergy-soft); color: var(--allergy); border-color: #fbd7ae; }

  .badge-vaccine-alert { background: var(--warning-soft); color: var(--warning); border-color: #fde6a8; }
  .badge-vaccine-alert--danger { background: var(--danger-soft); color: var(--danger); border-color: #f6c9c9; }
  /* "parlayan" (glow) efekti — saf CSS animasyon, JS gerektirmez */
  .badge-vaccine-alert.is-glowing { animation: badge-glow 1.8s ease-in-out infinite; }
  .badge-vaccine-alert--danger.is-glowing { animation: badge-glow-danger 1.8s ease-in-out infinite; }
  @keyframes badge-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(180, 83, 9, 0.0); }
    50% { box-shadow: 0 0 0 4px rgba(180, 83, 9, 0.14); }
  }
  @keyframes badge-glow-danger {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.0); }
    50% { box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.16); }
  }

  /* Eğitim ilerleme pilleri */
  .badge-progress--success { background: var(--success-soft); color: var(--success); }
  .badge-progress--info { background: var(--info-soft); color: var(--info); }
  .badge-progress--warning { background: var(--warning-soft); color: var(--warning); }

  /* Dekont / finans işlem tipi rozetleri */
  .badge-tx--in { background: var(--success-soft); color: var(--success); }
  .badge-tx--debt { background: var(--danger-soft); color: var(--danger); }
  .badge-tx--discount { background: var(--info-soft); color: var(--info); }

  /* =====================================================================
     8) EĞİTİM & GÜNLÜK BAKIM SEKME DÜZENİ
     ===================================================================== */
  .care-layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }

  .guest-picker-list { display: flex; flex-direction: column; }
  .guest-picker-item {
    display: flex; align-items: center; gap: 11px;
    padding: 13px 16px; border-bottom: 1px solid var(--border);
    transition: background .12s ease;
  }
  .guest-picker-item:last-child { border-bottom: none; }
  .guest-picker-item:hover { background: var(--surface-alt); }
  .guest-picker-item.is-selected { background: var(--accent-soft); }
  .guest-picker-item.is-selected .guest-name { color: var(--accent); }
  .guest-picker-item .guest-name { font-weight: 600; font-size: 13px; }
  .guest-picker-item .guest-breed { font-size: 11.5px; color: var(--text-tertiary); }

  .timeline { display: flex; flex-direction: column; gap: 0; }
  .timeline-item { display: flex; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
  .timeline-item:last-child { border-bottom: none; }
  .timeline-marker { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; padding-top: 3px; }
  .timeline-marker .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
  .timeline-marker .line { flex: 1; width: 1.5px; background: var(--border); margin-top: 6px; }
  .timeline-content { flex: 1; min-width: 0; }
  .timeline-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
  .timeline-category { font-size: 12.5px; font-weight: 700; color: var(--text-primary); }
  .timeline-meta { font-size: 11.5px; color: var(--text-tertiary); margin-left: auto; }
  .timeline-text { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; }
  .timeline-author { font-size: 11.5px; color: var(--text-tertiary); margin-top: 8px; display: flex; align-items: center; gap: 6px; }

  /* Gelişmiş Özet: karşılama + Bugün Yapılacaklar */
  .bugun-panel { margin-bottom: 24px; }
  .bugun-satir { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 20px; border-top: 1px solid var(--border); }
  .bugun-satir:first-child { border-top: 0; }
  .bugun-satir-sol { display: flex; align-items: center; gap: 12px; min-width: 0; }
  .bugun-etiket { flex-shrink: 0; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; min-width: 52px; text-align: center; }
  .bugun-etiket--cikis { background: #e0e7ff; color: #3730a3; }
  .bugun-etiket--asi { background: #fee2e2; color: #b91c1c; }
  .bugun-etiket--not { background: #fef3c7; color: #92400e; }
  .bugun-metin { font-size: 13.5px; color: var(--text-secondary); min-width: 0; }
  .bugun-metin strong { color: var(--text-primary); font-weight: 800; }
  .bugun-metin .bugun-gecikti { color: var(--danger); font-weight: 700; }
  .bugun-not-ozet { display: block; font-size: 12.5px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 460px; }
  .bugun-aksiyon { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
  .bugun-daha { padding: 12px 20px; border-top: 1px solid var(--border); font-size: 12.5px; }
  @media (max-width: 760px) {
    .bugun-satir { flex-direction: column; align-items: flex-start; }
    .bugun-aksiyon { width: 100%; justify-content: flex-start; }
    .bugun-not-ozet { white-space: normal; max-width: none; }
  }

  /* Duyurular */
  .duyuru-kart { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 20px; margin-bottom: 12px; }
  .duyuru-kart--yeni { border-left: 4px solid var(--accent); }
  .duyuru-kart-ust { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
  .duyuru-kart-baslik { font-size: 15px; font-weight: 800; color: var(--text-primary); margin: 0; }
  .duyuru-kart-tarih { font-size: 11.5px; color: var(--text-tertiary); margin-left: auto; }
  .duyuru-kart-metin { font-size: 14px; line-height: 1.65; color: var(--text-secondary); white-space: pre-wrap; margin: 0; }
  .duyuru-kart-alt { display: flex; justify-content: flex-end; margin-top: 14px; }
  .duyuru-goruldu-metin { font-size: 12px; font-weight: 700; color: #166534; }
  .duyuru-yeni-rozet { font-size: 10.5px; font-weight: 800; background: var(--accent-soft); color: var(--accent); padding: 2px 8px; border-radius: 999px; }
  .duyuru-modal-oge + .duyuru-modal-oge { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }

  /* Online rezervasyon (ücretli modül; kapalıyken menüde hiç görünmez) */
  .nav-link[data-tab="rezervasyon"] { display: none; }
  body.rez-izinli .nav-link[data-tab="rezervasyon"] { display: flex; }
  .rez-ozet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
  @media (max-width: 520px) { .rez-ozet-kart { padding: 10px 10px; } .rez-ozet-kart .sayi { font-size: 21px; } .rez-ozet-kart .etiket { font-size: 11px; } }
  .rez-ozet-kart { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; cursor: pointer; text-align: left; font: inherit; transition: border-color .15s, box-shadow .15s; }
  .rez-ozet-kart:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(15,23,42,.06); }
  .rez-ozet-kart .sayi { display: block; font-size: 24px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
  .rez-ozet-kart .etiket { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-top: 3px; }
  .rez-ozet-kart.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .rez-ozet-kart.vurgu .sayi { color: #b45309; }
  .rez-ozet-kart.yesil .sayi { color: #15803d; }
  .rez-arama { position: relative; margin-bottom: 12px; }
  .rez-arama svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-tertiary); pointer-events: none; }
  .rez-arama input { width: 100%; padding: 12px 40px 12px 42px; border: 1.5px solid var(--border); border-radius: 12px; font: inherit; font-size: 14px; background: var(--surface); }
  .rez-arama input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .rez-arama .temizle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; font-size: 20px; line-height: 1; color: var(--text-tertiary); cursor: pointer; padding: 4px 8px; display: none; }
  .rez-arama-ipucu { font-size: 12px; color: var(--text-tertiary); margin: -6px 0 12px 2px; }
  .rez-chip .say { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: rgba(100,116,139,.15); font-size: 11px; line-height: 18px; text-align: center; }
  .rez-chip.is-active .say { background: var(--accent); color: #fff; }
  .rez-kart--onaylandi { border-left: 4px solid #16a34a; }
  .rez-kart--giris_yapti { border-left: 4px solid #64748b; }
  .rez-kart--reddedildi, .rez-kart--iptal { border-left: 4px solid #dc2626; opacity: .85; }
  .rez-bugun { background: #dcfce7; color: #166534; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; }
  .rez-filtre { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
  .rez-chip { border: 1.5px solid var(--border); background: var(--surface); color: var(--text-secondary); font-weight: 700; font-size: 12.5px; padding: 6px 14px; border-radius: 999px; cursor: pointer; }
  .rez-chip.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
  #rez-view-ayarlar .text-field, #rez-view-ayarlar textarea { width: 100%; }
  .rez-durum-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: 12px; margin-bottom: 14px; background: var(--surface); }
  .rez-durum-bar.is-acik { border-color: #86efac; background: #f0fdf4; }
  .rez-durum-bar.is-kapali { border-color: #fecaca; background: #fef2f2; }
  .rez-durum-metin strong { display: block; font-size: 14px; }
  .rez-durum-metin span { font-size: 12.5px; color: var(--text-secondary); }
  .rez-switch { position: relative; width: 52px; height: 30px; border-radius: 999px; border: 0; background: #cbd5e1; cursor: pointer; flex-shrink: 0; transition: background .15s; }
  .rez-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
  .rez-switch.is-acik { background: #16a34a; }
  .rez-switch.is-acik::after { transform: translateX(22px); }
  .rez-switch[disabled] { opacity: .6; cursor: wait; }
  .rez-aktif-satir { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 12px; margin-bottom: 16px; cursor: pointer; font-size: 13.5px; }
  .rez-aktif-satir input { accent-color: var(--accent); width: 18px; height: 18px; }
  .rez-adres-satir { display: flex; align-items: stretch; }
  .rez-adres-onek { display: flex; align-items: center; padding: 0 12px; background: var(--surface-alt); border: 1.5px solid var(--border); border-right: 0; border-radius: 10px 0 0 10px; color: var(--text-tertiary); font-size: 13px; white-space: nowrap; }
  .rez-adres-satir .text-field { border-radius: 0 10px 10px 0; }
  .rez-link-kutu { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 18px; }
  .rez-link-ust { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
  .rez-link-ust .text-field { flex: 1; min-width: 200px; }
  .rez-qr-alan { display: flex; gap: 16px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
  .rez-qr { width: 120px; height: 120px; background: #fff; padding: 8px; border-radius: 10px; border: 1px solid var(--border); flex-shrink: 0; }
  .rez-qr svg { width: 100%; height: 100%; display: block; }
  .rez-hizmet-listesi { display: flex; flex-wrap: wrap; gap: 8px; }
  .rez-hizmet-oge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 600; }
  .rez-hizmet-oge input { accent-color: var(--accent); }
  .rez-fiyat-bolum { border: 1.5px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 16px; }
  .rez-fiyat-bolum h4 { margin: 0 0 4px; font-size: 14px; }
  .rez-secenek-satir { display: grid; grid-template-columns: 1.4fr 1.6fr 0.8fr 0.8fr auto; gap: 8px; align-items: end; padding: 10px 0; border-top: 1px dashed var(--border); }
  .rez-secenek-satir:first-of-type { border-top: 0; }
  .rez-secenek-satir label { display: block; font-size: 11px; font-weight: 700; color: var(--text-muted, #64748b); margin-bottom: 3px; }
  .rez-paket-satir { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
  .rez-paket-satir span { flex: 1; font-size: 13px; font-weight: 600; }
  .rez-paket-satir input { max-width: 140px; }
  @media (max-width: 720px) { .rez-secenek-satir { grid-template-columns: 1fr 1fr; } .rez-secenek-satir .rez-sec-ad, .rez-secenek-satir .rez-sec-acik { grid-column: 1 / -1; } }
  .rez-detay-satir { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
  .rez-detay-satir span { color: var(--text-tertiary); flex-shrink: 0; }
  .rez-detay-satir strong { text-align: right; word-break: break-word; }
  .not-durum--gri { background: #f1f5f9; color: #475569; }
  .bugun-etiket--rez { background: #dcfce7; color: #166534; }

  /* Bakım notları: Bekleyen Notlar / Köpek Notları görünümleri */
  .care-tabs { display: flex; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
  .care-tab { background: none; border: 0; padding: 10px 16px; font-size: 13.5px; font-weight: 700; color: var(--text-tertiary); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 8px; }
  .care-tab:hover { color: var(--text-primary); }
  .care-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
  .care-tab-sayi { background: #fef3c7; color: #92400e; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 999px; }
  .nav-link .nav-badge--uyari { background: #f59e0b; color: #fff; }

  .not-kart { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px 18px; margin-bottom: 12px; }
  .not-kart--yeni { border-left: 4px solid #f59e0b; }
  .not-kart-ust { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
  .not-kart-kopek { font-weight: 800; font-size: 14.5px; color: var(--text-primary); background: none; border: 0; padding: 0; cursor: pointer; }
  .not-kart-kopek:hover { color: var(--accent); text-decoration: underline; }
  .not-kart-irk { font-size: 12px; color: var(--text-tertiary); }
  .not-durum { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
  .not-durum--yeni { background: #fef3c7; color: #92400e; }
  .not-durum--okundu { background: #e0f2fe; color: #075985; }
  .not-durum--tamam { background: #dcfce7; color: #166534; }
  .not-kart-metin { font-size: 14px; line-height: 1.6; color: var(--text-primary); white-space: pre-wrap; margin: 6px 0 10px; }
  .not-kart-alt { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
  .not-kart-meta { font-size: 11.5px; color: var(--text-tertiary); }
  .not-kart-aksiyon { display: flex; gap: 8px; flex-wrap: wrap; }
  .guest-bekleyen-sayi { margin-left: auto; font-size: 11px; font-weight: 800; background: #fef3c7; color: #92400e; padding: 1px 8px; border-radius: 999px; }
  .timeline-islem { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
  @media (max-width: 760px) { .not-kart-aksiyon { width: 100%; } .not-kart-aksiyon .btn { flex: 1; } }

  .note-composer { border-top: 1px solid var(--border); padding: 18px 22px; background: var(--surface-alt); }
  .note-composer-row { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
  .pill-radio {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 13px; border-radius: var(--radius-pill);
    border: 1.5px solid var(--border); font-size: 12.5px; font-weight: 600; color: var(--text-secondary);
    background: var(--surface);
  }
  .pill-radio input { accent-color: var(--accent); width: 13px; height: 13px; }
  .note-composer textarea {
    width: 100%; min-height: 78px; resize: vertical;
    padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); outline: none; margin-bottom: 12px;
  }
  .note-composer textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
  .note-composer-footer { display: flex; justify-content: flex-end; }

  /* =====================================================================
     9) FİNANS ÖZET MİNİ KARTLARI
     ===================================================================== */
  .finance-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
  .finance-mini-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 16px 18px;
  }
  .finance-mini-card .label { font-size: 12px; color: var(--text-tertiary); font-weight: 600; margin-bottom: 8px; }
  .finance-mini-card .value { font-size: 21px; font-weight: 800; letter-spacing: -0.01em; }
  .finance-mini-card .value--danger { color: var(--danger); }
  .finance-mini-card .value--success { color: var(--success); }

  /* --------------------------- HİZMET TÜRÜNE GÖRE SATIŞLAR (BAR GRAFİK) --------------------------- */
  .hizmet-ozet-list { display: flex; flex-direction: column; gap: 16px; }
  .hizmet-ozet-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
  .hizmet-ozet-label { font-size: 13.5px; font-weight: 700; color: var(--text-primary); }
  .hizmet-ozet-count { font-size: 12px; color: var(--text-tertiary); margin-left: 6px; font-weight: 500; }
  .hizmet-ozet-amount { font-size: 14px; font-weight: 800; color: var(--text-primary); white-space: nowrap; }
  .hizmet-ozet-bar-track { background: var(--surface-sunken); border-radius: 100px; height: 10px; overflow: hidden; }
  .hizmet-ozet-bar-fill { height: 100%; border-radius: 100px; background: var(--accent); transition: width 0.4s ease; }
  .hizmet-ozet-pct { font-size: 11px; color: var(--text-tertiary); margin-top: 4px; }

  /* --------------------------- MÜŞTERİ TABLOSU --------------------------- */
  .musteri-dog-chip { background: var(--surface-sunken); border-radius: 100px; padding: 4px 10px; font-size: 11.5px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
  .musteri-phone-link { color: var(--text-secondary); text-decoration: none; }
  .musteri-phone-link:hover { color: var(--accent); text-decoration: underline; }

  /* --------------------------- MÜŞTERİ DETAYI MODALI --------------------------- */
  .musteri-detay-kayit-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .musteri-detay-kayit-row:last-child { border-bottom: none; }
  .musteri-detay-kayit-info { display: flex; flex-direction: column; gap: 2px; }
  .musteri-detay-kayit-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
  .musteri-detay-kayit-meta { font-size: 11.5px; color: var(--text-tertiary); }

  /* Müşteriler: gelmeyenleri süzme / sıralama çubuğu */
  .musteri-filtre-select { width: auto; min-width: 190px; flex: 0 0 auto; }
  .musteri-sayac { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--text-tertiary); white-space: nowrap; }
  .musteri-gun { font-size: 12px; color: var(--text-tertiary); }
  .musteri-aktif-rozet { font-size: 12.5px; font-weight: 700; color: var(--success); }
  @media (max-width: 760px) { .musteri-filtre-select { width: 100%; } .musteri-sayac { margin-left: 0; } }

  /* Kayıt sonrası "hoş geldiniz" penceresi */
  .hosgeldin-onizleme-etiket { font-size: 12px; font-weight: 700; color: var(--text-tertiary); margin-bottom: 8px; }
  .hosgeldin-onizleme { white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; color: var(--text-primary); background: #effaf3; border: 1px solid #bbe5c9; border-radius: 12px; padding: 14px 16px; }
  .btn-wa-buyuk { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px; background: #16a34a; color: #fff; font-size: 13.5px; font-weight: 700; text-decoration: none; }
  .btn-wa-buyuk:hover { background: #15803d; }
  .btn-wa-buyuk svg { width: 18px; height: 18px; }

  /* WhatsApp'ta mesaj aç butonu (Müşteriler tablosu) */
  .musteri-phone-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 3px 0; }
  .musteri-phone-row + .musteri-phone-row { margin-top: 10px; }
  .wa-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px 5px 10px; border-radius: 999px; border: 1px solid #bbe5c9; background: #effaf3; color: #15803d; font-size: 12px; font-weight: 700; text-decoration: none; line-height: 1.4; white-space: nowrap; }
  .wa-btn:hover { background: #dcf5e6; border-color: #86d3a3; }
  .wa-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
  /* Telefonda parmakla rahat basılsın (≈40px yükseklik) ve numaradan belirgin ayrılsın. */
  @media (max-width: 760px) {
    .musteri-phone-row { gap: 14px; }
    .musteri-phone-row + .musteri-phone-row { margin-top: 14px; }
    .wa-btn { padding: 9px 16px 9px 13px; font-size: 13.5px; }
    .wa-btn svg { width: 17px; height: 17px; }
  }

  /* --------------------------- ODALAR --------------------------- */
  .oda-ozet { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
  .oda-layout { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
  .oda-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
  /* Kartlar sade/nötr: doluluk renkle değil metin + ince bir çubukla gösterilir.
     Renk (kırmızı/sarı) yalnızca "çıkış var / çıkışı yaklaşıyor" uyarıları içindir. */
  .oda-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; }
  .oda-doluluk { height: 4px; border-radius: 999px; background: var(--border); overflow: hidden; margin: -4px 0 10px; }
  .oda-doluluk > span { display: block; height: 100%; background: var(--text-tertiary); border-radius: 999px; }
  /* Çıkış uyarıları: kart bütünüyle renklenir, kırmızı sarıdan önce gelir (JS sıralar). */
  .oda-card--cikis-kirmizi { border-color: #fca5a5; border-left: 4px solid var(--danger); background: #fef2f2; box-shadow: 0 0 0 1px #fecaca; }
  .oda-card--cikis-sari { border-color: #fcd34d; border-left: 4px solid #f59e0b; background: #fffbeb; }
  .oda-uyari { font-size: 11.5px; line-height: 1.4; padding: 6px 9px; border-radius: 8px; margin-bottom: 8px; }
  .oda-uyari--kirmizi { background: #fee2e2; color: #b91c1c; }
  .oda-uyari--sari { background: #fef3c7; color: #92400e; }
  .oda-uyari strong { font-weight: 800; letter-spacing: 0.02em; }
  .oda-misafir-meta.is-soon { color: #b45309; font-weight: 700; }
  .oda-uyari-serit { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 16px; }
  .oda-uyari-chip { font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; }
  .oda-uyari-chip--kirmizi { background: #fee2e2; color: #b91c1c; }
  .oda-uyari-chip--sari { background: #fef3c7; color: #92400e; }
  .oda-card--servis-disi { opacity: 0.6; background: var(--bg, #f8fafc); }
  .oda-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
  .oda-card-ad { font-size: 14.5px; font-weight: 800; color: var(--text-primary); }
  .oda-card-durum { font-size: 11px; font-weight: 700; color: var(--text-tertiary); margin-bottom: 10px; }
  .oda-misafir { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px dashed var(--border); }
  .oda-misafir-isim { font-size: 12.5px; font-weight: 700; color: var(--text-primary); }
  .oda-misafir-meta { font-size: 11px; color: var(--text-tertiary); }
  .oda-misafir-meta.is-late { color: var(--danger); font-weight: 700; }
  .oda-bos-yer { font-size: 11.5px; color: var(--text-tertiary); padding: 8px 0; border-top: 1px dashed var(--border); font-style: italic; }
  .oda-mini-btn { background: none; border: 0; padding: 2px 6px; font-size: 11.5px; font-weight: 700; color: var(--accent); cursor: pointer; border-radius: 6px; }
  .oda-mini-btn:hover { background: var(--accent-soft); }
  .oda-mini-btn--danger { color: var(--danger); }
  .oda-mini-btn--danger:hover { background: var(--danger-soft); }
  @media (max-width: 980px) { .oda-ozet { grid-template-columns: 1fr 1fr; } .oda-layout { grid-template-columns: 1fr; } }

  /* Oda sistemi kapalıyken sekme ve yeni-kayıt oda alanı hiç görünmez
     (mevcut firmalar için arayüz birebir eskisi gibi kalır). */
  .nav-link[data-tab="odalar"], #guest-form-oda-row { display: none; }
  body.oda-sistemi-acik .nav-link[data-tab="odalar"] { display: flex; }
  body.oda-sistemi-acik #guest-form-oda-row { display: grid; }

  /* --------------------------- LİSANS KİLİDİ (süresi dolan firma) ---------------------------
     Sunucu zaten veriyi kilitler; bu kurallar yalnızca arayüzü sadeleştirir:
     menüde yalnızca Abonelik ve Destek kalır. */
  body.lisans-kilitli .nav-link:not([data-tab="abonelik"]):not([data-tab="destek"]) { display: none !important; }
  body.lisans-kilitli .topbar-search, body.lisans-kilitli #btn-bildirim-toggle, body.lisans-kilitli .sidebar-oda-toggle { display: none !important; }
  #abonelik-kilit-uyari { display: none; margin-bottom: 18px; }
  body.lisans-kilitli #abonelik-kilit-uyari { display: flex; }
  .lisans-kilit-ekrani { position: fixed; inset: 0; z-index: 400; background: var(--bg, #f8fafc); display: none; align-items: center; justify-content: center; padding: 24px; }
  .lisans-kilit-kart { max-width: 460px; width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg, 16px); padding: 32px 28px; text-align: center; box-shadow: 0 10px 40px rgba(15,23,42,0.08); }
  .lisans-kilit-ikon { width: 56px; height: 56px; border-radius: 50%; background: var(--danger-soft); color: var(--danger); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
  .lisans-kilit-ikon .icon { width: 26px; height: 26px; }
  .lisans-kilit-kart h2 { font-size: 20px; margin: 0 0 8px; color: var(--text-primary); }
  .lisans-kilit-kart p { font-size: 14px; color: var(--text-secondary); line-height: 1.55; margin: 0 0 22px; }
  .lisans-kilit-kart .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

  /* Menü altındaki aç/kapa anahtarı */
  .sidebar-oda-toggle { margin: 0 2px 10px; }
  .oda-switch {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 9px 12px; border-radius: var(--radius-md); cursor: pointer;
    border: 1px solid var(--sidebar-border); color: var(--sidebar-text);
    font-size: 12.5px; font-weight: 600; user-select: none;
  }
  .oda-switch:hover { background: rgba(255,255,255,0.05); color: #fff; }
  .oda-switch-text { display: inline-flex; align-items: center; gap: 8px; }
  .oda-switch input { position: absolute; opacity: 0; pointer-events: none; }
  .oda-switch-track { width: 34px; height: 19px; border-radius: 999px; background: rgba(255,255,255,0.18); position: relative; flex-shrink: 0; transition: background .15s; }
  .oda-switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: transform .15s; }
  .oda-switch input:checked + .oda-switch-track { background: #34d399; }
  .oda-switch input:checked + .oda-switch-track::after { transform: translateX(15px); }
  .oda-switch input:focus-visible + .oda-switch-track { outline: 2px solid #a5b4fc; outline-offset: 2px; }
  @media (max-width: 980px) { .sidebar-oda-toggle { margin: 0; flex-shrink: 0; } .oda-switch { padding: 7px 10px; font-size: 11px; white-space: nowrap; } }

  /* Sürükle & bırak */
  .oda-misafir[draggable="true"] { cursor: grab; }
  .oda-misafir.is-dragging { opacity: 0.35; }
  .oda-grip { width: 8px; height: 15px; margin: 2px 8px 0 0; flex-shrink: 0; opacity: 0.55;
    background-image: radial-gradient(circle, #94a3b8 1.2px, transparent 1.5px); background-size: 4px 5px; }
  .oda-misafir > div:first-child { display: flex; align-items: flex-start; min-width: 0; }
  .oda-dropzone { transition: background .12s, box-shadow .12s; }
  .oda-dropzone.is-drop-ok { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent) inset; }
  .oda-dropzone.is-drop-no { box-shadow: 0 0 0 2px var(--danger) inset; cursor: not-allowed; }
  .oda-ipucu { font-size: 12px; color: var(--text-tertiary); margin: -6px 0 14px; }

  /* --------------------------- MÜŞTERİ OTOMATİK DOLDURMA (ARAMA) --------------------------- */
  .musteri-autocomplete-wrap { position: relative; }
  .musteri-autocomplete-list {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20;
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(20,22,28,0.12); max-height: 220px; overflow-y: auto; display: none;
  }
  .musteri-autocomplete-list.is-open { display: block; }
  .musteri-autocomplete-item { padding: 9px 14px; cursor: pointer; border-bottom: 1px solid var(--border); }
  .musteri-autocomplete-item:last-child { border-bottom: none; }
  .musteri-autocomplete-item:hover { background: var(--surface-sunken); }
  .musteri-autocomplete-item .ac-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
  .musteri-autocomplete-item .ac-meta { font-size: 11.5px; color: var(--text-tertiary); margin-top: 1px; }

  /* =====================================================================
     10) BOŞ DURUM (Empty state) — ileride veri yoksa JS ile gösterilecek
     ===================================================================== */
  .empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 56px 20px; color: var(--text-tertiary); }
  .empty-state .icon { width: 40px; height: 40px; margin-bottom: 14px; color: var(--text-tertiary); }
  .empty-state h4 { font-size: 14.5px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
  .empty-state p { font-size: 12.5px; max-width: 320px; }

  /* =====================================================================
     11) MODAL — Erken Çıkış Onayı
     ===================================================================== */
  .modal-overlay {
    display: none; /* JS 'is-open' ekleyince görünür olacak */
    position: fixed; inset: 0; z-index: 100;
    background: rgba(15, 16, 22, 0.5);
    backdrop-filter: blur(3px);
    align-items: center; justify-content: center;
    padding: 20px;
  }
  .modal-overlay.is-open { display: flex; }

  .modal-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    animation: modal-pop .18s ease;
  }
  @keyframes modal-pop {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }

  .modal-header { padding: 22px 24px 0; display: flex; align-items: flex-start; gap: 14px; }
  .modal-icon-flag {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    background: var(--warning-soft); color: var(--warning);
    display: flex; align-items: center; justify-content: center;
  }
  .modal-header h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 4px; }
  .modal-header p { font-size: 13px; color: var(--text-secondary); line-height: 1.55; }
  .modal-close {
    margin-left: auto; width: 30px; height: 30px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-tertiary);
  }
  .modal-close:hover { background: var(--surface-sunken); color: var(--text-primary); }

  .modal-body { padding: 20px 24px; }

  .modal-info-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px dashed var(--border);
    font-size: 13px;
  }
  .modal-info-row:last-child { border-bottom: none; }
  .modal-info-row .label { color: var(--text-secondary); }
  .modal-info-row .value { font-weight: 700; }
  .modal-info-row .value--danger { color: var(--danger); }

  .modal-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
  .modal-choice-btn {
    display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
    padding: 16px; border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    background: var(--surface);
    text-align: left;
    transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease;
  }
  .modal-choice-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
  .modal-choice-btn .choice-icon {
    width: 34px; height: 34px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
  }
  .modal-choice-btn .choice-title { font-size: 13.5px; font-weight: 700; color: var(--text-primary); }
  .modal-choice-btn .choice-desc { font-size: 11.5px; color: var(--text-tertiary); line-height: 1.5; }

  .modal-choice-btn--debt { border-color: #f6c9c9; }
  .modal-choice-btn--debt:hover { border-color: var(--danger); }
  .modal-choice-btn--debt .choice-icon { background: var(--danger-soft); color: var(--danger); }

  .modal-choice-btn--discount { border-color: #bfdcfc; }
  .modal-choice-btn--discount:hover { border-color: var(--info); }
  .modal-choice-btn--discount .choice-icon { background: var(--info-soft); color: var(--info); }

  /* ===== Abonelik: plan kartları ===== */
  .plan-cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 20px; }
  .plan-card {
    position: relative; display: flex; flex-direction: column; gap: 14px;
    padding: 22px; border-radius: var(--radius-md); border: 1.5px solid var(--border);
    background: var(--surface);
  }
  .plan-card--highlight { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .plan-card-badge {
    position: absolute; top: -11px; right: 18px;
    background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
    padding: 4px 10px; border-radius: 999px; letter-spacing: .01em;
  }
  .plan-card-header { display: flex; align-items: center; gap: 10px; }
  .plan-card-icon {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--info-soft); color: var(--info);
  }
  .plan-card--highlight .plan-card-icon { background: var(--accent-soft); color: var(--accent); }
  .plan-card-name { font-size: 15px; font-weight: 700; color: var(--text-primary); }
  .plan-card-price-row { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; min-height: 18px; }
  .plan-card-price-row .amount-old { font-size: 13.5px; color: var(--text-tertiary); text-decoration: line-through; font-weight: 600; }
  .plan-card-price-row .discount-badge {
    background: var(--danger-soft); color: var(--danger); font-size: 10.5px; font-weight: 800;
    padding: 2px 7px; border-radius: 999px; letter-spacing: 0.2px;
  }
  .plan-card-price { display: flex; align-items: baseline; gap: 5px; }
  .plan-card-price .amount { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; color: var(--text-primary); }
  .plan-card-price .period { font-size: 12.5px; color: var(--text-tertiary); font-weight: 600; }
  .plan-card-features { display: flex; flex-direction: column; gap: 8px; flex: 1; }
  .plan-card-features li { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--text-secondary); line-height: 1.4; }
  .plan-card-features li svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; color: var(--success); }
  .plan-card-btn { width: 100%; margin-top: 4px; }

  /* ===== Abonelik: kayıtlı fatura bilgisi özeti ===== */
  #abonelik-fatura-ozet .modal-info-row .label { color: var(--text-tertiary); font-size: 12.5px; }
  #abonelik-fatura-ozet .modal-info-row .value { font-size: 13px; }

  /* ===== Destek: mesaj kutusu (canlı sohbet değil, e-posta dizisi görünümü) ===== */
  .destek-mesaj { max-width: 75%; padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.5; word-break: break-word; }
  .destek-mesaj-meta { font-size: 11px; color: var(--text-tertiary); margin-bottom: 3px; font-weight: 600; }
  .destek-mesaj--firma { align-self: flex-end; background: var(--accent-soft); color: var(--text-primary); border-bottom-right-radius: 3px; }
  .destek-mesaj--superadmin { align-self: flex-start; background: var(--surface-sunken); color: var(--text-primary); border-bottom-left-radius: 3px; }

  .modal-footer { padding: 16px 24px 24px; display: flex; justify-content: center; }

  /* Erken çıkış modalındaki tarih seçim satırı */
  .modal-date-field { margin-bottom: 16px; }
  .modal-date-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-secondary); margin-bottom: 7px; }
  .modal-date-field input[type="date"] {
    width: 100%; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface-alt); outline: none;
  }
  .modal-date-field input[type="date"]:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface); }

  /* =====================================================================
     11b) MODAL — Yeni Kayıt / Düzenle (form alanları)
     ===================================================================== */
  .modal-card--wide { max-width: 640px; }
  .form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .modal-body .form-field { margin-bottom: 14px; }
  .modal-body .text-field, .modal-body .select-field, .modal-body textarea.text-field {
    width: 100%;
  }
  .modal-body textarea.text-field { min-height: 66px; resize: vertical; }
  .text-field[readonly] { background: var(--surface-sunken); color: var(--text-secondary); font-weight: 700; cursor: not-allowed; }
  .form-help-text { font-size: 11.5px; color: var(--text-tertiary); margin-top: 5px; }
  .modal-section-title {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--text-tertiary); margin: 4px 0 12px;
  }
  .modal-body-scroll { max-height: 62vh; overflow-y: auto; }

  /* =====================================================================
     11c) TOAST / SNACKBAR BİLDİRİMLERİ
     JS, showNotification(mesaj, tip) çağrıldığında buraya bir .toast
     ekleyecek ve 3 sn sonra kaldıracak.
     ===================================================================== */
  #toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
  }
  .toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 13px 14px;
    animation: toast-in .22s cubic-bezier(.2,.9,.3,1.2);
  }
  .toast.is-leaving { animation: toast-out .18s ease forwards; }
  @keyframes toast-in {
    from { opacity: 0; transform: translateX(24px) scale(0.98); }
    to { opacity: 1; transform: translateX(0) scale(1); }
  }
  @keyframes toast-out {
    to { opacity: 0; transform: translateX(24px) scale(0.98); }
  }
  .toast-icon { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .toast .icon { width: 16px; height: 16px; }
  .toast-text { flex: 1; font-size: 13px; color: var(--text-primary); line-height: 1.5; padding-top: 3px; }
  .toast-close { color: var(--text-tertiary); padding: 3px; border-radius: 6px; flex-shrink: 0; }
  .toast-close:hover { background: var(--surface-sunken); color: var(--text-primary); }

  .toast--success { border-left-color: var(--success); }
  .toast--success .toast-icon { background: var(--success-soft); color: var(--success); }
  .toast--error { border-left-color: var(--danger); }
  .toast--error .toast-icon { background: var(--danger-soft); color: var(--danger); }
  .toast--warning { border-left-color: var(--warning); }
  .toast--warning .toast-icon { background: var(--warning-soft); color: var(--warning); }
  .toast--info { border-left-color: var(--info); }
  .toast--info .toast-icon { background: var(--info-soft); color: var(--info); }

  /* Form gönderilirken düğmeyi kilitleyen basit "yükleniyor" durumu */
  .btn.is-loading { opacity: 0.7; pointer-events: none; }

  /* =====================================================================
     12) ROL BAZLI GÖRÜNÜRLÜK (CSS ile)
     JS, giriş yapan kullanıcının rolüne göre <body> etiketine
     "role-yonetici" ya da "role-personel" sınıfını ekleyecek.
     "yonetici-only" sınıflı HER ÖĞE personel rolünde otomatik gizlenir.
     ===================================================================== */
  body.role-personel .yonetici-only { display: none !important; }

  /* =====================================================================
     13) RESPONSIVE / MOBİL UYUM
     ===================================================================== */
  @media (max-width: 1180px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .care-layout { grid-template-columns: 1fr; }
    .finance-summary { grid-template-columns: 1fr 1fr; }
  }

  @media (max-width: 980px) {
    #login-screen { grid-template-columns: 1fr; }
    .login-brand-panel { display: none; }

    #app-shell { grid-template-columns: 1fr; }
    .sidebar {
      position: sticky; top: 0; height: auto;
      flex-direction: row; align-items: center;
      overflow-x: auto; padding: 12px 14px; gap: 8px; z-index: 30;
      border-bottom: 1px solid var(--sidebar-border);
    }
    /* Menü yatayda kaydırılabilir ama bu belli değildi — sağ kenarda
       kaybolan bir gölge ekleyerek "daha fazla sekme var" ipucu veriyoruz. */
    .sidebar::after {
      content: ''; position: sticky; right: 0; top: 0;
      width: 28px; height: 100%; flex-shrink: 0; margin-left: -28px;
      background: linear-gradient(to right, transparent, var(--sidebar-bg));
      pointer-events: none;
    }
    .sidebar-brand { padding: 0 10px 0 0; flex-shrink: 0; }
    .sidebar-section-label { display: none; }
    .nav-list { flex-direction: row; gap: 4px; }
    .nav-link { flex-direction: column; gap: 4px; padding: 8px 12px; font-size: 10.5px; white-space: nowrap; }
    .nav-link.is-active::before { display: none; }
    .nav-link .nav-badge { display: none; }
    /* Uyarı sayıları (bekleyen not / okunmamış duyuru) telefonda da görünsün: menü öğesinin köşesinde küçük sayı. */
    .nav-link { position: relative; }
    .nav-link .nav-badge--uyari { display: inline-block; position: absolute; top: 0; right: 0; margin: 0; min-width: 18px; text-align: center; padding: 1px 5px; font-size: 10px; line-height: 1.4; }
    .sidebar-spacer, .sidebar-tenant-card { display: none; }
    .sidebar-user { flex-shrink: 0; }
  }

  @media (max-width: 760px) {
    .topbar { padding: 0 18px; }
    .topbar-search { display: none; }
    .content { padding: 20px 18px 48px; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-value { font-size: 22px; }
    .finance-summary { grid-template-columns: 1fr; }
    .modal-choice-grid { grid-template-columns: 1fr; }
    .form-grid-2 { grid-template-columns: 1fr; }
    .plan-cards-grid { grid-template-columns: 1fr; padding: 16px; }
    #toast-container { left: 12px; right: 12px; top: 12px; max-width: none; }
    .data-table thead { display: none; }
    .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
    .data-table tbody tr { border-bottom: 1px solid var(--border); padding: 14px 18px; }
    .data-table tbody td { padding: 6px 0; border-bottom: none; }
    .cell-actions { justify-content: flex-start; margin-top: 8px; }

    /* iOS Safari, 16px'in altındaki bir form alanına dokunulduğunda sayfayı
       OTOMATİK olarak yakınlaştırır (zoom) ve bu çoğu zaman düzgün geri
       dönmez — "sayfa bozuk/web sitesi gibi görünüyor" şikayetlerinin en
       yaygın sebeplerinden biri budur. Masaüstünde 13px kalsın diye bu
       kural yalnızca mobilde (bu media query içinde) uygulanıyor. */
    .select-field, .text-field, .search-field input, textarea.text-field {
      font-size: 16px;
    }

    /* Mobilde pencereler (modal) ekranın büyük kısmını kaplayan, kenarlardan
       taşmayan, "tam ekrana yakın" bir kart gibi açılsın — küçük, ortalanmış
       bir masaüstü kutusu gibi değil. */
    .modal-overlay { padding: 10px; align-items: flex-end; }
    .modal-card { max-height: calc(100vh - 20px); display: flex; flex-direction: column; }
    .modal-card .modal-body-scroll { max-height: none; flex: 1 1 auto; }
  }

  @media (max-width: 520px) {
    .stat-grid { grid-template-columns: 1fr; }
    .login-form-panel { padding: 24px; }
  }

  /* --------------------------- PANEL: GİRİŞ EKRANIYLA UYUMLU GÖRÜNÜM ---------------------------
     Yalnızca menü, üst çubuk ve özet kartları değişir; tablolar ve formlar aynı kalır. */
  .sidebar {
    --sidebar-bg-elevated: rgba(255,255,255,.11);
    --sidebar-text: #c9ccf0;
    --sidebar-border: rgba(255,255,255,.15);
    background:
      linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 52px 52px,
      linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 52px 52px,
      linear-gradient(180deg, #343aa8 0%, #262a7c 55%, #1c1f5c 100%);
  }
  .sidebar-section-label { color: rgba(255,255,255,.45); }
  .nav-link .icon { color: rgba(255,255,255,.62); }
  .nav-link.is-active { background: rgba(255,255,255,.15); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .nav-link.is-active::before { background: #fff; }
  .sidebar-tenant-card, .sidebar-user { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .sidebar-brand .paw-badge { background: rgba(255,255,255,.18); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }

  #app-shell .main {
    background:
      radial-gradient(560px 380px at 88% -4%, rgba(79,70,229,.09), transparent 70%),
      radial-gradient(520px 380px at 0% 100%, rgba(20,184,166,.08), transparent 70%),
      var(--bg);
    background-attachment: fixed;
  }
  .topbar { background: rgba(255,255,255,.74); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom-color: rgba(16,24,40,.07); }
  .stat-card { background: rgba(255,255,255,.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-color: rgba(255,255,255,.95); box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 12px 26px -16px rgba(16,24,40,.2); }
  .stat-card--urgent { background: linear-gradient(180deg, rgba(255,255,255,.85) 0%, rgba(255,243,243,.9) 100%); border-color: #f6c9c9; }

  /* "Abonelik ve Destek" menü grubu */
  .nav-group-toggle { width: 100%; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
  .nav-group-toggle .nav-group-chevron { margin-left: auto; width: 15px; height: 15px; transition: transform .2s ease; }
  .nav-group.is-open .nav-group-chevron { transform: rotate(180deg); }
  .nav-group-dot { width: 8px; height: 8px; border-radius: 50%; background: #fbbf24; box-shadow: 0 0 0 3px rgba(251,191,36,.25); margin-left: 4px; }
  .nav-group.is-open .nav-group-dot { display: none !important; }
  .nav-group-items { display: none; flex-direction: column; gap: 2px; margin: 2px 0 4px 18px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.16); }
  .nav-group.is-open .nav-group-items { display: flex; }
  .nav-group-items .nav-link { padding: 8px 12px; font-size: 13px; }
  .nav-group-items .nav-link.is-active::before { left: -11px; }
  body.lisans-kilitli .nav-group-items { display: flex; margin: 0; padding: 0; border: 0; }
  @media (max-width: 980px) {
    .nav-group, .nav-group-items { display: contents; }
    .nav-group-toggle { display: none; }
    .nav-group-items .nav-link { padding: 10px 12px; font-size: 13.5px; }
  }
