/* Bakitap dashboard theme — overrides layered on top of the base app styles. */
:root {
  color-scheme: light;
  /* ── Able Pro esinli açık tema ── */
  --navy-950: #0B1220;
  --navy-900: #16213C;
  --navy-800: #1E2A4A;
  --blue-700: #2952CC;
  --blue-600: #3D6BFF;
  --blue-500: #6D93FF;
  --blue-100: #E4EBFF;
  --blue-50:  #F2F5FF;
  --purple-600: #7B5CFA;
  --ink:      #1B2436;
  --muted:    #64748B;
  --line:     #E6E9F0;
  --surface:  #FFFFFF;
  --surface-soft: #F5F7FB;
  --background:   #F3F5F9;
  --success: #22C55E;
  --warning: #F59E0B;
  --danger:  #EF4444;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05), 0 2px 6px rgba(16,24,40,.04);
  --hero: linear-gradient(135deg, #3D6BFF 0%, #7B5CFA 100%);
  --header-input: #F5F7FB;
  --icon-soft: #E4EBFF;
  --focus-ring: rgba(61,107,255,.18);
  --sidebar-width: 280px;
  --radius-card: 16px;
  --radius-lg: 20px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  /* ── #131B34 baz lacivert karanlık tema (Able Pro koyu temaya yakın) ── */
  --navy-950: #0b1122;
  --navy-900: #131B34;
  --navy-800: #1c2848;
  --blue-700: #5a80d0;
  --blue-600: #708ee8;
  --blue-500: #90a8f0;
  --blue-100: #1e2d50;
  --blue-50:  #16213c;
  --purple-600: #9080d0;
  --ink:      #e8edf8;
  --muted:    #8090b8;
  --line:     #243060;
  --surface:  #1B2444;
  --surface-soft: #131B34;
  --background:   #0E1529;
  --success: #2ca87f;
  --warning: #d4a030;
  --danger:  #e04050;
  --shadow: 0 2px 16px rgba(0,0,0,.35);
  --shadow-sm: 0 1px 8px rgba(0,0,0,.3);
  --hero: linear-gradient(135deg, #1e2d50 0%, #3b2f6e 100%);
  --header-input: #131B34;
  --icon-soft: #16213c;
  --focus-ring: #708ee840;
}
html, body { min-height: 100%; background: var(--background); }
body { font-family: Inter, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.6; color: var(--ink); }
button, input, select, textarea { font-family: inherit; }
:where(a, button, input, select, textarea):focus-visible { outline: 2px solid var(--blue-600); outline-offset: 3px; }
.theme-icon-light, [data-theme="dark"] .theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: inline; }

/* Navigation and toolbar */
.sidebar { width: var(--sidebar-width); background: var(--background); color: var(--ink); border-right: 1px dashed color-mix(in srgb, var(--line) 65%, transparent); box-shadow: none; }
.main-shell { min-width: 0; margin-left: var(--sidebar-width); }
.topbar [data-sidebar-toggle] { order: -2; }
.topbar [data-browser-back] { order: -1; }
@media (min-width: 901px) {
  .sidebar.collapsed, html[data-sidebar="collapsed"] .sidebar { display: none; }
  .main-shell.collapsed, html[data-sidebar="collapsed"] .main-shell { margin-left: 0; }
}
.brand {
  order: 0;
  height: 84px;
  min-height: 84px;
  gap: 10px;
  padding: 0 16px 0 20px;
  border: 0;
  display: flex;
  align-items: center;
  position: relative;
}
.brand-copy {
  flex: 1;
  min-width: 0;
}
.brand-copy strong {
  max-width: 160px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.15;
  font-weight: 750;
  letter-spacing: -.6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.brand-copy span {
  margin-top: 3px;
  max-width: 160px;
  font-size: 11px;
  letter-spacing: 0;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.sidebar-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--muted);
  cursor: pointer;
  flex: 0 0 26px;
  margin-left: auto;
  transition: color 0.16s ease, transform 0.16s ease;
}
.sidebar-collapse-btn:hover {
  background: transparent !important;
  color: var(--ink);
  transform: scale(1.18);
}
[data-theme="dark"] .sidebar-collapse-btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--muted);
}
[data-theme="dark"] .sidebar-collapse-btn:hover {
  background: transparent !important;
  color: var(--ink);
  transform: scale(1.18);
}

