/**
 * ============================================================================
 * HEJGUIDE ADMIN DASHBOARD - STYLESHEET
 * ============================================================================
 * 
 * A comprehensive admin interface stylesheet built with Apple's design
 * principles: clean, minimal, and functional.
 * 
 * TABLE OF CONTENTS:
 * ============================================================================
 * 
 * 1.  CSS VARIABLES & THEMING
 *     1.1  Light Mode Variables
 *     1.2  Dark Mode Variables & Overrides
 * 
 * 2.  BASE & RESET STYLES
 *     2.1  Box Sizing & Reset
 *     2.2  Typography
 *     2.3  Scrollbar Styling
 * 
 * 3.  LAYOUT STRUCTURE
 *     3.1  Admin Container Grid
 *     3.2  Sidebar
 *     3.3  Sidebar Navigation
 *     3.4  Main Content Area
 *     3.5  Header & Breadcrumbs
 * 
 * 4.  COMPONENTS - CORE UI
 *     4.1  Buttons
 *     4.2  Cards
 *     4.3  Alerts & Notifications
 *     4.4  Badges
 *     4.5  Tabs
 *     4.6  Tables
 *     4.7  Empty States
 * 
 * 5.  FORMS
 *     5.1  Form Groups & Labels
 *     5.2  Inputs, Selects, Textareas
 *     5.3  Checkboxes & Toggle Switches
 *     5.4  Form Layouts
 *     5.5  Icon Selector
 * 
 * 6.  PAGE-SPECIFIC STYLES
 *     6.1  Dashboard & Stats
 *     6.2  Nodes/Pages List & Tree
 *     6.3  Layout Editor
 *     6.4  Mobile Preview
 *     6.5  Tags System
 *     6.6  Image Upload
 *     6.7  Guidebook Wizard
 *     6.8  User Management
 *     6.9  Feedback System
 *     6.10 Authentication Pages
 * 
 * 7.  MODALS & OVERLAYS
 *     7.1  Modal Base Styles
 *     7.2  Tag Modal
 *     7.3  Unsaved Changes Modal
 *     7.4  Context Menus & Dropdowns
 * 
 * 8.  SPECIAL FEATURES
 *     8.1  Impersonation Banner
 *     8.2  Sticky Headers
 *     8.3  Drag & Drop States
 * 
 * 9.  MOBILE & RESPONSIVE
 *     9.1  Mobile Bottom Bar
 *     9.2  Mobile Sidebar
 *     9.3  Mobile Breadcrumbs
 *     9.4  Responsive Breakpoints
 * 
 * 10. UTILITY CLASSES
 *     10.1 Flexbox Utilities
 *     10.2 Grid Utilities
 *     10.3 Spacing Utilities
 *     10.4 Text Utilities
 *     10.5 Display Utilities
 * 
 * ============================================================================
 */


/* ============================================================================
   1. CSS VARIABLES & THEMING
   ============================================================================ */

/* ----------------------------------------------------------------------------
   1.0 Skip Navigation
   ---------------------------------------------------------------------------- */

.skip-to-content {
  position: fixed;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--admin-accent);
  color: #fff;
  border-radius: 0 0 8px 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-to-content:focus {
  top: 0;
}

/* ----------------------------------------------------------------------------
   1.1 Light Mode Variables (Default)
   ---------------------------------------------------------------------------- */

:root {
  /* Background Colors */
  --admin-bg: #f5f5f7;
  --admin-sidebar-bg: #ffffff;
  --admin-content-bg: #ffffff;
  
  /* Text Colors */
  --admin-text: #1d1d1f;
  --admin-text-muted: #636366;
  
  /* Accent Colors */
  --admin-accent: #0071e3;
  --admin-accent-hover: #0077ed;
  
  /* Border & Shadow */
  --admin-border: #d2d2d7;
  --admin-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  --admin-shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.08);
  
  /* Border Radius */
  --admin-radius: 12px;

  /* Hover & Subtle Backgrounds */
  --admin-hover-bg: #e8e8ed;
  --admin-subtle-bg: #f9fafb;
  --admin-info-subtle-bg: #f0f9ff;

  /* Status Colors (WCAG AA: min 4.5:1 on white) */
  --admin-success: #248a3d;
  --admin-success-bg: rgba(52, 199, 89, 0.1);
  --admin-warning: #c93400;
  --admin-warning-bg: rgba(255, 149, 0, 0.1);
  --admin-danger: #d70015;
  --admin-danger-bg: rgba(255, 59, 48, 0.1);
  --admin-info: #0040dd;
  --admin-info-bg: rgba(0, 122, 255, 0.1);
  --admin-purple: #8944ab;
  --admin-purple-bg: rgba(175, 82, 222, 0.1);

  /* Membership Banner Colors */
  --color-error-50: #fef2f2;
  --color-error-200: #fecaca;
  --color-error-300: #fca5a5;
  --color-error-700: #b91c1c;
  --color-error-800: #991b1b;
  --color-warning-50: #fffbeb;
  --color-warning-200: #fde68a;
  --color-warning-300: #fcd34d;
  --color-warning-700: #b45309;
  --color-warning-800: #92400e;
  --color-info-50: #eff6ff;
  --color-info-200: #bfdbfe;
  --color-info-300: #93c5fd;
  --color-info-700: #1d4ed8;
  --color-info-800: #1e40af;
  --color-success-50: #ecfdf5;

  /* Search Result Icon Colors */
  --search-icon-reservation: #ff5a5f;
  --search-icon-guidebook: #8b5cf6;
  --search-icon-page: #a855f7;
  --search-icon-listing: #0ea5e9;
  --search-icon-place: #f97316;
  --search-icon-template: #10b981;
  --search-icon-automation: #6366f1;
  --search-icon-rate: #eab308;
  --search-icon-message-in: #0ea5e9;
  --search-icon-message-out: #10b981;
  --search-icon-task: #f59e0b;
  --search-icon-issue: #ef4444;
  --search-icon-product: #8b5cf6;
  --search-icon-review: #f97316;

  /* Aliases (used by calendar & listings modules) */
  --admin-card: #ffffff;
  --admin-card-bg: #ffffff;
  --admin-primary: #0071e3;
  --admin-primary-light: rgba(0, 113, 227, 0.08);
  --admin-bg-secondary: #f0f0f5;
}


/* ----------------------------------------------------------------------------
   1.2 Dark Mode Variables & Overrides
   ---------------------------------------------------------------------------- */


html[data-theme="dark"] {
  color-scheme: dark;
  --admin-bg: #1c1c1e;
  --admin-sidebar-bg: #2c2c2e;
  --admin-content-bg: #2c2c2e;
  --admin-text: #f5f5f7;
  --admin-text-muted: #98989d;
  --admin-accent: #0a84ff;
  --admin-accent-hover: #409cff;
  --admin-border: #3a3a3c;
  --admin-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --admin-shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.4);

  /* Hover & Subtle Backgrounds (Dark) */
  --admin-hover-bg: #3a3a3c;
  --admin-subtle-bg: #3a3a3c;
  --admin-info-subtle-bg: rgba(10, 132, 255, 0.1);

  /* Status Colors (Dark) */
  --admin-success: #30d158;
  --admin-success-bg: rgba(48, 209, 88, 0.15);
  --admin-warning: #ff9f0a;
  --admin-warning-bg: rgba(255, 159, 10, 0.15);
  --admin-danger: #ff453a;
  --admin-danger-bg: rgba(255, 69, 58, 0.15);
  --admin-info: #0a84ff;
  --admin-info-bg: rgba(10, 132, 255, 0.15);
  --admin-purple: #bf5af2;
  --admin-purple-bg: rgba(191, 90, 242, 0.15);

  /* Membership Banner Colors (Dark) */
  --color-error-50: rgba(255, 69, 58, 0.1);
  --color-error-200: rgba(255, 69, 58, 0.2);
  --color-error-300: rgba(255, 69, 58, 0.3);
  --color-error-700: #ff6961;
  --color-error-800: #ff453a;
  --color-warning-50: rgba(255, 159, 10, 0.1);
  --color-warning-200: rgba(255, 159, 10, 0.2);
  --color-warning-300: rgba(255, 159, 10, 0.3);
  --color-warning-700: #ffb340;
  --color-warning-800: #ff9f0a;
  --color-info-50: rgba(10, 132, 255, 0.1);
  --color-info-200: rgba(10, 132, 255, 0.2);
  --color-info-300: rgba(10, 132, 255, 0.3);
  --color-info-700: #409cff;
  --color-info-800: #0a84ff;
  --color-success-50: rgba(48, 209, 88, 0.1);

  /* Aliases (Dark) */
  --admin-card: #2c2c2e;
  --admin-card-bg: #2c2c2e;
  --admin-primary: #0a84ff;
  --admin-primary-light: rgba(10, 132, 255, 0.12);
  --admin-bg-secondary: #1c1c1e;
}

/* --- Form Inputs (Dark) --- */
html[data-theme="dark"] .form-input,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .form-textarea {
  background-color: #1c1c1e;
  border-color: var(--admin-border);
  color: var(--admin-text);
}

html[data-theme="dark"] .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

html[data-theme="dark"] .form-input:focus,
html[data-theme="dark"] .form-select:focus,
html[data-theme="dark"] .form-textarea:focus {
  background-color: #1c1c1e;
}

html[data-theme="dark"] .form-input[readonly] {
  background: #2c2c2e !important;
  color: #98989d !important;
  border-color: #3a3a3c !important;
}

html[data-theme="dark"] .form-input.slug-editing {
  border-color: #ff9f0a !important;
  background: rgba(255, 159, 10, 0.15) !important;
  color: #ff9f0a !important;
}

html[data-theme="dark"] .slug-edit-warning {
  background: rgba(255, 159, 10, 0.15) !important;
  border-color: #ff9f0a !important;
}

html[data-theme="dark"] .slug-edit-warning-content i {
  color: #ff9f0a !important;
}

html[data-theme="dark"] .slug-edit-warning-content > div {
  color: #ff9f0a !important;
}

html[data-theme="dark"] .form-input:disabled,
html[data-theme="dark"] .form-select:disabled,
html[data-theme="dark"] .form-textarea:disabled {
  background: #2c2c2e !important;
  color: #636366 !important;
  border-color: #3a3a3c !important;
}

/* --- Cards (Dark) --- */
html[data-theme="dark"] .card {
  background: var(--admin-content-bg) !important;
  border-color: var(--admin-border) !important;
}

html[data-theme="dark"] .card-body {
  background: var(--admin-content-bg) !important;
}

html[data-theme="dark"] .card-header {
  border-color: var(--admin-border) !important;
}

html[data-theme="dark"] .content-editor-body {
  background: var(--admin-content-bg) !important;
}

html[data-theme="dark"] .content-editor-card {
  background: var(--admin-content-bg) !important;
}

/* --- Tables (Dark) --- */
html[data-theme="dark"] table {
  background: var(--admin-content-bg);
}

html[data-theme="dark"] thead {
  background: #3a3a3c !important;
  border-bottom-color: var(--admin-border) !important;
}

html[data-theme="dark"] th {
  background: #3a3a3c !important;
  color: var(--admin-text) !important;
}

html[data-theme="dark"] td {
  border-color: var(--admin-border) !important;
}

html[data-theme="dark"] tbody tr:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

html[data-theme="dark"] .data-table th {
  background: #3a3a3c;
}

html[data-theme="dark"] .data-table td {
  border-color: var(--admin-border);
}

html[data-theme="dark"] .data-table tr:hover td {
  background: rgba(255, 255, 255, 0.05);
}

/* --- Badges (Dark) --- */
html[data-theme="dark"] .badge {
  background: #3a3a3c;
  color: #98989d;
}

html[data-theme="dark"] .badge.badge-success,
html[data-theme="dark"] a.badge.badge-success,
html[data-theme="dark"] .badge-clickable.badge-success {
  background: rgba(48, 209, 88, 0.2) !important;
  color: #30d158 !important;
}

html[data-theme="dark"] .badge.badge-warning,
html[data-theme="dark"] a.badge.badge-warning,
html[data-theme="dark"] .badge-clickable.badge-warning {
  background: rgba(255, 159, 10, 0.2) !important;
  color: #ff9f0a !important;
}

html[data-theme="dark"] .badge.badge-danger,
html[data-theme="dark"] a.badge.badge-danger,
html[data-theme="dark"] .badge-clickable.badge-danger {
  background: rgba(255, 69, 58, 0.2) !important;
  color: #ff453a !important;
}

html[data-theme="dark"] .badge.badge-info,
html[data-theme="dark"] a.badge.badge-info,
html[data-theme="dark"] .badge-clickable.badge-info {
  background: rgba(10, 132, 255, 0.2) !important;
  color: #0a84ff !important;
}

html[data-theme="dark"] .badge.badge-slider,
html[data-theme="dark"] a.badge.badge-slider,
html[data-theme="dark"] .badge-clickable.badge-slider,
html[data-theme="dark"] .badge.badge-clickable.badge-slider {
  background: rgba(167, 139, 250, 0.2) !important;
  color: #a78bfa !important;
}

html[data-theme="dark"] .badge.badge-warning-light,
html[data-theme="dark"] a.badge.badge-warning-light,
html[data-theme="dark"] .badge-clickable.badge-warning-light,
html[data-theme="dark"] .badge.badge-clickable.badge-warning-light {
  background: rgba(250, 204, 21, 0.2) !important;
  color: #facc15 !important;
}

html[data-theme="dark"] .badge-draft {
  background: #3a3a3c !important;
  color: #98989d !important;
}

html[data-theme="dark"] .badge-secondary,
html[data-theme="dark"] .badge-neutral {
  background: #3a3a3c !important;
  color: #98989d !important;
}

/* --- Buttons (Dark) --- */
html[data-theme="dark"] .btn {
  border-color: var(--admin-border);
}

html[data-theme="dark"] .btn-secondary {
  background: #3a3a3c !important;
  color: var(--admin-text) !important;
  border-color: var(--admin-border) !important;
}

html[data-theme="dark"] .btn-secondary:hover {
  background: #48484a !important;
}

html[data-theme="dark"] .btn-icon {
  background: #3a3a3c !important;
  border-color: #48484a !important;
  color: #98989d !important;
}

html[data-theme="dark"] .btn-icon:hover {
  background: #48484a !important;
  color: var(--admin-accent) !important;
  border-color: var(--admin-accent) !important;
}

html[data-theme="dark"] .btn-text-link {
  color: var(--admin-accent) !important;
}

html[data-theme="dark"] .btn-text-link:hover {
  background: rgba(10, 132, 255, 0.15) !important;
}

html[data-theme="dark"] .btn-delete-full {
  background: #ff453a !important;
  border-color: #ff453a !important;
  color: white !important;
}

html[data-theme="dark"] .btn-delete-full:hover {
  background: #ff6961 !important;
  border-color: #ff6961 !important;
}

/* --- Alerts (Dark) --- */
html[data-theme="dark"] .alert {
  border-color: var(--admin-border);
}

html[data-theme="dark"] .alert-info {
  background: rgba(10, 132, 255, 0.15);
  color: #0a84ff;
}

html[data-theme="dark"] .alert-success {
  background: rgba(48, 209, 88, 0.15);
  color: #30d158;
}

html[data-theme="dark"] .alert-warning {
  background: rgba(255, 159, 10, 0.15);
  color: #ff9f0a;
}

html[data-theme="dark"] .alert-danger {
  background: rgba(255, 69, 58, 0.15);
  color: #ff453a;
}

/* --- Modal (Dark) --- */
html[data-theme="dark"] .modal-content {
  background: #2c2c2e;
  border-color: var(--admin-border);
}

html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer {
  border-color: var(--admin-border);
}

/* --- Preview Components (Dark) --- */
html[data-theme="dark"] .preview-phone {
  border-color: #48484a !important;
}

html[data-theme="dark"] .preview-container {
  background: #1c1c1e !important;
}

html[data-theme="dark"] .preview-help {
  background: var(--admin-content-bg) !important;
  color: #98989d !important;
}

html[data-theme="dark"] .layout-preview-column {
  background: #1c1c1e !important;
}

html[data-theme="dark"] .preview-action-btn {
  background: #3a3a3c !important;
  border-color: #48484a !important;
  color: #98989d !important;
}

html[data-theme="dark"] .preview-action-btn:hover:not(:disabled) {
  background: #48484a !important;
}

html[data-theme="dark"] .mobile-nav-preview {
  background: #2c2c2e !important;
}

html[data-theme="dark"] .preview-tile {
  background: #3a3a3c !important;
  border-color: #48484a !important;
}

html[data-theme="dark"] .preview-tile-title {
  color: #f5f5f7 !important;
}

html[data-theme="dark"] .preview-tile-icon {
  background: #48484a !important;
}

html[data-theme="dark"] .preview-drop-placeholder {
  background: #48484a !important;
}

html[data-theme="dark"] .preview-home-dropzone {
  background: #2c2c2e !important;
  border-color: #48484a !important;
  color: #98989d;
}

html[data-theme="dark"] .preview-home-dropzone.active {
  background: rgba(10, 132, 255, 0.2);
  border-color: #0a84ff;
  color: #0a84ff;
}

/* --- Node Items (Dark) --- */
html[data-theme="dark"] .node-item {
  background: var(--admin-content-bg) !important;
  border-bottom-color: var(--admin-border) !important;
}

html[data-theme="dark"] .node-item:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

html[data-theme="dark"] .node-children {
  background: #1c1c1e !important;
}

html[data-theme="dark"] .node-children .node-item {
  background: transparent !important;
}

html[data-theme="dark"] .node-children .node-item:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

html[data-theme="dark"] .info-tab-header {
  background: rgba(10, 132, 255, 0.15) !important;
  border-left-color: #0a84ff !important;
  color: #0a84ff !important;
}

html[data-theme="dark"] .info-tab-children {
  background: #1c1c1e !important;
}

html[data-theme="dark"] .node-info-tab {
  background: #2c2c2e !important;
}

html[data-theme="dark"] .node-info-tab .node-handle {
  background: #3a3a3c !important;
  color: #98989d !important;
}

html[data-theme="dark"] .node-info-tab .node-handle:hover {
  color: var(--admin-accent) !important;
}

html[data-theme="dark"] .node-hidden {
  background: #2c2c2e !important;
  border-left-color: #636366 !important;
}

html[data-theme="dark"] .node-hidden:hover {
  background: #3a3a3c !important;
}

html[data-theme="dark"] .node-ghost {
  background: #48484a !important;
}

html[data-theme="dark"] .node-drag {
  background: #3a3a3c !important;
  border-color: var(--admin-accent) !important;
}

html[data-theme="dark"] .node-icon-preview {
  background: #3a3a3c !important;
  border-color: #48484a !important;
}

html[data-theme="dark"] .node-icon-preview i {
  filter: brightness(1.5) saturate(1.2);
}

/* --- Dropdown Menus (Dark) --- */
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .preview-context-menu {
  background: #2c2c2e;
  border-color: var(--admin-border);
}

html[data-theme="dark"] .dropdown-item:hover,
html[data-theme="dark"] .preview-context-options button:hover {
  background: #3a3a3c;
}

/* --- Toggle & Tags (Dark) --- */
html[data-theme="dark"] .toggle-btn {
  background: #3a3a3c;
}

html[data-theme="dark"] .tag-pill,
html[data-theme="dark"] .node-tag-pill {
  background: #3a3a3c !important;
  border-color: #48484a !important;
  color: #98989d !important;
}

html[data-theme="dark"] .tag-pill:hover {
  border-color: var(--admin-accent) !important;
  color: var(--admin-accent) !important;
}

html[data-theme="dark"] .tag-pill.active {
  background: var(--admin-accent) !important;
  border-color: var(--admin-accent) !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .tag-pill-add {
  background: transparent !important;
  border-style: dashed !important;
}

/* --- Search (Dark) --- */
html[data-theme="dark"] .search-input-wrapper input {
  background: #1c1c1e !important;
  border-color: var(--admin-border) !important;
  color: var(--admin-text) !important;
}

html[data-theme="dark"] .search-input {
  background: #1c1c1e !important;
  border-color: #3a3a3c !important;
  color: var(--admin-text) !important;
}

html[data-theme="dark"] .search-input::placeholder {
  color: #636366 !important;
}

html[data-theme="dark"] .search-input:focus {
  border-color: var(--admin-accent) !important;
  background: #1c1c1e !important;
}

/* --- Stats & Empty States (Dark) --- */
html[data-theme="dark"] .stat-card {
  background: var(--admin-content-bg);
}

html[data-theme="dark"] .empty-state {
  color: var(--admin-text-muted);
}

/* --- Auth Pages (Dark) --- */
html[data-theme="dark"] .auth-form-group input:focus {
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.2);
}

/* --- Sidebar (Dark) --- */
html[data-theme="dark"] .sidebar-nav-link:hover {
  background: #3a3a3c;
}

html[data-theme="dark"] .sidebar-nav-link.active {
  background: rgba(10, 132, 255, 0.15);
}

/* --- Breadcrumbs (Dark) --- */
html[data-theme="dark"] .breadcrumb {
  color: var(--admin-text-muted);
}

html[data-theme="dark"] .breadcrumb a {
  color: var(--admin-accent);
}

