/* DECIDR — Design System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@400;600;700;800&family=IBM+Plex+Sans:wght@300;400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');
/* ═══════════════════════════════════════════════
   DEFAULT = LIGHT THEME
   ═══════════════════════════════════════════════ */
:root {
  --bg-void:      #F0F2F7;
  --bg-base:      #FFFFFF;
  --bg-surface:   #FFFFFF;
  --bg-elevated:  #F4F6FB;
  --bg-hover:     #E8ECF5;
  --border:       #DDE2EE;
  --border-light: #C8D0E4;

  --amber:        #6c81b0;
  --amber-dim:    #A06800;
  --amber-glow:   rgba(212,139,0,0.12);
  --amber-subtle: rgba(212,139,0,0.07);

  --green:        #0BA563;
  --green-dim:    rgba(11,165,99,0.1);
  --red:          #E03040;
  --red-dim:      rgba(224,48,64,0.1);
  --orange:       #E07020;
  --orange-dim:   rgba(224,112,32,0.1);
  --blue:         #2563EB;
  --blue-dim:     rgba(37,99,235,0.1);

  --text-primary:   #0F172A;
  --text-secondary: #4A5568;
  --text-muted:     #94A3B8;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full: 9999px;

  --shadow-card: 0 2px 16px rgba(0,0,0,0.08);
  --shadow-glow: 0 0 32px rgba(212,139,0,0.12);

  --font-display: 'Syne', sans-serif;
  --font-body:    'IBM Plex Sans', sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;

  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ═══════════════════════════════════════════════
   DARK THEME — toggled via data-theme="dark"
   ═══════════════════════════════════════════════ */
[data-theme="dark"] {
  --bg-void:      #070B14;
  --bg-base:      #0D1220;
  --bg-surface:   #131929;
  --bg-elevated:  #1A2236;
  --bg-hover:     #212B42;
  --border:       #1E2D47;
  --border-light: #263550;

  --amber:        #F4A300;
  --amber-dim:    #B87B00;
  --amber-glow:   rgba(244,163,0,0.12);
  --amber-subtle: rgba(244,163,0,0.06);

  --green:        #10D97E;
  --green-dim:    rgba(16,217,126,0.12);
  --red:          #FF4757;
  --red-dim:      rgba(255,71,87,0.12);
  --orange:       #FF8C42;
  --orange-dim:   rgba(255,140,66,0.12);
  --blue:         #3B82F6;
  --blue-dim:     rgba(59,130,246,0.12);

  --text-primary:   #EEF2FF;
  --text-secondary: #7B8DB0;
  --text-muted:     #4A5878;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 32px rgba(244,163,0,0.15);
}


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-void);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Background texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse 80% 50% at 20% -20%, rgba(244,163,0,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(59,130,246,0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ─── LAYOUT ─── */
.app-layout { display: flex; min-height: 100vh; position: relative; z-index: 1; }

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-base);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 100;
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo a {
  text-decoration: none;
  display: flex; align-items: center; gap: 10px;
}
.logo-mark {
  width: 32px; height: 32px;
  background: var(--amber);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  color: var(--bg-void);
  letter-spacing: -0.5px;
}
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}

.sidebar-nav { flex: 1; padding: 16px 0; overflow-y: auto; }
.nav-section { padding: 0 12px 8px; margin-bottom: 4px; }
.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 8px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  border: none; background: none; width: 100%; text-align: left;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: var(--amber-subtle); color: var(--amber); }
.nav-item .nav-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.7; }
.nav-item.active .nav-icon { opacity: 1; }
.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}
.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--transition);
}
.user-card:hover { background: var(--bg-hover); }
.avatar {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-email { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-plan { font-size: 10px; color: var(--amber); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-family: var(--font-mono); }

.main-content {
  margin-left: 240px;
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-header {
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-base);
  position: sticky;
  top: 0;
  z-index: 50;
}
.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--text-primary);
}
.page-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

