/* ChromaCal — Global Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=Playfair+Display:wght@600;700&display=swap');

/* ── CSS Variables ───────────────────────────────────────────────── */
:root {
  --accent:       #2d6a4f;
  --accent-2:     #40916c;
  --accent-light: #d8f3dc;
  --bg:           #f5f4f0;
  --surface:      #ffffff;
  --surface-2:    #f0efe9;
  --surface-3:    #e8e6df;
  --text:         #1a1916;
  --text-2:       #6b6a65;
  --text-3:       #9b9a96;
  --border:       #e0ded6;
  --border-2:     #ccc9be;
  --danger:       #c0392b;
  --warn:         #e67e22;
  --info:         #2980b9;
  --success:      #27ae60;
  --radius:       12px;
  --radius-sm:    8px;
  --radius-xs:    5px;
  --shadow:       0 2px 16px rgba(0,0,0,.07);
  --shadow-lg:    0 8px 40px rgba(0,0,0,.12);
  --font:         'DM Sans', sans-serif;
  --font-display: 'Playfair Display', serif;
  --topbar-h:     56px;
  --sidebar-w:    240px;
  --transition:   .2s ease;
}

[data-theme="dark"] {
  --bg:           #141412;
  --surface:      #1e1d1b;
  --surface-2:    #272522;
  --surface-3:    #302e2a;
  --text:         #f0ede6;
  --text-2:       #a8a49c;
  --text-3:       #6b6862;
  --border:       #302e2a;
  --border-2:     #3d3a34;
  --accent-light: #1b4332;
}

/* ── Reset ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6; }
button { font-family: var(--font); cursor: pointer; }
input, select, textarea { font-family: var(--font); }
a { color: var(--accent); text-decoration: none; }
ul { list-style: none; }

/* ── Screens ──────────────────────────────────────────────────────── */
.screen { display: none; height: 100vh; flex-direction: column; overflow: hidden; }
.screen.active { display: flex; }
.hidden { display: none !important; }

/* ── Topbar ───────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h); min-height: var(--topbar-h);
  background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
  z-index: 50; flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.brand { font-family: var(--font-display); font-size: 20px; color: var(--accent); white-space: nowrap; }
.sidebar-toggle { background: none; border: none; font-size: 18px; color: var(--text-2); padding: 4px; transition: color var(--transition); }
.sidebar-toggle:hover { color: var(--text); }
.view-nav { display: flex; gap: 4px; flex: 1; justify-content: center; }
.vnav-btn {
  padding: 6px 16px; border: none; background: transparent;
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 400;
  color: var(--text-2); transition: var(--transition);
}
.vnav-btn:hover, .vnav-btn.active { background: var(--surface-2); color: var(--text); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px; border: 1px solid var(--border);
  background: var(--surface-2); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: var(--transition); position: relative; color: var(--text);
}
.icon-btn:hover { border-color: var(--border-2); background: var(--surface-3); }
.badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 600;
  min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent);
  color: #fff; font-size: 14px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  user-select: none; transition: opacity var(--transition);
}
.avatar:hover { opacity: 0.85; }

/* ── App Body ──────────────────────────────────────────────────────── */
.app-body { display: flex; flex: 1; overflow: hidden; }

