
/*
  Hallmark Dashboard – Clean Rebrand Stylesheet
  - Single :root with tokens
  - No nested rules, no duplicates
  - Preserves existing classes/IDs used by HTML/JS
*/

:root {
  --bg: #0b0f17;
  --panel: #0f1623;
  --panel-2: #0b111d;
  --text: #e6edf7;
  --muted: #98a2b3;
  --primary: #5865F2;
  --primary-600: #4752C4;
  --primary-700: #3c44a5;
  --border: #1f2937;
  --success: #22c55e;
  --danger: #ef4444;
  --ring: #7c83ff;
  --ring-soft: rgba(124,131,255,.25);
  --shadow-1: 0 8px 24px rgba(0,0,0,.35);
  --shadow-2: 0 16px 60px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1000px 600px at 10% -10%, rgba(124,131,255,.08), transparent 60%),
    radial-gradient(1000px 600px at 110% 10%, rgba(88,101,242,.07), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background-attachment: fixed;
}

/* Top navigation */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; border-bottom: 1px solid var(--border);
  background: rgba(11,15,23,.55);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(255,255,255,.03), 0 8px 30px rgba(0,0,0,.35);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .3px; }
.user-slot { display:flex; align-items:center; gap: 12px; }
.user-slot .btn { padding: 8px 12px; }

