/* ==========================================================================
   1. DESIGN SYSTEM & CSS VARIABLES
   ========================================================================== */
:root {
  --bg-main: #faf9f7;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #f4f2ee;
  --text-primary: #0b1118;
  --text-secondary: #73777d;
  --text-muted: #a0a4ab;
  --border-color: #e5e3df;
  --border-light: #f0eeea;

  --brand-primary: #0b1118;
  --accent-graphite: #0b1118;
  --accent-soft-graphite: #27303a;
  --accent-dusty-rose: #dfa89a;
  --accent-soft-peach: #f2c1b3;
  --accent-gradient: linear-gradient(
    135deg,
    #dfa89a 0%,
    #f2c1b3 50%,
    #27303a 100%
  );
  --accent-gradient-subtle: linear-gradient(
    135deg,
    rgba(223, 168, 154, 0.15) 0%,
    rgba(242, 193, 179, 0.15) 100%
  );

  --status-success: #2e7d32;
  --status-success-bg: #e8f5e9;
  --status-warning: #ed6c02;
  --status-warning-bg: #fff3e0;
  --status-danger: #d32f2f;
  --status-danger-bg: #ffebee;

  --chart-color-1: #0b1118;
  --chart-color-2: #dfa89a;
  --chart-color-3: #f2c1b3;
  --chart-color-4: #73777d;
  --chart-color-5: #a0a4ab;
  --chart-color-6: #27303a;
  --chart-color-7: #d8c7c1;
  --chart-color-8: #b8a8a2;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --shadow-sm: 0 2px 8px rgba(11, 17, 24, 0.04);
  --shadow-md: 0 8px 24px rgba(11, 17, 24, 0.07);
  --shadow-lg: 0 16px 36px rgba(11, 17, 24, 0.12);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --sidebar-width: 260px;
  --header-height: 70px;
}

html.dark {
  --bg-main: #0b1118;
  --bg-surface: #151c24;
  --bg-surface-subtle: #1f2732;
  --text-primary: #faf9f7;
  --text-secondary: #9aa0a8;
  --text-muted: #626871;
  --border-color: #27303a;
  --border-light: #1e2630;

  --brand-primary: #faf9f7;
  --accent-graphite: #faf9f7;
  --accent-soft-graphite: #3a4552;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.5);
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  -webkit-tap-highlight-color: transparent;
}
body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal);
  overflow-x: hidden;
  line-height: 1.5;
  font-size: 14px;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}
button {
  cursor: pointer;
}
ul {
  list-style: none;
}

/* Typography */
.font-serif {
  font-family: "Georgia", "Cambria", "Times New Roman", serif;
}
.text-xs {
  font-size: 11px;
}
.text-sm {
  font-size: 13px;
}
.text-base {
  font-size: 15px;
}
.text-lg {
  font-size: 18px;
}
.text-xl {
  font-size: 22px;
}
.text-2xl {
  font-size: 28px;
  font-weight: 300;
}
.text-3xl {
  font-size: 36px;
  font-weight: 300;
}
.font-light {
  font-weight: 300;
}
.font-medium {
  font-weight: 500;
}
.font-semibold {
  font-weight: 600;
}
.text-muted {
  color: var(--text-secondary);
}
.text-accent {
  color: var(--accent-dusty-rose);
}
.tracking-wide {
  letter-spacing: 0.08em;
}
.tracking-widest {
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Utility Layouts */
.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.items-start {
  align-items: flex-start;
}
.self-center {
  align-self: center;
}
.justify-between {
  justify-content: space-between;
}
.justify-center {
  justify-content: center;
}
.flex-1 {
  flex: 1;
}
.gap-1 {
  gap: 4px;
}
.gap-2 {
  gap: 8px;
}
.gap-3 {
  gap: 12px;
}
.gap-4 {
  gap: 16px;
}
.gap-6 {
  gap: 24px;
}
.grid {
  display: grid;
}
.grid-cols-1 {
  grid-template-columns: repeat(1, 1fr);
}
.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}
.w-full {
  width: 100%;
}
.h-full {
  height: 100%;
}

