/* ==========================================================================
   PARKEXPERT ADMIN & OTONOM PTS STYLE SYSTEM (parkexpertabonelik.net Birebir)
   ========================================================================== */

:root {
  color-scheme: light;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* PARKEXPERT Brand Color Palette (parkexpertabonelik.net birebir tek tema) */
  --color-primary-dark: #0a1424;
  --color-primary-navy: #0a1424;
  --color-primary-light: #112347;
  --color-primary-border: #1d325f;
  --color-primary: #0f3ba2;

  --color-accent-orange: #ffd000;
  --color-accent-gold: #ffd000;
  --color-accent-red: #0f3ba2;
  --color-gradient-accent: linear-gradient(135deg, #ffd000 0%, #ff9f00 100%);
  --color-gradient-primary: linear-gradient(135deg, #0a1424 0%, #1e3a8a 100%);

  /* Single Crisp Light Theme Surfaces (parkexpertabonelik.net) */
  --bg-app: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-elevated: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --color-border-light: #e2e8f0;
  --color-text-dark: #0f172a;
  --color-text-muted: #64748b;
  --color-text-light: #ffffff;

  /* Legacy alias tokens used in app.js inline styles */
  --brand-primary: #0f3ba2;
  --brand-emerald: #10b981;
  --brand-amber: #f59e0b;
  --brand-rose: #ef4444;
  --brand-violet: #7c3aed;

  /* Status Colors */
  --color-status-new-bg: #eff6ff;
  --color-status-new-text: #2563eb;
  --color-status-review-bg: #fef3c7;
  --color-status-review-text: #d97706;
  --color-status-approved-bg: #ecfdf5;
  --color-status-approved-text: #059669;
  --color-status-rejected-bg: #fef2f2;
  --color-status-rejected-text: #dc2626;

  /* Radii & Shadows */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-premium: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 15px rgba(255, 208, 0, 0.35);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.55;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary-dark);
  font-weight: 700;
  line-height: 1.25;
}

/* ==========================================================================
   ADMIN LAYOUT & SIDEBAR (parkexpertabonelik.net/admin.html)
   ========================================================================== */
.admin-layout {
  min-height: 100vh;
  display: flex;
  background-color: var(--bg-app);
}

.admin-sidebar {
  width: 260px;
  background-color: var(--bg-surface);
  color: var(--color-primary-dark);
  padding: 2rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex-shrink: 0;
  border-right: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  z-index: 99;
}

/* Yapışkan 100vh sidebar'da içerik taşınca öğeler sıkışmasın; sidebar kendi içinde tek parça kayar (parkexpertabonelik.net/style.css:9795) */
.admin-sidebar > * {
  flex-shrink: 0;
}

.admin-sidebar nav {
  flex: 0 0 auto !important;
  overflow: visible !important;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% + 2.3rem);
  margin-left: -1.15rem;
  margin-right: -1.15rem;
  margin-top: -1.6rem;
  height: 68px;
  flex-shrink: 0;
}

/* Sidebar User Profile Block (parkexpertabonelik.net/style.css birebir) */
.admin-sidebar .admin-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem;
  gap: 0.85rem;
  border-radius: var(--radius-lg);
  width: 100%;
  margin-top: -0.5rem;
  box-sizing: border-box;
  border: 1px solid rgba(15, 59, 162, 0.08);
  background: rgba(255, 255, 255, 0.70);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02), 0 1px 3px rgba(0, 0, 0, 0.01);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.admin-sidebar .admin-user.admin-user-superadmin {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(254, 243, 199, 0.4));
  border-color: rgba(245, 158, 11, 0.25);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.05), 0 1px 3px rgba(245, 158, 11, 0.03);
}

.admin-sidebar .admin-user.admin-user-superadmin:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.12), 0 2px 6px rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.45);
}