/* --- Admin Header (Dark) --- */
html[data-theme="dark"] .admin-header {
  background: rgba(28, 28, 30, 0.95) !important;
  border-bottom-color: var(--admin-border) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* --- Scrollbar (Dark) --- */
html[data-theme="dark"] ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

html[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #1c1c1e;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #48484a;
  border-radius: 4px;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #636366;
}

/* --- Mobile Bottom Bar (Dark) - Extended --- */
html[data-theme="dark"] .mobile-bottom-bar {
  background: #2c2c2e !important;
  border: 1px solid #3a3a3c !important;
}

html[data-theme="dark"] .mobile-bottom-bar-item {
  color: #98989d !important;
}

html[data-theme="dark"] .mobile-bottom-bar-item:hover,
html[data-theme="dark"] .mobile-bottom-bar-item:active {
  background: #3a3a3c !important;
}

html[data-theme="dark"] .mobile-bottom-bar-item.primary {
  background: var(--admin-accent) !important;
  color: white !important;
}

html[data-theme="dark"] .mobile-cancel-btn,
html[data-theme="dark"] .mobile-edit-layout-btn {
  background: #2c2c2e !important;
  color: var(--admin-accent) !important;
  border-color: var(--admin-accent) !important;
}

html[data-theme="dark"] .mobile-cancel-btn:hover,
html[data-theme="dark"] .mobile-edit-layout-btn:hover {
  background: rgba(10, 132, 255, 0.15) !important;
}

/* --- Nav Settings (Dark) --- */
html[data-theme="dark"] .nav-setting-item {
  background: #3a3a3c !important;
  border-color: #48484a !important;
}

html[data-theme="dark"] .nav-setting-item:hover {
  background: #48484a !important;
}

html[data-theme="dark"] .nav-setting-icon {
  background: #2c2c2e !important;
  border-color: #48484a !important;
}

html[data-theme="dark"] .nav-settings {
  background: transparent !important;
}

html[data-theme="dark"] .nav-settings-description {
  color: var(--admin-text-muted) !important;
}

/* --- Toggle Slider (Dark) --- */
html[data-theme="dark"] .toggle-slider {
  background: #48484a;
}

html[data-theme="dark"] .toggle-slider:before {
  background-color: #f5f5f7;
}

html[data-theme="dark"] input:checked + .toggle-slider {
  background-color: var(--admin-accent);
}

/* --- Feedback Dropdown (Dark) --- */
html[data-theme="dark"] .feedback-dropdown-menu {
  background: #2c2c2e !important;
  border-color: #3a3a3c !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

html[data-theme="dark"] .feedback-dropdown-menu .dropdown-item {
  background: transparent !important;
  color: var(--admin-text) !important;
}

html[data-theme="dark"] .feedback-dropdown-menu .dropdown-item:hover {
  background: #3a3a3c !important;
}

html[data-theme="dark"] .feedback-dropdown-menu .dropdown-item:active {
  background: #48484a !important;
}

/* --- Feedback Type Icons (Dark) --- */
html[data-theme="dark"] .feedback-type-icon {
  border: 1px solid transparent;
}

html[data-theme="dark"] .feedback-type-bug {
  background: rgba(255, 69, 58, 0.15) !important;
  color: #ff453a !important;
}

html[data-theme="dark"] .feedback-type-feature {
  background: rgba(255, 214, 10, 0.15) !important;
  color: #ffd60a !important;
}

html[data-theme="dark"] .feedback-type-question {
  background: rgba(10, 132, 255, 0.15) !important;
  color: #0a84ff !important;
}

html[data-theme="dark"] .feedback-type-general {
  background: rgba(152, 152, 157, 0.15) !important;
  color: #98989d !important;
}

/* --- Feedback Priority Badges (Dark) --- */
html[data-theme="dark"] .feedback-priority-critical {
  background: rgba(255, 69, 58, 0.2) !important;
  color: #ff453a !important;
}

html[data-theme="dark"] .feedback-priority-high {
  background: rgba(255, 159, 10, 0.2) !important;
  color: #ff9f0a !important;
}

html[data-theme="dark"] .feedback-priority-medium {
  background: rgba(255, 214, 10, 0.2) !important;
  color: #ffd60a !important;
}

html[data-theme="dark"] .feedback-priority-low {
  background: rgba(152, 152, 157, 0.2) !important;
  color: #98989d !important;
}

/* --- Feedback Status Badges (Dark) --- */
html[data-theme="dark"] .feedback-status-new {
  background: rgba(255, 214, 10, 0.2) !important;
  color: #ffd60a !important;
}

html[data-theme="dark"] .feedback-status-progress {
  background: rgba(10, 132, 255, 0.2) !important;
  color: #0a84ff !important;
}

html[data-theme="dark"] .feedback-status-review {
  background: rgba(191, 90, 242, 0.2) !important;
  color: #bf5af2 !important;
}

html[data-theme="dark"] .feedback-status-done {
  background: rgba(48, 209, 88, 0.2) !important;
  color: #30d158 !important;
}

html[data-theme="dark"] .feedback-status-wontfix {
  background: rgba(152, 152, 157, 0.2) !important;
  color: #98989d !important;
}

/* Badge buttons in feedback */
html[data-theme="dark"] .feedback-quick-edit-dropdown .badge {
  cursor: pointer;
  transition: all 0.15s;
}

html[data-theme="dark"] .feedback-quick-edit-dropdown .badge:hover {
  filter: brightness(1.2);
}

/* --- Icon Preview (Dark) --- */
html[data-theme="dark"] .icon-preview-box {
  background: #2c2c2e !important;
  border-color: #3a3a3c !important;
}

html[data-theme="dark"] .icon-preview-tile {
  background: #3a3a3c !important;
  border-color: #48484a !important;
}

html[data-theme="dark"] .icon-preview-wrapper {
  background: #2c2c2e !important;
}

html[data-theme="dark"] .icon-grid-item {
  background: #3a3a3c !important;
  border-color: #48484a !important;
}

html[data-theme="dark"] .icon-grid-item:hover {
  background: #48484a !important;
}

/* --- Form Sections (Dark) --- */
html[data-theme="dark"] .form-sidebar {
  background: transparent;
}

html[data-theme="dark"] .form-section {
  background: #2c2c2e;
  border-color: #3a3a3c;
}

/* --- Filter Elements (Dark) --- */
html[data-theme="dark"] .list-filters {
  background: #2c2c2e !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

html[data-theme="dark"] .filter-select,
html[data-theme="dark"] .filter-input {
  background-color: #1c1c1e !important;
  border-color: #3a3a3c !important;
  color: var(--admin-text) !important;
}

html[data-theme="dark"] .filter-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
}

html[data-theme="dark"] .filter-tab {
  background: #3a3a3c !important;
  color: #98989d !important;
}

html[data-theme="dark"] .filter-tab.active {
  background: var(--admin-accent) !important;
  color: white !important;
}

html[data-theme="dark"] .filter-badge {
  background: #3a3a3c !important;
  border-color: #48484a !important;
  color: var(--admin-text) !important;
}

html[data-theme="dark"] .active-filters {
  background: #2c2c2e !important;
  border: 1px solid #3a3a3c !important;
  border-radius: 6px;
}

html[data-theme="dark"] .active-filters .filter-badge {
  background: #3a3a3c !important;
  border-color: #48484a !important;
  color: var(--admin-text) !important;
}

/* --- Page Header (Dark) --- */
html[data-theme="dark"] .page-header,
html[data-theme="dark"] .page-header-sticky {
  background: rgba(28, 28, 30, 0.95) !important;
  border-color: var(--admin-border) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* --- Data Table Extended (Dark) --- */
html[data-theme="dark"] .data-table {
  background: var(--admin-content-bg) !important;
}

html[data-theme="dark"] .data-table thead {
  background: #3a3a3c !important;
}

html[data-theme="dark"] .data-table th {
  color: var(--admin-text) !important;
}

html[data-theme="dark"] .data-table th a,
html[data-theme="dark"] .data-table th.sortable a {
  color: var(--admin-text) !important;
}

html[data-theme="dark"] .data-table th.sortable a:hover {
  color: var(--admin-accent) !important;
}

html[data-theme="dark"] .data-table td a.badge-link,
html[data-theme="dark"] .data-table td .badge-link {
  color: #636366 !important;
}

html[data-theme="dark"] .data-table td a.badge-link:hover,
html[data-theme="dark"] .data-table td .badge-link:hover {
  color: var(--admin-accent) !important;
}

html[data-theme="dark"] .data-table tbody tr {
  background: var(--admin-content-bg) !important;
}

html[data-theme="dark"] .data-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02) !important;
}

html[data-theme="dark"] .data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

html[data-theme="dark"] .data-table tbody tr:hover td {
  background: transparent !important;
}

html[data-theme="dark"] .data-table td {
  background: transparent !important;
}

/* --- Auth Pages Extended (Dark) --- */
html[data-theme="dark"] .auth-card {
  background: #2c2c2e;
  border: 1px solid #3a3a3c;
}

html[data-theme="dark"] .auth-form-group input {
  background: #1c1c1e;
  border-color: #3a3a3c;
  color: var(--admin-text);
}

html[data-theme="dark"] .auth-form-group input::placeholder {
  color: #636366;
}

html[data-theme="dark"] .auth-btn {
  background: var(--admin-accent);
  color: white;
}

html[data-theme="dark"] .auth-btn:hover {
  background: var(--admin-accent-hover);
}

html[data-theme="dark"] .auth-text-muted {
  color: #98989d;
}

html[data-theme="dark"] .auth-subtitle {
  color: #98989d;
}

html[data-theme="dark"] .auth-alert-error {
  background: rgba(185, 28, 28, 0.15);
  border-color: rgba(185, 28, 28, 0.3);
  color: #fca5a5;
}

html[data-theme="dark"] .auth-alert-success {
  background: rgba(22, 101, 52, 0.15);
  border-color: rgba(22, 101, 52, 0.3);
  color: #86efac;
}

html[data-theme="dark"] .auth-success-state i {
  color: #22c55e;
}

/* --- Wizard (Dark) --- */
html[data-theme="dark"] .wizard-content {
  background: #2c2c2e;
}

html[data-theme="dark"] .wizard-nav {
  background: #2c2c2e;
  border-color: #3a3a3c;
}

html[data-theme="dark"] .wizard-close {
  color: #98989d;
}

html[data-theme="dark"] .wizard-close:hover {
  background: #3a3a3c;
  color: var(--admin-text);
}

/* --- Welcome Modal (Dark) --- */
html[data-theme="dark"] .welcome-modal {
  background: #2c2c2e;
}

html[data-theme="dark"] .welcome-step {
  border-color: #3a3a3c;
}

/* --- Content Editor (Dark) --- */
html[data-theme="dark"] .content-editor-header {
  background: #3a3a3c;
  border-color: #48484a;
}

/* --- Impersonate Banner (Dark) --- */
html[data-theme="dark"] .impersonate-banner {
  background: #3a3a3c;
}

/* --- Language Dropdown (Dark) --- */
html[data-theme="dark"] .language-dropdown {
  background: #2c2c2e;
  border-color: #3a3a3c;
}

html[data-theme="dark"] .language-dropdown-item:hover {
  background: #3a3a3c;
}

html[data-theme="dark"] .language-selected {
  background: #3a3a3c;
  border-color: #48484a;
}

/* --- Various White Backgrounds (Dark) --- */
html[data-theme="dark"] .color-preview-circle {
  border-color: #48484a;
}

html[data-theme="dark"] .color-input,
html[data-theme="dark"] .color-picker-input {
  background: #2c2c2e !important;
  border-color: #3a3a3c !important;
}

html[data-theme="dark"] .color-input::-webkit-color-swatch-wrapper,
html[data-theme="dark"] .color-picker-input::-webkit-color-swatch-wrapper {
  padding: 2px !important;
}

html[data-theme="dark"] .color-input::-webkit-color-swatch,
html[data-theme="dark"] .color-picker-input::-webkit-color-swatch {
  border: none !important;
  border-radius: 4px !important;
}

html[data-theme="dark"] .color-input::-moz-color-swatch,
html[data-theme="dark"] .color-picker-input::-moz-color-swatch {
  border: none !important;
  border-radius: 4px !important;
}

html[data-theme="dark"] .image-upload-area {
  background: #2c2c2e;
  border-color: #48484a;
}

html[data-theme="dark"] .image-upload-area:hover {
  background: #3a3a3c;
}

html[data-theme="dark"] .unsaved-modal {
  background: #2c2c2e;
}

html[data-theme="dark"] .tag-modal {
  background: #2c2c2e;
}

html[data-theme="dark"] .tag-modal-header {
  border-color: #3a3a3c;
}

html[data-theme="dark"] .tag-input {
  background: #1c1c1e;
  border-color: #3a3a3c;
  color: var(--admin-text);
}

html[data-theme="dark"] .tag-manage-item {
  background: #3a3a3c !important;
  border: 1px solid #48484a;
}

html[data-theme="dark"] .tag-manage-item:hover {
  background: #48484a !important;
}

html[data-theme="dark"] .tag-manage-name {
  color: var(--admin-text) !important;
}

html[data-theme="dark"] .tag-manage-count {
  background: rgba(255, 159, 10, 0.2) !important;
  color: #ff9f0a !important;
}

html[data-theme="dark"] .tag-manage-delete {
  color: #636366 !important;
}

html[data-theme="dark"] .tag-manage-delete:hover {
  color: #ff453a !important;
}

html[data-theme="dark"] .tags-manage-warning {
  background: rgba(255, 159, 10, 0.15) !important;
  color: #ff9f0a !important;
}

html[data-theme="dark"] .tags-manage-warning i {
  color: #ff9f0a !important;
}

/* --- Checkbox styling (Dark) --- */
html[data-theme="dark"] .auth-form-checkbox label {
  color: var(--admin-text);
}

html[data-theme="dark"] input[type="checkbox"] {
  accent-color: var(--admin-accent);
}

/* --- Comprehensive Dark Mode Catch-All ---
 * Overrides for inline styles in PHP views that use hardcoded light colors.
 * These selectors use high specificity to beat inline <style> blocks. */

/* Alert variants (also used as .alert-error in some views) */
html[data-theme="dark"] .alert-error {
  background: rgba(255, 69, 58, 0.15) !important;
  color: #ff453a !important;
  border-color: rgba(255, 69, 58, 0.3) !important;
}

/* Toast notifications */
html[data-theme="dark"] .toast-notification.success {
  background: color-mix(in srgb, #30d158 15%, var(--admin-content-bg)) !important;
  color: #30d158 !important;
}

html[data-theme="dark"] .connect-status.connected {
  background: rgba(48, 209, 88, 0.15) !important;
  color: #30d158 !important;
}

html[data-theme="dark"] .toast-notification.error {
  background: color-mix(in srgb, #ff453a 15%, var(--admin-content-bg)) !important;
  color: #ff453a !important;
}

/* Confirm modal icons */
html[data-theme="dark"] .confirm-modal-icon.warning {
  background: rgba(255, 159, 10, 0.15) !important;
  color: #ff9f0a !important;
}

/* Badge variants used in imports and other views */
html[data-theme="dark"] .badge-error {
  background: rgba(255, 69, 58, 0.15) !important;
  color: #ff453a !important;
}
html[data-theme="dark"] .badge-warning {
  background: rgba(255, 159, 10, 0.15) !important;
  color: #ff9f0a !important;
}

/* Focus ring color in dark mode */
html[data-theme="dark"] .form-input:focus,
html[data-theme="dark"] .form-select:focus,
html[data-theme="dark"] .form-textarea:focus,
html[data-theme="dark"] .form-control:focus {
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.2);
}


/* ============================================================================
   2. BASE & RESET STYLES
   ============================================================================ */

/* ----------------------------------------------------------------------------
   2.1 Box Sizing & Reset
   ---------------------------------------------------------------------------- */

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


/* ----------------------------------------------------------------------------
   2.2 Typography & Body
   ---------------------------------------------------------------------------- */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--admin-bg);
  color: var(--admin-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}


/* ============================================================================
   3. LAYOUT STRUCTURE
   ============================================================================ */

/* ----------------------------------------------------------------------------
   3.0 Top Bar
   ---------------------------------------------------------------------------- */

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--admin-sidebar-bg);
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--admin-text);
  font-size: 18px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.sidebar-toggle:hover {
  background: var(--admin-border);
  color: var(--admin-accent);
}

.top-bar-logo {
  display: flex;
  align-items: baseline;
  text-decoration: none;
  color: var(--admin-text);
  font-size: 18px;
  font-weight: 600;
}

.top-bar-logo-img {
  height: 32px;
  width: auto;
}

.brand-hej { color: var(--admin-text); }
.brand-guide { color: var(--admin-accent); }
.brand-dash {
  font-weight: 400;
  color: var(--admin-text-muted);
  font-size: 14px;
  margin-left: 2px;
}

.top-bar-center {
  position: absolute;
  left: 240px;
  right: 300px;
  display: flex;
  justify-content: flex-start;
  padding: 0 20px;
}

/* Global Search */
.global-search {
  position: relative;
  width: 100%;
  max-width: 560px;
}

.global-search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.global-search-input-wrapper i {
  position: absolute;
  left: 12px;
  color: var(--admin-text-muted);
  font-size: 14px;
  pointer-events: none;
}

.global-search-input {
  width: 100%;
  padding: 8px 40px 8px 36px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-bg);
  font-size: 14px;
  color: var(--admin-text);
  transition: all 0.2s;
}

.global-search-input:focus {
  outline: none;
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.global-search-input::placeholder {
  color: var(--admin-text-muted);
}

.global-search-shortcut {
  position: absolute;
  right: 10px;
  padding: 2px 6px;
  background: var(--admin-bg);
  border: 1px solid var(--admin-border);
  border-radius: 4px;
  font-size: 11px;
  color: var(--admin-text-muted);
  font-family: inherit;
}

.global-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--admin-content-bg);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
}


html[data-theme="dark"] .global-search-results {
  background: #2c2c2e;
}


.global-search-loading,
.global-search-empty {
  padding: 20px;
  text-align: center;
  color: var(--admin-text-muted);
  font-size: 14px;
}

.global-search-section {
  padding: 8px 0;
  border-bottom: 1px solid var(--admin-border);
}

.global-search-section:last-child {
  border-bottom: none;
}

.global-search-section-title {
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--admin-text-muted);
}

.global-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--admin-text);
  transition: background 0.15s;
}

.global-search-item:hover {
  background: var(--admin-bg);
}

.global-search-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--admin-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--admin-text-muted);
  font-size: 14px;
  flex-shrink: 0;
}

.global-search-item-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.global-search-item-content {
  flex: 1;
  min-width: 0;
}

.global-search-item-title {
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.global-search-item-subtitle {
  font-size: 12px;
  color: var(--admin-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.global-search-item-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  flex-shrink: 0;
}

/* New Reservation Button in Header */
.btn-icon-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--admin-accent);
  color: white;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-icon-circle:hover {
  background: var(--admin-accent-hover);
  transform: scale(1.05);
}

/* New Reservation Button (expandable pill) */
.btn-new-reservation {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: none;
  color: var(--admin-text-muted);
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-new-reservation:hover {
  background: var(--admin-hover-bg);
  color: var(--admin-text);
}

.btn-new-reservation span {
  display: none;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-bar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: 24px;
  min-height: 44px;
  text-decoration: none;
  color: var(--admin-text);
  transition: all 0.2s ease;
}

.top-bar-user:hover {
  background: var(--admin-border);
}

.top-bar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.top-bar-user-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--admin-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.top-bar-user-name {
  font-size: 14px;
  font-weight: 500;
}

.top-bar-user-name .admin-badge-text {
  font-weight: 400;
  color: var(--admin-text-muted);
  font-size: 12px;
}

/* --- User Menu Dropdown --- */

.topbar-user-wrapper {
  position: relative;
}

button.top-bar-user {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

.top-bar-user-caret {
  font-size: 10px;
  color: var(--admin-text-muted);
  transition: transform 0.2s ease;
  margin-left: 2px;
}

.top-bar-user[aria-expanded="true"] .top-bar-user-caret {
  transform: rotate(180deg);
}

.top-bar-user[aria-expanded="true"] {
  background: var(--admin-border);
}

.topbar-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: var(--admin-content-bg);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  box-shadow: var(--admin-shadow-lg);
  z-index: 200;
  display: none;
  overflow: hidden;
  padding: 4px 0;
}

.topbar-user-dropdown.show {
  display: block;
}

.topbar-user-dropdown-header {
  padding: 14px 16px 10px;
}

.topbar-user-dropdown-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--admin-text);
  margin-bottom: 1px;
}

.topbar-user-dropdown-email {
  font-size: 12px;
  color: var(--admin-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-user-dropdown-plan {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.topbar-user-plan-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--admin-text);
}

.topbar-user-plan-status {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 113, 227, 0.1);
  color: var(--admin-accent);
}

.topbar-user-plan-status--trial {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.topbar-user-plan-status--grace,
.topbar-user-plan-status--expired,
.topbar-user-plan-status--read_only {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.topbar-user-plan-status--cancelled {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

.topbar-user-dropdown-section-label {
  padding: 8px 16px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.topbar-user-account-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-user-account-item.active {
  background: rgba(0, 113, 227, 0.05);
}

.topbar-user-account-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--admin-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.topbar-user-account-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

/* Dark mode overrides for user dropdown */
html[data-theme="dark"] .topbar-user-plan-status {
  background: rgba(10, 132, 255, 0.15);
  color: #4da3ff;
}

html[data-theme="dark"] .topbar-user-plan-status--trial {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

html[data-theme="dark"] .topbar-user-plan-status--grace,
html[data-theme="dark"] .topbar-user-plan-status--expired,
html[data-theme="dark"] .topbar-user-plan-status--read_only {
  background: rgba(255, 69, 58, 0.15);
  color: #ff453a;
}

html[data-theme="dark"] .topbar-user-plan-status--cancelled {
  background: rgba(142, 142, 147, 0.15);
  color: #8e8e93;
}

html[data-theme="dark"] .topbar-user-account-item.active {
  background: rgba(10, 132, 255, 0.1);
}

/* Mobile search button — hidden on desktop */
.mobile-search-btn {
  display: none;
}

/* Mobile: hide inline search, show search icon, hide account switcher */
@media (max-width: 768px) {
  /* Hide the desktop search bar on mobile */
  .top-bar-center {
    display: none !important;
  }

  /* Show mobile search icon in topbar */
  .mobile-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    color: var(--admin-text-muted);
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-search-btn:active {
    background: var(--admin-bg-secondary);
  }

  .top-bar-user-name {
    display: none;
  }

  .top-bar-user-caret {
    display: none;
  }

  .topbar-user-dropdown {
    position: fixed;
    top: 60px;
    left: 8px;
    right: 8px;
    width: auto;
  }
}

/* Mobile Search Overlay */
.mobile-search-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  background: var(--admin-content-bg);
  flex-direction: column;
}
.mobile-search-overlay.active {
  display: flex;
}

.mobile-search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--admin-border);
  background: var(--admin-content-bg);
}

.mobile-search-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}
.mobile-search-input-wrapper i {
  position: absolute;
  left: 12px;
  color: var(--admin-text-muted);
  font-size: 15px;
  pointer-events: none;
}

.mobile-search-input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: var(--admin-bg);
  font-size: 16px;
  color: var(--admin-text);
  outline: none;
  appearance: none;
}
.mobile-search-input:focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.mobile-search-cancel {
  background: none;
  border: none;
  color: var(--admin-accent);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 4px;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.mobile-search-results {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 16px;
}

.mobile-search-results .global-search-result-group {
  margin-bottom: 16px;
}
.mobile-search-results .global-search-result-group-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--admin-text-muted);
  padding: 8px 0;
}
.mobile-search-results .global-search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--admin-text);
}
.mobile-search-results .global-search-result-item:active {
  background: var(--admin-bg-secondary);
}
.mobile-search-results .global-search-result-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--admin-bg-secondary);
  color: var(--admin-text-muted);
  font-size: 14px;
  flex-shrink: 0;
}
.mobile-search-results .global-search-result-info {
  flex: 1;
  min-width: 0;
}
.mobile-search-results .global-search-result-title {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-search-results .global-search-result-subtitle {
  font-size: 13px;
  color: var(--admin-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-search-results .mobile-search-empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--admin-text-muted);
  font-size: 15px;
}
.mobile-search-results .mobile-search-loading {
  text-align: center;
  padding: 40px 16px;
  color: var(--admin-text-muted);
  font-size: 14px;
}

/* Sidebar account switcher — hidden on desktop, visible on mobile */
.sidebar-account-switch {
  display: none;
}

@media (max-width: 768px) {
  .sidebar-account-switch {
    display: block;
  }
}

.sidebar-switch-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.sidebar-switch-letter {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--admin-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.account-switcher-own-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  background: var(--admin-accent);
  color: white;
  border-radius: 4px;
}

.account-suspended-item {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}
.account-suspended-label {
  display: block;
  font-size: 11px;
  color: var(--admin-text-muted);
  font-weight: 400;
}

/* Co-host indicator (slim banner next to account switcher) */
.cohost-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 149, 0, 0.1);
  border: 1px solid rgba(255, 149, 0, 0.3);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #cc7700;
}

.cohost-indicator i {
  font-size: 11px;
}

@media (max-width: 768px) {
  .cohost-indicator span {
    display: none;
  }
}

/* ----------------------------------------------------------------------------
   3.1 Admin Container Grid
   ---------------------------------------------------------------------------- */

.admin-container {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 56px);
  margin-top: 56px;
  overflow-x: clip;
  background: linear-gradient(to right, var(--admin-sidebar-bg) 240px, transparent 240px);
  border-right: 1px solid var(--admin-border);
  border-right-width: 0;
  position: relative;
}

.admin-container::before {
  content: '';
  position: absolute;
  left: 240px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--admin-border);
  z-index: 1;
}

/* Collapsed sidebar state */
.sidebar-collapsed .admin-container {
  grid-template-columns: 64px 1fr;
  background: linear-gradient(to right, var(--admin-sidebar-bg) 64px, transparent 64px);
}

.sidebar-collapsed .admin-container::before {
  left: 64px;
}

.sidebar-collapsed .admin-sidebar {
  width: 64px;
}

/* Text labels: shrink to zero width, keep layout intact */
.sidebar-collapsed .admin-nav-item span:not(.nav-badge) {
  width: 0;
  overflow: hidden;
  opacity: 0;
  flex-shrink: 0;
}

/* Structural elements that are truly hidden */
.sidebar-collapsed .admin-nav-section-header span,
.sidebar-collapsed .admin-nav-guidebook,
.sidebar-collapsed .admin-nav-section-content,
.sidebar-collapsed .nav-expand-btn,
.sidebar-collapsed .nav-readonly-icon {
  display: none;
}

.sidebar-collapsed .admin-nav-divider {
  margin: 12px 8px;
}

/* Keep same padding and layout — only width changes */
.sidebar-collapsed .admin-nav-item {
  padding: 12px;
  white-space: nowrap;
  gap: 0;
}

.sidebar-collapsed .admin-nav-item i {
  flex-shrink: 0;
  min-width: 20px;
  text-align: center;
  font-size: 16px;
}

.sidebar-collapsed .admin-nav-section-header {
  overflow: hidden;
}

.sidebar-collapsed .admin-nav-section-header .admin-nav-item {
  width: 100%;
}

/* Tooltip on hover when collapsed */
.sidebar-collapsed .admin-nav-item {
  position: relative;
}

.sidebar-collapsed .admin-nav-item::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  background: var(--admin-text);
  color: var(--admin-bg);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  margin-left: 8px;
  z-index: 1001;
}

.sidebar-collapsed .admin-nav-item:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Sidebar navigation badge (unread count) */
.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Collapsed sidebar: small dot indicator */
.sidebar-collapsed .nav-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 8px;
  height: 8px;
  padding: 0;
  font-size: 0;
}


/* ----------------------------------------------------------------------------
   3.2 Sidebar
   ---------------------------------------------------------------------------- */

.admin-sidebar {
  background: var(--admin-sidebar-bg);
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease;
}

/* Desktop sticky sidebar */
@media (min-width: 769px) {
  .admin-sidebar {
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    align-self: start;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
  }

  .admin-sidebar:hover {
    scrollbar-color: var(--admin-border) transparent;
  }

  /* Webkit: hidden by default, visible on hover */
  .admin-sidebar::-webkit-scrollbar {
    width: 6px;
  }

  .admin-sidebar::-webkit-scrollbar-track {
    background: transparent;
  }

  .admin-sidebar::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 3px;
    transition: background 0.2s;
  }

  .admin-sidebar:hover::-webkit-scrollbar-thumb {
    background: var(--admin-border);
  }

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

/* Brand/Logo */
.admin-brand {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 18px;
  font-weight: 600;
  color: var(--admin-text);
  border-bottom: 1px solid var(--admin-border);
}

.admin-brand .brand-content {
  display: flex;
  align-items: baseline;
  justify-content: center;
  text-decoration: none !important;
  color: inherit;
}

.admin-brand .brand-content:hover,
.admin-brand .brand-content:visited,
.admin-brand .brand-content:active,
.admin-brand .brand-content:focus {
  text-decoration: none !important;
  color: inherit;
}

.admin-brand .brand-content:hover {
  opacity: 0.8;
}

.admin-brand .sidebar-logo {
  max-height: 36px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.admin-brand .brand-hej {
  color: #0071e3;
  font-size: 26px;
  font-weight: 700;
}

.admin-brand .brand-guide,
.admin-brand .brand-dash {
  color: var(--admin-text);
  font-size: 26px;
  font-weight: 700;
}

.admin-brand .brand-dash {
  color: var(--admin-text-muted);
  margin-left: 6px;
}

.admin-brand > i.fa-book {
  font-size: 24px;
  color: var(--admin-accent);
}


/* ----------------------------------------------------------------------------
   3.3 Sidebar Navigation
   ---------------------------------------------------------------------------- */

.admin-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 8px;
  min-height: 44px;
  color: var(--admin-text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.admin-nav-item:hover {
  background: rgba(0, 113, 227, 0.06);
  color: var(--admin-accent);
}

.admin-nav-item.active {
  background: rgba(0, 113, 227, 0.1);
  color: var(--admin-accent);
}

.admin-nav-item i {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

.admin-nav-divider {
  height: 1px;
  background: var(--admin-border);
  margin: 12px 0;
}

/* Navigation Group (Expandable) */
.admin-nav-group {
  position: relative;
}

.admin-nav-item .nav-toggle {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.2s ease;
  color: var(--admin-text-muted);
}

.admin-nav-group:hover .nav-toggle {
  transform: rotate(0deg) !important;
}

/* Submenu */
.admin-nav-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.admin-nav-submenu.active {
  max-height: 1000px;
  padding: 4px 0 8px 0;
}

/* Guidebook accordion in sidebar */
.admin-nav-guidebook {
  margin: 0 0 8px 0;
}

.admin-nav-guidebook:last-child {
  margin-bottom: 0;
}

.admin-nav-guidebook-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  color: var(--admin-text);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.admin-nav-guidebook-header:hover {
  background: rgba(0, 113, 227, 0.06);
  color: var(--admin-accent);
}

.admin-nav-guidebook-header.active {
  color: var(--admin-accent);
  background: rgba(0, 113, 227, 0.08);
}

.admin-nav-guidebook-header span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-nav-guidebook-links {
  display: block;
}

/* Guidebook subitems - same indentation as guidebook name */
.admin-nav-guidebook-subitem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: var(--admin-text-muted);
  text-decoration: none;
  font-size: 13px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.admin-nav-guidebook-subitem:hover {
  background: rgba(0, 113, 227, 0.05);
  color: var(--admin-accent);
}

.admin-nav-guidebook-subitem.active {
  color: var(--admin-accent);
  background: rgba(0, 113, 227, 0.08);
}

.admin-nav-guidebook-subitem i {
  width: 16px;
  font-size: 12px;
  text-align: center;
  opacity: 0.7;
}

.admin-nav-guidebook .admin-nav-subitem {
  padding: 8px 12px 8px 44px;
}

/* Show more guidebooks button */
.admin-nav-show-more {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  color: var(--admin-text-muted);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.admin-nav-show-more:hover {
  background: rgba(0, 113, 227, 0.06);
  color: var(--admin-accent);
}

.admin-nav-show-more i {
  width: 20px;
  text-align: center;
}

/* Nav Section (collapsible group like Guidebooks) */
.admin-nav-section {
  margin: 0;
  flex-shrink: 0;
  flex-grow: 0;
}

.admin-nav-section-header {
  display: flex;
  align-items: center;
}

.admin-nav-section-header .admin-nav-item {
  flex: 1;
  margin: 0;
}

.admin-nav-section-header .nav-expand-btn {
  margin-right: 8px;
}

.admin-nav-section-header .nav-chevron {
  font-size: 10px;
  opacity: 0.5;
  transition: transform 0.2s ease;
}

.admin-nav-section.expanded .admin-nav-section-header .nav-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.admin-nav-section-content {
  display: none;
  padding-left: 8px;
}

.admin-nav-section.expanded .admin-nav-section-content {
  display: block;
}

/* Add new guidebook link at bottom of section */
.admin-nav-add-new {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--admin-border);
  color: var(--admin-text-muted) !important;
}

.admin-nav-add-new:hover {
  color: var(--admin-accent) !important;
}

/* Guidebook header is now a link with expand button */
a.admin-nav-guidebook-header {
  text-decoration: none;
}

a.admin-nav-guidebook-header.active {
  color: var(--admin-accent);
  background: rgba(0, 113, 227, 0.08);
}

.nav-expand-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  margin: -4px 0;
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: var(--admin-text-muted);
  transition: all 0.15s ease;
}

.nav-expand-btn:hover {
  background: rgba(0, 113, 227, 0.1);
  color: var(--admin-accent);
}

.nav-expand-btn .nav-chevron {
  font-size: 10px;
  transition: transform 0.2s ease;
}

.admin-nav-guidebook.expanded .nav-expand-btn .nav-chevron {
  transform: rotate(180deg);
}

.admin-nav-subgroup {
  margin: 8px 0;
}

.admin-nav-subitem-header {
  padding: 8px 16px 6px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-nav-subitem-links {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.admin-nav-subitem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 40px;
  color: var(--admin-text);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
  position: relative;
}

.admin-nav-subitem:hover {
  background: rgba(0, 113, 227, 0.05);
  color: var(--admin-accent);
}

.admin-nav-subitem.active {
  color: var(--admin-accent);
  background: rgba(0, 113, 227, 0.08);
  border-left-color: var(--admin-accent);
  font-weight: 500;
}

.admin-nav-subitem i {
  width: 16px;
  font-size: 13px;
  text-align: center;
  opacity: 0.6;
}

.admin-nav-subitem.active i,
.admin-nav-subitem:hover i {
  opacity: 1;
}


/* ----------------------------------------------------------------------------
   3.4 Main Content Area
   ---------------------------------------------------------------------------- */

.admin-main {
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  min-width: 0;
  min-height: calc(100vh - 56px);
}

.admin-content {
  padding: 24px 32px 32px;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Constrain content children but let page-header and footer span full width */
.admin-content > *:not(.page-header):not(.page-header-sticky):not(.admin-footer) {
}

.admin-footer {
  margin-top: auto;
  padding: 24px 0;
  border-top: 1px solid var(--admin-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--admin-text-muted);
}

.admin-footer .footer-links {
  display: flex;
  gap: 16px;
}

.admin-footer .footer-links a {
  color: var(--admin-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

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


/* ----------------------------------------------------------------------------
   3.5 Header & Breadcrumbs (legacy - now using top-bar)
   ---------------------------------------------------------------------------- */

.admin-header {
  display: none; /* Now using top-bar instead */
}

.admin-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--admin-text-muted);
}

.admin-breadcrumbs a {
  color: var(--admin-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.admin-breadcrumbs a:hover {
  color: var(--admin-accent);
}

.admin-breadcrumbs .current {
  color: var(--admin-text);
  font-weight: 500;
}

.admin-breadcrumbs i {
  font-size: 10px;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--admin-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.admin-user:hover,
.admin-user:visited,
.admin-user:active {
  text-decoration: none;
}

.admin-user:hover {
  color: var(--admin-text);
}

.admin-user i {
  font-size: 20px;
}

/* Page Header */
.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  color: var(--admin-text);
}

.page-header p {
  font-size: 16px;
  color: var(--admin-text-muted);
}

.page-header-actions {
  display: flex;
  gap: 12px;
}

/* Mobile Breadcrumb (hidden on desktop) */
.mobile-breadcrumb {
  display: none;
}

/* Page Breadcrumbs (in page header) */
.page-breadcrumbs {
  margin: 0;
}

.page-breadcrumbs .breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-breadcrumbs .breadcrumb-item {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--admin-text-muted);
}

.page-breadcrumbs .breadcrumb-item a {
  color: var(--admin-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.page-breadcrumbs .breadcrumb-item a:hover {
  color: var(--admin-accent);
}

.page-breadcrumbs .breadcrumb-separator {
  font-size: 10px;
  margin: 0 8px;
  color: var(--admin-text-muted);
  opacity: 0.5;
}

.page-breadcrumbs .breadcrumb-current {
  color: var(--admin-text);
}

.page-breadcrumbs .breadcrumb-current span {
  color: inherit;
}


/* ============================================================================
   4. COMPONENTS - CORE UI
   ============================================================================ */

/* ----------------------------------------------------------------------------
   4.1 Buttons
   ---------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary {
  background: var(--admin-accent);
  color: white;
  border: 1px solid var(--admin-accent);
}

.btn-primary:hover {
  background: var(--admin-accent-hover);
  border-color: var(--admin-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}

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

.btn-secondary:hover {
  background: var(--admin-hover-bg);
}

.btn-danger {
  background: var(--admin-danger);
  color: white;
  border: 1px solid var(--admin-danger);
}

.btn-danger:hover {
  filter: brightness(0.9);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--admin-border);
  background: var(--admin-content-bg);
  border-radius: 6px;
  color: var(--admin-text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-icon:hover {
  background: var(--admin-bg);
  color: var(--admin-accent);
  border-color: var(--admin-accent);
}

/* Back button (icon-only, for dense headers like booking detail) */
.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--admin-bg);
  color: var(--admin-text);
  text-decoration: none;
  transition: all 0.15s;
  flex-shrink: 0;
}

.back-btn:hover {
  background: var(--admin-hover-bg);
  color: var(--admin-accent);
}

.btn-text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  color: var(--admin-accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.15s;
}

.btn-text-link:hover {
  color: var(--admin-accent) !important;
  background: rgba(59, 130, 246, 0.08) !important;
}

.btn-text-link:active {
  transform: translateY(1px);
}

/* Button loading state — works on .btn, .auth-btn, and any button */
.btn.is-loading,
.auth-btn.is-loading,
button.is-loading {
  pointer-events: none;
  opacity: 0.7;
  position: relative;
}

.btn.is-loading .btn-label,
.auth-btn.is-loading .btn-label,
button.is-loading .btn-label {
  visibility: hidden;
}

.btn.is-loading::after,
.auth-btn.is-loading::after,
button.is-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* Focus-visible states for keyboard navigation */
.btn:focus-visible,
.btn-icon:focus-visible,
.btn-text-link:focus-visible,
.btn-new-reservation:focus-visible,
.btn-icon-circle:focus-visible {
  outline: 2px solid var(--admin-accent);
  outline-offset: 2px;
}

.btn-danger:focus-visible {
  outline-color: #ff3b30;
}

.modal-close:focus-visible {
  outline: 2px solid var(--admin-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.admin-nav-item:focus-visible {
  outline: 2px solid var(--admin-accent);
  outline-offset: -2px;
}

.sidebar-toggle:focus-visible {
  outline: 2px solid var(--admin-accent);
  outline-offset: 2px;
}

.top-bar-user:focus-visible {
  outline: 2px solid var(--admin-accent);
  outline-offset: 2px;
  border-radius: 24px;
}

.global-search-item:focus-visible,
.tab-btn:focus-visible,
.toggle-switch:focus-visible {
  outline: 2px solid var(--admin-accent);
  outline-offset: 2px;
}


/* ----------------------------------------------------------------------------
   4.2 Cards
   ---------------------------------------------------------------------------- */

.card {
  background: var(--admin-content-bg);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 28px;
  box-shadow: var(--admin-shadow);
  margin-bottom: 24px;
}

.card-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--admin-border);
}

.card-header h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--admin-text);
  margin: 0;
}

.card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--admin-text);
  margin: 0 0 24px 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--admin-border);
}