.sidebar.collapsed .brand {
  padding: 0;
  justify-content: center;
  gap: 0;
  cursor: pointer;
}
.sidebar.collapsed .brand-copy {
  display: none !important;
}
.sidebar.collapsed .sidebar-collapse-btn {
  display: none !important;
}
.sidebar.collapsed .brand-logo-mark {
  cursor: pointer;
  transition: transform 0.18s ease;
}
.sidebar.collapsed .brand-logo-mark:hover {
  transform: scale(1.1);
}
.brand .brand-logo-mark, .sidebar.collapsed .brand-logo-mark { width: 36px; height: 36px; padding: 0; background: none; border: 0; border-radius: 10px; box-shadow: none; }
.brand-logo-image { opacity: 1; }
html:not([data-theme="dark"]) .brand-logo-image { filter: grayscale(1) sepia(.25); }
html:not([data-theme="dark"]) .brand-logo-image.brand-logo-custom { filter: none; }
.sidebar-footer { order: 1; padding: 8px 15px 18px; border: 0; }
.sidebar-user { gap: 14px; min-height: 87px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.avatar { width: 40px; height: 40px; color: var(--blue-600); background: var(--blue-100); font-size: 13px; font-weight: 600; }
.avatar.avatar-image { padding: 0; overflow: hidden; }
.avatar.avatar-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.sidebar-user .avatar { width: 45px; height: 45px; }
.sidebar-user-copy { flex: 1; }
.sidebar-user-copy strong { color: var(--ink); font-size: 13px; font-weight: 600; }
.sidebar-user-copy span { color: var(--muted); font-size: 10px; margin-top: 2px; }
.sidebar-user-copy span:last-child { max-width: 140px; }
.sidebar-user-arrow { width: 16px; height: 16px; color: var(--muted); }
.sidebar.collapsed .sidebar-user-arrow { display: none; }
.sidebar.collapsed .sidebar-footer { padding-inline: 8px; }
.sidebar.collapsed .sidebar-user { padding: 10px 0; }
.nav-scroll { order: 2; flex: 1; padding: 0 12px 22px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.nav-label { margin: 12px 20px 10px; font-size: 11px; font-weight: 700; color: var(--ink); letter-spacing: 0; }
.nav-group + .nav-group { margin-top: 20px; }
.nav-link { min-height: 48px; margin: 0 0 4px; padding: 12px 20px; gap: 18px; border: 0; border-radius: 10px; color: var(--muted); font-size: 14.5px; font-weight: 400; }
.nav-link .lucide { width: 20px; height: 20px; stroke-width: 1.7; }
.nav-link:hover { background: var(--surface); color: var(--ink); }
.nav-link.active { color: var(--blue-600); background: var(--blue-50); box-shadow: none; font-weight: 600; }
.nav-link.active::after { content: "›"; margin-left: auto; font-size: 20px; }
.sidebar.collapsed .nav-link.active::after { display: none; }
.topbar { height: 74px; min-height: 74px; padding: 0 28px; gap: 12px; border: 0; background: color-mix(in srgb, var(--background) 95%, transparent); box-shadow: none; backdrop-filter: blur(8px); }
.icon-button { flex: 0 0 auto; width: 40px; height: 40px; color: var(--muted); border: 0; border-radius: 999px; background: transparent; }
.icon-button .lucide { width: 21px; height: 21px; stroke-width: 1.7; }
.icon-button:hover { transform: none; color: var(--blue-600); background: var(--surface); }
.top-search { width: 210px; flex-shrink: 1; }
.top-search input { height: 44px; padding-left: 40px; font-size: 13px; font-weight: 400; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; background: var(--header-input); }
.top-search input:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--focus-ring); }
.topbar-branch-label { max-width: 250px; min-width: 0; padding: 0; color: var(--muted); border: 0; background: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 400; }
.top-profile { gap: 12px; }
.top-profile-copy { display: none; }
.notification-count { background: var(--success); color: #fff; }
.top-search-dropdown, .notification-dropdown { background: var(--surface); border-color: var(--line); border-radius: 14px; }
.notification-dropdown-header, .notification-item { border-color: var(--line); }
.notification-item.unread, .notification-list .notification-item.unread { background: var(--blue-50); border-color: var(--line); }

/* Shared page and form surfaces */
.page { width: 100%; max-width: none; padding: 20px 40px 40px; margin: 0; }
.page-header { gap: 24px; margin-bottom: 24px; align-items: center; }
.page-title { font-size: 26px; line-height: 1.3; letter-spacing: -.45px; font-weight: 700; color: var(--ink); }
.page-description { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.eyebrow { color: var(--muted); letter-spacing: .03em; font-size: 11.5px; font-weight: 600; }
.button { min-height: 40px; padding: 9px 18px; font-size: 13.5px; font-weight: 600; line-height: 1.5; color: #fff; background: var(--blue-600); border: 1px solid var(--blue-600); border-radius: 10px; box-shadow: none; }
.button:hover { color: #fff; background: var(--blue-700); transform: none; }
.button.secondary { color: var(--ink); background: transparent; border-color: var(--line); }
.button.secondary:hover { background: var(--surface-soft); border-color: var(--muted); color: var(--ink); }
.button.small { min-height: 32px; padding: 6px 12px; font-size: 12.5px; }
.card, .panel, .form-card, .table-card, .metric-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.card { padding: 24px; }
.card-title, .section-title { color: var(--ink); font-size: 17px; font-weight: 700; }
.card-subtitle { color: var(--muted); font-size: 13px; }
input, select, textarea { accent-color: var(--blue-600); }
input[type="radio"].mode-radio { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; min-height: 0; margin: 0; padding: 0; flex: none; border: 2px solid var(--line); border-radius: 50%; background-color: var(--surface); cursor: pointer; transition: border-color 150ms ease, box-shadow 150ms ease; }
input[type="radio"].mode-radio:hover { border-color: var(--blue-600); }
input[type="radio"].mode-radio:checked { border-color: var(--blue-600); background-image: radial-gradient(circle, var(--blue-600) 5px, transparent 6px); }
input[type="radio"].mode-radio:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.field input, .field select, .field textarea, .filters input, .filters select, .form-section input:not([type="checkbox"]):not([type="radio"]), .form-section select, .form-section textarea { background-color: var(--surface-soft); color: var(--ink); border-color: var(--line); border-radius: 8px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--focus-ring); }
.data-table th, .dashboard-table th { color: var(--muted); background: var(--surface-soft); font-size: 12px; font-weight: 700; border-color: var(--line); }
.data-table td, .dashboard-table td { border-color: var(--line); font-size: 14px; }
.data-table tr:hover td { background: color-mix(in srgb, var(--blue-600) 5%, var(--surface)); }
.badge:not(.success):not(.warning):not(.danger):not(.muted):not(.info), .notice.info, .notice-icon { color: var(--blue-600); background: var(--blue-50); border-color: var(--blue-100); }
.filters, .form-section { border-color: var(--line); }
.form-section h2, legend { color: var(--ink); }

/* Library branding and account photo controls. */
.settings-branding-field { min-width: 0; }
.media-upload-field { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.media-preview { display: grid; place-items: center; width: 96px; height: 72px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.media-preview img { max-width: 86px; max-height: 62px; width: auto; height: auto; object-fit: contain; }
.media-upload-copy { display: grid; gap: 6px; min-width: 0; }
.media-upload-copy > strong, .profile-photo-copy > label { color: var(--ink); font-size: 13px; font-weight: 700; }
.media-upload-copy > span, .profile-photo-copy > .field-help { color: var(--muted); font-size: 12px; line-height: 1.5; }
.media-upload-copy input[type="file"], .profile-photo-copy input[type="file"] { width: 100%; min-width: 0; padding: 8px; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; background: var(--surface); font-size: 12px; }
.media-remove-option { margin-top: 3px; padding: 0; border: 0; background: transparent; }
.media-remove-option .list-copy strong { font-size: 12px; }
.media-remove-option .list-copy span { font-size: 11px; }
.profile-photo-editor { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 16px; margin-bottom: 20px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.profile-photo-preview { display: grid; place-items: center; width: 88px; height: 88px; overflow: hidden; color: var(--blue-600); background: var(--blue-100); border-radius: 50%; font-size: 24px; font-weight: 750; }
.profile-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo-copy { display: grid; gap: 6px; min-width: 0; }
@media (max-width: 560px) {
  .media-upload-field, .profile-photo-editor { grid-template-columns: 1fr; align-items: start; }
}

/* Inventory session setup: external styles also work under the site's strict CSP. */
.audit-overview-metrics { margin-bottom: 24px; }
.audit-overview-metrics [data-audit-tone="primary"] { color: var(--blue-600); background: var(--blue-100); }
.audit-overview-metrics [data-audit-tone="warning"] { color: var(--warning); background: color-mix(in srgb, var(--warning) 15%, var(--surface)); }
.audit-overview-metrics [data-audit-tone="success"] { color: var(--success); background: color-mix(in srgb, var(--success) 15%, var(--surface)); }
.inventory-audit-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(350px, 420px); align-items: start; gap: 24px; }
.inventory-audit-layout > * { min-width: 0; }
.audit-sessions-card .card-title { display: flex; align-items: center; gap: 10px; }
.audit-sessions-card .table-wrap { max-width: 100%; overflow-x: auto; }
.audit-session-title { color: var(--ink); font-size: 13.5px; }
.audit-session-notes { margin-top: 3px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.audit-session-secondary, .audit-session-date { color: var(--muted); font-size: 11.5px; }
.audit-shelf-badge { color: var(--blue-600); background: var(--blue-100); font-weight: 700; }
.audit-create-card { padding: 0; border-color: color-mix(in srgb, var(--blue-600) 18%, var(--line)); }
.audit-create-header { display: flex; align-items: flex-start; gap: 14px; padding: 24px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, var(--blue-50), var(--surface)); border-radius: var(--radius-card) var(--radius-card) 0 0; }
.audit-create-header > div { min-width: 0; }
.audit-create-emblem { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border-radius: 12px; color: var(--blue-600); background: var(--blue-100); }
.audit-create-emblem .lucide { width: 24px; height: 24px; }
.audit-create-header .audit-create-eyebrow { margin: 0 0 4px; color: var(--blue-600); font-size: 10px; font-weight: 750; letter-spacing: .08em; }
.audit-create-header h2 { margin: 0; color: var(--ink); font-size: 20px; font-weight: 700; line-height: 1.35; letter-spacing: -.3px; }
.audit-create-header p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.audit-create-card > .audit-create-form { display: grid; gap: 20px; padding: 24px; min-width: 0; }
.audit-create-field { gap: 8px; }
.audit-create-field > label, .audit-scope-fieldset > legend { color: var(--ink); font-size: 12px; font-weight: 650; line-height: 1.5; }
.audit-create-field input, .audit-create-field textarea { min-width: 0; width: 100%; padding: 11px 12px; font-size: 13px; line-height: 1.5; border-radius: 10px; }
.audit-create-field input { min-height: 46px; }
.audit-create-field textarea { min-height: 88px; resize: vertical; }
.audit-create-field input::placeholder, .audit-create-field textarea::placeholder { color: var(--muted); opacity: .85; }
.audit-required { color: var(--blue-600); }
.audit-optional { margin-left: 6px; color: var(--muted); font-size: 11px; font-weight: 400; }
.audit-scope-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.audit-scope-fieldset > legend { float: none; width: auto; margin: 0 0 10px; padding: 0; }
.audit-scope-options { display: grid; gap: 10px; }
.audit-scope-option { display: grid; grid-template-columns: 36px minmax(0, 1fr) 18px; align-items: start; gap: 12px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); cursor: pointer; transition: border-color .16s, background-color .16s, box-shadow .16s; }
.audit-scope-option:hover { border-color: var(--blue-600); background: var(--surface-soft); }
.audit-scope-option:has(input:checked) { border-color: var(--blue-600); background: var(--blue-50); box-shadow: 0 0 0 1px var(--blue-600); }
.audit-scope-option:has(input:focus-visible) { outline: 2px solid var(--blue-600); outline-offset: 3px; }
.audit-scope-option > input { grid-column: 3; grid-row: 1; align-self: start; width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; padding: 0; accent-color: var(--blue-600); cursor: pointer; }
.audit-scope-icon { grid-column: 1; grid-row: 1; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--surface-soft); color: var(--muted); }
.audit-scope-icon .lucide { width: 20px; height: 20px; }
.audit-scope-option:has(input:checked) .audit-scope-icon { background: var(--blue-100); color: var(--blue-600); }
.audit-scope-copy { grid-column: 2; grid-row: 1; display: grid; gap: 5px; min-width: 0; }
.audit-scope-title { color: var(--ink); font-size: 13px; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
.audit-scope-description { color: var(--muted); font-size: 11.5px; line-height: 1.55; }
.audit-shelf-field[hidden] { display: none; }
.audit-field-hint { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.audit-create-footer { display: grid; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.audit-scope-summary { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.audit-scope-summary .lucide { flex: 0 0 15px; width: 15px; height: 15px; margin-top: 1px; }
.audit-create-submit { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-width: 0; min-height: 48px; padding: 12px 16px; white-space: normal; font-size: 14px; }
.audit-create-submit .lucide { flex-shrink: 0; width: 18px; height: 18px; }
.audit-create-submit > span { flex: 1; text-align: center; }
.audit-submit-hint { margin: 0; color: var(--muted); font-size: 11px; text-align: center; }
@media (max-width: 1200px) {
  .inventory-audit-layout { grid-template-columns: minmax(0, 1fr); }
  .audit-create-card { grid-row: 1; }
}
@media (min-width: 681px) and (max-width: 1200px) {
  .audit-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .audit-scope-fieldset, .audit-create-footer { grid-column: 1 / -1; }
  .audit-scope-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-scope-option { height: 100%; }
  .audit-create-form > .audit-create-field:first-of-type { grid-column: 1 / -1; }
  .audit-create-field:has(#auditNotes) { grid-column: 1 / -1; }
  .audit-create-form:has([value="single"]:checked) .audit-create-field:has(#auditNotes) { grid-column: auto; }
}
@media (max-width: 680px) {
  .inventory-audit-layout { gap: 16px; }
  .audit-create-header { padding: 20px; gap: 12px; }
  .audit-create-card > .audit-create-form { padding: 20px; gap: 18px; }
  .audit-scope-option { padding: 12px; gap: 10px; grid-template-columns: 32px minmax(0, 1fr) 18px; }
  .audit-scope-icon { width: 32px; height: 32px; }
}

/* Live inventory count */
.audit-live { display: grid; gap: 18px; min-width: 0; }
.audit-live-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; border-color: color-mix(in srgb, var(--blue-600) 18%, var(--line)); }
.audit-live-session { display: flex; align-items: center; gap: 13px; min-width: 0; }
.audit-live-session .audit-create-emblem { flex: 0 0 44px; }
.audit-live-session-title { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; color: var(--ink); font-size: 15px; }
.audit-live-session-title strong { overflow-wrap: anywhere; }
.audit-live-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px; color: #16845b; background: color-mix(in srgb, var(--success) 12%, var(--surface)); font-size: 10px; font-weight: 750; white-space: nowrap; }
.audit-live-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 16%, transparent); }
.audit-live-session p { margin: 5px 0 0; color: var(--muted); font-size: 11.5px; }
.audit-live-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; flex: none; }
.audit-live-actions form { margin: 0; }
.audit-live-actions .button { min-height: 38px; white-space: nowrap; }
.audit-live-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.audit-live-metric { position: relative; min-width: 0; padding: 15px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.audit-live-metric::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--blue-600); }
.audit-live-metric[data-tone="success"]::before { background: var(--success); }
.audit-live-metric[data-tone="warning"]::before { background: var(--warning); }
.audit-live-metric[data-tone="danger"]::before { background: var(--danger); }
.audit-live-metric[data-tone="neutral"]::before { background: var(--muted); }
.audit-metric-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.35; }
.audit-metric-icon { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; color: var(--blue-600); background: var(--blue-50); }
.audit-live-metric[data-tone="success"] .audit-metric-icon { color: var(--success); background: color-mix(in srgb, var(--success) 12%, var(--surface)); }
.audit-live-metric[data-tone="warning"] .audit-metric-icon { color: var(--warning); background: color-mix(in srgb, var(--warning) 12%, var(--surface)); }
.audit-live-metric[data-tone="danger"] .audit-metric-icon { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }
.audit-live-metric[data-tone="neutral"] .audit-metric-icon { color: var(--muted); background: var(--surface-soft); }
.audit-metric-icon .lucide { width: 16px; height: 16px; }
.audit-live-metric > strong { display: block; margin-top: 10px; color: var(--ink); font-size: 25px; font-weight: 760; line-height: 1; letter-spacing: -.4px; }
.audit-live-metric > p { margin: 7px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.audit-scanner { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 22px; padding: 22px; border: 1px solid color-mix(in srgb, var(--blue-600) 30%, var(--line)); box-shadow: 0 10px 26px color-mix(in srgb, var(--blue-600) 9%, transparent); }
.audit-scanner-main { min-width: 0; }
.audit-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.audit-section-eyebrow { margin: 0 0 5px; color: var(--blue-600); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.audit-section-heading h2, .audit-feed-header h2 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink); font-size: 17px; line-height: 1.35; }
.audit-section-heading h2 .lucide, .audit-feed-header h2 .lucide { width: 18px; height: 18px; color: var(--blue-600); }
.audit-scanner-state { flex: none; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface-soft); font-size: 11px; font-weight: 700; }
.audit-scanner-state[data-state="busy"] { color: var(--blue-600); border-color: color-mix(in srgb, var(--blue-600) 35%, var(--line)); background: var(--blue-50); }
.audit-scanner-state[data-state="error"] { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.audit-scan-form label { display: block; margin-bottom: 8px; color: var(--ink); font-size: 12px; font-weight: 700; }
.audit-scan-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.audit-scan-input-wrap { display: flex; align-items: center; min-width: 0; }
.audit-scan-input-wrap input { width: 100%; min-width: 0; min-height: 50px; padding: 11px 15px; border: 2px solid var(--line); border-radius: 11px; color: var(--ink); background: var(--surface-soft); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 15px; outline: 0; transition: border-color .16s, box-shadow .16s, background-color .16s; }
.audit-scan-input-wrap input:focus { border-color: var(--blue-600); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue-600) 16%, transparent); }
.audit-scan-controls > .button { min-height: 50px; padding-inline: 18px; }
.audit-scan-help { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.audit-scan-help kbd { padding: 2px 5px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-soft); font-size: 10px; }
.audit-scan-feedback { display: flex; align-items: flex-start; gap: 10px; margin-top: 17px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--surface-soft); }
.audit-scan-feedback[data-result="VERIFIED"] { color: #16845b; border-color: color-mix(in srgb, var(--success) 35%, var(--line)); background: color-mix(in srgb, var(--success) 8%, var(--surface)); }
.audit-scan-feedback[data-result="WRONG_SHELF"] { color: #a15c00; border-color: color-mix(in srgb, var(--warning) 38%, var(--line)); background: color-mix(in srgb, var(--warning) 9%, var(--surface)); }
.audit-scan-feedback[data-result="BORROWED_FOUND"] { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.audit-scan-feedback[data-result="UNREGISTERED"], .audit-scan-feedback[data-result="ALREADY_SCANNED"] { color: var(--muted); }
.audit-feedback-icon { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 8px; color: var(--blue-600); background: var(--blue-100); }
.audit-feedback-icon .lucide { width: 16px; height: 16px; }
.audit-scan-feedback strong { display: block; color: currentColor; font-size: 12px; }
.audit-scan-feedback p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.audit-scan-recovery { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.audit-queue-note { margin: 9px 0 0; color: var(--muted); font-size: 11px; }
.audit-scanner-guide { align-self: stretch; padding: 18px; border-radius: 12px; color: var(--muted); background: var(--surface-soft); }
.audit-guide-icon { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 15px; border-radius: 10px; color: var(--blue-600); background: var(--blue-100); }
.audit-guide-icon .lucide { width: 19px; height: 19px; }
.audit-scanner-guide h3 { margin: 0; color: var(--ink); font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.audit-scanner-guide > p:not(.audit-section-eyebrow) { margin: 8px 0 0; font-size: 11px; line-height: 1.55; }
.audit-guide-tip { display: flex; align-items: flex-start; gap: 7px; margin-top: 17px; padding-top: 13px; border-top: 1px solid var(--line); font-size: 10.5px; line-height: 1.5; }
.audit-guide-tip .lucide { flex: 0 0 15px; width: 15px; height: 15px; color: var(--blue-600); }
.audit-feed { padding: 22px; }
.audit-feed-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.audit-feed-header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.audit-feed-count { flex: none; padding: 5px 8px; border-radius: 999px; color: var(--muted); background: var(--surface-soft); font-size: 10.5px; }
.audit-feed-list { display: grid; gap: 9px; padding-top: 15px; }
.audit-scan-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 13px; border: 1px solid var(--line); border-left: 3px solid var(--blue-600); border-radius: 10px; background: var(--surface); }
.audit-scan-item[data-result="VERIFIED"] { border-left-color: var(--success); }
.audit-scan-item[data-result="WRONG_SHELF"] { border-left-color: var(--warning); }
.audit-scan-item[data-result="BORROWED_FOUND"] { border-left-color: var(--danger); }
.audit-scan-item[data-result="UNREGISTERED"], .audit-scan-item[data-result="ALREADY_SCANNED"] { border-left-color: var(--muted); }
.audit-item-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--blue-600); background: var(--blue-50); }
.audit-scan-item[data-result="VERIFIED"] .audit-item-icon { color: var(--success); background: color-mix(in srgb, var(--success) 12%, var(--surface)); }
.audit-scan-item[data-result="WRONG_SHELF"] .audit-item-icon { color: var(--warning); background: color-mix(in srgb, var(--warning) 12%, var(--surface)); }
.audit-scan-item[data-result="BORROWED_FOUND"] .audit-item-icon { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }
.audit-item-icon .lucide { width: 17px; height: 17px; }
.audit-item-copy { min-width: 0; }
.audit-item-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.audit-item-heading h3 { margin: 0; color: var(--ink); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.audit-result-badge { padding: 3px 7px; border-radius: 999px; color: var(--muted); background: var(--surface-soft); font-size: 9.5px; font-weight: 750; white-space: nowrap; }
.audit-scan-item[data-result="VERIFIED"] .audit-result-badge { color: #16845b; background: color-mix(in srgb, var(--success) 12%, var(--surface)); }
.audit-scan-item[data-result="WRONG_SHELF"] .audit-result-badge { color: #a15c00; background: color-mix(in srgb, var(--warning) 13%, var(--surface)); }
.audit-scan-item[data-result="BORROWED_FOUND"] .audit-result-badge { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.audit-item-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.audit-item-meta strong { color: var(--ink); font-weight: 700; }
.audit-item-note { margin: 6px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.audit-item-actions { display: flex; align-items: flex-end; flex-direction: column; gap: 8px; min-width: 104px; }
.audit-item-actions time { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; white-space: nowrap; }
.audit-item-actions .button { min-height: 30px; padding: 6px 9px; font-size: 10px; white-space: nowrap; }
.audit-item-error { margin: 0; color: var(--danger); font-size: 10px; text-align: right; }
.audit-feed-empty { padding: 36px 16px; color: var(--muted); text-align: center; }
.audit-feed-empty[hidden] { display: none; }
.audit-feed-empty > span { display: grid; place-items: center; width: 38px; height: 38px; margin: 0 auto 10px; border-radius: 11px; color: var(--blue-600); background: var(--blue-50); }
.audit-feed-empty .lucide { width: 19px; height: 19px; }
.audit-feed-empty h3 { margin: 0; color: var(--ink); font-size: 13px; }
.audit-feed-empty p { margin: 6px 0 0; font-size: 11px; }
.audit-scan-item[hidden], .audit-scan-item template { display: none; }
@media (max-width: 1180px) { .audit-live-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .audit-live-toolbar { align-items: flex-start; flex-direction: column; } .audit-live-actions { justify-content: flex-start; } .audit-scanner { grid-template-columns: 1fr; } .audit-scanner-guide { min-height: 0; } }
@media (max-width: 640px) { .audit-live { gap: 14px; } .audit-live-toolbar, .audit-scanner, .audit-feed { padding: 16px; } .audit-live-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; } .audit-live-metric { padding: 12px; } .audit-live-metric > strong { font-size: 22px; } .audit-live-actions { width: 100%; } .audit-live-actions .button, .audit-live-actions form, .audit-live-actions form .button { flex: 1 1 auto; } .audit-live-actions .button { justify-content: center; } .audit-scan-controls { grid-template-columns: 1fr; } .audit-scan-controls > .button { width: 100%; justify-content: center; } .audit-scan-item { grid-template-columns: auto minmax(0, 1fr); } .audit-item-actions { grid-column: 2; align-items: flex-start; flex-direction: row; flex-wrap: wrap; min-width: 0; } .audit-item-error { text-align: left; } .audit-feed-header { align-items: flex-start; flex-direction: column; gap: 9px; } }

/* Inventory report */
.report-stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.report-stat-card { position: relative; min-width: 0; padding: 15px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.report-stat-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--blue-600); }
.report-stat-card[data-tone="success"]::before { background: var(--success); }
.report-stat-card[data-tone="warning"]::before { background: var(--warning); }
.report-stat-card[data-tone="danger"]::before { background: var(--danger); }
.report-stat-card[data-tone="neutral"]::before { background: var(--muted); }
.report-stat-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 29px; color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.35; }
.report-stat-icon { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 8px; color: var(--blue-600); background: var(--blue-50); }
.report-stat-icon .lucide { width: 16px; height: 16px; }
.report-stat-card[data-tone="success"] .report-stat-icon { color: var(--success); background: color-mix(in srgb, var(--success) 12%, var(--surface)); }
.report-stat-card[data-tone="warning"] .report-stat-icon { color: var(--warning); background: color-mix(in srgb, var(--warning) 12%, var(--surface)); }
.report-stat-card[data-tone="danger"] .report-stat-icon { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }
.report-stat-card[data-tone="neutral"] .report-stat-icon { color: var(--muted); background: var(--surface-soft); }
.report-stat-card > strong { display: block; margin-top: 11px; color: var(--ink); font-size: 25px; font-weight: 760; line-height: 1; letter-spacing: -.4px; }
.report-stat-card > p { margin: 7px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.report-tabs-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 20px; padding-bottom: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.report-tab-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border: 0; border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0; color: var(--muted); background: transparent; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: color .16s, background-color .16s, border-color .16s; }
.report-tab-btn .lucide { width: 16px; height: 16px; }
.report-tab-btn:hover { color: var(--ink); background: var(--surface-soft); }
.report-tab-btn.active { color: var(--blue-600); border-bottom-color: var(--blue-600); background: var(--surface); }
.audit-scan-submit { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-width: 92px; }
.audit-scan-submit-icon { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid color-mix(in srgb, #fff 38%, transparent); border-radius: 7px; background: color-mix(in srgb, #fff 15%, transparent); }
.audit-scan-submit-icon .lucide { width: 14px; height: 14px; stroke-width: 2.2; }
@media (max-width: 1180px) { .report-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .report-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; } .report-stat-card { padding: 12px; } .report-stat-card > strong { font-size: 22px; } .report-tabs-bar { margin-inline: -4px; } .report-tab-btn { padding-inline: 11px; font-size: 11px; } }

 /* Dashboard composition */
.dashboard-page {
  --dashboard-accent: var(--blue-600); --dashboard-accent-soft: var(--blue-50);
  --dashboard-success: var(--success); --dashboard-success-soft: color-mix(in srgb, var(--success) 12%, var(--surface));
  --dashboard-warning: var(--warning); --dashboard-warning-soft: color-mix(in srgb, var(--warning) 12%, var(--surface));
  --dashboard-danger: var(--danger); --dashboard-danger-soft: color-mix(in srgb, var(--danger) 12%, var(--surface));
  --dashboard-purple: var(--purple-600); --dashboard-purple-soft: color-mix(in srgb, var(--dashboard-purple) 12%, var(--surface));
  --dashboard-info: var(--blue-600); --dashboard-info-soft: var(--blue-50);
  --dashboard-chart-1: var(--blue-600); --dashboard-chart-2: var(--success);
  --dashboard-radius-md: 8px; --dashboard-radius-lg: var(--radius-card);
  display: flex; flex-direction: column; gap: 24px;
}
.dashboard-page > * { margin-top: 0; margin-bottom: 0; min-width: 0; }
.dashboard-page > .page-header { order: 0; position: relative; isolation: isolate; display: flex; min-height: 252px; margin: 0; padding: 40px; overflow: hidden; background: var(--hero); border: 0; border-radius: var(--radius-lg); box-shadow: none; }
.dashboard-page > .page-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url('../images/dashboard-waves.svg') right bottom / 100% auto no-repeat; opacity: .5; pointer-events: none; }
.dashboard-page .page-header-copy { width: 62%; max-width: 630px; position: relative; z-index: 1; }
.dashboard-page .page-header .eyebrow { display: none; }
.dashboard-page .page-header .page-title { margin: 0; color: white; font-size: 30px; line-height: 1.35; letter-spacing: -.4px; font-weight: 700; }
.dashboard-page .page-header .page-description { color: white; max-width: 520px; margin: 20px 0 18px; font-size: 14px; line-height: 1.6; font-weight: 400; }
.dashboard-page .page-header .header-actions { display: flex; position: static; gap: 10px; padding: 0; }
.dashboard-page .page-header .button { min-height: 40px; padding: 8px 17px; color: #fff; border: 1px solid #ffffffa6; border-radius: 24px; background: transparent; font-size: 13px; }
.dashboard-page .page-header .button:hover { color: var(--hero); background: #fff; }
.dashboard-welcome-art { position: absolute; width: 200px; height: 200px; object-fit: contain; left: 64%; top: 50%; transform: translateY(-50%); }
html:not([data-theme="dark"]) .dashboard-welcome-art { filter: sepia(.18) saturate(.8); }
.dashboard-page > .flash-stack { order: 1; }
.dashboard-page > .dashboard-metrics-primary { order: 2; }
.dashboard-page > .dashboard-primary-grid { order: 3; }
.dashboard-page > .dashboard-operations-grid { order: 4; }
.dashboard-page > .dashboard-metrics-secondary { order: 5; }
.dashboard-page > .dashboard-secondary-grid { order: 6; }
.dashboard-page > .dashboard-gender-grid { order: 7; }
.dashboard-page > .dashboard-overdue-panel { order: 8; }
.dashboard-metrics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.dashboard-page .metric-card { --metric-color: var(--blue-600); padding: 25px; min-height: 194px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow); }
.dashboard-page .metric-card[data-tone="warning"] { --metric-color: var(--warning); }
.dashboard-page .metric-card[data-tone="success"] { --metric-color: var(--success); }
.dashboard-page .metric-card[data-tone="danger"] { --metric-color: var(--danger); }
.dashboard-page .metric-card[data-tone="purple"] { --metric-color: var(--dashboard-purple); }
.dashboard-page .metric-card::before, .dashboard-page .metric-card::after { content: none; }
.dashboard-page .metric-card:hover { transform: none; border-color: var(--line); }
.dashboard-page .metric-top { display: flex; align-items: center; gap: 12px; margin: 0; }
.dashboard-page .metric-icon { width: 40px; height: 40px; order: -1; flex: 0 0 auto; color: var(--metric-color); border: 0; border-radius: 12px; background: color-mix(in srgb, var(--metric-color) 10%, var(--surface)); }
.dashboard-page .metric-icon svg { width: 24px; height: 24px; stroke-width: 1.5; }
.dashboard-page .metric-label { flex: 1; color: var(--ink); font-size: 15px; font-weight: 600; }
.metric-detail-link { color: var(--muted); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; }
.metric-detail-link:hover { color: var(--metric-color); background: var(--surface-soft); }
.metric-detail-link svg { width: 16px; height: 16px; }
.metric-summary { min-height: 86px; margin-top: 16px; padding: 16px; display: flex; gap: 24px; align-items: center; background: var(--surface-soft); border-radius: 8px; }
.metric-mini-chart { min-width: 0; flex: 1; color: var(--metric-color); }
.metric-mini-chart svg { width: 100%; height: 46px; overflow: visible; }
.metric-mini-chart .chart-baseline { stroke: currentColor; opacity: .25; }
.metric-mini-chart .chart-zero { fill: currentColor; opacity: .22; }
.metric-mini-chart .chart-bar { fill: currentColor; }
.metric-total { width: 40%; flex: 0 0 auto; min-width: 120px; }
.dashboard-page .metric-value { margin: 0; font-size: 20px; line-height: 1.4; font-weight: 700; color: var(--ink); text-align: left; }
.dashboard-page .metric-foot { display: inline-flex; margin: 8px 0 0; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; line-height: 1.5; color: var(--metric-color); background: color-mix(in srgb, var(--metric-color) 12%, var(--surface)); font-weight: 600; text-align: left; }
.dashboard-metrics-secondary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-metrics-secondary .metric-card { min-height: 152px; padding: 20px; }
.dashboard-metrics-secondary .metric-value { margin-top: 16px; font-size: 27px; }
.dashboard-metrics-secondary .metric-icon { width: 32px; height: 32px; }
.dashboard-metrics-secondary .metric-icon svg { width: 19px; height: 19px; }
.dashboard-metrics-secondary .metric-label { font-size: 13px; }
.dashboard-primary-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(245px, 1fr); gap: 24px; align-items: start; }
.dashboard-secondary-grid, .dashboard-gender-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.split-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
@media (max-width: 900px) { .dashboard-grid, .split-layout, .metrics-grid { grid-template-columns: minmax(0, 1fr); } .dashboard-grid > *, .split-layout > * { min-width: 0; } }
.dashboard-panel, .dashboard-panel:not(.dashboard-chart-panel) { min-width: 0; padding: 25px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow); }
.dashboard-panel:not(.dashboard-chart-panel):hover { border-color: var(--line); transform: none; }
.dashboard-section-header { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.dashboard-section-header h2, .dashboard-panel:not(.dashboard-chart-panel) .dashboard-section-header h2 { color: var(--ink); font-size: 17px; line-height: 1.4; font-weight: 700; letter-spacing: 0; }
.dashboard-section-header p { margin-top: 5px; color: var(--muted); font-size: 13px; font-weight: 400; line-height: 1.55; }
.dashboard-section-header > strong { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.dashboard-chart-panel .dashboard-section-header { align-items: flex-start; }
.dashboard-chart-canvas, .dashboard-chart-empty { height: 285px; margin: 20px 0 0; }
.dashboard-chart-empty { position: relative; display: grid; place-items: center; min-height: 220px; border: 0; border-radius: 0; background: repeating-linear-gradient(to top, transparent 0 56px, color-mix(in srgb, var(--line) 65%, transparent) 56px 57px); color: var(--muted); font-size: 12px; }
.dashboard-chart-empty span { padding: 12px; background: var(--surface); }
.dashboard-chart-legend { margin-top: 18px; justify-content: center; color: var(--muted); font-size: 12px; }
.dashboard-range-selector { min-height: 32px; padding: 0; gap: 3px; background: transparent; border: 0; border-radius: 6px; }
.dashboard-range-tab { min-height: 30px; padding: 0 9px; font-size: 11px; font-weight: 500; border-radius: 5px; }
.dashboard-range-tab.active { color: var(--blue-600); background: var(--blue-50); box-shadow: none; }
.dashboard-import-panel .dashboard-section-header { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.dashboard-mini-grid { gap: 8px; }
.dashboard-mini-stat { padding: 10px; border: 0; border-radius: 6px; background: var(--surface-soft); }
.dashboard-import-meta { padding: 12px 0; background: none; border: 0; font-size: 11px; overflow-wrap: anywhere; }
.dashboard-empty-state { padding: 16px 4px; background: none; border: 0; color: var(--muted); }
.dashboard-empty-state > svg { color: var(--blue-600); }
.dashboard-empty-state strong { color: var(--ink); font-weight: 600; font-size: 13px; }
.dashboard-empty-state p { font-size: 12px; }
.dashboard-panel-action { width: 100%; }
.dashboard-today-section { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.dashboard-today-header h3 { font-size: 13px; font-weight: 600; }
.dashboard-today-stats { gap: 8px; }
.dashboard-today-stat { border: 0; background: var(--surface-soft); border-radius: 6px; }
.dashboard-today-empty { font-size: 11px; }
.dashboard-operations-grid-single { display: block; }
.dashboard-action-panel { min-height: 0; }
.dashboard-action-panel .dashboard-section-header { margin-bottom: 12px; }
.dashboard-action-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 18px; }
.dashboard-action-row { padding: 12px 0; min-height: 66px; background: none; border: 0; border-radius: 0; grid-template-columns: 34px minmax(0, 1fr) auto 14px; gap: 10px; }
.dashboard-action-icon { width: 34px; height: 34px; border-radius: 8px; background: color-mix(in srgb, var(--dashboard-action-color) 10%, var(--surface)); }
.dashboard-action-copy strong { font-size: 12px; font-weight: 500; }
.dashboard-action-copy span { margin-top: 4px; font-size: 11px; line-height: 1.5; white-space: normal; }
.dashboard-action-count { font-size: 18px; font-weight: 600; }
.dashboard-all-clear { display: flex; margin-top: 0; padding: 10px 12px; border-radius: 6px; font-size: 12px; font-weight: 400; }
.dashboard-queue-badge, .dashboard-period-badge { background: var(--blue-50); color: var(--blue-600); font-weight: 500; border-radius: 5px; }
.dashboard-activity-list { gap: 0; }
.dashboard-activity-row { padding: 15px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.dashboard-activity-row:last-child { border-bottom: 0; }
.dashboard-activity-avatar { width: 42px; height: 42px; border-radius: 50%; }
.dashboard-activity-copy strong { font-size: 13px; font-weight: 600; }
.dashboard-activity-copy span, .dashboard-activity-row time { font-size: 11px; color: var(--muted); }
.dashboard-meter-list { gap: 20px; }
.dashboard-meter-row { border: 0; background: none; padding: 0; border-radius: 0; }
.dashboard-meter-row > div span { color: var(--muted); font-size: 12px; font-weight: 400; }
.dashboard-meter-row > div strong { font-size: 14px; font-weight: 600; }
.dashboard-meter-track { height: 6px; border-radius: 3px; background: var(--surface-soft); }
.dashboard-meter-row p { margin-top: 8px; font-size: 11px; color: var(--muted); }
.dashboard-donut-content { grid-template-columns: minmax(130px, 180px) minmax(0, 1fr); gap: 20px; padding-top: 0; }
.dashboard-donut { max-width: 180px; }
.dashboard-donut circle { stroke-width: 4; }
.dashboard-donut-segment.male { stroke: var(--blue-600); }
.dashboard-donut-segment.female { stroke: var(--dashboard-purple); }
.dashboard-donut-legend li { padding: 12px 0; grid-template-columns: 9px minmax(0, 1fr) auto 42px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.dashboard-donut-legend i.male { background: var(--blue-600); }
.dashboard-donut-legend i.female { background: var(--dashboard-purple); }
.dashboard-donut-legend strong { font-weight: 600; }
.dashboard-overdue-panel { overflow: hidden; }
.dashboard-table-wrap { margin: 0 -25px -25px; }
.dashboard-table { min-width: 600px; }
.dashboard-table-empty { padding: 30px !important; text-align: center; color: var(--muted); }

/* The same appearance applies to sign-in and password forms. */
.login-shell { min-height: 100vh; background: var(--background); }
.login-panel { background: transparent; }
.login-card, [data-theme="dark"] .login-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow); color: var(--ink); }
.login-card h1 { color: var(--ink); font-size: 28px; font-weight: 600; }
.login-card p, .login-brand small { color: var(--muted); }
.login-brand .brand-logo-mark { background: transparent; border: 0; box-shadow: none; padding: 0; }
.login-branch-picker { border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); box-shadow: none; }
.login-branch-heading strong { color: var(--ink); }
.login-branch-heading small { color: var(--muted); }
.login-branch-icon { background: var(--blue-50); color: var(--blue-600); box-shadow: none; }
.login-branch-select-wrap select, .auth-input-wrap input { background: var(--surface-soft); border-color: var(--line); border-radius: 8px; color: var(--ink); }
.auth-input-icon, .auth-password-toggle { color: var(--muted); }
.login-visual { position: relative; background: var(--hero); }
.login-visual::before { content: ""; position: absolute; inset: 0; opacity: .5; background: url('../images/dashboard-waves.svg') center / cover; }
.login-visual-content { position: relative; z-index: 1; }
.login-visual-content h2, .login-visual-content p { color: #fff; }

@media (min-width: 1536px) {
  .dashboard-metrics-primary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metric-summary { padding: 12px; gap: 12px; }
  .metric-total { min-width: 95px; }
  .dashboard-page .metric-foot { font-size: 10px; }
}
@media (max-width: 1199px) {
  .topbar-branch-label { max-width: 160px; font-size: 10px; }
  .top-search { width: 180px; }
  .topbar { padding-inline: 20px; gap: 6px; }
  .page { padding-inline: 24px; }
  .dashboard-primary-grid { grid-template-columns: minmax(0, 1.7fr) minmax(220px, 1fr); }
  .dashboard-action-list { grid-template-columns: 1fr; gap: 0; }
  .dashboard-action-row + .dashboard-action-row { border-top: 1px solid var(--line); }
  .dashboard-metrics-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-donut-content { grid-template-columns: 1fr; gap: 16px; }
  .dashboard-page .page-header-copy { width: 70%; }
  .dashboard-page .page-header .page-title { font-size: 27px; }
  .dashboard-welcome-art { left: auto; right: 5%; width: 160px; height: 160px; }
  .dashboard-page .metric-card { padding: 20px; }
  .metric-total { min-width: 100px; }
  .metric-summary { gap: 14px; padding: 14px; }
}
@media (max-width: 900px) {
  .sidebar, .sidebar.collapsed { width: 280px; }
  .main-shell, .main-shell.collapsed { margin-left: 0; }
  .sidebar.collapsed .brand-copy, .sidebar.collapsed .nav-label, .sidebar.collapsed .nav-link span, .sidebar.collapsed .sidebar-user-copy { display: block; }
  .sidebar.collapsed .nav-link { justify-content: flex-start; padding: 12px 20px; }
  .sidebar.collapsed .brand { padding-inline: 24px; justify-content: flex-start; }
  .sidebar.collapsed .sidebar-footer { padding: 0 15px 15px; }
  .sidebar.collapsed .sidebar-user { padding: 18px; }
  .topbar { padding-inline: 20px; }
  .topbar-branch-label { max-width: 230px; }
  .dashboard-page .page-header { padding: 30px; }
  .dashboard-page .page-header-copy { width: 65%; }
  .dashboard-page .page-header .page-title { font-size: 26px; }
  .dashboard-primary-grid { grid-template-columns: minmax(0, 1.7fr) minmax(220px, 1fr); }
}
@media (max-width: 680px) {
  .topbar { height: 64px; min-height: 64px; padding-inline: 12px; gap: 4px; }
  .topbar-branch-label { display: none; }
  .top-spacer { display: none; }
  .top-search { display: block; flex: 1; width: auto; min-width: 70px; }
  .top-search input { height: 38px; font-size: 11px; padding-right: 5px; padding-left: 29px; }
  .top-search > svg { left: 9px; width: 14px; }
  .topbar .icon-button { width: 32px; height: 36px; }
  .topbar .icon-button .lucide { width: 18px; height: 18px; }
  .top-profile { gap: 2px; }
  .top-profile .avatar { width: 30px; height: 30px; font-size: 10px; }
  .page { padding: 16px 16px 30px; }
  .dashboard-page { gap: 16px; }
  .dashboard-page > .page-header { min-height: 260px; padding: 24px; align-items: center; }
  .dashboard-page .page-header-copy { width: 100%; padding-right: 15px; }
  .dashboard-page .page-header .page-title { max-width: 245px; font-size: 25px; }
  .dashboard-page .page-header .page-description { max-width: 225px; font-size: 12px; margin-top: 15px; }
  .dashboard-welcome-art { width: 110px; height: 110px; right: -14px; top: 50%; opacity: .6; z-index: 0; }
  .dashboard-page .page-header .header-actions { width: auto; flex-direction: row; flex-wrap: wrap; }
  .dashboard-page .page-header .button { width: auto; flex: 0 0 auto; min-height: 36px; padding: 7px 14px; font-size: 12px; }
  .dashboard-metrics-primary, .dashboard-metrics-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .dashboard-page .metric-card { min-height: 160px; padding: 14px; }
  .dashboard-page .metric-top { gap: 8px; flex-wrap: wrap; }
  .dashboard-page .metric-label { font-size: 11px; }
  .dashboard-page .metric-icon { width: 28px; height: 28px; border-radius: 8px; }
  .dashboard-page .metric-icon svg { width: 18px; height: 18px; }
  .metric-detail-link { display: none; }
  .metric-summary { flex-direction: column-reverse; gap: 8px; padding: 10px; }
  .metric-total { width: 100%; min-width: 0; }
  .metric-mini-chart { width: 100%; }
  .metric-mini-chart svg { height: 24px; }
  .dashboard-page .metric-foot { font-size: 10px; }
  .dashboard-page .metric-value { font-size: 22px; }
  .dashboard-primary-grid, .dashboard-secondary-grid, .dashboard-gender-grid { grid-template-columns: 1fr; gap: 16px; }
  .dashboard-panel, .dashboard-panel:not(.dashboard-chart-panel) { padding: 20px; }
  .dashboard-section-header { gap: 12px; margin-bottom: 16px; }
  .dashboard-section-header h2, .dashboard-panel:not(.dashboard-chart-panel) .dashboard-section-header h2 { font-size: 15px; }
  .dashboard-chart-panel .dashboard-section-header { flex-direction: column; align-items: flex-start; }
  .dashboard-chart-canvas, .dashboard-chart-empty { height: 240px; }
  .dashboard-donut-content { grid-template-columns: minmax(100px, 140px) minmax(0, 1fr); gap: 16px; }
  .dashboard-donut-legend li { grid-template-columns: 8px minmax(0, 1fr) auto; gap: 6px; font-size: 11px; }
  .dashboard-donut-legend small { grid-column: 2 / -1; text-align: left; }
  .dashboard-table-wrap { margin: 0 -20px -20px; }
  .login-panel { padding: 20px; }
  .login-card { padding: 28px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* ── İletişim Sayfası & Uiverse serious-mouse-33 Kart Tasarımı (CSP Uyumlu) ── */
.contact-page-wrap {
  max-width: 820px;
  margin: 0 auto;
}
.contact-channels-card {
  margin-bottom: 24px;
}
.contact-channels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.contact-channel-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
a.contact-channel-item:hover {
  border-color: var(--blue-600);
  background: var(--surface);
  transform: translateY(-2px);
}
.contact-channel-item.static {
  cursor: default;
}
.contact-channel-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex: 0 0 44px;
}
.contact-channel-icon.email {
  background: color-mix(in srgb, var(--blue-600) 14%, var(--surface));
  color: var(--blue-600);
}
.contact-channel-icon.whatsapp {
  background: color-mix(in srgb, var(--success) 14%, var(--surface));
  color: var(--success);
}
.contact-channel-icon.hours {
  background: color-mix(in srgb, var(--warning) 14%, var(--surface));
  color: var(--warning);
}
.contact-channel-copy {
  min-width: 0;
}
.contact-channel-copy strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.contact-channel-copy span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-form-card {
  padding: 28px;
}
.input-disabled {
  opacity: 0.8;
  cursor: not-allowed;
  background: var(--surface-soft);
}
.required-star {
  color: var(--danger);
  font-weight: 700;
}
.upload-field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}
.label-hint {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted);
}

/* ── Uiverse serious-mouse-33 Kartı ── */
.u-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 6px 0 12px;
}
.u-container {
  background: var(--surface);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  width: min(100%, 340px);
  margin: 0 auto;
}
[data-theme="dark"] .u-container {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.u-container.drag-over {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px var(--focus-ring);
  transform: scale(1.02);
}
.u-inner {
  width: 100%;
  background: var(--surface-soft);
  border: 2px dashed var(--line);
  border-radius: 18px;
  padding: 24px 14px;
  text-align: center;
  box-sizing: border-box;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.u-inner:hover {
  border-color: var(--blue-600);
  background: color-mix(in srgb, var(--blue-600) 6%, var(--surface-soft));
}
.u-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--blue-600);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}
.u-inner:hover .u-icon {
  transform: translateY(-2px);
}
.u-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.u-text {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 22px;
}
.u-text strong {
  color: var(--ink);
}
.u-sub {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--muted);
}
.u-button {
  width: 100%;
  height: 46px;
  background: var(--blue-600);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.u-button:hover {
  background: var(--blue-700);
}
.u-button:active {
  transform: scale(0.97);
  opacity: 0.9;
}
.u-input {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  position: absolute !important;
}

/* Önizleme Galerisi */
.cu-preview-box {
  width: min(100%, 540px);
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}
.cu-preview-box[hidden] {
  display: none !important;
}
.cu-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}
.cu-clear-all {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.cu-clear-all:hover {
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
}
.cu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.cu-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.cu-thumb-wrap {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #0000000d;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cu-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cu-info {
  padding: 6px 8px;
}
.cu-name {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cu-size {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.cu-remove-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}
.cu-remove-btn:hover {
  background: var(--danger);
  transform: scale(1.1);
}

/* Form Butonları */
.contact-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.contact-submit-button {
  min-width: 220px;
  min-height: 44px;
  padding: 0 24px;
  font-size: 14.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-radius: 8px;
}

@media (max-width: 680px) {
  .contact-channels {
    grid-template-columns: 1fr;
  }
  .contact-actions {
    flex-direction: column-reverse;
  }
  .contact-actions button {
    width: 100%;
  }
}

/* ── Modül 2 & 3: ISBN Lookup ve Rezervasyon Stilleri ── */
.isbn-lookup-group {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}
.isbn-lookup-group input {
  flex: 1;
}
.isbn-lookup-btn {
  flex: none;
  white-space: nowrap;
  gap: 6px;
  padding: 0 16px;
}
.text-success { color: var(--success) !important; font-weight: 600; }
.text-danger  { color: var(--danger) !important; font-weight: 600; }
.text-warning { color: var(--warning) !important; font-weight: 600; }
.text-muted   { color: var(--muted) !important; }

.badge.muted {
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.badge.info {
  color: var(--blue-700);
  background: var(--blue-100);
}
.badge.small {
  min-height: 20px;
  padding: 0 6px;
  font-size: 9.5px;
}
.table-title-link {
  color: var(--ink);
  text-decoration: none;
}
.table-title-link:hover {
  color: var(--blue-600);
  text-decoration: underline;
}
.text-link {
  color: var(--blue-600);
  text-decoration: underline;
}
.text-link:hover {
  color: var(--navy-950);
}

/* ── Katalog Arama Modalı ── */
.catalog-search-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(11, 17, 34, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
}

.catalog-search-modal {
  width: min(100%, 640px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow), 0 20px 50px rgba(0, 0, 0, 0.25);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 40px);
}

.catalog-search-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.catalog-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.catalog-search-input-wrap svg {
  position: absolute;
  left: 12px;
  color: var(--muted);
  pointer-events: none;
}

.catalog-search-input-wrap input {
  flex: 1;
  padding-left: 38px;
  height: 42px;
}

.catalog-search-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}

.catalog-result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.15s, transform 0.15s;
}

.catalog-result-card:hover {
  border-color: var(--blue-600);
  transform: translateY(-1px);
}

.catalog-result-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.catalog-result-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.catalog-result-meta {
  font-size: 12px;
  color: var(--muted);
}

.catalog-result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.catalog-search-tip,
.catalog-search-empty {
  text-align: center;
  padding: 30px 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.catalog-search-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 36px 16px;
  color: var(--blue-600);
  font-size: 13px;
  font-weight: 600;
}

.catalog-inline-trigger {
  background: none;
  border: none;
  padding: 0;
  margin-left: 6px;
  color: var(--blue-600);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  font-size: inherit;
  font-weight: 700;
}

.catalog-inline-trigger:hover {
  color: var(--navy-950);
}

/* ==========================================================================
   Excel Sütun Eşleştirme Sihirbazı (Column Mapping Wizard) & Şablon
   ========================================================================== */

.progress-steps.four-steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.import-template-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0;
  padding: 14px 18px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.import-template-copy strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
}

.import-template-copy span {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted);
}

.notice-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.mapping-wizard-form {
  margin-top: 14px;
}

/* Info Banner */
.mapping-info-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 16px;
}