.user-avatar {
  width: 56px;
  height: 56px;
  background: var(--color-gradient-accent);
  color: var(--color-text-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.user-avatar.user-avatar-superadmin {
  background: linear-gradient(135deg, #5b4699 0%, #6d55b5 100%);
  color: #a5b4fc;
  border: 2.5px solid #ffd000;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.user-avatar.user-avatar-superadmin::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  animation: shine-avatar 3.5s infinite linear;
}

@keyframes shine-avatar {
  0% { transform: translate(-100%, -100%) rotate(30deg); }
  100% { transform: translate(100%, 100%) rotate(30deg); }
}

.user-status-dot {
  position: absolute;
  bottom: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  background-color: #10b981;
  border: 2px solid #ffffff;
  border-radius: 50%;
  z-index: 10;
  animation: pulse-status 2s infinite;
}

@keyframes pulse-status {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.admin-sidebar .admin-user .user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 0.35rem;
}

#active-user-role {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0.15rem 1.15rem 0.15rem 0 !important;
  width: auto !important;
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230f3ba2' stroke-width='3.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right center !important;
  background-size: 10px !important;
}

#active-user-subtext {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  width: 100%;
}

.badge-role {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  line-height: 1.2;
}

.badge-role-superadmin {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-username {
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

#session-countdown-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 59, 162, 0.04);
  border: 1px solid rgba(15, 59, 162, 0.08);
  border-radius: var(--radius-lg);
  padding: 0.4rem 0.7rem;
  width: 100%;
  margin-top: 0.2rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

#session-countdown-timer {
  font-family: var(--font-heading), monospace;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--color-primary);
}

/* Sidebar Categories & Menu Items */
.sidebar-category {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sidebar-category-header {
  font-size: 0.64rem;
  font-weight: 800;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-left: 0.65rem;
  margin-bottom: 0.15rem;
  opacity: 0.85;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sidebar-item {
  width: 100%;
}

.sidebar-item .nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.82rem 0.95rem;
  border-radius: var(--radius-sm);
  border: none;
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
}

.sidebar-item .nav-btn svg,
.sidebar-item .nav-btn i {
  flex-shrink: 0;
}

.sidebar-item .nav-btn:hover {
  color: var(--color-primary-dark);
  background-color: rgba(15, 59, 162, 0.05);
}

.sidebar-item .nav-btn.active {
  color: var(--color-primary-dark);
  border-left: 3px solid var(--color-accent-orange);
  background-color: rgba(15, 59, 162, 0.08);
  font-weight: 600;
}

.sidebar-item .nav-btn .nav-pill {
  margin-left: auto;
  font-size: 0.64rem;
  font-weight: 800;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(15, 59, 162, 0.08);
  color: var(--color-primary);
}

.sidebar-item .nav-btn .nav-pill.unlocked {
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
}

.sidebar-footer {
  margin-top: auto;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  font-size: 0.72rem;
  color: var(--color-text-muted);
  line-height: 1.45;
  flex-shrink: 0;
}

/* Collapsible Sidebar Rail (Ctrl + B) */
.sidebar-collapse-toggle {
  position: fixed;
  top: 58px;
  left: 246px;
  z-index: 120;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--color-primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  transition: all var(--transition-fast);
}

.sidebar-collapse-toggle:hover {
  background: var(--color-primary-navy);
  color: #ffffff;
}

.sidebar-collapse-toggle svg {
  width: 15px;
  height: 15px;
  transition: transform 0.3s ease;
}

.admin-layout.sidebar-collapsed .admin-sidebar {
  width: 84px;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
}

.admin-layout.sidebar-collapsed .sidebar-collapse-toggle {
  left: 70px;
}

.admin-layout.sidebar-collapsed .sidebar-collapse-toggle svg {
  transform: rotate(180deg);
}

.admin-layout.sidebar-collapsed .sidebar-logo .logo-link {
  width: 34px !important;
  height: 40px;
  overflow: hidden;
  margin: 0 auto;
}

.admin-layout.sidebar-collapsed .sidebar-logo img {
  width: 267px !important;
  height: 89px !important;
  max-width: none;
  margin: -22px 0 0 -5px !important;
}

.admin-layout.sidebar-collapsed .admin-sidebar .admin-user {
  padding: 0.4rem 0;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.admin-layout.sidebar-collapsed .admin-sidebar .admin-user .user-info,
.admin-layout.sidebar-collapsed .admin-sidebar .admin-user #session-countdown-container,
.admin-layout.sidebar-collapsed .sidebar-footer {
  display: none !important;
}

.admin-layout.sidebar-collapsed .sidebar-category-header {
  font-size: 0;
  padding: 0;
  margin: 0 auto 0.35rem;
  width: 24px;
  height: 2px;
  background: var(--border-color);
}

.admin-layout.sidebar-collapsed .sidebar-item .nav-btn {
  justify-content: center;
  padding: 0.75rem 0;
  border-left: none;
}

.admin-layout.sidebar-collapsed .sidebar-item .nav-btn span {
  display: none;
}

.admin-layout.sidebar-collapsed .sidebar-item .nav-btn.active {
  box-shadow: inset 0 -3px 0 var(--color-accent-orange);
}

/* ==========================================================================
   ADMIN MAIN, TOP HEADER & SOVEREIGN GOLD WELCOME BANNER
   ========================================================================== */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-x: hidden;
}

.admin-header {
  background-color: var(--bg-surface);
  min-height: 84px;
  padding: 0.85rem 2.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-header-brand {
  display: none;
}

.admin-layout.sidebar-collapsed .admin-header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-right: 1rem;
  min-width: 0;
}

.admin-layout.sidebar-collapsed .admin-header-title {
  display: none;
}

.admin-header-brand img {
  height: 42px;
  width: auto;
}

.admin-header-brand-sep {
  width: 1px;
  height: 22px;
  background: var(--border-color);
}

.admin-header-brand-section {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.admin-header-title h1 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  letter-spacing: -0.02em;
}

.admin-header-title p {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  margin-top: 0.15rem;
}

#live-tracking-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.675rem;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid rgba(16, 185, 129, 0.18);
}

#live-tracking-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
  animation: pulse-status 1.8s infinite ease-in-out;
}

