body { background: #1a1a2e; color: #eee; font-family: Inter, sans-serif; margin: 0; }

/* Header Navigation */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #16213e;
  padding: 0 1.5rem;
  height: 72px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-left .back-to-site {
  color: #90DD40;
  text-decoration: none;
  font-size: 1.5rem;
  white-space: nowrap;
}
.header-left .back-to-site:hover { text-decoration: underline; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.header-nav .nav-link-single {
  color: #90DD40;
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 1.5rem;
}
.header-nav .nav-link-single:hover,
.header-nav .nav-link-single.active { background: rgba(144,221,64,0.15); }

.nav-dropdown { position: relative; }

.nav-dropdown-trigger {
  color: #90DD40;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  font-weight: 500;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 1.5rem;
}
/* CSS triangle caret instead of unicode character */
.nav-dropdown-trigger::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  vertical-align: middle;
  margin-left: 2px;
}
.nav-dropdown:hover .nav-dropdown-trigger { background: rgba(144,221,64,0.15); }

.nav-dropdown .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #16213e;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  min-width: 180px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  padding: 0.4rem 0;
  z-index: 1001;
}
.nav-dropdown:hover .dropdown-menu { display: block; }

.nav-dropdown .dropdown-menu a {
  display: block;
  color: #ddd;
  text-decoration: none;
  padding: 0.55rem 1.2rem;
  font-size: 1.4rem;
}
.nav-dropdown .dropdown-menu a:hover,
.nav-dropdown .dropdown-menu a.active {
  background: rgba(144,221,64,0.15);
  color: #90DD40;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-right .profile-link {
  color: #aaa;
  text-decoration: none;
  font-size: 1.5rem;
}
.header-right .profile-link:hover { color: #90DD40; }

.header-right .btn-logout {
  background: transparent;
  border: 1px solid #dc3545;
  color: #dc3545;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.35rem;
}
.header-right .btn-logout:hover { background: #dc3545; color: #fff; }

.ticket-badge-link {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 1.5rem;
  transition: color 0.2s;
  margin-left: 0.5rem;
}
.ticket-badge-link:hover { color: #90DD40; }
.ticket-badge-link svg { width: 28px; height: 28px; }
.ticket-badge-link #open-ticket-count {
  color: #ff6b6b;
  font-weight: 700;
  font-size: 1.1rem;
}

/* Main content area */
.admin-content { padding: 2rem; min-height: calc(100vh - 72px); }

/* Legacy sidebar (kept for backward compat) */
.sidebar { background: #16213e; min-height: 100vh; padding: 1rem; }
.sidebar a { color: #90DD40; display: block; padding: 0.5rem 1rem; text-decoration: none; border-radius: 4px; margin-bottom: 0.25rem; }
.sidebar a:hover, .sidebar a.active { background: rgba(144,221,64,0.15); }
.card { background: #16213e; border: 1px solid rgba(255,255,255,0.1); color: #fff; border-radius: 8px; }
.card p, .card label, .card span, .card textarea { color: #fff; }
.card h5 { color: #90DD40; }

/* Table styling */
.table {
  color: #eee !important;
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(15, 52, 96, 0.35);
  --bs-table-hover-bg: rgba(144,221,64,0.12);
  --bs-table-hover-color: #fff;
  --bs-table-striped-color: #eee;
  --bs-table-color: #eee;
}
.table th {
  border-color: rgba(255,255,255,0.1) !important;
  background: #16213e !important;
  color: #90DD40 !important;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.75rem 1rem !important;
  white-space: nowrap;
}
.table td {
  border-color: rgba(255,255,255,0.05) !important;
  padding: 0.7rem 1rem !important;
  vertical-align: middle;
  color: #eee !important;
}
/* Alternating row colors - applies to all .table, not just .table-striped */
.table > tbody > tr:nth-of-type(odd) > td {
  background-color: rgba(255,255,255,0.03) !important;
}
.table > tbody > tr:nth-of-type(even) > td {
  background-color: rgba(15, 52, 96, 0.35) !important;
}
/* Hover: green tint bg with white text */
.table > tbody > tr:hover > td {
  background-color: rgba(144,221,64,0.12) !important;
  color: #fff !important;
}
.table .badge { font-size: 0.8rem; padding: 0.3em 0.6em; }
.table tbody tr.clickable-row { cursor: pointer; }

.badge-paid { background: #90DD40; color: #000; }
.badge-pending { background: #f0ad4e; color: #000; }
.badge-cancelled { background: #dc3545; }
h1, h2, h3, h5 { color: #90DD40; }
.btn-furi { background: #90DD40; color: #000; border: none; font-weight: 600; }
.btn-furi:hover { background: #7cc835; color: #000; }
.form-label, .form-check-label { color: #fff; }
.form-control, .form-select { background: #0f3460; border-color: rgba(255,255,255,0.2); color: #fff; }
.form-control::placeholder { color: rgba(255,255,255,0.5); }
.form-control:focus, .form-select:focus { background: #0f3460; border-color: #90DD40; color: #fff; box-shadow: 0 0 0 0.2rem rgba(144,221,64,0.25); }
#content { padding: 2rem; }

/* Dashboard stat cards */
.stat-card {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  border-color: rgba(144,221,64,0.3) !important;
}
.stat-card h3 { font-size: 2rem; margin: 0; }
.stat-card p { margin: 0.25rem 0 0; color: #aaa; font-size: 0.9rem; }

/* Menu Editor Styles */
.menu-tree { min-height: 200px; }
.menu-list { list-style: none; padding-left: 0; margin: 0; }
.menu-list .menu-list { padding-left: 30px; border-left: 2px solid rgba(144,221,64,0.2); margin-left: 15px; margin-top: 5px; }
.menu-item { background: #252540; border: 1px solid rgba(255,255,255,0.1); border-radius: 4px; margin-bottom: 5px; cursor: move; }
.menu-item.dragging { opacity: 0.5; }
.menu-item.drag-over { border-color: #90DD40; box-shadow: 0 0 5px rgba(144,221,64,0.5); }
.menu-item.drag-over-nest { border-color: #ff9800; box-shadow: 0 0 8px rgba(255,152,0,0.5); background: rgba(255,152,0,0.1); }
.menu-item.drag-over-reorder { border-top: 3px solid #90DD40; }
.menu-list.drag-over-reorder::before { content: ''; display: block; height: 3px; background: #90DD40; border-radius: 2px; margin-bottom: 5px; }
.menu-item-content { display: flex; align-items: center; padding: 8px 12px; gap: 10px; flex-wrap: wrap; }
.drag-handle { cursor: grab; color: #666; font-size: 14px; }
.menu-item-title { font-weight: 500; color: #fff; min-width: 100px; }
.menu-item-url { font-size: 12px; color: #888; flex: 1; min-width: 100px; }
.menu-item-type { font-size: 10px; }
.menu-item-actions { margin-left: auto; display: flex; gap: 5px; }
.menu-item-actions .btn { padding: 2px 8px; font-size: 11px; }
.btn-xs { padding: 2px 6px; font-size: 11px; }

/* Depth indicators */
.menu-item.depth-0 { border-left: 3px solid #90DD40; }
.menu-item.depth-1 { border-left: 3px solid #7cc835; }
.menu-item.depth-2 { border-left: 3px solid #68b02a; }
.menu-item.depth-3 { border-left: 3px solid #549820; }

/* Drop zones */
.drop-zone { min-height: 20px; padding: 5px 0; }
.drop-zone.drag-over { background: rgba(144,221,64,0.1); border-radius: 4px; }

/* Available pages panel */
.available-section { border-bottom: 1px solid rgba(255,255,255,0.1); }
.section-header { background: #252540; padding: 6px 10px; font-size: 11px; font-weight: bold; color: #90DD40; text-transform: uppercase; }
.available-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.05); }
.available-item:hover { background: rgba(144,221,64,0.1); }
.available-item span:first-child { font-size: 13px; color: #ccc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.available-item .add-btn { color: #90DD40; font-size: 18px; font-weight: bold; }

/* Analytics Styles */
.analytics-filters { background: #252540; padding: 1rem; border-radius: 6px; margin-bottom: 1.5rem; }
.analytics-filters .form-control, .analytics-filters .form-select { background: #16213e; }
.analytics-chart-container { position: relative; height: 300px; margin-bottom: 1.5rem; }
.analytics-map-container { height: 350px; border-radius: 6px; overflow: hidden; margin-bottom: 1.5rem; background: #0f3460; }
.analytics-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.analytics-stat-card { background: #252540; padding: 1rem; border-radius: 6px; text-align: center; }
.analytics-stat-card .value { font-size: 1.75rem; font-weight: bold; color: #90DD40; }
.analytics-stat-card .label { font-size: 0.85rem; color: #aaa; }
.analytics-table { font-size: 0.9rem; }
.analytics-table th { color: #90DD40; font-weight: 500; }
.progress-thin { height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; }
.progress-thin .progress-bar { background: #90DD40; border-radius: 3px; }
.analytics-tabs { border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 1rem; }
.analytics-tabs .nav-link { color: #aaa; border: none; padding: 0.5rem 1rem; }
.analytics-tabs .nav-link:hover { color: #fff; }
.analytics-tabs .nav-link.active { color: #90DD40; border-bottom: 2px solid #90DD40; background: transparent; }
.analytics-section { margin-bottom: 2rem; }
.analytics-section h5 { color: #90DD40; margin-bottom: 1rem; }
.country-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.country-row .flag { font-size: 1.25rem; }
.country-row .name { flex: 1; }
.country-row .count { font-weight: 500; }
.country-row .pct { color: #888; font-size: 0.85rem; min-width: 50px; text-align: right; }
.auth-breakdown { display: flex; gap: 2rem; align-items: center; }
.auth-chart-container { width: 120px; height: 120px; }
.auth-stats { flex: 1; }
.auth-stat { margin-bottom: 0.5rem; }
.auth-stat .label { color: #aaa; }
.auth-stat .value { font-weight: bold; color: #fff; }
.analytics-tooltip { background: rgba(22, 33, 62, 0.95) !important; color: #fff !important; border: 1px solid #90DD40 !important; border-radius: 4px !important; font-size: 12px !important; box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important; }
.analytics-tooltip::before { display: none !important; }
.analytics-legend { line-height: 1.6; }

/* Insights toggles */
.insights-toggles { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; margin-bottom: 1.5rem; padding: 0.75rem 1rem; background: #252540; border-radius: 6px; }
.insights-toggle { display: flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; color: #ccc; cursor: pointer; white-space: nowrap; }
.insights-toggle input[type="checkbox"] { accent-color: #90DD40; width: 14px; height: 14px; cursor: pointer; }
.insights-toggle:hover { color: #fff; }
.toggle-divider { color: #444; margin: 0 0.25rem; }

/* Content events list */
.content-events-list { max-height: 300px; overflow-y: auto; }
.content-event { padding: 0.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.9rem; }
.content-event .date { color: #888; font-size: 0.8rem; margin-right: 0.5rem; }
.content-event .platforms { color: #90DD40; font-size: 0.75rem; margin-right: 0.25rem; }
.content-event a { color: #90DD40; text-decoration: none; }
.content-event a:hover { text-decoration: underline; }

/* Media Picker */
.media-picker-item:hover { border-color: #90DD40 !important; }
.media-picker-item:hover img { opacity: 0.8; }

/* EasyMDE Dark Theme Overrides */
.EasyMDEContainer { background: #000; }
.EasyMDEContainer .CodeMirror { background: #000; color: #fff; border-color: rgba(255,255,255,0.2); }
.EasyMDEContainer .CodeMirror-cursor { border-left-color: #90DD40; }
.EasyMDEContainer .CodeMirror-selected { background: rgba(144,221,64,0.3); }
.EasyMDEContainer .CodeMirror-gutters { background: #16213e; border-right-color: rgba(255,255,255,0.1); }
.EasyMDEContainer .CodeMirror-linenumber { color: #666; }
.EasyMDEContainer .editor-toolbar { background: #16213e; border-color: rgba(255,255,255,0.2); }
.EasyMDEContainer .editor-toolbar button { color: #ccc !important; }
.EasyMDEContainer .editor-toolbar button:hover { background: rgba(144,221,64,0.2); color: #90DD40 !important; }
.EasyMDEContainer .editor-toolbar button.active { background: rgba(144,221,64,0.3); color: #90DD40 !important; }
.EasyMDEContainer .editor-toolbar i.separator { border-left-color: rgba(255,255,255,0.2); }
.EasyMDEContainer .editor-preview { background: #1a1a2e; color: #fff; }
.EasyMDEContainer .editor-preview-side { background: #1a1a2e; color: #fff; border-color: rgba(255,255,255,0.2); }
.EasyMDEContainer .editor-statusbar { background: #16213e; color: #888; border-color: rgba(255,255,255,0.2); }
.EasyMDEContainer .cm-s-easymde .cm-header { color: #90DD40; }
.EasyMDEContainer .cm-s-easymde .cm-strong { color: #fff; }
.EasyMDEContainer .cm-s-easymde .cm-em { color: #ddd; }
.EasyMDEContainer .cm-s-easymde .cm-link { color: #90DD40; }
.EasyMDEContainer .cm-s-easymde .cm-url { color: #7cc835; }
.EasyMDEContainer .cm-s-easymde .cm-quote { color: #aaa; }
.EasyMDEContainer .cm-s-easymde .cm-comment { color: #888; }
.EasyMDEContainer .cm-s-easymde .cm-keyword { color: #90DD40; }
.EasyMDEContainer .cm-formatting { color: #666; }
.EasyMDEContainer .editor-toolbar.disabled-for-preview button:not(.no-disable) { color: #555 !important; }

/* Bootstrap Accordion Dark Theme */
.accordion { --bs-accordion-bg: transparent; --bs-accordion-border-color: rgba(255,255,255,0.1); }
.accordion-item { background: #16213e; border: 1px solid rgba(255,255,255,0.1); margin-bottom: 0.5rem; border-radius: 6px !important; overflow: hidden; }
.accordion-button { background: #16213e; color: #90DD40; font-weight: 600; padding: 1rem 1.25rem; border-radius: 0 !important; }
.accordion-button:not(.collapsed) { background: #1a2744; color: #90DD40; box-shadow: none; }
.accordion-button:focus { box-shadow: 0 0 0 0.2rem rgba(144,221,64,0.25); border-color: #90DD40; }
.accordion-button::after { filter: brightness(0) saturate(100%) invert(79%) sepia(47%) saturate(497%) hue-rotate(44deg) brightness(98%) contrast(88%); }
.accordion-body { background: #16213e; color: #fff; padding: 1.25rem; }
.accordion-body .form-label { color: #fff; }
.accordion-body p.text-muted { color: #aaa !important; }
.accordion-body h6 { color: #90DD40; margin-top: 0.5rem; }
.seo-chevron.rotated { transform: rotate(180deg); }

/* Newsletter preview - ensure black text on white background */
.newsletter-preview-body,
.newsletter-preview-body * {
  color: #000 !important;
}
