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

/* ===== DESIGN TOKENS ===== */
:root {
  --bg-primary: #090e1a;
  --bg-secondary: #0f172a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.15);

  --accent: #6c63ff;
  --accent-light: #8b83ff;
  --accent-dark: #4f46e5;
  --accent-glow: rgba(108, 99, 255, 0.3);

  --pink: #f472b6;
  --cyan: #22d3ee;
  --emerald: #34d399;
  --amber: #fbbf24;
  --rose: #fb7185;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 100px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--accent-glow);

  --nav-width: 240px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-border-hover: rgba(0, 0, 0, 0.15);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 40px rgba(108, 99, 255, 0.15);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

input, textarea {
  font-family: inherit;
  outline: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ===== BACKGROUND ORBS ===== */
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-orbs::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.12) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  animation: orbFloat 8s ease-in-out infinite;
}

.bg-orbs::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.08) 0%, transparent 70%);
  bottom: -150px;
  left: -100px;
  animation: orbFloat 10s ease-in-out infinite reverse;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ===== LAYOUT ===== */
.app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* ===== SIDEBAR NAV ===== */
.sidebar {
  width: 260px;
  height: calc(100vh - 60px);
  height: calc(100dvh - 60px);
  position: fixed;
  left: 0;
  top: 60px;
  z-index: 1001;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  transform: translate3d(-100%, 0, 0);
  will-change: transform;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
}

.sidebar.open {
  transform: translate3d(0, 0, 0);
}

.sidebar .sidebar-logo {
  display: none;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  margin-bottom: 32px;
}

.sidebar-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-logo .logo-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.sidebar-logo .logo-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.nav-group-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 12px;
  margin-bottom: 8px;
  margin-top: 8px;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-links a .nav-icon {
  font-size: 17px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--glass-border);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.nav-links a:hover .nav-icon {
  transform: scale(1.15) rotate(-4deg);
}

.nav-links a.active,
.nav-links li.active > a,
.nav-links a[data-active="true"],
.sidebar a.active,
.sidebar a[data-active="true"] {
  color: #ffffff !important;
  background: linear-gradient(135deg, #6c63ff 0%, #8b83ff 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.4), 0 0 14px rgba(108, 99, 255, 0.3) !important;
  transform: translateX(0) !important;
}

.nav-links a.active .nav-icon,
.nav-links li.active > a .nav-icon,
.nav-links a[data-active="true"] .nav-icon,
.sidebar a.active .nav-icon,
.sidebar a[data-active="true"] .nav-icon {
  transform: scale(1.2) !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)) !important;
}

.nav-links a.active::before,
.nav-links li.active > a::before,
.nav-links a[data-active="true"]::before,
.sidebar a.active::before,
.sidebar a[data-active="true"]::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 5px !important;
  height: 60% !important;
  background: #ffffff !important;
  border-radius: 0 6px 6px 0 !important;
  box-shadow: 0 0 10px #ffffff !important;
}

.sidebar-bottom {
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.user-role {
  font-size: 11px;
  color: var(--text-muted);
}

.logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  transition: var(--transition);
}

.logout-btn:hover {
  color: var(--rose);
  background: rgba(251, 113, 133, 0.08);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: 0;
  flex: 1;
  padding: 92px 36px 36px 36px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

/* ===== PAGE HEADER ===== */
.page-header {
  margin-bottom: 32px;
  animation: fadeInDown 0.5s ease;
}

.page-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.page-title span {
  background: linear-gradient(135deg, var(--accent-light), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== GLASS CARD ===== */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.glass-card:hover {
  border-color: var(--glass-border-hover);
  background: var(--bg-card-hover);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-ghost {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

.btn-ghost:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--glass-border-hover);
}

.btn-danger {
  background: rgba(251, 113, 133, 0.12);
  color: var(--rose);
  border: 1px solid rgba(251, 113, 133, 0.2);
}

.btn-danger:hover {
  background: rgba(251, 113, 133, 0.2);
}

.btn:disabled,
button:disabled,
.btn.is-loading,
button.is-loading,
.send-btn.is-loading {
  opacity: 0.75;
  cursor: not-allowed !important;
  pointer-events: none !important;
  transform: none !important;
  box-shadow: none !important;
}

.btn.is-loading,
button.is-loading,
.send-btn.is-loading {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

.btn-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  animation: btnSpinnerRotate 0.65s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  vertical-align: middle;
  flex-shrink: 0;
}

.btn-spinner-sm {
  width: 12px;
  height: 12px;
  border-width: 1.5px;
}

.btn-spinner-lg {
  width: 18px;
  height: 18px;
  border-width: 2.5px;
}

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

/* ===== GLOBAL TAB SWITCHER (Alışkanlıklar / Geziler / Etkinlikler) ===== */
.travel-events-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  padding: 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  margin-top: 8px;
  margin-bottom: 24px;
  backdrop-filter: blur(12px);
}

.te-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.te-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.te-tab-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark, #4f46e5));
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 4px 14px var(--accent-glow, rgba(108, 99, 255, 0.4));
  border-color: rgba(255, 255, 255, 0.15);
}

.te-tab-badge-lock {
  font-size: 10px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.9);
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ===== INPUTS ===== */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.input-field {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 12px 18px;
  font-size: 14px;
  color: var(--text-primary);
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

textarea.input-field {
  border-radius: 18px;
}

.input-field:focus {
  border-color: var(--accent);
  background-color: rgba(108, 99, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.12);
}

.input-field::placeholder {
  color: var(--text-muted);
}

select,
select.input-field,
.form-select,
.en-quiz-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border: 1px solid var(--glass-border);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 16px !important;
  padding-right: 38px;
  cursor: pointer;
  border-radius: var(--radius-md);
}

select:hover,
select.input-field:hover,
.form-select:hover,
.en-quiz-select:hover {
  border-color: var(--accent);
}

select:focus,
select.input-field:focus,
.form-select:focus,
.en-quiz-select:focus {
  outline: none;
  border-color: var(--accent);
  background-color: #1e293b !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c63ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 16px !important;
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15) !important;
}

