/* ============================================
   DARK MODE REDESIGN - MenuList Admin Panel
   Beige-Brown Accents on Dark Background
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  /* Dark Mode Colors */
  --bg-primary: #0f0f0f;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #242424;
  --bg-hover: #2a2a2a;

  /* Beige-Brown Accents */
  --accent-primary: #d4a574;
  --accent-secondary: #c49464;
  --accent-dark: #b38353;
  --accent-light: #e8d5c3;
  --accent-lighter: #f5ebe0;

  /* Text Colors */
  --text-primary: #e8e8e8;
  --text-secondary: #b8b8b8;
  --text-muted: #888888;
  --text-dark: #0f0f0f;

  /* Border & Dividers */
  --border-color: #333333;
  --border-light: #404040;

  /* Status Colors */
  --success: #4caf50;
  --warning: #ff9800;
  --error: #f44336;
  --info: #2196f3;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Layout */
  --sidebar-width: 260px;
  --sidebar-collapsed: 70px;
  --header-height: 70px;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ============================================
   LOGIN PAGE
   ============================================ */

.login-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.login-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 50%, #0f0f0f 100%);
  z-index: 0;
}

.login-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 50%, rgba(212, 165, 116, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(196, 148, 100, 0.1) 0%, transparent 50%);
  animation: gradient-shift 15s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.login-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--accent-primary);
  border-radius: 50%;
  opacity: 0.3;
  animation: float 20s infinite ease-in-out;
}

.particle:nth-child(1) { left: 20%; top: 20%; animation-delay: 0s; animation-duration: 15s; }
.particle:nth-child(2) { left: 50%; top: 40%; animation-delay: 2s; animation-duration: 18s; }
.particle:nth-child(3) { left: 70%; top: 60%; animation-delay: 4s; animation-duration: 22s; }
.particle:nth-child(4) { left: 30%; top: 80%; animation-delay: 6s; animation-duration: 20s; }
.particle:nth-child(5) { left: 80%; top: 30%; animation-delay: 8s; animation-duration: 16s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(30px, -30px); }
  50% { transform: translate(-20px, 20px); }
  75% { transform: translate(20px, 30px); }
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 450px;
  padding: 20px;
}

.login-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.6s ease;
}

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

.login-header {
  text-align: center;
  margin-bottom: 40px;
}

/* Брандовият знак си носи кръглата чиния, затова тук няма златен кръг под него. */
.login-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  font-family: cursive;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 400;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.form-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-label i {
  color: var(--accent-primary);
}

.input-wrapper {
  position: relative;
}

.form-input {
  width: 100%;
  height: 52px;
  padding: 0 48px 0 16px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: all var(--transition-normal);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-hover);
  box-shadow: 0 0 0 4px rgba(212, 165, 116, 0.1);
}

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

.input-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.error-message {
  padding: 14px 16px;
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  border-radius: 10px;
  color: #ff6b6b;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.error-message i {
  flex-shrink: 0;
}