/* Section Card (flush container with header bar, used for grouped content) */
.section-card {
  background: var(--admin-content-bg);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--admin-border);
  background: var(--admin-bg);
}

.section-header-left {
  flex: 1;
}

.section-header-right {
  flex-shrink: 0;
}

.section-header h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header h2 i {
  color: var(--admin-accent);
}

.section-header .text-muted {
  font-size: 13px;
  margin: 0;
}

html[data-theme="dark"] .section-header {
  background: var(--admin-hover-bg);
}

/* Danger Zone (destructive actions, placed at bottom of pages) */
.danger-zone {
  margin-top: 48px;
  padding: 20px 24px;
  border: 1px solid var(--admin-danger);
  border-radius: var(--admin-radius);
  background: color-mix(in srgb, var(--admin-danger) 4%, transparent);
}

.danger-zone h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--admin-danger);
  margin: 0 0 4px;
}

.danger-zone p {
  font-size: 14px;
  color: var(--admin-text-muted);
  margin: 0 0 16px;
}


/* ----------------------------------------------------------------------------
   4.3 Alerts & Notifications
   ---------------------------------------------------------------------------- */

.alert {
  padding: 16px 20px;
  border-radius: var(--admin-radius);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
}

.alert i {
  font-size: 18px;
}

.alert-success {
  background: var(--admin-success-bg);
  color: var(--admin-success);
  border: 1px solid var(--admin-success);
}

.alert-error {
  background: var(--admin-danger-bg);
  color: var(--admin-danger);
  border: 1px solid var(--admin-danger);
}

.alert-info {
  background: var(--admin-info-bg);
  color: var(--admin-info);
  border: 1px solid var(--admin-info);
}

.alert-warning {
  background: var(--admin-warning-bg);
  color: var(--admin-warning);
  border: 1px solid var(--admin-warning);
}


/* ----------------------------------------------------------------------------
   4.4 Badges
   ---------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.badge-success {
  background: var(--admin-success-bg);
  color: var(--admin-success);
}

.badge-warning {
  background: var(--admin-warning-bg);
  color: var(--admin-warning);
}

.badge-danger {
  background: var(--admin-danger-bg);
  color: var(--admin-danger);
}

.badge-info {
  background: var(--admin-info-bg);
  color: var(--admin-info);
}

.badge-draft {
  background: var(--admin-bg);
  color: var(--admin-text-muted);
}

.badge-secondary {
  background: var(--admin-hover-bg);
  color: var(--admin-text);
}

.badge-category {
  background: var(--admin-info-bg);
  color: var(--admin-info);
}

.badge-neutral {
  background: var(--admin-hover-bg);
  color: var(--admin-text-muted);
}

/* Clickable Badges */
.badge-clickable,
a.badge {
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.badge-clickable:hover,
a.badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  filter: brightness(0.95);
}

/* Type icon as link */
a.feedback-type-icon {
  text-decoration: none;
  transition: all 0.15s;
}

a.feedback-type-icon:hover {
  transform: scale(1.1);
}

/* Badge Variants for Specific Use Cases */
.badge-you {
  background: var(--admin-info-bg);
  color: var(--admin-info);
}

.badge-admin {
  background: var(--admin-warning-bg);
  color: var(--admin-warning);
}

.badge-paused {
  background: var(--admin-warning-bg);
  color: var(--admin-warning);
}

.badge-deleted {
  background: var(--admin-danger-bg);
  color: var(--admin-danger);
}

.badge-impersonate {
  color: var(--admin-purple);
}


/* Rate Plan Summary (listing form pricing tab) */
.rate-plan-summary {
  background: var(--admin-bg-secondary);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 1rem;
}

.rate-plan-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .rate-plan-summary-grid {
    grid-template-columns: 1fr;
  }
}

.rate-plan-summary-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rate-plan-summary-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rate-plan-summary-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--admin-text);
}

.rate-plan-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--admin-border);
}

.rate-plan-feature-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: var(--admin-primary-bg);
  color: var(--admin-primary);
}

.rate-plan-edit-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0.75rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--admin-primary);
  text-decoration: none;
}

.rate-plan-edit-link:hover {
  text-decoration: underline;
}

.empty-state-compact {
  text-align: center;
  padding: 1rem 0;
  color: var(--admin-text-muted);
}

.empty-state-compact p {
  margin: 0 0 0.5rem;
  font-size: 14px;
}

/* ----------------------------------------------------------------------------
   4.5 Tabs
   ---------------------------------------------------------------------------- */

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--admin-border);
  overflow-x: auto;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: none;
  border: none;
  color: var(--admin-text-muted);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-family: inherit;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--admin-text);
  background: rgba(0, 113, 227, 0.04);
}

.tab-btn.active {
  color: var(--admin-accent);
  border-bottom-color: var(--admin-accent);
}

.tab-btn i {
  font-size: 16px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}


/* ----------------------------------------------------------------------------
   4.6 Tables
   ---------------------------------------------------------------------------- */

.table-container {
  overflow-x: auto;
  border-radius: var(--admin-radius);
  border: 1px solid var(--admin-border);
  background: var(--admin-content-bg);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead {
  background: var(--admin-subtle-bg);
  border-bottom: 1px solid var(--admin-border);
}

th {
  text-align: left;
  padding: 14px 16px;
  font-weight: 600;
  color: var(--admin-text);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 16px;
  border-bottom: 1px solid var(--admin-border);
  color: var(--admin-text);
}

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

tbody tr:hover {
  background: rgba(0, 113, 227, 0.02);
}

/* Sortable Table Headers */
.sortable-header {
  cursor: pointer;
  user-select: none;
}

.sortable-header a {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}

.sortable-header a:hover {
  color: var(--admin-accent);
}

.sort-icon {
  font-size: 11px;
  opacity: 0.3;
  transition: opacity 0.15s, color 0.15s;
}

.sort-icon.active {
  opacity: 1;
  color: var(--admin-accent);
}

.sortable-header:hover .sort-icon {
  opacity: 0.6;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--admin-content-bg);
  border: 1px solid var(--admin-border);
  border-top: none;
  border-radius: 0 0 var(--admin-radius) var(--admin-radius);
}

/* Remove bottom border-radius from table when pagination follows */
.table-container.has-pagination {
  border-radius: var(--admin-radius) var(--admin-radius) 0 0;
}

.pagination-info {
  font-size: 13px;
  color: var(--admin-text-muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--admin-text);
  background: var(--admin-bg);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s;
}

.pagination-btn:hover:not(.disabled):not(.active) {
  background: var(--admin-content-bg);
  border-color: var(--admin-accent);
  color: var(--admin-accent);
}

.pagination-btn.active {
  background: var(--admin-accent);
  border-color: var(--admin-accent);
  color: white;
}

.pagination-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-ellipsis {
  padding: 0 8px;
  color: var(--admin-text-muted);
}

/* Data Table Specific */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: var(--admin-subtle-bg);
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--admin-border);
}

.data-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.data-table th.sortable a {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}

.data-table th.sortable a:hover {
  color: var(--admin-accent);
}

.sort-icon {
  font-size: 11px;
  opacity: 0.4;
  transition: opacity 0.15s;
}

.sort-icon.active {
  opacity: 1;
  color: var(--admin-accent);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}

.data-table td a:not(.btn):not(.badge) {
  color: var(--admin-text);
  text-decoration: none;
  font-weight: 500;
}

.data-table td a:not(.btn):not(.badge):hover {
  color: var(--admin-accent);
  text-decoration: none;
}

.data-table tbody tr:hover {
  background: var(--admin-subtle-bg);
}

/* Table Cell Styles */
.cell-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.listing-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--admin-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.listing-thumb i {
  font-size: 14px;
  color: var(--admin-text-muted);
}

.data-table td a.cell-title-link {
  color: var(--admin-text);
  text-decoration: none;
  font-weight: 500;
}

.data-table td a.cell-title-link:hover {
  color: var(--admin-accent);
  text-decoration: none;
}

.template-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.template-icon.in-use {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.template-icon.not-used {
  background: var(--admin-bg);
  color: var(--admin-text-muted);
}

.cell-subtitle {
  font-size: 12px;
  color: var(--admin-text-muted);
  margin-top: 4px;
}

.cell-subtitle-link {
  display: block;
  font-size: 12px;
  color: var(--admin-text-muted);
  margin-top: 4px;
  text-decoration: none;
}

.cell-subtitle-link:hover {
  color: var(--admin-accent);
}

.cell-subtitle-link i.fa-robot {
  color: var(--admin-accent);
  margin-right: 4px;
}

.cell-subtitle i.fa-robot {
  color: var(--admin-accent);
  margin-right: 4px;
}

.cell-subtitle .text-muted {
  color: var(--admin-text-muted);
  font-style: italic;
}

/* Language badges */
.lang-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.lang-badge {
  font-size: 10px;
  padding: 2px 6px;
  background: var(--admin-bg);
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--admin-text-muted);
  text-decoration: none;
}

.lang-badge.badge-clickable {
  cursor: pointer;
  transition: all 0.15s;
}

.lang-badge.badge-clickable:hover {
  background: var(--admin-border);
  color: var(--admin-text);
}

.cell-automation-link {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cell-automation-link i {
  color: var(--admin-accent);
  font-size: 11px;
}

.automation-link {
  color: var(--admin-accent);
  text-decoration: none;
  font-weight: 500;
}

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

.automation-link.disabled {
  color: var(--admin-text-muted);
  font-weight: normal;
}

.cell-no-automation {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--admin-text-muted);
  font-style: italic;
}

.cell-no-automation i {
  font-size: 11px;
}

.row-actions {
  display: flex;
  gap: 4px;
}

/* Bulk Selection */
.bulk-checkbox {
  width: 16px;
  min-width: 16px;
  padding: 0 0 0 12px !important;
  vertical-align: middle;
}

.bulk-checkbox input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--admin-border);
  border-radius: 4px;
  background: var(--admin-content-bg);
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  vertical-align: middle;
  opacity: 0;
  flex-shrink: 0;
}

thead .bulk-checkbox input[type="checkbox"] {
  opacity: 0;
}

tr:hover .bulk-checkbox input[type="checkbox"],
.bulk-checkbox input[type="checkbox"]:checked,
.bulk-checkbox input[type="checkbox"]:indeterminate,
.has-selection .bulk-checkbox input[type="checkbox"] {
  opacity: 1;
}

.bulk-checkbox input[type="checkbox"]:hover {
  border-color: var(--admin-accent);
}

.bulk-checkbox input[type="checkbox"]:checked {
  background: var(--admin-accent);
  border-color: var(--admin-accent);
}

.bulk-checkbox input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4.5px;
  top: 1.5px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.bulk-checkbox input[type="checkbox"]:indeterminate {
  background: var(--admin-accent);
  border-color: var(--admin-accent);
}

.bulk-checkbox input[type="checkbox"]:indeterminate::after {
  content: '';
  position: absolute;
  left: 2.5px;
  top: 6px;
  width: 8px;
  height: 1.5px;
  background: white;
  border-radius: 1px;
}

tr:hover .bulk-checkbox input[type="checkbox"]:not(:checked) {
  border-color: var(--admin-text-muted);
}

.bulk-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--admin-text);
  color: white;
  padding: 12px 24px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 200;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.25s ease;
}

.bulk-action-bar.visible {
  transform: translateY(0);
}

.bulk-count {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.bulk-actions {
  display: flex;
  gap: 8px;
  flex: 1;
}

.bulk-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.bulk-btn:hover {
  opacity: 0.85;
}

.bulk-btn-success {
  background: var(--admin-success);
  color: white;
}

.bulk-btn-muted {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.bulk-btn-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
  transition: background 0.15s;
}

.bulk-btn-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

html[data-theme="dark"] .bulk-action-bar {
  background: var(--admin-content-bg);
  border-top: 1px solid var(--admin-border);
}

@media (max-width: 768px) {
  .bulk-action-bar {
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    gap: 10px;
  }

  .bulk-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
}

.bulk-btn-translate {
  background: var(--admin-accent);
  color: white;
}

/* Translate Modal — Language Grid */
.translate-modal-langs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
}

.translate-lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s;
}

.translate-lang-option:hover {
  background: var(--admin-bg-secondary);
}

.translate-lang-option .lang-badge {
  min-width: 28px;
  text-align: center;
}

/* Translate Progress */
.translate-progress-bar {
  height: 6px;
  background: var(--admin-bg-secondary);
  border-radius: 3px;
  overflow: hidden;
  margin: 12px 0;
}

.translate-progress-fill {
  height: 100%;
  background: var(--admin-accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.translate-progress-text {
  font-weight: 600;
  font-size: 15px;
}

.translate-progress-detail {
  font-size: 13px;
  color: var(--admin-text-muted);
}

/* Category Headers in Tables */
.category-header {
  background: var(--admin-bg-secondary) !important;
}

.category-header td {
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--admin-border);
}

.category-header-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-header-content i {
  font-size: 14px;
  color: var(--admin-accent);
  width: 20px;
  text-align: center;
}

.category-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--admin-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category-count {
  font-size: 12px;
  color: var(--admin-text-muted);
  font-weight: normal;
}

.category-description {
  font-size: 12px;
  color: var(--admin-text-muted);
  font-weight: normal;
  margin-left: auto;
}

.category-header:hover {
  background: var(--admin-bg-secondary) !important;
}


/* ----------------------------------------------------------------------------
   4.7 Empty States
   ---------------------------------------------------------------------------- */

.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state i, .empty-state svg {
  font-size: 48px;
  color: var(--admin-text-muted);
  margin-bottom: 16px;
  opacity: 0.4;
  display: block;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--admin-text);
}

.empty-state p {
  color: var(--admin-text-muted);
  margin-bottom: 24px;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
  font-size: 14px;
  line-height: 1.5;
}

/* Ensure CTA button in empty states is centered */
.empty-state .btn, .empty-state a.btn {
  margin: 0 auto;
}

/* ----------------------------------------------------------------------------
   4.x Tabs Navigation (shared across modules)
   ---------------------------------------------------------------------------- */

.tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: var(--admin-bg);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 24px;
}

.tab-link {
  padding: 10px 20px;
  border-radius: 8px;
  color: var(--admin-text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.tab-link:hover {
  color: var(--admin-text);
}

.tab-link.active {
  background: var(--admin-content-bg);
  color: var(--admin-text);
  box-shadow: var(--admin-shadow);
}

/* Tab badge (notification dot or count on tabs) */
.tab-badge {
  background: var(--admin-warning);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.tab-badge-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  min-width: 8px;
  display: inline-block;
  vertical-align: middle;
  margin-left: 4px;
}

/* Tab completeness dots (data-tab-status attribute) */
.tab-link[data-tab-status]::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.2s;
}

.tab-link[data-tab-status="complete"]::after {
  background: var(--admin-success, #22c55e);
}

.tab-link[data-tab-status="incomplete"]::after {
  background: #f59e0b;
}

/* Sub-tabs (nested tab navigation within a primary tab) */
.tabs-nav.tabs-nav-sub {
  background: transparent;
  padding: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--border-color);
  margin-top: -16px;
  margin-bottom: 24px;
  gap: 0;
}
.tabs-nav.tabs-nav-sub .tab-link {
  border-radius: 0;
  font-size: 13px;
  padding: 10px 16px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  box-shadow: none;
  background: none;
}
.tabs-nav.tabs-nav-sub .tab-link.active {
  border-bottom-color: var(--admin-accent);
  color: var(--admin-accent);
  background: none;
  box-shadow: none;
}
.tabs-nav.tabs-nav-sub .tab-link:hover:not(.active) {
  border-bottom-color: var(--border-color);
}

/* Tabs header (centered wrapper for segmented controls) */
.tabs-header {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

/* Tab content panels (JS-based tab switching) */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Responsive tabs */
@media (max-width: 768px) {
  .tabs-nav {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tabs-nav::-webkit-scrollbar {
    display: none;
  }
  .tab-link {
    padding: 8px 14px;
    font-size: 13px;
    white-space: nowrap;
  }
}

/* ----------------------------------------------------------------------------
   4.x Language Tabs (translation language switcher, shared across modules)
   ---------------------------------------------------------------------------- */

.lang-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.lang-tab {
  padding: 6px 12px;
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--admin-text-muted);
  transition: all 0.15s;
}

.lang-tab:hover {
  border-color: var(--admin-accent);
  color: var(--admin-text);
}

.lang-tab.active {
  background: var(--admin-accent);
  border-color: var(--admin-accent);
  color: white;
}

.lang-tab-suggested {
  padding: 6px 12px;
  background: var(--admin-card-bg);
  border: 1px dashed var(--admin-border);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--admin-text-muted);
  transition: all 0.15s;
}

.lang-tab-suggested:hover {
  border-color: var(--admin-accent);
  color: var(--admin-accent);
  background: var(--admin-bg);
}

.lang-add-dropdown {
  position: relative;
}

.lang-add-trigger {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: var(--admin-card-bg);
  border: 1px dashed var(--admin-border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--admin-text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.lang-add-trigger:hover {
  border-color: var(--admin-accent);
  color: var(--admin-accent);
}

.lang-add-trigger i {
  font-size: 11px;
}

.lang-add-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: var(--admin-content-bg);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  box-shadow: var(--admin-shadow);
  min-width: 240px;
  z-index: 1000;
}

.lang-add-dropdown.open .lang-add-menu {
  display: block;
}

.lang-add-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--admin-border);
  background: var(--admin-bg);
  border-radius: 8px 8px 0 0;
}

.lang-add-search i {
  color: var(--admin-text-muted);
  font-size: 12px;
}

.lang-add-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  outline: none;
  color: var(--admin-text);
}

.lang-add-search input::placeholder {
  color: var(--admin-text-muted);
}

.lang-add-list {
  max-height: 280px;
  overflow-y: auto;
  background: var(--admin-content-bg);
  border-radius: 0 0 8px 8px;
}

.lang-add-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.1s;
}

.lang-add-option:hover {
  background: var(--admin-bg);
}

.lang-add-option.hidden {
  display: none;
}

.lang-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 20px;
  background: var(--admin-bg);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--admin-text-muted);
  text-transform: uppercase;
}

.lang-name {
  font-size: 13px;
  color: var(--admin-text);
}

.lang-content {
  display: none;
}

.lang-content.active {
  display: block;
}

.lang-delete-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--admin-border);
}

.btn-delete-translation {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--admin-danger-border, #fca5a5);
  border-radius: 6px;
  font-size: 13px;
  color: var(--admin-danger);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-delete-translation:hover {
  background: var(--admin-danger-bg, #fef2f2);
  border-color: var(--admin-danger);
}

/* ----------------------------------------------------------------------------
   4.x Confirm Modal (shared confirmation dialog)
   ---------------------------------------------------------------------------- */

.confirm-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

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

.confirm-modal {
  background: var(--admin-content-bg);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  max-width: 400px;
  width: 90%;
  padding: 24px;
  transform: scale(0.95);
  transition: transform 0.15s ease;
}

.confirm-modal-overlay.show .confirm-modal {
  transform: scale(1);
}

.confirm-modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 20px;
}

.confirm-modal-icon.danger {
  background: color-mix(in srgb, var(--admin-danger) 10%, transparent);
  color: var(--admin-danger);
}

.confirm-modal-icon.warning {
  background: color-mix(in srgb, var(--admin-warning, #f59e0b) 10%, transparent);
  color: var(--admin-warning, #f59e0b);
}

.confirm-modal h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  color: var(--admin-text);
}

.confirm-modal p {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--admin-text-muted);
  text-align: center;
  line-height: 1.5;
}

.confirm-modal-buttons {
  display: flex;
  gap: 8px;
}

.confirm-modal-buttons .btn {
  flex: 1;
  justify-content: center;
  padding: 10px 16px;
}

/* ----------------------------------------------------------------------------
   4.x Assigned Pill (compact user indicator, shared across modules)
   ---------------------------------------------------------------------------- */

.task-assigned-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--admin-text);
}

.task-assigned-avatar-sm {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--admin-accent);
  color: white;
  font-size: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}


/* ============================================================================
   5. FORMS
   ============================================================================ */

/* ----------------------------------------------------------------------------
   5.1 Form Groups & Labels
   ---------------------------------------------------------------------------- */

.form-group {
  margin-bottom: 20px !important;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--admin-text);
}

.form-label.required::after {
  content: ' *';
  color: #ff3b30;
}

.form-label-sm {
  display: block;
  font-size: 13px;
  color: var(--admin-text-muted);
  margin-bottom: 6px;
}

.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--admin-text-muted);
}

.form-hint a {
  color: var(--admin-primary);
  text-decoration: none;
}

.form-hint a:hover {
  text-decoration: underline;
}

.form-hint a i {
  margin-right: 4px;
}


/* ----------------------------------------------------------------------------
   5.2 Inputs, Selects, Textareas
   ---------------------------------------------------------------------------- */

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: var(--admin-text);
  background: var(--admin-content-bg);
  transition: all 0.2s ease;
}

/* Custom select arrow */
.form-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  cursor: pointer;
}

/* Compact select variant */
.form-select-sm {
  padding: 6px 30px 6px 10px;
  font-size: 13px;
  height: 32px;
  border-radius: 6px;
  background-position: right 8px center;
  background-size: 12px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.form-input[readonly] {
  background: var(--admin-subtle-bg);
  color: var(--admin-text-muted);
  cursor: not-allowed;
}

/* Slug editing state */
.form-input.slug-editing {
  border-color: var(--admin-warning) !important;
  background: var(--admin-warning-bg) !important;
  color: #92400e !important;
}

.slug-edit-warning {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.slug-edit-warning-content {
  display: flex;
  align-items: start;
  gap: 10px;
}

.slug-edit-warning-content i {
  color: #d97706;
  margin-top: 2px;
}

.slug-edit-warning-content > div {
  font-size: 13px;
  color: #92400e;
  line-height: 1.5;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

/* Segmented Control (Apple-style option switcher for 2-3 choices) */
.segmented-control {
  display: inline-flex;
  background: var(--admin-subtle-bg);
  border-radius: 8px;
  padding: 2px;
  gap: 1px;
}

.segmented-option {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--admin-text-muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  line-height: 1.4;
}

.segmented-option:hover {
  color: var(--admin-text);
}

.segmented-option.active {
  background: var(--admin-content-bg);
  color: var(--admin-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Segment buttons (larger variant for page-level tab switching) */
.segment-btn {
  padding: 12px 40px;
  border-radius: 8px;
  color: var(--admin-text-muted);
  font-weight: 500;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  background: none;
  min-width: 140px;
}

.segment-btn:hover {
  color: var(--admin-text);
}

.segment-btn.active {
  background: var(--admin-content-bg);
  color: var(--admin-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Segmented control with segment-btn uses border background */
.segmented-control:has(.segment-btn) {
  background: var(--admin-border);
  padding: 3px;
  border-radius: 10px;
  gap: 0;
}

@media (max-width: 768px) {
  .segment-btn {
    padding: 10px 20px;
    font-size: 13px;
    min-width: 100px;
  }
}

html[data-theme="dark"] .segmented-control {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .segmented-control:has(.segment-btn) {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .segmented-option.active,
html[data-theme="dark"] .segment-btn.active {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Search Input */
.search-input {
  padding: 8px 12px;
  height: 40px;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  font-size: 14px;
  width: 250px;
}

.search-input:focus {
  outline: none;
  border-color: var(--admin-accent);
}

.search-form {
  display: flex;
  gap: 8px;
}


/* ----------------------------------------------------------------------------
   5.3 Checkboxes & Toggle Switches
   ---------------------------------------------------------------------------- */

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-checkbox input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--admin-border);
  transition: .3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input:checked + .toggle-slider {
  background-color: var(--admin-accent);
}

input:focus + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Toggle Row - Toggle switch with label */
.toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.toggle-row .toggle-switch {
  margin-top: 2px;
}

.toggle-row .toggle-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-row .toggle-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--admin-text);
}

.toggle-row .form-hint {
  margin-top: 0;
}


/* ----------------------------------------------------------------------------
   5.4 Form Layouts
   ---------------------------------------------------------------------------- */

.form-actions {
  display: flex;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--admin-border);
  margin-top: 32px;
}

/* Two-Column Form Layout */
.form-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.form-main {
  min-width: 0;
}

.form-sidebar {
  position: sticky;
  top: 24px;
}

.form-sidebar .card {
  margin-bottom: 16px;
}

.form-sidebar .card:last-child {
  margin-bottom: 0;
}

@media (max-width: 1200px) {
  .form-layout {
    grid-template-columns: 1fr;
  }

  .form-sidebar {
    position: static;
  }

  .layout-grid {
    grid-template-columns: 1fr 300px;
    gap: 16px;
  }
}

@media (max-width: 900px) {
  .layout-grid {
    display: flex;
    flex-direction: column;
  }
}


/* ----------------------------------------------------------------------------
   5.5 Icon Selector
   ---------------------------------------------------------------------------- */

.icon-title-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
}

.icon-selector-section h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--admin-text);
}

.icon-preview-box {
  text-align: center;
  padding: 20px;
  background: var(--admin-subtle-bg);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  margin-bottom: 12px;
}

.icon-preview-tile {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  background: var(--admin-content-bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.icon-preview-tile i {
  font-size: 32px;
  color: var(--admin-accent);
}

@media (max-width: 768px) {
  .icon-title-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .icon-selector-section {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
  }
  
  .icon-selector-section h3 {
    grid-column: 1 / -1;
    margin-bottom: 4px;
  }
  
  .icon-preview-box {
    padding: 12px;
    margin-bottom: 0;
  }
  
  .icon-preview-tile {
    width: 48px;
    height: 48px;
  }
  
  .icon-preview-tile i {
    font-size: 24px;
  }
}


/* ============================================================================
   6. PAGE-SPECIFIC STYLES
   ============================================================================ */

/* ----------------------------------------------------------------------------
   6.1 Dashboard & Stats
   ---------------------------------------------------------------------------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--admin-content-bg);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 24px;
  box-shadow: var(--admin-shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

a.stat-card:hover {
  border-color: var(--admin-accent);
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.1);
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--admin-text);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: var(--admin-text-muted);
  font-weight: 500;
}

/* KPI Cards (shared: dashboard + reports) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

.kpi-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--admin-content-bg);
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.kpi-card-clickable {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.kpi-card-clickable:hover {
  border-color: var(--admin-accent);
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.kpi-card-clickable:active {
  transform: translateY(0) scale(0.99);
}

.kpi-card-warning {
  border-color: var(--admin-warning);
  background: linear-gradient(135deg, var(--admin-warning-bg) 0%, transparent 50%);
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.kpi-icon-blue { background: var(--admin-info-bg); color: var(--admin-info); }
.kpi-icon-green { background: var(--admin-success-bg); color: var(--admin-success); }
.kpi-icon-purple { background: var(--admin-purple-bg); color: var(--admin-purple); }
.kpi-icon-orange { background: var(--admin-warning-bg); color: var(--admin-warning); }
.kpi-icon-gray { background: var(--admin-bg); color: var(--admin-text-muted); }
.kpi-icon-teal { background: rgba(48, 176, 199, 0.1); color: #30B0C7; }
.kpi-icon-pink { background: rgba(255, 45, 85, 0.1); color: #FF2D55; }

html[data-theme="dark"] .kpi-icon-teal { background: rgba(48, 176, 199, 0.15); }
html[data-theme="dark"] .kpi-icon-pink { background: rgba(255, 45, 85, 0.15); }

.kpi-content { flex: 1; min-width: 0; }

.kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--admin-text);
  line-height: 1.1;
}

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

.kpi-sublabel {
  font-size: 12px;
  color: var(--admin-text-muted);
}

.kpi-trend {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
}

.trend-up { background: var(--admin-success-bg); color: var(--admin-success); }
.trend-down { background: var(--admin-danger-bg); color: var(--admin-danger); }
.trend-neutral { background: var(--admin-bg); color: var(--admin-text-muted); }

.kpi-chart {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.circular-chart {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.circle-bg {
  fill: none;
  stroke: var(--admin-border);
  stroke-width: 3;
}

.circle {
  fill: none;
  stroke: var(--admin-accent);
  stroke-width: 3;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dasharray 0.6s ease;
}

/* KPI info tooltip */
.kpi-info {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  color: var(--admin-text-muted);
  font-size: 12px;
  cursor: help;
  position: relative;
  opacity: 0.4;
  transition: opacity 0.15s ease;
}

.kpi-info:hover {
  opacity: 1;
}

.kpi-info::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--admin-text);
  color: var(--admin-bg);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  white-space: normal;
  width: max-content;
  max-width: 220px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.kpi-info::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--admin-text);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 100;
}

.kpi-info:hover::after,
.kpi-info:hover::before {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  .kpi-info {
    display: none;
  }
}


/* ----------------------------------------------------------------------------
   6.2 Nodes/Pages List & Tree
   ---------------------------------------------------------------------------- */

.nodes-tree {
  padding: 0;
}

.sortable-list,
.sortable-children {
  min-height: 20px;
}

/* Node Item */
.node-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--admin-border);
  background: var(--admin-content-bg);
  transition: all 0.15s ease;
  cursor: default;
}

