@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ═══════════════════════════════════════════════════════════
   NOW PANEL — Brand Tokens
   Logo: Kırmızı (#E62425) + Mavi (#1E5BA8) + Siyah
   ═══════════════════════════════════════════════════════════ */

/* LIGHT */
:root, [data-theme="light"] {
  --brand-red: #E62425;
  --brand-red-hover: #C81E1F;
  --brand-red-bg: rgba(230, 36, 37, 0.08);
  --brand-red-bg-strong: rgba(230, 36, 37, 0.16);
  --brand-blue: #1E5BA8;
  --brand-blue-hover: #174A8C;
  --brand-blue-bg: rgba(30, 91, 168, 0.08);
  --brand-blue-bg-strong: rgba(30, 91, 168, 0.16);
  --brand-black: #1A1A1A;

  --bg-body: #F4F5F7;
  --bg-surface: #FFFFFF;
  --bg-surface-2: #F8F9FB;
  --bg-surface-3: #EFF1F5;
  --bg-input: #F5F6F8;
  --bg-input-focus: #FFFFFF;

  --border: #E2E5EB;
  --border-light: #ECEEF2;
  --border-hover: #C5CAD4;

  --text-0: #111827;
  --text-1: #374151;
  --text-2: #6B7280;
  --text-3: #9CA3AF;
  --text-4: #D1D5DB;

  /* Aliases (kullanım kolaylığı) */
  --primary: var(--brand-red);
  --primary-hover: var(--brand-red-hover);
  --primary-bg: var(--brand-red-bg);
  --primary-bg-strong: var(--brand-red-bg-strong);
  --accent: var(--brand-blue);
  --accent-bg: var(--brand-blue-bg);

  --green: #10B981;
  --green-bg: rgba(16, 185, 129, 0.10);
  --red: #EF4444;
  --red-bg: rgba(239, 68, 68, 0.08);
  --orange: #F59E0B;
  --orange-bg: rgba(245, 158, 11, 0.10);
  --purple: #8B5CF6;
  --purple-bg: rgba(139, 92, 246, 0.10);
  --teal: #06B6D4;
  --teal-bg: rgba(6, 182, 212, 0.10);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.08);

  --sidebar-bg: #FFFFFF;
  --sidebar-border: #ECEEF2;
}

/* DARK */
[data-theme="dark"] {
  --bg-body: #0A0A0A;
  --bg-surface: #141414;
  --bg-surface-2: #1A1A1A;
  --bg-surface-3: #232323;
  --bg-input: #101010;
  --bg-input-focus: #1A1A1A;

  --border: #2A2A2A;
  --border-light: #1F1F1F;
  --border-hover: #3A3A3A;

  --text-0: #F5F5F5;
  --text-1: #D4D4D4;
  --text-2: #A3A3A3;
  --text-3: #6B6B6B;
  --text-4: #404040;

  --brand-red: #FF3F3F;
  --brand-red-hover: #FF5555;
  --brand-red-bg: rgba(255, 63, 63, 0.10);
  --brand-red-bg-strong: rgba(255, 63, 63, 0.18);
  --brand-blue: #4A8FE7;
  --brand-blue-hover: #6CA4ED;
  --brand-blue-bg: rgba(74, 143, 231, 0.10);
  --brand-blue-bg-strong: rgba(74, 143, 231, 0.18);

  --primary: var(--brand-red);
  --primary-hover: var(--brand-red-hover);
  --primary-bg: var(--brand-red-bg);
  --primary-bg-strong: var(--brand-red-bg-strong);
  --accent: var(--brand-blue);
  --accent-bg: var(--brand-blue-bg);

  --green: #34D399;
  --green-bg: rgba(52, 211, 153, 0.12);
  --red: #F87171;
  --red-bg: rgba(248, 113, 113, 0.12);
  --orange: #FBBF24;
  --orange-bg: rgba(251, 191, 36, 0.12);
  --purple: #A78BFA;
  --purple-bg: rgba(167, 139, 250, 0.12);
  --teal: #22D3EE;
  --teal-bg: rgba(34, 211, 238, 0.12);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.30);
  --shadow: 0 1px 8px rgba(0, 0, 0, 0.40);
  --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.50);

  --sidebar-bg: #0F0F0F;
  --sidebar-border: #1F1F1F;
}

/* ═══════════════════════════════════════════════════════════
   BASE
   ═══════════════════════════════════════════════════════════ */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg-body);
  color: var(--text-0);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}
a { text-decoration: none; color: inherit; }
::selection { background: var(--primary-bg-strong); color: var(--primary); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ═══════════════════════════════════════════════════════════
   LAYOUT & SIDEBAR
   ═══════════════════════════════════════════════════════════ */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform .25s;
}

.sidebar-header {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border-light);
}

