/* Styles forked from the legacy dashboard.html — dark blue/purple/pink, radial gradients. */
:root { color-scheme: dark; }
* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse 1100px 650px at 12% -8%, rgba(90,110,255,0.16), transparent 60%),
    radial-gradient(ellipse 900px 700px at 100% 5%, rgba(232,93,158,0.13), transparent 55%),
    radial-gradient(ellipse 800px 600px at 50% 100%, rgba(124,92,255,0.10), transparent 60%),
    #0c0b13;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e9e6f4;
  min-height: 100vh;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 36px 28px 60px; }
@media (max-width: 640px) { .wrap { padding: 20px 14px 40px; } }

.header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 32px; gap: 14px; flex-wrap: wrap; }
.header h1 {
  font-size: 22px; font-weight: 700; margin: 0; letter-spacing: 0.6px; text-transform: uppercase;
  background: linear-gradient(90deg, #7fa2ff, #b8a4ff 45%, #f0a3cf 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.header .sub { font-size: 13px; color: #948fb0; margin-top: 6px; }

.refresh-btn {
  border: 1px solid rgba(140,150,255,0.35); background: rgba(90,110,255,0.10);
  border-radius: 9px; padding: 7px 14px; font-size: 13px; cursor: pointer; color: #d9d3f7;
}
.refresh-btn:hover { background: rgba(90,110,255,0.22); border-color: rgba(140,150,255,0.6); }

.section { margin-bottom: 40px; }
.section-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.6px;
  color: #9db3ff; margin-bottom: 16px;
}
.section.pink .section-label { color: #f0a3cf; }
.section-label .line { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(140,150,255,0.35), transparent); }
.section.pink .section-label .line { background: linear-gradient(90deg, rgba(232,93,158,0.35), transparent); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; }
.grid.ventures { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: linear-gradient(160deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015)), #15131f;
  border: 1px solid rgba(140,150,255,0.14);
  border-radius: 14px; padding: 20px 22px;
  position: relative;
}
.card:hover { border-color: rgba(140,150,255,0.32); }
.card h2 {
  font-size: 14.5px; font-weight: 600; margin: 0 0 14px 0;
  display: flex; align-items: center; gap: 8px; color: #f1eefb;
}
.card h2 .count {
  font-size: 11.5px; font-weight: 500; color: #b9c8ff;
  background: rgba(90,110,255,0.16); border: 1px solid rgba(140,150,255,0.25);
  border-radius: 20px; padding: 2px 9px;
}