.btn-primary {
  height: 52px;
  padding: 0 32px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border: none;
  border-radius: 12px;
  color: var(--text-dark);
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 16px rgba(212, 165, 116, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(212, 165, 116, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary i {
  transition: transform var(--transition-normal);
}

.btn-primary:hover i {
  transform: translateX(4px);
}

.login-footer {
  margin-top: 32px;
  text-align: center;
}

.login-hint {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-hint i {
  color: var(--accent-primary);
}

/* ============================================
   ADMIN PANEL LAYOUT
   ============================================ */

.admin-panel {
  display: flex;
  width: 100%;
  height: 100vh;
  background: var(--bg-primary);
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  transition: transform var(--transition-normal);
}

.sidebar-header {
  height: var(--header-height);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.sidebar-toggle {
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: none;
}

.sidebar-toggle:hover {
  background: var(--bg-hover);
  color: var(--accent-primary);
}

.sidebar-nav {
  flex: 1;
  padding: 20px 16px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 8px;
  background: transparent;
  border: none;
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-item i {
  width: 20px;
  font-size: 18px;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: var(--text-dark);
  box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
}

.btn-logout {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-logout:hover {
  background: rgba(244, 67, 54, 0.1);
  border-color: var(--error);
  color: var(--error);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content-header {
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

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

.mobile-menu-toggle {
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  position: relative;
  z-index: 1000;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(212, 165, 116, 0.3);
  user-select: none;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:active {
  background: var(--bg-hover);
  color: var(--accent-primary);
}

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

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

.btn-refresh {
  height: 40px;
  padding: 0 20px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-normal);
}

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

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

.content-body {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* ============================================
   TEMPLATES GRID
   ============================================ */

.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.template-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--transition-normal);
}

.template-card:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

/* ============================================
   TABLES
   ============================================ */

.table-wrapper {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

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

.data-table td {
  padding: 16px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
}

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

.data-table tbody tr {
  transition: background var(--transition-fast);
}

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

/* ============================================
   BUTTONS & CONTROLS
   ============================================ */

button, .nc-btn {
  height: 40px;
  padding: 0 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button:hover, .nc-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.nc-btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-color: transparent;
  color: var(--text-dark);
}

.nc-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(212, 165, 116, 0.3);
  color: var(--text-dark);
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.nc-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.nc-field label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.nc-field input,
.nc-field textarea,
.nc-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: all var(--transition-normal);
}

.nc-field input:focus,
.nc-field textarea:focus,
.nc-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-hover);
  box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1);
}

.nc-field textarea {
  resize: vertical;
  min-height: 100px;
}

.nc-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  min-width: 300px;
  max-width: 400px;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--accent-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  font-size: 14px;
  z-index: 1000;
  animation: slideInRight 0.3s ease;
}

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

.toast.success {
  border-color: var(--success);
}

.toast.error {
  border-color: var(--error);
}

.toast.warning {
  border-color: var(--warning);
}

/* ============================================
   EDITOR PANEL
   ============================================ */

.editor-panel {
  margin-top: 32px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
}

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

.editor-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor-title i {
  color: var(--accent-primary);
}

.editor-body {
  padding: 24px;
}

.nc-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nc-section-title i {
  color: var(--accent-primary);
}

.nc-subtabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: 12px;
}

.nc-subtabs .nc-btn {
  background: transparent;
  border-color: transparent;
  flex: 1;
  min-width: 120px;
}

.nc-subtabs .nc-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-color);
}

.nc-subtabs .nc-btn.active {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-color: transparent;
  color: var(--text-dark);
  box-shadow: 0 2px 8px rgba(212, 165, 116, 0.3);
}

.editor-tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

.editor-section {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.editor-section-header {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-section-header i {
  color: var(--accent-primary);
  font-size: 18px;
}

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

.editor-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.nc-accordion {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-top: 16px;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.nc-accordion:hover {
  border-color: var(--accent-primary);
}

.nc-accordion-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background var(--transition-fast);
  user-select: none;
}

.nc-accordion-header:hover {
  background: var(--bg-hover);
}

.nc-accordion-header span {
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nc-accordion-header .accordion-actions {
  display: flex;
  gap: 8px;
}

.nc-accordion-body {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  display: none;
}

.nc-accordion-body.open {
  display: block;
}

.nc-accordion-body pre {
  background: var(--bg-primary);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  color: var(--text-primary);
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  border: 1px solid var(--border-color);
}

.editor-local-explorer {
  margin-top: 12px;
  padding: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  display: none;
}

.editor-local-explorer.open {
  display: block;
  animation: fadeIn 0.3s ease;
}

.explorer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.explorer-title {
  font-weight: 600;
  color: var(--text-primary);
}

.explorer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.save-button-group {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 2px solid var(--border-color);
}

/* ============================================
   JSON SYNTAX HIGHLIGHTING
   ============================================ */

.json-key {
  color: #e06c75;
  font-weight: 500;
}

.json-string {
  color: #98c379;
}

.json-number {
  color: #d19a66;
}

.json-boolean {
  color: #c678dd;
  font-weight: 600;
}

.json-null {
  color: #888888;
  font-style: italic;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
  .templates-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }

  .content-body {
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 1001;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.3);
  }

  .sidebar.mobile-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }

  .main-content {
    margin-left: 0;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .content-header {
    padding: 0 20px;
  }

  .content-body {
    padding: 20px;
  }

  .page-title {
    font-size: 20px;
  }

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

  .login-card {
    padding: 32px 24px;
  }

  .toast {
    right: 16px;
    bottom: 16px;
    min-width: auto;
    max-width: calc(100% - 32px);
  }

  .btn-refresh span {
    display: none;
  }
}

@media (max-width: 480px) {
  .login-container {
    padding: 16px;
  }

  .login-card {
    padding: 28px 20px;
  }

  .login-title {
    font-size: 24px;
  }

  .content-header {
    padding: 0 16px;
    height: 60px;
  }

  .content-body {
    padding: 16px;
  }

  .page-title {
    font-size: 18px;
  }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

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

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

/* ============================================
   CRM MODULE STYLES
   ============================================ */

/* CRM Objects Grid */
.crm-objects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* CRM Object Card */
.crm-object-card {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.crm-object-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 165, 116, 0.15);
  border-color: var(--accent-primary);
}

/* Contact Date Color Coding */
.crm-object-card.contact-today {
  border-left: 4px solid #10b981;
}

.crm-object-card.contact-normal {
  border-left: 4px solid var(--border-color);
}

.crm-object-card.contact-overdue {
  border-left: 4px solid #ef4444;
}

/* Card Header */
.crm-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 12px;
}

.crm-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  flex: 1;
  word-break: break-word;
}

