:root { --bg:#0f172a; --panel:#111c33; --text:#e5e7eb; --muted:#9ca3af; --line:rgba(255,255,255,.12); --red:#ef4444; --yellow:#f59e0b; --green:#22c55e; --blue:#38bdf8; }
*{box-sizing:border-box} body{margin:0;min-height:100vh;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:radial-gradient(circle at top left,#1e3a8a 0,#0f172a 38%,#020617 100%);color:var(--text)} button{border:1px solid var(--line);background:rgba(255,255,255,.08);color:var(--text);border-radius:10px;padding:.45rem .65rem;cursor:pointer;font-weight:650}button:hover{background:rgba(255,255,255,.16)}.hidden{display:none!important}.screen{min-height:100vh;display:grid;place-items:center;padding:1rem}.card{width:min(520px,100%);border:1px solid var(--line);border-radius:24px;background:rgba(17,28,51,.92);padding:2rem;box-shadow:0 20px 70px rgba(0,0,0,.32);text-align:center}.card p,.fine-print{color:var(--muted)}.fine-print{font-size:.85rem}.app-shell{max-width:1900px;margin:0 auto;padding:1rem}.top-bar{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.2rem;border:1px solid var(--line);border-radius:20px;background:rgba(17,28,51,.92);box-shadow:0 20px 60px rgba(0,0,0,.25);margin-bottom:1rem}.top-bar h1{margin:0;font-size:clamp(1.25rem,2vw,2rem)}.top-bar p{margin:.25rem 0 0;color:var(--muted)}.top-actions{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}.user-pill{border:1px solid rgba(125,211,252,.25);background:rgba(125,211,252,.09);color:#bae6fd;border-radius:999px;padding:.4rem .7rem;font-size:.82rem}.dashboard-grid{display:grid;grid-template-columns:1.1fr 1.15fr .95fr;gap:1rem;min-height:calc(100vh - 125px)}.panel{border:1px solid var(--line);border-radius:20px;background:rgba(17,28,51,.9);box-shadow:0 20px 60px rgba(0,0,0,.22);padding:1rem;overflow:auto}.panel-header{display:flex;align-items:center;justify-content:space-between;gap:.7rem;margin-bottom:.75rem}.panel-header h2,.panel-header h3{margin:0}.panel-header.small{margin-top:1rem}.subsection,.task-section{border-top:1px solid var(--line);padding-top:.8rem;margin-top:.8rem}.task-section:first-of-type{border-top:none;margin-top:0}.task-section h3{margin:0 0 .65rem;font-size:1rem;letter-spacing:.02em}.item-list{display:flex;flex-direction:column;gap:.55rem}.item-card{border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.055);padding:.65rem}.item-main{display:grid;grid-template-columns:auto 1fr auto;align-items:start;gap:.55rem}.item-title{font-weight:750;line-height:1.25}.item-title.done{text-decoration:line-through;color:var(--muted)}.item-meta{color:var(--muted);font-size:.78rem;margin-top:.25rem}.item-details{color:#cbd5e1;font-size:.86rem;margin-top:.45rem;white-space:pre-wrap}.item-actions{display:flex;gap:.35rem}.item-actions button{padding:.28rem .45rem;font-size:.78rem}.badge{display:inline-flex;align-items:center;border-radius:999px;padding:.13rem .5rem;font-size:.72rem;margin-right:.25rem;border:1px solid var(--line)}.badge.red{background:rgba(239,68,68,.18);color:#fecaca}.badge.yellow{background:rgba(245,158,11,.18);color:#fde68a}.badge.green{background:rgba(34,197,94,.18);color:#bbf7d0}.badge.parked{background:rgba(125,211,252,.12);color:#bae6fd}.total-hours{margin-top:.7rem;padding:.7rem;border-radius:14px;background:rgba(125,211,252,.11);border:1px solid rgba(125,211,252,.25)}.ops-alert-row{display:grid;grid-template-columns:repeat(3,1fr);gap:.55rem;margin-bottom:.8rem}.stat-card{border-radius:16px;padding:.7rem;text-align:center;border:1px solid var(--line);background:rgba(255,255,255,.055)}.stat-card span{display:block;font-size:1.55rem;font-weight:850}.stat-card label{color:var(--muted);font-size:.78rem}.stat-card.red{border-color:rgba(239,68,68,.4)}.stat-card.yellow{border-color:rgba(245,158,11,.4)}.stat-card.green{border-color:rgba(34,197,94,.4)}dialog{border:1px solid var(--line);border-radius:20px;background:#0f172a;color:var(--text);width:min(700px,calc(100vw - 2rem))}dialog::backdrop{background:rgba(0,0,0,.72)}form{display:flex;flex-direction:column;gap:.8rem}label{display:flex;flex-direction:column;gap:.35rem;color:var(--muted);font-size:.9rem}input,textarea,select{width:100%;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.07);color:var(--text);padding:.65rem;font:inherit}textarea{resize:vertical}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:.8rem}menu{display:flex;justify-content:flex-end;gap:.6rem;padding:0;margin:.7rem 0 0}#summaryOutput{min-height:430px}@media(max-width:1100px){.dashboard-grid{grid-template-columns:1fr}.top-bar{align-items:flex-start;flex-direction:column}}

.dashboard-grid {
  display: grid;
  gap: 1rem;
  min-height: calc(100vh - 125px);
}

.dashboard-grid.four-col {
  grid-template-columns: 1.1fr 1fr 1fr 0.95fr;
}

.projects-panel { border-color: rgba(125, 211, 252, 0.20); }
.tasks-panel { border-color: rgba(34, 197, 94, 0.18); }
.ideas-panel { border-color: rgba(168, 85, 247, 0.20); }
.ops-panel { border-color: rgba(245, 158, 11, 0.22); }

.first-section {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.hours-section {
  margin-top: 1rem;
}






/* FIX: Keep all four dashboard sections on one row for desktop/large displays.
   If the viewport is too narrow, allow horizontal scrolling instead of wrapping
   the Watchtower underneath Column 1. */
.app-shell {
  max-width: none;
  width: 100%;
}

.dashboard-grid.four-col {
  grid-template-columns:
    minmax(310px, 1.08fr)
    minmax(285px, 1fr)
    minmax(285px, 1fr)
    minmax(310px, 0.98fr);
  min-width: 1260px;
  overflow: visible;
}

@media (max-width: 1260px) {
  .dashboard-grid.four-col {
    grid-template-columns:
      minmax(310px, 1.08fr)
      minmax(285px, 1fr)
      minmax(285px, 1fr)
      minmax(310px, 0.98fr);
    min-width: 1260px;
  }

  body {
    overflow-x: auto;
  }
}

/* FOUR COLUMN NO WRAP CONFIRMED - DEPLOY THIS VERSION */


/* ARCHIVE + COLOR FIX UPDATE */
select,
select option,
select optgroup {
  background-color: #0f172a !important;
  color: #e5e7eb !important;
}

select:focus,
input:focus,
textarea:focus {
  outline: 2px solid rgba(125, 211, 252, 0.75);
  outline-offset: 2px;
}

.active-view {
  background: rgba(125, 211, 252, 0.22) !important;
  border-color: rgba(125, 211, 252, 0.65) !important;
}

.archive-view {
  min-height: calc(100vh - 125px);
}

.archive-panel {
  min-height: calc(100vh - 125px);
}

.section-help {
  color: var(--muted);
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

.archive-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 220px));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.archive-list {
  display: grid;
  gap: 0.65rem;
}

.archive-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.055);
  padding: 0.75rem;
}

.archive-row-title {
  font-weight: 800;
}

.archive-row-meta {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.3rem;
}

.archive-empty {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 1rem;
}

/* FORCE FOUR COLUMNS - DO NOT WRAP WATCHTOWER UNDERNEATH */
.app-shell {
  max-width: none !important;
  width: 100% !important;
}

.dashboard-grid.four-col {
  display: grid !important;
  grid-template-columns:
    minmax(300px, 1.08fr)
    minmax(275px, 1fr)
    minmax(275px, 1fr)
    minmax(300px, 0.98fr) !important;
  min-width: 1200px !important;
  gap: 1rem !important;
}

@media (max-width: 1200px) {
  body {
    overflow-x: auto !important;
  }

  .dashboard-grid.four-col {
    grid-template-columns:
      minmax(300px, 1.08fr)
      minmax(275px, 1fr)
      minmax(275px, 1fr)
      minmax(300px, 0.98fr) !important;
    min-width: 1200px !important;
  }
}


/* CATEGORY DROPDOWN FIX */
select#entryCategory,
select#entryStatus {
  background-color: #0b1220 !important;
  color: #f8fafc !important;
  border: 1px solid rgba(125, 211, 252, 0.35) !important;
  min-height: 44px;
  line-height: 1.3;
  padding: 0.65rem 2.25rem 0.65rem 0.75rem;
  border-radius: 12px;
  width: 100%;
  cursor: pointer;
}

