*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f4fbf4; --surface: #ffffff; --surface2: #eef7ee; --surface3: #e4f0e4;
  --border: #cce0cc; --gold: #b8860b; --gold2: #d4a017; --gold-dim: rgba(184,134,11,0.09);
  --lime: #6aaa35; --lime2: #82c44a; --lime-dim: rgba(106,170,53,0.11);
  --text: #1a281a; --muted: #6b7b6b; --green: #27ae60; --yellow: #d4930a; --red: #c0392b;
  --blue: #2980b9; --radius: 10px; --sidebar-w: 215px;
}
html, body { height: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }

/* ── App shell ── */
.app { display: flex; height: 100vh; overflow: hidden; }
.sidebar { width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; overflow-y: auto; }
.main { flex: 1; overflow-y: auto; padding: 24px 28px 40px; }

/* ── Sidebar ── */
.logo { padding: 18px 16px 14px; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, #fff9ee 0%, #f0fae8 100%); }
.logo h1 { font-size: 17px; font-weight: 700; color: var(--gold); }
.logo small { font-size: 11px; color: var(--muted); display: block; margin-top: 2px; }
.logo .drive-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; font-size: 11px; color: var(--muted); text-decoration: none; background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; }
.logo .drive-link:hover { color: var(--lime); border-color: var(--lime); }

nav { padding: 8px 0; flex: 1; }
.nav-btn { display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px 16px; background: none; border: none; border-left: 3px solid transparent; color: var(--muted); font-size: 13px; cursor: pointer; text-align: left; transition: all 0.12s; }
.nav-btn:hover { color: var(--text); background: var(--surface2); }
.nav-btn.active { color: var(--gold); border-left-color: var(--gold); background: var(--gold-dim); }
.nav-btn .icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }

/* ── Sections ── */
.page { display: none; }
.page.active { display: block; }
.section-header { margin-bottom: 20px; display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.section-header h2 { font-size: 20px; font-weight: 700; color: var(--text); }
.section-header p { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ── Cards ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.card-title { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 14px; }

/* ── Buttons ── */
.btn { background: var(--gold); color: #fff; border: none; border-radius: 7px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .12s; white-space: nowrap; }
.btn:hover { background: var(--gold2); }
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 6px; }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--lime); color: var(--lime); background: var(--lime-dim); }
.btn-lime { background: var(--lime); color: #fff; border: none; }
.btn-lime:hover { background: var(--lime2); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #a93226; }

/* ── Inputs ── */
input, select, textarea { background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 7px; padding: 8px 11px; font-size: 13px; font-family: inherit; width: 100%; transition: border-color .12s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 2px var(--lime-dim); }
textarea { resize: vertical; min-height: 70px; }
label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.form-group { margin-bottom: 12px; }

/* ── Progress ── */
.progress-bar { height: 7px; background: var(--border); border-radius: 4px; overflow: hidden; margin: 6px 0; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--lime), var(--lime2)); border-radius: 4px; transition: width .4s; }

/* ── Badges ── */
.badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: .05em; }
.badge-aktiv { background: rgba(106,170,53,.15); color: var(--lime); }
.badge-pause { background: rgba(212,147,10,.15); color: var(--yellow); }
.badge-idé { background: rgba(100,100,100,.12); color: var(--muted); }
.badge-arkivert { background: rgba(180,180,180,.2); color: #999; }
.badge-objective { background: rgba(184,134,11,.14); color: var(--gold); }
.badge-kr { background: rgba(41,128,185,.14); color: var(--blue); }

/* ── OKR ── */
.okr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.okr-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.okr-card label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.okr-card .val { font-size: 20px; font-weight: 700; color: var(--gold); margin: 5px 0 4px; }
.okr-card input { margin-top: 6px; }
.deals-info { font-size: 12px; color: var(--muted); margin-top: 4px; }
.deals-info b { color: var(--gold); }

/* ── Projects ── */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.proj-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; transition: border-color .12s, box-shadow .12s; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.proj-card:hover { border-color: var(--lime); box-shadow: 0 2px 8px rgba(106,170,53,0.12); }
.proj-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; gap: 6px; }
.proj-name { font-weight: 600; font-size: 14px; flex: 1; color: var(--text); }
.proj-actions { display: flex; gap: 5px; }
.proj-actions button { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 15px; padding: 2px; }
.proj-actions button:hover { color: var(--text); }
.proj-next { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.proj-next input { font-size: 12px; padding: 5px 8px; margin-top: 4px; background: var(--surface2); }
.proj-url a { font-size: 11px; color: var(--lime); text-decoration: none; }
.proj-url a:hover { text-decoration: underline; }
.proj-task-count { margin-top: 8px; }

/* ── Tasks / OKR ── */
.task-toolbar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.task-toolbar select { flex: 0 0 auto; width: auto; }

.objective-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.objective-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; }
.objective-row:hover { background: var(--surface2); }
.obj-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: transparent; font-size: 11px; flex-shrink: 0; transition: all .12s; }
.obj-check.done { background: var(--lime); border-color: var(--lime); color: #fff; }
.obj-text { flex: 1; font-size: 13px; font-weight: 500; }
.obj-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.obj-meta span { font-size: 10px; color: var(--muted); background: var(--surface2); padding: 2px 6px; border-radius: 4px; }
.obj-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 16px; padding: 0 2px; }
.obj-del:hover { color: var(--red); }
.obj-archive { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0 2px; }