/* Status Badge */
.crm-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.crm-status-badge.status-pool {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.crm-status-badge.status-in_progress {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

.crm-status-badge.status-won {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.crm-status-badge.status-lost {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.crm-status-badge.status-snoozed {
  background: rgba(107, 114, 128, 0.15);
  color: #6b7280;
}

.crm-status-badge.status-preparing_test {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.crm-status-badge.status-in_test {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
}

/* Manager Results Section */
.crm-results-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.crm-results-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.crm-result-card {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  border: 2px solid var(--border-color);
  transition: transform 0.2s, box-shadow 0.2s;
}

.crm-result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.crm-result-card .result-icon {
  font-size: 48px;
  line-height: 1;
}

.crm-result-card .result-content {
  flex: 1;
}

.crm-result-card .result-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.crm-result-card .result-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.crm-result-card .result-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.crm-result-card.result-won {
  border-color: rgba(16, 185, 129, 0.3);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.crm-result-card.result-commission {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(245, 158, 11, 0.05) 100%);
}

.crm-result-card.result-commission .result-value {
  color: #f59e0b;
}

.crm-result-card.result-paid {
  border-color: rgba(16, 185, 129, 0.3);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.crm-result-card.result-paid .result-value {
  color: #10b981;
}

.crm-result-card.result-pending {
  border-color: rgba(239, 68, 68, 0.3);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(239, 68, 68, 0.05) 100%);
}

.crm-result-card.result-pending .result-value {
  color: #ef4444;
}

/* Commission Info Accordion */
.commission-info-accordion summary::-webkit-details-marker {
  display: none;
}

.commission-info-accordion summary {
  list-style: none;
}

.commission-info-accordion[open] summary .fa-chevron-down {
  transform: rotate(180deg);
}

.commission-info-accordion summary:hover {
  background: var(--bg-tertiary);
}

.crm-results-list {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 24px;
  border: 2px solid var(--border-color);
}

/* Card Body */
.crm-card-body {
  margin-bottom: 16px;
}

.crm-card-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.crm-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.crm-info-row i {
  width: 16px;
  color: var(--accent-primary);
  flex-shrink: 0;
}

/* Phone Link - Large and Prominent */
.crm-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--accent-primary), #c8975f);
  color: var(--bg-primary);
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  transition: all 0.3s ease;
  margin: 12px 0;
  width: 100%;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(212, 165, 116, 0.3);
  user-select: none;
}

.crm-phone-link:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}

.crm-phone-link i {
  font-size: 20px;
}

/* Facebook Link */
.crm-facebook-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}

.crm-facebook-link:hover {
  color: #c8975f;
  text-decoration: underline;
}

.crm-facebook-link i {
  font-size: 16px;
}

/* Notes Section */
.crm-notes {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  max-height: 80px;
  overflow-y: auto;
}

/* Card Footer */
.crm-card-footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* CRM Buttons */
.crm-btn-claim {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 48px;
}

.crm-btn-claim:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.crm-btn-secondary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 48px;
}

.crm-btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.crm-btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: #ef4444;
}

.crm-btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

/* CRM Modal */
.crm-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.crm-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.crm-modal-content {
  position: relative;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 16px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.crm-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 2px solid var(--border-color);
  background: var(--bg-tertiary);
}

.crm-modal-header h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.crm-modal-close {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 18px;
}

.crm-modal-close:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-color: var(--accent-primary);
  transform: rotate(90deg);
}

.crm-modal-body {
  padding: 24px;
  overflow-y: auto;
}

/* Modal Details Grid */
.crm-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.crm-detail-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.crm-detail-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.crm-detail-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Timeline Component */
.crm-timeline {
  margin-top: 32px;
  position: relative;
  padding-left: 40px;
}

.crm-timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.crm-timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.crm-timeline-item:last-child {
  padding-bottom: 0;
}

.crm-timeline-dot {
  position: absolute;
  left: -35px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 3px solid var(--accent-primary);
  z-index: 1;
}

.crm-timeline-content {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
}

.crm-timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 12px;
}

.crm-timeline-type {
  font-weight: 600;
  color: var(--accent-primary);
  font-size: 14px;
}