.node-item:last-child {
  border-bottom: none;
}

.node-item:hover {
  background: var(--admin-subtle-bg);
}

/* Node Handle (Drag) */
.node-handle {
  cursor: grab;
  color: var(--admin-text-muted);
  font-size: 14px;
  padding: 4px;
  transition: color 0.2s ease;
}

.node-handle:hover {
  color: var(--admin-accent);
}

.node-handle:active {
  cursor: grabbing;
}

/* Drag States */
.node-ghost {
  opacity: 0.4;
  background: var(--admin-hover-bg);
}

.node-drag {
  background: var(--admin-content-bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--admin-accent);
}

/* Node Content */
.node-content {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.node-icon-preview {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--admin-subtle-bg);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  color: var(--admin-accent);
  font-size: 16px;
  flex-shrink: 0;
}

.node-info {
  flex: 1;
  min-width: 0;
}

.node-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.node-title-link {
  font-weight: 600;
  font-size: 14px;
  color: var(--admin-text);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: all 0.15s ease;
}

.node-title-link:hover {
  color: var(--admin-accent);
  text-decoration-color: var(--admin-accent);
}

.node-description {
  font-size: 12.5px;
  color: var(--admin-text-muted);
  line-height: 1.4;
  margin-top: 4px;
}

/* Node Tags */
.node-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.node-tag-pill {
  display: inline-block;
  padding: 2px 8px;
  background: var(--admin-subtle-bg);
  color: var(--admin-text-muted);
  font-size: 11px;
  font-weight: 500;
  border-radius: 12px;
  white-space: nowrap;
}

/* Node Actions */
.node-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  min-width: 32px;
}

.node-actions:empty {
  display: none;
}

.node-actions .btn-sm {
  min-width: 32px;
  padding: 6px 8px;
}

/* Toggle Children */
.toggle-children {
  background: none;
  border: none;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.toggle-children:hover {
  opacity: 1;
}

.toggle-children i {
  font-size: 12px;
  color: var(--admin-text-muted);
  transition: transform 0.2s ease;
}

/* Children Container */
.node-children {
  background: var(--admin-subtle-bg);
  border-left: 2px solid var(--admin-accent);
  margin-left: 32px;
}

.node-children .node-item {
  padding-left: 40px;
  background: transparent;
}

.node-children .node-item:hover {
  background: var(--admin-hover-bg);
}

/* Nest Target Indicator */
.node-item.nest-target {
  position: relative;
}

.node-item.nest-target::after {
  content: '→ Nest as child';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--admin-accent);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  pointer-events: none;
  animation: pulse-nest 0.8s ease-in-out infinite;
}

@keyframes pulse-nest {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

body.is-dragging .node-item {
  transition: none;
}

/* Hidden Nodes Section */
.hidden-nodes-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px dashed var(--admin-border);
}

.hidden-nodes-divider {
  text-align: center;
  margin-bottom: 16px;
  color: var(--admin-text-muted);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.node-hidden {
  opacity: 0.7;
  background: var(--admin-subtle-bg) !important;
  border-left: 3px solid #9ca3af;
}

.node-hidden:hover {
  opacity: 1;
  background: var(--admin-hover-bg) !important;
}

.node-handle-disabled {
  cursor: not-allowed !important;
  color: var(--admin-border) !important;
}

.node-hidden .node-handle {
  pointer-events: none;
}


/* ----------------------------------------------------------------------------
   6.3 Layout Editor
   ---------------------------------------------------------------------------- */

.layout-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.layout-update-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* 2-Column Layout Grid */
.layout-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
  align-items: start;
}

.layout-left-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Nodes Tree Header */
.nodes-tree-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--admin-border);
}

.nodes-tree-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.nodes-tree-description {
  max-width: 600px;
}

.nodes-tree-description p {
  margin: 0;
  font-size: 13px;
  color: var(--admin-text-muted);
  line-height: 1.5;
}

.nodes-tree-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.nodes-save-status {
  font-size: 13px;
  color: var(--admin-success);
  display: none;
}

/* Toggle All Button */
.toggle-all-btn {
  font-size: 13px;
  color: var(--admin-text-muted);
  background: none;
  border: none;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
  font-weight: 500;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.toggle-all-btn:hover {
  background: var(--admin-hover-bg);
  color: var(--admin-text-muted);
}

/* Navigation Bar Settings */
.nav-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-settings-description {
  font-size: 13px;
  color: var(--admin-text-muted);
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.nav-settings {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--admin-subtle-bg);
  border-radius: 8px;
  border: 1px solid var(--admin-border);
  transition: all 0.2s ease;
}

.nav-setting-item:hover {
  background: var(--admin-hover-bg);
}

.nav-setting-item.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.nav-setting-item-transparent {
  background: transparent;
  border: none;
  padding: 8px 0;
}

.nav-setting-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-setting-icon {
  width: 40px;
  height: 40px;
  background: var(--admin-content-bg);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--admin-text-muted);
  font-size: 16px;
  flex-shrink: 0;
}

.nav-setting-icon-sm {
  width: 36px;
  height: 36px;
}

.nav-setting-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--admin-text);
  margin-bottom: 2px;
}

.nav-setting-hint {
  font-size: 12px;
  color: var(--admin-text-muted);
}

.nav-setting-category {
  padding: 12px 16px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--admin-text-muted);
}

.nav-setting-category:not(:first-child) {
  margin-top: 4px;
  border-top: 1px solid var(--admin-border);
}


/* ----------------------------------------------------------------------------
   6.4 Mobile Preview (Phone Preview)
   ---------------------------------------------------------------------------- */

.layout-preview-column {
  position: sticky;
  top: 70px;
  align-self: flex-start;
  background: #f8fafc;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
}

.preview-container {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.preview-phone {
  width: 280px;
  background: var(--admin-content-bg);
  border-radius: 32px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: 6px solid #1f2937;
}

.preview-phone-actions {
  margin-top: 20px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.preview-actions-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Preview Buttons */
.preview-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--admin-accent);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: white;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preview-edit-btn:hover {
  background: #1d4ed8;
}

.preview-edit-btn.active {
  background: #dc2626;
}

.preview-edit-btn.active:hover {
  background: #b91c1c;
}

.preview-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-content-bg);
  font-size: 13px;
  font-weight: 500;
  color: var(--admin-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.preview-action-btn:hover:not(:disabled) {
  border-color: var(--admin-accent);
  color: var(--admin-accent);
  background: var(--admin-subtle-bg);
}

.preview-action-btn.save {
  background: #10b981;
  border-color: #10b981;
  color: white;
}

.preview-action-btn.save:hover {
  background: #059669;
  border-color: #059669;
}

.preview-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Preview Help Text */
.preview-help {
  padding: 16px 20px;
  background: var(--admin-content-bg);
  border-top: 1px solid var(--admin-border);
  font-size: 13px;
  color: var(--admin-text-muted);
  line-height: 1.6;
}

.preview-help p {
  margin: 0 0 8px 0;
}

.preview-help p:last-child {
  margin-bottom: 0;
}

.preview-help strong {
  color: var(--admin-text);
  font-weight: 600;
}

/* Preview Topbar */
.preview-topbar {
  color: white;
  padding: 14px;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  position: relative;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-back-btn {
  font-size: 16px;
  position: absolute;
  left: 14px;
  cursor: pointer;
}

.preview-topbar-icon {
  position: absolute;
  right: 14px;
  font-size: 14px;
  opacity: 0.8;
}

/* Preview Search Bar */
.preview-search-container {
  padding: 14px;
  background: var(--admin-content-bg);
}

.preview-search-bar {
  background: var(--admin-bg);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-search-icon {
  font-size: 12px;
  color: var(--admin-text-muted);
}

.preview-search-placeholder {
  font-size: 13px;
  color: var(--admin-text-muted);
}

/* Preview Content Area */
.mobile-nav-preview {
  background: var(--admin-bg);
  min-height: 420px;
  max-height: 500px;
  overflow-y: auto;
  -webkit-user-drag: none;
  user-drag: none;
}

/* Tiles Grid */
.preview-tiles-grid {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.preview-tiles-grid .preview-tile {
  transition: transform 0.15s ease;
}

.preview-empty-state {
  padding: 40px 16px;
  text-align: center;
  color: var(--admin-text-muted);
  font-size: 12px;
}

/* Preview Tile Styling */
.preview-tile {
  position: relative;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.preview-tile-folder {
  position: absolute;
  bottom: 8px;
  right: 8px;
  color: #94a3b8;
  font-size: 9px;
}

.preview-tile-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: #fbbf24;
  color: white;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
}

.preview-tile-interactive {
  cursor: pointer;
  touch-action: none;
}


/* ----------------------------------------------------------------------------
   6.5 Tags System
   ---------------------------------------------------------------------------- */

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags-empty {
  color: var(--admin-text-muted);
  font-size: 13px;
  margin: 0;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--admin-border);
  border-radius: 20px;
  background: var(--admin-content-bg);
  color: var(--admin-text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 0;
}

.tag-pill:hover {
  border-color: var(--admin-accent);
  color: var(--admin-accent);
}

.tag-pill.active {
  background: var(--admin-accent);
  border-color: var(--admin-accent);
  color: #ffffff;
}

.tag-pill-name {
  transition: margin 0.15s ease;
}

.tag-pill-remove {
  display: none;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-size: 9px;
  transition: all 0.15s ease;
}

.tag-pill.active .tag-pill-remove {
  display: inline-flex;
}

.tag-pill.active .tag-pill-remove:hover {
  background: rgba(255, 255, 255, 0.5);
}

.tag-pill:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tag-pill-add {
  border-style: dashed;
  color: var(--admin-text-muted);
  gap: 4px;
}

.tag-pill-add:hover {
  border-color: var(--admin-accent);
  color: var(--admin-accent);
  border-style: dashed;
}

.tag-pill-add i {
  font-size: 10px;
}

/* Tags Header */
.tags-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.tags-header .card-title {
  margin-bottom: 0;
}

.tags-manage-link {
  background: none;
  border: none;
  color: var(--admin-accent);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.tags-manage-link:hover {
  background: rgba(102, 126, 234, 0.1);
}

/* Tags Manage Mode */
.tags-manage-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fef3c7;
  border-radius: 8px;
  font-size: 12px;
  color: #92400e;
  margin-bottom: 12px;
}

.tags-manage-warning i {
  color: #f59e0b;
}

.tags-manage-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tag-manage-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--admin-subtle-bg);
  border-radius: 8px;
  transition: background 0.15s ease;
}

.tag-manage-item:hover {
  background: var(--admin-hover-bg);
}

.tag-manage-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--admin-text);
}

.tag-manage-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #f59e0b;
  background: #fef3c7;
  padding: 2px 8px;
  border-radius: 10px;
}

.tag-manage-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--admin-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tag-manage-delete:hover {
  background: #fee2e2;
  color: #dc2626;
}


/* ----------------------------------------------------------------------------
   6.6 Image Upload
   ---------------------------------------------------------------------------- */

.image-upload-area {
  border: 2px dashed var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 32px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.image-upload-area:hover {
  border-color: var(--admin-accent);
  background: rgba(0, 113, 227, 0.02);
}

.image-upload-area.dragover {
  border-color: var(--admin-accent);
  background: rgba(0, 113, 227, 0.05);
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 16px;
}


/* ----------------------------------------------------------------------------
   6.7 Guidebook Wizard
   ---------------------------------------------------------------------------- */

.wizard-steps {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  color: var(--admin-text-muted);
  font-weight: 500;
}

.wizard-step.active {
  color: var(--admin-accent);
}

.wizard-step.completed {
  color: #10b981;
}

.wizard-content {
  padding: 24px;
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--admin-border);
}

/* Welcome Modal */
.welcome-modal {
  background: var(--admin-content-bg);
  border-radius: 16px;
  padding: 32px;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: var(--admin-shadow-lg);
}

.welcome-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.welcome-step {
  padding: 16px;
  background: var(--admin-subtle-bg);
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}


/* ----------------------------------------------------------------------------
   6.8 User Management
   ---------------------------------------------------------------------------- */

.user-actions-menu {
  position: relative;
}

.user-actions-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--admin-content-bg);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  box-shadow: var(--admin-shadow-lg);
  min-width: 180px;
  z-index: 1000;
  display: none;
}

.user-actions-dropdown.show {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: var(--admin-text);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s ease;
  border: none;
  background: none;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
}

.dropdown-item:hover {
  background: rgba(0, 113, 227, 0.05);
}

.dropdown-item i {
  width: 16px;
  text-align: center;
}

.dropdown-item-danger {
  color: #dc2626;
}

.dropdown-item-danger:hover {
  background: #fee2e2;
}

.dropdown-divider {
  height: 1px;
  background: var(--admin-border);
  margin: 4px 0;
}


/* ----------------------------------------------------------------------------
   6.9 Feedback System
   ---------------------------------------------------------------------------- */

/* Feedback Info Banner */
.feedback-info-banner {
  margin-bottom: 24px;
  padding: 20px;
  background: linear-gradient(135deg, #0071e3 0%, #005bb5 100%);
  color: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.15);
}

.feedback-info-banner .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feedback-info-banner h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
}

.feedback-info-banner p {
  margin: 0;
  opacity: 0.95;
  font-size: 14px;
  line-height: 1.5;
}

/* Feedback Stats */
.feedback-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.feedback-stat-card {
  padding: 20px;
}

.feedback-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feedback-stat-icon i {
  font-size: 20px;
}

.feedback-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--admin-text);
}

.feedback-stat-label {
  font-size: 13px;
  color: var(--admin-text-muted);
}

/* Feedback Stat Colors */
.feedback-stat-new { background: #fef3c7; color: #f59e0b; }
.feedback-stat-progress { background: #dbeafe; color: #3b82f6; }
.feedback-stat-resolved { background: #d1fae5; color: #10b981; }
.feedback-stat-closed { background: var(--admin-hover-bg); color: var(--admin-text-muted); }

/* Feedback Type Icons */
.feedback-type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.feedback-type-icon i {
  font-size: 14px;
}

.feedback-type-bug { background: #fee2e2; color: #dc2626; }
.feedback-type-feature { background: #fef3c7; color: #d97706; }
.feedback-type-question { background: #dbeafe; color: #2563eb; }
.feedback-type-general { background: var(--admin-hover-bg); color: var(--admin-text-muted); }

/* Feedback Priority Badges */
.feedback-priority-critical { background: #fee2e2; color: #991b1b; }
.feedback-priority-high { background: #fed7aa; color: #9a3412; }
.feedback-priority-medium { background: #fef3c7; color: #92400e; }
.feedback-priority-low { background: var(--admin-hover-bg); color: #4b5563; }

/* Feedback Status Badges */
.feedback-status-new { background: #fef3c7; color: #92400e; }
.feedback-status-progress { background: #dbeafe; color: #1e40af; }
.feedback-status-review { background: #ede9fe; color: #5b21b6; }
.feedback-status-done { background: #d1fae5; color: #065f46; }
.feedback-status-wontfix { background: var(--admin-hover-bg); color: #4b5563; }

/* Feedback Detail Page */
.feedback-detail-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.feedback-detail-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 8px;
}

.feedback-detail-left {
  flex: 1;
  min-width: 0;
}

.feedback-detail-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  flex: 1;
}

.feedback-meta-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--admin-text-muted);
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--admin-border);
}

.feedback-header-row .feedback-meta-inline {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.feedback-meta-inline span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.feedback-meta-inline i {
  font-size: 11px;
  opacity: 0.7;
}

.feedback-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--admin-border);
}

.feedback-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  flex-shrink: 0;
}

.feedback-badges .badge {
  padding: 6px 12px;
}

.feedback-section {
  margin-top: 0;
}

.feedback-section h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--admin-text);
}

.feedback-description {
  white-space: pre-wrap;
  line-height: 1.7;
  color: var(--admin-text);
  font-size: 15px;
}

.feedback-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--admin-border);
}

.feedback-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--admin-text-muted);
}

.feedback-meta-item i {
  width: 16px;
  text-align: center;
  color: var(--admin-text-muted);
  opacity: 0.7;
}

.feedback-url {
  color: var(--admin-accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.feedback-url:hover {
  text-decoration: underline;
}

.feedback-browser-info {
  margin-top: 8px;
  padding: 12px;
  background: var(--admin-subtle-bg);
  border-radius: 6px;
  font-size: 13px;
  font-family: 'Monaco', 'Courier New', monospace;
  color: #4b5563;
}

/* Feedback Details Table */
.feedback-details-table {
  width: 100%;
  border-collapse: collapse;
}

.feedback-details-table td {
  padding: 12px 0;
}

.feedback-details-table td:first-child {
  font-weight: 500;
  width: 180px;
}

/* Admin Response Card */
.feedback-admin-response {
  background: var(--color-success-50);
  border-color: #86efac;
}

.feedback-admin-response .card-title {
  color: #065f46;
}

.feedback-admin-response-content {
  white-space: pre-wrap;
  line-height: 1.6;
  color: #065f46;
}

/* Feedback Messages */
.feedback-messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.feedback-message {
  padding: 16px;
  border-radius: 12px;
  background: var(--admin-subtle-bg);
  border: 1px solid var(--admin-border);
}

.feedback-message-admin {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.feedback-message-private {
  background: #fffbeb;
  border-color: #fcd34d;
  border-style: dashed;
}

.feedback-message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.feedback-message-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.feedback-message-author i {
  font-size: 14px;
  color: var(--admin-text-muted);
}

.feedback-message-time {
  font-size: 12px;
  color: var(--admin-text-muted);
}

.feedback-message-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon-sm {
  background: none;
  border: none;
  padding: 4px 6px;
  cursor: pointer;
  color: var(--admin-text-muted);
  border-radius: 4px;
  transition: all 0.15s ease;
  font-size: 12px;
}

.btn-icon-sm:hover {
  background: var(--admin-bg);
  color: var(--admin-text);
}

.feedback-message-edit {
  margin-top: 8px;
}

.feedback-message-edit textarea {
  font-size: 14px;
}

.feedback-message-content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--admin-text);
}

/* System messages (change log) */
.feedback-message-system {
  padding: 8px 0;
  text-align: center;
}

.feedback-message-system-content {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--admin-text-muted);
  background: var(--admin-bg);
  padding: 6px 12px;
  border-radius: 16px;
}

.feedback-message-system-content i {
  font-size: 12px;
  opacity: 0.7;
}

.feedback-message-system-content .feedback-message-time {
  font-size: 11px;
  opacity: 0.7;
  margin-left: 4px;
}

.feedback-message-form {
  border-top: 1px solid var(--admin-border);
  padding-top: 20px;
  margin-top: 20px;
}

.message-input-wrapper {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  overflow: visible;
  background: var(--admin-card-bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.message-input-wrapper:focus-within {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.message-input-wrapper textarea.form-input {
  border: none;
  border-radius: 8px 8px 0 0;
  resize: vertical;
  min-height: 80px;
}

.message-input-wrapper textarea.form-input:focus {
  box-shadow: none;
}

.message-input-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 12px;
  background: var(--admin-bg);
  border-top: 1px solid var(--admin-border);
}

.image-upload-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--admin-text-muted);
  transition: color 0.2s ease;
}

.image-upload-label:hover {
  color: var(--admin-accent);
}

.image-upload-label i {
  font-size: 14px;
}

.image-preview-container {
  position: relative;
  margin-top: 12px;
  padding: 8px;
  background: var(--admin-bg);
  border-radius: 8px;
  display: inline-block;
}

.image-preview-container img {
  max-width: 200px;
  max-height: 150px;
  border-radius: 6px;
  display: block;
}

.image-preview-remove {
  position: absolute;
  top: 0;
  right: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ef4444;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transform: translate(50%, -50%);
}

.image-preview-remove:hover {
  background: #dc2626;
}

/* Message image in conversation */
.feedback-message-image {
  margin-top: 12px;
}

.feedback-message-image img {
  max-width: 300px;
  max-height: 200px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--admin-border);
}

.feedback-message-image img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Image modal */
.image-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.image-modal-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.image-modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}

.image-modal-close:hover {
  color: #ccc;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--admin-text-muted);
  transition: color 0.2s ease;
}

.toggle-label .toggle-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

.toggle-label.active {
  color: var(--admin-accent);
}

.toggle-label.active .toggle-text i {
  color: var(--admin-accent);
}

/* Privacy Notice */
.feedback-privacy-notice {
  background: var(--admin-subtle-bg);
  border: 1px dashed var(--admin-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: start;
  gap: 12px;
}

.feedback-privacy-notice i {
  color: var(--admin-text-muted);
  font-size: 20px;
  margin-top: 2px;
}

.feedback-privacy-notice-text {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.6;
}

/* Clickable Stats Cards */
.feedback-stat-clickable {
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.feedback-stat-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feedback-stat-clickable.active {
  border: 2px solid var(--admin-accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

/* Feedback Dropdown Menu */
.feedback-quick-edit-dropdown {
  position: static;
}

.feedback-dropdown-menu {
  display: none;
  position: fixed !important;
  z-index: 9999 !important;
  margin-top: 6px;
  min-width: 180px;
  padding: 6px;
  background: var(--admin-content-bg);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(10px);
}

.feedback-dropdown-menu.show {
  display: block;
}

.feedback-dropdown-menu .dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  font-family: inherit;
  border-radius: 6px;
}

.feedback-dropdown-menu .dropdown-item:hover {
  background: rgba(0, 113, 227, 0.08);
}

.feedback-dropdown-menu .dropdown-item:active {
  background: rgba(0, 113, 227, 0.12);
  transform: scale(0.98);
}

.feedback-dropdown-menu .badge {
  width: 110px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  justify-content: center;
  border-radius: 6px;
  letter-spacing: 0.01em;
}


/* ----------------------------------------------------------------------------
   6.10 Authentication Pages
   ---------------------------------------------------------------------------- */

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--admin-bg);
}

.auth-card {
  background: var(--admin-content-bg);
  border-radius: 16px;
  padding: 48px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--admin-shadow-lg);
}

.auth-logo {
  text-align: center;
  margin-bottom: 24px;
  font-size: 28px;
  font-weight: 700;
}

.auth-logo-image {
  max-width: 180px;
  max-height: 50px;
  object-fit: contain;
}

.auth-logo .brand-hej {
  color: #0071e3;
}

.auth-logo .brand-guide {
  color: var(--admin-text);
}

.auth-logo .brand-dash {
  color: var(--admin-text-muted);
  margin-left: 6px;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--admin-text);
  margin: 0 0 8px 0;
}

.auth-brand {
  text-align: center;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-brand .brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand i {
  font-size: 32px;
  color: var(--admin-accent);
}

.auth-brand h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--admin-text);
  margin: 0;
}

.auth-form-group {
  margin-bottom: 20px;
}

.auth-form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--admin-text);
}

.auth-form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s ease;
  background: var(--admin-content-bg);
  color: var(--admin-text);
}

.auth-form-group input:focus {
  outline: none;
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.auth-form-group input::placeholder {
  color: var(--admin-text-muted);
  opacity: 0.6;
}

.auth-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .auth-form-row {
    grid-template-columns: 1fr;
  }
}

.auth-form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 24px;
}

.auth-form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  accent-color: var(--admin-accent);
  cursor: pointer;
  margin-top: 2px;
}

.auth-form-checkbox label {
  font-size: 14px;
  color: var(--admin-text-muted);
  cursor: pointer;
  user-select: none;
  line-height: 1.5;
}

.auth-form-checkbox label a {
  color: var(--admin-accent);
  text-decoration: none;
}

.auth-form-checkbox label a:hover {
  text-decoration: underline;
}

.auth-subtitle {
  text-align: center;
  color: var(--admin-text-muted);
  margin: 0;
  font-size: 15px;
}

.auth-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: var(--admin-accent);
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.auth-btn:hover {
  background: var(--admin-accent-hover);
}

.auth-btn-secondary {
  background: var(--admin-bg);
  color: var(--admin-text);
  border: 1px solid var(--admin-border);
}

.auth-btn-secondary:hover {
  background: var(--admin-bg-secondary);
  border-color: var(--admin-accent);
}

.auth-email-locked {
  text-align: center;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--admin-bg-secondary);
  border-radius: 12px;
}

.auth-email-locked-label {
  font-size: 12px;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.auth-email-locked-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--admin-text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-email-locked-value i {
  color: var(--admin-accent);
}

.auth-email-change {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  color: var(--admin-text-muted);
  text-decoration: none;
}

.auth-email-change:hover {
  color: var(--admin-accent);
  text-decoration: underline;
}

.auth-link-section {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
}

.auth-link-section a {
  color: var(--admin-accent);
  text-decoration: none;
  font-weight: 500;
}

.auth-link-section a:hover {
  text-decoration: underline;
}

.auth-link {
  color: var(--admin-accent);
  text-decoration: none;
  font-weight: 500;
}

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

.auth-divider {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--admin-border);
}

.auth-text-muted {
  color: var(--admin-text-muted);
  font-size: 14px;
  margin-right: 8px;
}

/* Auth Beta Notice */
.auth-beta-notice {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.auth-beta-notice i {
  font-size: 24px;
  color: var(--admin-accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.auth-beta-notice strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--admin-text);
  margin-bottom: 4px;
}

.auth-beta-notice p {
  margin: 0;
  font-size: 13px;
  color: var(--admin-text-muted);
  line-height: 1.5;
}

/* Auth Page Body */
.auth-page-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--admin-bg);
}

/* Auth Alerts */
.auth-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.auth-alert-error i {
  font-size: 16px;
  flex-shrink: 0;
}

