/* Ícone Studio – Dark + Purple Gradient System */
:root {
  --bg-0: #07050d;
  --bg-1: #0d0817;
  --bg-2: #130c22;
  --surface: #16102a;
  --surface-2: #1d1538;
  --surface-3: #261b48;
  --border: rgba(139, 92, 246, 0.14);
  --border-strong: rgba(139, 92, 246, 0.28);
  --text: #f0ecff;
  --text-dim: #b5a8d6;
  --text-muted: #7a6e9a;
  --violet: #8b5cf6;
  --violet-2: #a855f7;
  --magenta: #d946ef;
  --pink: #ec4899;
  --grad: linear-gradient(135deg, #7c3aed 0%, #a855f7 35%, #d946ef 70%, #ec4899 100%);
  --grad-soft: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(217,70,239,0.18));
  --grad-text: linear-gradient(135deg, #c4b5fd 0%, #f0abfc 100%);
  --green: #22d3a4;
  --yellow: #fbbf24;
  --red: #f87171;
  --blue: #60a5fa;
  --shadow-glow: 0 12px 40px -8px rgba(168, 85, 247, 0.45);
  --radius: 14px;
  --radius-lg: 18px;
  --radius-sm: 10px;
  --font-display: "Space Grotesk", "Helvetica Neue", sans-serif;
  --font-body: "Manrope", "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv01";
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.backdrop {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.backdrop::before {
  content: ""; position: absolute; top: -20%; left: -10%;
  width: 60%; height: 60%;
  background: radial-gradient(circle, rgba(168,85,247,0.18), transparent 70%);
  filter: blur(80px);
}
.backdrop::after {
  content: ""; position: absolute; bottom: -20%; right: -10%;
  width: 55%; height: 55%;
  background: radial-gradient(circle, rgba(236,72,153,0.12), transparent 70%);
  filter: blur(80px);
}

.app {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
  border-right: 1px solid var(--border);
  padding: 22px 16px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 0; }

.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 8px 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--grad);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700; font-size: 18px; color: white;
  box-shadow: var(--shadow-glow);
  position: relative; overflow: hidden;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 1px; border-radius: 10px;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.45), transparent 60%);
  pointer-events: none;
}
.brand-mark.brand-mark-img {
  background: transparent;
  box-shadow: none;
  padding: 0;
  overflow: hidden;
}
.brand-mark.brand-mark-img::after { display: none; }
.brand-mark.brand-mark-img img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.brand-name {
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  letter-spacing: -0.01em; line-height: 1.1;
}
.brand-sub {
  font-size: 10.5px; color: var(--text-muted);
  letter-spacing: 0.12em; text-transform: uppercase;
}

.nav-section-label {
  font-size: 10px; color: var(--text-muted);
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 16px 10px 6px; font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: var(--radius-sm);
  color: var(--text-dim); cursor: pointer;
  font-size: 13.5px; font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  position: relative;
  text-decoration: none;
}
.nav-item:hover { background: rgba(139,92,246,0.06); color: var(--text); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(217,70,239,0.10));
  border-color: var(--border-strong); color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.nav-item.active::before {
  content: ""; position: absolute; left: -16px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 2px;
  background: var(--grad);
}
.nav-item .badge {
  margin-left: auto; font-size: 10px;
  padding: 2px 7px; border-radius: 99px;
  background: rgba(217,70,239,0.18); color: #f0abfc; font-weight: 600;
}
.nav-icon {
  width: 16px; height: 16px;
  display: grid; place-items: center; opacity: 0.85;
}

.sidebar-foot {
  margin-top: auto; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 8px; border-radius: var(--radius-sm);
  cursor: pointer; text-decoration: none; color: inherit;
}
.user-card:hover { background: rgba(139,92,246,0.06); }
.avatar {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--grad);
  display: grid; place-items: center;
  color: white; font-weight: 600; font-size: 13px;
  font-family: var(--font-display);
}
.user-meta { line-height: 1.2; }
.user-meta b { font-size: 12.5px; font-weight: 600; }
.user-meta span { font-size: 11px; color: var(--text-muted); display: block; margin-top: 1px; }

