/* ── Tech Toppers Brand Colours ── */


/* ── Base ── */
html { font-size: 15px; }
@media (min-width: 768px) { html { font-size: 16px; } }
html { position: relative; min-height: 100%; }

body {
  margin-bottom: 60px;
  background: linear-gradient(180deg, #F5F1FA 0%, var(--tt-floral) 30%);
  color: var(--tt-jet);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.02em;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

/* ── Navbar ── */
.navbar {
  background: linear-gradient(135deg, var(--tt-jet) 0%, var(--tt-jet-soft) 100%) !important;
  border-bottom: none !important;
  box-shadow: 0 2px 20px rgba(0,0,0,0.12);
  padding: 0.5rem 0;
}
.navbar .nav-link {
  color: var(--tt-periwinkle) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.navbar .nav-link:hover {
  color: #fff !important;
  background: rgba(128,97,168,0.25);
}
.navbar-brand img {
  vertical-align: middle;
  transition: transform var(--transition);
}
.navbar-brand:hover img {
  transform: scale(1.03);
}

/* ── Hamburger dropdown ── */
.dropdown-menu {
  background: var(--tt-jet);
  border: 1px solid rgba(201,201,201,0.15);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.4rem 0;
  margin-top: 0.5rem;
}
.dropdown-item {
  color: var(--tt-periwinkle);
  font-size: 0.9rem;
  padding: 0.5rem 1.2rem;
  transition: all var(--transition);
}
.dropdown-item:hover {
  background-color: var(--tt-purple);
  color: #fff;
}
.dropdown-divider {
  border-color: rgba(201,201,201,0.12);
}

/* ── Buttons ── */
.btn {
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  padding: 0.45rem 1rem;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn:active {
  transform: translateY(0);
}
.btn-primary {
  background: linear-gradient(135deg, var(--tt-purple), var(--tt-purple-soft));
  border-color: transparent;
}
.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, #6d4f96, var(--tt-purple));
  border-color: transparent;
}
.btn-outline-primary {
  color: var(--tt-purple);
  border-color: var(--tt-purple);
  background: transparent;
}
.btn-outline-primary:hover {
  background-color: var(--tt-purple);
  border-color: var(--tt-purple);
  color: #fff;
}
.btn-outline-secondary {
  border-color: var(--tt-border);
  color: var(--tt-muted);
}
.btn-outline-secondary:hover {
  background: #f3f4f6;
  color: var(--tt-jet);
}
.btn-sm {
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
}
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-check-input:focus, .form-select:focus {
  box-shadow: 0 0 0 3px rgba(128,97,168,0.2);
  border-color: var(--tt-purple);
}

/* ── Royal purple quick-switch ── */
.btn-purple {
  background: linear-gradient(135deg, var(--tt-purple), var(--tt-purple-soft));
  border-color: transparent;
  color: #fff;
}
.btn-purple:hover {
  background: linear-gradient(135deg, #6d4f96, var(--tt-purple));
  border-color: transparent;
  color: #fff;
}

/* ── Quick-switch buttons ── */
.quick-switch-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-weight: 500;
}

/* ── Cards ── */
.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--tt-border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  background: var(--tt-surface);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card-body { padding: 1.25rem; }
.card-title { font-weight: 600; }

/* ── Stats cards ── */
.border-primary { border-color: var(--tt-purple) !important; }
.border-warning { border-color: #F59E0B !important; }
.border-info    { border-color: #3B82F6 !important; }
.border-success { border-color: #10B981 !important; }

/* ── Forms ── */
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border: 1px solid var(--tt-border);
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem;
  transition: all var(--transition);
  background: var(--tt-surface);
}
.form-control:hover, .form-select:hover {
  border-color: #c4b5db;
}
.input-group .form-control {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.input-group .btn {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ── Table ── */
.table {
  --bs-table-striped-bg: rgba(128,97,168,0.03);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
}
.table thead th {
  border-bottom: none;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 0.85rem;
}
.table tbody td {
  padding: 0.7rem 0.85rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--tt-border);
}
.table tbody tr {
  transition: background var(--transition);
}
.table tbody tr:hover {
  background: rgba(128,97,168,0.04) !important;
}

/* ── Table header ── */
.table-dark {
  background: linear-gradient(135deg, var(--tt-jet), var(--tt-jet-soft)) !important;
  color: var(--tt-periwinkle) !important;
}
.table-dark th {
  color: var(--tt-periwinkle) !important;
}

/* ── Status Badges ── */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: -0.01em;
  transition: all var(--transition);
  cursor: pointer;
}
.status-badge:hover {
  filter: brightness(0.95);
}

.status-pending           { background: #FEF3C7; color: #92400E; }
.status-design-processed  { background: #DBEAFE; color: #1E40AF; }
.status-printed           { background: #D1FAE5; color: #065F46; }
.status-sublimated        { background: #CFFAFE; color: #155E75; }
.status-packaged          { background: #EDE9FE; color: #5B21B6; }
.status-fulfilled         { background: #D1FAE5; color: #065F46; }
.status-reprint-required  { background: #FEE2E2; color: #991B1B; }
.status-reprint-printed   { background: #FEF3C7; color: #92400E; }
.status-reprint-sublimated{ background: #FEF3C7; color: #92400E; }
.status-awaiting-customer-response { background: #FEE2E2; color: #991B1B; }
.status-see-notes         { background: #F3F4F6; color: #374151; }
.status-cancelled         { background: #FECACA; color: #991B1B; }
.status-unknown           { background: #F3F4F6; color: #374151; }

/* ── Thumbnails ── */
.order-thumb {
  max-height: 48px;
  width: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
}
.order-thumb:hover {
  transform: scale(1.8);
  box-shadow: var(--shadow-lg);
  z-index: 10;
  position: relative;
}
.design-thumb {
  max-height: 80px;
  width: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* ── Notes tooltip ── */
.notes-tooltip-wrapper {
  display: inline-flex;
  align-items: center;
}
.notes-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--tt-purple);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  cursor: help;
  transition: all var(--transition);
}
.notes-icon:hover {
  background: var(--tt-purple-soft);
  transform: scale(1.15);
}
.notes-tooltip-text {
  display: none;
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--tt-jet);
  color: var(--tt-floral);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  white-space: nowrap;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  font-weight: 400;
  letter-spacing: 0;
}
.notes-tooltip-wrapper:hover .notes-tooltip-text,
.notes-tooltip-text.visible {
  display: block !important;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--tt-border);
  padding: 1rem 0;
  font-size: 0.85rem;
  color: var(--tt-muted);
  background: var(--tt-surface);
}

/* ── Alerts ── */
.alert {
  border-radius: var(--radius-md);
  border: none;
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
}
.alert-info {
  background: #EFF6FF;
  color: #1E40AF;
}
.alert-light {
  background: #F9FAFB;
  border: 1px solid var(--tt-border) !important;
}

/* ── Pagination area ── */
.text-muted { color: var(--tt-muted) !important; }

/* ── Smooth scroll ── */
html { scroll-behavior: smooth; }

/* ── Selection ── */
::selection {
  background: rgba(128,97,168,0.2);
  color: var(--tt-jet);
}

/* ═══════════════════════════════════════════════════════════
   DARK MODE (shared layout pages)
   ═══════════════════════════════════════════════════════════ */
body.dark {
  background: #2F2F2F !important;
  color: #C9C9C9;
}
body.dark .navbar { background: var(--tt-jet) !important; border-color: rgba(128,97,168,0.2) !important; }
body.dark .navbar .nav-link { color: rgba(201,201,201,0.7) !important; }
body.dark .navbar .nav-link:hover { color: #fff !important; }
body.dark .navbar .nav-link.text-warning { color: #FBBF24 !important; }
body.dark /* The brightness lift existed to pick the OLD dark logo off the jet navbar. The mark is now
    authored in its final colour (purple/white), so lifting it would wash the purple out to
    lavender. Scoped to the legacy file so it still behaves if that logo is ever used again. */
 .navbar-brand img[src$="tech-toppers-logo.svg"] { filter: brightness(1.5); }
 /* The mark is authored in its final colour, so it opts out of any brand-level filter. */
 .navbar-brand img.brand-mark { filter: none; }
body.dark .border-bottom { border-color: rgba(201,201,201,0.1) !important; }
body.dark .box-shadow { box-shadow: 0 1px 3px rgba(0,0,0,0.4) !important; }
body.dark .card { background: #3A3A3A; border-color: rgba(201,201,201,0.12); }
body.dark .card-header, body.dark .card-footer { background: rgba(0,0,0,0.2); border-color: rgba(201,201,201,0.1); }
body.dark .card-body { color: #C9C9C9; }
body.dark .text-muted { color: #888 !important; }
body.dark .text-dark { color: #C9C9C9 !important; }
body.dark .bg-white { background: #3A3A3A !important; }
body.dark .bg-light { background: rgba(0,0,0,0.2) !important; }
body.dark .btn { color: #C9C9C9; }
body.dark .btn-outline-secondary { border-color: rgba(201,201,201,0.2); color: #AAA; }
body.dark .btn-outline-secondary:hover { background: rgba(128,97,168,0.15); border-color: rgba(128,97,168,0.3); color: #fff; }
body.dark .btn-outline-light { border-color: rgba(201,201,201,0.2); color: #AAA; }
body.dark .btn-primary { background: var(--tt-purple); border-color: var(--tt-purple); }
body.dark .btn-danger { background: #B91C1C; border-color: #B91C1C; }
body.dark .btn-success { background: #15803D; border-color: #15803D; }
body.dark .btn-purple { background: var(--tt-purple); border-color: var(--tt-purple); color: #fff; }
body.dark .btn-dark { background: #1a1a1a; border-color: #1a1a1a; }
body.dark .form-control, body.dark .form-select { background: rgba(0,0,0,0.3); border-color: rgba(201,201,201,0.15); color: #ccc; }
body.dark .form-control:focus, body.dark .form-select:focus { border-color: var(--tt-purple); background: rgba(0,0,0,0.4); color: #fff; }
body.dark .form-control::placeholder { color: #666; }
body.dark .form-label { color: #AAA; }
body.dark .input-group-text { background: rgba(0,0,0,0.3); border-color: rgba(201,201,201,0.15); color: #AAA; }
body.dark .dropdown-menu { background: #3A3A3A; border-color: rgba(201,201,201,0.15); }
body.dark .dropdown-item { color: #C9C9C9; }
body.dark .dropdown-item:hover { background: rgba(128,97,168,0.2); color: #fff; }
body.dark .dropdown-divider { border-color: rgba(201,201,201,0.1); }
body.dark .modal-content { background: #3A3A3A; border-color: rgba(201,201,201,0.15); }
body.dark .modal-header, body.dark .modal-footer { border-color: rgba(201,201,201,0.1); }
body.dark .modal-title { color: #C9C9C9; }
body.dark .btn-close { filter: invert(1); }
body.dark .table { color: #C9C9C9; }
body.dark .table-striped > tbody > tr:nth-of-type(odd) { background: rgba(0,0,0,0.15); color: #C9C9C9; }
body.dark .table-hover > tbody > tr:hover { background: rgba(128,97,168,0.1); }
body.dark .badge { color: #fff; }
body.dark .footer { background: rgba(0,0,0,0.2) !important; border-color: rgba(201,201,201,0.1) !important; }
body.dark hr, body.dark .border { border-color: rgba(201,201,201,0.1) !important; }
body.dark .list-group-item { background: #3A3A3A; border-color: rgba(201,201,201,0.1); color: #C9C9C9; }
body.dark a:not(.btn):not(.nav-link):not(.navbar-brand):not(.dropdown-item) { color: #9B7EC4; }
body.dark code { color: #C9C9C9; background: rgba(0,0,0,0.3); }
body.dark pre { background: rgba(0,0,0,0.3); color: #C9C9C9; }
body.dark ::-webkit-scrollbar-thumb { background: #555; }
body.dark ::-webkit-scrollbar-thumb:hover { background: #777; }
body.dark blockquote { border-left-color: rgba(128,97,168,0.4); color: #AAA; }
body.dark .alert-secondary { background: rgba(0,0,0,0.3); border-color: rgba(201,201,201,0.15); color: #C9C9C9; }

/* Theme toggle (in navbar) */
.theme-toggle-nav {
  background: none; border: 1px solid rgba(201,201,201,0.2); border-radius: 14px;
  color: rgba(201,201,201,0.7); cursor: pointer; padding: 2px 8px;
  font-size: 0.9rem; transition: all 0.15s; font-family: inherit;
  line-height: 1; margin-left: 6px;
}
.theme-toggle-nav:hover { background: rgba(128,97,168,0.2); color: #fff; border-color: rgba(128,97,168,0.4); }


/* ═══════════════════════════════════════════════════════════
   Job Planner dark mode overrides
   ═══════════════════════════════════════════════════════════ */
body.dark .jp-filter-btn { background: rgba(0,0,0,0.3) !important; border-color: rgba(201,201,201,0.15) !important; color: #AAA !important; }
body.dark .jp-filter-btn.active { background: var(--tt-purple) !important; color: #fff !important; border-color: var(--tt-purple) !important; }
body.dark .jp-type-dropdown { background: #3A3A3A !important; border-color: rgba(201,201,201,0.15) !important; }
body.dark .jp-type-dd-item:hover { background: rgba(128,97,168,0.15) !important; }
body.dark .jp-column { background: rgba(0,0,0,0.15) !important; }
body.dark .jp-col-header { background: #3A3A3A !important; border-color: rgba(201,201,201,0.15) !important; color: #C9C9C9 !important; }
body.dark .jp-col-body.drag-over { background: rgba(128,97,168,0.1) !important; }
body.dark .jp-card { background: #3A3A3A !important; border-color: rgba(201,201,201,0.12) !important; color: #C9C9C9 !important; }
body.dark .jp-card-title { color: #C9C9C9 !important; }
body.dark .jp-card-summary { color: #AAA !important; }
body.dark .jp-move-btn { background: rgba(0,0,0,0.3) !important; border-color: rgba(201,201,201,0.15) !important; color: #AAA !important; }
body.dark .jp-move-btn:hover { background: var(--tt-purple) !important; color: #fff !important; }
body.dark .jp-icon-btn { color: #888 !important; }
body.dark .jp-icon-btn:hover { background: rgba(128,97,168,0.15) !important; color: #fff !important; }
body.dark .jp-icon-btn.danger:hover { color: #F87171 !important; background: rgba(239,68,68,0.15) !important; }
body.dark .jp-calendar-panel { background: #3A3A3A !important; }
body.dark .jp-cal-dow { color: #888 !important; }
body.dark .jp-cal-day:hover { background: rgba(128,97,168,0.1) !important; }
body.dark .jp-cal-day.today { background: rgba(128,97,168,0.15) !important; }
body.dark .jp-cal-popup { background: #3A3A3A !important; border-color: rgba(201,201,201,0.15) !important; }
body.dark .jp-goal-card { background: rgba(0,0,0,0.15) !important; border-color: rgba(201,201,201,0.12) !important; }
body.dark .jp-goal-card-title { color: #C9C9C9 !important; }
body.dark .jp-goal-card-detail { color: #888 !important; }
body.dark .jp-goals-title { color: #C9C9C9 !important; }
body.dark .jp-goals-empty { color: #888 !important; }
body.dark .jp-modal { background: #3A3A3A !important; }
body.dark .jp-modal-overlay { background: rgba(0,0,0,0.5) !important; }
body.dark .jp-dep-flowchart-panel { background: #3A3A3A !important; }
body.dark .jp-flow-node { background: #3A3A3A !important; border-color: rgba(201,201,201,0.15) !important; }
body.dark .jp-flow-node.blocked-node { border-color: rgba(251,191,36,0.5) !important; background: rgba(251,191,36,0.08) !important; }
body.dark .jp-dep-badge.dep-has { background: rgba(0,0,0,0.2) !important; color: #AAA !important; }
body.dark .jp-dep-badge.dep-blocked { background: rgba(217,119,6,0.15) !important; color: #FBBF24 !important; }
body.dark .jp-dep-badge.dep-blocks { background: rgba(59,130,246,0.15) !important; color: #93C5FD !important; }
body.dark .jp-dep-entry:hover { background: rgba(128,97,168,0.1) !important; }
body.dark .jp-dep-add-btn { border-color: rgba(201,201,201,0.15) !important; color: #AAA !important; }
body.dark .jp-dep-add-btn:hover { background: rgba(128,97,168,0.1) !important; border-color: var(--tt-purple) !important; }
body.dark .jp-dep-picker-item:hover { background: rgba(128,97,168,0.1) !important; }
body.dark .jp-dep-picker-item.selected { background: rgba(128,97,168,0.15) !important; }
body.dark .jp-blocked-warning { background: rgba(251,191,36,0.1) !important; border-color: rgba(251,191,36,0.3) !important; color: #FBBF24 !important; }
body.dark .jp-dep-warning { background: rgba(251,191,36,0.1) !important; border-color: rgba(251,191,36,0.3) !important; color: #FBBF24 !important; }
body.dark .jp-filter-label { color: #AAA !important; }
body.dark .jp-col-count { color: #888 !important; }
body.dark .jp-col-empty { color: #888 !important; }
body.dark .jp-subtask-count { color: #888 !important; }
body.dark .jp-subtask-text { color: #888 !important; }
body.dark .jp-note-time { color: #888 !important; }
body.dark .jp-goal-card-remove { color: #888 !important; }
body.dark .jp-header h2 { color: #C9C9C9 !important; }

/* ═══════════════════════════════════════════════════════════
   Content Planner dark mode overrides
   ═══════════════════════════════════════════════════════════ */
body.dark .cp-modal { background: #3A3A3A !important; }
body.dark .cp-day-popup { background: #3A3A3A !important; }
body.dark .status-idea { background: rgba(0,0,0,0.2) !important; color: #AAA !important; }
body.dark .status-archived { background: rgba(0,0,0,0.2) !important; color: #AAA !important; }

/* Orders dark mode */
body.dark .accordion-button { background: #3A3A3A !important; color: #C9C9C9 !important; }
body.dark .accordion-button:not(.collapsed) { background: rgba(128,97,168,0.15) !important; color: #fff !important; }
body.dark .accordion-button::after { filter: invert(1); }
body.dark .accordion-body { background: #333 !important; color: #C9C9C9 !important; }
body.dark .accordion-item { background: #3A3A3A !important; border-color: rgba(201,201,201,0.12) !important; }
body.dark .collapse.show { background: #333 !important; }
body.dark .card.border-danger { background: #3A3A3A !important; border-color: rgba(239,68,68,0.3) !important; }

/* Orders detail collapse */
body.dark .collapse, body.dark .collapse.show { background: #333 !important; }
body.dark div[style*="background:#fafafa"] { background: #333 !important; }
body.dark .row.mt-4 { background: transparent !important; }
body.dark .text-success { color: #4ADE80 !important; }
body.dark .bg-success { background: #15803D !important; }
body.dark .alert-success { background: rgba(21,128,61,0.2) !important; border-color: rgba(21,128,61,0.3) !important; color: #4ADE80 !important; }

/* ── Deployment label ────────────────────────────────────────────────────────────────────
   Two deployments of the same build share one look, so the navbar says which one you are on.
   It reads against the dark jet navbar; it is not a link, just a signpost. */
.brand-role {
    color: var(--tt-periwinkle);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid rgba(201, 201, 201, 0.28);
    white-space: nowrap;
    vertical-align: middle;
}
@media (max-width: 576px) { .brand-role { display: none; } }