.auth-alert-success {
  background: var(--color-success-50);
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.auth-alert-success i {
  font-size: 16px;
  flex-shrink: 0;
}

/* Auth Success State */
.auth-success-state {
  text-align: center;
  padding: 24px 0;
  margin-bottom: 20px;
}

.auth-success-state i {
  font-size: 48px;
  color: #22c55e;
  margin-bottom: 16px;
}

.auth-success-state strong {
  display: block;
  font-size: 18px;
  color: var(--admin-text);
  margin-bottom: 8px;
}

.auth-success-state p {
  color: var(--admin-text-muted);
  margin: 0;
  font-size: 14px;
}

/* Auth Message State */
.auth-message-state {
  text-align: center;
  padding: 16px 0;
  color: var(--admin-text-muted);
  font-size: 14px;
}

.auth-message-state p {
  margin: 0;
}

/* Auth Form Help */
.auth-form-help {
  font-size: 12px;
  color: var(--admin-text-muted);
  margin-top: 6px;
}

/* Beta Notice Global */
.beta-notice {
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
  background: var(--admin-info-subtle-bg) !important;
  border: 1px solid #bae6fd !important;
  color: #075985 !important;
}

.beta-notice * {
  pointer-events: none;
}


/* ============================================================================
   7. MODALS & OVERLAYS
   ============================================================================ */

/* ----------------------------------------------------------------------------
   7.1 Modal Base Styles
   ---------------------------------------------------------------------------- */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.modal-content {
  background: var(--admin-content-bg);
  border-radius: 16px;
  padding: 24px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--admin-shadow-lg);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.modal-overlay.show .modal-content {
  transform: scale(1);
}

.modal-content.modal-sm {
  width: 480px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--admin-border);
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--admin-text-muted);
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s;
}

.modal-close:hover {
  color: var(--admin-text);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--admin-border);
}


/* ----------------------------------------------------------------------------
   7.2 Tag Modal
   ---------------------------------------------------------------------------- */

.tag-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.tag-modal-overlay.show {
  display: flex;
}

.tag-modal {
  background: var(--admin-content-bg);
  border-radius: 12px;
  padding: 24px;
  width: 320px;
  max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.tag-modal h3 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
}

.tag-modal .form-input {
  margin-bottom: 16px;
}

.tag-modal-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.tag-modal-buttons .btn {
  padding: 8px 16px;
  font-size: 14px;
}


/* ----------------------------------------------------------------------------
   7.3 Unsaved Changes Modal
   ---------------------------------------------------------------------------- */

.unsaved-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

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

.unsaved-modal {
  background: var(--admin-content-bg);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  width: 90%;
  padding: 24px;
  transform: scale(0.95);
  transition: transform 0.15s ease;
}

.unsaved-modal-overlay.show .unsaved-modal {
  transform: scale(1);
}

.unsaved-modal-icon {
  width: 48px;
  height: 48px;
  background: #fef3c7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #d97706;
  font-size: 20px;
}

.unsaved-modal h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  color: var(--admin-text);
}

.unsaved-modal p {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--admin-text-muted);
  text-align: center;
  line-height: 1.5;
}

.unsaved-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.unsaved-modal-buttons .unsaved-modal-save {
  width: 100%;
  justify-content: center;
  padding: 12px 20px;
}

.unsaved-modal-row {
  display: flex;
  gap: 8px;
}

.unsaved-modal-row .btn {
  flex: 1;
  justify-content: center;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 400;
}


/* ----------------------------------------------------------------------------
   7.4 Context Menus & Dropdowns
   ---------------------------------------------------------------------------- */

.preview-context-menu {
  position: fixed;
  background: var(--admin-content-bg);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  box-shadow: var(--admin-shadow-lg);
  padding: 4px;
  min-width: 160px;
  z-index: 10000;
}

.preview-context-options {
  display: flex;
  flex-direction: column;
}

.preview-context-options button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: none;
  border: none;
  color: var(--admin-text);
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s;
  width: 100%;
  text-align: left;
}

.preview-context-options button:hover {
  background: rgba(0, 113, 227, 0.05);
}

.preview-context-options button.danger {
  color: #dc2626;
}

.preview-context-options button.danger:hover {
  background: #fee2e2;
}


/* ============================================================================
   8. SPECIAL FEATURES
   ============================================================================ */

/* ----------------------------------------------------------------------------
   8.1 Impersonation Banner
   ---------------------------------------------------------------------------- */

.impersonate-banner {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  color: white;
  padding: 10px 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.impersonate-banner-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 14px;
}

.impersonate-banner-content i {
  font-size: 16px;
}

.impersonate-stop-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  transition: background 0.15s ease;
}

.impersonate-stop-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* GDPR banner wrapper (above top bar, pushes everything down) */
.gdpr-banner-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10001;
}

body:has(.gdpr-banner-wrap) .top-bar {
  top: var(--gdpr-banner-height, 41px);
}

body:has(.gdpr-banner-wrap) .admin-container {
  margin-top: calc(56px + var(--gdpr-banner-height, 41px));
  min-height: calc(100vh - 56px - var(--gdpr-banner-height, 41px));
}

body:has(.gdpr-banner-wrap) .admin-sidebar {
  top: calc(56px + var(--gdpr-banner-height, 41px));
  height: calc(100vh - 56px - var(--gdpr-banner-height, 41px));
}

/* Staging environment banner */
.staging-banner {
  background: #f59e0b;
  color: #000;
  text-align: center;
  padding: 6px 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10001;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

body:has(.staging-banner) .top-bar {
  top: 32px;
}

body:has(.staging-banner) .admin-container {
  margin-top: 88px;
  min-height: calc(100vh - 88px);
}

body:has(.staging-banner) .admin-sidebar {
  top: 88px;
  height: calc(100vh - 88px);
}

/* Adjust body when impersonating */
body:has(.impersonate-banner) .top-bar {
  top: 44px;
}

body:has(.impersonate-banner) .admin-container {
  margin-top: 100px; /* 56px top-bar + 44px banner */
  min-height: calc(100vh - 100px);
}

body:has(.impersonate-banner) .admin-sidebar {
  top: 100px; /* 56px top-bar + 44px banner */
  height: calc(100vh - 100px);
}

body:has(.impersonate-banner) .admin-main {
  min-height: calc(100vh - 100px);
}


/* ----------------------------------------------------------------------------
   8.2 Sticky Headers
   ---------------------------------------------------------------------------- */

.page-header-sticky {
  position: sticky;
  top: 56px;
  z-index: 99;
  background: rgba(249, 250, 251, 0.95);
  margin: -24px -32px 24px -32px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--admin-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.page-header-sticky .flex-between {
  width: 100%;
  min-height: 44px;
}

/* When impersonating, adjust sticky position */
body:has(.impersonate-banner) .page-header-sticky {
  top: 0;
}

.impersonate-active .page-header-sticky {
  top: 0;
}


/* ----------------------------------------------------------------------------
   8.3 Unsaved Changes Indicator
   ---------------------------------------------------------------------------- */

.btn-primary.has-changes,
.layout-update-btn.has-changes {
  position: relative;
}

.btn-primary.has-changes::after,
.layout-update-btn.has-changes::after {
  content: '⚠ Unsaved changes';
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  font-size: 11px;
  color: var(--admin-text-muted);
  white-space: nowrap;
  font-weight: 500;
}


/* ============================================================================
   9. MOBILE & RESPONSIVE
   ============================================================================ */

/* ----------------------------------------------------------------------------
   9.1 Mobile Bottom Bar
   ---------------------------------------------------------------------------- */

.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: var(--admin-content-bg);
  border-radius: 999px;
  padding: 6px 8px;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.mobile-bottom-bar-center {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.mobile-bottom-bar-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--admin-text-muted);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 999px;
  transition: all 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
}

.mobile-bottom-bar-item i {
  font-size: 18px;
}

.mobile-bottom-bar-item:hover,
.mobile-bottom-bar-item:active {
  color: var(--admin-text);
  background: var(--admin-bg);
}

/* Primary action button */
.mobile-bottom-bar-item.primary {
  background: var(--admin-accent);
  color: white;
  flex: 1;
  justify-content: center;
}

.mobile-bottom-bar-item.primary:hover,
.mobile-bottom-bar-item.primary:active {
  background: #0062cc;
  color: white;
}

/* Cancel button */
.mobile-cancel-btn {
  background: var(--admin-content-bg) !important;
  color: var(--admin-text-muted) !important;
  border: 1px solid var(--admin-border) !important;
  flex: 0 0 auto !important;
}

.mobile-cancel-btn:hover {
  background: var(--admin-subtle-bg) !important;
  color: var(--admin-text) !important;
}

/* Edit Layout button */
.mobile-edit-layout-btn {
  background: var(--admin-content-bg);
  color: var(--admin-accent) !important;
  border: 1px solid var(--admin-accent) !important;
  flex: 0 0 auto !important;
}

.mobile-edit-layout-btn:hover {
  background: var(--admin-info-subtle-bg);
}

/* Disabled state */
.mobile-bottom-bar-item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mobile-bottom-bar-item.primary:disabled {
  background: #94a3b8;
}

/* Has changes indicator on mobile */
.mobile-bottom-bar-item.primary.has-changes span::after {
  content: ' \f071';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-left: 6px;
  color: #f59e0b;
}

@keyframes pulse-save {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 113, 227, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(0, 113, 227, 0); }
}


/* ----------------------------------------------------------------------------
   9.2 Mobile Sidebar Overlay
   ---------------------------------------------------------------------------- */

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Mobile Close Button */
.mobile-close-btn {
  display: none;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--admin-text-muted);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-close-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--admin-text);
}


/* ----------------------------------------------------------------------------
   9.3 Filter Components
   ---------------------------------------------------------------------------- */

.list-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 16px;
  background: var(--admin-content-bg);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

.filter-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-tabs {
  display: flex;
  gap: 4px;
}

.filter-tab {
  padding: 8px 16px;
  text-decoration: none;
  color: var(--admin-text);
  border-radius: 6px;
  transition: all 0.15s;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.filter-tab:hover {
  background: var(--admin-bg);
}

.filter-tab.active {
  background: var(--admin-accent);
  color: white;
  font-weight: 500;
}

.filter-tab .count {
  opacity: 0.8;
  font-size: 13px;
}

.filter-divider {
  width: 1px;
  height: 20px;
  background: var(--admin-border);
  margin: 0 8px;
}

/* Closed feedback items */
.feedback-closed-item {
  opacity: 0.6;
}

/* Active Filters */
.active-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--admin-subtle-bg);
  border-radius: 6px;
  margin-bottom: 16px;
}

.active-filters-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--admin-text-muted);
  margin-right: 8px;
}

.filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--admin-content-bg);
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  font-size: 13px;
  color: var(--admin-text);
  text-decoration: none;
  transition: all 0.15s;
}

.filter-badge:hover {
  background: #fee;
  border-color: #fcc;
  color: #c00;
}

.filter-badge i {
  font-size: 11px;
}

.filter-clear-all {
  background: #fee2e2;
  border-color: #fecaca;
  color: #dc2626;
  font-weight: 500;
}

.filter-clear-all:hover {
  background: #fecaca;
  border-color: #f87171;
}

.filter-select {
  padding: 8px 32px 8px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  background-color: var(--admin-content-bg);
  color: var(--admin-text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  min-width: 120px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
}

.filter-select:hover {
  border-color: var(--admin-accent);
}

.filter-select:focus {
  outline: none;
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

/* Filter checkbox toggle */
.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--admin-text-muted);
  cursor: pointer;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.15s;
}

.filter-checkbox:hover {
  background: var(--admin-bg);
  color: var(--admin-text);
}

.filter-checkbox input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: var(--admin-accent);
}

.filter-dropdowns-form {
  display: flex;
  gap: 8px;
  align-items: center;
}


/* ----------------------------------------------------------------------------
   9.4 Responsive Breakpoints
   ---------------------------------------------------------------------------- */

/* --- Tablet Layout (769px - 1200px) --- */
@media (min-width: 769px) and (max-width: 1200px) {
  .admin-container {
    grid-template-columns: 64px 1fr;
    background: linear-gradient(to right, var(--admin-sidebar-bg) 64px, transparent 64px);
  }

  .admin-container::before {
    left: 64px;
  }

  .admin-sidebar {
    width: 64px;
    overflow: visible;
  }

  /* Text labels: shrink to zero, keep vertical layout intact */
  .admin-sidebar .admin-nav-item span:not(.nav-badge) {
    width: 0;
    overflow: hidden;
    opacity: 0;
    flex-shrink: 0;
  }

  /* Structural elements that are truly hidden */
  .admin-sidebar .admin-nav-section-header span,
  .admin-sidebar .admin-nav-guidebook,
  .admin-sidebar .admin-nav-section-content,
  .admin-sidebar .admin-nav-section-label,
  .admin-sidebar .sidebar-account-switch,
  .admin-sidebar .nav-expand-btn,
  .admin-sidebar #themeToggleLabel,
  .admin-sidebar .nav-readonly-icon {
    display: none;
  }

  .admin-sidebar .admin-nav-item {
    padding: 12px;
    white-space: nowrap;
    gap: 0;
  }

  .admin-sidebar .admin-nav-item i {
    flex-shrink: 0;
    min-width: 20px;
    text-align: center;
    font-size: 16px;
  }

  .admin-sidebar .admin-nav-divider {
    margin: 12px 8px;
  }

  /* Overlay: show backdrop at tablet */
  .sidebar-overlay {
    display: block;
    top: 56px;
    pointer-events: none;
  }

  /* Sidebar open state: full-width overlay */
  body.sidebar-open .admin-sidebar {
    width: 280px;
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  }

  /* Restore labels and spacing when overlay is open */
  body.sidebar-open .admin-sidebar .admin-nav-item span:not(.nav-badge) {
    width: auto;
    overflow: visible;
    opacity: 1;
  }

  body.sidebar-open .admin-sidebar .admin-nav-section-header span,
  body.sidebar-open .admin-sidebar .admin-nav-guidebook,
  body.sidebar-open .admin-sidebar .admin-nav-section-content,
  body.sidebar-open .admin-sidebar .admin-nav-section-label,
  body.sidebar-open .admin-sidebar .sidebar-account-switch,
  body.sidebar-open .admin-sidebar .nav-expand-btn,
  body.sidebar-open .admin-sidebar #themeToggleLabel {
    display: revert;
  }

  body.sidebar-open .admin-sidebar .admin-nav-item {
    gap: 12px;
    padding: 12px 12px;
  }

  body.sidebar-open .admin-sidebar .admin-nav-item i {
    margin-right: 0;
    font-size: 16px;
  }

  body.sidebar-open .admin-sidebar .admin-nav-divider {
    margin: 12px 12px;
  }

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

}

/* --- Form grids break earlier for tablets --- */
@media (max-width: 900px) {
  .form-row-2col,
  .form-grid-2,
  .grid-2,
  .grid-3,
  .grid-1-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Container — extra top margin for mobile search bar */
  .admin-container,
  .sidebar-collapsed .admin-container {
    display: block;
    background: none;
    margin-top: 100px; /* 56px top-bar + 44px search bar */
  }

  .admin-container::before,
  .sidebar-collapsed .admin-container::before {
    display: none;
  }
  
  /* Hide breadcrumbs header on mobile */
  .admin-header {
    display: none !important;
  }
  
  /* Mobile breadcrumb */
  .mobile-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--admin-text-muted);
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--admin-border);
    flex-wrap: wrap;
  }
  
  .mobile-breadcrumb a {
    color: var(--admin-accent);
    text-decoration: none;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .mobile-breadcrumb .current {
    color: var(--admin-text);
    font-weight: 500;
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .mobile-breadcrumb i {
    font-size: 8px;
    opacity: 0.5;
  }
  
  /* Mobile close button */
  .mobile-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Sidebar off-canvas */
  .admin-sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: 280px;
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: none;
  }
  
  .sidebar-overlay {
    display: block;
    top: 56px;
    pointer-events: none;
  }
  
  /* Sidebar Open State */
  body.sidebar-open .admin-sidebar {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  }
  
  body.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }
  
  /* Admin content adjustments */
  .admin-content {
    padding: 16px 16px 32px !important;
  }

  /* Page header - stays sticky on mobile */
  .page-header-sticky {
    position: sticky !important;
    top: 56px;
    z-index: 99;
    margin: -16px -16px 16px -16px !important;
    padding: 12px 16px !important;
    background: rgba(249, 250, 251, 0.95) !important;
    border-bottom: 1px solid var(--admin-border) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  html[data-theme="dark"] .page-header-sticky {
    background: rgba(28, 28, 30, 0.95) !important;
  }

  .page-header-sticky h1 {
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50%;
  }

  /* Compact header buttons on mobile */
  .page-header-sticky .btn {
    padding: 8px 12px !important;
    font-size: 13px !important;
    min-height: 36px;
  }

  /* Only show the primary action button on mobile, hide secondary */
  .page-header-sticky .btn-secondary,
  .page-header-sticky .btn-text-link {
    display: none !important;
  }

  /* Impersonation adjustments */
  .impersonate-active .admin-content {
    padding-bottom: 32px !important;
  }
  
  /* Hide columns on mobile */
  .hide-mobile {
    display: none !important;
  }
  
  /* Table mobile optimizations */
  .data-table th,
  .data-table td {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .data-table th {
    font-size: 11px;
  }
  
  .cell-title {
    flex-direction: column;
    gap: 4px;
  }

  .cell-title > i {
    display: none;
  }
  
  .cell-title-link {
    word-break: break-word;
  }
  
  /* Filter bar mobile */
  .list-filters {
    padding: 12px;
    gap: 10px;
  }
  
  .filter-left {
    display: none;
  }
  
  .filter-tabs {
    display: none;
  }
  
  .filter-right {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .filter-right .search-form {
    flex: 1;
    min-width: 180px;
  }
  
  .filter-right .btn {
    white-space: nowrap;
  }
  
  .search-input-wrapper {
    width: 100%;
  }
  
  .search-input-wrapper input {
    width: 100%;
  }
  
  /* Active filter badges */
  .active-filters {
    flex-wrap: wrap;
  }
  
  .filter-badge {
    font-size: 12px;
    padding: 4px 10px;
  }
  
  /* Form optimizations */
  .form-layout {
    gap: 16px;
  }
  
  .card {
    padding: 16px !important;
  }
  
  .card-title {
    font-size: 16px;
    margin-bottom: 12px;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px !important; /* Prevents iOS zoom */
  }
  
  /* Toggle settings compact */
  .nav-setting-item {
    padding: 10px 0;
  }
  
  .nav-setting-icon {
    width: 32px;
    height: 32px;
  }
  
  .nav-setting-label {
    font-size: 13px;
  }
  
  .nav-setting-hint {
    font-size: 11px;
  }
  
  /* Image uploader compact */
  .image-upload-area {
    padding: 16px !important;
  }
  
  .image-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  
  /* Dashboard & Guidebooks List */
  .page-header .btn {
    display: none !important;
  }
  
  .page-header h1 {
    font-size: 20px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
  }
  
  .stat-card {
    padding: 12px;
    text-align: center;
  }
  
  .stat-value {
    font-size: 24px;
  }
  
  .stat-label {
    font-size: 11px;
  }
  
  .card-header {
    padding: 12px 16px;
  }
  
  .card-header h2 {
    font-size: 16px;
  }
  
  .card-header p {
    font-size: 12px !important;
  }
  
  /* Node items */
  .node-item {
    padding: 12px;
    gap: 8px;
  }
  
  .node-content {
    flex: 1;
    min-width: 0;
  }
  
  .node-icon-preview {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  
  .node-title-link {
    font-size: 14px;
  }
  
  .node-description {
    font-size: 12px;
    display: none;
  }
  
  .node-actions {
    gap: 4px;
  }
  
  .node-actions .btn-sm {
    padding: 8px 10px;
  }
  
  .node-actions .btn-sm span {
    display: none;
  }
  
  .node-actions .btn-sm i {
    margin: 0;
  }
  
  /* Dashboard: hide Pages button, show only Settings */
  .node-actions .btn-secondary {
    display: none !important;
  }
  
  /* Empty state */
  .empty-state {
    padding: 32px 16px;
  }
  
  .empty-state i {
    font-size: 36px;
  }
  
  .empty-state h3 {
    font-size: 16px;
  }
  
  .empty-state p {
    font-size: 13px;
  }
  
  /* Feedback mobile */
  .feedback-type-icon {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  
  .feedback-detail-header,
  .feedback-detail-header-row {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .feedback-header-row {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .feedback-details-table td:first-child {
    width: auto;
    display: block;
    padding-bottom: 2px;
  }

  .feedback-details-table td {
    display: block;
    padding: 6px 0;
  }

  .feedback-details-table tr {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid var(--admin-border);
  }

  .feedback-info-banner {
    padding: 16px;
  }
  
  .feedback-detail-title {
    font-size: 18px;
  }
  
  .feedback-meta-inline {
    gap: 8px;
    font-size: 11px;
  }
  
  .feedback-badges {
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .feedback-badges .badge {
    font-size: 11px;
    padding: 4px 8px;
  }
  
  .feedback-message-image img {
    max-width: 100%;
    max-height: 150px;
  }
  
  .image-preview-container img {
    max-width: 150px;
    max-height: 100px;
  }
  
  .feedback-meta {
    gap: 6px;
  }
  
  .feedback-meta-item {
    font-size: 13px;
  }
  
  .feedback-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* User actions dropdown */
  .user-actions-menu {
    position: static;
  }
  
  .user-actions-dropdown {
    right: 0;
    left: auto;
  }
  
  /* Wizard mobile */
  .wizard-steps {
    display: none;
  }
  
  .wizard-content {
    padding: 16px;
  }
  
  .wizard-nav {
    flex-direction: column;
    gap: 8px;
  }
  
  .wizard-nav .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Welcome modal mobile */
  .welcome-modal {
    margin: 16px;
    padding: 20px;
  }
  
  .welcome-steps {
    gap: 12px;
  }
  
  .welcome-step {
    padding: 12px;
  }
  
  /* Mobile bottom bar - hidden, using sticky header instead */
  .mobile-bottom-bar {
    display: none;
  }
  
  /* Button changes indicator mobile */
  .btn-primary.has-changes::after,
  .layout-update-btn.has-changes::after {
    content: '⚠';
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: var(--admin-bg);
    color: var(--admin-text-muted);
    border-radius: 50%;
    border: 1px solid var(--admin-border);
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: normal;
  }
  
  /* Grid utilities responsive */
  .grid-2,
  .grid-1-2 {
    grid-template-columns: 1fr;
  }
  
  /* Filter dropdowns */
  .filter-right {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-dropdowns-form {
    width: 100%;
  }
  
  .filter-select {
    flex: 1;
  }
  
  /* Layout page - show only preview on mobile, but keep editors */
  .layout-grid {
    display: flex;
    flex-direction: column;
  }
  
  /* Hide only the tree card, keep editors */
  .layout-tree-card {
    display: none !important;
  }
  
  /* Reorder: preview first, then editors */
  .layout-preview-column {
    order: 1;
    position: relative !important;
    top: auto !important;
    max-height: none !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    margin: -16px -16px 16px -16px;
    width: calc(100% + 32px);
  }
  
  .layout-left-column {
    order: 2;
    display: flex !important;
    flex-direction: column;
    gap: 16px;
  }
  
  .preview-container {
    padding: 16px;
  }
  
  .preview-phone {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }
  
  .preview-help {
    display: none;
  }
  
  /* Content editor cards on mobile */
  .content-editor-card {
    margin: 0 !important;
  }
  
  .content-editor-header {
    padding: 12px 16px !important;
  }
  
  .content-editor-body {
    padding: 16px !important;
  }
  
  /* Nav settings on mobile */
  .nav-settings-header {
    padding: 12px 16px !important;
  }
  
  /* Keep layout page header visible with Update button */
  .layout-page-header {
    display: flex !important;
  }

  /* Show layout update button on mobile (compact) */
  .layout-update-btn {
    padding: 8px 12px !important;
    font-size: 13px !important;
  }
  
  /* Pagination mobile */
  .pagination {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }
  
  .pagination-info {
    font-size: 12px;
  }
  
  .pagination-controls {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .pagination-btn {
    min-width: 32px;
    height: 32px;
    font-size: 13px;
  }

  /* --- Responsive Tables: Horizontal scroll wrapper --- */
  .table-responsive {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -16px;
    padding: 0 16px;
  }

  .table-responsive table {
    min-width: 600px;
  }

  /* --- Card layout for mobile tables (opt-in via class) --- */
  .table-card-mobile thead {
    display: none;
  }

  .table-card-mobile tbody tr {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--admin-border);
  }

  .table-card-mobile tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border: none;
  }

  .table-card-mobile tbody td::before {
    content: attr(data-label);
    font-weight: 500;
    color: var(--admin-text-muted);
    font-size: 12px;
    flex-shrink: 0;
    margin-right: 12px;
  }

  /* --- Mobile modals: slide up from bottom (app-style) --- */
  /* High specificity to override inline page styles */
  html body .modal-overlay,
  html body .tag-modal-overlay,
  html body .unsaved-modal-overlay,
  html body .confirm-modal-overlay,
  html body .lg-modal-overlay,
  html body .notes-modal-overlay,
  html body .welcome-modal-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  html body .modal-content,
  html body .modal-overlay > .modal,
  html body .confirm-modal,
  html body .lg-modal,
  html body .notes-modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 85vh !important;
    border-radius: 16px 16px 0 0 !important;
    margin: 0;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }

  /* Slide-up animation */
  html body .modal-overlay.show .modal-content,
  html body .modal-overlay.show > .modal,
  html body .confirm-modal-overlay.show .confirm-modal,
  html body .lg-modal-overlay.show .lg-modal,
  html body [class$="-modal-overlay"].show > [class$="-modal"] {
    animation: slideUpModal 0.3s cubic-bezier(0.32, 0.72, 0, 1) forwards;
  }

  /* Small modals (confirmations, tags) — compact bottom sheets */
  html body .modal-content.modal-sm,
  html body .tag-modal,
  html body .unsaved-modal,
  html body .confirm-modal {
    height: auto !important;
    max-height: 85vh !important;
    border-radius: 16px 16px 0 0 !important;
    width: 100% !important;
  }

  html body .tag-modal-overlay.show .tag-modal,
  html body .unsaved-modal-overlay.show .unsaved-modal {
    animation: slideUpModal 0.3s cubic-bezier(0.32, 0.72, 0, 1) forwards;
  }

  /* Team/rates modals using .modal + .modal-backdrop pattern */
  html body .modal:not(.modal-overlay) {
    align-items: flex-end !important;
  }
  html body .modal:not(.modal-overlay) > .modal-content {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 85vh !important;
    border-radius: 16px 16px 0 0 !important;
    margin: 0 !important;
    animation: slideUpModal 0.3s cubic-bezier(0.32, 0.72, 0, 1) forwards;
  }

  /* --- Touch targets: minimum 44px for all interactive elements --- */
  .btn,
  .form-input,
  .form-select,
  .form-textarea {
    min-height: 44px;
  }

  .btn-icon {
    min-width: 44px;
    min-height: 44px;
  }

  /* --- Mobile: only top-bar height needed (search is overlay now) --- */
  .admin-container {
    margin-top: 56px;
  }

  /* --- Safe area for content bottom padding --- */
  @supports (padding-bottom: env(safe-area-inset-bottom)) {
    .admin-content {
      padding-bottom: calc(32px + env(safe-area-inset-bottom)) !important;
    }
  }
}

/* Auth page responsive */
@media (max-width: 480px) {
  .auth-card {
    padding: 32px 24px;
  }
  
  .auth-beta-notice {
    flex-direction: column;
    gap: 8px;
  }
  
  .auth-beta-notice i {
    font-size: 20px;
  }
  
  .auth-form-checkbox label {
    font-size: 13px;
  }
}


/* ============================================================================
   10. UTILITY CLASSES
   ============================================================================ */

/* ----------------------------------------------------------------------------
   10.1 Flexbox Utilities
   ---------------------------------------------------------------------------- */

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.flex-gap-sm {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-flex-gap {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.btn-group {
  display: flex;
  gap: 12px;
  align-items: center;
}


/* ----------------------------------------------------------------------------
   10.2 Grid Utilities
   ---------------------------------------------------------------------------- */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.grid-1-2 {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 16px;
}

.grid-auto-1fr {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}


/* ----------------------------------------------------------------------------
   10.3 Spacing Utilities
   ---------------------------------------------------------------------------- */

.mb-0 { margin-bottom: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

.mt-md { margin-top: 20px; }
.mb-md { margin-bottom: 20px; }
.ml-sm { margin-left: 8px; }

.p-0 { padding: 0 !important; }


/* ----------------------------------------------------------------------------
   10.4 Text Utilities
   ---------------------------------------------------------------------------- */

.text-right { text-align: right; }
.text-center { text-align: center; }
.text-left { text-align: left; }

.text-muted { color: var(--admin-text-muted); }
.text-accent { color: var(--admin-accent); }
.text-danger { color: #dc2626; }
.text-success { color: #10b981; }
.text-warning { color: #d97706; }

.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-lg { font-size: 18px; }

/* Date time in tables */
.date-time {
  font-size: 11px;
  opacity: 0.7;
}

.font-mono { font-family: monospace; font-size: 14px; }
.font-semibold { font-weight: 600; }

/* Line height for card descriptions */
.text-muted.text-sm.mb-0 {
  line-height: 1.5;
}


/* ----------------------------------------------------------------------------
   10.5 Display Utilities
   ---------------------------------------------------------------------------- */

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}


/* ----------------------------------------------------------------------------
   10.6 Dividers
   ---------------------------------------------------------------------------- */

.divider {
  border: none;
  border-top: 1px solid var(--admin-border);
  margin: 20px 0;
}

.divider-lg {
  border: none;
  border-top: 1px solid var(--admin-border);
  margin: 24px 0;
}


/* ----------------------------------------------------------------------------
   10.7 Section Titles
   ---------------------------------------------------------------------------- */

.section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  margin-top: 0;
}


/* ----------------------------------------------------------------------------
   10.8 Color Picker
   ---------------------------------------------------------------------------- */

.color-input {
  width: 60px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid var(--admin-border);
  cursor: pointer;
  padding: 2px;
}

.color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-input::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}


/* ----------------------------------------------------------------------------
   10.9 Link Styles
   ---------------------------------------------------------------------------- */

.link-unstyled {
  text-decoration: none;
  color: inherit;
}

.link-unstyled:hover {
  color: var(--admin-accent);
}

.link-view-external {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--admin-accent);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.link-view-external:hover {
  background: rgba(0, 113, 227, 0.08);
}


/* ----------------------------------------------------------------------------
   10.10 Button & Card Utilities
   ---------------------------------------------------------------------------- */

.btn-full {
  width: 100%;
  justify-content: center;
}

.card-body-flush {
  padding: 0;
}

.table-actions {
  text-align: right;
}


/* ----------------------------------------------------------------------------
   10.11 Icon Utilities
   ---------------------------------------------------------------------------- */

.icon-lg {
  font-size: 48px;
  color: var(--admin-border);
  margin-bottom: 16px;
}

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

.icon-external {
  font-size: 12px;
}


/* ----------------------------------------------------------------------------
   10.12 Navigation Utilities
   ---------------------------------------------------------------------------- */

.nav-toggle-collapsed {
  transform: rotate(-90deg);
}

.nav-item-logout {
  color: #ef4444;
}

.nav-item-logout:hover {
  color: #dc2626;
}

/* --- Theme Toggle Button --- */
.theme-toggle-btn {
  width: 100%;
  text-align: left;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

.theme-toggle-btn i {
  width: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--admin-text-muted);
  transition: color 0.2s ease;
}

.theme-toggle-btn:hover i {
  color: var(--admin-accent);
}

/* --- Dropdown Bottom Row (theme + logout) --- */
.dropdown-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
}

.dropdown-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--admin-text-muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.dropdown-logout:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.dropdown-theme-picker {
  display: flex;
  background: var(--admin-bg-secondary);
  border: 1px solid var(--admin-border-color);
  border-radius: 8px;
  overflow: hidden;
}

.dropdown-theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--admin-text-muted);
  font-size: 13px;
  transition: all 0.15s ease;
}

.dropdown-theme-btn:not(:last-child) {
  border-right: 1px solid var(--admin-border-color);
}

.dropdown-theme-btn:hover {
  color: var(--admin-text-primary);
  background: var(--admin-bg-tertiary, rgba(0,0,0,0.04));
}

.dropdown-theme-btn.active {
  background: var(--admin-accent);
  color: #fff;
}

/* --- Theme Picker (Apple-style, Account Settings) --- */
.theme-picker {
  display: flex;
  gap: 16px;
}

.theme-picker-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* Mini preview card */
.theme-picker-preview {
  width: 120px;
  height: 80px;
  border-radius: 10px;
  border: 3px solid var(--admin-border-color);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.theme-picker-option:hover .theme-picker-preview {
  border-color: var(--admin-text-muted);
}

.theme-picker-option.active .theme-picker-preview {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 2px var(--admin-accent);
}

/* Preview internals — top bar */
.theme-preview-bar {
  height: 10px;
  flex-shrink: 0;
}

.theme-preview-body {
  flex: 1;
  display: flex;
}

.theme-preview-sidebar {
  width: 24px;
  flex-shrink: 0;
}

.theme-preview-content {
  flex: 1;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.theme-preview-line {
  height: 4px;
  border-radius: 2px;
  width: 100%;
}

.theme-preview-line.short {
  width: 60%;
}

/* Light preview colors */
.theme-preview-light .theme-preview-bar { background: #f5f5f7; }
.theme-preview-light .theme-preview-sidebar { background: #f5f5f7; }
.theme-preview-light .theme-preview-content { background: #ffffff; }
.theme-preview-light .theme-preview-line { background: #e2e2e7; }

/* Dark preview colors */
.theme-preview-dark .theme-preview-bar { background: #2c2c2e; }
.theme-preview-dark .theme-preview-sidebar { background: #2c2c2e; }
.theme-preview-dark .theme-preview-content { background: #1c1c1e; }
.theme-preview-dark .theme-preview-line { background: #3a3a3c; }

/* Auto preview — split half light / half dark */
.theme-preview-auto {
  position: relative;
}

.theme-preview-auto .theme-preview-bar {
  background: linear-gradient(to right, #f5f5f7 50%, #2c2c2e 50%);
}

.theme-preview-auto .theme-preview-sidebar {
  background: linear-gradient(to right, #f5f5f7 50%, #2c2c2e 50%);
}

.theme-preview-auto .theme-preview-content {
  background: linear-gradient(to right, #ffffff 50%, #1c1c1e 50%);
}

.theme-preview-auto .theme-preview-line {
  background: linear-gradient(to right, #e2e2e7 50%, #3a3a3c 50%);
}

/* Label */
.theme-picker-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--admin-text-muted);
  transition: color 0.2s ease;
}

.theme-picker-option.active .theme-picker-label {
  color: var(--admin-text-primary);
}

/* Checkmark */
.theme-picker-check {
  font-size: 16px;
  color: transparent;
  transition: color 0.2s ease;
  line-height: 1;
}

.theme-picker-option.active .theme-picker-check {
  color: var(--admin-accent);
}

@media (max-width: 480px) {
  .theme-picker { gap: 10px; }
  .theme-picker-preview { width: 96px; height: 64px; }
}

.admin-badge-text {
  font-size: 11px;
  opacity: 0.7;
}


/* ----------------------------------------------------------------------------
   10.13 Mobile Utilities
   ---------------------------------------------------------------------------- */

.mobile-btn-full {
  flex: 1;
  max-width: none;
}


/* ----------------------------------------------------------------------------
   10.14 Transition Utilities
   ---------------------------------------------------------------------------- */

.transition-transform {
  transition: transform 0.2s ease;
}

.transition-all {
  transition: all 0.2s ease;
}


/* ----------------------------------------------------------------------------
   10.15 Screenshot/Image Container
   ---------------------------------------------------------------------------- */

.screenshot-container {
  margin-top: 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  overflow: hidden;
  max-width: 800px;
}


/* ============================================================================
   END OF STYLESHEET
   ============================================================================ */

/* ============================================================================
   EXTRACTED EMBEDDED STYLES
   Verplaatst uit PHP bestanden naar admin.css voor betere caching
   ============================================================================ */


/* ----------------------------------------------------------------------------
   Welcome Modal (guidebook-form.php)
   Getoond na het aanmaken van een nieuwe guidebook
   ---------------------------------------------------------------------------- */

.welcome-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

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

.welcome-modal {
  background: var(--admin-content-bg);
  border-radius: 20px;
  padding: 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease;
}

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

@keyframes slideUpModal {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.welcome-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.welcome-icon i {
  font-size: 36px;
  color: white;
}

.welcome-modal h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  color: var(--admin-text);
}

.welcome-subtitle {
  color: var(--admin-text-muted);
  margin: 0 0 32px;
  font-size: 15px;
}

.welcome-steps {
  text-align: left;
  margin-bottom: 32px;
}

.welcome-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: var(--admin-subtle-bg);
  border-radius: 12px;
  margin-bottom: 12px;
}

.welcome-step:last-child {
  margin-bottom: 0;
}

.welcome-step-icon {
  width: 40px;
  height: 40px;
  background: #3b82f6;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.welcome-step-icon i {
  color: white;
  font-size: 16px;
}

.welcome-step-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.welcome-step-content strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--admin-text);
}

.welcome-step-content span {
  font-size: 13px;
  color: var(--admin-text-muted);
}

.welcome-actions {
  margin-bottom: 16px;
}

.welcome-actions .btn {
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.welcome-actions .btn:hover {
  background: #2563eb;
}

.welcome-preview-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--admin-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.welcome-preview-link:hover {
  color: #3b82f6;
}

/* Welcome Preview Modal */
.welcome-preview-modal {
  background: var(--admin-content-bg);
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--admin-shadow-lg);
}

.welcome-preview-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--admin-border);
}

.welcome-preview-modal .modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.welcome-preview-modal .modal-close {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--admin-text-muted);
  border-radius: 8px;
  transition: all 0.15s ease;
}

.welcome-preview-modal .modal-close:hover {
  background: var(--admin-bg);
  color: var(--admin-text);
}

.welcome-preview-modal .modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.welcome-preview-content {
  line-height: 1.6;
  color: var(--admin-text);
}

.welcome-preview-content h2 {
  margin: 0 0 16px 0;
  font-size: 24px;
}

.welcome-preview-content p {
  margin: 0 0 12px 0;
}

.welcome-preview-content ul {
  margin: 0 0 12px 0;
  padding-left: 24px;
}

.welcome-preview-content li {
  margin-bottom: 6px;
}

.welcome-preview-modal .modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--admin-border);
  display: flex;
  justify-content: flex-end;
}

/* Guest Welcome Modal (Preview) */
.welcome-preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.welcome-preview-overlay.show {
  opacity: 1;
  visibility: visible;
}

.guest-welcome-modal {
  background: var(--admin-content-bg);
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: guestWelcomeIn 0.3s ease-out;
}

@keyframes guestWelcomeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.guest-welcome-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--admin-text-muted);
  transition: all 0.15s ease;
  z-index: 10;
}

.guest-welcome-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--admin-text);
}

.guest-welcome-content {
  padding: 40px 32px 24px;
  overflow-y: auto;
  flex: 1;
  color: var(--admin-text);
  line-height: 1.6;
}

.guest-welcome-content h2 {
  margin: 0 0 16px 0;
  font-size: 26px;
  font-weight: 700;
  color: #111827;
}

.guest-welcome-content p {
  margin: 0 0 14px 0;
  font-size: 15px;
}

.guest-welcome-content ul {
  margin: 0 0 14px 0;
  padding-left: 20px;
}

.guest-welcome-content li {
  margin-bottom: 8px;
  font-size: 15px;
}

.guest-welcome-content a {
  color: #3b82f6;
  text-decoration: none;
}

.guest-welcome-content a:hover {
  text-decoration: underline;
}

.guest-welcome-content img {
  border-radius: 50%;
}

.guest-welcome-btn {
  margin: 0 32px 32px;
  padding: 14px 24px;
  background: #3b82f6;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.guest-welcome-btn:hover {
  background: #2563eb;
}

@media (max-width: 480px) {
  .guest-welcome-modal {
    margin: 16px;
    max-height: calc(100vh - 32px);
  }
  
  .guest-welcome-content {
    padding: 32px 24px 20px;
  }
  
  .guest-welcome-content h2 {
    font-size: 22px;
  }
  
  .guest-welcome-btn {
    margin: 0 24px 24px;
  }
}

@media (max-width: 768px) {
  .welcome-modal-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .welcome-modal {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 16px 16px 0 0 !important;
    animation: slideUpModal 0.3s cubic-bezier(0.32, 0.72, 0, 1) forwards;
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 480px) {
  .welcome-modal {
    padding: 32px 24px;
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }

  .welcome-icon {
    width: 64px;
    height: 64px;
  }

  .welcome-icon i {
    font-size: 28px;
  }

  .welcome-modal h2 {
    font-size: 22px;
  }
}

/* Welcome modal — dismiss link */
.welcome-dismiss-link {
  display: inline-block;
  margin-top: 12px;
  background: none;
  border: none;
  font-size: 13px;
  color: var(--admin-text-muted);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
}
.welcome-dismiss-link:hover {
  color: var(--admin-text);
  text-decoration: underline;
}


/* ----------------------------------------------------------------------------
   Guidebook Wizard Modal (guidebook-wizard.php)
   Step-by-step wizard voor nieuwe guidebooks
   ---------------------------------------------------------------------------- */

.wizard-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.wizard-modal {
  background: var(--admin-content-bg);
  border-radius: 16px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.wizard-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--admin-text-muted);
  cursor: pointer;
  width: 36px;
  height: 36px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.wizard-close:hover {
  background: var(--admin-hover-bg);
  color: var(--admin-text);
}

.wizard-progress {
  padding: 20px 32px 0;
}

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

.wizard-progress-bar {
  height: 3px;
  background: var(--admin-border);
  border-radius: 2px;
}

.wizard-progress-fill {
  height: 100%;
  background: var(--admin-accent);
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}

.wizard-content {
  display: none;
  padding: 32px 32px 24px;
}

.wizard-content.active {
  display: block;
}

.wizard-content h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: var(--admin-text);
}

.wizard-subtitle {
  color: var(--admin-text-muted);
  margin: 0 0 24px;
  font-size: 14px;
}

.wizard-content .form-group {
  margin-bottom: 20px;
}

.wizard-content .form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--admin-text);
}

.wizard-content .form-label.required::after {
  content: ' *';
  color: #ef4444;
}

.wizard-content .form-input,
.wizard-content .form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--admin-content-bg);
  color: var(--admin-text);
  transition: all 0.15s ease;
}

.wizard-content .form-input:focus,
.wizard-content .form-select:focus {
  outline: none;
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--admin-accent) 10%, transparent);
}

