/* ==========================================================================
   JOY PANEL - CYBER OBSIDIAN & ELECTRIC GOLD DESIGN SYSTEM
   Bespoke Luxury UI Framework for Sahibinden Intelligence Platform
   ========================================================================== */

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

:root {
  --bg-main: #07090e;
  --bg-surface: #0e1422;
  --bg-card: rgba(16, 23, 38, 0.78);
  --bg-card-hover: rgba(23, 33, 56, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-gold: rgba(245, 158, 11, 0.25);
  --border-gold-glow: rgba(245, 158, 11, 0.6);

  --gold-primary: #f59e0b;
  --gold-light: #fbbf24;
  --gold-dark: #b45309;
  --gold-gradient: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  --gold-gradient-hover: linear-gradient(135deg, #fcd34d 0%, #fbbf24 50%, #f59e0b 100%);
  --gold-glow: 0 0 20px rgba(245, 158, 11, 0.35);

  --cyan-accent: #06b6d4;
  --emerald-accent: #10b981;
  --rose-accent: #f43f5e;
  --indigo-accent: #6366f1;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --sidebar-width: 270px;
  --sidebar-collapsed-width: 80px;
}

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

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(245, 158, 11, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(6, 182, 212, 0.04) 0%, transparent 45%),
    linear-gradient(to bottom, rgba(7, 9, 14, 0.95), rgba(7, 9, 14, 1));
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: rgba(10, 14, 24, 0.7);
}
::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.6);
}

/* App Shell Layout */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  background: rgba(11, 16, 28, 0.85);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-gold);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-header {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-logo-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gold-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #07090e;
  font-size: 22px;
  box-shadow: var(--gold-glow);
}

.brand-info h1 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffffff 30%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.brand-info .brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 3px;
}

/* User Greeting Widget */
.sidebar-user-card {
  margin: 16px 16px 8px 16px;
  padding: 12px 14px;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #1e293b;
  border: 1px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--gold-light);
}

.user-text .greet-sub {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.user-text .user-name {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.5px;
}

/* Nav Menu */
.sidebar-nav {
  padding: 12px 14px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  padding: 12px 10px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.nav-item i {
  font-size: 17px;
  width: 20px;
  text-align: center;
  transition: transform 0.2s ease;
}

.nav-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.nav-item:hover i {
  transform: translateX(3px);
  color: var(--gold-primary);
}

.nav-item.active {
  background: var(--gold-gradient);
  color: #07090e;
  font-weight: 700;
  box-shadow: var(--gold-glow);
}

.nav-item.active i {
  color: #07090e;
}

.nav-item .nav-badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
}

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

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

/* Top Navigation Bar */
.top-navbar {
  height: 70px;
  background: rgba(11, 16, 28, 0.7);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.system-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #34d399;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulse-ring 2s infinite cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px #10b981; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

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

.client-security-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.client-security-badge span.accent {
  color: var(--gold-light);
  font-weight: 600;
}

/* Page Body Container */
.page-content {
  padding: 28px 32px 140px;
  flex: 1;
}

/* Hero / Welcome Banner */
.hero-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.95) 0%, rgba(217, 119, 6, 0.9) 100%);
  border-radius: 18px;
  padding: 26px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  color: #07090e;
  box-shadow: 0 12px 36px rgba(245, 158, 11, 0.22);
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.hero-text h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-text p {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.9;
  margin-top: 4px;
}

.hero-actions .btn-hero {
  background: #07090e;
  color: var(--gold-light);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.hero-actions .btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  background: #0f172a;
}

/* Stat Grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-3px);
  background: var(--bg-card-hover);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gold-primary);
  opacity: 0;
  transition: opacity 0.2s;
}

.stat-card:hover::after {
  opacity: 1;
}

.stat-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  font-size: 22px;
}

.stat-info .stat-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.6px;
}

.stat-info .stat-value {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
  margin-top: 2px;
}

/* Main Cards */
.joy-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 28px;
  transition: border-color 0.2s;
}

.joy-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.card-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

.card-title i {
  color: var(--gold-primary);
}

