/* ===========================================================
   KiraYönet - Global Styles
   =========================================================== */
:root {
  --purple: #7c3aed;
  --purple-dark: #6d28d9;
  --purple-light: #ede9fe;
  --purple-lighter: #f5f3ff;
  --green: #16a34a;
  --green-light: #22c55e;
  --green-bg: #ecfdf5;
  --red: #ef4444;
  --red-dark: #dc2626;
  --red-bg: #fef2f2;
  --orange: #f97316;
  --orange-bg: #fff7ed;
  --blue: #3b82f6;
  --blue-dark: #2563eb;
  --blue-bg: #eff6ff;
  --yellow: #f59e0b;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --sidebar-width: 260px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: var(--gray-900);
  background: var(--gray-100);
  -webkit-font-smoothing: antialiased;
}

body.dark {
  background: #0f1117;
  color: #e5e7eb;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 14px; }
ul { list-style: none; }

/* ===================== Layout ===================== */
#app-shell {
  display: flex;
  min-height: 100vh;
}

/* ===================== Sidebar ===================== */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
}
body.dark .sidebar {
  background: #161923;
  border-right-color: #262b3a;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px 20px;
  border-bottom: 1px solid var(--gray-100);
}
body.dark .sidebar-header { border-bottom-color: #262b3a; }

.sidebar-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  flex-shrink: 0;
}