/* ── Sidebar ──────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--border); padding: 16px 12px;
  overflow-y: auto; display: flex; flex-direction: column; gap: 20px;
  transition: transform var(--transition);
}
.sidebar.collapsed { transform: translateX(calc(-1 * var(--sidebar-w))); position: absolute; height: 100%; z-index: 40; }
.btn-new-event {
  width: 100%; padding: 10px; background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
  transition: background var(--transition); display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-new-event:hover { background: var(--accent-2); }

/* Mini Calendar */
.mc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mc-title { font-size: 13px; font-weight: 500; color: var(--text); }
.mc-nav { background: none; border: none; color: var(--text-3); font-size: 16px; padding: 2px 5px; transition: color var(--transition); }
.mc-nav:hover { color: var(--text); }
.mc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.mc-dow { font-size: 10px; color: var(--text-3); text-align: center; padding: 3px 0; font-weight: 500; }
.mc-day {
  font-size: 11px; text-align: center; padding: 4px 2px;
  border-radius: 4px; cursor: pointer; color: var(--text-2);
  transition: background var(--transition);
}
.mc-day:hover { background: var(--surface-2); }
.mc-day.today { background: var(--accent); color: #fff; font-weight: 600; border-radius: 50%; }
.mc-day.selected { background: var(--accent-light); color: var(--accent); font-weight: 500; }
.mc-day.other-month { color: var(--text-3); }
.mc-day.has-event::after {
  content: ''; display: block; width: 3px; height: 3px;
  border-radius: 50%; background: var(--accent); margin: 1px auto 0;
}
.mc-day.today::after { background: rgba(255,255,255,.6); }

/* Sidebar sections */
.sidebar-section { display: flex; flex-direction: column; gap: 4px; }
.section-label { font-size: 10px; font-weight: 600; color: var(--text-3); letter-spacing: .5px; text-transform: uppercase; margin-bottom: 4px; }
.cal-item { display: flex; align-items: center; gap: 8px; padding: 5px 4px; font-size: 13px; color: var(--text); border-radius: var(--radius-xs); cursor: pointer; transition: background var(--transition); }
.cal-item:hover { background: var(--surface-2); }
.cal-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.btn-link { background: none; border: none; color: var(--accent); font-size: 12px; padding: 4px 4px; text-align: left; }

/* Integration items */
.integration-item { display: flex; align-items: center; gap: 8px; padding: 5px 4px; font-size: 12px; }
.int-icon { font-size: 14px; }
.int-name { flex: 1; color: var(--text); }
.int-status { font-size: 11px; font-weight: 500; cursor: pointer; }
.int-status.disconnected { color: var(--accent); }
.int-status.connected { color: var(--success); }

/* ── Main Content ──────────────────────────────────────────────────── */
.main-content { flex: 1; overflow-y: auto; padding: 20px 24px; background: var(--bg); }
.cal-view { height: 100%; }

/* Calendar toolbar */
.cal-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.cal-nav-btn {
  width: 32px; height: 32px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 16px; display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.cal-nav-btn:hover { border-color: var(--border-2); color: var(--text); }
.cal-title { font-family: var(--font-display); font-size: 22px; color: var(--text); flex: 1; }
.btn-today {
  padding: 6px 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 12px; color: var(--text-2);
  transition: var(--transition);
}
.btn-today:hover { border-color: var(--border-2); color: var(--text); }

/* Month grid */
.month-grid-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.dow-row { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--border); }
.dow-row > div { padding: 8px; text-align: center; font-size: 11px; font-weight: 600; color: var(--text-3); letter-spacing: .3px; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.day-cell {
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  min-height: 100px; padding: 6px; cursor: pointer; transition: background var(--transition);
  position: relative;
}
.day-cell:nth-child(7n) { border-right: none; }
.day-cell:hover { background: var(--surface-2); }
.day-cell.other-month .day-num { color: var(--text-3); }
.day-cell.today-cell { background: var(--accent-light); }
.day-num {
  font-size: 12px; font-weight: 500; color: var(--text-2);
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin-bottom: 2px;
}
.today-cell .day-num { background: var(--accent); color: #fff; }
.event-chip {
  font-size: 10px; padding: 2px 7px; border-radius: 4px;
  margin-bottom: 2px; color: #fff; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; font-weight: 500;
  cursor: pointer; transition: opacity var(--transition);
}
.event-chip:hover { opacity: .85; }
.more-events { font-size: 10px; color: var(--text-3); padding: 1px 3px; }

/* Week grid */
.week-grid-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; }
.week-header { display: grid; border-bottom: 1px solid var(--border); }
.week-time-col { font-size: 11px; color: var(--text-3); padding: 8px; text-align: right; border-right: 1px solid var(--border); min-width: 50px; }
.week-day-header { padding: 8px; text-align: center; font-size: 12px; border-right: 0.5px solid var(--border); }
.week-day-header .wdh-dow { color: var(--text-3); font-size: 11px; text-transform: uppercase; letter-spacing: .3px; }
.week-day-header .wdh-num { font-size: 18px; font-weight: 500; color: var(--text); width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 2px auto 0; }
.week-day-header.is-today .wdh-num { background: var(--accent); color: #fff; }
.week-row { display: grid; border-bottom: 0.5px solid var(--border); min-height: 52px; }
.week-row-time { font-size: 10px; color: var(--text-3); padding: 4px 8px 4px; text-align: right; border-right: 1px solid var(--border); }
.week-row-cell { border-right: 0.5px solid var(--border); padding: 2px 3px; position: relative; }

/* Day grid */
.day-grid-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; }
.day-hour-row { display: grid; grid-template-columns: 60px 1fr; border-bottom: 0.5px solid var(--border); min-height: 60px; }
.day-hour-label { font-size: 11px; color: var(--text-3); padding: 6px 10px 0; text-align: right; border-right: 1px solid var(--border); }
.day-hour-cell { padding: 4px 8px; cursor: pointer; transition: background var(--transition); }
.day-hour-cell:hover { background: var(--surface-2); }

/* Notes */
.notes-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.notes-toolbar h2 { font-family: var(--font-display); font-size: 22px; }
.notes-controls { display: flex; gap: 10px; align-items: center; }
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.note-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; cursor: pointer;
  transition: var(--transition); border-left: 3px solid var(--accent);
}
.note-card:hover { border-color: var(--border-2); box-shadow: var(--shadow); }
.note-card.pinned { border-left-color: var(--warn); }
.note-card-title { font-weight: 500; font-size: 14px; margin-bottom: 6px; }
.note-card-content { font-size: 13px; color: var(--text-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.note-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.note-card-date { font-size: 11px; color: var(--text-3); }
.note-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.note-tag { font-size: 10px; padding: 2px 7px; border-radius: 12px; background: var(--accent-light); color: var(--accent); font-weight: 500; }

/* ── Panels ────────────────────────────────────────────────────────── */
.panel {
  position: fixed; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); z-index: 100; overflow: hidden;
  animation: fadeSlide .2s ease;
}
@keyframes fadeSlide { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 500; }
.panel-body { padding: 14px 16px; }
.panel-scroll { max-height: 380px; overflow-y: auto; }
.panel-divider { height: 1px; background: var(--border); margin: 6px 0; }
.panel-menu-item { width: 100%; padding: 8px 16px; background: none; border: none; text-align: left; font-size: 13px; color: var(--text); transition: background var(--transition); }
.panel-menu-item:hover { background: var(--surface-2); }
.panel-menu-item.danger { color: var(--danger); }
.profile-header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.avatar-lg { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 16px; font-weight: 500; display: flex; align-items: center; justify-content: center; }
.profile-name { font-weight: 500; font-size: 14px; }
.profile-email { font-size: 12px; color: var(--text-3); }

/* Notification items */
.notif-item { padding: 12px 16px; border-bottom: 0.5px solid var(--border); cursor: pointer; transition: background var(--transition); }
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: var(--accent-light); }
.notif-title { font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.notif-body { font-size: 12px; color: var(--text-2); }
.notif-time { font-size: 10px; color: var(--text-3); margin-top: 3px; }

/* ── Modals ────────────────────────────────────────────────────────── */
.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 20px; animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border-radius: 16px;
  padding: 24px; width: 100%;
  box-shadow: var(--shadow-lg); animation: slideUp .25s ease;
  max-height: 90vh; overflow-y: auto;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-header h3 { font-size: 17px; font-weight: 500; }
.modal-close { background: none; border: none; font-size: 22px; color: var(--text-3); line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* ── Forms ─────────────────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 500; color: var(--text-2); margin-bottom: 5px; letter-spacing: .2px; }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="url"],
.field input[type="datetime-local"],
.field textarea,
.field select,
.select-full,
.search-full,
.search-inline {
  width: 100%; padding: 9px 13px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px; color: var(--text);
  outline: none; transition: border-color var(--transition), background var(--transition);
}
.field input:focus, .field textarea:focus, .field select:focus,
.search-full:focus, .search-inline:focus { border-color: var(--accent); background: var(--surface); }
.field textarea { resize: vertical; min-height: 80px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.select-sm { padding: 7px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; color: var(--text); outline: none; }

/* Color dots */
.color-dots { display: flex; gap: 7px; flex-wrap: wrap; padding: 4px 0; }
.color-dot { width: 24px; height: 24px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform var(--transition), border-color var(--transition); }
.color-dot:hover { transform: scale(1.15); }
.color-dot.selected { border-color: var(--text); transform: scale(1.1); }

/* ── Buttons ───────────────────────────────────────────────────────── */
.btn-primary {
  padding: 9px 20px; background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
  transition: background var(--transition); white-space: nowrap;
}
.btn-primary:hover { background: var(--accent-2); }
.btn-primary.full { width: 100%; }
.btn-ghost {
  padding: 9px 20px; background: transparent; color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px;
  transition: var(--transition);
}
.btn-ghost:hover { border-color: var(--border-2); background: var(--surface-2); }
.btn-ghost.danger { color: var(--danger); border-color: var(--danger); }
.btn-ghost.danger:hover { background: #fde8e8; }
.btn-sm { padding: 5px 12px; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-xs); color: var(--text-2); transition: var(--transition); }
.btn-sm:hover { border-color: var(--border-2); color: var(--text); }

/* ── Auth ──────────────────────────────────────────────────────────── */
.auth-bg {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: var(--bg); padding: 20px;
  background-image: radial-gradient(circle at 20% 80%, var(--accent-light) 0%, transparent 40%),
                    radial-gradient(circle at 80% 20%, var(--accent-light) 0%, transparent 35%);
}
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 2.5rem; width: 100%; max-width: 400px; box-shadow: var(--shadow-lg); }
.auth-brand { margin-bottom: 24px; }
.auth-logo { font-family: var(--font-display); font-size: 30px; color: var(--accent); }
.auth-tagline { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.tab-bar { display: flex; background: var(--surface-2); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 20px; }
.tab { flex: 1; padding: 8px; background: none; border: none; border-radius: 6px; font-size: 13px; color: var(--text-2); transition: var(--transition); }
.tab.active { background: var(--surface); color: var(--text); font-weight: 500; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.auth-form { display: flex; flex-direction: column; }
.btn-oauth {
  width: 100%; padding: 10px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text); display: flex; align-items: center; justify-content: center; gap: 10px; transition: var(--transition);
}
.btn-oauth:hover { border-color: var(--border-2); background: var(--surface-3); }
.divider { display: flex; align-items: center; gap: 12px; margin: 12px 0; color: var(--text-3); font-size: 12px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-footer { text-align: center; margin-top: 16px; font-size: 12px; color: var(--text-3); }

/* ── Theme panel ───────────────────────────────────────────────────── */
.pref-label { font-size: 11px; font-weight: 600; color: var(--text-3); letter-spacing: .4px; text-transform: uppercase; margin-bottom: 7px; }
.mode-toggle { display: flex; gap: 4px; background: var(--surface-2); border-radius: var(--radius-sm); padding: 3px; }
.mt-btn { flex: 1; padding: 6px 8px; border: none; background: none; border-radius: 6px; font-size: 12px; color: var(--text-2); transition: var(--transition); }
.mt-btn.active { background: var(--surface); color: var(--text); font-weight: 500; }
.accent-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.accent-swatch { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform var(--transition), border-color var(--transition); }
.accent-swatch:hover { transform: scale(1.15); }
.accent-swatch.active { border-color: var(--text); transform: scale(1.1); }

/* ── Admin ─────────────────────────────────────────────────────────── */
.admin-body { display: flex; flex: 1; overflow: hidden; }
.admin-nav { width: 180px; background: var(--surface); border-right: 1px solid var(--border); padding: 16px 8px; display: flex; flex-direction: column; gap: 4px; }
.anav-btn { width: 100%; padding: 9px 14px; background: none; border: none; text-align: left; border-radius: var(--radius-sm); font-size: 13px; color: var(--text-2); transition: var(--transition); }
.anav-btn:hover, .anav-btn.active { background: var(--surface-2); color: var(--text); font-weight: 500; }
.admin-content { flex: 1; overflow-y: auto; padding: 24px; background: var(--bg); }
.admin-tab { display: none; }
.admin-tab.active { display: block; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-label { font-size: 11px; color: var(--text-3); font-weight: 600; letter-spacing: .4px; text-transform: uppercase; margin-bottom: 6px; }
.stat-value { font-size: 28px; font-weight: 500; color: var(--text); }
.stat-value.accent { color: var(--accent); }
.stat-value.info { color: var(--info); }
.admin-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.admin-card h3 { font-size: 15px; font-weight: 500; margin-bottom: 16px; }
.admin-toolbar { display: flex; gap: 10px; margin-bottom: 16px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; padding: 10px 12px; font-size: 11px; font-weight: 600; color: var(--text-3); letter-spacing: .3px; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 10px 12px; border-bottom: 0.5px solid var(--border); color: var(--text); }
.admin-table tr:hover td { background: var(--surface-2); }
.role-badge, .status-badge { font-size: 11px; padding: 2px 9px; border-radius: 12px; font-weight: 500; }

/* ── Integrations modal ────────────────────────────────────────────── */
.integrations-list { display: flex; flex-direction: column; gap: 2px; }
.int-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 0.5px solid var(--border); }
.int-info { display: flex; align-items: center; gap: 12px; }
.int-row-icon { font-size: 24px; }
.int-row-name { font-size: 14px; font-weight: 500; }
.int-row-desc { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.btn-connect { padding: 6px 14px; background: var(--accent-light); border: none; border-radius: var(--radius-sm); font-size: 12px; color: var(--accent); font-weight: 500; transition: var(--transition); }
.btn-connect:hover { background: var(--accent); color: #fff; }
.btn-connect.connected { background: #e8f8ef; color: var(--success); }
.int-badge { font-size: 11px; padding: 3px 10px; border-radius: 12px; font-weight: 500; }
.int-badge.auto { background: #e8f0fe; color: #1967d2; }
.int-badge.soon { background: var(--surface-2); color: var(--text-3); }

/* ── Plans ─────────────────────────────────────────────────────────── */
.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.plan-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; position: relative; }
.plan-card.featured { border-color: var(--accent); border-width: 2px; }
.plan-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 12px; border-radius: 12px; white-space: nowrap; }
.plan-name { font-size: 15px; font-weight: 500; margin-bottom: 8px; }
.plan-price { font-size: 28px; font-weight: 600; color: var(--accent); margin-bottom: 12px; }
.plan-price span { font-size: 14px; font-weight: 400; color: var(--text-3); }
.plan-features { font-size: 12px; color: var(--text-2); margin-bottom: 16px; display: flex; flex-direction: column; gap: 5px; }
.plan-features li::before { content: '✓ '; color: var(--accent); font-weight: 600; }

/* ── Toast ─────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 500;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 12px;
  min-width: 240px; max-width: 320px; animation: slideToast .3s ease;
}
@keyframes slideToast { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast-title { font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.toast-body { font-size: 12px; color: var(--text-2); }
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }

/* ── Suggestions dropdown ─────────────────────────────────────────── */
.suggestions-drop {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow); max-height: 200px; overflow-y: auto;
}
.suggestion-item { padding: 9px 13px; font-size: 13px; cursor: pointer; transition: background var(--transition); }
.suggestion-item:hover { background: var(--surface-2); }

/* Toggle */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: var(--border-2); border-radius: 24px; cursor: pointer; transition: var(--transition); }
.slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: var(--transition); }
.toggle input:checked + .slider { background: var(--accent); }
.toggle input:checked + .slider::before { transform: translateX(20px); }

/* ── Profile modal ─────────────────────────────────────────────────── */
.avatar-upload { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 20px; }
.avatar-xl { width: 72px; height: 72px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 28px; font-weight: 500; display: flex; align-items: center; justify-content: center; }

/* ── Event detail ─────────────────────────────────────────────────── */
.event-detail-body { font-size: 13px; color: var(--text-2); }
.detail-row { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; border-bottom: 0.5px solid var(--border); }
.detail-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.detail-text { flex: 1; }
.detail-label { font-size: 11px; color: var(--text-3); margin-bottom: 2px; }

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { position: fixed; height: calc(100% - var(--topbar-h)); top: var(--topbar-h); left: 0; z-index: 40; transform: translateX(calc(-1 * var(--sidebar-w))); transition: transform var(--transition); }
  .sidebar.open { transform: none; }
  .view-nav .vnav-btn { padding: 6px 10px; font-size: 12px; }
  .brand { font-size: 16px; }
  .field-row { grid-template-columns: 1fr; }
  .plans-grid { grid-template-columns: 1fr; }
  .month-grid { font-size: 11px; }
  .day-cell { min-height: 70px; }
}