.page-body { padding: 28px 32px; flex: 1; }

/* (old light theme block removed — light is now default) */

/* Theme toggle button */
.theme-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 12px;
  margin-bottom: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.theme-toggle:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--amber-dim); }
/* Show/hide correct toggle label:
   Default (light): show "Switch to Dark" label
   Dark mode: show "Switch to Light" label */
.theme-icon-dark  { display: inline; }   /* default: offer dark mode */
.theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark  { display: none; }
[data-theme="dark"] .theme-icon-light { display: inline; }


.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg-void);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-card);
  animation: fadeSlideUp 0.4s ease both;
}
.auth-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 32px;
}
.auth-logo .logo-mark { width: 40px; height: 40px; font-size: 16px; }
.auth-logo .logo-text { font-size: 22px; }
.auth-headline {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.auth-subline { font-size: 14px; color: var(--text-secondary); margin-bottom: 28px; }
.auth-footer { margin-top: 20px; text-align: center; font-size: 13px; color: var(--text-secondary); }
.auth-footer a { color: var(--amber); text-decoration: none; font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }

/* ─── FORM ELEMENTS ─── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-glow);
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237B8DB0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--red); margin-top: 4px; }
.form-row { display: grid; gap: 16px; }
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }

/* Plan selector in register */
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.plan-option { display: none; }
.plan-label {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.plan-label:hover { border-color: var(--amber-dim); background: var(--amber-subtle); }
.plan-option:checked + .plan-label {
  border-color: var(--amber);
  background: var(--amber-subtle);
  box-shadow: 0 0 0 1px var(--amber);
}
.plan-name { font-weight: 700; font-size: 13px; font-family: var(--font-display); }
.plan-price { font-size: 11px; color: var(--text-muted); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  outline: none;
}
.btn-primary {
  background: var(--amber);
  color: var(--bg-void);
}
.btn-primary:hover { background: #FFB800; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(244,163,0,0.3); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--amber-dim); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-danger { background: var(--red-dim); color: var(--red); border: 1px solid rgba(255,71,87,0.2); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-success { background: var(--green-dim); color: var(--green); border: 1px solid rgba(16,217,126,0.2); }
.btn-success:hover { background: var(--green); color: var(--bg-void); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-full { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.btn-loading { position: relative; pointer-events: none; }
.btn-loading::after {
  content: '';
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ─── CARDS ─── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
}

/* ─── STATS BAR ─── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color var(--transition);
}
.stat-card:hover { border-color: var(--border-light); }
.stat-label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.stat-value { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--text-primary); }
.stat-sub { font-size: 12px; color: var(--text-secondary); }
.stat-card.amber { border-left: 3px solid var(--amber); }
.stat-card.green { border-left: 3px solid var(--green); }
.stat-card.red { border-left: 3px solid var(--red); }
.stat-card.blue { border-left: 3px solid var(--blue); }

/* ─── TABLE ─── */
.table-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.table-toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-base);
}
.search-input {
  flex: 1; max-width: 280px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 8px 12px 8px 36px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234A5878' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
}
.search-input:focus { border-color: var(--amber); }
.filter-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 7px 28px 7px 10px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%237B8DB0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

table { width: 100%; border-collapse: collapse; }
thead tr {
  background: var(--bg-base);
  border-bottom: 1px solid var(--border);
}
th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
th:hover { color: var(--text-secondary); }
td {
  padding: 13px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tbody tr { transition: background-color var(--transition); }
tbody tr:hover { background: var(--bg-elevated); }
tbody tr:last-child td { border-bottom: none; }
.td-task { color: var(--text-primary); font-weight: 500; cursor: pointer; }
.td-task:hover { color: var(--amber); }

/* ─── BADGES & PILLS ─── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.badge-open    { background: var(--green-dim);  color: var(--green); }
.badge-closed  { background: var(--bg-hover);   color: var(--text-muted); }
.badge-draft   { background: var(--blue-dim);   color: var(--blue); }

.badge-responsible { background: rgba(244,163,0,0.1);  color: var(--amber); }
.badge-decider     { background: rgba(59,130,246,0.1); color: var(--blue); }
.badge-consultant  { background: rgba(123,141,176,0.1); color: var(--text-secondary); }

/* Urgency countdown */
.urgency-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
}
.urgency-chip .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.urgency-low      { background: var(--green-dim);  color: var(--green); }
.urgency-low .dot { background: var(--green); }
.urgency-medium   { background: var(--blue-dim);   color: var(--blue); }
.urgency-medium .dot { background: var(--blue); }
.urgency-high     { background: var(--orange-dim); color: var(--orange); }
.urgency-high .dot { background: var(--orange); animation: pulse 1.5s ease infinite; }
.urgency-critical { background: var(--red-dim);    color: var(--red); }
.urgency-critical .dot { background: var(--red); animation: pulse 0.8s ease infinite; }

/* ─── ADD TASK PAGE ─── */
.add-task-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}
.form-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}
.form-section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.form-section-title .section-num {
  width: 22px; height: 22px;
  background: var(--amber);
  color: var(--bg-void);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.vote-type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.vote-type-radio { display: none; }
.vote-type-label {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 8px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.vote-type-label:hover { border-color: var(--amber-dim); background: var(--amber-subtle); }
.vote-type-radio:checked + .vote-type-label {
  border-color: var(--amber);
  background: var(--amber-subtle);
}
.vote-type-icon { font-size: 24px; }
.vote-type-name { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.vote-type-desc { font-size: 11px; color: var(--text-muted); }

/* member invite row */
.member-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  animation: fadeSlideUp 0.2s ease both;
}
.member-row .member-email { flex: 1; font-size: 13px; color: var(--text-primary); }
.member-row select { width: 120px; padding: 4px 8px; font-size: 12px; }
.member-row .weight-input { width: 60px; padding: 4px 8px; font-size: 12px; text-align: center; }
.member-row .remove-member { color: var(--text-muted); cursor: pointer; flex-shrink: 0; }
.member-row .remove-member:hover { color: var(--red); }

/* Task Preview Card */
.task-preview {
  position: sticky;
  top: 80px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.preview-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 12px;
}
.preview-task { font-size: 14px; color: var(--text-primary); font-weight: 500; margin-bottom: 12px; min-height: 40px; }
.preview-meta { display: flex; flex-direction: column; gap: 6px; }
.preview-row { display: flex; justify-content: space-between; font-size: 12px; }
.preview-key { color: var(--text-muted); }
.preview-val { color: var(--text-secondary); font-family: var(--font-mono); }

/* AI assist */
.ai-assist-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, rgba(244,163,0,0.1), rgba(59,130,246,0.1));
  border: 1px solid rgba(244,163,0,0.2);
  border-radius: var(--radius-md);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--amber);
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 8px;
}
.ai-assist-btn:hover { background: rgba(244,163,0,0.15); }
.ai-suggest { font-size: 13px; color: var(--text-secondary); padding: 12px; background: var(--bg-elevated); border-radius: var(--radius-md); margin-top: 8px; border-left: 2px solid var(--amber); display: none; }

