/* ==========================================================================
   KÁRPÁTIA HOME — ADMIN PANEL STYLESHEET
   Aesthetics: Deep Obsidian Glassmorphism, Gold & Emerald Accents, Premium Polish
   ========================================================================== */

:root {
  --admin-bg-base: #0a050d;
  --admin-bg-surface: rgba(22, 13, 27, 0.75);
  --admin-bg-card: rgba(30, 18, 38, 0.65);
  --admin-bg-hover: rgba(45, 27, 56, 0.7);
  --admin-border: rgba(212, 175, 55, 0.16);
  --admin-border-bright: rgba(212, 175, 55, 0.35);
  
  --admin-gold: #d4af37;
  --admin-gold-glow: rgba(212, 175, 55, 0.25);
  --admin-emerald: #34d399;
  --admin-emerald-glow: rgba(52, 211, 153, 0.2);
  --admin-blue: #60a5fa;
  --admin-purple: #c084fc;
  --admin-danger: #f87171;

  --admin-text-main: #f3edf7;
  --admin-text-muted: #a395b0;
  --admin-text-sub: #786985;
  
  --admin-font-serif: 'Italiana', serif;
  --admin-font-sans: 'DM Sans', -apple-system, sans-serif;
  --admin-sidebar-width: 280px;
  --admin-topbar-height: 76px;
}

/* Reset & Layout */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.admin-body {
  background-color: var(--admin-bg-base);
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(120, 50, 150, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(212, 175, 55, 0.08), transparent);
  background-attachment: fixed;
  color: var(--admin-text-main);
  font-family: var(--admin-font-sans);
  min-height: 100vh;
  overflow-x: hidden;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styling */
.admin-sidebar {
  width: var(--admin-sidebar-width);
  background: rgba(15, 8, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--admin-border);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.admin-brand-icon {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.4));
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--admin-font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
}

.brand-sub {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--admin-gold);
  font-weight: 600;
}

/* User Card in Sidebar */
.admin-user-card {
  margin: 16px 16px 8px;
  padding: 12px 14px;
  background: var(--admin-bg-card);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.admin-user-card .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--admin-gold), #8a6d1b);
  color: #000;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-user-card .user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-user-card .user-info strong {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.admin-user-card .user-info span {
  font-size: 11px;
  color: var(--admin-text-muted);
}

.status-online {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--admin-emerald);
  box-shadow: 0 0 8px var(--admin-emerald);
  position: absolute;
  top: 14px;
  right: 14px;
}

/* Navigation List */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-group-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--admin-text-sub);
  padding: 12px 12px 6px;
  margin-top: 8px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--admin-text-muted);
  font-family: var(--admin-font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  margin-bottom: 4px;
}

.nav-item:hover {
  background: var(--admin-bg-hover);
  color: #fff;
  border-color: rgba(212, 175, 55, 0.1);
}

.nav-item.active {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--admin-border-bright);
  color: var(--admin-gold);
  font-weight: 600;
  box-shadow: inset 0 0 15px rgba(212, 175, 55, 0.08);
}

.nav-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  opacity: 0.85;
}

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--admin-text-main);
}

.badge-gold {
  background: rgba(212, 175, 55, 0.2);
  color: var(--admin-gold);
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.badge-emerald {
  background: rgba(52, 211, 153, 0.2);
  color: var(--admin-emerald);
  border: 1px solid rgba(52, 211, 153, 0.4);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-live-site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  color: var(--admin-text-main);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s ease;
}

.btn-live-site:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--admin-gold);
  color: var(--admin-gold);
}

.time-widget {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--admin-text-sub);
}

.time-widget span {
  font-family: monospace;
  font-size: 13px;
  color: var(--admin-gold);
}