.btn-icon-square {
  background: rgba(15, 59, 162, 0.04);
  border: 1px solid rgba(15, 59, 162, 0.18);
  color: var(--color-primary);
  border-radius: var(--radius-md);
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon-square:hover {
  background: var(--color-primary);
  color: #ffffff;
}

/* Main Workspace Padding */
.admin-content {
  padding: 1.75rem 2.25rem 3rem;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
}

/* Super Admin Sovereign Gold & Obsidian Welcome Banner */
.operator-welcome-card.superadmin-banner-gold {
  background: linear-gradient(135deg, #090e1a 0%, #17243c 50%, #10192a 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 3px solid var(--color-accent-orange) !important;
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.operator-welcome-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.operator-avatar-wrapper {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.operator-avatar-wrapper img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--color-accent-orange) !important;
  box-shadow: 0 0 15px rgba(255, 208, 0, 0.28) !important;
  background: #112347;
}

.operator-online-indicator {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2.5px solid #090e1a;
  background-color: #10b981;
}

.operator-greetings-area {
  flex: 1;
  min-width: 260px;
}

.operator-welcome-badge {
  display: inline-block;
  background: rgba(255, 208, 0, 0.14) !important;
  border: 1px solid rgba(255, 208, 0, 0.35) !important;
  color: var(--color-accent-orange) !important;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

#superadmin-welcome-title {
  margin: 0.2rem 0 0.1rem;
  font-size: 1.22rem;
  font-weight: 800;
  color: #ffffff !important;
  letter-spacing: -0.02em;
}

#superadmin-welcome-subtitle {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
}

.banner-live-clock {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.banner-live-clock-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse-status 2s infinite;
}

.banner-live-clock-time {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-accent-orange);
  font-variant-numeric: tabular-nums;
}

.banner-live-clock-sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.18);
}

/* ==========================================================================
   ADMIN PREMIUM HORIZONTAL TABS (.admin-tabs)
   ========================================================================== */
.admin-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.3rem;
  width: 100%;
  padding: 0.35rem;
  margin-bottom: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  scrollbar-width: none;
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.admin-tab-btn {
  flex-shrink: 0;
  white-space: nowrap;
  background: transparent;
  border: none;
  padding: 0.55rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text-muted);
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.admin-tab-btn:hover {
  color: var(--color-primary-dark);
  background: var(--bg-elevated);
}

.admin-tab-btn.active {
  color: #ffffff;
  background: var(--color-primary-navy);
  box-shadow: 0 4px 12px rgba(10, 20, 36, 0.2);
}

/* ==========================================================================
   SAAS FILTERS PANEL (.filters-panel)
   ========================================================================== */
.filters-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.35rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.filters-mobile-toggle {
  display: none;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 1rem;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

@media (min-width: 769px) {
  .filter-group-wide {
    grid-column: span 2;
  }
}

.filter-group label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.filter-info-pill {
  min-height: 40px;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.status-dot-green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

/* ==========================================================================
   METRIC / KPI CARDS (parkexpertabonelik.net .metric-card)
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-top: 4px solid var(--color-primary-navy);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: all var(--transition-normal);
}

.kpi-card:nth-child(1) { border-top-color: #0a1424; }
.kpi-card:nth-child(2) { border-top-color: #2563eb; }
.kpi-card:nth-child(3) { border-top-color: #059669; }
.kpi-card:nth-child(4) { border-top-color: #d97706; }

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(15, 23, 42, 0.14);
}

.kpi-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-value {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  line-height: 1.15;
}

.kpi-sub {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
}

/* ==========================================================================
   PANELS, CARDS & GATE CARDS
   ========================================================================== */
.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border-color);
}