/* ─── TASK DETAIL ─── */
.task-detail-header {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
}
.task-detail-topic {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 8px;
}
.task-detail-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}
.task-detail-meta {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-secondary);
}
.task-meta-item { display: flex; align-items: center; gap: 6px; }

.rounds-timeline {
  display: flex; gap: 0;
  margin-bottom: 20px;
  overflow-x: auto;
}
.round-item {
  flex: 1; min-width: 120px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-right: none;
  position: relative;
}
.round-item:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.round-item:last-child { border-right: 1px solid var(--border); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.round-item.active { background: var(--amber-subtle); border-color: var(--amber); z-index: 1; }
.round-num { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
.round-type { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.round-time { font-size: 11px; color: var(--text-secondary); font-family: var(--font-mono); margin-top: 2px; }
.round-status { position: absolute; top: 10px; right: 10px; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}
.responses-panel, .members-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.panel-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
}
.panel-body { padding: 16px 20px; }

.response-item {
  display: flex; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.response-item:last-child { border-bottom: none; }
.response-avatar { flex-shrink: 0; }
.response-content { flex: 1; }
.response-name { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.response-vote { font-size: 12px; margin-top: 2px; }
.response-text { font-size: 13px; color: var(--text-secondary); margin-top: 4px; line-height: 1.5; }
.response-time { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); margin-top: 4px; }

.vote-yes    { color: var(--green); font-weight: 700; }
.vote-no     { color: var(--red);   font-weight: 700; }
.vote-abstain { color: var(--text-muted); font-weight: 700; }

/* Result bar */
.result-bars { margin: 16px 0; }
.result-bar-item { margin-bottom: 10px; }
.result-bar-label { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.result-bar-label .rl-name { color: var(--text-secondary); }
.result-bar-label .rl-pct { color: var(--text-primary); font-weight: 600; font-family: var(--font-mono); }
.result-bar-track { height: 6px; background: var(--bg-hover); border-radius: var(--radius-full); overflow: hidden; }
.result-bar-fill { height: 100%; border-radius: var(--radius-full); transition: width 0.8s cubic-bezier(0.4,0,0.2,1); }

/* Comments */
.comment-form { display: flex; gap: 10px; margin-bottom: 16px; }
.comment-input { flex: 1; }
.comment-item {
  display: flex; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.comment-item:last-child { border-bottom: none; }
.comment-text { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

/* ─── COMPLETE/VOTE PAGE ─── */
.vote-page {
  max-width: 720px;
  margin: 0 auto;
}
.vote-task-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
}
.vote-task-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 10px;
}
.vote-task-text {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px; line-height: 1.35;
}
.vote-task-goal { font-size: 14px; color: var(--text-secondary); border-left: 3px solid var(--amber-dim); padding-left: 12px; margin-bottom: 16px; }

.vote-options { display: grid; gap: 10px; margin-bottom: 20px; }
.vote-option-radio { display: none; }
.vote-option-label {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
}
.vote-option-label:hover { border-color: var(--amber-dim); background: var(--amber-subtle); }
.vote-option-radio:checked + .vote-option-label {
  border-color: var(--amber);
  background: var(--amber-subtle);
  box-shadow: 0 0 0 1px var(--amber);
}
.vote-option-check {
  width: 20px; height: 20px;
  border: 2px solid var(--border-light);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.vote-option-radio:checked + .vote-option-label .vote-option-check {
  border-color: var(--amber);
  background: var(--amber);
}
.vote-option-radio:checked + .vote-option-label .vote-option-check::after {
  content: '';
  width: 8px; height: 8px;
  background: var(--bg-void);
  border-radius: 50%;
}
.vote-option-text { font-weight: 500; font-size: 15px; color: var(--text-primary); }

.vote-yn-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.vote-yn-radio { display: none; }
.vote-yn-label {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px 12px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.vote-yn-label .yn-icon { font-size: 28px; }
.vote-yn-label .yn-text { font-weight: 700; font-size: 14px; }
.vote-yn-radio[value="yes"]:checked + .vote-yn-label { border-color: var(--green); background: var(--green-dim); color: var(--green); }
.vote-yn-radio[value="no"]:checked + .vote-yn-label  { border-color: var(--red);   background: var(--red-dim);   color: var(--red); }
.vote-yn-radio[value="abstain"]:checked + .vote-yn-label { border-color: var(--text-muted); background: var(--bg-hover); color: var(--text-secondary); }
.vote-yn-label:hover { border-color: var(--amber-dim); background: var(--amber-subtle); }

/* History accordion */
.history-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow: hidden;
}
.history-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  background: none; border: none; cursor: pointer;
  color: var(--text-primary); font-weight: 600; font-size: 14px; font-family: var(--font-body);
}
.history-toggle:hover { background: var(--bg-hover); }
.history-body { padding: 0 20px 20px; display: none; }
.history-body.open { display: block; }

/* ─── TOAST NOTIFICATIONS ─── */
.toast-container {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 1000;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  min-width: 280px; max-width: 380px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: slideInRight 0.3s ease both;
}
.toast.removing { animation: slideOutRight 0.3s ease both; }
.toast-icon { flex-shrink: 0; font-size: 16px; margin-top: 1px; }
.toast-message { font-size: 14px; color: var(--text-primary); font-weight: 500; }
.toast-close { margin-left: auto; color: var(--text-muted); cursor: pointer; flex-shrink: 0; font-size: 18px; line-height: 1; }
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--amber); }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(7,11,20,0.8);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%; max-width: 520px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  transform: translateY(20px); transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.modal-close { color: var(--text-muted); cursor: pointer; font-size: 22px; line-height: 1; }
.modal-close:hover { color: var(--text-primary); }

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}
.empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.3; }
.empty-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.empty-desc { font-size: 14px; margin-bottom: 20px; }