.kr-list { border-top: 1px solid var(--border); padding: 8px 14px 10px 44px; background: var(--surface2); }
.kr-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.kr-item:last-child { border-bottom: none; }
.kr-check { width: 16px; height: 16px; border-radius: 3px; border: 2px solid var(--border); background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: transparent; font-size: 10px; flex-shrink: 0; transition: all .12s; }
.kr-check.done { background: var(--blue); border-color: var(--blue); color: #fff; }
.kr-text { flex: 1; font-size: 12px; color: var(--text); }
.kr-text.done { text-decoration: line-through; color: var(--muted); }
.kr-meta { font-size: 10px; color: var(--muted); white-space: nowrap; }
.kr-dates { display: flex; align-items: center; gap: 3px; flex-shrink: 0; }
.kr-date-input { font-size: 10px; padding: 2px 4px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--text); width: 110px; }
.kr-date-sep { font-size: 10px; color: var(--muted); }
.kr-resp { font-size: 10px; color: var(--muted); white-space: nowrap; }
.kr-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; }
.kr-del:hover { color: var(--red); }
.add-kr-row { display: flex; gap: 6px; margin-top: 8px; }
.add-kr-row input { font-size: 12px; padding: 5px 9px; }

/* ── Modal ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 1000; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; box-shadow: 0 8px 32px rgba(0,0,0,0.14); }
.modal.wide { max-width: 640px; }
.modal h3 { font-size: 16px; font-weight: 700; margin-bottom: 18px; color: var(--text); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* ── Email — BlackBerry Hub style ── */
.email-shell { display: flex; gap: 12px; height: calc(100vh - 168px); min-height: 420px; }
.email-left { width: 360px; flex-shrink: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; background: var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,0.05); }