.wizard-content .form-input.error,
.wizard-content .form-select.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.wizard-content .field-error {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #ef4444;
}

.wizard-content .form-hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--admin-text-muted);
}

.wizard-contact-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.wizard-contact-layout .avatar-section {
  flex-shrink: 0;
}

.wizard-contact-layout .avatar-upload-circle {
  width: 100px;
  height: 100px;
}

.wizard-contact-fields {
  flex: 1;
  min-width: 0;
}

@media (max-width: 480px) {
  .wizard-contact-layout {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  
  .wizard-contact-fields {
    width: 100%;
  }
}

/* Listings Page Grid */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.listing-card {
  display: flex;
  flex-direction: column;
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  overflow: hidden;
  box-shadow: var(--admin-shadow);
  transition: all 0.15s ease;
  text-decoration: none;
  color: inherit;
}

.listing-card:hover {
  border-color: var(--admin-primary);
  transform: translateY(-2px);
  box-shadow: var(--admin-shadow-lg);
}

.listing-card-photo {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: var(--admin-subtle-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--admin-text-muted);
  font-size: 32px;
}

.listing-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-card-info {
  padding: 14px 16px;
}

.listing-card-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--admin-text);
  line-height: 1.3;
}

.listing-card-location {
  font-size: 13px;
  color: var(--admin-text-muted);
  margin-top: 4px;
}

@media (max-width: 480px) {
  .listing-grid {
    grid-template-columns: 1fr;
  }
}

/* Wizard Listing Selection */
.listing-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.listing-choice-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--admin-card);
  border: 2px solid var(--admin-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  position: relative;
}

.listing-choice-card:hover {
  border-color: var(--admin-primary);
  background: var(--admin-primary-light);
}

.listing-choice-card.selected {
  border-color: var(--admin-primary);
  background: var(--admin-primary-light);
}

.listing-choice-card.selected .listing-card-check {
  display: flex;
}

.listing-card-check {
  display: none;
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: var(--admin-primary);
  color: white;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.listing-card-photo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--admin-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.listing-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-card-photo i {
  font-size: 20px;
  color: var(--admin-text-muted);
}

.listing-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.listing-card-info strong {
  font-size: 14px;
  color: var(--admin-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listing-card-info span {
  font-size: 12px;
  color: var(--admin-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listing-choice-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  color: var(--admin-text-muted);
  font-size: 13px;
}

.listing-choice-divider::before,
.listing-choice-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--admin-border);
}

.listing-choice-new-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  background: transparent;
  border: 2px dashed var(--admin-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--admin-text-muted);
  font-size: 14px;
  font-weight: 500;
}

.listing-choice-new-btn:hover {
  border-color: var(--admin-primary);
  color: var(--admin-primary);
  background: var(--admin-primary-light);
}

.listing-choice-new-btn.selected {
  border-color: var(--admin-primary);
  border-style: solid;
  color: var(--admin-primary);
  background: var(--admin-primary-light);
}

.listing-choice-new-btn i {
  font-size: 16px;
}

@media (max-width: 480px) {
  .listing-choice-grid {
    grid-template-columns: 1fr;
  }
}

/* Host Info Display (read-only) */
.host-info-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: var(--admin-bg);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
}

.host-info-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.host-info-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--admin-card);
  border: 2px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.host-info-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.host-info-avatar i {
  font-size: 22px;
  color: var(--admin-text-muted);
}

.host-info-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.host-info-details strong {
  font-size: 15px;
  color: var(--admin-text);
}

.host-info-details span {
  font-size: 13px;
  color: var(--admin-text-muted);
}

.host-info-details .text-muted {
  font-style: italic;
}

@media (max-width: 768px) {
  .host-info-display {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  
  .host-info-card {
    flex-direction: column;
  }
  
  .host-info-display .btn {
    width: 100%;
  }
}

/* Wizard Host Preview */
.wizard-host-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  background: var(--admin-bg);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
}

.wizard-host-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.wizard-host-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--admin-card);
  border: 2px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.wizard-host-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wizard-host-avatar i {
  font-size: 24px;
  color: var(--admin-text-muted);
}

.wizard-host-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wizard-host-info strong {
  font-size: 16px;
  color: var(--admin-text);
}

.wizard-host-info span {
  font-size: 13px;
  color: var(--admin-text-muted);
}

.wizard-host-info .text-muted {
  color: var(--admin-text-muted);
  font-style: italic;
}

@media (max-width: 480px) {
  .wizard-host-preview {
    flex-direction: column;
    text-align: center;
  }
  
  .wizard-host-card {
    flex-direction: column;
  }
  
  .wizard-host-preview .btn {
    width: 100%;
  }
}

/* Wizard Welcome Preview */
.wizard-welcome-preview {
  background: var(--admin-subtle-bg);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
}

.wizard-welcome-preview-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wizard-welcome-preview-label i {
  font-size: 14px;
}

.wizard-welcome-preview-content {
  background: var(--admin-content-bg);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 20px;
  max-height: 280px;
  overflow-y: auto;
}

.wizard-welcome-note {
  margin: 12px 0 0 0;
  font-size: 12px;
  color: var(--admin-text-muted);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.wizard-welcome-note i {
  color: var(--admin-accent);
  margin-top: 1px;
}

/* Contact Layout (Guidebook Form) */
.contact-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.host-photo-section {
  flex-shrink: 0;
  text-align: center;
}

.host-photo-section .avatar-upload-circle {
  width: 80px;
  height: 80px;
}

.contact-fields {
  flex: 1;
  min-width: 0;
}

@media (max-width: 480px) {
  .contact-layout {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  
  .contact-fields {
    width: 100%;
  }
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.language-search-wrapper {
  position: relative;
}

.language-search-wrapper .form-input {
  padding-right: 36px;
}

.language-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--admin-content-bg);
  border: 1px solid var(--admin-border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.language-dropdown.show {
  display: block;
}

.language-dropdown-item {
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.1s ease;
}

.language-dropdown-item:hover {
  background: var(--admin-hover-bg);
}

.language-dropdown-item .flag {
  font-size: 18px;
}

.language-dropdown-item .name {
  font-size: 14px;
  color: var(--admin-text);
}

.language-selected {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--admin-primary-light);
  border: 2px solid var(--admin-accent);
  border-radius: 8px;
  margin-top: -1px;
}

.language-selected .language-flag {
  font-size: 20px;
}

.language-selected .language-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--admin-text);
  flex: 1;
}

.language-clear {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--admin-text-muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.language-clear:hover {
  color: #ef4444;
}

.language-popular {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}

.popular-label {
  font-size: 12px;
  color: var(--admin-text-muted);
}

.language-quick {
  padding: 6px 10px;
  font-size: 12px;
  background: var(--admin-subtle-bg);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--admin-text);
}

.language-quick:hover {
  background: var(--admin-hover-bg);
  border-color: var(--admin-border);
}

.language-quick.active {
  background: var(--admin-primary-light);
  border-color: var(--admin-accent);
  color: var(--admin-accent);
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  padding: 16px 32px 32px;
  gap: 12px;
}

.wizard-nav .btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.wizard-nav .btn-secondary {
  background: var(--admin-subtle-bg);
  border: 1px solid var(--admin-border);
  color: var(--admin-text);
}

.wizard-nav .btn-secondary:hover {
  background: var(--admin-hover-bg);
}

.wizard-nav .btn-primary {
  background: var(--admin-accent);
  border: 1px solid var(--admin-accent);
  color: white;
}

.wizard-nav .btn-primary:hover {
  filter: brightness(0.9);
}

/* Wizard Pages Selection */
.wizard-pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.wizard-page-option {
  cursor: pointer;
}

.wizard-page-option input[type="checkbox"] {
  display: none;
}

.wizard-page-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 8px;
  background: var(--admin-subtle-bg);
  border: 2px solid var(--admin-border);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.wizard-page-card i {
  font-size: 18px;
  color: var(--admin-text-muted);
  margin-bottom: 6px;
  transition: color 0.2s ease;
}

.wizard-page-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--admin-text);
  line-height: 1.3;
}

.wizard-page-option:hover .wizard-page-card {
  border-color: var(--admin-accent);
  background: var(--admin-info-subtle-bg);
}

.wizard-page-option:hover .wizard-page-card i {
  color: var(--admin-accent);
}

.wizard-page-option input[type="checkbox"]:checked + .wizard-page-card {
  border-color: var(--admin-accent);
  background: var(--admin-primary-light);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--admin-accent) 15%, transparent);
}

.wizard-page-option input[type="checkbox"]:checked + .wizard-page-card i {
  color: var(--admin-accent);
}

.wizard-page-option input[type="checkbox"]:checked + .wizard-page-card .wizard-page-title {
  color: var(--admin-accent);
}

/* Required pages */
.wizard-page-required {
  cursor: default;
}

.wizard-page-required .wizard-page-card {
  border-color: var(--admin-accent);
  background: var(--admin-primary-light);
  position: relative;
}

.wizard-page-required .wizard-page-card i {
  color: var(--admin-accent);
}

.wizard-page-required-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--admin-accent);
  color: #ffffff;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

@media (max-width: 480px) {
  .wizard-pages-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .wizard-page-card {
    padding: 10px 6px;
  }
  
  .wizard-page-card i {
    font-size: 16px;
  }
  
  .wizard-page-title {
    font-size: 11px;
  }
}

/* ----------------------------------------------------------------------------
   User Search (feedback form admin)
   ---------------------------------------------------------------------------- */
.user-search-wrapper {
  position: relative;
}

.user-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--admin-content-bg);
  border: 1px solid var(--admin-border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.user-search-item {
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background 0.1s ease;
}

.user-search-item:hover {
  background: var(--admin-hover-bg);
}

.user-search-item .user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--admin-text);
}

.user-search-item .user-email {
  font-size: 12px;
  color: var(--admin-text-muted);
}

.user-search-empty {
  padding: 12px;
  text-align: center;
  color: var(--admin-text-muted);
  font-size: 13px;
}

@media (max-width: 768px) {
  .wizard-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .wizard-modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 90vh;
    border-radius: 16px 16px 0 0;
    animation: slideUpModal 0.3s cubic-bezier(0.32, 0.72, 0, 1) forwards;
  }
}

@media (max-width: 480px) {
  .wizard-modal {
    max-height: 100vh;
    border-radius: 0;
  }

  .wizard-progress {
    padding: 16px 20px 0;
  }

  .wizard-content {
    padding: 24px 20px 16px;
  }
  
  .wizard-nav {
    padding: 16px 20px 24px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .language-popular {
    gap: 6px;
  }
  
  .language-quick {
    padding: 5px 8px;
    font-size: 11px;
  }
}


/* ----------------------------------------------------------------------------
   Image Upload Preview (node-form.php)
   Preview en delete functionaliteit voor afbeeldingen
   ---------------------------------------------------------------------------- */

  .image-preview-wrapper {
    position: relative;
    margin-bottom: 12px;
  }
  
  .image-preview {
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid var(--admin-border);
    display: block;
  }
  
  .image-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.95);
    border: 2px solid white;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  }
  
  .image-delete-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
  }
  
  .image-upload-placeholder {
    text-align: center;
    padding: 60px 20px;
    background: var(--admin-subtle-bg);
    border: 2px dashed var(--admin-border);
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .image-upload-placeholder:hover {
    background: #edf2f7;
    border-color: #a0aec0;
  }
  
  .image-upload-placeholder.drag-over {
    background: #e6f2ff;
    border-color: #667eea;
    border-width: 3px;
    transform: scale(1.02);
  }
  
  .upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--admin-accent);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    font-size: 14px;
  }
  
  .upload-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
  }
  
  .upload-btn:active {
    transform: translateY(0);
  }


/* ----------------------------------------------------------------------------
   Content Editors & Info Tab (nodes-list.php)
   Header/Footer editors en info tab styling
   ---------------------------------------------------------------------------- */

/* Content Editors (Header/Footer stacked) */
.content-editors-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.content-editor-card {
  margin-bottom: 0;
}

.content-editor-header {
  padding: 12px 16px;
}

.content-editor-header h3 {
  font-size: 14px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.content-editor-header i {
  font-size: 12px;
  opacity: 0.7;
}

.content-editor-body {
  padding: 16px;
}

.content-editor-body .form-hint {
  font-size: 11px;
  margin-top: 6px;
}

/* Info Tab styling */
.info-tab-header {
  padding: 12px 16px;
  background: #eff6ff;
  border-left: 3px solid #3b82f6;
  color: #1e40af;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-tab-children {
  margin-left: 24px;
}

.node-info-tab {
  background: var(--admin-subtle-bg);
}

.node-info-tab .node-handle {
  background: #eff6ff;
}

/* Hidden Pages Section */
.hidden-pages-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px dashed var(--admin-border);
}

.hidden-pages-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--admin-text-muted);
  font-weight: 600;
  font-size: 14px;
}

.hidden-pages-divider i {
  color: var(--admin-text-muted);
}

.hidden-pages-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.node-orphaned-hidden {
  background: var(--admin-subtle-bg);
  border: 2px dashed var(--admin-border);
  border-radius: 8px;
  opacity: 0.7;
}

.node-orphaned-hidden:hover {
  opacity: 1;
  border-color: var(--admin-text-muted);
}

.node-orphaned-hidden .node-handle {
  background: var(--admin-hover-bg);
  cursor: not-allowed;
}

.node-orphaned-hidden .node-handle-disabled {
  color: var(--admin-text-muted);
}

.node-orphaned-hidden .node-icon-preview {
  opacity: 0.5;
}

.node-orphaned-hidden .node-title-link {
  color: var(--admin-text-muted);
}

.node-hint {
  font-size: 12px;
  color: var(--admin-text-muted);
  margin-top: 4px;
  font-style: italic;
}

/* ============================================
   MOBILE PREVIEW STYLING
   ============================================ */

/* Preview Container */
.preview-container {
  padding: 16px;
  background: var(--admin-hover-bg);
}

.preview-phone {
  background: #fff;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15), inset 0 0 0 8px #1f2937;
  max-width: 280px;
  margin: 0 auto;
}

/* Topbar */
.preview-topbar {
  padding: 14px 16px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  position: relative;
}

/* Scrollable Content Area */
.mobile-nav-preview {
  height: 400px;
  overflow-y: auto;
  background: var(--admin-subtle-bg);
}

/* Slider */
.preview-slider {
  margin: 12px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.preview-slider-image {
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
  padding-bottom: 56.25%;
  position: relative;
}

.preview-slider-image i,
.preview-slider-image .preview-slider-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.preview-slider-image i {
  top: 35%;
}

.preview-slider-title {
  bottom: 20%;
  color: white;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  width: 80%;
}

.preview-slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.preview-slider-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
}

.preview-slider-dot.active {
  background: white;
}

/* Content Block (header/footer) - transparent, directly on background */
.preview-content-block {
  margin: 0 12px 8px;
  padding: 12px 4px;
}

/* Tiles Grid */
.preview-tiles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 12px;
}

/* Single Tile */
.preview-tile {
  background: var(--admin-content-bg);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  position: relative;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.preview-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Tile Badge (Tip) */
.preview-tile-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  color: #f5c518;
  font-size: 14px;
}

/* Tile Icon */
.preview-tile-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0,0,0,0.06);
}

.preview-tile-icon i {
  font-size: 16px;
}

/* Tile Title */
.preview-tile-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--admin-text);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Bottom Navigation */
.preview-bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0 18px;
}

.preview-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: rgba(255,255,255,0.6);
  font-size: 10px;
  cursor: pointer;
  transition: color 0.15s ease;
  padding: 4px 8px;
}

.preview-nav-item:hover {
  color: rgba(255,255,255,0.9);
}

.preview-nav-item.active {
  color: white;
}

.preview-nav-item i {
  font-size: 18px;
}

.preview-nav-item span {
  font-weight: 500;
}


/* ----------------------------------------------------------------------------
   Beta Notice Hover State (feedback-form.php)
   ---------------------------------------------------------------------------- */

.beta-notice:hover {
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
  background: var(--admin-info-subtle-bg) !important;
}