select option,
select.input-field option,
.form-select option,
.en-quiz-select option {
  background-color: #1e293b !important;
  color: #ffffff !important;
  padding: 10px 14px;
}

[data-theme="light"] select,
[data-theme="light"] select.input-field,
[data-theme="light"] .form-select,
[data-theme="light"] .en-quiz-select,
html[data-theme="light"] select,
html[data-theme="light"] select.input-field,
html[data-theme="light"] .form-select,
html[data-theme="light"] .en-quiz-select {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 16px !important;
}

[data-theme="light"] select:focus,
[data-theme="light"] select.input-field:focus,
[data-theme="light"] .form-select:focus,
[data-theme="light"] .en-quiz-select:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] select.input-field:focus,
html[data-theme="light"] .form-select:focus,
html[data-theme="light"] .en-quiz-select:focus {
  background-color: #ffffff !important;
  border-color: var(--accent) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c63ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 16px !important;
}

[data-theme="light"] select option,
[data-theme="light"] select.input-field option,
[data-theme="light"] .form-select option,
[data-theme="light"] .en-quiz-select option,
html[data-theme="light"] select option,
html[data-theme="light"] select.input-field option,
html[data-theme="light"] .form-select option,
html[data-theme="light"] .en-quiz-select option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

/* ===== MODAL & SCROLL LOCK ===== */
body.modal-open {
  overflow: hidden !important;
}

.modal-overlay {
  overscroll-behavior: contain;
}

.modal {
  overscroll-behavior: contain;
}

.sidebar-admin-access {
  margin-top: 12px;
  margin-bottom: 8px;
}

.nav-admin-access {
  width: 100%;
  justify-content: center;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
}

.nav-admin-access.is-active {
  background: rgba(52, 211, 153, 0.14);
  color: var(--emerald);
  border-color: rgba(52, 211, 153, 0.24);
}

.admin-access-form .input-group {
  margin-bottom: 0;
}

.admin-access-error {
  min-height: 20px;
  color: var(--rose);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

/* ===== CONFIRM DELETE MODAL (GLOBAL) ===== */
.confirm-delete-modal {
  max-width: 440px !important;
  width: 92%;
}

.confirm-delete-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 0;
}

.confirm-delete-icon {
  width: 60px;
  height: 60px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--rose);
  font-size: 28px;
  margin-bottom: 16px;
}

.confirm-delete-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.35;
}

html[data-theme="light"] .confirm-delete-title {
  color: #0f172a;
}

.confirm-delete-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 22px;
  word-break: break-word;
  max-width: 100%;
}

.confirm-delete-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  width: 100%;
}

.confirm-delete-actions .btn {
  flex: 1;
  padding: 11px 18px;
  font-weight: 700;
  font-size: 14px;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  border: 1px solid rgba(239, 68, 68, 0.6) !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35) !important;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.5) !important;
  transform: translateY(-1px);
}

/* Mobile input zoom prevention */
@media screen and (max-width: 768px) {
  input,
  textarea,
  select,
  .form-control,
  .form-input,
  .search-input,
  .en-search-input,
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"] {
    font-size: 16px !important;
  }
}

/* ===== PROMINENT HERO DATE BADGE ===== */
.hero-date {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-top: 20px !important;
  padding: 10px 20px !important;
  border-radius: var(--radius-pill) !important;
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.15), rgba(34, 211, 238, 0.1)) !important;
  border: 1px solid rgba(108, 99, 255, 0.35) !important;
  color: var(--text-primary) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.18) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  width: fit-content !important;
  letter-spacing: 0.02em !important;
  transition: all 0.25s ease !important;
}
.hero-date:hover {
  border-color: var(--accent-light) !important;
  box-shadow: 0 6px 24px rgba(108, 99, 255, 0.3) !important;
  transform: translateY(-1px) !important;
}
[data-theme="light"] .hero-date {
  background: linear-gradient(135deg, #ffffff, #f0fdf4) !important;
  border-color: rgba(108, 99, 255, 0.35) !important;
  color: #0f172a !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
}
.hero-date-icon {
  font-size: 18px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.hero-date-text {
  color: var(--text-primary);
  font-weight: 700;
}
.hero-date-time {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(108, 99, 255, 0.2);
  color: var(--accent-light);
  font-weight: 800;
  font-size: 13px;
  font-family: monospace;
}
[data-theme="light"] .hero-date-time {
  background: rgba(108, 99, 255, 0.15);
  color: #4f46e5;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100000 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 20px;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  padding: 28px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.2s ease;
  box-shadow: var(--shadow-lg);
  scrollbar-width: thin;
  scrollbar-color: var(--glass-border) transparent;
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ===== MODAL CLOSE BUTTON (UNIVERSAL RED-HOVER CIRCLE) ===== */
.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  outline: none;
}

.modal-close:hover {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

.modal-close:active {
  background: #dc2626 !important;
}

html[data-theme="light"] .modal-close {
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: var(--text-primary);
}

html[data-theme="light"] .modal-close:hover {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

/* ===== BADGE / TAG ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-accent {
  background: rgba(108, 99, 255, 0.15);
  color: var(--accent-light);
  border: 1px solid rgba(108, 99, 255, 0.25);
}

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

.badge-amber {
  background: rgba(251, 191, 36, 0.12);
  color: var(--amber);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

/* ===== STAT CARD ===== */
.stat-card {
  padding: 20px 24px;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--pink));
  opacity: 0;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
}

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

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
  font-weight: 500;
}

.stat-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 260px;
  animation: toastIn 0.3s ease;
  pointer-events: auto;
}