/* Main Area Layout */
.admin-main {
  flex: 1;
  margin-left: var(--admin-sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar Header */
.admin-topbar {
  height: var(--admin-topbar-height);
  background: rgba(15, 8, 18, 0.7);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  max-width: 520px;
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.mobile-toggle i {
  width: 22px;
  height: 2px;
  background: var(--admin-text-main);
  border-radius: 2px;
}

.admin-search-wrap {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  fill: var(--admin-text-sub);
  pointer-events: none;
}

.admin-search-wrap input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-border);
  border-radius: 20px;
  color: var(--admin-text-main);
  font-family: var(--admin-font-sans);
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}

.admin-search-wrap input:focus {
  background: rgba(30, 18, 38, 0.9);
  border-color: var(--admin-gold);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

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

.btn-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--admin-gold), #b89528);
  color: #0d0710;
  border: none;
  border-radius: 20px;
  font-family: var(--admin-font-sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  transition: all 0.2s ease;
}

.btn-primary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.45);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
  padding: 8px 14px;
  border-radius: 10px;
  font-family: var(--admin-font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: rgba(248, 113, 113, 0.25);
  border-color: #f87171;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(248, 113, 113, 0.25);
}

.btn-brochure {
  background: rgba(212, 175, 55, 0.15) !important;
  border-color: rgba(212, 175, 55, 0.4) !important;
  color: var(--admin-gold-light) !important;
  font-size: 14px !important;
}

.btn-brochure:hover {
  background: rgba(212, 175, 55, 0.3) !important;
  border-color: var(--admin-gold) !important;
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

.btn-primary-action svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-border);
  color: var(--admin-text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--admin-gold);
  color: var(--admin-gold);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.notification-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--admin-gold);
  position: absolute;
  top: 8px;
  right: 8px;
  box-shadow: 0 0 8px var(--admin-gold);
}

/* Notification Dropdown Popover */
.notification-dropdown-container {
  position: relative;
}

.dropdown-popover {
  position: absolute;
  top: 50px;
  right: 0;
  width: 340px;
  background: rgba(22, 13, 27, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--admin-border-bright);
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 200;
}

.dropdown-popover.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.popover-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.popover-head strong {
  font-size: 13px;
  color: #fff;
}

.popover-head span {
  font-size: 11px;
  color: var(--admin-gold);
  cursor: pointer;
}

.popover-body {
  max-height: 320px;
  overflow-y: auto;
}

.notif-item {
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.2s ease;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.notif-item.unread {
  background: rgba(212, 175, 55, 0.05);
}

.notif-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.notif-icon.emerald { background: rgba(52, 211, 153, 0.15); }
.notif-icon.gold { background: rgba(212, 175, 55, 0.15); }
.notif-icon.blue { background: rgba(96, 165, 250, 0.15); }

.notif-item p {
  font-size: 12px;
  color: var(--admin-text-main);
  line-height: 1.4;
}

.notif-item small {
  font-size: 10px;
  color: var(--admin-text-sub);
}

/* Content Container & Views */
.admin-content-container {
  padding: 32px;
  flex: 1;
}

.admin-tab-view {
  display: none;
  animation: fadeInTab 0.3s ease forwards;
}

.admin-tab-view.active {
  display: block;
}

@keyframes fadeInTab {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Page Header */
.page-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--admin-gold);
  margin-bottom: 4px;
}

.page-title-row h1 {
  font-family: var(--admin-font-sans);
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}

.quick-stats-pill {
  padding: 8px 16px;
  background: var(--admin-bg-card);
  border: 1px solid var(--admin-border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--admin-text-muted);
}

.text-emerald { color: var(--admin-emerald); }
.text-gold { color: var(--admin-gold); }
.text-blue { color: var(--admin-blue); }
.text-sub { color: var(--admin-text-muted); margin-bottom: 16px; font-size: 13px; }

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.kpi-card {
  background: var(--admin-bg-card);
  backdrop-filter: blur(15px);
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: all 0.25s ease;
}