/* Buttons */
.btn-gold {
  background: var(--gold-gradient);
  color: #07090e;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--gold-glow);
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-gold:hover {
  background: var(--gold-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.5);
}

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

.btn-dark:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-emerald {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  transition: all 0.2s;
}

.btn-emerald:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

/* Form Elements */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.form-input, .form-select {
  width: 100%;
  background: rgba(7, 10, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-main);
  font-size: 14px;
  font-family: var(--font-body);
  transition: all 0.2s;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

/* Listings Table & Cards */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.joy-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.joy-table th {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  border-bottom: 1px solid var(--border-subtle);
}

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

.joy-table tr:hover td {
  background: rgba(245, 158, 11, 0.03);
}

/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.badge-gold {
  background: rgba(245, 158, 11, 0.12);
  color: var(--gold-light);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-rose {
  background: rgba(244, 63, 94, 0.12);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-kelepır,
.badge-kelepir {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  font-weight: 800;
  animation: fire-pulse 1.8s infinite ease-in-out;
}

@keyframes fire-pulse {
  0% { box-shadow: 0 0 5px rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 15px rgba(239, 68, 68, 0.8); }
  100% { box-shadow: 0 0 5px rgba(239, 68, 68, 0.4); }
}

/* Ada & Parsel Chip */
.parcel-chip {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Phone Number Button */
.phone-copy-btn {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.phone-copy-btn:hover {
  background: #10b981;
  color: #07090e;
}

/* Sorting Buttons & Pills */
.btn-sort-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-sort-pill:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: var(--gold-light);
  transform: translateY(-1px);
}

.btn-sort-pill.active {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold-primary));
  border-color: var(--gold-primary);
  color: #050811;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-sort-pill.active i {
  color: #050811;
}

/* Fixed Bottom Bot Log Terminal (As requested and shown in screenshot) */
.bot-terminal-footer {
  position: fixed;
  bottom: 0;
  left: var(--sidebar-width);
  right: 0;
  height: 125px;
  background: rgba(9, 12, 20, 0.95);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-gold);
  z-index: 95;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bot-terminal-footer.expanded {
  height: 320px;
}

.terminal-header {
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
}

.terminal-header .terminal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--gold-light);
  font-family: var(--font-mono);
}

.terminal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.terminal-action-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 12px;
  transition: color 0.2s;
}

.terminal-action-btn:hover {
  color: var(--text-main);
}

.terminal-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.6;
  color: #cbd5e1;
}

.log-line {
  margin-bottom: 3px;
  word-break: break-all;
}

.log-time {
  color: var(--gold-primary);
  font-weight: 600;
  margin-right: 6px;
}

.log-tag-info {
  color: #38bdf8;
  font-weight: 600;
}

.log-tag-success {
  color: #34d399;
  font-weight: 700;
}

.log-tag-warning {
  color: #fbbf24;
  font-weight: 600;
}

.log-tag-error {
  color: #f87171;
  font-weight: 700;
}

/* Login Screen Dedicated Styles */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(14, 20, 34, 0.85);
  backdrop-filter: blur(25px);
  border: 1px solid var(--border-gold);
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), var(--gold-glow);
  position: relative;
  z-index: 10;
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 28px;
}

.hwid-pill {
  margin-top: 18px;
  padding: 8px 14px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  font-size: 11px;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
}

/* Toast Notifications */
.joy-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.joy-toast {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-gold);
  padding: 14px 20px;
  border-radius: 12px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive Rules */
@media (max-width: 1024px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
  .app-main {
    margin-left: 0;
  }
  .bot-terminal-footer {
    left: 0;
  }
}

/* ==========================================================================
   JOY GALLERY LIGHTBOX & PHOTO VIEWER
   ========================================================================== */
.table-img-wrap {
  position: relative;
  display: inline-block;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  width: 52px;
  height: 52px;
}

.table-img-wrap:hover {
  transform: scale(1.1);
  border-color: var(--gold-primary);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.5);
}

.table-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.table-img-wrap .img-count-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.88);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: var(--gold-light);
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 3px;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.joy-gallery-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(5, 7, 12, 0.94);
  backdrop-filter: blur(14px);
  animation: joyFadeIn 0.2s ease-out;
  flex-direction: column;
  justify-content: space-between;
}

.joy-gallery-modal.active {
  display: flex;
}

.joy-gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 20, 34, 0.85);
  z-index: 10;
}

.joy-gallery-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 20px 40px;
  overflow: hidden;
  user-select: none;
}

.joy-gallery-main-img {
  max-width: 88vw;
  max-height: 66vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.joy-gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(14, 20, 34, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--text-main);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 5;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.joy-gallery-nav-btn:hover {
  background: var(--gold-primary);
  color: #000;
  border-color: var(--gold-light);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
}

.joy-gallery-nav-prev { left: 24px; }
.joy-gallery-nav-next { right: 24px; }

.joy-gallery-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 20, 34, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}

.joy-gallery-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  max-width: 90vw;
  padding: 6px 12px;
  scrollbar-width: thin;
}

.joy-gallery-thumb-item {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.5;
  transition: all 0.2s ease;
}

.joy-gallery-thumb-item:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.joy-gallery-thumb-item.active {
  opacity: 1;
  border-color: var(--gold-primary);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.7);
  transform: translateY(-2px) scale(1.05);
}

.joy-gallery-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@keyframes joyFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