.toast.success { border-left: 3px solid var(--emerald); }
.toast.error { border-left: 3px solid var(--rose); }
.toast.info { border-left: 3px solid var(--accent); }

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

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

/* ===== ANIMATIONS ===== */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.animate-fade-in { animation: fadeIn 0.4s ease; }
.animate-fade-up { animation: fadeInUp 0.4s ease; }
.animate-scale { animation: scaleIn 0.4s ease; }

/* ===== GRID ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }

/* ===== DIVIDER ===== */
.divider {
  height: 1px;
  background: var(--glass-border);
  margin: 20px 0;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  gap: 12px;
}

.empty-state .empty-icon {
  font-size: 48px;
  opacity: 0.4;
}

.empty-state .empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

.empty-state .empty-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.btn-text-full {
  display: inline;
}
.btn-text-short {
  display: none;
}

/* ===== TOP HEADER & HAMBURGER ===== */
.mobile-header {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg-secondary);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0 20px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 1002;
  box-shadow: var(--shadow-sm);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease;
  will-change: transform;
}

.mobile-header.header-hidden {
  transform: translateY(-100%) !important;
  pointer-events: none !important;
}

.top-controls-bar.header-hidden {
  transform: translateY(-120%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.fb-dynamic-island.header-hidden {
  transform: translateY(-150%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.mobile-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-logo-icon {
  width: 34px;
  height: 34px;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-logo-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.hamburger-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--glass-border-hover);
}

.hamburger-bar {
  width: 18px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  will-change: transform, opacity;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.hamburger-btn.is-active .hamburger-bar:nth-child(1) {
  transform: translate3d(0, 6px, 0) rotate(45deg);
}

.hamburger-btn.is-active .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.is-active .hamburger-bar:nth-child(3) {
  transform: translate3d(0, -6px, 0) rotate(-45deg);
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  :root { --nav-width: 200px; }
  .main-content { padding: 92px 24px 24px 24px !important; }
}

@media (max-width: 768px) {
  /* Prevent horizontal overflow globally */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .app-layout {
    overflow-x: hidden;
    width: 100%;
  }

  .mobile-header {
    height: 60px;
    padding: 0 14px;
    padding-top: env(safe-area-inset-top, 0px);
    z-index: 1002;
  }

  .sidebar {
    top: 60px;
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px);
    padding: 16px 14px;
    padding-bottom: max(28px, env(safe-area-inset-bottom, 20px));
    width: min(82vw, 300px);
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .main-content {
    padding: 86px 16px 32px 16px !important;
    padding-bottom: max(32px, env(safe-area-inset-bottom, 20px)) !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  .page-header {
    margin-bottom: 22px;
  }

  .page-title {
    font-size: 22px !important;
    line-height: 1.25 !important;
    word-break: break-word;
  }

  .page-subtitle {
    font-size: 13px !important;
    margin-top: 4px;
  }

  .welcome-hero {
    padding: 20px 16px !important;
    margin-bottom: 22px !important;
    border-radius: var(--radius-lg) !important;
  }
  .hero-greeting {
    font-size: 12px !important;
    margin-bottom: 6px !important;
  }
  .hero-name {
    font-size: clamp(21px, 5.5vw, 28px) !important;
    line-height: 1.25 !important;
    word-break: break-word;
  }
  .hero-desc {
    font-size: 13px !important;
    margin-top: 8px !important;
    line-height: 1.6 !important;
  }
  .hero-date {
    margin-top: 12px !important;
    padding: 7px 14px !important;
    font-size: 12px !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    max-width: 100% !important;
  }
  .hero-quick-links {
    margin-top: 14px !important;
    gap: 6px !important;
  }
  .quick-link {
    padding: 7px 12px !important;
    font-size: 12px !important;
    min-height: 36px !important;
  }

  .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid-2 { grid-template-columns: 1fr; gap: 12px; }

  /* Modals on Mobile */
  .modal-overlay {
    padding: 12px;
    align-items: center;
    justify-content: center;
    z-index: 10010;
  }
  .modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(100vh - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
    padding: 20px 16px 24px 16px !important;
    border-radius: 20px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .modal-header {
    margin-bottom: 16px;
  }
  .modal-title {
    font-size: 17px !important;
  }

  .mobile-header-title {
    display: none !important;
  }

  .top-controls-bar {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    right: 12px !important;
    height: 60px !important;
    align-items: center !important;
    gap: 4px !important;
    overflow: visible !important;
    z-index: 1003 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 0 !important;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease !important;
    will-change: transform;
  }

  .top-control-btn {
    padding: 5px 8px !important;
    font-size: 11.5px !important;
    height: 32px !important;
    min-height: 32px !important;
    border-radius: var(--radius-pill) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid var(--glass-border) !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .btn-text-full {
    display: none !important;
  }
  .btn-text-short {
    display: inline !important;
  }

  [data-theme="light"] .top-control-btn,
  html[data-theme="light"] .top-control-btn,
  body.light-theme .top-control-btn,
  html.light-theme .top-control-btn {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
  }

  /* Responsive generic table wrappers */
  .table-responsive,
  .portfolio-table-wrap,
  .dinner-table-container,
  .weekly-grid {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

@media (max-width: 580px) {
  .grid-2, .grid-3, .grid-4, .grid-5:not(#stats-row) {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  
  /* Stack inline modal form 2-column grids */
  .modal form [style*="grid-template-columns"],
  .modal [style*="grid-template-columns"],
  .en-modal-dialog [style*="grid-template-columns"],
  .contact-form-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .modal-actions,
  .modal-footer,
  .confirm-delete-actions {
    flex-direction: column-reverse !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .modal-actions .btn,
  .modal-footer .btn,
  .confirm-delete-actions .btn {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* Homepage stats row: always side by side on all screens */
#stats-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

@media (max-width: 900px) {
  #stats-row {
    display: flex !important;
    gap: 10px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding-bottom: 6px !important;
    width: 100% !important;
  }
  #stats-row::-webkit-scrollbar {
    display: none !important;
  }
  #stats-row .stat-card {
    min-width: 120px !important;
    flex: 1 0 auto !important;
    padding: 14px 12px !important;
  }
  #stats-row .stat-value {
    font-size: 22px !important;
  }
  #stats-row .stat-icon {
    font-size: 22px !important;
    margin-bottom: 6px !important;
  }
  #stats-row .stat-label {
    font-size: 11px !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 82px 10px 24px 10px !important;
  }
  .welcome-hero {
    padding: 16px 12px !important;
    margin-bottom: 18px !important;
  }
  .hero-name {
    font-size: 20px !important;
  }
  .mobile-header {
    padding: 0 10px;
  }
  .top-controls-bar {
    right: 8px !important;
    gap: 2px !important;
  }
  .top-control-btn {
    padding: 4px 6px !important;
    font-size: 10.5px !important;
    height: 30px !important;
    min-height: 30px !important;
    flex-shrink: 0 !important;
  }
  .hero-date {
    font-size: 11px !important;
    padding: 6px 10px !important;
  }
  .hero-date-time {
    font-size: 11px !important;
  }
}

@media (max-width: 360px) {
  .top-controls-bar {
    gap: 2px !important;
  }
  .top-control-btn {
    padding: 3px 5px !important;
    font-size: 10px !important;
  }
  .hero-name {
    font-size: 18px !important;
  }
}

/* ===== TOP CONTROLS DROPDOWN ===== */
.top-controls-dropdown {
  position: absolute;
  top: 54px;
  right: 0;
  width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: none;
  flex-direction: column;
  gap: 8px;
  z-index: 10005;
  animation: fadeInDown 0.2s ease;
}

.top-controls-dropdown.open {
  display: flex !important;
}

.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  color: var(--text-primary);
}

.dropdown-item-btn {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.dropdown-item-btn.danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.dropdown-item-btn.primary {
  background: var(--accent);
  color: white;
}

/* ===== WELCOME HERO BANNER ===== */
.welcome-hero {
  padding: 32px 36px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  margin-bottom: 28px;
  position: relative;
  overflow: visible;
  animation: fadeInUp 0.5s ease;
}
.welcome-hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(108, 99, 255, 0.08) 0%,
    transparent 70%
  );
  pointer-events: none;
}
.hero-greeting {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.hero-name {
  font-size: 34px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.hero-name .gradient-text {
  background: linear-gradient(135deg, var(--accent-light), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 12px;
  max-width: 520px;
  line-height: 1.6;
}
.hero-date {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-quick-links {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.quick-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.quick-link:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: rgba(108, 99, 255, 0.08);
  transform: translateY(-1px);
}
.quick-link.active {
  background: rgba(108, 99, 255, 0.15);
  border-color: var(--accent);
  color: var(--accent-light);
}

.cv-download-btn {
  margin-left: auto;
  background: linear-gradient(135deg, var(--accent), #e8674a) !important;
  color: white !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 4px 16px rgba(232, 103, 74, 0.35);
  font-weight: 700 !important;
  letter-spacing: 0.01em;
}

.cv-download-btn:hover {
  transform: translateY(-2px) scale(1.03) !important;
  box-shadow: 0 6px 22px rgba(232, 103, 74, 0.5) !important;
  background: linear-gradient(135deg, #7c3aed, #f5b860) !important;
  color: white !important;
}

@media (max-width: 768px) {
  .cv-download-btn {
    margin-left: 0;
    width: 100%;
    justify-content: center;
    margin-top: 4px;
  }
}

/* ===== GLOBAL SKELETON LOADING EFFECT ===== */
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  width: 100%;
}

.skeleton-card {
  min-height: 180px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton-line {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}
.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 75%; }
.skeleton-line.long { width: 100%; }

.skeleton-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

/* ===== MODAL CANCEL BUTTON PADDING ===== */
.btn-ghost,
.modal-close-btn,
button.btn-ghost,
button.modal-close-btn {
  padding: 10px 22px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  min-height: 40px !important;
}

/* ===== INPUT TYPING PERFORMANCE OPTIMIZATION ===== */
.modal {
  transform: translateZ(0);
  will-change: transform;
}

.input-field {
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease !important;
}

/* ===== LOGO & CONTROL POINTER CURSOR ===== */
.sidebar-logo,
.sidebar-logo *,
.mobile-header-title,
.mobile-header-title *,
#theme-toggle,
#top-theme-btn,
#top-lang-btn,
#lang-tr,
#lang-en {
  cursor: pointer !important;
  user-select: none;
}

/* ===== TOP-RIGHT CONTROLS BAR ===== */
.top-controls-bar {
  position: fixed;
  top: 8px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
}

[data-theme="light"] .top-controls-bar,
html[data-theme="light"] .top-controls-bar,
body.light-theme .top-controls-bar,
html.light-theme .top-controls-bar {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.top-control-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  text-decoration: none;
}

.top-control-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

[data-theme="light"] .top-control-btn:hover,
html[data-theme="light"] .top-control-btn:hover,
body.light-theme .top-control-btn:hover,
html.light-theme .top-control-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}

.top-control-btn.admin-active {
  background: rgba(52, 211, 153, 0.16);
  color: var(--emerald);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.top-control-btn.top-logout-btn {
  background: rgba(251, 113, 133, 0.14);
  color: var(--rose);
  border: 1px solid rgba(251, 113, 133, 0.25);
}

.top-control-btn.top-logout-btn:hover {
  background: rgba(251, 113, 133, 0.24);
}

.top-control-btn.live-active {
  background: rgba(243, 178, 0, 0.2) !important;
  color: #F3B200 !important;
  border: 1px solid rgba(243, 178, 0, 0.5) !important;
  box-shadow: 0 0 12px rgba(243, 178, 0, 0.3);
}

/* ===== FENERBAHÇE DYNAMIC ISLAND LIVE SCORE WIDGET ===== */
.fb-dynamic-island {
  position: absolute;
  top: 24px;
  right: 28px;
  display: none;
  align-items: center;
  z-index: 100;
}

.fb-dynamic-island.active {
  display: inline-flex !important;
}

.island-pill-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.island-collapsed {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #002D72, #001838);
  border: 1px solid #F3B200;
  color: white;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(243, 178, 0, 0.35);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.island-collapsed:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(243, 178, 0, 0.5);
  border-color: #ffe066;
}

.island-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulseRed 1.5s infinite;
}

@keyframes pulseRed {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.island-score-text {
  color: #F3B200;
  font-weight: 800;
}

.island-expanded-popover {
  position: absolute;
  right: 0;
  top: 0;
  width: 385px;
  background: linear-gradient(135deg, rgba(0, 30, 80, 0.98), rgba(15, 23, 42, 0.98));
  border: 2px solid #F3B200;
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 30px rgba(243, 178, 0, 0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.9) translateY(-6px);
  transform-origin: top right;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 10005;
  color: white;
}

.island-pill-wrapper:hover .island-expanded-popover,
.island-expanded-popover:hover {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

@media (max-width: 768px) {
  .fb-dynamic-island {
    position: relative;
    top: auto;
    right: auto;
    margin-bottom: 12px;
    width: 100%;
    justify-content: flex-end;
  }
  .island-expanded-popover {
    right: 0;
    top: 36px;
    width: 320px;
    max-width: 88vw;
  }
}

.island-pop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.island-pop-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #f87171;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
}

.island-pop-league {
  font-size: 11px;
  font-weight: 700;
  color: #F3B200;
}

.island-pop-scoreboard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.island-pop-team {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
  min-width: 0;
}

.island-team-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.island-team-icon {
  flex-shrink: 0;
  font-size: 16px;
}

.island-pop-score {
  background: #F3B200;
  color: #002D72;
  font-size: 16px;
  font-weight: 900;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 10px rgba(243, 178, 0, 0.4);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.05em;
  line-height: 1;
}

.island-pop-info {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}

.island-pop-goals-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.95);
}

.home-goals {
  text-align: left;
}

.away-goals {
  text-align: right;
}

.island-pop-cards-split {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

.home-cards {
  text-align: left;
}

.away-cards {
  text-align: right;
}

/* ===== FENERBAHÇE FIXTURE WIDGET ===== */
.fb-fixture-card {
  background: linear-gradient(135deg, rgba(0, 45, 114, 0.35), rgba(15, 23, 42, 0.75));
  border: 1px solid rgba(243, 178, 0, 0.35);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.fb-fixture-card::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(243, 178, 0, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.fb-fixture-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.fb-fixture-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fb-logo-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #002D72, #001838);
  border: 2px solid #F3B200;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 14px rgba(243, 178, 0, 0.3);
}

.fb-fixture-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.fb-fixture-sub {
  font-size: 12px;
  color: var(--accent-light);
  font-weight: 600;
}

.fb-match-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}.fb-match-item {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
  overflow: hidden;
  position: relative;
}

.fb-match-item:hover {
  border-color: #F3B200;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(243, 178, 0, 0.15);
}

.fb-match-item.next-up {
  border: 2px solid #F3B200 !important;
  background: linear-gradient(135deg, rgba(243, 178, 0, 0.18), rgba(0, 45, 114, 0.38));
  box-shadow: 0 8px 30px rgba(243, 178, 0, 0.22), 0 0 15px rgba(243, 178, 0, 0.18);
  transform: scale(1.025);
  z-index: 3;
}

.fb-match-item.next-up:hover {
  transform: scale(1.04) translateY(-3px);
  box-shadow: 0 12px 36px rgba(243, 178, 0, 0.35), 0 0 20px rgba(243, 178, 0, 0.25);
}

/* Oynanmış / Geçmiş Maçlar — Daha da Silik ve Soluk */
.fb-match-item.is-played {
  opacity: 0.45;
  filter: grayscale(35%);
  transition: all 0.25s ease;
}

.fb-match-item.is-played:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Sonuca Göre Tüm Border'ların Boyanması */
.fb-match-item.is-played.match-win {
  border: 1.5px solid rgba(16, 185, 129, 0.65) !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(255, 255, 255, 0.02));
}

.fb-match-item.is-played.match-loss {
  border: 1.5px solid rgba(239, 68, 68, 0.65) !important;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(255, 255, 255, 0.02));
}

.fb-match-item.is-played.match-draw {
  border: 1.5px solid rgba(148, 163, 184, 0.5) !important;
  background: rgba(255, 255, 255, 0.02);
}

/* Durum Rozeti (Sağ Üst) */
.fb-match-status-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.fb-match-status-badge.badge-win {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.fb-match-status-badge.badge-loss {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.fb-match-status-badge.badge-draw {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.fb-match-status-badge.badge-next {
  background: rgba(243, 178, 0, 0.25);
  color: #F3B200;
  border: 1px solid rgba(243, 178, 0, 0.6);
  box-shadow: 0 0 10px rgba(243, 178, 0, 0.3);
  animation: pulse 2s infinite;
}

.fb-match-status-badge.badge-upcoming {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
}

/* Skor / Saat Kutusu */
.fb-score-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: var(--radius-md);
  min-width: 68px;
  flex-shrink: 0;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.25);
}

.fb-score-pill.played {
  background: rgba(243, 178, 0, 0.12);
  border-color: rgba(243, 178, 0, 0.35);
}

.fb-score-pill .score-val {
  font-size: 16px;
  font-weight: 900;
  color: #F3B200;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.fb-score-pill .score-ms-label {
  font-size: 9px;
  font-weight: 800;
  color: #10b981;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fb-score-pill.pending .score-time {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.fb-score-pill.pending .score-vs-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.fb-match-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.fb-comp-tag {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  white-space: nowrap;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fb-comp-tag.uefa {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.fb-comp-tag.superlig {
  background: rgba(243, 178, 0, 0.2);
  color: #F3B200;
  border: 1px solid rgba(243, 178, 0, 0.3);
}

.fb-match-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.fb-team-box {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  max-width: 44%;
}

.fb-team-box.home-team {
  justify-content: flex-start;
}

.fb-team-box.away-team {
  justify-content: flex-end;
}

.fb-team-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: calc(100% - 42px);
}

.fb-team-box.away-team .fb-team-name {
  text-align: right;
}

.fb-team-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1;
  width: 38px;
  min-width: 38px;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
}

.emoji-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .fb-match-grid {
    grid-template-columns: 1fr;
  }
  .fb-team-box {
    max-width: 47%;
    font-size: 12px;
  }
  .fb-team-icon {
    min-width: 32px;
    width: 32px;
  }
  .emoji-dot {
    font-size: 13px;
    width: 15px;
    height: 15px;
  }
}

.fb-match-venue {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== FENERBAHÇE LIGHT THEME OVERRIDES ===== */
[data-theme="light"] .fb-fixture-card,
html[data-theme="light"] .fb-fixture-card,
body.light-theme .fb-fixture-card,
html.light-theme .fb-fixture-card {
  background: linear-gradient(135deg, rgba(235, 243, 255, 0.95), rgba(255, 255, 255, 0.95));
  border: 1px solid rgba(0, 45, 114, 0.2);
  box-shadow: 0 8px 32px rgba(0, 45, 114, 0.08);
}

[data-theme="light"] .fb-fixture-title,
html[data-theme="light"] .fb-fixture-title,
body.light-theme .fb-fixture-title,
html.light-theme .fb-fixture-title {
  color: #002D72;
}

[data-theme="light"] .fb-fixture-sub,
html[data-theme="light"] .fb-fixture-sub,
body.light-theme .fb-fixture-sub,
html.light-theme .fb-fixture-sub {
  color: #1d4ed8;
}

[data-theme="light"] .fb-match-item,
html[data-theme="light"] .fb-match-item,
body.light-theme .fb-match-item,
html.light-theme .fb-match-item {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .fb-match-item.next-up,
html[data-theme="light"] .fb-match-item.next-up,
body.light-theme .fb-match-item.next-up,
html.light-theme .fb-match-item.next-up {
  border-color: #f59e0b;
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.5), rgba(255, 255, 255, 0.9));
}

[data-theme="light"] .fb-team-box,
html[data-theme="light"] .fb-team-box,
body.light-theme .fb-team-box,
html.light-theme .fb-team-box {
  color: #0f172a;
}

[data-theme="light"] .fb-match-top,
html[data-theme="light"] .fb-match-top,
body.light-theme .fb-match-top,
html.light-theme .fb-match-top {
  color: #64748b;
}
[data-theme="light"] .fb-score-pill,
html[data-theme="light"] .fb-score-pill,
body.light-theme .fb-score-pill,
html.light-theme .fb-score-pill {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .fb-score-pill.played,
html[data-theme="light"] .fb-score-pill.played,
body.light-theme .fb-score-pill.played,
html.light-theme .fb-score-pill.played {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}

[data-theme="light"] .fb-score-pill.played .score-val,
html[data-theme="light"] .fb-score-pill.played .score-val,
body.light-theme .fb-score-pill.played .score-val,
html.light-theme .fb-score-pill.played .score-val {
  color: #b45309;
}

[data-theme="light"] .fb-match-item.is-played,
html[data-theme="light"] .fb-match-item.is-played,
body.light-theme .fb-match-item.is-played,
html.light-theme .fb-match-item.is-played {
  background: #f8fafc;
  opacity: 0.45;
  filter: grayscale(35%);
}

[data-theme="light"] .fb-match-item.is-played:hover,
html[data-theme="light"] .fb-match-item.is-played:hover,
body.light-theme .fb-match-item.is-played:hover,
html.light-theme .fb-match-item.is-played:hover {
  opacity: 1;
  filter: grayscale(0%);
}

[data-theme="light"] .fb-match-item.is-played.match-win,
html[data-theme="light"] .fb-match-item.is-played.match-win,
body.light-theme .fb-match-item.is-played.match-win,
html.light-theme .fb-match-item.is-played.match-win {
  border-color: rgba(16, 185, 129, 0.6) !important;
  background: #f0fdf4;
}

[data-theme="light"] .fb-match-item.is-played.match-loss,
html[data-theme="light"] .fb-match-item.is-played.match-loss,
body.light-theme .fb-match-item.is-played.match-loss,
html.light-theme .fb-match-item.is-played.match-loss {
  border-color: rgba(239, 68, 68, 0.6) !important;
  background: #fef2f2;
}

[data-theme="light"] .fb-match-venue,
html[data-theme="light"] .fb-match-venue,
body.light-theme .fb-match-venue,
html.light-theme .fb-match-venue {
  color: #475569;
}

[data-theme="light"] .fb-comp-tag.uefa,
html[data-theme="light"] .fb-comp-tag.uefa,
body.light-theme .fb-comp-tag.uefa,
html.light-theme .fb-comp-tag.uefa {
  background: rgba(59, 130, 246, 0.15);
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.35);
}

[data-theme="light"] .fb-comp-tag.superlig,
html[data-theme="light"] .fb-comp-tag.superlig,
body.light-theme .fb-comp-tag.superlig,
html.light-theme .fb-comp-tag.superlig {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.35);
}

/* ===== GLOBAL FOOTER ===== */
.site-footer {
  margin-top: 80px;
  padding: 40px 24px 28px;
  border-top: 1px solid var(--glass-border);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  transition: var(--transition);
  flex-shrink: 0;
}

[data-theme="light"] .site-footer,
html[data-theme="light"] .site-footer,
body.light-theme .site-footer,
html.light-theme .site-footer {
  background: rgba(255, 255, 255, 0.85);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.03);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

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

.footer-brand .logo-icon {
  width: 36px;
  height: 36px;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 3px 10px rgba(232, 103, 74, 0.35));
  transition: transform 0.2s ease;
}

.sidebar-logo:hover .logo-icon-img,
.mobile-header-title:hover .logo-icon-img,
.footer-brand:hover .logo-icon-img {
  transform: scale(1.08);
}

.footer-brand-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-brand-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

[data-theme="light"] .footer-bottom,
html[data-theme="light"] .footer-bottom,
body.light-theme .footer-bottom,
html.light-theme .footer-bottom {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* ===== COMPACT MULTI-COLUMN DENSE GRID ===== */
.view-mode-toggle {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  padding: 3px;
  border-radius: var(--radius-pill);
}

.view-mode-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.view-mode-btn.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 2px 10px var(--accent-glow);
}

.compact-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  gap: 12px !important;
}

.compact-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  padding: 12px 14px !important;
  border-radius: var(--radius-md) !important;
  min-height: 110px !important;
}