.crm-timeline-date {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.crm-timeline-body {
  font-size: 14px;
  color: var(--text-secondary);
}

.crm-timeline-change {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.crm-timeline-old,
.crm-timeline-new {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.crm-timeline-old {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  text-decoration: line-through;
}

.crm-timeline-new {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

/* Statistics Grid */
.crm-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.crm-stat-card {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
}

.crm-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 165, 116, 0.15);
  border-color: var(--accent-primary);
}

.crm-stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.crm-stat-icon.stat-total {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.crm-stat-icon.stat-progress {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

.crm-stat-icon.stat-won {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.crm-stat-icon.stat-conversion {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

.crm-stat-content {
  flex: 1;
}

.crm-stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
  .crm-objects-grid {
    grid-template-columns: 1fr;
  }

  .crm-modal-content {
    max-width: 100%;
    margin: 0;
    border-radius: 12px;
  }

  .crm-details-grid {
    grid-template-columns: 1fr;
  }

  .crm-stats-grid {
    grid-template-columns: 1fr;
  }

  .crm-card-footer {
    flex-direction: column;
  }

  .crm-btn-claim,
  .crm-btn-secondary {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .crm-phone-link {
    font-size: 16px;
  }

  .crm-modal-header h3 {
    font-size: 20px;
  }

  .crm-modal-body {
    padding: 16px;
  }

  .crm-stat-value {
    font-size: 28px;
  }
}

/* ========== BUTTONS MANAGER STYLES ========== */

/* Buttons Manager Container */
#buttonsManagerContainer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

/* Button Manager Item */
.btn-manager-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s;
}

.btn-manager-item:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-manager-ghost {
  opacity: 0.5;
  background: var(--accent-primary);
}

/* Drag Handle */
.btn-manager-handle {
  cursor: grab;
  color: var(--text-muted);
  padding: 4px;
}

.btn-manager-handle:hover {
  color: var(--text-primary);
}

.btn-manager-handle:active {
  cursor: grabbing;
}

/* Button Icon */
.btn-manager-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-primary);
  color: white;
  border-radius: 8px;
  font-size: 14px;
}

/* Button Text */
.btn-manager-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.btn-manager-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.btn-manager-action {
  font-size: 12px;
  color: var(--text-muted);
  font-family: monospace;
}

/* Button Status */
.btn-manager-status {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.btn-manager-status.active {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.btn-manager-status.inactive {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Button Actions */
.btn-manager-actions {
  display: flex;
  gap: 4px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  color: var(--text-muted);
}

.btn-icon:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.btn-icon.btn-edit:hover {
  color: var(--accent-primary);
}

.btn-icon.btn-copy:hover {
  color: #10b981;
}

.btn-icon.btn-delete:hover {
  color: #ef4444;
}

/* Button Editor Modal - must be above parent modal (z-index 99999) */
.btn-editor-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-editor-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.btn-editor-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--bg-primary);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  margin: 20px;
}

.btn-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.btn-editor-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.btn-editor-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-editor-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-editor-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.btn-editor-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
}

/* NC Input/Select styles for modal */
.nc-input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color 0.2s;
}

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

.nc-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
}

.nc-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-primary);
}

/* Blog admin sub-tab active state */
.nc-subtab-active {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)) !important;
  border-color: transparent !important;
  color: var(--text-dark) !important;
  box-shadow: 0 2px 8px rgba(212, 165, 116, 0.3) !important;
}

/* Blog editor Quill overrides */
#blogEditorContent .ql-editor {
  min-height: 300px;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-secondary);
}
#blogEditorContent .ql-toolbar {
  border-color: var(--border-color);
  background: var(--bg-tertiary);
  border-radius: 8px 8px 0 0;
}
#blogEditorContent .ql-container {
  border-color: var(--border-color);
  border-radius: 0 0 8px 8px;
}