select#entryCategory option,
select#entryStatus option {
  background-color: #0b1220 !important;
  color: #f8fafc !important;
  padding: 0.5rem;
}

select#entryCategory option:hover,
select#entryStatus option:hover,
select#entryCategory option:checked,
select#entryStatus option:checked {
  background-color: #1e3a8a !important;
  color: #ffffff !important;
}

select#entryCategory:invalid {
  color: #cbd5e1 !important;
}

.two-col label {
  min-width: 0;
}


/* BRIGHT RED PRIORITY/STATUS FIX */
.badge.red {
  background: rgba(255, 31, 31, 0.32) !important;
  color: #ffffff !important;
  border-color: rgba(255, 31, 31, 0.9) !important;
  box-shadow: 0 0 0 1px rgba(255, 31, 31, 0.25);
}

.stat-card.red {
  border-color: rgba(255, 31, 31, 0.95) !important;
  background: rgba(255, 31, 31, 0.18) !important;
  box-shadow: 0 0 18px rgba(255, 31, 31, 0.12);
}

.stat-card.red span {
  color: #ff4d4d !important;
}

select#entryStatus option[value="red"] {
  background-color: #ff1f1f !important;
  color: #ffffff !important;
}
/* BRIGHT WATCHTOWER STATUS COLORS */
.stat-card.yellow {
  border-color: rgba(255, 213, 0, 0.95) !important;
  background: rgba(255, 213, 0, 0.16) !important;
  box-shadow: 0 0 18px rgba(255, 213, 0, 0.10);
}

.stat-card.yellow span {
  color: #ffd500 !important;
}

.stat-card.green {
  border-color: rgba(0, 255, 106, 0.95) !important;
  background: rgba(0, 255, 106, 0.14) !important;
  box-shadow: 0 0 18px rgba(0, 255, 106, 0.10);
}

.stat-card.green span {
  color: #00ff6a !important;
}

.badge.yellow {
  background: rgba(255, 213, 0, 0.24) !important;
  color: #fff8c2 !important;
  border-color: rgba(255, 213, 0, 0.85) !important;
}

.badge.green {
  background: rgba(0, 255, 106, 0.22) !important;
  color: #caffdd !important;
  border-color: rgba(0, 255, 106, 0.85) !important;
}

select#entryStatus option[value="yellow"] {
  background-color: #ffd500 !important;
  color: #111827 !important;
}

select#entryStatus option[value="green"] {
  background-color: #00c853 !important;
  color: #ffffff !important;
}