.compact-card .book-cover,
.compact-card .project-icon,
.compact-card .travel-flag-badge {
  width: 32px !important;
  height: 32px !important;
  font-size: 16px !important;
  min-width: 32px !important;
}

/* ===== ADMIN TRAVEL WISHLIST (GEZİLECEK YERLER) ===== */
.wishlist-section {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-top: 32px;
  box-shadow: var(--shadow-md);
  animation: fadeInUp 0.4s ease;
}

.wishlist-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.wishlist-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.wishlist-badge-admin {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
}

.wishlist-filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 20px;
  scrollbar-width: none;
}
.wishlist-filter-bar::-webkit-scrollbar {
  display: none;
}

.wishlist-filter-btn {
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}
.wishlist-filter-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.wishlist-cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  min-height: 520px;
}

.wishlist-city-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 0;
  height: 560px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition);
  animation: fadeIn 0.25s ease-in-out;
}
.wishlist-city-card:hover {
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.wishlist-city-banner {
  height: 130px;
  width: 100%;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.25), rgba(59, 130, 246, 0.1));
}

.wishlist-city-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.wishlist-city-card:hover .wishlist-city-img {
  transform: scale(1.06);
}

.wishlist-city-banner-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.wishlist-city-edit-cover-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
  opacity: 0.85;
}
.wishlist-city-edit-cover-btn:hover {
  opacity: 1;
  background: rgba(108, 99, 255, 0.85);
  border-color: var(--accent);
  transform: scale(1.03);
}