/* ============================================================================
   EXTRA UTILITY CLASSES
   Toegevoegd om inline styles te vervangen
   ============================================================================ */

/* ----------------------------------------------------------------------------
   Width Utilities
   ---------------------------------------------------------------------------- */
.w-60 { width: 60px; }
.w-70 { width: 70px; }
.w-80 { width: 80px; }
.w-90 { width: 90px; }
.w-100 { width: 100px; }
.w-110 { width: 110px; }
.w-120 { width: 120px; }
.w-140 { width: 140px; }
.w-150 { width: 150px; }
.w-180 { width: 180px; }
.w-200 { width: 200px; }
.w-250 { width: 250px; }

/* ----------------------------------------------------------------------------
   Spacing Utilities
   ---------------------------------------------------------------------------- */
.p-0 { padding: 0 !important; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.px-3 { padding-left: 12px; padding-right: 12px; }

/* ----------------------------------------------------------------------------
   Flexbox Utilities
   ---------------------------------------------------------------------------- */
.flex-1 { flex: 1; }
.flex-gap-sm { display: flex; gap: 12px; }
.inline-flex-gap { display: inline-flex; align-items: center; gap: 8px; }

/* ----------------------------------------------------------------------------
   Typography Utilities
   ---------------------------------------------------------------------------- */
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-lg { font-size: 16px; }

/* ----------------------------------------------------------------------------
   Section Title
   Heading style voor form secties
   ---------------------------------------------------------------------------- */
.section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--admin-text);
}

/* ----------------------------------------------------------------------------
   Dividers
   ---------------------------------------------------------------------------- */
.divider {
  margin: 16px 0;
  border: none;
  border-top: 1px solid var(--admin-border);
}

.divider-lg {
  margin: 24px 0;
  border: none;
  border-top: 1px solid var(--admin-border);
}

/* ----------------------------------------------------------------------------
   Empty State Icon
   Grote grijze icon voor lege states
   ---------------------------------------------------------------------------- */
.icon-empty {
  font-size: 48px;
  color: #a0aec0;
  margin-bottom: 12px;
}

/* ----------------------------------------------------------------------------
   View Link Button
   Link met icon om naar preview te gaan
   ---------------------------------------------------------------------------- */
.btn-view-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--admin-accent);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.btn-view-link:hover {
  background: rgba(0, 113, 227, 0.08);
}

/* ----------------------------------------------------------------------------
   Clickable Badge Button
   Badge die als button werkt (voor dropdowns)
   ---------------------------------------------------------------------------- */
.badge-btn {
  cursor: pointer;
  border: none;
  font: inherit;
  transition: all 0.15s ease;
}

.badge-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Feedback badges as buttons */
.feedback-quick-edit-dropdown .badge {
  cursor: pointer;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.15s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.feedback-quick-edit-dropdown .badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ----------------------------------------------------------------------------
   Color Picker Input
   Kleine color picker voor theme settings
   ---------------------------------------------------------------------------- */
.color-picker-input {
  width: 60px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid var(--admin-border);
  cursor: pointer;
}

/* ----------------------------------------------------------------------------
   Muted Link
   Subtiele link in tekst
   ---------------------------------------------------------------------------- */
.link-muted {
  color: var(--admin-text-muted);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.link-muted:hover {
  color: var(--admin-accent);
}

.badge-link {
  color: var(--admin-text-muted);
  text-decoration: none;
  cursor: pointer;
}

.badge-link:hover {
  color: var(--admin-accent);
}

/* ----------------------------------------------------------------------------
   Status Badge Colors (extra)
   ---------------------------------------------------------------------------- */
.badge-warning-light {
  background: var(--admin-warning-bg);
  color: var(--admin-warning);
}

.badge-slider {
  background: var(--admin-purple-bg);
  color: var(--admin-purple);
}

/* Link that inherits parent color */
.link-inherit {
  color: inherit;
  text-decoration: none;
}

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

/* ----------------------------------------------------------------------------
   Display Utilities (Step 4B)
   ---------------------------------------------------------------------------- */
.d-none { display: none !important; }
.d-inline { display: inline !important; }
.d-block { display: block !important; }
.d-inline-block { display: inline-block !important; }
.visibility-hidden { visibility: hidden; }

/* ----------------------------------------------------------------------------
   Transition Utilities (Step 4B)
   ---------------------------------------------------------------------------- */
.transition-opacity { transition: opacity 0.2s ease; }

/* ----------------------------------------------------------------------------
   Width/Height Combinations (Step 4B)
   ---------------------------------------------------------------------------- */
.w-100-center { width: 100px; text-align: center; }
.w-full { width: 100%; }
.icon-36 { width: 36px; height: 36px; }

/* ----------------------------------------------------------------------------
   Form Elements (Step 4B)
   ---------------------------------------------------------------------------- */
.textarea-resize {
  resize: vertical;
  font-family: inherit;
}

.form-label-inline {
  display: block;
  font-size: 13px;
  color: var(--admin-text-muted);
  margin-bottom: 6px;
}

.label-sm {
  color: #4a5568;
  margin-bottom: 4px;
  font-weight: 500;
}

/* ----------------------------------------------------------------------------
   Text Size Extras (Step 4B)
   ---------------------------------------------------------------------------- */
.text-xxs { font-size: 10px; }

/* ----------------------------------------------------------------------------
   Link Styles (Step 4B)
   ---------------------------------------------------------------------------- */
.link-accent {
  color: var(--admin-accent);
  text-decoration: underline;
}

.link-plain {
  text-decoration: none;
  color: inherit;
}

.link-hover-underline {
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.2s;
}

.link-hover-underline:hover {
  text-decoration-color: currentColor;
}

/* ----------------------------------------------------------------------------
   Button Variants (Step 4B)
   ---------------------------------------------------------------------------- */
.btn-sm-compact {
  font-size: 13px;
  padding: 8px 16px;
}

.btn-delete-full {
  width: 100%;
  background: #dc2626;
  color: white;
  border-color: #dc2626;
  justify-content: center;
  margin-top: 16px;
}

.btn-delete-full:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

/* ----------------------------------------------------------------------------
   Image Preview (Step 4B)
   ---------------------------------------------------------------------------- */
.img-preview-clickable {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  transition: opacity 0.2s;
}

.img-preview-clickable:hover {
  opacity: 0.9;
}

/* ----------------------------------------------------------------------------
   Table Utilities (Step 4B)
   ---------------------------------------------------------------------------- */
.table-full {
  width: 100%;
  border-collapse: collapse;
}

/* ----------------------------------------------------------------------------
   Margin Utilities (Step 4B)
   ---------------------------------------------------------------------------- */
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

/* ----------------------------------------------------------------------------
   Dark Mode Overrides (must be at end to override)
   ---------------------------------------------------------------------------- */

html[data-theme="dark"] body .active-filters {
  background: #2c2c2e !important;
  border: 1px solid #3a3a3c !important;
}

html[data-theme="dark"] body .filter-badge {
  background: #3a3a3c !important;
  border-color: #48484a !important;
  color: #f5f5f7 !important;
}

html[data-theme="dark"] body .filter-clear-all {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #f87171 !important;
}

html[data-theme="dark"] body .filter-clear-all:hover {
  background: rgba(239, 68, 68, 0.3) !important;
}

html[data-theme="dark"] body .badge.badge-slider,
html[data-theme="dark"] body a.badge.badge-slider,
html[data-theme="dark"] body .badge.badge-clickable.badge-slider {
  background: rgba(167, 139, 250, 0.2) !important;
  color: #a78bfa !important;
}

html[data-theme="dark"] body .badge.badge-warning-light,
html[data-theme="dark"] body a.badge.badge-warning-light,
html[data-theme="dark"] body .badge.badge-clickable.badge-warning-light {
  background: rgba(250, 204, 21, 0.2) !important;
  color: #facc15 !important;
}

html[data-theme="dark"] body .image-upload-area {
  background: #2c2c2e !important;
  border-color: #48484a !important;
}

html[data-theme="dark"] body .image-upload-area:hover {
  background: #3a3a3c !important;
  border-color: var(--admin-accent) !important;
}

html[data-theme="dark"] body .image-upload-placeholder {
  background: #2c2c2e !important;
  border-color: #48484a !important;
}

html[data-theme="dark"] body .image-upload-placeholder:hover {
  background: #3a3a3c !important;
  border-color: var(--admin-accent) !important;
}

/* Wizard Dark Mode */
html[data-theme="dark"] body .wizard-modal {
  background: #2c2c2e !important;
}

html[data-theme="dark"] body .wizard-progress {
  border-bottom-color: #3a3a3c !important;
}

html[data-theme="dark"] body .wizard-step-number {
  background: #3a3a3c !important;
  color: #98989d !important;
}

html[data-theme="dark"] body .wizard-step.active .wizard-step-number {
  background: rgba(10, 132, 255, 0.8) !important;
  color: white !important;
}

html[data-theme="dark"] body .wizard-step.completed .wizard-step-number {
  background: rgba(48, 209, 88, 0.7) !important;
  color: white !important;
}

html[data-theme="dark"] body .wizard-step-label {
  color: #98989d !important;
}

html[data-theme="dark"] body .wizard-step.active .wizard-step-label {
  color: #f5f5f7 !important;
}

html[data-theme="dark"] body .wizard-close {
  color: #98989d !important;
}

html[data-theme="dark"] body .wizard-close:hover {
  background: #3a3a3c !important;
  color: #f5f5f7 !important;
}

html[data-theme="dark"] body .wizard-content h2 {
  color: #f5f5f7 !important;
}

html[data-theme="dark"] body .wizard-subtitle {
  color: #98989d !important;
}

html[data-theme="dark"] body .wizard-content .form-label {
  color: #98989d !important;
}

html[data-theme="dark"] body .wizard-content .form-input,
html[data-theme="dark"] body .wizard-content .form-select {
  background: #1c1c1e !important;
  border-color: #3a3a3c !important;
  color: #f5f5f7 !important;
}

html[data-theme="dark"] body .wizard-content .form-input::placeholder {
  color: #636366 !important;
}

html[data-theme="dark"] body .wizard-content .form-input:focus,
html[data-theme="dark"] body .wizard-content .form-select:focus {
  border-color: #0a84ff !important;
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.2) !important;
}

html[data-theme="dark"] body .wizard-content .form-hint {
  color: #636366 !important;
}

html[data-theme="dark"] body .language-dropdown {
  background: #2c2c2e !important;
  border-color: #3a3a3c !important;
}

html[data-theme="dark"] body .language-dropdown-item:hover {
  background: #3a3a3c !important;
}

html[data-theme="dark"] body .language-dropdown-item .name {
  color: #f5f5f7 !important;
}

html[data-theme="dark"] body .language-selected {
  background: rgba(10, 132, 255, 0.15) !important;
  border-color: #0a84ff !important;
}

html[data-theme="dark"] body .language-selected .language-name {
  color: #f5f5f7 !important;
}

html[data-theme="dark"] body .popular-label {
  color: #636366 !important;
}

html[data-theme="dark"] body .language-quick {
  background: #3a3a3c !important;
  border-color: #48484a !important;
  color: #f5f5f7 !important;
}

html[data-theme="dark"] body .language-quick:hover {
  background: #48484a !important;
  border-color: #636366 !important;
}

html[data-theme="dark"] body .language-quick.active {
  background: rgba(10, 132, 255, 0.2) !important;
  border-color: #0a84ff !important;
  color: #0a84ff !important;
}

html[data-theme="dark"] body .wizard-nav {
  background: #2c2c2e !important;
}

html[data-theme="dark"] body .wizard-nav .btn-secondary {
  background: #3a3a3c !important;
  border-color: #48484a !important;
  color: #f5f5f7 !important;
}

html[data-theme="dark"] body .wizard-nav .btn-secondary:hover {
  background: #48484a !important;
}

/* User Search Dark Mode */
html[data-theme="dark"] body .user-search-dropdown {
  background: #2c2c2e !important;
  border-color: #3a3a3c !important;
}

html[data-theme="dark"] body .user-search-item:hover {
  background: #3a3a3c !important;
}

html[data-theme="dark"] body .user-search-item .user-name {
  color: #f5f5f7 !important;
}

html[data-theme="dark"] body .user-search-item .user-email {
  color: #98989d !important;
}

html[data-theme="dark"] body .user-search-empty {
  color: #636366 !important;
}

/* Feedback Messages Dark Mode */
html[data-theme="dark"] body .feedback-message {
  background: #2c2c2e !important;
  border-color: #3a3a3c !important;
}

html[data-theme="dark"] body .feedback-message-admin {
  background: rgba(10, 132, 255, 0.1) !important;
  border-color: rgba(10, 132, 255, 0.3) !important;
}

html[data-theme="dark"] body .feedback-message-private {
  background: rgba(245, 158, 11, 0.1) !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
}

html[data-theme="dark"] body .feedback-message-content {
  color: #f5f5f7 !important;
}

html[data-theme="dark"] body .feedback-message-system-content {
  background: #2c2c2e !important;
  color: #98989d !important;
}

html[data-theme="dark"] body .feedback-message-author {
  color: #f5f5f7 !important;
}

html[data-theme="dark"] body .feedback-message-author i {
  color: #98989d !important;
}

html[data-theme="dark"] body .feedback-message-time {
  color: #636366 !important;
}

html[data-theme="dark"] body .btn-icon-sm {
  color: #636366 !important;
}

html[data-theme="dark"] body .btn-icon-sm:hover {
  background: #3a3a3c !important;
  color: #f5f5f7 !important;
}

html[data-theme="dark"] body .feedback-message-form {
  border-top-color: #3a3a3c !important;
}

html[data-theme="dark"] body .message-input-wrapper {
  border-color: #3a3a3c !important;
  background: #1c1c1e !important;
}

html[data-theme="dark"] body .message-input-wrapper:focus-within {
  border-color: #0a84ff !important;
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.2) !important;
}

html[data-theme="dark"] body .message-input-toolbar {
  background: #2c2c2e !important;
  border-top-color: #3a3a3c !important;
}

html[data-theme="dark"] body .toggle-label {
  color: #98989d !important;
}

html[data-theme="dark"] body .toggle-label.active {
  color: #0a84ff !important;
}

html[data-theme="dark"] body .toggle-label.active .toggle-text i {
  color: #0a84ff !important;
}

html[data-theme="dark"] body .image-upload-label {
  color: #98989d !important;
}

html[data-theme="dark"] body .image-upload-label:hover {
  color: #0a84ff !important;
}

html[data-theme="dark"] body .image-preview-container {
  background: #2c2c2e !important;
}

html[data-theme="dark"] body .feedback-message-image img {
  border-color: #3a3a3c !important;
}

/* Feedback Meta Dark Mode */
html[data-theme="dark"] body .feedback-meta {
  border-top-color: #3a3a3c !important;
}

html[data-theme="dark"] body .feedback-meta-item {
  color: #98989d !important;
}

html[data-theme="dark"] body .feedback-meta-item i {
  color: #636366 !important;
}

html[data-theme="dark"] body .feedback-meta-inline {
  color: #98989d !important;
  border-bottom-color: #3a3a3c !important;
}

html[data-theme="dark"] body .feedback-meta-inline i {
  color: #636366 !important;
}

html[data-theme="dark"] body .feedback-header-row {
  border-bottom-color: #3a3a3c !important;
}

html[data-theme="dark"] body .feedback-browser-info {
  background: #2c2c2e !important;
  color: #98989d !important;
}

/* Pagination dark mode */
html[data-theme="dark"] body .pagination {
  background: #1c1c1e !important;
  border-color: #3a3a3c !important;
}

html[data-theme="dark"] body .pagination-info {
  color: #98989d !important;
}

html[data-theme="dark"] body .pagination-btn {
  background: #2c2c2e !important;
  border-color: #3a3a3c !important;
  color: #f5f5f7 !important;
}

html[data-theme="dark"] body .pagination-btn:hover:not(.disabled):not(.active) {
  background: #3a3a3c !important;
  border-color: #0a84ff !important;
  color: #0a84ff !important;
}

html[data-theme="dark"] body .pagination-btn.active {
  background: #0a84ff !important;
  border-color: #0a84ff !important;
  color: white !important;
}

html[data-theme="dark"] body .pagination-ellipsis {
  color: #636366 !important;
}

/* --- Welcome Modal (Dark) --- */
html[data-theme="dark"] body .welcome-modal h2 {
  color: var(--admin-text) !important;
}

html[data-theme="dark"] body .welcome-subtitle {
  color: var(--admin-text-muted) !important;
}

html[data-theme="dark"] body .welcome-step {
  background: #3a3a3c !important;
}

html[data-theme="dark"] body .welcome-step-content strong {
  color: var(--admin-text) !important;
}

html[data-theme="dark"] body .welcome-step-content span {
  color: var(--admin-text-muted) !important;
}

html[data-theme="dark"] body .welcome-preview-link {
  color: var(--admin-text-muted) !important;
}

html[data-theme="dark"] body .welcome-preview-link:hover {
  color: var(--admin-accent) !important;
}

/* --- Guest Welcome Modal (Dark) --- */
html[data-theme="dark"] body .guest-welcome-modal {
  background: var(--admin-content-bg) !important;
}

/* --- Preview Search (Dark) --- */
html[data-theme="dark"] body .preview-search-bar {
  background: #3a3a3c !important;
  border-color: #48484a !important;
}

/* --- Wizard Welcome Preview (Dark) --- */
html[data-theme="dark"] body .wizard-welcome-preview {
  background: #3a3a3c !important;
  border-color: #48484a !important;
}

html[data-theme="dark"] body .wizard-welcome-preview-content {
  background: var(--admin-content-bg) !important;
  border-color: #48484a !important;
}

/* --- Feedback Stat Closed (Dark) --- */
html[data-theme="dark"] body .feedback-stat-closed {
  background: rgba(152, 152, 157, 0.15) !important;
  color: var(--admin-text-muted) !important;
}

/* --- Toast (Dark) --- */
html[data-theme="dark"] body .toast {
  background: var(--admin-content-bg) !important;
  color: var(--admin-text) !important;
}

/* --- Node Items (Dark) --- */
html[data-theme="dark"] body .node-ghost {
  background: #48484a !important;
}

html[data-theme="dark"] body .node-info-tab {
  background: #3a3a3c !important;
}

/* --- Mobile Bottom Bar (Dark) --- */
html[data-theme="dark"] body .mobile-bottom-bar {
  background: var(--admin-content-bg) !important;
}

html[data-theme="dark"] body .mobile-edit-layout-btn {
  background: var(--admin-content-bg) !important;
}

/* --- List Filters (Dark) --- */
html[data-theme="dark"] body .list-filters {
  background: var(--admin-content-bg) !important;
}

/* --- Data Table (Dark) --- */
html[data-theme="dark"] body .data-table thead {
  background: #3a3a3c !important;
}

html[data-theme="dark"] body .data-table tbody tr:hover {
  background: #3a3a3c !important;
}

/* --- Unsaved Modal (Dark) --- */
html[data-theme="dark"] body .unsaved-modal {
  background: var(--admin-content-bg) !important;
}

/* --- Tag Modal (Dark) --- */
html[data-theme="dark"] body .tag-modal {
  background: var(--admin-content-bg) !important;
}

/* --- Feedback Dropdown (Dark) --- */
html[data-theme="dark"] body .feedback-dropdown-menu {
  background: var(--admin-content-bg) !important;
  border-color: var(--admin-border) !important;
}

/* --- Gradients (Dark) --- */
html[data-theme="dark"] body .auth-beta-notice {
  background: rgba(10, 132, 255, 0.1) !important;
  border-color: rgba(10, 132, 255, 0.3) !important;
}

html[data-theme="dark"] body .welcome-icon {
  background: linear-gradient(135deg, #30d158 0%, #28a745 100%) !important;
}

html[data-theme="dark"] body .feedback-info-banner {
  background: linear-gradient(135deg, #0a84ff 0%, #0066cc 100%) !important;
}


/* Avatar Upload */
/* User Profile Layout - Avatar left, fields right */
.user-profile-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.avatar-section {
  flex-shrink: 0;
  text-align: center;
}

.avatar-section .form-hint {
  display: block;
  margin-top: 8px;
  text-align: center;
}

.user-fields-section {
  flex: 1;
  min-width: 0;
}

@media (max-width: 768px) {
  .user-profile-layout {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  
  .avatar-section {
    width: 100%;
  }
  
  .user-fields-section {
    width: 100%;
  }
}

.avatar-upload-container {
  position: relative;
  display: inline-block;
}

.avatar-upload-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--admin-bg);
  border: 3px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s ease;
}

.avatar-upload-circle:hover {
  border-color: var(--admin-accent);
}

.avatar-upload-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-upload-circle > i {
  font-size: 40px;
  color: var(--admin-text-muted);
}

.avatar-upload-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: 50%;
}

.avatar-upload-overlay i {
  color: white;
  font-size: 24px;
}

.avatar-upload-circle:hover .avatar-upload-overlay {
  opacity: 1;
}

.avatar-remove-btn {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #dc2626;
  color: white;
  border: 2px solid var(--admin-content-bg, white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.2s ease, transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.avatar-remove-btn:hover {
  background: #b91c1c;
  transform: scale(1.1);
}

/* Avatar in header */
.admin-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 8px;
}

.admin-user-avatar-placeholder {
  font-size: 24px;
  margin-right: 8px;
  color: var(--admin-text-muted);
}

/* Avatar Toast Notification */
.avatar-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 20px;
  background: var(--admin-sidebar-bg, #333);
  color: var(--admin-text, white);
  border-radius: 8px;
  box-shadow: var(--admin-shadow-lg, 0 4px 12px rgba(0,0,0,0.3));
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.avatar-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.avatar-toast-success i {
  color: #22c55e;
}

.avatar-toast-error i {
  color: #ef4444;
}

@media (max-width: 480px) {
  .avatar-toast {
    left: 20px;
    right: 20px;
    bottom: 10px;
  }
}

/* ----------------------------------------------------------------------------
   Mobile Floating Action Button
   ---------------------------------------------------------------------------- */

.fab-mobile {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--admin-accent, #3b82f6);
  color: white;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  z-index: 100;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fab-mobile i {
  font-size: 20px;
}

.fab-mobile:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
}

@media (max-width: 768px) {
  .fab-mobile {
    display: flex;
  }
}

/* ----------------------------------------------------------------------------
   Generic Toast Notifications
   ---------------------------------------------------------------------------- */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--admin-content-bg);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  border-left: 4px solid #22c55e;
}

.toast-success i {
  color: #22c55e;
}

.toast-error {
  border-left: 4px solid #ef4444;
}

.toast-error i {
  color: #ef4444;
}

.toast-info {
  border-left: 4px solid #3b82f6;
}

.toast-info i {
  color: #3b82f6;
}

@media (max-width: 480px) {
  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
}

/* ==========================================================================
   Account Page & 2FA Styles
   ========================================================================== */

/* Password toggle */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.password-input-wrapper .form-input {
  flex: 1;
  padding-right: 44px;
}
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--admin-text-muted);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.password-toggle:hover {
  color: var(--admin-text);
}

/* Mobile bottom bar */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--admin-content-bg);
  padding: 12px 16px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 100;
}
.mobile-bottom-bar .btn-mobile-save {
  width: 100%;
  justify-content: center;
}

@media (max-width: 768px) {
  .mobile-bottom-bar {
    display: none;
  }
  .page-header-sticky .btn-hide-mobile {
    display: none;
  }
  .btn .btn-hide-mobile,
  .btn-hide-mobile {
    display: none;
  }
}

/* 2FA specific styles */
.qr-code-box {
  text-align: center;
  padding: 24px;
  background: var(--admin-bg);
  border-radius: 8px;
  margin: 16px 0;
}
.qr-code-box img { 
  max-width: 200px; 
}
.secret-code {
  display: block;
  background: var(--admin-bg);
  padding: 12px 16px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 14px;
  letter-spacing: 2px;
  text-align: center;
  margin: 12px 0;
}
.totp-input {
  max-width: 180px;
  text-align: center;
  font-size: 24px;
  letter-spacing: 4px;
}
.backup-codes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 16px 0;
}
.backup-codes-grid code {
  display: block;
  background: var(--admin-bg);
  padding: 10px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 14px;
  text-align: center;
}


/* Dashboard cards equal height */
.dashboard-cards .card {
  display: flex;
  flex-direction: column;
}
.dashboard-cards .card-body {
  flex: 1;
}
.dashboard-cards .empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Disabled card state (e.g., when impersonating) */
.card-disabled {
  opacity: 0.6;
  position: relative;
}
.card-disabled::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  cursor: not-allowed;
}
.card-disabled .btn,
.card-disabled input,
.card-disabled select,
.card-disabled textarea {
  pointer-events: none;
}

/* Wizard emergency grid */
.wizard-emergency-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.wizard-emergency-section h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: var(--admin-text);
}

@media (max-width: 768px) {
  .wizard-emergency-grid {
    grid-template-columns: 1fr;
  }
}
/* ============================================
   Membership & Locked Modules Styles
   ============================================ */

/* Locked module nav items */
.admin-nav-item-locked {
  opacity: 0.6;
  position: relative;
}
.admin-nav-item-locked:hover {
  opacity: 0.8;
}
.admin-nav-item-locked .nav-lock-icon {
  font-size: 10px;
  margin-left: auto;
  color: var(--admin-text-muted);
}

/* Read-only module nav items (from previous plan, view-only) */
.admin-nav-item-readonly {
  opacity: 0.7;
}
.admin-nav-item-readonly:hover {
  opacity: 0.85;
}
.admin-nav-item-readonly .nav-readonly-icon {
  font-size: 10px;
  margin-left: auto;
  color: var(--admin-text-muted);
  flex-shrink: 0;
}

/* Discover more section */
.admin-nav-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--admin-text-muted);
  padding: 12px 16px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-nav-section-label i {
  color: var(--admin-warning);
}

/* Upgrade nav item */
.admin-nav-item-upgrade {
  color: var(--admin-primary) !important;
  font-weight: 500;
}
.admin-nav-item-upgrade:hover {
  background: var(--admin-info-bg) !important;
}

/* Alert styles */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-success {
  background: var(--admin-success-bg);
  color: var(--admin-success);
}
.alert-danger {
  background: var(--admin-danger-bg);
  color: var(--admin-danger);
}
.alert-warning {
  background: var(--admin-warning-bg);
  color: var(--admin-warning);
}
.alert-info {
  background: var(--admin-info-bg);
  color: var(--admin-info);
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  top: 76px;
  right: 20px;
  padding: 16px 20px;
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 400px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  z-index: 10001;
  animation: toastSlideIn 0.3s ease;
}

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

.toast-notification.success {
  background: var(--color-success-50, #ecfdf5);
  border: 1px solid var(--admin-success);
  color: var(--admin-success);
}

.toast-notification.error {
  background: var(--color-error-50);
  border: 1px solid var(--admin-danger);
  color: var(--admin-danger);
}

.toast-notification.warning {
  background: var(--color-warning-50);
  border: 1px solid var(--admin-warning);
  color: var(--admin-warning);
}

.toast-notification i {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.toast-notification.success i { color: var(--admin-success); }
.toast-notification.error i { color: var(--admin-danger); }
.toast-notification.warning i { color: var(--admin-warning); }

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}

.toast-message {
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.9;
}

.toast-close {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.5;
  cursor: pointer;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.toast-close:hover {
  opacity: 1;
}

/* ============================================
   Cookie Consent Banner
   ============================================ */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: var(--admin-content-bg);
  border-top: 1px solid var(--admin-border);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
  padding: 16px 24px;
  animation: slideUpCookie 0.3s ease-out;
}

@keyframes slideUpCookie {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.cookie-consent-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cookie-consent-text {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--admin-text);
  line-height: 1.5;
}

.cookie-consent-text > i {
  font-size: 20px;
  color: var(--admin-accent);
  margin-top: 2px;
  flex-shrink: 0;
}

.cookie-consent-text strong {
  display: block;
  margin-bottom: 2px;
}

.cookie-consent-text p {
  margin: 0;
  color: var(--admin-text-secondary);
  font-size: 13px;
}

.cookie-consent-text a {
  color: var(--admin-accent);
  text-decoration: none;
}

.cookie-consent-text a:hover {
  text-decoration: underline;
}

.cookie-consent-actions {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .cookie-consent-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-consent-actions {
    display: flex;
    justify-content: flex-end;
  }
}

/* ============================================
   Search Result Icon Colors
   ============================================ */
.search-icon-reservation { background: rgba(255, 90, 95, 0.12); color: var(--search-icon-reservation); }
.search-icon-guidebook { background: rgba(139, 92, 246, 0.12); color: var(--search-icon-guidebook); }
.search-icon-page { background: rgba(168, 85, 247, 0.12); color: var(--search-icon-page); }
.search-icon-listing { background: rgba(14, 165, 233, 0.12); color: var(--search-icon-listing); }
.search-icon-place { background: rgba(249, 115, 22, 0.12); color: var(--search-icon-place); }
.search-icon-template { background: rgba(16, 185, 129, 0.12); color: var(--search-icon-template); }
.search-icon-automation { background: rgba(99, 102, 241, 0.12); color: var(--search-icon-automation); }
.search-icon-rate { background: rgba(234, 179, 8, 0.12); color: var(--search-icon-rate); }
.search-icon-message-in { background: rgba(14, 165, 233, 0.12); color: var(--search-icon-message-in); }
.search-icon-message-out { background: rgba(16, 185, 129, 0.12); color: var(--search-icon-message-out); }
.search-icon-task { background: rgba(245, 158, 11, 0.12); color: var(--search-icon-task); }
.search-icon-issue { background: rgba(239, 68, 68, 0.12); color: var(--search-icon-issue); }
.search-icon-product { background: rgba(139, 92, 246, 0.12); color: var(--search-icon-product); }
.search-icon-review { background: rgba(249, 115, 22, 0.12); color: var(--search-icon-review); }
.search-status-active { color: var(--admin-success); }
.search-status-urgent { color: var(--admin-danger, #ef4444); }


/* ============================================
   Topbar Tasks Dropdown
   ============================================ */

.topbar-tasks-wrapper {
  position: relative;
}

.topbar-tasks-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  color: var(--admin-text-muted);
  cursor: pointer;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.15s ease;
}

.topbar-tasks-btn:hover {
  background: var(--admin-hover-bg);
  color: var(--admin-text);
}

.topbar-tasks-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  background: var(--admin-danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

.topbar-tasks-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-height: 520px;
  background: var(--admin-content-bg);
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  box-shadow: var(--admin-shadow-lg);
  z-index: 200;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.topbar-tasks-dropdown.show {
  display: flex;
}

.topbar-tasks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--admin-border);
}

.topbar-tasks-header h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--admin-text);
}