/* ─── PROGRESS BAR ─── */
.limit-bar {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px;
}
.limit-bar-label { display: flex; justify-content: space-between; color: var(--text-muted); }
.limit-bar-track { height: 4px; background: var(--bg-hover); border-radius: var(--radius-full); overflow: hidden; }
.limit-bar-fill { height: 100%; background: var(--amber); border-radius: var(--radius-full); transition: width 0.5s ease; }
.limit-bar-fill.danger { background: var(--red); }

/* ─── UPGRADE BANNER ─── */
.upgrade-banner {
  background: linear-gradient(135deg, rgba(244,163,0,0.08), rgba(59,130,246,0.06));
  border: 1px solid rgba(244,163,0,0.2);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 20px;
}
.upgrade-banner-text { flex: 1; }
.upgrade-banner-title { font-weight: 700; font-size: 14px; color: var(--text-primary); margin-bottom: 2px; }
.upgrade-banner-sub { font-size: 12px; color: var(--text-secondary); }

/* ─── UTILITY ─── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.tag {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  background: var(--bg-hover);
  border-radius: var(--radius-full);
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}
.text-amber { color: var(--amber); }
.text-green { color: var(--green); }
.text-red   { color: var(--red); }
.text-muted { color: var(--text-muted); }
.font-mono { font-family: var(--font-mono); }
.font-display { font-family: var(--font-display); }
.fw-700 { font-weight: 700; }
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.hidden { display: none !important; }

/* ─── ANIMATIONS ─── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .add-task-layout { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .vote-yn-grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 600px) {
  .page-body { padding: 16px; }
  .page-header { padding: 16px; }
  .stats-bar { grid-template-columns: 1fr; }
  .vote-yn-grid { grid-template-columns: 1fr; }
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
}

/* ─── FLASH BANNER ─── */
.flash-banner {
  position: sticky;
  top: 0;
  z-index: 90;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.flash-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 32px;
  font-size: 14px;
  font-weight: 500;
}
.flash-success .flash-inner { background: var(--green-dim);  border-bottom: 2px solid var(--green); color: var(--green); }
.flash-error   .flash-inner { background: var(--red-dim);    border-bottom: 2px solid var(--red);   color: var(--red); }
.flash-info    .flash-inner { background: var(--amber-glow); border-bottom: 2px solid var(--amber); color: var(--amber); }
.flash-warning .flash-inner { background: var(--orange-dim); border-bottom: 2px solid var(--orange);color: var(--orange); }
.flash-icon  { font-size: 16px; flex-shrink: 0; }
.flash-message { flex: 1; color: var(--text-primary); }
.flash-close {
  margin-left: auto;
  background: none; border: none;
  font-size: 20px; line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  flex-shrink: 0;
  padding: 0 4px;
}
.flash-close:hover { color: var(--text-primary); }