.mapping-info-banner svg {
  width: 20px;
  height: 20px;
  color: var(--blue-600);
  flex-shrink: 0;
}

.mapping-info-text {
  font-size: 12.5px;
  color: var(--ink);
  line-height: 1.45;
}

/* Excel Raw Table Preview Card */
.excel-preview-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.excel-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.excel-preview-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.excel-icon-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
}

.excel-icon-pill svg {
  width: 16px;
  height: 16px;
  color: var(--blue-600);
}

.excel-toolbar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.excel-toolbar-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.mapping-header-select-inline {
  height: 32px;
  padding: 2px 10px;
  font-size: 12px;
  border-radius: 8px;
  max-width: 280px;
}

.excel-raw-table-wrap {
  overflow-x: auto;
  max-height: 240px;
  overflow-y: auto;
  scrollbar-width: thin;
  transition: all 0.2s ease;
}

.excel-raw-table-wrap.is-collapsed,
.excel-preview-footer.is-collapsed {
  display: none !important;
}

.excel-raw-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.excel-corner-cell {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 3;
  background: var(--surface-soft);
  border-right: 1px solid var(--line);
  border-bottom: 2px solid var(--line);
  width: 45px;
  min-width: 45px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

.excel-col-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-soft);
  border-right: 1px solid var(--line);
  border-bottom: 2px solid var(--line);
  padding: 6px 10px;
  text-align: left;
  min-width: 130px;
  max-width: 200px;
}