.panel-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-primary-dark);
}

.panel-subtitle {
  font-size: 0.83rem;
  color: var(--color-text-muted);
  margin-top: 0.2rem;
}

/* ==========================================================================
   TURKISH LICENSE PLATE BADGE (.plate-box / .col-plate from parkexpertabonelik.net)
   ========================================================================== */
.plate-box,
.col-plate {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-heading), 'Inter', monospace;
  font-size: 0.92rem;
  font-weight: 800;
  color: #0a1424;
  letter-spacing: 0.05em;
  background: #ffffff;
  border: 2px solid #0a1424;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-transform: uppercase;
  white-space: nowrap;
}

.plate-tr {
  background: #003399;
  color: #ffffff;
  font-size: 0.56rem;
  font-weight: 900;
  padding: 0.35rem 0.32rem 0.2rem;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  align-self: stretch;
  letter-spacing: 0;
}

.plate-text {
  padding: 0.2rem 0.6rem;
  color: #0a1424;
  font-weight: 800;
}

/* Interactive TR License Plate Input Component */
.tr-plate-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 2px solid #0a1424;
  border-radius: 8px;
  overflow: hidden;
  min-height: 44px;
  width: 100%;
}

.tr-plate-badge {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 2.1rem;
  align-self: stretch;
  background: #003399;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 900;
  padding-bottom: 5px;
  flex-shrink: 0;
}

.tr-plate-input {
  flex: 1;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-family: var(--font-heading), monospace;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.07em !important;
  color: #0a1424 !important;
  text-transform: uppercase !important;
  padding: 0.45rem 0.75rem !important;
}

/* ==========================================================================
   STATUS BADGES (parkexpertabonelik.net .status-badge)
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.28rem 0.62rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-blue {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.15) 100%);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.25);
}

.badge-emerald {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.16) 100%);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.28);
}

.badge-amber {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.16) 100%);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.28);
}

.badge-rose {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(239, 68, 68, 0.16) 100%);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.28);
}

.badge-violet {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(124, 58, 237, 0.16) 100%);
  color: #6d28d9;
  border-color: rgba(124, 58, 237, 0.28);
}

/* ==========================================================================
   BUTTONS & INPUT CONTROLS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: #1e40af;
  transform: translateY(-1px);
}

.btn-emerald {
  background: #059669;
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}
.btn-emerald:hover {
  background: #047857;
  transform: translateY(-1px);
}

.btn-amber {
  background: var(--color-gradient-accent);
  color: #0a1424;
  box-shadow: var(--shadow-sm);
}
.btn-amber:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-rose {
  background: #dc2626;
  color: #ffffff;
}

.btn-outline {
  background: var(--bg-surface);
  border-color: var(--border-color);
  color: var(--color-primary-dark);
}
.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(15, 59, 162, 0.04);
}

.input,
.select,
.tenant-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 40px;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 500;
  outline: none;
  text-overflow: ellipsis;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input:focus,
.select:focus,
.tenant-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(15, 59, 162, 0.12);
}

/* ==========================================================================
   GATE MONITOR CARDS & LED MATRIX
   ========================================================================== */
.gates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.15rem;
}

.gate-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.gate-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.gate-card.rtsp-ai {
  border-top: 4px solid #10b981;
}

.gate-card.smart-anpr {
  border-top: 4px solid var(--color-primary);
}

.led-panel {
  background: #090e1a;
  color: #ffd000;
  font-family: "Courier New", monospace;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #1e293b;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   RESPONSIVE TABLE (modern-web-guidance: responsive-table + parkexpert style)
   ========================================================================== */
.table-wrapper {
  overflow-x: auto;
  max-inline-size: 100%;
  container-type: inline-size;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
}

caption {
  text-align: left;
  padding: 0.85rem 1.25rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-color);
}

thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
}