.topbar-tasks-header-actions a {
  font-size: 12px;
  color: var(--admin-accent);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.topbar-tasks-header-actions a:hover {
  background: var(--admin-info-bg);
}

.topbar-tasks-body {
  overflow-y: auto;
  flex: 1;
  max-height: 400px;
}

.topbar-tasks-body .topbar-task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--admin-border);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.topbar-tasks-body .topbar-task-item:last-child {
  border-bottom: none;
}

.topbar-tasks-body .topbar-task-item:hover {
  background: var(--admin-subtle-bg);
}

.topbar-task-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.topbar-task-icon-high {
  background: var(--admin-danger-bg);
  color: var(--admin-danger);
}

.topbar-task-icon-medium {
  background: var(--admin-warning-bg);
  color: var(--admin-warning);
}

.topbar-task-icon-low {
  background: var(--admin-subtle-bg);
  color: var(--admin-text-muted);
}

.topbar-task-content {
  flex: 1;
  min-width: 0;
}

.topbar-task-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--admin-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-task-subtitle {
  font-size: 11px;
  color: var(--admin-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-task-cta {
  font-size: 11px;
  font-weight: 600;
  color: var(--admin-accent);
  flex-shrink: 0;
}

.topbar-tasks-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--admin-border);
  text-align: center;
}

.topbar-tasks-footer a {
  font-size: 13px;
  font-weight: 500;
  color: var(--admin-accent);
  text-decoration: none;
}

.topbar-tasks-footer a:hover {
  text-decoration: underline;
}

.topbar-tasks-quick-add {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--admin-border);
}

.topbar-tasks-quick-add input {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--admin-bg);
  color: var(--admin-text);
  outline: none;
}

.topbar-tasks-quick-add input:focus {
  border-color: var(--admin-accent);
}

.topbar-tasks-quick-add button {
  padding: 7px 12px;
  border: none;
  border-radius: 8px;
  background: var(--admin-accent);
  color: white;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.topbar-tasks-quick-add button:hover {
  background: var(--admin-accent-hover);
}

.topbar-tasks-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--admin-text-muted);
  font-size: 13px;
}

.topbar-tasks-empty i {
  font-size: 28px;
  color: var(--admin-success);
  display: block;
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .topbar-tasks-dropdown {
    position: fixed;
    top: 60px;
    left: 8px;
    right: 8px;
    width: auto;
    max-height: calc(100vh - 80px);
    border-radius: 14px;
  }
}
.search-status-paused { color: var(--admin-text-muted); }

/* ----------------------------------------------------------------------------
   Task Action Modal (global — used on tasks page and topbar dropdown)
   ---------------------------------------------------------------------------- */

.task-action-modal {
  width: 380px;
  padding: 24px;
  border-radius: 14px;
  transition: width 0.25s ease;
}

.task-action-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.task-action-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--admin-text);
  margin: 0;
  line-height: 1.3;
}

.task-action-header p {
  font-size: 13px;
  color: var(--admin-text-muted);
  margin: 4px 0 0;
  line-height: 1.4;
}

.task-action-header p:empty {
  display: none;
}

/* Primary action: full-width button */
.task-action-primary .btn {
  width: 100%;
  justify-content: center;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
}

.btn-success {
  background: var(--admin-success);
  color: white;
  border: 1px solid var(--admin-success);
}

.btn-success:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Secondary actions: subtle text links */
.task-action-secondary {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  font-size: 13px;
}

.task-action-secondary a {
  color: var(--admin-text-muted);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.task-action-secondary a:hover {
  color: var(--admin-text);
  background: var(--admin-hover-bg);
}

.task-action-secondary .action-link-danger:hover {
  color: var(--admin-danger);
  background: var(--admin-danger-bg);
}

.task-action-secondary .action-separator {
  color: var(--admin-border);
  font-size: 11px;
  user-select: none;
}

/* Email preview inside action modal */
.task-action-modal.has-email-preview {
  width: min(90vw, 760px);
}

.task-email-preview {
  margin-bottom: 16px;
  border-radius: 8px;
  border: 1px solid var(--admin-border);
  overflow: hidden;
}

.email-preview-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px;
  font-size: 13px;
  color: var(--admin-text-muted);
}

.email-preview-frame {
  width: 100%;
  height: 480px;
  border: none;
  display: block;
}

/* Booking context block (read-only info inside task modals) */
.task-booking-context {
  background: var(--admin-subtle-bg);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.task-booking-guest {
  font-size: 14px;
  font-weight: 600;
  color: var(--admin-text);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.task-booking-guest i {
  font-size: 12px;
  color: var(--admin-text-muted);
}

.task-booking-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--admin-text-muted);
}

.task-booking-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.task-booking-meta i {
  font-size: 11px;
}

/* Task inline form (missing_info modal) */
.task-inline-form {
  margin-bottom: 16px;
}

.task-inline-form .form-group {
  margin-bottom: 12px;
}

.task-inline-form .form-group:last-child {
  margin-bottom: 0;
}

.task-inline-form .form-label {
  font-size: 13px;
  margin-bottom: 5px;
}

.task-inline-form .form-input {
  padding: 9px 12px;
  font-size: 14px;
}

/* Translation details list (missing_translation modal) */
.task-translation-list {
  margin-bottom: 16px;
}

.task-translation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  color: var(--admin-text);
}

.task-translation-item:hover {
  background: var(--admin-hover-bg);
}

.task-translation-item-title {
  font-size: 14px;
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-translation-langs {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.task-lang-pill {
  display: inline-flex;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--color-warning-50);
  color: var(--color-warning-700);
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.task-translation-more {
  text-align: center;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--admin-text-muted);
}

/* Housekeeping issue details (task modal) */
.task-issue-details {
  margin-bottom: 16px;
}

.task-issue-description {
  font-size: 14px;
  line-height: 1.5;
  color: var(--admin-text);
  margin-bottom: 12px;
  white-space: pre-line;
}

.task-issue-photos {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
}

.task-issue-photo {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
}

.task-issue-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.task-issue-comments {
  border-top: 1px solid var(--admin-border);
  padding-top: 10px;
}

.task-issue-comments-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}

.task-issue-comment {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.task-issue-comment-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--admin-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.task-issue-comment-body {
  font-size: 13px;
  line-height: 1.4;
  min-width: 0;
}

.task-issue-comment-author {
  font-weight: 600;
  color: var(--admin-text);
}

.task-issue-comment-text {
  color: var(--admin-text-secondary);
}

.task-issue-comment-image {
  margin: 4px 0 8px 32px;
}

.task-issue-comment-image img {
  max-width: 120px;
  max-height: 80px;
  border-radius: 6px;
  object-fit: cover;
}

/* Flagged message preview in task modal */
.task-flagged-messages {
  padding: 0 24px 20px;
}

.task-flagged-message {
  padding: 10px 12px;
  background: var(--admin-bg-secondary, #f9fafb);
  border-radius: 8px;
  margin-bottom: 8px;
}

.task-flagged-message:last-child {
  margin-bottom: 0;
}

.task-flagged-message-meta {
  font-size: 12px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-flagged-message-body {
  font-size: 13px;
  line-height: 1.5;
  color: var(--admin-text);
  white-space: pre-line;
  word-break: break-word;
}

html[data-theme="dark"] .task-flagged-message {
  background: var(--admin-hover-bg);
}

/* Dark mode */
html[data-theme="dark"] .task-booking-context {
  background: var(--admin-hover-bg);
}

/* Responsive: task action modal */
@media (max-width: 768px) {
  .task-action-modal,
  .task-action-modal.has-email-preview {
    width: calc(100vw - 32px);
    max-width: 380px;
  }

  .task-email-preview {
    display: none !important;
  }
}

/* ==========================================================================
   AI TRANSLATION
   ========================================================================== */

.ai-translate-bar {
  display: flex;
  align-items: center;
  background: var(--admin-info-bg, linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%));
  border-left: 4px solid var(--admin-accent);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.ai-translate-bar-content {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.ai-translate-icon {
  color: var(--admin-accent);
  font-size: 16px;
  flex-shrink: 0;
}

.ai-translate-label {
  font-size: 13px;
  color: var(--admin-text-muted);
  flex: 1;
}

.btn-ai-translate {
  background: var(--admin-accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.btn-ai-translate:hover {
  opacity: 0.85;
}

.btn-ai-translate:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-ai-translate-all {
  background: transparent;
  color: var(--admin-accent);
  border: 1.5px solid var(--admin-accent);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  margin-left: 4px;
}

.btn-ai-translate-all:hover {
  background: var(--admin-accent);
  color: #fff;
}

.btn-ai-translate-all:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Translated state */
.ai-translate-bar--translated {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-left-color: var(--admin-success, #22c55e);
}

.ai-translate-bar--translated .ai-translate-icon {
  color: var(--admin-success, #22c55e);
}

.ai-translate-bar--translated .ai-translate-icon::before {
  content: "\f00c";
}

/* Stale state */
.ai-translate-bar--stale {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-left-color: var(--admin-warning, #f59e0b);
}

.ai-translate-bar--stale .ai-translate-icon {
  color: var(--admin-warning, #f59e0b);
}

.ai-translate-bar--stale .ai-translate-icon::before {
  content: "\f071";
}

/* New language popup */
.ai-translate-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.15s ease;
}

.ai-translate-popup {
  background: var(--admin-card-bg, #fff);
  border-radius: 12px;
  padding: 24px;
  max-width: 380px;
  width: calc(100vw - 32px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.ai-translate-popup h3 {
  margin: 0 0 8px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--admin-text);
}

.ai-translate-popup h3 i {
  color: var(--admin-accent);
}

.ai-translate-popup p {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--admin-text-muted);
  line-height: 1.5;
}

.ai-translate-popup-actions {
  display: flex;
  gap: 8px;
}

.ai-translate-popup-actions .btn {
  flex: 1;
  justify-content: center;
}

/* Dark mode */
html[data-theme="dark"] .ai-translate-bar {
  background: rgba(59, 130, 246, 0.1);
  border-left-color: var(--admin-accent);
}

html[data-theme="dark"] .ai-translate-bar--translated {
  background: rgba(34, 197, 94, 0.1);
}

html[data-theme="dark"] .ai-translate-bar--stale {
  background: rgba(245, 158, 11, 0.1);
}

html[data-theme="dark"] .ai-translate-popup {
  background: var(--admin-card-bg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* Mobile */
@media (max-width: 768px) {
  .ai-translate-bar-content {
    flex-wrap: wrap;
  }

  .btn-ai-translate {
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
  }

  .ai-translate-popup-actions {
    flex-direction: column;
  }
}

/* ==========================================================================
   ACTIVITY TIMELINE
   ========================================================================== */

.activity-timeline {
  display: flex;
  flex-direction: column;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--admin-border);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.activity-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.activity-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--admin-text);
}

.activity-meta {
  font-size: 12px;
  color: var(--admin-text-muted);
}

.load-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: 1px dashed var(--admin-border);
  border-radius: 8px;
  color: var(--admin-text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.load-more-btn:hover {
  background: var(--admin-bg);
  color: var(--admin-text);
  border-color: var(--admin-text-muted);
}

.load-more-btn i {
  font-size: 11px;
}
/* ============================================================================
   SETUP WIZARD — Full-page onboarding wizard (split-screen layout)
   ============================================================================ */

.setup-wizard-body {
  min-height: 100vh;
  background: var(--admin-content-bg);
  display: flex;
  flex-direction: column;
}

/* Header */
.setup-wizard-header {
  background: var(--admin-content-bg);
  border-bottom: 1px solid var(--admin-border);
  padding: 0 32px;
  height: 56px;
  flex-shrink: 0;
}
.setup-wizard-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.setup-wizard-logo {
  display: flex;
  align-items: baseline;
  font-weight: 600;
  font-size: 18px;
  color: var(--admin-text);
  text-decoration: none;
}
.setup-wizard-logo img { border-radius: 6px; }
.setup-wizard-logo-img { height: 32px; width: auto; max-width: 160px; object-fit: contain; }
.setup-wizard-skip-all {
  background: none;
  border: none;
  color: var(--admin-text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.15s;
}
.setup-wizard-skip-all:hover {
  color: var(--admin-text);
  background: var(--admin-subtle-bg);
}

/* Progress bar — thin Airbnb-style */
.setup-wizard-progress {
  height: 3px;
  background: var(--admin-border);
  flex-shrink: 0;
}
.setup-wizard-progress-fill {
  height: 100%;
  background: var(--admin-text);
  width: 0;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 2px 2px 0;
}

/* Main content area */
.setup-wizard-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Step panels — split-screen grid */
.setup-wizard-panel { display: none; }
.setup-wizard-panel.active {
  display: grid;
  grid-template-columns: 5fr 7fr;
  flex: 1;
  min-height: 0;
  animation: swFadeIn 0.3s ease;
}
@keyframes swFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* Done panel — centered single column */
.setup-wizard-panel[data-panel="done"].active {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 48px 24px;
  overflow-y: auto;
}

/* Left panel — step info + tips */
.setup-wizard-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 64px;
  background: var(--admin-content-bg);
  overflow-y: auto;
  max-width: 560px;
  margin-left: auto;
}
.setup-wizard-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--admin-accent-bg, rgba(0, 113, 227, 0.08));
  color: var(--admin-accent);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
  width: fit-content;
}
html[data-theme="dark"] .setup-wizard-step-badge {
  background: rgba(100, 180, 255, 0.12);
}
.setup-wizard-left h1 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
  color: var(--admin-text);
}
.setup-wizard-left > p {
  font-size: 15px;
  color: var(--admin-text-muted);
  line-height: 1.6;
  margin: 0 0 28px;
  max-width: 380px;
}

/* Tips */
.setup-wizard-tips {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.setup-wizard-tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.setup-wizard-tip-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--admin-subtle-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--admin-accent);
  font-size: 13px;
}
.setup-wizard-tip-text {
  font-size: 13px;
  color: var(--admin-text-muted);
  line-height: 1.5;
}
.setup-wizard-tip-text strong {
  color: var(--admin-text);
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
}

/* Right panel — form area */
.setup-wizard-right {
  background: var(--admin-bg);
  padding: 40px 48px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

/* Form card */
.setup-wizard-form-card {
  width: 520px;
  min-height: 280px;
  background: var(--admin-content-bg);
  border-radius: var(--admin-radius);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);
  border: 1px solid var(--admin-border);
  overflow: hidden;
}

/* Form intro text */
.setup-wizard-form-intro {
  margin: 0;
  padding: 20px 28px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--admin-text-secondary);
}

/* Fields */
.setup-wizard-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
}
.setup-wizard-fields .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.setup-wizard-fields .form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--admin-text);
}
.setup-wizard-fields .form-label .required { color: #ef4444; }
.setup-wizard-fields .form-input,
.setup-wizard-fields .form-select,
.setup-wizard-fields .form-textarea {
  padding: 10px 14px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--admin-content-bg);
  color: var(--admin-text);
  transition: border-color 0.15s;
  font-family: inherit;
  width: 100%;
}
.setup-wizard-fields .form-input:focus,
.setup-wizard-fields .form-select:focus,
.setup-wizard-fields .form-textarea:focus {
  border-color: var(--admin-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}
.setup-wizard-fields .form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.setup-wizard-fields .form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

/* Property type visual selector */
.setup-wizard-type-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.type-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--admin-border);
  border-radius: 20px;
  background: var(--admin-content-bg);
  color: var(--admin-text-muted);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.type-option i { font-size: 12px; }
.type-option:hover {
  border-color: var(--admin-text-muted);
  color: var(--admin-text);
}
.type-option.active {
  border-color: var(--admin-accent);
  color: var(--admin-accent);
  background: rgba(0, 113, 227, 0.06);
}
html[data-theme="dark"] .type-option.active {
  background: rgba(100, 180, 255, 0.1);
}
.type-option-more {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  justify-content: center;
}
.setup-wizard-type-grid.expanded .type-option-more {
  display: flex;
}
.setup-wizard-type-grid.expanded .type-option-toggle {
  display: none;
}
.type-option-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px dashed var(--admin-border);
  border-radius: 20px;
  background: transparent;
  color: var(--admin-text-muted);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}
.type-option-toggle:hover {
  border-color: var(--admin-text-muted);
  color: var(--admin-text);
}

/* Extra fields — hidden by default, shown via global toggle */
.setup-wizard-extra {
  display: none;
  flex-direction: column;
  gap: 16px;
}
.setup-wizard-body.show-extra .setup-wizard-extra {
  display: flex;
}

/* "Show all options" toggle at bottom of form card */
.setup-wizard-extra-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  border-top: 1px solid var(--admin-border);
  width: 100%;
  padding: 14px 28px;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--admin-text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s;
}
.setup-wizard-extra-toggle:hover { color: var(--admin-accent); }
.setup-wizard-extra-toggle i { font-size: 12px; }
.setup-wizard-extra-toggle .extra-hide { display: none; }
.setup-wizard-body.show-extra .setup-wizard-extra-toggle .extra-show { display: none; }
.setup-wizard-body.show-extra .setup-wizard-extra-toggle .extra-hide { display: inline; }
.setup-wizard-body.show-extra .setup-wizard-extra-toggle {
  color: var(--admin-accent);
}

/* Info block */
/* Inline skip button under form card */
.setup-wizard-skip-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 0;
  border: none;
  background: none;
  color: var(--admin-text-muted);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s;
}
.setup-wizard-skip-inline:hover {
  color: var(--admin-text);
}
.setup-wizard-skip-inline i {
  font-size: 11px;
}

.setup-wizard-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: var(--color-info-50, #eff6ff);
  border-radius: 8px;
  font-size: 13px;
  color: var(--color-info-800, #1e40af);
  line-height: 1.5;
  margin-top: 8px;
}
.setup-wizard-info i { margin-top: 2px; flex-shrink: 0; }
html[data-theme="dark"] .setup-wizard-info {
  background: rgba(59,130,246,0.1);
  color: var(--color-info-300, #93c5fd);
}

/* Photos */
.setup-wizard-photo-upload {
  border: 2px dashed var(--admin-border);
  border-radius: 12px;
  transition: border-color 0.2s;
  overflow: hidden;
}
.setup-wizard-photo-upload.dragover {
  border-color: var(--admin-accent);
  background: rgba(0, 113, 227, 0.05);
}
.photo-upload-placeholder {
  text-align: center;
  padding: 48px 24px;
  cursor: pointer;
}
.photo-upload-placeholder i {
  font-size: 40px;
  color: var(--admin-text-muted);
  margin-bottom: 12px;
  display: block;
}
.photo-upload-placeholder p {
  font-size: 15px;
  font-weight: 500;
  color: var(--admin-text);
  margin: 0 0 4px;
}
.photo-upload-placeholder span { font-size: 12px; color: var(--admin-text-muted); }
.photo-upload-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  padding: 12px;
}
.photo-preview-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
}
.photo-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview-item.cover { grid-column: span 2; grid-row: span 2; }
.photo-cover-badge {
  position: absolute;
  top: 6px; left: 6px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.photo-remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.5);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  opacity: 0;
  transition: opacity 0.15s;
}
.photo-preview-item:hover .photo-remove { opacity: 1; }
.photo-preview-add {
  aspect-ratio: 4/3;
  border-radius: 8px;
  border: 2px dashed var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  color: var(--admin-text-muted);
  transition: all 0.15s;
}
.photo-preview-add:hover {
  border-color: var(--admin-accent);
  color: var(--admin-accent);
}

/* Calendar sync chooser */
.setup-wizard-sync-chooser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.sync-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 2px solid var(--admin-border);
  border-radius: 12px;
  background: var(--admin-content-bg);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}
.sync-option:hover:not(.disabled) { border-color: var(--admin-accent); }
.sync-option.active {
  border-color: var(--admin-accent);
  background: rgba(0, 113, 227, 0.05);
}
.sync-option.disabled { opacity: 0.6; cursor: not-allowed; }
.sync-option-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--admin-subtle-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--admin-accent);
  flex-shrink: 0;
}
.sync-option-content { flex: 1; min-width: 0; }
.sync-option-content strong {
  font-size: 14px;
  color: var(--admin-text);
  display: block;
  margin-bottom: 4px;
}
.sync-option-content p {
  font-size: 12px;
  color: var(--admin-text-muted);
  margin: 0;
  line-height: 1.4;
}
.sync-option-check {
  color: var(--admin-accent);
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.15s;
}
.sync-option.active .sync-option-check { opacity: 1; }
.sync-option-lock { color: var(--admin-text-muted); font-size: 14px; }
.badge-plan {
  display: inline-block;
  background: var(--admin-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  vertical-align: middle;
}
.form-hint-details { margin-top: 4px; }
.form-hint-details summary {
  font-size: 12px;
  color: var(--admin-text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.form-hint-details p {
  font-size: 12px;
  color: var(--admin-text-muted);
  margin: 6px 0 0;
  padding-left: 12px;
  line-height: 1.5;
}

/* Rate plan summary (pricing step) */
.sw-rate-plan-summary {
  background: var(--admin-subtle-bg);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 4px;
  font-size: 13px;
}
.sw-rp-seasons { display: flex; flex-direction: column; gap: 6px; }
.sw-rp-season-row { display: flex; align-items: center; gap: 8px; }
.sw-rp-season-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sw-rp-season-name { font-weight: 500; color: var(--admin-text); }
.sw-rp-season-price { color: var(--admin-text-secondary); margin-left: auto; }
.sw-rp-season-min { font-size: 11px; color: var(--admin-text-muted); }
.sw-rp-policy {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--admin-border);
  font-size: 12px;
  color: var(--admin-text-muted);
}
.sw-rp-policy i { margin-right: 4px; }

/* Places */
.setup-wizard-suggestions { margin-bottom: 20px; }
.setup-wizard-suggestions-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--admin-text-muted);
  margin: 0 0 10px;
}
.setup-wizard-suggestions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.suggestion-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-content-bg);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--admin-text);
  text-align: left;
  transition: all 0.15s;
}
.suggestion-card i:first-child {
  font-size: 14px;
  color: var(--admin-accent);
  flex-shrink: 0;
}
.suggestion-card span:first-of-type { flex: 1; min-width: 0; }
.suggestion-plus { color: var(--admin-text-muted); font-size: 11px; }
.suggestion-card:hover {
  border-color: var(--admin-accent);
  background: rgba(0, 113, 227, 0.05);
}
.suggestion-card.used { opacity: 0.4; pointer-events: none; }
.setup-wizard-place-form {
  padding: 16px;
  background: var(--admin-subtle-bg);
  border-radius: 10px;
  margin-bottom: 16px;
}
.setup-wizard-place-form h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--admin-text);
  margin: 0 0 12px;
}
.setup-wizard-places-list h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--admin-text);
  margin: 0 0 12px;
}
.setup-wizard-places-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.place-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--admin-content-bg);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
}
.place-card-icon { font-size: 18px; flex-shrink: 0; }
.place-card-info { flex: 1; min-width: 0; }
.place-card-info strong {
  font-size: 13px;
  display: block;
  color: var(--admin-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.place-card-info small { font-size: 11px; color: var(--admin-text-muted); }
.place-card-remove {
  background: none;
  border: none;
  color: var(--admin-text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 12px;
  border-radius: 4px;
}
.place-card-remove:hover { color: #ef4444; background: rgba(239,68,68,0.1); }

/* Done step */
.setup-wizard-done-container {
  max-width: 600px;
  width: 100%;
}
.setup-wizard-done-header { text-align: center; }
.setup-wizard-done-icon { font-size: 56px; color: #10b981; margin-bottom: 16px; }
.setup-wizard-summary { margin: 24px 0; }
.summary-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--admin-border);
}
.summary-item:last-of-type { border-bottom: none; }
.summary-done i { color: #10b981; }
.summary-skip i { color: var(--admin-text-muted); }
.summary-skip span { color: var(--admin-text-muted); }
.setup-wizard-quickstart h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--admin-text);
  margin: 0 0 16px;
}
.setup-wizard-quickstart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.quickstart-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--admin-content-bg);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  color: var(--admin-text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}
.quickstart-card i { font-size: 18px; color: var(--admin-accent); }
.quickstart-card:hover {
  border-color: var(--admin-accent);
  transform: translateY(-1px);
  box-shadow: var(--admin-shadow-sm);
}
.setup-wizard-trial-banner {
  margin-top: 24px;
  padding: 14px 18px;
  background: var(--color-info-50, #eff6ff);
  border-radius: 8px;
  font-size: 13px;
  color: var(--color-info-800, #1e40af);
  text-align: center;
  line-height: 1.5;
}
.setup-wizard-trial-banner a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  margin-left: 8px;
}
html[data-theme="dark"] .setup-wizard-trial-banner {
  background: rgba(59,130,246,0.1);
  color: var(--color-info-300, #93c5fd);
}

/* Footer */
.setup-wizard-footer {
  background: var(--admin-content-bg);
  border-top: 1px solid var(--admin-border);
  padding: 16px 32px;
  flex-shrink: 0;
}
.setup-wizard-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.setup-wizard-footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.setup-wizard-btn-skip {
  background: none;
  border: none;
  color: var(--admin-text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 8px 12px;
  font-family: inherit;
}
.setup-wizard-btn-skip:hover { color: var(--admin-text); text-decoration: underline; }

/* Toast */
.setup-wizard-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 200;
  animation: swToastIn 0.3s ease;
  box-shadow: var(--admin-shadow-lg);
}
.setup-wizard-toast.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.setup-wizard-toast.warning { background: #fefce8; color: #92400e; border: 1px solid #fde68a; }
.setup-wizard-toast.info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
html[data-theme="dark"] .setup-wizard-toast.error { background: rgba(239,68,68,0.15); color: #fca5a5; border-color: rgba(239,68,68,0.3); }
html[data-theme="dark"] .setup-wizard-toast.warning { background: rgba(234,179,8,0.15); color: #fde68a; border-color: rgba(234,179,8,0.3); }
html[data-theme="dark"] .setup-wizard-toast.info { background: rgba(59,130,246,0.15); color: #93c5fd; border-color: rgba(59,130,246,0.3); }
.setup-wizard-toast button { background: none; border: none; color: inherit; font-size: 18px; cursor: pointer; opacity: 0.6; }
@keyframes swToastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---- Setup Wizard Responsive ---- */
@media (max-width: 900px) {
  .setup-wizard-panel.active {
    grid-template-columns: 1fr;
    height: auto;
    overflow-y: auto;
  }
  .setup-wizard-main { overflow: auto; }
  .setup-wizard-left {
    padding: 24px 24px 0;
    justify-content: flex-start;
  }
  .setup-wizard-left h1 { font-size: 22px; }
  .setup-wizard-tips { display: none; }
  .setup-wizard-left > p { margin-bottom: 16px; }
  .setup-wizard-right { padding: 24px; }
  .setup-wizard-form-card { width: 100%; min-height: 0; }
  .setup-wizard-fields { padding: 20px; }
  .setup-wizard-extra-toggle { padding: 12px 20px; }
}
@media (max-width: 768px) {
  .setup-wizard-header { padding: 0 16px; }
  .setup-wizard-footer { padding: 16px; }
  .setup-wizard-left { padding: 20px 16px 0; }
  .setup-wizard-right { padding: 16px; }
  .setup-wizard-fields .form-grid-2 { grid-template-columns: 1fr; }
  .setup-wizard-sync-chooser { grid-template-columns: 1fr; }
  .setup-wizard-suggestions-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .setup-wizard-quickstart-grid { grid-template-columns: 1fr; }
  .photo-upload-preview { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .photo-preview-item.cover { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 480px) {
  .setup-wizard-fields .form-grid-3 { grid-template-columns: 1fr; }
  .setup-wizard-places-grid { grid-template-columns: 1fr; }
}