/* MAIN */
.main { padding: 28px 36px 60px; min-width: 0; }

.topbar {
  display: flex; align-items: center; gap: 16px; margin-bottom: 26px;
}
.page-title {
  font-family: var(--font-display); font-size: 26px; font-weight: 600;
  letter-spacing: -0.02em; margin: 0; line-height: 1.1;
}
.page-sub { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.topbar-spacer { flex: 1; }

.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 11px; padding: 9px 13px; min-width: 280px;
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative;
}
.search:focus-within {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.12);
}
.search input {
  flex: 1; background: transparent; border: 0; color: var(--text);
  font-family: inherit; font-size: 13px; outline: none;
}
.search input::placeholder { color: var(--text-muted); }
.kbd {
  font-family: var(--font-mono); font-size: 10px;
  padding: 2px 6px; border-radius: 5px;
  background: rgba(139,92,246,0.10); border: 1px solid var(--border);
  color: var(--text-dim);
}

.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,0.6);
  z-index: 50;
  max-height: 420px;
  overflow-y: auto;
  display: none;
}
.search-results.open { display: block; }
.search-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.search-result-item:hover { background: rgba(139,92,246,0.08); }
.search-result-item:last-child { border-bottom: 0; }

.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-dim);
  cursor: pointer; position: relative; text-decoration: none;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn .dot {
  position: absolute; top: 8px; right: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--magenta);
  box-shadow: 0 0 0 2px var(--bg-0);
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-family: inherit; font-size: 13px;
  font-weight: 500; cursor: pointer; transition: all 0.15s;
  text-decoration: none;
}
.btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn-primary {
  background: var(--grad); border-color: transparent;
  color: white; font-weight: 600;
  box-shadow: 0 8px 24px -8px rgba(168,85,247,0.55);
}
.btn-primary:hover { background: var(--grad); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(139,92,246,0.08); }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn-danger { background: rgba(248,113,113,0.12); color: var(--red); border-color: rgba(248,113,113,0.3); }
.btn-danger:hover { background: rgba(248,113,113,0.2); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  position: relative; overflow: hidden;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.card-title {
  font-family: var(--font-display); font-size: 15px; font-weight: 600;
  letter-spacing: -0.01em; margin: 0;
}
.card-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* STAT */
.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 22px;
}
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  position: relative; overflow: hidden;
}
.stat::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168,85,247,0.45), transparent);
}
.stat-label {
  font-size: 11.5px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.stat-value {
  font-family: var(--font-display); font-size: 28px;
  font-weight: 600; letter-spacing: -0.02em; margin-top: 10px;
}
.stat-delta {
  font-size: 12px; margin-top: 6px;
  display: flex; align-items: center; gap: 5px;
}
.stat-delta.up { color: var(--green); }
.stat-delta.down { color: var(--red); }

.table {
  width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px;
}
.table th {
  text-align: left; font-weight: 600; font-size: 11px;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.08em; padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(139,92,246,0.03);
}
.table td {
  padding: 14px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: rgba(139,92,246,0.05); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; font-size: 11px; border-radius: 99px;
  background: rgba(139,92,246,0.10); color: var(--text-dim);
  border: 1px solid var(--border); font-weight: 500;
}
.chip.green  { background: rgba(34,211,164,0.10); color: var(--green); border-color: rgba(34,211,164,0.25); }
.chip.yellow { background: rgba(251,191,36,0.10); color: var(--yellow); border-color: rgba(251,191,36,0.25); }
.chip.red    { background: rgba(248,113,113,0.10); color: var(--red); border-color: rgba(248,113,113,0.25); }
.chip.blue   { background: rgba(96,165,250,0.10); color: var(--blue); border-color: rgba(96,165,250,0.25); }
.chip.purple { background: rgba(168,85,247,0.14); color: #d8b4fe; border-color: rgba(168,85,247,0.30); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.client-avatar {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600;
  font-size: 13px; color: white; flex-shrink: 0;
}
.client-row { display: flex; align-items: center; gap: 12px; }
.client-row b { font-weight: 600; font-size: 13.5px; }
.client-row .sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; display: block; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.20); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,0.35); }