/* Layout */
.container { max-width: 1240px; margin: 28px auto; padding: 0 18px; position: relative; z-index: 1; }
.app-layout { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
.content { display:flex; flex-direction: column; gap: 18px; }
.sidebar {
  position: sticky; top: 74px; height: calc(100vh - 92px);
  border:1px solid var(--border); border-radius: 14px;
  background: linear-gradient(180deg, #0e1422, #0a101b);
  box-shadow: 0 12px 40px rgba(0,0,0,.25); padding: 14px;
}
.side-nav { display:flex; flex-direction: column; gap: 14px; height: 100%; }
.side-title { font-size: .86rem; color: #a3b2c9; text-transform: uppercase; letter-spacing: .08em; }
.side-section { display:flex; flex-direction: column; gap: 8px; padding-bottom: 12px; border-bottom: 1px dashed #253046; }
.side-section + .side-section { margin-top: 8px; }
.side-footer { margin-top: auto; font-size: .85rem; color: var(--muted); }

/* Panels and cards */
.panel, .card {
  position: relative;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border:1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow-1);
}
.panel + .panel { margin-top: 18px; }
.card-header { display:flex; align-items:center; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid #1f2937; margin-bottom: 8px; }
.grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 16px; }

/* Banner */
.banner { position: relative; overflow: hidden; border-radius: 12px; background: radial-gradient(1200px 500px at -10% -40%, rgba(88,101,242,.15), transparent 60%), linear-gradient(180deg, #0f1623, #0b111d); border: 1px solid #1f2937; box-shadow: 0 16px 60px rgba(0,0,0,.35); }
.banner::after { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 300px at 120% 10%, rgba(124,131,255,.12), transparent 60%); pointer-events: none; }
.banner-body { position: relative; padding: 34px 20px; text-align: center; }
.banner-body h1 { margin: 0 0 8px; font-size: 40px; letter-spacing: .2px; }
.banner-body p { margin: 0 0 16px; color: var(--muted); }
.actions-row { display:flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn { display:inline-flex; align-items:center; justify-content:center; background: linear-gradient(180deg, #1f2937, #111827); color:var(--text); border:1px solid var(--border); padding:10px 14px; border-radius:10px; cursor:pointer; text-decoration:none; font-weight:600; transition: transform .08s ease, box-shadow .15s ease, background .2s ease, border-color .2s ease; box-shadow: 0 2px 0 rgba(255,255,255,.04) inset, 0 1px 0 rgba(0,0,0,.6); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring-soft), 0 0 0 1px var(--ring) inset; }
.btn[disabled], .btn:disabled { opacity: .58; cursor: not-allowed; filter: grayscale(.15); }
.btn.primary { background: linear-gradient(180deg, var(--primary), var(--primary-600)); border-color: transparent; color:white; box-shadow: 0 10px 30px rgba(88,101,242,.35), 0 1px 0 rgba(255,255,255,.15) inset; }
.btn.primary:hover { background: linear-gradient(180deg, var(--primary-600), var(--primary-700)); }
.btn.success { background: linear-gradient(180deg, var(--success), #17b26a); color: white; border-color: transparent; }
.btn.danger { background: linear-gradient(180deg, var(--danger), #dc2626); color: white; border-color: transparent; }
.btn.outline { background: transparent; border-color: #334155; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.subtle { background: transparent; border-color: #334155; color: #cbd5e1; }

/* Forms */
input[type="text"], input[type="number"], input[type="search"], select, textarea {
  background: #0c1320;
  color: var(--text);
  border: 1px solid #1f2937;
  border-radius: 10px;
  padding: 10px 12px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #334155; box-shadow: 0 0 0 3px var(--ring-soft); }
label { color: var(--muted); font-size: .92rem; }
.toolbar { display:flex; align-items:center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.toolbar .btn, .toolbar input, .toolbar select { height: 40px; }
.form-grid { display:grid; grid-template-columns: 1fr auto; gap: 10px 12px; margin-top: 12px; align-items: center; }
.form-grid .info-wrap { grid-column: 2; }
.form-grid details { grid-column: 1 / -1; }
.form-actions { display:flex; align-items:center; gap: 10px; grid-column: 1 / -1; margin-top: 6px; }

/* Multi-select defaults; container may override via #board-exclude-box */
select[multiple] { min-width: 260px; min-height: 180px; }
select[multiple] option { padding: 6px 8px; }
select[multiple]:focus { outline: none; box-shadow: 0 0 0 3px var(--ring-soft); }

/* Inline info tooltip */
.info-wrap { position: relative; display: inline-flex; align-items: center; }
.info { display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; border-radius:50%; border:1px solid #334155; background:#0c1320; color:#cbd5e1; font-size:12px; margin-left:4px; cursor:help; }
.info-wrap .tip { display:none; position:absolute; top:125%; left:0; min-width:220px; max-width:320px; background:#0b0f17; color:#e5e7eb; border:1px solid #334155; border-radius:8px; padding:8px 10px; box-shadow: 0 10px 30px rgba(0,0,0,.45); z-index: 50; }
.info-wrap:hover .tip { display:block; }

/* Advanced options collapsible */
.adv { width: 100%; border: 1px dashed #2a3446; border-radius: 10px; padding: 6px 10px; background: #0c1320; }
.adv summary { cursor: pointer; list-style: none; display:flex; align-items:center; gap: 8px; color:#cbd5e1; }
.adv summary::-webkit-details-marker { display:none; }
.adv .adv-body { display:flex; align-items:center; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* Table */
.table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 10px; border-radius: 12px; overflow: hidden; }
.table thead th { position: sticky; top: 0; background: #0f1623; z-index: 1; color: var(--muted); font-weight: 600; }
.table tbody tr { transition: background .15s ease; }
.table tbody tr:hover { background: rgba(255,255,255,.02); }
.table th, .table td { text-align:left; border-bottom:1px solid var(--border); padding:12px 10px; vertical-align: middle; }
.table th:nth-child(4) { width: 35%; }

/* Chips */
.pill { display:inline-flex; align-items:center; gap:6px; padding:4px 8px; border-radius:999px; border:1px solid #2a3446; color:#cdd6f4; background:#0c1320; font-size:.85rem; margin: 2px; }
.pill.success { border-color: rgba(34,197,94,.35); color:#86efac; background: rgba(34,197,94,.08); }
.pill.danger { border-color: rgba(239,68,68,.35); color:#fca5a5; background: rgba(239,68,68,.08); }

/* Notes / callouts */
.note { margin-top: 14px; background: rgba(88,101,242,.12); border: 1px solid rgba(88,101,242,.35); padding: 12px 14px; border-radius: 10px; color: #c7d2fe; display:flex; align-items:center; gap: 10px; box-shadow: 0 6px 20px rgba(88,101,242,.12) inset; }
.note.warning { background: rgba(239,68,68,.10); border-color: rgba(239,68,68,.45); color: #fecaca; }
.note.callout { background: rgba(13,20,33,.9); border-color: rgba(45,58,94,.6); color: #cbd5e1; }

/* Utility */
.page-title { font-size: 1.4rem; }
.empty { color: var(--muted); padding: 10px; }
.debug { color: #d6d3d1; background: #1f2937; border-radius: 8px; padding: 10px; white-space: pre; overflow:auto; border:1px dashed #374151; }
.hidden { display: none !important; }
.footer { text-align:center; color: var(--muted); padding: 18px 0 28px; opacity: .9; }
.muted { color: var(--muted); }
.focus-ring { box-shadow: 0 0 0 3px var(--ring-soft), 0 0 0 1px var(--ring) inset; }

/* Modal */
.modal.hidden { display: none !important; }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; animation: fadeIn .12s ease; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(2px); }
.modal-content { position: relative; width: min(820px, 96vw); max-height: 80vh; overflow: auto; background: linear-gradient(180deg, var(--panel), var(--panel-2)); border:1px solid rgba(255,255,255,.06); border-radius: 12px; padding: 16px; box-shadow: var(--shadow-2); animation: scaleIn .14s ease; }
.modal-header { display:flex; align-items:center; justify-content: space-between; margin-bottom: 8px; }

/* Emoji picker grid */
.emoji-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 10px; padding: 10px; border:1px dashed var(--border); border-radius: 10px; background:#0c1320; }
.emoji-grid button { display:flex; align-items:center; justify-content:center; width: 100%; height: 48px; border-radius: 10px; border:1px solid #2a3446; background: linear-gradient(180deg, #0e1729, #0a1221); color:#e5e7eb; cursor:pointer; transition: transform .07s ease, box-shadow .12s ease, background .2s ease; }
.emoji-grid button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0,0,0,.35); background: #132139; }
.emoji-grid button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring-soft); }
.emoji-grid button img { width: 30px; height: 30px; image-rendering: -webkit-optimize-contrast; filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); }

/* Resizable exclusions picker */
#board-exclude-box { display: inline-block; resize: both; overflow: auto; min-width: 260px; min-height: 180px; max-width: min(90vw, 640px); max-height: 60vh; width: 360px; height: 240px; }
#board-exclude-box > select { width: 100%; height: 100%; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: #334155 #0b0f17; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: #0b0f17; }
*::-webkit-scrollbar-thumb { background: #2a3446; border-radius: 10px; border: 2px solid #0b0f17; }
*::-webkit-scrollbar-thumb:hover { background: #37445a; }

/* Responsive */
@media (max-width: 720px) {
  .app-layout { grid-template-columns: 1fr; gap: 12px; }
  .sidebar { position: relative; top: 0; height: auto; }
  .banner-body h1 { font-size: 30px; }
  .grid { grid-template-columns: 1fr; }
  .nav { padding: 12px 16px; }
  .container { margin: 18px auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Animations */
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes scaleIn { from { transform: scale(.985) } to { transform: scale(1) } }
* { scrollbar-width: thin; scrollbar-color: #334155 #0b0f17; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: #0b0f17; }
*::-webkit-scrollbar-thumb { background: #2a3446; border-radius: 10px; border: 2px solid #0b0f17; }
*::-webkit-scrollbar-thumb:hover { background: #37445a; }

.focus-ring { box-shadow: 0 0 0 3px var(--ring-soft), 0 0 0 1px var(--ring) inset; }

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

@media (max-width: 720px) {
.app-layout { grid-template-columns: 1fr; gap: 12px; }
.sidebar { position: relative; top: 0; height: auto; }
.hero h1 { font-size: 30px; }
.grid { grid-template-columns: 1fr; }
.nav { padding: 12px 16px; }
.container { margin: 18px auto; }
}

@media (prefers-reduced-motion: reduce) {
* { transition: none !important; animation: none !important; }
}

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes scaleIn { from { transform: scale(.985) } to { transform: scale(1) } }