/* UI Components */
.card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.btn-primary {
  background: var(--text-primary);
  color: var(--bg-surface);
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.btn-accent {
  background: var(--accent-dusty-rose);
  color: #ffffff;
}
.btn-accent:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}
.btn-outline {
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}
.btn-outline:hover {
  background-color: var(--bg-surface-subtle);
}
.btn-ghost {
  color: var(--text-secondary);
}
.btn-ghost:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface-subtle);
}
.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
}
.badge-success {
  background-color: var(--status-success-bg);
  color: var(--status-success);
}
.badge-warning {
  background-color: var(--status-warning-bg);
  color: var(--status-warning);
}
.badge-danger {
  background-color: var(--status-danger-bg);
  color: var(--status-danger);
}
.badge-neutral {
  background-color: var(--bg-surface-subtle);
  color: var(--text-secondary);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.form-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent-dusty-rose);
}
.form-textarea {
  min-height: 90px;
  resize: vertical;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background-color: var(--bg-surface-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-pill);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   2. APP LAYOUT & STRUCTURE
   ========================================================================== */
#app-root {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  z-index: 30;
  transition:
    width var(--transition-normal),
    transform var(--transition-normal);
}
.sidebar-header {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-logo-text {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.15em;
}
.sidebar-logo-sub {
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--accent-dusty-rose);
}
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
}
.nav-item:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface-subtle);
}
.nav-item.active {
  color: var(--text-primary);
  background-color: var(--bg-surface-subtle);
  font-weight: 600;
  border-left: 3px solid var(--accent-dusty-rose);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.nav-item svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}
.nav-section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 16px 14px 6px 14px;
  font-weight: 700;
}

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--bg-main);
}
.top-header {
  height: var(--header-height);
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 20;
}
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

.view-panel {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}
.view-panel.active {
  display: block;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  z-index: 40;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px;
}
.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--text-secondary);
  width: 20%;
}
.mobile-nav-btn.active {
  color: var(--accent-dusty-rose);
  font-weight: 600;
}

#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background-color: var(--text-primary);
  color: var(--bg-surface);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(11, 17, 24, 0.5);
  backdrop-filter: blur(4px);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-card {
  background-color: var(--bg-surface);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.2s ease;
}
.modal-overlay.active .modal-card {
  transform: scale(1);
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background-color: var(--bg-surface-subtle);
}
/* Sidebar Compact Mode */
@media (min-width: 769px) {
    body.sidebar-compact .sidebar { width: 76px; }
    body.sidebar-compact .sidebar-logo-wrapper,
    body.sidebar-compact .nav-section-title,
    body.sidebar-compact .nav-item span,
    body.sidebar-compact .sidebar-bottom { display: none; }
    body.sidebar-compact .sidebar-header { padding: 24px 0; justify-content: center; }
    body.sidebar-compact .nav-item { justify-content: center; padding: 12px 0; border-radius: var(--radius-sm); margin: 0 10px; }
    body.sidebar-compact .nav-item.active { border-radius: var(--radius-sm); border-left: none; background-color: var(--accent-dusty-rose); color: white; }
    body.sidebar-compact .nav-item.active svg { stroke: white; }
    body.sidebar-compact .nav-item svg { margin: 0; }
    
    /* CSS Tooltips */
    body.sidebar-compact .nav-item { position: relative; }
    body.sidebar-compact .nav-item:hover::after {
        content: attr(data-tooltip);
        position: absolute;
        left: 100%;
        top: 50%;
        transform: translateY(-50%);
        margin-left: 14px;
        background-color: var(--text-primary);
        color: var(--bg-surface);
        padding: 6px 12px;
        border-radius: var(--radius-sm);
        font-size: 12px;
        font-weight: 500;
        white-space: nowrap;
        z-index: 1000;
        pointer-events: none;
        box-shadow: var(--shadow-sm);
    }
}

/* ==========================================================================
   3. MEDIA QUERIES
   ========================================================================== */