.progress {
  width: 100%; height: 6px;
  background: rgba(139,92,246,0.10);
  border-radius: 3px; overflow: hidden;
}
.progress > div {
  height: 100%; background: var(--grad); border-radius: 3px;
}

.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }

.detail-overlay {
  position: fixed; inset: 0;
  background: rgba(7,5,13,0.65);
  backdrop-filter: blur(8px);
  z-index: 50;
  display: flex; justify-content: flex-end;
}
.detail-panel {
  width: min(960px, 92vw); height: 100vh;
  background: var(--bg-1);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  animation: slideIn 0.25s ease-out;
}
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.detail-head {
  padding: 26px 32px 22px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(124,58,237,0.10), transparent);
  position: relative;
}
.detail-body { padding: 24px 32px; }

.tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px; overflow-x: auto;
}
.tab {
  padding: 10px 14px; font-size: 13px;
  color: var(--text-dim); cursor: pointer;
  border-bottom: 2px solid transparent;
  font-weight: 500; white-space: nowrap;
  text-decoration: none;
  background: none; border-left: 0; border-right: 0; border-top: 0;
  font-family: inherit;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--violet-2); }

label.field { display: block; margin-bottom: 14px; }
label.field > span {
  display: block; font-size: 11.5px; color: var(--text-dim);
  margin-bottom: 6px; font-weight: 500; letter-spacing: 0.02em;
}
.input, .textarea, .select {
  width: 100%; background: var(--bg-1);
  border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 10px 12px;
  font-family: inherit; font-size: 13px; outline: none;
  transition: border-color 0.15s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--violet); }
.textarea { resize: vertical; min-height: 90px; font-family: inherit; }

.divider { height: 1px; background: var(--border); margin: 18px 0; }

.meta-list { display: grid; gap: 8px; }
.meta-row {
  display: grid; grid-template-columns: 130px 1fr;
  gap: 12px; font-size: 13px; align-items: center;
}
.meta-row .k { color: var(--text-muted); font-size: 12px; }
.meta-row .v { color: var(--text); word-break: break-word; }
.copy-btn {
  font-family: var(--font-mono); font-size: 11px;
  background: var(--bg-2); padding: 3px 8px;
  border-radius: 6px; border: 1px solid var(--border);
  cursor: pointer; color: var(--text-dim);
}
.copy-btn:hover { color: var(--text); }

.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.calendar {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
}
.cal-cell {
  aspect-ratio: 1;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px; font-size: 11px;
  display: flex; flex-direction: column;
  position: relative; min-height: 88px;
}
.cal-cell.muted { opacity: 0.35; }
.cal-cell.today {
  border-color: var(--violet);
  box-shadow: 0 0 0 1px rgba(139,92,246,0.3) inset;
}
.cal-event {
  font-size: 9.5px; border-radius: 4px; padding: 2px 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border: 1px solid;
}

.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kanban-col {
  background: rgba(13,8,23,0.7); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  min-height: 300px;
}
.kanban-col-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-dim);
}
.task-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px; margin-bottom: 10px;
  cursor: grab; font-size: 12.5px;
}
.task-card:hover { border-color: var(--border-strong); }
.task-card .t-meta {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px; font-size: 11px; color: var(--text-muted);
}

.bars { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding: 0 4px; }
.bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar { width: 100%; max-width: 28px; background: var(--grad); border-radius: 5px 5px 0 0; transition: opacity 0.15s; }
.bar:hover { opacity: 0.85; }
.bar-lbl { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); }

.scroll-thin { max-height: 320px; overflow-y: auto; padding-right: 4px; }

.host-icon {
  width: 38px; height: 38px; border-radius: 9px;
  background: linear-gradient(135deg, #1d1538, #2a1b48);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 11px; font-weight: 700; letter-spacing: -0.02em;
}

.note {
  background: linear-gradient(135deg, rgba(124,58,237,0.06), rgba(217,70,239,0.04));
  border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; font-size: 13px; margin-bottom: 10px;
}
.note .meta { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }

.pub-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 8px; font-size: 12.5px;
}
.pub-thumb {
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--grad-soft); border: 1px solid var(--border);
  display: grid; place-items: center; flex-shrink: 0;
}