.kpi-card:hover {
  transform: translateY(-3px);
  border-color: var(--admin-border-bright);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.kpi-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-icon-wrap.gold { background: rgba(212, 175, 55, 0.15); color: var(--admin-gold); }
.kpi-icon-wrap.emerald { background: rgba(52, 211, 153, 0.15); color: var(--admin-emerald); }
.kpi-icon-wrap.blue { background: rgba(96, 165, 250, 0.15); color: var(--admin-blue); }
.kpi-icon-wrap.purple { background: rgba(192, 132, 252, 0.15); color: var(--admin-purple); }

.kpi-icon-wrap svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.kpi-data {
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 12px;
  color: var(--admin-text-muted);
  font-weight: 500;
  margin-bottom: 2px;
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.kpi-sub {
  font-size: 11px;
  color: var(--admin-text-sub);
  margin-top: 4px;
}

/* Dashboard Grid Panels */
.dashboard-grid {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

.dash-panel {
  background: var(--admin-bg-card);
  backdrop-filter: blur(15px);
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.panel-head h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.btn-text-link {
  background: none;
  border: none;
  color: var(--admin-gold);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-text-link:hover {
  text-decoration: underline;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--admin-text-sub);
  text-transform: uppercase;
  padding: 12px 16px;
  border-bottom: 1px solid var(--admin-border);
}

.admin-table td {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--admin-text-main);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  vertical-align: middle;
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Property Table Thumbnail */
.table-thumb {
  width: 48px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--admin-bg-hover);
  border: 1px solid var(--admin-border);
}

/* Status Badges & Micro Icons */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.green {
  background: var(--admin-emerald);
  box-shadow: 0 0 6px var(--admin-emerald);
}

.inline-badge-svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  display: inline-block;
}

.note-svg {
  width: 13px;
  height: 13px;
  fill: var(--admin-gold);
}

.note-tooltip-trigger {
  cursor: help;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  padding: 3px 5px;
  border-radius: 6px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.25);
  transition: all 0.2s ease;
  margin-left: 6px;
}

.note-tooltip-trigger:hover {
  background: rgba(212, 175, 55, 0.25);
  border-color: var(--admin-gold);
}

.status-badge.sale { background: rgba(96, 165, 250, 0.15); color: var(--admin-blue); border: 1px solid rgba(96, 165, 250, 0.3); }
.status-badge.rent { background: rgba(212, 175, 55, 0.15); color: var(--admin-gold); border: 1px solid rgba(212, 175, 55, 0.3); }
.status-badge.gold { background: rgba(212, 175, 55, 0.2); color: var(--admin-gold-light); border: 1px solid var(--admin-gold); box-shadow: 0 0 10px rgba(212, 175, 55, 0.2); }
.status-badge.active { background: rgba(52, 211, 153, 0.15); color: var(--admin-emerald); border: 1px solid rgba(52, 211, 153, 0.3); }
.status-badge.sold { background: rgba(163, 149, 176, 0.15); color: var(--admin-text-muted); border: 1px solid rgba(163, 149, 176, 0.3); }
.status-badge.new { background: rgba(245, 158, 11, 0.18); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.35); }
.status-badge.dark-badge { background: rgba(255, 255, 255, 0.08); color: var(--admin-text-muted); border: 1px solid rgba(255, 255, 255, 0.16); }

/* District Breakdown List */
.district-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.district-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.district-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.district-tag-pill {
  width: 32px;
  height: 24px;
  background: rgba(212, 175, 55, 0.15);
  color: var(--admin-gold);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.district-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
  margin: 0 14px;
}

.district-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--admin-gold), var(--admin-emerald));
  border-radius: 3px;
}

/* Inquiries Cards Grid */
.inquiry-cards-grid, .inquiries-full-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.inquiry-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
}

.inquiry-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--admin-border-bright);
}

.inquiry-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.inquiry-sender strong {
  font-size: 14px;
  color: #fff;
  display: block;
}

.inquiry-sender span {
  font-size: 12px;
  color: var(--admin-text-muted);
}

.inquiry-topic {
  font-size: 12px;
  font-weight: 600;
  color: var(--admin-gold);
  background: rgba(212, 175, 55, 0.08);
  padding: 4px 8px;
  border-radius: 6px;
}