thead th {
  background: var(--bg-elevated);
  color: var(--color-primary-dark);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.9rem 1.15rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

tbody th,
tbody td {
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  vertical-align: middle;
}

tbody th {
  position: sticky;
  inset-inline-start: 0;
  background: var(--bg-surface);
  font-weight: 700;
  z-index: 1;
}

tbody tr:hover th,
tbody tr:hover td {
  background: var(--bg-elevated);
}

@container (width < 600px) {
  table, thead, tbody, tr, th, td {
    display: block;
  }

  thead {
    display: none;
  }

  tr {
    margin-block-end: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
  }

  tbody th {
    position: sticky;
    inset-block-start: 0;
    z-index: 2;
    background: var(--bg-elevated);
  }

  td:nth-child(2)::before { content: var(--label-2, "Bilgi") ": "; font-weight: 700; color: var(--color-text-muted); }
  td:nth-child(3)::before { content: var(--label-3, "Detay") ": "; font-weight: 700; color: var(--color-text-muted); }
  td:nth-child(4)::before { content: var(--label-4, "Durum") ": "; font-weight: 700; color: var(--color-text-muted); }
  td:nth-child(5)::before { content: var(--label-5, "Tutar") ": "; font-weight: 700; color: var(--color-text-muted); }
  td:nth-child(6)::before { content: var(--label-6, "İşlem") ": "; font-weight: 700; color: var(--color-text-muted); }
}

/* ==========================================================================
   DIALOG MODAL (modern-web-guidance: light-dismiss-a-dialog)
   ========================================================================== */
dialog {
  margin: auto;
  padding: 1.5rem 1.65rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  color: var(--text-primary);
  max-width: 540px;
  width: calc(100% - 2rem);
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  box-shadow: var(--shadow-premium);
}

dialog::backdrop {
  background-color: rgba(10, 20, 36, 0.65);
  backdrop-filter: blur(4px);
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem;
  margin-top: 0.9rem;
  width: 100%;
}

.form-row-2col {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 0.75rem;
  width: 100%;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  min-width: 0;
  width: 100%;
}

.form-row label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

/* Privacy Masking Mode (parkexpertabonelik.net KVKK Gizlilik Modu) */
body.privacy-masked .plate-text,
body.privacy-masked td:nth-child(2),
body.privacy-masked .customer-phone {
  filter: blur(5px);
  transition: filter 0.2s ease;
}
body.privacy-masked .plate-text:hover,
body.privacy-masked td:nth-child(2):hover {
  filter: none;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #0a1424;
  color: #ffffff;
  border-left: 4px solid #ffd000;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: var(--shadow-premium);
  z-index: 9999;
  display: none;
}

/* Mobile Overlay & Bottom Nav Defaults (Desktop: hidden) */
.sidebar-overlay,
.mobile-bottom-nav {
  display: none;
}

/* ==========================================================================
   MOBİL RESPONSIVE TASARIM (parkexpertabonelik.net/style.css birebir <= 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column;
  }

  .sidebar-collapse-toggle {
    display: none !important;
  }

  /* 1. Yandan Kayarak Açılan Çekmece Menü (Off-canvas Sidebar Drawer) */
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px !important;
    height: 100vh;
    background-color: #ffffff;
    color: var(--color-primary-dark);
    padding: 1.5rem 1.25rem !important;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    z-index: 2000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.18);
    overflow-y: auto;
  }

  .admin-sidebar.open {
    transform: translateX(280px);
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    z-index: 1999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-logo {
    width: 100% !important;
    margin: 0 0 0.5rem 0 !important;
    height: auto !important;
    border-bottom: 1px solid var(--color-border-light) !important;
    padding-bottom: 0.85rem !important;
  }

  /* 2. İnce Mobil Üst Başlık: Solda Logo, Sağda Hızlı Aksiyonlar */
  .admin-header {
    height: auto;
    min-height: 60px;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.6rem 1rem !important;
    gap: 0.5rem !important;
  }

  .admin-header-brand {
    display: flex !important;
    align-items: center;
    min-width: 0;
    margin-right: 0;
  }

  .admin-header-brand img {
    height: 34px;
    width: auto;
    display: block;
  }

  .admin-header-brand-sep,
  .admin-header-brand-section,
  .admin-header-title {
    display: none !important;
  }

  .header-actions {
    gap: 0.35rem !important;
  }

  .header-actions .btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.72rem;
  }

  .header-actions #openEsnafModalBtn {
    display: none;
  }

  .btn-icon-square {
    width: 34px !important;
    height: 34px !important;
  }

  /* 3. Ana İçerik Alanı & Alt Gezinme Çubuğu Boşluğu */
  .admin-main {
    padding-bottom: 68px;
  }

  .admin-content {
    padding: 0.9rem !important;
  }

  /* 4. Süper Admin Banner Mobil Uyum */
  #superadmin-welcome-banner {
    padding: 1rem !important;
    margin-bottom: 1rem !important;
  }

  #superadmin-welcome-banner .operator-welcome-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  #superadmin-welcome-banner .operator-profile-area {
    flex-direction: row !important;
    gap: 0.75rem !important;
  }

  #superadmin-welcome-banner .operator-avatar-wrapper {
    width: 46px !important;
    height: 46px !important;
  }

  #superadmin-welcome-title {
    font-size: 1.08rem !important;
  }

  #superadmin-welcome-subtitle {
    font-size: 0.76rem !important;
    line-height: 1.4;
  }

  .superadmin-right-col {
    width: 100%;
  }

  .banner-live-clock {
    width: 100%;
    justify-content: center;
  }

  /* 5. Katlanır Mobil Filtre Çubuğu (.filters-mobile-toggle) */
  #main-filters-panel {
    padding: 0.65rem 0.85rem;
    margin-bottom: 1rem;
  }

  .filters-mobile-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.4rem 0.25rem;
    border: none;
    background: none;
    color: var(--color-primary-dark);
    font-family: var(--font-heading);
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
  }

  .filters-mobile-toggle-chevron {
    margin-left: auto;
    transition: transform 0.2s ease;
  }

  #main-filters-panel.is-open .filters-mobile-toggle-chevron {
    transform: rotate(180deg);
  }

  #main-filters-panel:not(.is-open) .filters-grid {
    display: none;
  }

  #main-filters-panel.is-open .filters-grid {
    margin-top: 0.75rem;
    grid-template-columns: 1fr !important;
  }

  /* 6. KPI Kartları & Panel İçerikleri */
  .kpi-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .kpi-card {
    padding: 1.05rem 1.15rem;
  }

  .kpi-value {
    font-size: 1.5rem;
  }

  .panel {
    padding: 1.05rem;
  }

  .form-row-2col {
    grid-template-columns: 1fr;
  }

  dialog {
    padding: 1.2rem;
    width: calc(100% - 1.25rem);
  }

  .toast {
    bottom: 4.5rem;
    left: 1rem;
    right: 1rem;
  }

  /* 7. Sabit Mobil Alt Gezinme Çubuğu (.mobile-bottom-nav) */
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #ffffff;
    border-top: 1px solid var(--color-border-light);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.06);
    padding: 0 0.35rem;
  }

  .bottom-nav-item {
    background: none;
    border: none;
    color: var(--color-text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 700;
    flex: 1;
    height: 100%;
    cursor: pointer;
    transition: color 0.2s ease;
    outline: none;
    padding: 0.35rem 0;
  }

  .bottom-nav-item svg,
  .bottom-nav-item i {
    width: 19px;
    height: 19px;
  }

  .bottom-nav-item.active {
    color: var(--color-primary);
  }
}

