/* ================================================================
   Tourism Trinidad — Island Noir Design System
   Base dark theme for all vendor portal and public pages
   ================================================================ */

/* --- Custom Properties ----------------------------------------- */
:root {
  --bg-base:        #0d0d0f;
  --bg-raised:      #141418;
  --bg-elevated:    #1c1c22;
  --glass:          rgba(255,255,255,0.04);
  --glass-hover:    rgba(255,255,255,0.07);
  --glass-active:   rgba(255,255,255,0.10);
  --border:         rgba(255,255,255,0.07);
  --border-bright:  rgba(255,255,255,0.14);
  --border-red:     rgba(220,20,60,0.35);

  --brand:          #DC143C;
  --brand-dark:     #b01030;
  --brand-glow:     rgba(220,20,60,0.28);
  --brand-dim:      rgba(220,20,60,0.18);
  --gold:           #F59E0B;
  --gold-light:     #FCD34D;
  --gold-glow:      rgba(245,158,11,0.25);
  --emerald:        #10B981;
  --blue:           #60a5fa;

  --text-primary:   #F1F1F3;
  --text-secondary: #9CA3AF;
  --text-muted:     #5a5a68;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.6);
  --shadow-red: 0 0 24px rgba(220,20,60,0.25);
  --shadow-gold:0 0 20px rgba(245,158,11,0.2);

  --gradient-carnival: linear-gradient(135deg,
    #110005 0%, #3d0015 28%, #DC143C 52%, #b54300 78%, #1e0e00 100%);
  --gradient-hero-overlay: linear-gradient(
    to bottom, rgba(13,13,15,0) 0%, rgba(13,13,15,0.4) 60%, rgba(13,13,15,1) 100%);
  --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
}

/* --- Light theme overrides ------------------------------------- */
[data-theme="light"] {
  --bg-base:        #f5f4f2;
  --bg-raised:      #eceae6;
  --bg-elevated:    #e2ded8;
  --glass:          rgba(0, 0, 0, 0.04);
  --glass-hover:    rgba(0, 0, 0, 0.07);
  --glass-active:   rgba(0, 0, 0, 0.10);
  --border:         rgba(0, 0, 0, 0.09);
  --border-bright:  rgba(0, 0, 0, 0.16);
  --border-red:     rgba(220, 20, 60, 0.35);
  --text-primary:   #0f0f0f;
  --text-secondary: #444444;
  --text-muted:     #888888;
  --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md:  0 4px 16px rgba(0, 0, 0, 0.14);
  --shadow-lg:  0 8px 32px rgba(0, 0, 0, 0.18);
  --shadow-red: 0 0 24px rgba(220, 20, 60, 0.18);
}

/* --- Reset & Base ---------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Subtle noise texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* --- Navigation ------------------------------------------------ */
.tt-nav {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,15,0.82);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--brand-glow), var(--shadow-sm);
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 24px;
}

.tt-nav-inner {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.tt-brand {
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 1px;
  flex-shrink: 0;
}
.tt-brand-tourism { color: var(--brand); font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.tt-brand-tt      { color: var(--text-primary); font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.tt-brand-sub     { color: var(--text-muted); font-size: 0.72rem; font-weight: 400; margin-left: 8px; letter-spacing: 0.05em; text-transform: uppercase; }

.tt-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tt-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.tt-nav-link:hover { color: var(--text-primary); background: var(--glass); }
.tt-nav-link.active { color: var(--text-primary); }

.tt-nav-cta {
  background: var(--brand);
  color: #fff !important;
  padding: 7px 16px !important;
  border-radius: var(--radius-sm);
  font-weight: 600 !important;
  box-shadow: var(--shadow-red);
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s !important;
}
.tt-nav-cta:hover {
  background: var(--brand-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(220,20,60,0.4) !important;
}

/* --- Glass Card ------------------------------------------------ */
.tt-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.tt-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--gradient-card);
  pointer-events: none;
  border-radius: inherit;
}
.tt-card:hover {
  border-color: var(--border-red);
  box-shadow: var(--shadow-red), var(--shadow-md);
  transform: translateY(-2px);
}

.tt-card-body { padding: 20px; position: relative; z-index: 1; }

/* --- Buttons --------------------------------------------------- */
.tt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
  padding: 10px 20px;
}

.tt-btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-red);
}
.tt-btn-primary:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(220,20,60,0.45);
  color: #fff;
}

.tt-btn-ghost {
  background: var(--glass);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.tt-btn-ghost:hover {
  background: var(--glass-hover);
  border-color: var(--border-bright);
  color: var(--text-primary);
}

.tt-btn-sm { padding: 7px 14px; font-size: 0.82rem; border-radius: var(--radius-sm); }
.tt-btn-lg { padding: 13px 28px; font-size: 1rem; }
.tt-btn-full { width: 100%; }

/* --- Form Inputs ---------------------------------------------- */
.tt-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.tt-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  font-family: inherit;
}
.tt-input::placeholder { color: var(--text-muted); }
.tt-input:focus {
  border-color: var(--brand);
  background: rgba(220,20,60,0.05);
  box-shadow: 0 0 0 3px rgba(220,20,60,0.12);
}
.tt-input.error { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.12); }