.inquiry-msg {
  font-size: 13px;
  color: var(--admin-text-main);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.inquiry-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 11px;
  color: var(--admin-text-sub);
}

/* Controls & Filters Bar */
.admin-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-pills {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: 20px;
  border: 1px solid var(--admin-border);
}

.filter-pill {
  padding: 6px 16px;
  background: transparent;
  border: none;
  border-radius: 16px;
  color: var(--admin-text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill.active {
  background: var(--admin-gold);
  color: #0d0710;
}

.select-filters {
  display: flex;
  gap: 12px;
}

select, input[type="text"], input[type="number"], input[type="email"], textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--admin-text-main);
  font-family: var(--admin-font-sans);
  font-size: 13px;
  outline: none;
}

select:focus, input:focus, textarea:focus {
  border-color: var(--admin-gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

/* Buttons */
.action-buttons-group {
  display: flex;
  gap: 12px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--admin-gold);
  color: #0d0710;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: #e5be3e;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-border);
  color: var(--admin-text-main);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--admin-gold);
  color: var(--admin-gold);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: var(--admin-danger);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.3);
}

/* Action Icons inside tables */
.table-actions {
  display: flex;
  gap: 6px;
}

.btn-icon-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-border);
  color: var(--admin-text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon-sm:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--admin-gold);
  color: var(--admin-gold);
}

.btn-icon-sm svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Modals & Popout Dialogs */
.modal-overlay,
.admin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 2, 8, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999 !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 20px;
}

.modal-overlay.show,
.admin-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-card,
.admin-modal {
  background: rgba(24, 14, 30, 0.98);
  border: 1px solid var(--admin-border-bright);
  border-radius: 20px;
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.95), 0 0 40px rgba(212, 175, 55, 0.2);
  overflow: hidden;
  position: relative;
  z-index: 1000000 !important;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card form,
.admin-modal form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.modal-overlay.show .modal-card,
.admin-modal-overlay.show .admin-modal {
  transform: scale(1) translateY(0);
}

.modal-large { max-width: 780px; }

.modal-head {
  padding: 20px 28px;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.modal-head h2 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--admin-text-sub);
  cursor: pointer;
}

.modal-close:hover { color: #fff; }

.modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.35);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--admin-gold);
}

.modal-foot {
  padding: 18px 28px;
  border-top: 1px solid var(--admin-border);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  background: rgba(14, 8, 18, 0.98);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--admin-text-muted);
}

.req { color: var(--admin-gold); }

/* Articles CMS Grid */
.articles-cms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.article-cms-card {
  background: var(--admin-bg-card);
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.article-thumb {
  height: 160px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.article-num {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--admin-gold);
}

.article-cms-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.article-cms-body h3 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.article-cms-body p {
  font-size: 12px;
  color: var(--admin-text-muted);
  line-height: 1.5;
}

/* Valuation Config Grid */
.valuation-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.val-config-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Toast Container */
#admin-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 20px;
  background: rgba(24, 14, 30, 0.95);
  backdrop-filter: blur(15px);
  border: 1px solid var(--admin-gold);
  border-radius: 12px;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0;
  }
  .mobile-toggle {
    display: flex;
  }
  .dashboard-grid {
    flex-direction: column;
  }
}

/* Photo Upload Dropzone */
.photo-dropzone {
  border: 2px dashed var(--admin-border-bright);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.photo-dropzone:hover, .photo-dropzone.dragover {
  background: rgba(212, 175, 55, 0.08);
  border-color: var(--admin-gold);
}

.dropzone-icon {
  width: 38px;
  height: 38px;
  fill: var(--admin-gold);
  opacity: 0.85;
}

.dropzone-text strong {
  display: block;
  font-size: 13px;
  color: #fff;
}

.dropzone-text span {
  font-size: 11px;
  color: var(--admin-text-muted);
}

.uploaded-gallery-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.preview-thumb-wrap {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--admin-border);
}

.preview-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-thumb-wrap .btn-remove-thumb {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: none;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