/* BB Hub account bar */
.bb-account-bar { display: flex; gap: 0; border-bottom: 2px solid var(--border); overflow-x: auto; flex-shrink: 0; background: #1a2331; scrollbar-width: none; }
.bb-account-bar::-webkit-scrollbar { display: none; }
.bb-acct-btn { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 12px; background: none; border: none; border-bottom: 3px solid transparent; color: #8899aa; font-size: 10px; cursor: pointer; white-space: nowrap; transition: all .15s; min-width: 52px; }
.bb-acct-btn:hover { color: #fff; background: rgba(255,255,255,0.06); }
.bb-acct-btn.active { color: #fff; border-bottom-color: var(--bb-dot-color, #b8860b); }
.bb-acct-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bb-dot-color, #b8860b); flex-shrink: 0; }
.bb-unread-badge { background: var(--bb-dot-color, #b8860b); color: #fff; font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 8px; min-width: 16px; text-align: center; }

/* BB email list */
.email-list { list-style: none; flex: 1; overflow-y: auto; background: var(--surface); }
.bb-email-item { display: flex; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .1s; position: relative; }
.bb-email-item:hover { background: var(--surface2); }
.bb-email-item.active { background: var(--lime-dim); }
.bb-acct-strip { width: 4px; flex-shrink: 0; background: var(--item-color, #ccc); }
.bb-email-body { flex: 1; padding: 10px 12px; min-width: 0; }
.bb-email-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 2px; }
.bb-email-from { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.bb-email-item.unread .bb-email-from { color: #0a1628; }
.bb-email-time, .bb-email-date { font-size: 10px; color: var(--muted); flex-shrink: 0; }
.bb-email-subject { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 1px; }
.bb-email-item.unread .bb-email-subject { font-weight: 700; color: var(--text); }
.bb-email-preview { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--item-color, #2196f3); flex-shrink: 0; margin-top: 2px; }
.bb-email-actions { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 6px 8px; opacity: 0; transition: opacity .15s; }
.bb-email-item:hover .bb-email-actions { opacity: 1; }
.bb-act-btn, .bb-ea-btn { background: none; border: 1px solid var(--border); border-radius: 4px; cursor: pointer; font-size: 12px; padding: 3px 6px; color: var(--muted); }
.bb-act-btn:hover, .bb-ea-btn:hover { background: var(--surface3); color: var(--text); }
.email-no-config { padding: 20px 16px; color: var(--muted); font-size: 13px; }

/* BB email reader */
.email-reader { flex: 1; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; background: var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.bb-reader-header { background: #1a2331; color: #fff; padding: 12px 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-shrink: 0; }
.bb-reader-subject { font-size: 14px; font-weight: 700; flex: 1; line-height: 1.3; }
.bb-reader-actions { display: flex; gap: 5px; flex-shrink: 0; }
.bb-reader-toolbar { display: flex; gap: 5px; flex-shrink: 0; }
.bb-reader-btn, .bb-rtb-btn { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); color: #fff; border-radius: 6px; padding: 5px 10px; font-size: 11px; cursor: pointer; transition: background .12s; }
.bb-reader-btn:hover, .bb-rtb-btn:hover { background: rgba(255,255,255,0.22); }
.bb-reader-meta { padding: 8px 16px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; background: var(--surface2); }
.email-reader-meta { padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; flex-shrink: 0; background: var(--surface2); }
.email-reader-body { flex: 1; overflow-y: auto; padding: 16px; }
.email-reader-body iframe { width: 100%; border: none; min-height: 300px; }
.email-reader-body pre { white-space: pre-wrap; font-size: 13px; line-height: 1.7; font-family: inherit; color: var(--text); }
.email-reader-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: 13px; flex-direction: column; gap: 10px; }
.email-action-btn { background: none; border: none; cursor: pointer; font-size: 13px; padding: 2px 4px; border-radius: 4px; opacity: 0.6; }
.email-action-btn:hover { opacity: 1; }

/* ── Calendar — BlackBerry Passport style ── */
.bb-cal { display: flex; flex-direction: column; height: calc(100vh - 168px); min-height: 420px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.bb-cal-header { background: #1a2331; color: #fff; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.bb-cal-title { font-size: 15px; font-weight: 700; }
.bb-cal-nav { display: flex; gap: 6px; align-items: center; }
.bb-cal-nav-btn { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); color: #fff; border-radius: 6px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.bb-cal-nav-btn:hover { background: rgba(255,255,255,0.22); }
.bb-cal-view-toggle { display: flex; gap: 0; border-radius: 6px; overflow: hidden; border: 1px solid rgba(255,255,255,0.2); }
.bb-view-btn { background: none; border: none; color: rgba(255,255,255,0.6); padding: 4px 10px; font-size: 11px; cursor: pointer; }
.bb-view-btn.active { background: rgba(255,255,255,0.2); color: #fff; font-weight: 600; }

/* Day strip */
.bb-day-strip { display: flex; background: #0a1628; border-bottom: 1px solid rgba(255,255,255,0.1); overflow-x: auto; flex-shrink: 0; scrollbar-width: none; }
.bb-day-strip::-webkit-scrollbar { display: none; }
.bb-day-cell { flex: 1; min-width: 46px; display: flex; flex-direction: column; align-items: center; padding: 8px 4px; cursor: pointer; transition: background .12s; border-right: 1px solid rgba(255,255,255,0.06); }
.bb-day-cell:hover { background: rgba(255,255,255,0.08); }
.bb-day-cell.selected { background: rgba(184,134,11,0.3); }
.bb-day-cell.today .bb-day-num { background: var(--gold); color: #fff; border-radius: 50%; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; }
.bb-day-name { font-size: 9px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.bb-day-num { font-size: 15px; font-weight: 600; color: #fff; line-height: 1; }
.bb-day-dots { display: flex; gap: 2px; margin-top: 4px; justify-content: center; min-height: 7px; }
.bb-day-dot { width: 5px; height: 5px; border-radius: 50%; }

/* Agenda */
.bb-agenda { flex: 1; overflow-y: auto; padding: 0; }
.bb-agenda-date-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; padding: 10px 16px 4px; background: var(--surface2); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1; }
.bb-event-row { display: flex; align-items: flex-start; gap: 0; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .1s; }
.bb-event-row:hover { background: var(--surface2); }
.bb-event-time-col { width: 56px; flex-shrink: 0; padding: 12px 8px 12px 16px; font-size: 11px; color: var(--muted); text-align: right; line-height: 1.3; }
.bb-event-color-strip { width: 4px; flex-shrink: 0; background: var(--ev-color, var(--gold)); margin: 8px 0; border-radius: 2px; }
.bb-event-content { flex: 1; padding: 10px 12px; min-width: 0; }
.bb-event-title { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-event-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.bb-event-del { background: none; border: none; color: var(--muted); font-size: 14px; padding: 10px 12px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.bb-event-row:hover .bb-event-del { opacity: 1; }
.bb-event-del:hover { color: var(--red); }
.bb-no-events { padding: 32px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.bb-add-event-btn { position: sticky; bottom: 16px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; background: var(--gold); color: #fff; border: none; border-radius: 24px; padding: 10px 20px; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: 0 3px 12px rgba(184,134,11,0.35); margin: 12px auto; }
.bb-add-event-btn:hover { background: var(--gold2); }

/* Month grid */
.bb-month-grid { flex: 1; overflow-y: auto; padding: 8px; display: grid; }
.bb-month-row-header { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 4px; }
.bb-month-day-name { text-align: center; font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 4px 0; }
.bb-month-grid-cells { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.bb-month-cell { min-height: 52px; border: 1px solid var(--border); border-radius: 6px; padding: 4px; cursor: pointer; transition: background .1s; }
.bb-month-cell:hover { background: var(--surface2); }
.bb-month-cell.other-month { opacity: 0.35; }
.bb-month-cell.today { border-color: var(--gold); background: var(--gold-dim); }
.bb-month-cell.selected { border-color: var(--lime); background: var(--lime-dim); }
.bb-month-num { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.bb-month-ev-dot { font-size: 9px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; border-radius: 2px; margin-bottom: 1px; }

/* ── Chat ── */
.chat-box { display: flex; flex-direction: column; height: 480px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--surface2); border-radius: var(--radius) var(--radius) 0 0; }
.chat-msg { max-width: 82%; padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.6; white-space: pre-wrap; }
.chat-msg.user { background: var(--gold-dim); border: 1px solid rgba(184,134,11,.25); align-self: flex-end; color: var(--text); }
.chat-msg.heidi { background: var(--surface); border: 1px solid var(--border); align-self: flex-start; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.chat-msg.heidi strong { color: var(--lime); font-size: 11px; display: block; margin-bottom: 4px; }
.chat-input-row { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); background: var(--surface); }
.chat-input-row textarea { min-height: 42px; max-height: 120px; resize: none; padding: 9px 12px; line-height: 1.4; }

/* ── Credits ── */
.credits-nums { display: flex; gap: 24px; margin-bottom: 14px; }
.cred-item .num { font-size: 28px; font-weight: 700; color: var(--gold); }
.cred-item .lbl { font-size: 11px; color: var(--muted); }

/* ── Tab bar (mobile) ── */
.tab-bar { display: none; }

/* ── Spinner ── */
.spinner { text-align: center; color: var(--muted); padding: 24px; font-size: 12px; }

/* ── Responsive ── */
@media (max-width: 680px) {
  .sidebar { display: none; }
  .tab-bar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--border); z-index: 200; box-shadow: 0 -2px 8px rgba(0,0,0,0.06); }
  .tab-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 8px 2px; background: none; border: none; color: var(--muted); font-size: 9px; cursor: pointer; min-height: 54px; }
  .tab-btn .icon { font-size: 20px; }
  .tab-btn.active { color: var(--gold); }
  .main { padding: 14px 12px 74px; }
  .okr-grid { grid-template-columns: 1fr 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .chat-box { height: calc(100vh - 200px); }
  /* Email: single-column on mobile */
  .email-shell { flex-direction: column; height: auto; }
  .email-left { width: 100%; }
  .email-reader { min-height: 380px; }
  /* Calendar: full height */
  .bb-cal { height: calc(100vh - 130px); }
}
/* ── BlackBerry Passport (square ~453px) ── */
@media (max-width: 500px) {
  .main { padding: 10px 8px 68px; }
  .section-header h2 { font-size: 16px; }
  .okr-card .val { font-size: 16px; }
  .modal { margin: 8px; max-height: 88vh; }
  /* BB Passport: email single-column, reader slides over list */
  .email-shell { height: auto; gap: 0; }
  .email-left { width: 100%; max-height: none; border-radius: 8px; }
  .email-reader { border-radius: 8px; margin-top: 8px; }
  /* Calendar tighter on square */
  .bb-day-cell { min-width: 40px; padding: 7px 2px; }
  .bb-day-num { font-size: 13px; }
  .bb-event-time-col { width: 44px; padding: 10px 4px 10px 10px; }
  .bb-acct-btn { padding: 7px 8px; min-width: 44px; }
  /* Tighter cards */
  .proj-card, .objective-block { border-radius: 8px; }
}