.logo { display: flex; align-items: center; gap: 14px; }
.logo-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--brand-black);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(230, 36, 37, 0.25);
}
.logo-icon img { width: 44px; height: 44px; display: block; }
.logo-text {
  font-size: 18px; font-weight: 800;
  letter-spacing: -.4px; color: var(--text-0);
}
.logo-text .brand-r { color: var(--brand-red); }
.logo-sub {
  font-size: 9.5px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 1px;
  font-weight: 600;
}

.sidebar-nav { flex: 1; padding: 14px 10px; overflow-y: auto; }
.nav-section { margin-bottom: 22px; }
.nav-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--text-3);
  padding: 0 14px;
  margin-bottom: 8px;
  font-weight: 700;
}
.nav-item {
  display: flex; align-items: center; gap: 13px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  position: relative;
}
.nav-item:hover { background: var(--bg-surface-3); color: var(--text-0); }
.nav-item.active {
  background: var(--primary-bg-strong);
  color: var(--primary);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
}
.nav-icon {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.sidebar-footer {
  padding: 14px 10px;
  border-top: 1px solid var(--border-light);
}
.user-info {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s;
}
.user-info:hover { background: var(--bg-surface-3); }
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
  color: #fff;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-blue));
}
.user-avatar.admin {
  background: linear-gradient(135deg, var(--brand-red), #C81E1F);
}
.user-name { font-size: 13.5px; font-weight: 700; color: var(--text-0); }
.user-role { font-size: 11px; color: var(--text-3); font-weight: 500; }
.author-badge {
  font-size: 10px;
  color: var(--text-3);
  text-align: center;
  padding: 8px 0 4px;
  font-weight: 500;
}

/* MAIN */
.main-content { flex: 1; margin-left: 260px; min-height: 100vh; }
.top-bar {
  height: 60px;
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  background: var(--bg-surface);
  position: sticky; top: 0; z-index: 50;
}
.top-bar-left { display: flex; align-items: center; gap: 14px; }
.page-title { font-size: 16px; font-weight: 800; letter-spacing: -.2px; }
.top-bar-right { display: flex; align-items: center; gap: 8px; }
.top-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
  font-size: 15px;
}
.top-btn:hover {
  background: var(--bg-surface-3);
  color: var(--text-0);
  border-color: var(--border-hover);
}
.mobile-menu { display: none; }
.content-area { padding: 28px; }

/* Mobil */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .mobile-menu { display: flex; }
  .content-area { padding: 20px 16px; }
}

/* ═══════════════════════════════════════════════════════════
   COMPONENTS
   ═══════════════════════════════════════════════════════════ */

/* CARD */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 20px; gap: 12px;
}
.card-title {
  font-size: 15px; font-weight: 800;
  display: flex; align-items: center; gap: 9px;
  letter-spacing: -.1px;
}
.card-title .accent-bar {
  width: 4px; height: 18px;
  background: var(--primary);
  border-radius: 2px;
}
.card-subtitle { font-size: 12.5px; color: var(--text-2); margin-top: 3px; font-weight: 500; }

/* STATS */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 20px;
  transition: all .2s;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-color, var(--primary));
}
.stat-card.red::before { --accent-color: var(--brand-red); }
.stat-card.blue::before { --accent-color: var(--brand-blue); }
.stat-card.green::before { --accent-color: var(--green); }
.stat-card.orange::before { --accent-color: var(--orange); }
.stat-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.stat-label {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 8px;
  font-weight: 700;
}
.stat-value {
  font-size: 26px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -1px;
}
.stat-sub {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 4px;
  font-weight: 500;
}

/* FORMS */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-1);
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-0);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13.5px;
  transition: all .2s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
  background: var(--bg-input-focus);
}
.form-input::placeholder { color: var(--text-3); }
.form-hint { font-size: 11px; color: var(--text-3); margin-top: 4px; font-weight: 500; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .form-row, .form-row-3 { grid-template-columns: 1fr; } }
.form-textarea { resize: vertical; min-height: 80px; }

/* CHECKBOX */
.checkbox-wrap {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none;
  font-size: 13px; font-weight: 600;
  color: var(--text-1);
}
.checkbox-wrap input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 10px;
  border: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 36, 37, 0.30);
}
.btn-blue { background: var(--brand-blue); color: #fff; }
.btn-blue:hover:not(:disabled) {
  background: var(--brand-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 91, 168, 0.30);
}
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { filter: brightness(1.08); }
.btn-danger { background: var(--red-bg); color: var(--red); border: 1px solid transparent; }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
}
.btn-ghost { background: transparent; color: var(--text-2); padding: 7px 10px; }
.btn-ghost:hover { background: var(--bg-surface-3); color: var(--text-0); }
.btn-sm { padding: 6px 13px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 12px 28px; font-size: 14px; }
.btn-icon {
  width: 32px; height: 32px; padding: 0;
  border-radius: 8px;
  background: var(--bg-surface-3);
  border: 1px solid var(--border-light);
  color: var(--text-2);
  font-size: 14px;
}
.btn-icon:hover { color: var(--text-0); border-color: var(--border-hover); }
.btn-icon.danger { color: var(--red); }
.btn-icon.danger:hover { background: var(--red-bg); border-color: var(--red); }