.tt-select {
  width: 100%;
  background: rgba(255,255,255,0.05) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239CA3AF' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  padding: 10px 36px 10px 14px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s;
  font-family: inherit;
  cursor: pointer;
}
.tt-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,0.12); }
.tt-select option { background: var(--bg-raised); color: var(--text-primary); }

.tt-textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  padding: 10px 14px;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s;
  font-family: inherit;
  min-height: 100px;
}
.tt-textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,0.12); }
.tt-textarea::placeholder { color: var(--text-muted); }

.tt-form-group { margin-bottom: 18px; }
.tt-form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.tt-field-error { color: #f87171; font-size: 0.78rem; margin-top: 4px; display: block; }

/* --- Badges & Status ------------------------------------------ */
.tt-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
}

.tt-badge-verified {
  background: linear-gradient(135deg, #065f46, #10B981);
  color: #fff;
  box-shadow: 0 1px 6px rgba(16,185,129,0.35);
}
.tt-badge-pending  { background: rgba(251,191,36,0.15); color: #FBBF24; border: 1px solid rgba(251,191,36,0.3); }
.tt-badge-active   { background: rgba(16,185,129,0.12); color: #34D399; border: 1px solid rgba(16,185,129,0.25); }
.tt-badge-rejected { background: rgba(239,68,68,0.12);  color: #F87171; border: 1px solid rgba(239,68,68,0.25); }
.tt-badge-suspended{ background: rgba(107,114,128,0.15);color: #9CA3AF; border: 1px solid rgba(107,114,128,0.25); }

.tt-badge-cat {
  background: rgba(220,20,60,0.12);
  color: var(--brand);
  border: 1px solid rgba(220,20,60,0.25);
}
.tt-badge-island {
  background: rgba(255,255,255,0.07);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* --- Alerts ---------------------------------------------------- */
.tt-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  margin-bottom: 16px;
}
.tt-alert-error   { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.25);  color: #FCA5A5; }
.tt-alert-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.25); color: #6EE7B7; }
.tt-alert-warning { background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.25); color: #FDE68A; }

/* --- Section headings ----------------------------------------- */
.tt-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tt-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* --- Stat card ------------------------------------------------- */
.tt-stat {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.tt-stat-value { font-size: 2.25rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.tt-stat-label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 6px; }
.tt-stat-icon  {
  position: absolute; right: 16px; top: 16px;
  width: 40px; height: 40px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.tt-stat-accent-red  ::before,
.tt-stat-accent-red  .tt-stat-icon { background: rgba(220,20,60,0.15); color: var(--brand); }
.tt-stat-accent-gold .tt-stat-icon { background: rgba(245,158,11,0.15); color: var(--gold); }
.tt-stat-accent-green .tt-stat-icon{ background: rgba(16,185,129,0.15); color: #34D399; }
.tt-stat-accent-blue .tt-stat-icon { background: rgba(59,130,246,0.15); color: #60A5FA; }

/* --- Progress bar --------------------------------------------- */
.tt-progress-track {
  background: rgba(255,255,255,0.07);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
}
.tt-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
  box-shadow: 0 0 8px var(--brand-glow);
  transition: width 0.5s ease;
}

/* --- Tables ---------------------------------------------------- */
.tt-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); }
.tt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.tt-table thead tr {
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--border);
}
.tt-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.tt-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-secondary);
  vertical-align: middle;
}
.tt-table tbody tr:hover td { background: var(--glass); }
.tt-table td strong { color: var(--text-primary); }

/* --- Divider --------------------------------------------------- */
.tt-divider { height: 1px; background: var(--border); margin: 24px 0; }

/* --- Footer ---------------------------------------------------- */
.tt-footer {
  background: var(--bg-base);
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.tt-footer a { color: var(--text-secondary); text-decoration: none; }
.tt-footer a:hover { color: var(--text-primary); }

/* --- Utility --------------------------------------------------- */
.tt-text-brand   { color: var(--brand); }
.tt-text-gold    { color: var(--gold); }
.tt-text-muted   { color: var(--text-muted); }
.tt-text-secondary { color: var(--text-secondary); }

.tt-page-wrap { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }
.tt-page-wrap-sm { max-width: 680px; margin: 0 auto; padding: 32px 24px; }

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

@media (max-width: 768px) {
  /* Grids collapse to single column */
  .tt-form-grid-2, .tt-grid-2, .tt-grid-3, .tt-grid-4 {
    grid-template-columns: 1fr;
  }
  .tt-page-wrap, .tt-page-wrap-sm { padding: 20px 16px; }

  /* Nav: show hamburger, hide links by default (toggled by JS) */
  .tt-nav { padding: 0 16px; height: 56px; }
  .tt-nav-inner { gap: 12px; }
  .tt-brand-tourism, .tt-brand-tt { font-size: 1.1rem; }

  /* Dashboard action grid */
  .tt-dash-grid { grid-template-columns: 1fr 1fr !important; }

  /* Reduce card padding */
  .tt-card[style*="padding:24px"] { padding: 16px !important; }

  /* Alert banners full width */
  .tt-alert { font-size: .85rem; }

  /* Buttons */
  .tt-btn-lg { padding: 11px 20px; font-size: .95rem; }

  /* Section labels */
  .tt-section-label { font-size: .78rem; }
}

@media (max-width: 480px) {
  .tt-page-wrap, .tt-page-wrap-sm { padding: 14px 12px; }
  .tt-nav { padding: 0 12px; }

  /* Stack button rows */
  .tt-btn { width: 100%; justify-content: center; }
  .tt-btn-sm { width: auto; } /* small buttons stay inline */

  /* Dashboard grid single column on tiny */
  .tt-dash-grid { grid-template-columns: 1fr !important; }

  /* Forms */
  .tt-input, .tt-select, .tt-textarea { font-size: .95rem; }

  /* Business hours layout stacks on very small */
  [style*="display:flex;align-items:center;gap:14px"] {
    flex-wrap: wrap;
    gap: 8px !important;
  }
}

/* --- Scrollbar ------------------------------------------------- */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ============================================================
   Admin component layer — shared table / badge / stat / toolbar
   Gives every admin section the Attractions look from one source.
   ============================================================ */

/* Data tables */
.tt-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.tt-table thead th {
  padding: 12px 16px; text-align: left; white-space: nowrap;
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.tt-table thead th.center { text-align: center; }
.tt-table thead th.right  { text-align: right; }
.tt-table tbody td {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  color: var(--text-secondary); vertical-align: middle;
}
.tt-table tbody tr { transition: background .12s; }
.tt-table tbody tr:hover { background: rgba(255,255,255,0.02); }
:root[data-theme="light"] .tt-table tbody tr:hover { background: rgba(0,0,0,0.03); }
.tt-table tbody tr:last-child td { border-bottom: none; }
.tt-table .td-primary { color: var(--text-primary); font-weight: 600; }
.tt-table .td-sub { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }

/* Badges (pill) */
.tt-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--border); white-space: nowrap; line-height: 1.4;
}
.tt-badge-green  { background: rgba(16,185,129,.12); color: #10B981; border-color: rgba(16,185,129,.25); }
.tt-badge-amber  { background: rgba(245,158,11,.12); color: #F59E0B; border-color: rgba(245,158,11,.25); }
.tt-badge-red    { background: rgba(220,20,60,.12);  color: #DC143C; border-color: rgba(220,20,60,.25); }
.tt-badge-blue   { background: rgba(96,165,250,.12); color: #60a5fa; border-color: rgba(96,165,250,.22); }
.tt-badge-brand  { background: rgba(220,20,60,.12);  color: #DC143C; border-color: rgba(220,20,60,.25); }
.tt-badge-muted  { background: var(--glass); color: var(--text-muted); border-color: var(--border); }

/* Stat cards row */
.tt-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.tt-stat-card { padding: 16px 20px; display: flex; align-items: center; gap: 14px; }
.tt-stat-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .9rem; }
.tt-stat-value { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.tt-stat-label { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }

/* Toolbar (filters row) */
.tt-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.tt-toolbar form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; }
.tt-toolbar .tt-count { font-size: .8rem; color: var(--text-muted); flex-shrink: 0; }

/* Panel header strip (count / page) */
.tt-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-size: .8rem; color: var(--text-muted);
}

/* Empty state */
.tt-empty { padding: 44px 24px; text-align: center; color: var(--text-muted); }

/* Pagination */
.tt-pagination { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 16px; border-top: 1px solid var(--border); }
.tt-page-btn {
  display: inline-flex; align-items: center; padding: 5px 12px; border-radius: var(--radius-sm);
  font-size: .8rem; font-weight: 600; text-decoration: none;
  color: var(--text-secondary); border: 1px solid var(--border); background: var(--glass);
  transition: background .15s, color .15s;
}
.tt-page-btn:hover { background: var(--glass-hover); color: var(--text-primary); }
.tt-page-btn.active { background: var(--brand); color: #fff; border-color: transparent; }

@media (max-width: 768px) {
  .tt-stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tt-table { font-size: .8rem; }
  .tt-table thead th, .tt-table tbody td { padding: 10px 10px; }
  .tt-table-wrap { overflow-x: auto; }
}

/* Layout grids used by admin/vendor dashboards */
.tt-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 24px; align-items: start; }
.tt-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 24px; align-items: start; }
@media (max-width: 1024px) {
  .tt-grid-2, .tt-grid-3 { grid-template-columns: 1fr; gap: 16px; }
  .tt-grid-3 > [style*="grid-column:span 2"] { grid-column: auto !important; }
}