.wishlist-detail-fullscreen-btn {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
  opacity: 0.9;
}
.wishlist-detail-fullscreen-btn:hover {
  opacity: 1;
  background: rgba(108, 99, 255, 0.9);
  border-color: var(--accent);
  transform: scale(1.05);
}

.lightbox-overlay {
  z-index: 200000 !important;
  background: #090a0f !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Hide background modal when lightbox is open to eliminate background repaint cost */
body:has(#photo-lightbox-modal.open) #wishlist-detail-modal {
  opacity: 0 !important;
  pointer-events: none !important;
}

.lightbox-close-btn {
  position: absolute;
  top: -14px;
  right: -14px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 200010;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.lightbox-close-btn:hover {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

.lightbox-close-btn:active {
  background: #dc2626 !important;
}

@media (max-width: 768px) {
  .lightbox-close-btn {
    top: -10px;
    right: -10px;
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}

#photo-lightbox-img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transform: translateZ(0);
}

#photo-lightbox-caption {
  margin-top: 14px;
  background: #14151f;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 22px;
  border-radius: var(--radius-pill);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  max-width: 90vw;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

@media (max-width: 768px) {
  .lightbox-close-btn {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 18px;
    background: rgba(30, 30, 40, 0.85);
    border-color: rgba(255, 255, 255, 0.3);
  }
}

.wishlist-city-content-wrap {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.wishlist-city-card-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
  margin-right: -4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.wishlist-city-card-scroll-body::-webkit-scrollbar {
  width: 5px;
}
.wishlist-city-card-scroll-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
}
.wishlist-city-card-scroll-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
.wishlist-city-card-scroll-body::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.wishlist-city-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.wishlist-city-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.wishlist-progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.wishlist-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #3b82f6);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.wishlist-district-group {
  margin-top: 14px;
}
.wishlist-district-group:first-child {
  margin-top: 0;
}

.wishlist-district-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 4px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  background: var(--bg-card, #12151e);
  z-index: 2;
  padding-top: 2px;
}

.wishlist-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wishlist-item-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: var(--transition);
  cursor: pointer;
}
.wishlist-item-row:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(108, 99, 255, 0.25);
  transform: translateX(2px);
}