/* TABLE */
.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
}
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-3);
  background: var(--bg-surface-2);
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-light);
}
tbody td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--primary-bg); }
.td-mono { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; font-weight: 500; }
.td-money { font-family: 'JetBrains Mono', monospace; font-weight: 700; }
.td-money.positive { color: var(--green); }
.td-money.negative { color: var(--red); }

/* TAGS */
.tag {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2px;
}
.tag-success { background: var(--green-bg); color: var(--green); }
.tag-danger { background: var(--red-bg); color: var(--red); }
.tag-warning { background: var(--orange-bg); color: var(--orange); }
.tag-info { background: var(--accent-bg); color: var(--accent); }
.tag-purple { background: var(--purple-bg); color: var(--purple); }
.tag-red { background: var(--primary-bg); color: var(--primary); }
.tag-blue { background: var(--brand-blue-bg); color: var(--brand-blue); }

/* TABS */
.tabs {
  display: flex; gap: 2px;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 24px;
  overflow-x: auto;
}
.tab-item {
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .15s;
  white-space: nowrap;
  margin-bottom: -2px;
}
.tab-item:hover { color: var(--text-1); }
.tab-item.active { color: var(--primary); border-bottom-color: var(--primary); }

/* FLASH */
.flash-container {
  position: fixed; top: 20px; right: 20px;
  z-index: 1000;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 400px;
}
.flash {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 10px;
  animation: slideIn .3s ease-out;
}
@keyframes slideIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.flash.success { border-left: 4px solid var(--green); color: var(--green); }
.flash.danger { border-left: 4px solid var(--red); color: var(--red); }
.flash.warning { border-left: 4px solid var(--orange); color: var(--orange); }
.flash.info { border-left: 4px solid var(--brand-blue); color: var(--brand-blue); }

/* LOGIN PAGE */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at 30% 20%, rgba(230, 36, 37, 0.08), transparent 60%),
              radial-gradient(circle at 70% 80%, rgba(30, 91, 168, 0.08), transparent 60%),
              var(--bg-body);
}
.login-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 40px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.login-logo {
  width: 80px; height: 80px;
  margin: 0 auto 20px;
  border-radius: 20px;
  background: var(--brand-black);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(230, 36, 37, 0.25);
}
.login-logo img { width: 80px; height: 80px; }
.login-title {
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -.5px;
}
.login-title .accent { color: var(--brand-red); }
.login-sub {
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 28px;
  font-weight: 500;
}

/* DROPZONE */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 48px 28px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: var(--bg-surface-2);
}
.dropzone:hover, .dropzone.active {
  border-color: var(--primary);
  background: var(--primary-bg);
}
.dropzone-icon { font-size: 40px; margin-bottom: 14px; opacity: .5; }
.dropzone-text { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.dropzone-hint { font-size: 12px; color: var(--text-3); font-weight: 500; }

/* PAGINATION */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; }
.page-btn {
  min-width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
  transition: all .15s;
  cursor: pointer;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn.disabled { opacity: .4; cursor: not-allowed; }

/* CHAT BUBBLE */
.chat-container { max-width: 900px; margin: 0 auto; }
.chat-bubble {
  margin-bottom: 14px;
  display: flex;
  gap: 12px;
}
.chat-bubble.user { flex-direction: row-reverse; }
.chat-avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: #fff;
  font-weight: 800;
}
.chat-avatar.user { background: var(--brand-red); }
.chat-avatar.assistant { background: var(--brand-blue); }
.chat-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 14px 16px;
  max-width: 70%;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.chat-bubble.user .chat-content {
  background: var(--brand-red-bg);
  border-color: transparent;
}
.chat-image { max-width: 100%; border-radius: 10px; margin-top: 8px; }
.chat-meta { font-size: 11px; color: var(--text-3); margin-top: 6px; font-weight: 500; }

/* UTILS */
.fade-in { animation: fadeIn .3s ease-out; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.text-muted { color: var(--text-3); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.text-bold { font-weight: 700; }
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}
.empty-state .emoji { font-size: 48px; margin-bottom: 12px; opacity: .5; }
.empty-state .title { font-size: 16px; font-weight: 700; color: var(--text-1); margin-bottom: 6px; }
.empty-state .sub { font-size: 13px; }

/* MODAL */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg-surface);
  border-radius: 16px;
  padding: 28px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

/* PERMISSION GRID */
.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.perm-cat-title {
  grid-column: 1 / -1;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--text-3);
  letter-spacing: .5px;
  margin-top: 10px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 4px;
}