/* ===== Банка ястия (admin-dish-bank) ===== */
.db-toolbar{display:flex;gap:14px;align-items:end;flex-wrap:wrap;margin-bottom:20px}
.db-toolbar label{display:flex;flex-direction:column;gap:5px;font-size:13px;color:var(--text-secondary)}
.db-toolbar select,.db-inp,.db-search{padding:9px 12px;border:1px solid var(--border-color);border-radius:8px;background:var(--bg-secondary);color:var(--text-primary);font-size:14px}
.db-search{min-width:220px}
.db-loading,.db-empty{padding:30px;text-align:center;color:var(--text-secondary)}
.db-dishes{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}
.db-card{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:12px;padding:14px}
.db-card-head{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.db-card-head strong{font-size:15px;color:var(--text-primary)}
.db-slug{font-size:11px;color:var(--text-secondary);background:var(--bg-tertiary);padding:2px 7px;border-radius:5px}
.db-card-del{margin-left:auto;background:transparent;border:none;color:#c0392b;cursor:pointer;font-size:14px}
.db-variants{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.db-thumb,.db-bg-thumb{position:relative;width:80px;height:80px;border-radius:9px;overflow:hidden;border:1px solid var(--border-color);
  background:repeating-conic-gradient(#d0d0d0 0% 25%,#fff 0% 50%) 50%/16px 16px}
.db-thumb img,.db-bg-thumb img{width:100%;height:100%;object-fit:cover}
.db-bg-thumb{background:none}
.db-thumb-del{position:absolute;top:2px;right:2px;width:20px;height:20px;border:none;border-radius:50%;background:rgba(0,0,0,.6);color:#fff;font-size:13px;cursor:pointer;line-height:1}
.db-thumb-del:hover{background:#c0392b}
/* лайтбокс - цялата снимка в оригинален размер (миниатюрите в грида са CDN-смалени) */
.db-lightbox{position:fixed;inset:0;z-index:9999;background:rgba(15,18,24,.82);display:flex;align-items:center;justify-content:center;padding:24px;cursor:zoom-out}
.db-lb-inner{position:relative;max-width:min(92vw,900px);max-height:90vh}
.db-lb-inner img{display:block;max-width:100%;max-height:90vh;border-radius:12px;
  background:repeating-conic-gradient(#e9edf2 0% 25%,#fff 0% 50%) 50%/22px 22px}
.db-lb-close,.db-lb-open{position:absolute;top:-14px;width:34px;height:34px;border:none;border-radius:50%;
  background:#fff;color:#222;font-size:18px;line-height:34px;text-align:center;cursor:pointer;box-shadow:0 3px 10px rgba(0,0,0,.35)}
.db-lb-close{right:-14px}
.db-lb-open{right:28px;font-size:14px;text-decoration:none;display:flex;align-items:center;justify-content:center}
.db-lb-close:hover,.db-lb-open:hover{background:#f1f3f7}
.db-add-variant{width:80px;height:80px;border:2px dashed var(--border-color);border-radius:9px;background:transparent;color:var(--text-secondary);cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:16px}
.db-add-variant small{font-size:10px}
.db-add-variant:hover{border-color:var(--accent-primary);color:var(--accent-primary)}
.db-aliases label{display:block;font-size:11px;color:var(--text-secondary);margin-bottom:4px}
.db-aliases .db-inp{width:100%}
.db-bg-section{margin-top:36px;border-top:2px solid var(--border-color);padding-top:24px}
.db-bg-section h3{margin-bottom:14px;color:var(--text-primary)}
.db-bg-toolbar{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px}
.db-bg-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px}
.db-bg-card{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:12px;overflow:hidden}
.db-bg-card .db-bg-thumb{width:100%;height:120px;border-radius:0;border:none}
.db-bg-card .db-bg-thumb img{width:100%;height:100%;object-fit:cover}
.db-bg-meta{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:8px 10px}
.db-bg-name{font-size:12.5px;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.db-tone{font-size:10.5px;padding:2px 7px;border-radius:10px;flex-shrink:0}
.db-tone-warm{background:#fdebd0;color:#b9770e}.db-tone-cool{background:#d6eaf8;color:#2874a6}.db-tone-neutral{background:#eaecee;color:#566573}
@media(max-width:640px){.db-bg-grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr))}.db-bg-card .db-bg-thumb{height:100px}}

/* stats карта */
.db-stats{display:grid;grid-template-columns:repeat(6,1fr);gap:12px;margin-bottom:22px}
.db-stat{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:3px;align-items:flex-start}
.db-stat-n{font-size:24px;font-weight:700;color:var(--text-primary)}
.db-stat-l{font-size:12px;color:var(--text-secondary)}
.db-stat-ok .db-stat-n{color:#2a9d63}
.db-stat-warn .db-stat-n{color:#d68910}
.db-stat-prog{justify-content:center}
.db-prog{width:100%;height:9px;background:var(--bg-tertiary);border-radius:6px;overflow:hidden;margin-bottom:6px}
.db-prog-bar{height:100%;width:0;background:linear-gradient(90deg,#2a9d63,#58d68d);transition:width .4s ease}

/* responsive: таблет */
@media(max-width:1100px){.db-stats{grid-template-columns:repeat(3,1fr)}}
/* responsive: телефон */
@media(max-width:640px){
  .db-stats{grid-template-columns:repeat(2,1fr);gap:8px}
  .db-stat{padding:10px}.db-stat-n{font-size:20px}
  .db-dishes{grid-template-columns:1fr}
  .db-toolbar{flex-direction:column;align-items:stretch}
  .db-toolbar label,.db-search,.db-toolbar .nc-btn{width:100%}
  .db-search{min-width:0}
  .db-bg-toolbar{flex-direction:column;align-items:stretch}
  .db-bg-toolbar .db-inp,.db-bg-toolbar .nc-btn{width:100%}
  .db-thumb,.db-bg-thumb,.db-add-variant{width:72px;height:72px}
}

/* бутон „Вземи промт" (за ястия без снимка) */
.db-prompt-btn{margin-left:auto;display:inline-flex;align-items:center;gap:6px;background:#eaf2ff;border:1px solid #b9d3ff;color:#2563a8;border-radius:8px;padding:5px 11px;font-size:12.5px;cursor:pointer;white-space:nowrap;transition:background .12s}
.db-prompt-btn:hover{background:#d9e8ff}
.db-prompt-btn.db-prompt-ok{background:#e3f8ec;border-color:#a9e0c2;color:#227a4e}
.db-card-nophoto{border-color:#e0c98f}
.db-card-nophoto .db-card-del{margin-left:8px}

/* ===== Табло (admin-board) - лично Kanban табло ===== */
.bt-wrap{display:flex;flex-direction:column;gap:16px}
.bt-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.bt-hint{color:var(--text-muted);font-size:13px}
.bt-hint kbd{background:var(--bg-tertiary);border:1px solid var(--border-light);border-bottom-width:2px;border-radius:4px;padding:1px 6px;font-size:11px;font-family:inherit;color:var(--text-secondary)}

.bt-board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;align-items:start}
.bt-empty-state{grid-column:1/-1;padding:40px;text-align:center;color:var(--text-muted)}

.bt-col{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:10px;min-width:0}
.bt-col-full{border-color:var(--warning)}
.bt-col-head{display:flex;align-items:center;gap:8px}
.bt-col-title{font-weight:600;font-size:14px;color:var(--text-primary);display:flex;align-items:center;gap:7px;flex:1;min-width:0}
.bt-col-title i{color:var(--accent-primary);font-size:13px}
.bt-count{background:var(--bg-tertiary);color:var(--text-secondary);border-radius:20px;padding:2px 9px;font-size:12px;font-variant-numeric:tabular-nums}
.bt-count-full{background:var(--warning);color:var(--text-dark);font-weight:600}
.bt-icon-btn{background:none;border:none;color:var(--text-muted);cursor:pointer;padding:4px 6px;border-radius:6px;font-size:13px;transition:var(--transition-fast)}
.bt-icon-btn:hover{background:var(--bg-hover);color:var(--accent-primary)}

.bt-list{display:flex;flex-direction:column;gap:9px;min-height:70px}
.bt-col-empty{color:var(--text-muted);font-size:12.5px;text-align:center;padding:16px 0;border:1px dashed var(--border-color);border-radius:8px}
.bt-more{background:none;border:none;color:var(--text-muted);font-size:12.5px;cursor:pointer;padding:4px;text-align:left}
.bt-more:hover{color:var(--accent-primary)}

.bt-card{background:var(--bg-tertiary);border:1px solid var(--border-color);border-left-width:3px;border-radius:9px;padding:10px 11px;cursor:pointer;transition:var(--transition-fast);position:relative}
.bt-card:hover{border-color:var(--border-light);transform:translateY(-1px);box-shadow:var(--shadow-sm)}
.bt-prio-bg-1{border-left-color:var(--error)}
.bt-prio-bg-2{border-left-color:var(--warning)}
.bt-prio-bg-3{border-left-color:var(--border-light)}
.bt-card-done{opacity:.55}
.bt-card-done .bt-title{text-decoration:line-through}
.bt-ghost{opacity:.4;background:var(--bg-hover)}

.bt-card-top{display:flex;align-items:center;gap:7px;margin-bottom:6px;flex-wrap:wrap}
.bt-prio{font-size:10.5px;font-weight:700;letter-spacing:.4px;border-radius:4px;padding:1px 5px}
.bt-prio-1{background:rgba(244,67,54,.16);color:#ff8a80}
.bt-prio-2{background:rgba(255,152,0,.16);color:#ffc166}
.bt-prio-3{background:var(--bg-hover);color:var(--text-muted)}
.bt-due{font-size:11.5px;color:var(--text-muted);display:inline-flex;align-items:center;gap:4px}
.bt-due-over{color:var(--error);font-weight:600}
.bt-due-today{color:var(--warning);font-weight:600}
.bt-has-notes{font-size:10.5px;color:var(--text-muted);margin-left:auto}
.bt-title{font-size:13.5px;line-height:1.4;color:var(--text-primary);word-break:break-word}

.bt-card-foot{display:none;gap:6px;margin-top:8px}
.bt-move{flex:1;background:var(--bg-secondary);border:1px solid var(--border-color);color:var(--text-secondary);border-radius:6px;padding:6px;cursor:pointer;font-size:12px}
.bt-move:disabled{opacity:.3;cursor:default}
.bt-move:not(:disabled):hover{background:var(--bg-hover);color:var(--accent-primary)}

/* ---- модал за карта ---- */
.bt-modal-overlay,.bt-quick-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:9000;display:flex;padding:20px}
.bt-modal-overlay{align-items:center;justify-content:center}
.bt-modal{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:14px;width:100%;max-width:520px;max-height:90vh;overflow:auto;box-shadow:var(--shadow-lg)}
.bt-modal-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid var(--border-color)}
.bt-modal-head h3{margin:0;font-size:16px;color:var(--text-primary)}
.bt-modal-x{background:none;border:none;color:var(--text-muted);cursor:pointer;font-size:16px;padding:4px 8px;border-radius:6px}
.bt-modal-x:hover{background:var(--bg-hover);color:var(--text-primary)}
.bt-modal-body{padding:18px;display:flex;flex-direction:column;gap:14px}
.bt-modal-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 18px;border-top:1px solid var(--border-color)}
.bt-modal-foot>div{display:flex;gap:8px;margin-left:auto}
.bt-btn-danger{border-color:var(--error);color:var(--error)}
.bt-btn-danger:hover{background:rgba(244,67,54,.12);color:var(--error)}
.bt-field{display:flex;flex-direction:column;gap:5px;flex:1;min-width:0}
.bt-field>span{font-size:12px;color:var(--text-secondary)}
.bt-field-row{display:flex;gap:12px;flex-wrap:wrap}
.bt-inp{background:var(--bg-tertiary);border:1px solid var(--border-color);border-radius:8px;padding:9px 11px;color:var(--text-primary);font-size:13.5px;font-family:inherit;width:100%}
.bt-inp:focus{outline:none;border-color:var(--accent-primary)}
textarea.bt-inp{resize:vertical}

/* ---- бърз запис (Ctrl+K) ---- */
.bt-quick-overlay{align-items:flex-start;justify-content:center;padding-top:14vh}
.bt-quick-box{background:var(--bg-secondary);border:1px solid var(--accent-primary);border-radius:14px;width:100%;max-width:560px;padding:16px 18px;display:flex;align-items:center;gap:12px;flex-wrap:wrap;box-shadow:var(--shadow-lg)}
.bt-quick-icon{color:var(--accent-primary);font-size:17px}
.bt-quick-input{flex:1;min-width:200px;background:none;border:none;outline:none;color:var(--text-primary);font-size:17px;font-family:inherit}
.bt-quick-input::placeholder{color:var(--text-muted)}
.bt-quick-hint{width:100%;font-size:11.5px;color:var(--text-muted)}
.bt-quick-hint kbd{background:var(--bg-tertiary);border:1px solid var(--border-light);border-radius:4px;padding:1px 5px;font-size:10.5px;font-family:inherit}

/* ---- responsive: колоните се плъзгат хоризонтално ---- */
@media(max-width:900px){
  .bt-board{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:85%;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:8px}
  .bt-col{scroll-snap-align:start}
}
@media(max-width:640px){
  .bt-board{grid-auto-columns:88%}
  .bt-card-foot{display:flex}
  .bt-head-r,.bt-head-r .nc-btn{width:100%}
  .bt-field-row{flex-direction:column;gap:14px}
  .bt-quick-overlay{padding-top:8vh}
  .bt-modal-foot{flex-wrap:wrap}
}

/* ----- Табло: фокус-индикатори (възраст, блокирана, „докъде бях") ----- */
.bt-age{font-size:11px;color:var(--text-muted);display:inline-flex;align-items:center;gap:4px}
.bt-age-warn{color:var(--warning);font-weight:600}
.bt-blocked-tag{font-size:10.5px;font-weight:600;letter-spacing:.3px;border-radius:4px;padding:1px 6px;background:rgba(33,150,243,.16);color:#7fc4ff;display:inline-flex;align-items:center;gap:4px}
.bt-card-blocked{opacity:.72;border-left-style:dashed}
.bt-card-stale{opacity:.6}
.bt-card-stale .bt-title{color:var(--text-secondary)}
.bt-resume{margin-top:7px;font-size:11.5px;line-height:1.35;color:var(--text-muted);background:var(--bg-secondary);border-left:2px solid var(--accent-dark);border-radius:0 6px 6px 0;padding:5px 8px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.bt-resume i{color:var(--accent-primary);margin-right:4px}
.bt-move-block{flex:0 0 auto;min-width:38px}
.bt-move-block-on{background:rgba(33,150,243,.18);border-color:#2196f3;color:#7fc4ff}
.bt-modal-sm{max-width:440px}
.bt-resume-task{margin:0 0 10px;font-size:13.5px;color:var(--text-primary);font-weight:500}
.bt-field-hint{display:block;font-style:normal;font-size:10.5px;color:var(--text-muted);margin-top:2px}

/* ----- Табло: диалог „За AI агент" (MCP) ----- */
.bt-hidden{display:none}
.bt-modal-lg{max-width:720px}
.bt-agent-intro{margin:0 0 14px;font-size:13px;line-height:1.5;color:var(--text-secondary)}
.bt-agent-intro code,.bt-agent-hint code{background:var(--bg-tertiary);border:1px solid var(--border-color);border-radius:4px;padding:1px 5px;font-size:12px;color:var(--accent-light)}
.bt-agent-tabs{display:flex;gap:6px;margin-bottom:12px;flex-wrap:wrap}
.bt-agent-tab{background:var(--bg-tertiary);border:1px solid var(--border-color);color:var(--text-secondary);border-radius:8px;padding:7px 14px;font-size:13px;font-family:inherit;cursor:pointer;transition:var(--transition-fast)}
.bt-agent-tab:hover{background:var(--bg-hover);color:var(--text-primary)}
.bt-agent-tab-on{background:var(--accent-primary);border-color:transparent;color:var(--text-dark);font-weight:600}
.bt-agent-hint{margin:0 0 8px;font-size:12.5px;color:var(--text-muted)}
.bt-agent-code{background:var(--bg-primary);border:1px solid var(--border-color);border-radius:8px;padding:12px 14px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;line-height:1.55;color:var(--text-primary);white-space:pre;overflow-x:auto;max-height:44vh;overflow-y:auto;margin:0 0 12px}
@media(max-width:640px){
  .bt-agent-code{font-size:11px;max-height:38vh}
  .bt-agent-tabs .bt-agent-tab{flex:1}
}

/* ----- Табло: етикети „за кого" + таймер ----- */
.bt-label{font-size:10.5px;font-weight:600;letter-spacing:.2px;border-radius:4px;padding:1px 7px;background:color-mix(in srgb, var(--bt-label-color, #888) 20%, transparent);color:var(--bt-label-color,#aaa);border:1px solid color-mix(in srgb, var(--bt-label-color, #888) 45%, transparent);white-space:nowrap}
.bt-age-run{color:var(--accent-primary);font-weight:600}
.bt-label-picker{display:flex;flex-wrap:wrap;gap:6px}
.bt-label-opt{background:var(--bg-tertiary);border:1px solid var(--border-color);color:var(--text-secondary);border-radius:7px;padding:5px 11px;font-size:12px;font-family:inherit;cursor:pointer;transition:var(--transition-fast)}
.bt-label-opt:hover{background:var(--bg-hover);color:var(--text-primary)}
.bt-label-opt-on{background:color-mix(in srgb, var(--bt-label-color, var(--accent-primary)) 22%, transparent);border-color:var(--bt-label-color,var(--accent-primary));color:var(--bt-label-color,var(--accent-light));font-weight:600}
/* Етикет, който вече го няма в списъка - картата го е носила отпреди изтриването.
   Пунктирът казва „това е надпис, не жив етикет", вместо да изчезне мълчаливо. */
.bt-label-orphan{border-style:dashed}
.bt-label-manage{background:transparent;border:1px dashed var(--border-color);color:var(--text-muted);border-radius:7px;padding:5px 10px;font-size:12px;cursor:pointer;transition:var(--transition-fast)}
.bt-label-manage:hover{color:var(--accent-primary);border-color:var(--accent-primary)}

/* ----- Табло: насрочване „покажи ми я на този ден" ----- */
.bt-sched{font-size:11.5px;color:var(--accent-primary);font-weight:600;display:inline-flex;align-items:center;gap:4px}
/* Датата и бързите бутони са НА ЕДИН РЕД. „Покажи на" стои извън `.bt-field-row`
   нарочно: четвърто поле там оставяше по ~112px на всяко (модалът е 520px) -
   датата се режеше, а бутоните се нареждаха един под друг в тясна колона. */
.bt-sched-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.bt-inp-date{width:auto;flex:0 0 150px;min-width:132px}
.bt-quickdays{display:flex;flex-wrap:wrap;gap:6px;flex:1;min-width:0}
.bt-quickday{background:var(--bg-tertiary);border:1px solid var(--border-color);color:var(--text-secondary);border-radius:7px;padding:7px 11px;font-size:12px;font-family:inherit;line-height:1;cursor:pointer;transition:var(--transition-fast);white-space:nowrap}
.bt-quickday:hover{background:var(--bg-hover);color:var(--accent-primary);border-color:var(--accent-primary)}
/* „Изчисти" е ×, не дума: като четвърта дума избутва „понеделник" на нов ред.
   Стои до останалите, не с `margin-left:auto` - на широк модал това го запраща
   в десния край и изглежда като залепнало по погрешка. */
.bt-quickday-clear{color:var(--text-muted);padding:7px 10px}
.bt-quickday-clear:hover{color:var(--error);border-color:var(--error);background:var(--bg-hover)}
/* На тесен екран датата и бутоните не се събират на ред: датата остава вляво, а
   бутоните се увиват вдясно от нея на два реда и двете висят разминати. Затова
   датата отива на свой ред и бутоните се подреждат под нея. */
@media (max-width:560px){
  .bt-sched-row{flex-direction:column;align-items:stretch;gap:7px}
  .bt-inp-date{flex:1 1 auto;width:100%}
  .bt-quickdays{flex:0 0 auto}
  .bt-quickday{flex:1;text-align:center}
  .bt-quickday-clear{flex:0 0 auto}
}

/* ----- Табло: „Моите етикети" ----- */
/* Вторият слой стои НАД модала на задачата - иначе наполовина попълнената карта
   се губи, докато човек си прави етикет. */
.bt-modal-over{z-index:9100}
.bt-lbl-list{display:flex;flex-direction:column;gap:9px}
.bt-lbl-row{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.bt-lbl-name{flex:1;min-width:130px}
.bt-lbl-colors{display:flex;gap:4px;flex-wrap:wrap}
.bt-swatch{width:19px;height:19px;border-radius:5px;border:2px solid transparent;cursor:pointer;padding:0;transition:var(--transition-fast)}
.bt-swatch:hover{transform:scale(1.15)}
.bt-swatch-on{border-color:var(--text-primary);box-shadow:0 0 0 2px rgba(0,0,0,.35)}
.bt-lbl-del{background:transparent;border:none;color:var(--text-muted);cursor:pointer;padding:5px;border-radius:6px;transition:var(--transition-fast)}
.bt-lbl-del:hover{color:var(--error);background:var(--bg-hover)}
.bt-lbl-new{display:flex;gap:8px;margin-top:14px;padding-top:14px;border-top:1px solid var(--border-color)}
.bt-lbl-new .bt-inp{flex:1}
@media (max-width:560px){
  .bt-lbl-row{gap:6px}
  .bt-lbl-name{min-width:100%}
  .bt-lbl-new{flex-direction:column}
}

.nc-btn-sm {
  padding: 5px 10px;
  font-size: 0.8rem;
}

/* ---- Таб „Снимки категории" (обща библиотека за дигиталното меню) ---- */
.ci-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px; margin-top: 16px;
}
.ci-card {
  display: flex; flex-direction: column; gap: 8px; padding: 10px;
  background: #fff; border: 1px solid #e2ded7; border-radius: 12px;
}
.ci-card img {
  width: 100%; height: 130px; object-fit: cover; border-radius: 8px; background: #f0eeea;
}
.ci-card-main { flex: 1; display: flex; flex-direction: column; }
.ci-card-main strong { font-size: 14px; }