/* ==========================================================================
   PREMIUM ADMIN LOGIN OVERLAY (parkexpertabonelik.net #modal-login-overlay)
   ========================================================================== */
#modal-login-overlay .modal-window {
  max-width: 400px;
  width: 90%;
  max-height: 95vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  z-index: 10;
  position: relative;
  padding: 1.5px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.45);
}

#modal-login-overlay .modal-window::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    transparent 35%,
    var(--color-primary) 45%,
    var(--color-accent-orange) 55%,
    transparent 65%,
    transparent 100%
  );
  animation: rotateBorder 6s linear infinite;
  z-index: 1;
  pointer-events: none;
}

#modal-login-overlay .modal-window-inner {
  background: rgba(255, 255, 255, 0.96);
  border-radius: calc(var(--radius-lg) - 1.5px);
  position: relative;
  z-index: 2;
  overflow-y: auto;
  max-height: calc(95vh - 3px);
  width: 100%;
  display: flex;
  flex-direction: column;
}

@keyframes rotateBorder {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.login-bg-orbs {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.42;
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease;
}

.login-orb.orb-1 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.6) 0%, rgba(147, 51, 234, 0) 70%);
  top: 10%;
  left: 10%;
}

.login-orb.orb-2 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.55) 0%, rgba(6, 182, 212, 0) 70%);
  bottom: 10%;
  right: 10%;
}

.login-orb.orb-3 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.5) 0%, rgba(236, 72, 153, 0) 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.login-password-input:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px rgba(15, 59, 162, 0.14) !important;
}

.password-toggle-btn .eye-slash {
  transition: stroke-dashoffset 0.3s ease;
  stroke-dasharray: 24;
  stroke-dashoffset: 0;
}

.password-toggle-btn.password-visible .eye-slash {
  stroke-dashoffset: 24;
}