.wishlist-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--text-muted);
  cursor: pointer;
  margin-top: 2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.wishlist-item-row.visited .wishlist-checkbox {
  background: #10b981;
  border-color: #10b981;
}
.wishlist-checkbox::after {
  content: "✓";
  color: white;
  font-size: 12px;
  font-weight: 900;
  display: none;
}
.wishlist-item-row.visited .wishlist-checkbox::after {
  display: block;
}

.wishlist-item-content {
  flex: 1;
}

.wishlist-place-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  transition: var(--transition);
}
.wishlist-item-row.visited .wishlist-place-title {
  text-decoration: line-through;
  opacity: 0.6;
}

.wishlist-meta-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.wishlist-category-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(108, 99, 255, 0.15);
  color: var(--accent-light);
  border: 1px solid rgba(108, 99, 255, 0.3);
}

.wishlist-note-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 4px;
}
.wishlist-item-row.visited .wishlist-note-text {
  opacity: 0.6;
}

.wishlist-actions {
  display: flex;
  gap: 4px;
  opacity: 0.7;
  transition: var(--transition);
}
.wishlist-item-row:hover .wishlist-actions {
  opacity: 1;
}

.wishlist-icon-btn {
  padding: 4px 6px;
  font-size: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
}
.wishlist-icon-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}
.wishlist-icon-btn.delete:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