.sidebar-title { font-size: 17px; font-weight: 700; color: var(--gray-900); line-height: 1.2; }
body.dark .sidebar-title { color: #f3f4f6; }
.sidebar-subtitle { font-size: 12px; color: var(--gray-500); margin-top: 1px; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 2px;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}
body.dark .nav-item { color: #cbd5e1; }
.nav-item i { width: 18px; text-align: center; font-size: 15px; color: var(--gray-400); }
.nav-item:hover { background: var(--gray-100); }
body.dark .nav-item:hover { background: #1e2230; }
.nav-item.active { background: var(--purple-light); color: var(--purple-dark); }
.nav-item.active i { color: var(--purple); }
body.dark .nav-item.active { background: #2c2145; color: #c4b5fd; }
body.dark .nav-item.active i { color: #a78bfa; }

.sidebar-footer {
  padding: 16px 16px;
  border-top: 1px solid var(--gray-100);
}
body.dark .sidebar-footer { border-top-color: #262b3a; }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.sidebar-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}
.sidebar-user-name { font-size: 13px; font-weight: 600; color: var(--gray-900); }
body.dark .sidebar-user-name { color: #e5e7eb; }
.sidebar-user-email { font-size: 12px; color: var(--gray-500); }

.btn-logout {
  width: 100%;
  background: var(--red);
  color: #fff;
  padding: 9px 0;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-logout:hover { background: var(--red-dark); }

/* ===================== Main Content ===================== */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
}

.topbar {
  height: 68px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}
body.dark .topbar { background: #161923; border-bottom-color: #262b3a; }

.page-title { font-size: 24px; font-weight: 700; color: var(--gray-900); }
body.dark .page-title { color: #f3f4f6; }

.topbar-right { display: flex; align-items: center; gap: 16px; }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-100);
  border-radius: 10px;
  padding: 9px 14px;
  width: 280px;
}
body.dark .search-box { background: #1e2230; }
.search-box input {
  background: transparent;
  border: none;
  outline: none;
  flex: 1;
  font-size: 13px;
  color: var(--gray-900);
}
body.dark .search-box input { color: #e5e7eb; }
.search-box i { color: var(--gray-400); font-size: 13px; }

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  font-size: 15px;
}
.icon-btn:hover { background: var(--gray-100); }
body.dark .icon-btn:hover { background: #1e2230; }

.topbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}

.page-content {
  padding: 24px 28px 48px 28px;
}

/* ===================== Cards ===================== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}
body.dark .card { background: #161923; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1200px) {
  .grid-6, .grid-5, .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: repeat(1, 1fr); }
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 28px 0 14px 0;
}
body.dark .section-heading { color: #f3f4f6; }
.section-heading:first-child { margin-top: 0; }
.section-heading i { color: var(--purple); font-size: 15px; }

/* Big stat card (income) */
.stat-card-hero {
  border-radius: var(--radius);
  padding: 22px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.stat-card-hero.green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.stat-card-hero-label { font-size: 14px; opacity: 0.92; font-weight: 500; }
.stat-card-hero-value { font-size: 34px; font-weight: 800; margin: 6px 0 16px 0; }
.stat-card-hero-icon {
  position: absolute;
  top: 20px; right: 20px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.stat-card-hero-row {
  display: flex; justify-content: space-between;
  font-size: 13px; margin-bottom: 6px; opacity: 0.95;
}
.stat-card-hero-row b { font-weight: 700; }
.progress-track {
  height: 6px; background: rgba(255,255,255,0.3); border-radius: 4px;
  margin-top: 10px; overflow: hidden;
}
.progress-fill { height: 100%; background: #fff; border-radius: 4px; }

/* Reminder card */
.reminder-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
}
body.dark .reminder-card { background: #161923; }
.reminder-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--orange); }
.reminder-title i { color: var(--orange); }
.reminder-sub { font-size: 13px; color: var(--gray-500); margin: 2px 0 12px 26px; }
.reminder-body {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
}
.reminder-check {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.reminder-ok-text { font-size: 14px; color: var(--gray-500); }

.alert-banner {
  background: var(--green-bg);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}
.alert-banner.warn { background: var(--orange-bg); border-color: #fed7aa; }
.alert-banner-icon {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  flex-shrink: 0;
}
.alert-banner.warn .alert-banner-icon { background: var(--orange); }
.alert-banner-title { font-size: 14px; font-weight: 700; color: #15803d; }
.alert-banner.warn .alert-banner-title { color: #c2410c; }
.alert-banner-sub { font-size: 13px; color: #16a34a; margin-top: 2px; }
.alert-banner.warn .alert-banner-sub { color: #ea580c; }

/* Mini colored stat cards (cash/debt) */
.mini-stat-card {
  border-radius: var(--radius);
  padding: 18px 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.mini-stat-card.green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.mini-stat-card.red { background: linear-gradient(135deg, #f87171, #ef4444); }
.mini-stat-card.blue { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.mini-stat-card.orange { background: linear-gradient(135deg, #fb923c, #f97316); }
.mini-stat-card-label { font-size: 13px; opacity: 0.92; }
.mini-stat-card-value { font-size: 26px; font-weight: 800; margin: 4px 0; }
.mini-stat-card-sub { font-size: 12px; opacity: 0.9; display: flex; align-items: center; gap: 4px; }
.mini-stat-card-icon {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.22);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}

/* Simple white stat card w/ colored number (invoice status, totals) */
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  position: relative;
}
body.dark .stat-card { background: #161923; }
.stat-card-label { font-size: 13px; color: var(--gray-500); margin-bottom: 6px; }
.stat-card-value { font-size: 26px; font-weight: 800; color: var(--gray-900); }
body.dark .stat-card-value { color: #f3f4f6; }
.stat-card-value.green { color: var(--green); }
.stat-card-value.red { color: var(--red); }
.stat-card-value.orange { color: var(--orange); }
.stat-card-value.blue { color: var(--blue); }
.stat-card-value.purple { color: var(--purple); }
.stat-card-sub { font-size: 12px; color: var(--gray-400); margin-top: 4px; }
.stat-card-icon-badge {
  position: absolute; top: 16px; right: 16px;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 13px; color: #fff;
}
.stat-card-icon-badge.green { background: var(--green); }
.stat-card-icon-badge.red { background: var(--red); }
.stat-card-icon-badge.orange { background: var(--orange); }
.stat-card-icon-badge.gray { background: var(--gray-400); }

/* Empty state within card */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 20px;
  color: var(--gray-400);
  gap: 10px;
}
.empty-state i { font-size: 28px; }
.empty-state-text { font-size: 14px; }

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s, opacity 0.15s;
}
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-dark); }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-200); }
body.dark .btn-secondary { background: #1e2230; color: #cbd5e1; }
.btn-danger { background: var(--red-bg); color: var(--red-dark); }
.btn-danger:hover { background: #fecaca; }
.btn-success { background: var(--green-bg); color: var(--green); }
.btn-success:hover { background: #bbf7d0; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.toolbar-filters { display: flex; gap: 10px; flex-wrap: wrap; }

.select-input, .text-input {
  padding: 9px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--gray-700);
  background: var(--white);
  outline: none;
}
body.dark .select-input, body.dark .text-input {
  background: #1e2230; border-color: #2c3142; color: #e5e7eb;
}
.select-input:focus, .text-input:focus { border-color: var(--purple); }

/* ===================== Table ===================== */
.table-wrap {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
body.dark .table-wrap { background: #161923; }
table { width: 100%; border-collapse: collapse; }
thead tr { background: var(--gray-50); }
body.dark thead tr { background: #1a1e2a; }
th {
  text-align: left;
  padding: 13px 18px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--gray-200);
}
body.dark th { border-bottom-color: #262b3a; color: #94a3b8; }
td {
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}
body.dark td { border-bottom-color: #21252f; color: #cbd5e1; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--gray-50); }
body.dark tbody tr:hover { background: #1a1e2a; }
td.strong { font-weight: 600; color: var(--gray-900); }
body.dark td.strong { color: #f1f5f9; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.red { background: var(--red-bg); color: var(--red-dark); }
.badge.orange { background: var(--orange-bg); color: var(--orange); }
.badge.blue { background: var(--blue-bg); color: var(--blue-dark); }
.badge.gray { background: var(--gray-100); color: var(--gray-500); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.row-actions { display: flex; gap: 6px; }
.row-actions button {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-500); font-size: 13px;
}
.row-actions button:hover { background: var(--gray-100); }
body.dark .row-actions button:hover { background: #1e2230; }
.row-actions button.edit:hover { color: var(--blue); }
.row-actions button.delete:hover { color: var(--red); }

/* ===================== Modal ===================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 17, 23, 0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-box {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
body.dark .modal-box { background: #161923; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100);
}
body.dark .modal-header { border-bottom-color: #262b3a; }
.modal-title { font-size: 17px; font-weight: 700; }
.modal-close { font-size: 18px; color: var(--gray-400); width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: var(--gray-100); color: var(--gray-700); }
.modal-body { padding: 22px 24px; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 24px; border-top: 1px solid var(--gray-100);
}
body.dark .modal-footer { border-top-color: #262b3a; }

.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
body.dark .form-label { color: #cbd5e1; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  outline: none;
  color: var(--gray-900);
  background: var(--white);
}
body.dark .form-group input, body.dark .form-group select, body.dark .form-group textarea {
  background: #1e2230; border-color: #2c3142; color: #e5e7eb;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--purple); }
.form-group textarea { resize: vertical; min-height: 70px; }

/* ===================== Tenant Detail Modal ===================== */
.modal-box.wide { max-width: 940px; }
.tenant-modal-header {
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: #fff;
  padding: 22px 28px;
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex; align-items: flex-start; justify-content: space-between;
}
.tenant-modal-header h2 { font-size: 19px; font-weight: 700; margin: 0 0 6px 0; }
.tenant-modal-header .tenant-property-sub { font-size: 13px; opacity: 0.92; display: flex; align-items: center; gap: 6px; }
.tenant-modal-header .modal-close { color: #fff; }
.tenant-modal-header .modal-close:hover { background: rgba(255,255,255,0.22); color: #fff; }

.tenant-modal-body { padding: 22px 28px; }
.info-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 22px; }
@media (max-width: 720px) { .info-card-grid { grid-template-columns: 1fr; } }
.info-card {
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
body.dark .info-card { background: #1a1e2a; }
.info-card-title {
  font-size: 13px; font-weight: 700; color: var(--gray-700);
  display: flex; align-items: center; gap: 7px; margin-bottom: 12px;
}
body.dark .info-card-title { color: #cbd5e1; }
.info-card-title i { color: var(--purple); }
.info-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; color: var(--gray-500); }
.info-row .info-value { font-weight: 600; color: var(--gray-900); }
body.dark .info-row .info-value { color: #f1f5f9; }

.schedule-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.schedule-progress-text { font-size: 12px; color: var(--gray-500); text-align: right; }
.schedule-progress-value { font-size: 16px; font-weight: 700; color: var(--purple); }

.summary-box-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
@media (max-width: 720px) { .summary-box-grid { grid-template-columns: 1fr; } }
.summary-box { border-radius: var(--radius-sm); padding: 16px 18px; }
.summary-box.blue { background: var(--blue-bg); }
.summary-box.green { background: var(--green-bg); }
.summary-box.orange { background: var(--orange-bg); }
.summary-box-label { font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
.summary-box.blue .summary-box-label { color: var(--blue-dark); }
.summary-box.green .summary-box-label { color: var(--green); }
.summary-box.orange .summary-box-label { color: var(--orange); }
.summary-box-value { font-size: 22px; font-weight: 800; }
.summary-box.blue .summary-box-value { color: var(--blue-dark); }
.summary-box.green .summary-box-value { color: var(--green); }
.summary-box.orange .summary-box-value { color: var(--orange); }

.doc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
@media (max-width: 720px) { .doc-grid { grid-template-columns: 1fr; } }
.doc-slot {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 10px;
}
body.dark .doc-slot { border-color: #2c3142; }
.doc-slot-icon {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff; flex-shrink: 0;
}
.doc-slot-icon.blue { background: var(--blue); }
.doc-slot-icon.orange { background: var(--orange); }
.doc-slot-icon.teal { background: #14b8a6; }
.doc-slot-title { font-size: 13px; font-weight: 600; color: var(--gray-900); }
body.dark .doc-slot-title { color: #f1f5f9; }
.doc-slot-sub { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.doc-slot-body { flex: 1; min-width: 0; }
.doc-slot-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.doc-slot-badge { width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; flex-shrink: 0; }
.doc-slot-badge.red { background: var(--red-bg); color: var(--red-dark); }
.doc-slot-badge.blue { background: var(--blue-bg); color: var(--blue-dark); font-weight: 700; font-size: 11px; }

.schedule-pay-btn {
  background: var(--purple); color: #fff; border-radius: 8px;
  padding: 6px 12px; font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.schedule-pay-btn:hover { background: var(--purple-dark); }
.schedule-view-btn {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue); font-size: 13px;
}
.schedule-view-btn:hover { background: var(--blue-bg); }
.row-actions button.view:hover { color: var(--purple); }

/* ===================== Charts / misc ===================== */
.chart-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}
body.dark .chart-card { background: #161923; }
.chart-card-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; margin-bottom: 16px;
}
.chart-card-title i { font-size: 13px; }
.chart-legend-row { display: flex; gap: 16px; justify-content: center; margin-top: 12px; font-size: 12px; color: var(--gray-500); }
.chart-legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }

.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--gray-900);
  color: #fff;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  z-index: 2000;
  display: flex; align-items: center; gap: 10px;
  animation: toast-in 0.25s ease;
}
.toast.error { background: var(--red-dark); }
.toast.success i { color: #4ade80; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.loading-spinner {
  display: flex; align-items: center; justify-content: center;
  padding: 60px 0;
  color: var(--gray-400);
  font-size: 22px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.calendar-day-name {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  padding-bottom: 6px;
}
.calendar-day {
  background: var(--white);
  border-radius: 10px;
  min-height: 90px;
  padding: 8px;
  font-size: 12px;
  color: var(--gray-700);
  border: 1px solid var(--gray-100);
}
body.dark .calendar-day { background: #161923; border-color: #21252f; color: #cbd5e1; }
.calendar-day.other-month { opacity: 0.35; }
.calendar-day.today { border-color: var(--purple); border-width: 2px; }
.calendar-day-num { font-weight: 700; margin-bottom: 4px; }
.calendar-event {
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 5px;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.calendar-event.kira { background: var(--green-bg); color: var(--green); }
.calendar-event.bakim { background: var(--orange-bg); color: var(--orange); }
.calendar-event.sozlesme { background: var(--blue-bg); color: var(--blue-dark); }
.calendar-event.diger { background: var(--purple-lighter); color: var(--purple); }

.progress-bar-mini { height: 8px; background: var(--gray-100); border-radius: 4px; overflow: hidden; }
body.dark .progress-bar-mini { background: #262b3a; }
.progress-bar-mini-fill { height: 100%; border-radius: 4px; }

.settings-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  margin-bottom: 18px;
}
body.dark .settings-section { background: #161923; }
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}
body.dark .settings-row { border-bottom-color: #21252f; }
.settings-row:last-child { border-bottom: none; }
.settings-row-label { font-size: 14px; font-weight: 600; }
.settings-row-sub { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

.toggle-switch {
  position: relative; width: 44px; height: 24px;
  background: var(--gray-300); border-radius: 12px; transition: background 0.2s;
}
.toggle-switch.on { background: var(--purple); }
.toggle-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; background: #fff; border-radius: 50%;
  transition: transform 0.2s;
}
.toggle-switch.on::after { transform: translateX(20px); }

.text-muted { color: var(--gray-500); }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 14px; } .mt-4 { margin-top: 20px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 14px; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