.excel-col-letter {
  font-family: var(--font-mono, monospace);
  font-weight: 800;
  font-size: 10.5px;
  color: var(--blue-600);
  margin-bottom: 1px;
}

.excel-col-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.excel-row-num {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface-soft);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  padding: 6px 4px;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  user-select: none;
  width: 45px;
  min-width: 45px;
}

.excel-header-indicator {
  display: block;
  font-size: 8px;
  font-weight: 800;
  color: #fff;
  background: var(--blue-600);
  border-radius: 4px;
  padding: 1px 3px;
  margin-top: 1px;
  letter-spacing: 0.04em;
}

.excel-header-indicator.is-hidden {
  display: none;
}

.excel-raw-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.excel-raw-row:hover:not(.is-header-row) {
  background: rgba(0, 0, 0, 0.025);
}

.excel-raw-row.is-header-row {
  background: rgba(59, 130, 246, 0.12);
  font-weight: 600;
}

.excel-raw-row.is-header-row .excel-row-num {
  background: rgba(59, 130, 246, 0.22);
  color: var(--blue-700);
}

.excel-raw-cell {
  padding: 6px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.excel-raw-cell.is-header-cell {
  font-weight: 700;
  color: var(--blue-700);
}

.excel-preview-footer {
  padding: 8px 16px;
  background: var(--surface-soft);
  border-top: 1px solid var(--line);
}

.excel-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 11px;
  color: var(--muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-box {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid var(--line);
  display: inline-block;
}

.legend-box.is-header {
  background: rgba(59, 130, 246, 0.25);
  border-color: var(--blue-500);
}

.legend-box.is-data {
  background: var(--surface);
}

/* Live Mapping Summary Bar */
.mapping-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.mapping-summary-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.mapping-summary-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Grouped Field Cards */
.mapping-group-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.mapping-group-header {
  padding: 12px 18px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.mapping-group-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mapping-group-title-wrap svg {
  width: 20px;
  height: 20px;
  color: var(--blue-600);
}

.mapping-group-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.mapping-group-subtitle {
  margin: 1px 0 0 0;
  font-size: 11px;
  color: var(--muted);
}

/* 2-Column Responsive Card Grid */
.mapping-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 14px;
  padding: 16px;
}

.mapping-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.mapping-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
}

.mapping-card.is-mapped {
  background: rgba(59, 130, 246, 0.02);
  border-color: rgba(59, 130, 246, 0.3);
}

.mapping-card.shake-highlight {
  animation: mappingShake 0.6s ease-in-out;
  border: 2px solid var(--red-500, #ef4444);
}

@keyframes mappingShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.mapping-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mapping-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.mapping-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mapping-card-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.mapping-card-ex {
  color: var(--blue-700);
}

.mapping-card-ex em {
  font-style: normal;
  font-weight: 600;
}

.mapping-card-select-wrap {
  margin-top: 4px;
}

.mapping-status-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 6px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.mapping-status-pill.is-matched {
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
}

.mapping-status-pill.is-empty {
  background: var(--surface-soft);
  color: var(--muted);
}

.mapping-select {
  width: 100%;
}

.mapping-card-samples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  min-height: 22px;
  margin-top: 2px;
}

.mapping-chip {
  color: var(--blue-700);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  padding: 1px 7px;
  border-radius: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.mapping-actions {
  margin-top: 18px;
}

.mapping-hidden-form {
  display: none;
}

@media (max-width: 768px) {
  .progress-steps.four-steps {
    grid-template-columns: 1fr;
  }

  .import-template-box {
    flex-direction: column;
    align-items: flex-start;
  }

  .mapping-cards-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .mapping-summary-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .mapping-summary-actions {
    justify-content: flex-end;
  }

  .excel-toolbar-controls {
    width: 100%;
    justify-content: space-between;
  }

  .mapping-header-select-inline {
    max-width: 100%;
    flex: 1;
  }

  .notice-actions {
    margin-left: 0;
    margin-top: 10px;
    width: 100%;
  }
}

input[readonly], input[aria-readonly="true"] {
  background: var(--surface-soft, #f8f6f0);
  color: var(--muted, #736b5e);
  cursor: default;
  border-color: var(--line, #e2ded4);
}

/* ─── Genel Açılır Menü (Dropdown) Bileşeni ─── */
details.dropdown {
  position: relative;
  display: inline-block;
}
details.dropdown > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
details.dropdown > summary::-webkit-details-marker {
  display: none;
}
details.dropdown .dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 100;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: dropdownFadeIn 0.14s ease-out;
}
@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
details.dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 550;
  color: var(--ink);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s;
}
details.dropdown .dropdown-item:hover {
  background: var(--surface-soft);
  color: var(--blue-600);
}
details.dropdown .dropdown-item svg {
  color: var(--muted);
  transition: color 0.15s;
}
details.dropdown .dropdown-item:hover svg {
  color: var(--blue-600);
}
details.dropdown .dropdown-divider {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}

/* ─── Modern Sürükle-Bırak Dosya Yükleme Alanı ─── */
.file-dropzone-modern {
  border: 2px dashed var(--line);
  background: var(--surface-soft);
  border-radius: 14px;
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.file-dropzone-modern:hover,
.file-dropzone-modern.drag-over {
  border-color: var(--blue-600);
  background: color-mix(in srgb, var(--blue-600) 6%, var(--surface));
  transform: scale(1.005);
}
.file-dropzone-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--blue-600) 12%, var(--surface));
  color: var(--blue-600);
  display: grid;
  place-items: center;
  margin-bottom: 2px;
}
.file-dropzone-icon svg {
  width: 26px;
  height: 26px;
}
.file-dropzone-title {
  font-size: 15px;
  font-weight: 650;
  color: var(--ink);
}
.file-dropzone-sub {
  font-size: 12.5px;
  color: var(--muted);
  max-width: 420px;
  line-height: 1.5;
}
.file-dropzone-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
}
.file-dropzone-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
}
.file-dropzone-selected {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

@media (max-width: 380px) {
  .topbar { height: auto; flex-wrap: wrap; padding-block: 8px; }
  .topbar .top-search { order: 2; flex-basis: 100%; }
}

/* Turnike settings: each connection owns its configuration and actions. */
.gate-workspace { display: grid; gap: 28px; }
.gate-workspace *, .gate-workspace *::before, .gate-workspace *::after { box-sizing: border-box; }
.gate-workspace h2, .gate-workspace h3, .gate-workspace p { margin: 0; }
.gate-workspace h2 { color: var(--ink); font-size: 18px; line-height: 1.4; }
.gate-workspace h3 { color: var(--ink); font-size: 15px; line-height: 1.5; }
.gate-workspace .button { min-height: 40px; white-space: normal; }
.gate-overview { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.gate-overview-item { display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 22px; }
.gate-overview-item + .gate-overview-item { border-left: 1px solid var(--line); }
.gate-overview-item > div { display: grid; gap: 6px; min-width: 0; }
.gate-overview-item > div > span { color: var(--muted); font-size: 12px; font-weight: 600; }
.gate-overview-item strong { color: var(--ink); font-size: 28px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.gate-overview-method strong { padding: 3px 0; font-size: 18px; }
.gate-overview-item small { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.gate-stat-icon, .gate-method-icon { flex: 0 0 auto; display: grid; place-items: center; background: var(--blue-100); color: var(--blue-600); border-radius: 11px; width: 38px; height: 38px; }
.gate-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; align-items: start; gap: 24px; }
.gate-methods { min-width: 0; display: grid; gap: 12px; }
.gate-section-heading { display: grid; gap: 7px; }
.gate-section-heading > p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.gate-methods-heading { margin-bottom: 8px; }
.gate-eyebrow { color: var(--blue-600); font-size: 10px; font-weight: 750; letter-spacing: 1.3px; }
.gate-method { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0; }
.gate-method[open] { border-color: var(--blue-600); }
.gate-method-summary { display: flex; gap: 14px; padding: 20px; align-items: center; cursor: pointer; list-style: none; border-radius: 14px; }
.gate-method-summary::-webkit-details-marker, .gate-tool > summary::-webkit-details-marker { display: none; }
.gate-method-summary::marker, .gate-tool > summary::marker { content: ''; }
.gate-method-summary:hover { background: var(--surface-soft); }
.gate-method[open] > .gate-method-summary { background: var(--surface-soft); border-radius: 14px 14px 0 0; border-bottom: 1px solid var(--line); }
.gate-method[open] > .gate-method-summary .gate-method-icon { color: #fff; background: var(--blue-600); }
.gate-method-title { min-width: 0; flex: 1; display: grid; gap: 5px; }
.gate-method-title > strong { font-size: 14px; line-height: 1.4; color: var(--ink); }
.gate-method-title > span { font-size: 12px; color: var(--muted); line-height: 1.6; }
.gate-method-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 120px; }
.gate-method-badges:empty { display: none; }
.gate-pill { border-radius: 20px; padding: 4px 9px; color: var(--muted); background: var(--surface-soft); border: 1px solid var(--line); font-size: 10px; font-weight: 650; white-space: nowrap; }
.gate-pill-saved { background: var(--blue-100); color: var(--blue-700); border-color: transparent; }
.gate-chevron { width: 16px; height: 16px; color: var(--muted); flex: 0 0 auto; transition: transform .18s ease; }
.gate-method[open] > summary > .gate-chevron, .gate-tool[open] > summary > .gate-chevron { transform: rotate(180deg); }
.gate-method-content { padding: 24px; min-width: 0; display: grid; gap: 20px; }
.gate-method-content > .button { justify-self: start; }
.gate-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 0; margin: 0; list-style: none; counter-reset: gate-step; }
.gate-steps li { position: relative; padding: 0 0 0 27px; counter-increment: gate-step; }
.gate-steps li::before { content: counter(gate-step); position: absolute; left: 0; top: 0; width: 20px; height: 20px; display: grid; place-items: center; color: var(--blue-600); background: var(--blue-100); border-radius: 50%; font-size: 10px; font-weight: 750; }
.gate-steps strong { display: block; color: var(--ink); font-size: 12px; line-height: 1.7; margin-bottom: 4px; }
.gate-steps span { display: block; font-size: 11px; line-height: 1.65; color: var(--muted); }
.gate-connection-fields { display: grid; gap: 16px; min-width: 0; }
.gate-field { display: grid; align-content: start; gap: 7px; min-width: 0; }
.gate-field > label, .gate-field-label { color: var(--ink); font-size: 12px; font-weight: 650; line-height: 1.6; }
.gate-field > label > span { color: var(--muted); font-weight: 400; }
.gate-field input, .gate-field select { width: 100%; min-width: 0; min-height: 42px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; padding: 10px 12px; }
.gate-field input[readonly] { background: var(--surface-soft); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.gate-field small, .gate-field p, .gate-workspace .gate-help { font-size: 12px; color: var(--muted); line-height: 1.7; }
.gate-copy-field { display: flex; gap: 7px; min-width: 0; }
.gate-copy-field input { flex: 1; }
.gate-copy-field .button { flex-shrink: 0; padding: 9px 11px; font-size: 11px; }
.gate-copy-field .button svg { width: 15px; height: 15px; }
.gate-workspace .gate-feedback { color: var(--blue-600); font-size: 12px; }
.gate-feedback:empty { display: none; }
.gate-settings-form { display: grid; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.gate-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.gate-save-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 4px; }
.gate-save-row > p { font-size: 11px; line-height: 1.65; color: var(--muted); max-width: 280px; }
.gate-save-row .button { flex-shrink: 0; font-size: 12px; }
.gate-tools { display: grid; border-top: 1px solid var(--line); }
.gate-tool { min-width: 0; border-bottom: 1px solid var(--line); }
.gate-tool:last-child { border-bottom: 0; }
.gate-tool > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 15px 0; cursor: pointer; color: var(--ink); font-size: 12px; font-weight: 600; }
.gate-tool > summary > svg:first-child { color: var(--muted); width: 16px; height: 16px; }
.gate-tool > summary > span { flex: 1; }
.gate-tool-content { display: grid; gap: 14px; padding: 0 0 18px; min-width: 0; }
.gate-tool-content > p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.gate-tool-content form { display: grid; gap: 16px; }
.gate-tool-content form > .button { justify-self: start; font-size: 12px; }
.gate-code { padding: 16px; margin: 0; overflow-x: auto; max-width: 100%; background: var(--surface-soft); color: var(--ink); border: 1px solid var(--line); border-radius: 9px; font-size: 11px; line-height: 1.8; }
.gate-notice { display: grid; gap: 5px; padding: 14px 16px; background: var(--blue-100); color: var(--ink); border-radius: 9px; border-left: 3px solid var(--blue-600); font-size: 12px; line-height: 1.7; }
.gate-notice-warning { background: var(--surface-soft); border-left-color: var(--warning); }
.gate-tool-content > .gate-notice { color: var(--ink); }
.gate-checklist { display: grid; gap: 12px; margin: 0; padding-left: 22px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.gate-test-result { display: grid; gap: 5px; padding: 14px; border: 1px solid var(--line); border-left: 3px solid var(--blue-600); border-radius: 8px; background: var(--surface-soft); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.gate-test-result.is-success { border-left-color: var(--success); }
.gate-test-result.is-denied { border-left-color: var(--warning); }
.gate-sidebar { display: grid; gap: 18px; min-width: 0; }
.gate-side-card { padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0; }
.gate-side-card h2 { font-size: 15px; margin-top: 8px; }
.gate-guide { margin: 22px 0; padding: 0; display: grid; gap: 20px; list-style: none; }
.gate-guide > li { display: flex; gap: 11px; align-items: flex-start; }
.gate-guide > li > span { display: grid; place-items: center; width: 25px; height: 25px; flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface-soft); border-radius: 8px; color: var(--blue-600); font-size: 11px; font-weight: 700; }
.gate-guide strong { font-size: 12px; color: var(--ink); }
.gate-guide p { font-size: 12px; color: var(--muted); line-height: 1.7; margin-top: 4px; }
.gate-side-note { display: flex; align-items: flex-start; gap: 8px; border-top: 1px solid var(--line); padding-top: 16px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.gate-side-note svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; }
.gate-side-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.gate-side-title h2 { margin: 0; }
.gate-side-title svg { width: 17px; height: 17px; color: var(--muted); }
.gate-event-list { list-style: none; padding: 0; margin: 16px 0 0; }
.gate-event-list:empty { display: none; }
.gate-event-list li { display: flex; align-items: center; gap: 9px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.gate-event-list li:last-child { border-bottom: 0; }
.gate-event-mark { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 auto; color: var(--muted); background: var(--surface-soft); border-radius: 8px; }
.gate-event-mark.is-entry { color: var(--blue-600); background: var(--blue-100); }
.gate-event-mark svg { width: 14px; height: 14px; }
.gate-event-list li > div { display: grid; gap: 3px; flex: 1; min-width: 0; }
.gate-event-list strong { color: var(--ink); font-size: 11px; overflow-wrap: anywhere; }
.gate-event-list small { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.gate-event-direction { color: var(--muted); font-size: 10px; }
.gate-empty { display: grid; justify-items: center; text-align: center; gap: 9px; padding: 27px 0; }
.gate-empty svg { width: 26px; height: 26px; margin-bottom: 3px; color: var(--blue-600); }
.gate-empty strong { color: var(--ink); font-size: 12px; }
.gate-empty p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.gate-history-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 16px; margin-top: 6px; border-top: 1px solid var(--line); color: var(--blue-600); font-size: 12px; font-weight: 600; }
.gate-history-link svg { width: 15px; height: 15px; }
@media (max-width: 1250px) {
  .gate-layout { grid-template-columns: minmax(0, 1fr); }
  .gate-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gate-overview-item { padding: 18px 14px; gap: 9px; }
  .gate-overview-item .gate-stat-icon { display: none; }
}
@media (max-width: 680px) {
  .gate-workspace { gap: 22px; }
  .gate-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gate-overview-item:nth-child(3) { border-left: 0; }
  .gate-overview-item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .gate-overview-method strong { font-size: 15px; }
  .gate-overview-item strong { min-height: 30px; }
  .gate-overview-item { padding: 17px 14px; }
  .gate-method-summary { display: grid; grid-template-columns: 34px minmax(0, 1fr) 16px; gap: 8px 11px; padding: 16px; }
  .gate-method-icon { width: 34px; height: 34px; align-self: start; }
  .gate-method-title > strong { font-size: 13px; }
  .gate-method-title > span { font-size: 11px; }
  .gate-method-badges { grid-column: 2; grid-row: 2; max-width: none; justify-content: flex-start; }
  .gate-method-summary > .gate-chevron { grid-column: 3; grid-row: 1; }
  .gate-method-content { padding: 18px 16px; gap: 18px; }
  .gate-form-grid, .gate-sidebar, .gate-steps { grid-template-columns: minmax(0, 1fr); }
  .gate-save-row { align-items: stretch; flex-direction: column; gap: 12px; }
  .gate-save-row > p { max-width: none; }
  .gate-copy-field { flex-wrap: wrap; }
  .gate-copy-field input { flex-basis: 100%; }
  .gate-copy-field .button { flex: 1; }
  .gate-side-card { padding: 20px; }
  .gate-field input, .gate-field select { font-size: 16px; }
  .gate-field input[readonly] { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .gate-chevron { transition: none; } }

/* Çoklu Dil (i18n) Butonu — Diğer Üst Çubuk İkonlarıyla Birebir Uyumlu */
.topbar .icon-button.lang-switch-button,
.lang-switch-button {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  width: 40px !important;
  height: 40px !important;
  color: var(--muted) !important;
  border: 0 !important;
  outline: none !important;
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  text-decoration: none !important;
  line-height: 1 !important;
}
.topbar .icon-button.lang-switch-button:hover,
.lang-switch-button:hover {
  transform: none !important;
  color: var(--blue-600) !important;
  background: var(--surface) !important;
  border: 0 !important;
}
.topbar .icon-button.lang-switch-button:focus,
.topbar .icon-button.lang-switch-button:active {
  outline: none !important;
  border: 0 !important;
  box-shadow: none !important;
}
.lang-switch-button .lucide,
.lang-switch-button svg {
  width: 21px !important;
  height: 21px !important;
  stroke-width: 1.7 !important;
  color: inherit !important;
}
.lang-switch-badge {
  position: absolute !important;
  bottom: 2px !important;
  right: 1px !important;
  font-size: 7.5px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  padding: 1px 3px !important;
  border-radius: 4px !important;
  background: var(--blue-600) !important;
  color: #ffffff !important;
  letter-spacing: 0.4px !important;
  font-family: var(--font-mono, monospace) !important;
  pointer-events: none !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18) !important;
}
:root[data-theme="dark"] .lang-switch-badge {
  background: var(--blue-500) !important;
  color: #ffffff !important;
}
@media (max-width: 768px) {
  .topbar .icon-button.lang-switch-button,
  .lang-switch-button {
    width: 32px !important;
    height: 36px !important;
  }
  .lang-switch-badge {
    bottom: 1px !important;
    right: 0px !important;
    font-size: 7px !important;
    padding: 1px 2px !important;
  }
}

/* ── Responsive Sayfa Başlığı & Aksiyon Butonları ── */
@media (max-width: 768px) {
  .page-header:not(.dashboard-page > .page-header) {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .page-header:not(.dashboard-page > .page-header) .header-actions {
    width: 100%;
  }
}
@media (max-width: 680px) {
  .header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .header-actions > .button,
  .header-actions > a.button {
    flex: 1 1 calc(50% - 4px);
    justify-content: center;
    font-size: 12px;
    padding: 0 10px;
    min-height: 38px;
    white-space: nowrap;
  }
  .header-actions > .inline-form {
    flex: 1 1 calc(50% - 4px);
    display: flex;
  }
  .header-actions > .inline-form > .button {
    width: 100%;
    justify-content: center;
    font-size: 12px;
    padding: 0 10px;
    min-height: 38px;
    white-space: nowrap;
  }
}
@media (max-width: 420px) {
  .header-actions > .button,
  .header-actions > a.button,
  .header-actions > .inline-form,
  .header-actions > .inline-form > .button {
    flex: 1 1 100%;
  }
}

/* ── Mobil Üst Çubuk (Topbar) İyileştirmeleri ── */
@media (max-width: 520px) {
  .topbar a[href$="iletisim"],
  .topbar a[href$="ayarlar"] {
    display: none !important;
  }
}

/* ── ISBN Arama ve Z39.50 Mobil Uyumu ── */
@media (max-width: 680px) {
  .isbn-lookup-group {
    flex-wrap: wrap;
    gap: 8px;
  }
  .isbn-lookup-group input {
    flex: 1 1 100%;
    width: 100%;
  }
  .isbn-lookup-group .isbn-lookup-btn {
    flex: 1 1 calc(50% - 4px);
    justify-content: center;
    font-size: 12px;
    padding: 0 10px;
    min-height: 38px;
  }
}
@media (max-width: 420px) {
  .isbn-lookup-group .isbn-lookup-btn {
    flex: 1 1 100%;
  }
}

/* ── Katalog Kaynak Sekmeleri (Z39.50 / SRU) ── */
.catalog-source-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.catalog-source-tabs::-webkit-scrollbar {
  display: none;
}
.catalog-source-tab {
  white-space: nowrap;
  flex: none;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.catalog-source-tab:hover {
  border-color: var(--blue-600);
  color: var(--blue-600);
}
.catalog-source-tab.active {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(39, 116, 196, 0.35);
}

.catalog-result-cover {
  width: 44px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.catalog-result-action {
  flex-shrink: 0;
  white-space: nowrap;
}
@media (max-width: 580px) {
  .catalog-search-modal {
    padding: 16px;
    max-height: calc(100vh - 20px);
    width: 100%;
    border-radius: 14px;
  }
  .catalog-result-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .catalog-result-action {
    width: 100%;
    justify-content: center;
  }
  .catalog-search-input-wrap {
    flex-direction: column;
    align-items: stretch;
  }
  .catalog-search-input-wrap button {
    width: 100%;
    height: 38px;
  }
}

/* ── Dijital Kütüphane & E-Kitap Yükleme Bölümü (BookForm) ── */
.digital-upload-box {
  margin-top: 10px;
  padding: 12px 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.digital-upload-header {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue-600);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.digital-upload-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  word-break: break-all;
}
.digital-upload-name svg {
  flex-shrink: 0;
}
.digital-upload-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.digital-remove-label {
  font-weight: normal;
  font-size: 0.84rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--danger);
  user-select: none;
}
@media (max-width: 480px) {
  .digital-upload-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .digital-upload-actions .button {
    width: 100%;
    justify-content: center;
  }
}

/* ── Dijital Eser Tanıtım Banner'ı (BookDetail) ── */
.digital-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(39, 116, 196, 0.08), rgba(22, 132, 91, 0.08));
  border: 1px solid rgba(39, 116, 196, 0.25);
  border-radius: 14px;
}
.digital-banner-body {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.digital-banner-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--blue-100);
  color: var(--blue-700);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.digital-banner-icon svg {
  width: 20px;
  height: 20px;
}
.digital-banner-text strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 2px;
}
.digital-banner-text p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}
@media (max-width: 680px) {
  .digital-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px 16px;
  }
  .digital-banner-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Dijital Okuyucu (DigitalReader) Mobil Kuralları ── */
@media (max-width: 640px) {
  .reader-toolbar {
    height: 48px !important;
    padding: 0 8px !important;
  }
  .reader-toolbar-left, .reader-toolbar-right {
    gap: 6px !important;
  }
  .reader-book-info {
    max-width: 140px !important;
  }
  .reader-book-author {
    display: none !important;
  }
  .reader-book-title {
    font-size: 0.85rem !important;
  }
  .reader-badge-security {
    display: none !important;
  }
  .reader-btn span {
    display: none !important;
  }
  .reader-btn {
    padding: 6px 8px !important;
  }
  .reader-viewport {
    height: calc(100vh - 48px) !important;
  }
  .watermark-layer {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    grid-auto-rows: 180px !important;
  }
  .watermark-item {
    font-size: 11px !important;
  }
}


/* ── Onay kutuları (sistem geneli) ─────────────────────────────────────────── */
input[type="checkbox"]:not([data-native]) {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1.5px solid color-mix(in srgb, var(--muted) 45%, var(--line));
  border-radius: 6px;
  background-color: var(--surface);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
  cursor: pointer;
  vertical-align: middle;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
input[type="checkbox"]:not([data-native]):hover:not(:disabled) { border-color: var(--blue-600); }
input[type="checkbox"]:not([data-native]):checked { border-color: var(--blue-600); background-color: var(--blue-600); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5.5 12.5 4.2 4.2 8.8-9.4'/%3E%3C/svg%3E"); }
input[type="checkbox"]:not([data-native]):indeterminate { border-color: var(--blue-600); background-color: var(--blue-600); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.6' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E"); }
input[type="checkbox"]:not([data-native]):focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
input[type="checkbox"]:not([data-native]):disabled { opacity: .5; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { input[type="checkbox"]:not([data-native]) { transition: none; } }

/* ── Yetki matrisi (Kullanıcı Yetkilerini Düzenle) ─────────────────────────── */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.perm-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.perm-group-title { flex: 1; min-width: 0; margin: 0; color: var(--ink); font-size: 15px; font-weight: 700; }
.perm-count { font-variant-numeric: tabular-nums; }
.perm-list { display: grid; gap: 8px; }
.perm-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.perm-item:hover { border-color: color-mix(in srgb, var(--blue-600) 40%, var(--line)); background: var(--surface-soft); }
.perm-item:has(input:checked) { border-color: color-mix(in srgb, var(--blue-600) 45%, var(--line)); background: color-mix(in srgb, var(--blue-600) 7%, var(--surface)); }
.perm-item input { margin-top: 1px; }
.perm-copy { display: grid; gap: 2px; min-width: 0; }
.perm-copy strong { color: var(--ink); font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.perm-copy code { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.perm-savebar { position: sticky; bottom: 20px; z-index: 10; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-top: 20px; box-shadow: var(--shadow); }
.perm-summary { display: grid; gap: 2px; color: var(--ink); font-size: 14px; }
.perm-summary strong { color: var(--blue-600); font-size: 18px; font-variant-numeric: tabular-nums; }
.perm-summary small { color: var(--muted); font-size: 12px; }
@media (max-width: 680px) { .perm-grid { grid-template-columns: minmax(0, 1fr); } .perm-group-head { flex-wrap: wrap; } .perm-savebar .button-row { width: 100%; } }

/* ── Durum renkleri: başarılı / uyarı / hata / bilgi / pasif ──
   Rozetler, bildirim kutuları, uyarılar ve metin renkleri tek yerden gelir; açık ve koyu temada aynı ailede kalır. */
:root {
  --st-success-fg: #167a57; --st-success-bg: #e6f4ee; --st-success-line: #c3e9d6;
  --st-warning-fg: #99610b; --st-warning-bg: #fbf1dc; --st-warning-line: #f2d9a0;
  --st-danger-fg:  #b8324a; --st-danger-bg:  #fbeaed; --st-danger-line:  #f6c6cd;
  --st-info-fg:    #3358c4; --st-info-bg:    #ebf0fd; --st-info-line:    #d3dfff;
  --st-muted-fg:   #5f6f86; --st-muted-bg:   #eef1f6; --st-muted-line:   #e1e6ef;
}
:root[data-theme="dark"] {
  --st-success-fg: #62d6a4; --st-success-bg: rgba(44, 168, 127, .14); --st-success-line: rgba(44, 168, 127, .34);
  --st-warning-fg: #f0c45c; --st-warning-bg: rgba(212, 160, 48, .14); --st-warning-line: rgba(212, 160, 48, .34);
  --st-danger-fg:  #ff8d98; --st-danger-bg:  rgba(224, 64, 80, .14);  --st-danger-line:  rgba(224, 64, 80, .36);
  --st-info-fg:    #a9bdf7; --st-info-bg:    rgba(112, 142, 232, .14); --st-info-line:   rgba(112, 142, 232, .34);
  --st-muted-fg:   #93a0c4; --st-muted-bg:   rgba(128, 144, 184, .10); --st-muted-line:  var(--line);
}

.badge, .status-badge { min-height: 24px; padding: 3px 9px; border: 0; border-radius: 6px; font-size: 12px; font-weight: 500; letter-spacing: 0; line-height: 1.3; white-space: nowrap; }
.badge.success, .status-badge.success { color: var(--st-success-fg); background: var(--st-success-bg); }
.badge.warning, .status-badge.warning { color: var(--st-warning-fg); background: var(--st-warning-bg); }
.badge.danger,  .status-badge.danger  { color: var(--st-danger-fg);  background: var(--st-danger-bg); }
.badge.info,    .status-badge.info    { color: var(--st-info-fg);    background: var(--st-info-bg); }
.badge.muted { color: var(--st-muted-fg); background: var(--st-muted-bg); border: 0; }
.badge > .lucide, .badge > svg { width: 13px; height: 13px; stroke-width: 2; }

.alert, .notice, .desk-feedback { font-weight: 500; }
.alert.success, .notice.success, .desk-feedback.success { color: var(--st-success-fg); background: var(--st-success-bg); border: 1px solid var(--st-success-line); }
.alert.warning, .notice.warning, .desk-feedback.warning { color: var(--st-warning-fg); background: var(--st-warning-bg); border: 1px solid var(--st-warning-line); }
.alert.error, .alert.danger, .notice.danger, .notice.error, .desk-feedback.error, .desk-feedback.danger { color: var(--st-danger-fg); background: var(--st-danger-bg); border: 1px solid var(--st-danger-line); }
.notice.info, .alert.info { color: var(--st-info-fg); background: var(--st-info-bg); border: 1px solid var(--st-info-line); }
.notice > .lucide { flex: none; width: 18px; height: 18px; margin-top: 2px; }

.text-success { color: var(--st-success-fg) !important; }
.text-warning { color: var(--st-warning-fg) !important; }
.text-danger  { color: var(--st-danger-fg) !important; }
.member-picker-avatar { color: var(--st-info-fg); background: var(--st-info-bg); }