@media (max-width: 900px) {
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .mobile-bottom-nav {
    display: flex;
  }
  .main-content {
    padding: 16px;
    padding-bottom: 80px;
  }
  .top-header {
    padding: 0 16px;
  }
  .grid-cols-2 {
    grid-template-columns: repeat(1, 1fr);
  }
  .grid-cols-3 {
    grid-template-columns: repeat(1, 1fr);
  }
  .desktop-only {
    display: none !important;
  }
  .responsive-table {
    border: 0;
  }
  .responsive-table thead {
    display: none;
  }
  .responsive-table tr {
    display: block;
    margin-bottom: 12px;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    padding: 12px;
  }
  .responsive-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border: none;
    font-size: 13px;
  }
  .responsive-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-secondary);
  }
}

.logo-mark {
  width: 32px;
  height: 18px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.data-table th {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: 13px;
}
.data-table tr:hover td {
  background-color: var(--bg-surface-subtle);
}

#loading-screen {
  position: fixed;
  inset: 0;
  background-color: #0b1118;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.5s ease;
}

/* ==========================================================================
   HERO BANNER ADAPTIVE COVER THEMES
   ========================================================================== */
#dash-hero-card.cover-theme-dark #dash-hero-title,
#dash-hero-card.cover-theme-dark #countdown-days {
  color: #ffffff !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.75), 0 1px 3px rgba(0, 0, 0, 0.95);
}

#dash-hero-card.cover-theme-dark #dash-event-subtitle,
#dash-hero-card.cover-theme-dark #dash-hero-days-label,
#dash-hero-card.cover-theme-dark #countdown-clock {
  color: rgba(255, 255, 255, 0.90) !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

#dash-hero-card.cover-theme-dark #dash-hero-greeting {
  color: #F2C1B3 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

#dash-hero-card.cover-theme-light #dash-hero-title,
#dash-hero-card.cover-theme-light #countdown-days {
  color: #0F172A !important;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.95);
}

#dash-hero-card.cover-theme-light #dash-event-subtitle,
#dash-hero-card.cover-theme-light #dash-hero-days-label,
#dash-hero-card.cover-theme-light #countdown-clock {
  color: #334155 !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.85);
}

#dash-hero-card.cover-theme-light #dash-hero-greeting {
  color: var(--accent-dusty-rose) !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   VENDORS MODULE — PREMIUM EDITORIAL STYLES
   ========================================================================== */
.vendor-pill {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.vendor-pill:hover {
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
  border-color: var(--accent-color);
}
.vendor-pill.active {
  background: #1e293b;
  color: #ffffff;
  border-color: #1e293b;
  box-shadow: var(--shadow-sm);
}

.vendor-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.vendor-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.vendor-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background-color: var(--border-light);
}

.vendor-service-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--text-primary);
}

/* ==========================================================================
   NOTES MODULE — INTELLIGENT CONNECTED REPOSITORY STYLES
   ========================================================================== */
.note-card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 18px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.note-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.note-card.pinned {
  border-color: var(--accent-soft-peach);
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-surface-subtle) 100%);
}
.note-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 600;
  background: var(--bg-surface-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}
.note-thumb {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.note-thumb:hover {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  #notes-grid {
    grid-template-columns: repeat(1, 1fr) !important;
  }
  #notif-dropdown-panel {
    right: -60px !important;
    width: 310px !important;
  }
  #global-search-results-overlay {
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-width: none !important;
    top: 54px !important;
  }
}

.notif-item:hover, .search-result-item:hover {
  background-color: var(--bg-surface-subtle) !important;
}

#global-search-results-overlay {
  position: fixed;
  top: 56px;
  right: 140px;
  width: 360px;
  max-width: calc(100vw - 24px);
  max-height: 480px;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  padding: 14px;
}

/* EVER NOW MAGAZINE STYLES */
.editorial-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: var(--bg-surface);
}
.editorial-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.category-pills-bar::-webkit-scrollbar {
  height: 4px;
}
.category-pills-bar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

@media (max-width: 992px) {
  #editorial-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 640px) {
  #editorial-cards-grid {
    grid-template-columns: repeat(1, 1fr) !important;
  }
  .hero-editorial-card {
    padding: 20px !important;
  }
  .hero-editorial-card h3 {
    font-size: 1.5rem !important;
  }
}