/* ===== STICKY FOOTER - push to bottom on short pages ===== */
.main-content > .site-footer {
  margin-top: auto !important;
}
.oyp-footer {
  margin-top: 60px !important;
}

/* ===== PORTFOLIO & PARAMLA DASHBOARD STYLES ===== */
.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.portfolio-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.pnl-stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
}

.pnl-stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(108, 99, 255, 0.3);
  box-shadow: var(--shadow-md);
}

.pnl-stat-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pnl-stat-val {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.pnl-stat-sub {
  font-size: 12px;
  font-weight: 700;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  width: fit-content;
}

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

.pnl-badge-down {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.portfolio-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.02);
}

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

.asset-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 16px;
  border-bottom: 1px solid var(--glass-border);
}

.asset-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-primary);
  vertical-align: middle;
}

.asset-table tr:last-child td {
  border-bottom: none;
}

.asset-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.asset-type-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.tag-stock { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.tag-gold { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.tag-forex { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.tag-crypto { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }

.distribution-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.dist-bar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dist-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.dist-bar-bg {
  height: 8px;
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.dist-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.6s ease;
}

/* Light Theme Overrides */
[data-theme="light"] .pnl-stat-card,
html[data-theme="light"] .pnl-stat-card,
body.light-theme .pnl-stat-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .portfolio-table-wrap,
html[data-theme="light"] .portfolio-table-wrap,
body.light-theme .portfolio-table-wrap {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .asset-table th,
html[data-theme="light"] .asset-table th,
body.light-theme .asset-table th {
  background: rgba(0, 0, 0, 0.03);
  color: #475569;
}

/* ===== PORTFOLIO RESPONSIVE ===== */
.portfolio-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 900px) {
  .portfolio-content-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 640px) {
  .portfolio-hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .pnl-stat-val {
    font-size: 20px;
  }
  .asset-table th,
  .asset-table td {
    padding: 10px;
    font-size: 11px;
  }
}

@media (max-width: 440px) {
  .portfolio-hero-grid {
    grid-template-columns: 1fr;
  }
}

/* Global Date Input Calendar Icon Fix for Dark/Light Mode */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.9) brightness(1.2);
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

html[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator {
  filter: none;
}

/* Global High-Legibility Status Badges */
.book-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 3;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  line-height: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.status-completed {
  background: rgba(6, 78, 59, 0.92);
  border: 1px solid #10b981;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 10px rgba(16, 185, 129, 0.35);
}

.status-reading {
  background: rgba(12, 74, 110, 0.92);
  border: 1px solid #0ea5e9;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 10px rgba(14, 165, 233, 0.35);
}

.status-want_to_read {
  background: rgba(120, 53, 15, 0.92);
  border: 1px solid #f59e0b;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 10px rgba(245, 158, 11, 0.35);
}

[data-theme="light"] .status-completed,
html[data-theme="light"] .status-completed,
body.light-theme .status-completed {
  background: #059669;
  border-color: #047857;
  color: #ffffff;
}

[data-theme="light"] .status-reading,
html[data-theme="light"] .status-reading,
body.light-theme .status-reading {
  background: #0284c7;
  border-color: #0369a1;
  color: #ffffff;
}

[data-theme="light"] .status-want_to_read,
html[data-theme="light"] .status-want_to_read,
body.light-theme .status-want_to_read {
  background: #d97706;
  border-color: #b45309;
  color: #ffffff;
}