.list { display: flex; flex-direction: column; gap: 14px; max-height: 420px; overflow-y: auto; }
.item { border-bottom: 1px solid rgba(140,150,255,0.10); padding-bottom: 13px; }
.item:last-child { border-bottom: none; padding-bottom: 0; }
.item .title { font-size: 13.5px; font-weight: 500; margin: 0 0 4px 0; color: #f1eefb; line-height: 1.45; }
.item .meta { font-size: 12px; color: #948fb0; line-height: 1.5; }

.badge { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 10px; margin-right: 7px; }
.badge.today { background: rgba(240,163,207,0.20); color: #f6c2df; border: 1px solid rgba(240,163,207,0.35); }
.badge.soon { background: rgba(127,162,255,0.18); color: #b9c8ff; border: 1px solid rgba(127,162,255,0.32); }
.badge.unread { background: rgba(184,164,255,0.20); color: #d9c9ff; border: 1px solid rgba(184,164,255,0.4); }

.empty { font-size: 13px; color: #7d7896; padding: 8px 0; line-height: 1.6; }
.loading { font-size: 13px; color: #7d7896; }
.full { grid-column: 1 / -1; }
a { color: #9db3ff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Venture cards */
.venture-card {
  background: linear-gradient(150deg, rgba(90,110,255,0.14), rgba(232,93,158,0.10) 70%), #15131f;
  border: 1px solid rgba(140,150,255,0.22);
  border-radius: 14px; padding: 22px 22px 20px;
  display: flex; flex-direction: column; gap: 10px;
  cursor: pointer; position: relative;
}
.venture-card:hover { border-color: rgba(232,93,158,0.5); }
.venture-card .v-name { font-size: 15.5px; font-weight: 600; color: #f6f4ff; }
.venture-card .v-status {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content;
  font-size: 11px; font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase;
  padding: 3px 10px; border-radius: 20px; border: none; cursor: pointer; font-family: inherit;
}
.v-status.dev { background: rgba(127,162,255,0.16); color: #b9c8ff; border: 1px solid rgba(127,162,255,0.3); }
.v-status.live { background: rgba(140,220,190,0.14); color: #a6e6cf; border: 1px solid rgba(140,220,190,0.3); }
.v-status.paused { background: rgba(232,93,158,0.16); color: #f6c2df; border: 1px solid rgba(232,93,158,0.32); }
.v-status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.venture-card .v-desc { font-size: 12.5px; color: #a89fc7; line-height: 1.6; margin: 0; }
.venture-card .v-link { font-size: 12.5px; margin-top: 4px; }

/* Inline edit form */
.edit-form { display: flex; flex-direction: column; gap: 8px; }
.edit-form input[type="text"], .edit-form textarea {
  width: 100%; background: rgba(0,0,0,0.25); border: 1px solid rgba(140,150,255,0.3);
  border-radius: 8px; padding: 8px 10px; font-size: 12.5px; color: #e9e6f4; font-family: inherit;
}
.edit-form select {
  background: rgba(0,0,0,0.25); border: 1px solid rgba(140,150,255,0.3); border-radius: 8px;
  padding: 6px 8px; font-size: 12px; color: #e9e6f4; font-family: inherit;
}
.edit-actions { display: flex; gap: 8px; margin-top: 2px; }
.edit-actions button {
  flex: 1; border-radius: 8px; padding: 6px 10px; font-size: 12px; cursor: pointer;
  border: 1px solid transparent;
}
.btn-save { background: rgba(127,162,255,0.22); color: #cdd9ff; border-color: rgba(127,162,255,0.4) !important; }
.btn-cancel { background: rgba(255,255,255,0.05); color: #b8b4cf; border-color: rgba(255,255,255,0.1) !important; }

/* Email account tabs */
.acct-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.acct-tab {
  font: inherit; font-size: 11.5px; padding: 4px 10px; border-radius: 20px; cursor: pointer;
  border: 1px solid rgba(140,150,255,0.25); background: rgba(90,110,255,0.08); color: #b9c8ff;
}
.acct-tab.active { background: rgba(90,110,255,0.28); border-color: rgba(140,150,255,0.6); color: #e3e9ff; }
.acct-tab.disconnected { opacity: 0.45; }

/* Task panel */
.task-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.task-item .task-body { flex: 1; }
.task-actions { display: flex; gap: 6px; flex-shrink: 0; }
.mini-btn {
  border: 1px solid rgba(140,150,255,0.3); background: rgba(90,110,255,0.10); color: #b9c8ff;
  border-radius: 7px; padding: 3px 8px; font-size: 11px; cursor: pointer;
}
.mini-btn.danger { border-color: rgba(255,120,130,0.35); background: rgba(255,120,130,0.10); color: #ffb4bb; }
.task-toggle { font-size: 10.5px; padding: 2px 7px; border-radius: 10px; }
.task-toggle.on { background: rgba(140,220,190,0.16); color: #a6e6cf; border: 1px solid rgba(140,220,190,0.3); }
.task-toggle.off { background: rgba(255,255,255,0.05); color: #7d7896; border: 1px solid rgba(255,255,255,0.1); }
.add-task-form, .add-link-form {
  border-top: 1px solid rgba(140,150,255,0.14); margin-top: 14px; padding-top: 14px;
}
.add-task-form label, .add-link-form label { font-size: 11px; color: #948fb0; display: block; margin-bottom: 4px; }
.add-task-form .field, .add-link-form .field { margin-bottom: 10px; }
.add-task-form input[type="time"] {
  background: rgba(0,0,0,0.25); border: 1px solid rgba(140,150,255,0.3);
  border-radius: 8px; padding: 7px 10px; font-size: 12.5px; color: #e9e6f4; font-family: inherit;
}

.day-picker { display: flex; gap: 4px; flex-wrap: nowrap; }
.day-chip {
  font: inherit; font-size: 10.5px; padding: 4px 6px; border-radius: 20px; cursor: pointer;
  border: 1px solid rgba(140,150,255,0.25); background: rgba(90,110,255,0.08); color: #b9c8ff;
  flex: 1; text-align: center; white-space: nowrap;
}
.day-chip:hover { border-color: rgba(140,150,255,0.5); }
.day-chip.active { background: rgba(90,110,255,0.28); border-color: rgba(140,150,255,0.6); color: #e3e9ff; }

.tz-note { font-size: 10.5px; color: #7d7896; margin: 4px 0 0; line-height: 1.4; }
.checkbox-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #b8b4cf; margin-top: 2px; }
.checkbox-row input[type="checkbox"] { margin: 0; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(140,150,255,0.25); border-radius: 8px; }

/* Quick links */
.link-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.link-item a.link-open { font-size: 13px; color: #e3e0f5; font-weight: 500; flex: 1; }
.link-item .link-url { font-size: 11px; color: #7d7896; display: block; margin-top: 1px; }
.link-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* Notes card */
.notes-input { display: flex; gap: 8px; margin-bottom: 12px; }
.notes-input input {
  flex: 1; background: rgba(0,0,0,0.25); border: 1px solid rgba(140,150,255,0.3);
  border-radius: 8px; padding: 8px 10px; font-size: 13px; color: #e9e6f4;
}
.note-entry { position: relative; }
.note-entry .body { white-space: pre-wrap; }
.note-entry .meta { font-size: 11px; color: #7d7896; margin-top: 4px; }
.note-entry.pinned .body::before { content: '📌 '; opacity: 0.7; }

/* Reconsent banner */
.banner {
  background: rgba(255,120,130,0.10); border: 1px solid rgba(255,120,130,0.4);
  color: #ffb4bb; border-radius: 10px; padding: 12px 16px; margin-bottom: 20px;
  font-size: 13px;
}
.banner a, .banner .link-btn { color: #ffb4bb; text-decoration: underline; }
.link-btn { font: inherit; background: none; border: none; padding: 0; cursor: pointer; }

/* Drag-and-drop */
.card-drag-handle {
  position: absolute; top: 14px; right: 16px; cursor: grab; color: #55506c; font-size: 13px;
  letter-spacing: 1px; user-select: none; padding: 2px 4px; border-radius: 4px;
}
.card-drag-handle:hover { color: #9db3ff; background: rgba(140,150,255,0.10); }
.card.dragging { opacity: 0.45; border-color: rgba(232,93,158,0.5); }
.card.drag-over { border-color: rgba(140,150,255,0.7); border-style: dashed; }

/* Login gate */
.login-gate {
  max-width: 380px; margin: 120px auto; padding: 32px;
  background: #15131f; border: 1px solid rgba(140,150,255,0.14); border-radius: 14px;
  text-align: center;
}
.login-gate h2 { margin-top: 0; }
.login-gate input, .login-gate button {
  width: 100%; margin-top: 10px; padding: 10px 12px; font-size: 14px; border-radius: 8px;
  border: 1px solid rgba(140,150,255,0.3); background: rgba(0,0,0,0.25); color: #e9e6f4;
  font-family: inherit;
}
.login-gate button {
  background: rgba(127,162,255,0.22); color: #cdd9ff; cursor: pointer; border-color: rgba(127,162,255,0.4);
}
.login-gate .err { color: #ffb4bb; font-size: 12px; margin-top: 10px; min-height: 16px; }
.login-gate p { font-size: 13px; color: #b8b4cf; line-height: 1.5; margin: 4px 0 0; }
#login-passkey-skip { background: transparent; border-color: transparent; color: #8b87a8; font-size: 12px; }