.portal { background: var(--bg-0); min-height: 100vh; }
.portal-head {
  background: linear-gradient(180deg, rgba(124,58,237,0.18), transparent 80%);
  padding: 26px 36px 40px;
  border-bottom: 1px solid var(--border);
}
.portal-logo {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700; font-size: 22px; color: white;
}

/* Login */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px; position: relative; z-index: 1;
}
.login-card {
  width: 100%; max-width: 420px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px;
  box-shadow: var(--shadow-glow);
}

.alert {
  padding: 12px 14px; border-radius: 10px;
  margin-bottom: 14px; font-size: 13px; border: 1px solid;
}
.alert-error { background: rgba(248,113,113,0.08); border-color: rgba(248,113,113,0.3); color: var(--red); }
.alert-success { background: rgba(34,211,164,0.08); border-color: rgba(34,211,164,0.3); color: var(--green); }
.alert-warning { background: rgba(251,191,36,0.08); border-color: rgba(251,191,36,0.3); color: var(--yellow); }

/* ============================================================================
   MODAL DE CONFIRMAÇÃO / ALERTA — substitui confirm()/alert() nativos
   ============================================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(7, 5, 13, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.18s ease-out;
}
.modal-overlay.show { opacity: 1; }

.modal-card {
  width: 100%; max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 32px 80px -16px rgba(168, 85, 247, 0.35),
              0 8px 24px -8px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  position: relative;
  transform: translateY(12px) scale(0.97);
  opacity: 0;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.18s ease-out;
}
.modal-overlay.show .modal-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.modal-card::before {
  content: ""; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad);
}

.modal-body {
  padding: 28px 28px 6px;
  text-align: center;
}
.modal-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  margin: 0 auto 18px;
  display: grid; place-items: center;
  font-size: 26px;
  box-shadow: 0 12px 32px -8px currentColor;
}
.modal-icon.danger {
  background: linear-gradient(135deg, rgba(248,113,113,0.22), rgba(220,38,38,0.10));
  border: 1px solid rgba(248,113,113,0.35);
  color: var(--red);
}
.modal-icon.warning {
  background: linear-gradient(135deg, rgba(251,191,36,0.22), rgba(217,119,6,0.10));
  border: 1px solid rgba(251,191,36,0.35);
  color: var(--yellow);
}
.modal-icon.info {
  background: linear-gradient(135deg, rgba(124,58,237,0.22), rgba(217,70,239,0.10));
  border: 1px solid rgba(124,58,237,0.40);
  color: var(--violet-2);
}
.modal-icon.success {
  background: linear-gradient(135deg, rgba(34,211,164,0.22), rgba(5,150,105,0.10));
  border: 1px solid rgba(34,211,164,0.35);
  color: var(--green);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.modal-message {
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0;
}
.modal-message p { margin: 0 0 8px; }
.modal-message p:last-child { margin: 0; }
.modal-message b, .modal-message strong { color: var(--text); }

.modal-footer {
  padding: 22px 28px 26px;
  display: flex; gap: 10px;
  justify-content: center;
}
.modal-footer .btn { min-width: 110px; justify-content: center; }
.modal-footer .btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-color: transparent;
  color: white; font-weight: 600;
  box-shadow: 0 8px 24px -8px rgba(248, 113, 113, 0.5);
}
.modal-footer .btn-danger:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  transform: translateY(-1px);
}

@keyframes modalShake {
  0%, 100% { transform: translateY(0) scale(1); }
  25% { transform: translateY(0) scale(1) translateX(-6px); }
  75% { transform: translateY(0) scale(1) translateX(6px); }
}
.modal-overlay.shake .modal-card { animation: modalShake 0.32s ease; }

.toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 1000;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 16px;
  font-size: 13px; min-width: 240px;
  animation: slideIn 0.25s ease-out;
  box-shadow: var(--shadow-glow);
}
.toast.success { border-color: rgba(34,211,164,0.4); }
.toast.error { border-color: rgba(248,113,113,0.4); }

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr 1fr; }
  .kanban { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 20px; }
}
