/* ── Reset & Base ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #14110e;
    --surface: #1f1b17;
    --surface-2: #2a2520;
    --border: #3a332c;
    --text: #e8e0d4;
    --text-dim: #9a9084;
    --accent: #d97706;
    --accent-hover: #f59e0b;
    --green: #65a30d;
    --green-bg: rgba(101, 163, 13, 0.1);
    --orange: #d97706;
    --orange-bg: rgba(217, 119, 6, 0.1);
    --red: #dc2626;
    --red-bg: rgba(220, 38, 38, 0.1);
    --blue: #38bdf8;
    --purple: #a78bfa;
    --radius: 18px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(0,0,0,0.22), 0 4px 14px rgba(0,0,0,0.28);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.38), 0 28px 80px rgba(0,0,0,0.55);
    --radius-card: 18px;
    --radius-modal: 20px;
    --shadow-card: 0 1px 2px rgba(0,0,0,0.22), 0 4px 14px rgba(0,0,0,0.28);
    --shadow-card-hover: 0 2px 8px rgba(0,0,0,0.30), 0 14px 36px rgba(0,0,0,0.45);
    --shadow-modal: 0 8px 24px rgba(0,0,0,0.38), 0 28px 80px rgba(0,0,0,0.55);
    --ease-apple: cubic-bezier(0.32, 0.72, 0, 1);
    --nav-blur: 20px;
    --hairline: rgba(255, 255, 255, 0.07);
    --ring: rgba(217, 119, 6, 0.30);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-optical-sizing: auto;
    min-height: 100vh;
}

/* ── Navigation ──────────────────────────────────── */
.nav {
    background: rgba(31, 27, 23, 0.72);
    border-bottom: 1px solid var(--hairline);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(var(--nav-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--nav-blur)) saturate(180%);
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 56px;
}
.nav-brand {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    flex-shrink: 0;
    line-height: 1.1;
}
.nav-brand i { font-size: 20px; }
.nav-logo-img {
    height: 26px;
    width: auto;
    display: block;
}
.nav-brand-text {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
@media (min-width: 768px) {
    .nav-brand-text { display: block; }
}
@media (max-width: 767px) {
    .nav-logo { display: none; }
    .nav-brand {
        flex-direction: row;
        gap: 0;
    }
    .nav-brand-text {
        font-size: 16px;
        letter-spacing: 2px;
    }
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-link {
    color: var(--text-dim);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s var(--ease-apple), color 0.2s var(--ease-apple), transform 0.2s var(--ease-apple);
}
.nav-link:hover {
    color: var(--text);
    background: var(--surface-2);
}
.nav-link.active {
    color: var(--accent);
    background: var(--surface-2);
}
.logout-link { color: var(--red); }
.logout-link:hover { background: var(--red-bg); }

.badge {
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* ── Main ────────────────────────────────────────── */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
}

/* ── Cards ───────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.card-header h2, .card-header h3 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-header i { color: var(--accent); }
.card-body { padding: 16px 20px; }

/* ── Stats Row ───────────────────────────────────── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}
.stat-number {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.stat-label {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 500;
}
.stat-pending .stat-number { color: var(--blue); }
.stat-done .stat-number { color: var(--green); }
.stat-warning .stat-number,
.stat-overdue .stat-number { color: var(--red); }
.stat-upcoming .stat-number { color: var(--purple); }

/* ── Dashboard Main (single column, full width) ──── */
.dashboard-main {
    max-width: 720px;
    margin: 0 auto;
}
.dashboard-section { margin-bottom: 20px; }

/* Calendar embedded in dashboard */
.dashboard-calendar {
    margin-top: 24px;
    margin-bottom: 40px;
}

/* ── Tasks ───────────────────────────────────────── */
.task-list { display: flex; flex-direction: column; gap: 2px; }
.task-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 12px;
    border-radius: var(--radius-sm);
    transition: background 0.1s;
}
.task-item:hover { background: var(--surface-2); }
.task-priority { border-left: 3px solid transparent; }
.task-urgent { border-left-color: var(--red); }
.task-high { border-left-color: var(--orange); }
.task-low { border-left-color: var(--blue); }

.task-check-form { flex-shrink: 0; padding-top: 2px; }
.task-check {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dim);
    font-size: 18px;
    padding: 2px;
    transition: color 0.15s;
}
.task-check:hover { color: var(--accent); }
.task-check.checked { color: var(--green); }

.task-content { flex: 1; min-width: 0; cursor: pointer; }
.task-content:hover .task-title { color: var(--accent); }
.task-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 2px;
}
.task-title.done { text-decoration: line-through; color: var(--text-dim); }
.task-desc {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 4px;
}
.task-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.task-actions { flex-shrink: 0; display: flex; gap: 4px; }
.task-more { text-align: center; padding: 8px; font-size: 13px; color: var(--text-dim); }

/* ── Tags ────────────────────────────────────────── */
.tag {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
}
.tag-urgent { background: var(--red-bg); color: var(--red); }
.tag-high { background: var(--orange-bg); color: var(--orange); }
.tag-medium { background: var(--orange-bg); color: var(--accent); }
.tag-low { background: rgba(96, 165, 250, 0.1); color: var(--blue); }
.tag-due { background: rgba(139, 143, 163, 0.1); color: var(--text-dim); }
.tag-due.overdue { background: var(--red-bg); color: var(--red); }
.tag-person { background: rgba(167, 139, 250, 0.1); color: var(--purple); }
.tag-location { background: rgba(52, 211, 153, 0.1); color: var(--green); }
.tag-status-pending { background: rgba(251, 191, 36, 0.1); color: var(--orange); }
.tag-status-in_progress { background: rgba(96, 165, 250, 0.1); color: var(--blue); }
.tag-status-completed { background: var(--green-bg); color: var(--green); }

/* ── Events ──────────────────────────────────────── */
.events-mini-list { display: flex; flex-direction: column; gap: 8px; }
.event-mini-item {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.event-mini-item:last-child { border-bottom: none; }
.event-mini-date {
    text-align: center;
    min-width: 40px;
}
.event-mini-day {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
}
.event-mini-month {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 600;
}
.event-mini-info { flex: 1; }
.event-mini-title {
    font-size: 14px;
    font-weight: 500;
}
.event-mini-time {
    font-size: 12px;
    color: var(--text-dim);
}
.calendar-list { display: flex; flex-direction: column; }
.calendar-month-header {
    font-size: 16px;
    font-weight: 700;
    padding: 16px 0 8px;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}
.calendar-event {
    display: flex;
    gap: 16px;
    padding: 12px;
    border-radius: var(--radius-sm);
    transition: background 0.1s;
}
.calendar-event:hover { background: var(--surface-2); }
.calendar-event-date {
    text-align: center;
    min-width: 50px;
}
.cal-day {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    color: var(--accent);
}
.cal-weekday {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 600;
}
.calendar-event-info { flex: 1; }
.calendar-event-title { font-size: 15px; font-weight: 600; }
.calendar-event-details {
    font-size: 13px;
    color: var(--text-dim);
    display: flex;
    gap: 12px;
    margin-top: 2px;
}
.calendar-event-desc {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 4px;
}
.calendar-event-actions { flex-shrink: 0; }

/* ── Calendar Grid ────────────────────────────────── */
.cal-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.cal-nav-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--text-dim);
    text-decoration: none;
    transition: all 0.15s;
    flex-shrink: 0;
}
.cal-nav-btn:hover {
    background: var(--surface-2);
    color: var(--text);
}
.cal-month-name {
    font-size: 20px;
    font-weight: 700;
    flex: 1;
    margin: 0;
}
.cal-today-btn {
    margin-left: auto;
}
.cal-grid {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
}
.cal-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}
.cal-header-row {
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}
.cal-head {
    padding: 10px 4px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
}
.cal-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 4px;
    min-height: 64px;
    text-decoration: none;
    color: var(--text);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
    position: relative;
}
.cal-cell:nth-child(7n) { border-right: none; }
.cal-row:last-child .cal-cell { border-bottom: none; }
.cal-cell:hover { background: var(--surface-2); }
.cal-other { background: transparent; cursor: default; }
.cal-today .cal-day-num {
    background: var(--accent);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.cal-selected {
    box-shadow: inset 0 0 0 2px var(--accent);
    border-radius: 8px;
    background: rgba(217, 119, 6, 0.07);
    z-index: 1;
}
.cal-day-num {
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
}
.cal-has-items .cal-day-num { font-weight: 600; }
.cal-dots {
    display: flex;
    gap: 3px;
    align-items: center;
    min-height: 8px;
}
.cal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.cal-dot-event { background: var(--accent); }
.cal-dot-task { background: var(--orange); }

/* Detail Panel */
.cal-detail {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
}
.cal-detail-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
}
.cal-detail-section { margin-top: 16px; }
.cal-detail-section:first-of-type { margin-top: 12px; }
.cal-detail-subhead {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cal-detail-subhead i { font-size: 12px; }
.cal-detail-item {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border-left: 3px solid transparent;
    margin-bottom: 4px;
    transition: background 0.1s;
}
.cal-detail-item:hover { background: var(--surface-2); }
.cal-item-task { border-left-color: var(--orange); cursor: pointer; }
.cal-item-event { border-left-color: var(--accent); }
.cal-item-left { flex-shrink: 0; min-width: 60px; text-align: center; }
.cal-item-time {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    line-height: 1.2;
}
.cal-item-allday {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-dim);
    text-transform: uppercase;
}
.cal-item-dur {
    font-size: 11px;
    color: var(--text-dim);
}
.cal-item-body { flex: 1; min-width: 0; }
.cal-item-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}
.cal-item-desc {
    font-size: 13px;
    color: var(--text-dim);
}
.cal-item-right { flex-shrink: 0; display: flex; align-items: flex-start; gap: 8px; }
.cal-empty-day {
    text-align: center;
    padding: 32px;
    color: var(--text-dim);
}
.cal-empty-day i {
    font-size: 28px;
    opacity: 0.5;
    margin-bottom: 8px;
}

/* Phone — compact calendar */
@media (max-width: 767px) {
    .cal-cell { min-height: 44px; padding: 4px 2px; }
    .cal-day-num { font-size: 12px; }
    .cal-today .cal-day-num { width: 24px; height: 24px; font-size: 12px; }
    .cal-month-name { font-size: 16px; }
    .cal-nav { gap: 8px; }
    .cal-dot { width: 5px; height: 5px; }
    .cal-detail { padding: 12px 14px; }
    .cal-item-left { min-width: 50px; }
    .cal-item-time { font-size: 12px; }
}

/* ── Recently Done (subtle) ────────────────────────── */
.recent-done-section {
    margin-top: 4px;
    padding: 0 4px;
}
.recent-done-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 10px 0 6px;
    opacity: 0.6;
    display: flex;
    align-items: center;
    gap: 6px;
}
.recent-done-header i { font-size: 11px; }
.done-list { display: flex; flex-direction: column; gap: 2px; }
.done-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--hairline);
    opacity: 0.55;
}
.done-item:last-child { border-bottom: none; }
.done-check { color: var(--text-dim); font-size: 11px; flex-shrink: 0; opacity: 0.5; }
.done-title { flex: 1; color: var(--text-dim); font-weight: 400; }
.done-time { font-size: 11px; color: var(--text-dim); flex-shrink: 0; opacity: 0.5; }

/* ── Team ────────────────────────────────────────── */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}
.team-member-card .card-header {
    padding: 16px;
    gap: 12px;
}
.member-avatar { font-size: 36px; color: var(--accent); flex-shrink: 0; }
.member-info { flex: 1; }
.member-info h3 { font-size: 16px; font-weight: 600; margin: 0; }
.member-role { font-size: 12px; color: var(--text-dim); }
.member-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 12px;
}
.member-stats strong { color: var(--text); }
.member-task-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 240px;
    overflow-y: auto;
    margin-bottom: 12px;
}

/* ── Forms ──────────────────────────────────────── */
.form-group { margin-bottom: 12px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-dim);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s var(--ease-apple), box-shadow 0.2s var(--ease-apple);
}
.input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--ring);
}
textarea.input { resize: vertical; }
select.input { cursor: pointer; }

/* ── Buttons ─────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.btn:hover {
    background: var(--surface);
    border-color: var(--accent);
}
.btn-primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.15s;
}
.btn-icon:hover {
    background: var(--surface-2);
    color: var(--text);
}

/* ── Login ───────────────────────────────────────── */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}
.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px 40px;
    text-align: center;
    max-width: 360px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}
.login-icon {
    font-size: 48px;
    color: var(--accent);
    margin-bottom: 8px;
}
.login-icon .login-logo {
    max-height: 80px;
    width: auto;
}
.login-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
}
.login-subtitle {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 32px;
    font-weight: 500;
}
.login-form .input {
    margin-bottom: 16px;
    text-align: center;
    font-size: 16px;
}
.login-error {
    color: var(--red);
    font-size: 13px;
    margin-top: 12px;
}

/* ── Flash ───────────────────────────────────────── */
.flash-container {
    margin-bottom: 16px;
}
.flash {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    transition: opacity 0.3s;
}
.flash-success {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid rgba(52, 211, 153, 0.2);
}
.flash-error {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

/* ── Empty State ────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 32px 20px;
    color: var(--text-dim);
}
.empty-state.small { padding: 16px; }
.empty-icon { font-size: 32px; margin-bottom: 8px; opacity: 0.5; }

/* ── Modal ───────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}
.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-modal);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-modal);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 18px; font-weight: 600; }
.modal-form { padding: 20px; }

/* ── Page Header ────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Filter Tabs ──────────────────────────────── */
.filter-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px;
    width: fit-content;
}
.filter-tab {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    text-decoration: none;
    transition: all 0.15s;
}
.filter-tab:hover {
    color: var(--text);
    background: var(--surface-2);
}
.filter-tab.active {
    color: white;
    background: var(--accent);
}

/* ── Tasks Stats Bar ──────────────────────────── */
.tasks-stats-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.tasks-stats-info {
    display: flex;
    align-items: center;
    gap: 20px;
}
.stat-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.stat-badge i { font-size: 14px; }
.stat-pending i { color: var(--accent); }
.stat-done i { color: var(--green); }
.stat-total { color: var(--text-dim); font-weight: 600; }
.stat-total i { color: var(--text-dim); }

/* ── Completed Separator ─────────────────────── */
.completed-separator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--green);
    background: var(--green-bg);
    border: 1px solid rgba(101, 163, 13, 0.40);
    border-radius: var(--radius-sm);
    opacity: 0.9;
}
.completed-separator i {
    font-size: 16px;
}
.completed-separator::after {
    content: '';
    flex: 1;
    height: 3px;
    background: var(--green);
    opacity: 0.35;
    border-radius: 2px;
}

/* Location tasks separator — matches page accent */
.loc-tasks-separator {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--orange-bg);
    margin-top: 32px;
}
.loc-tasks-separator::after {
    background: var(--accent);
}

/* ── Property Cards (Overview Stat Grid) ────────── */
.btn-group {
    display: flex;
    gap: 8px;
}
.page-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.page-header-left h1 {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.property-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s var(--ease-apple), border-color 0.2s var(--ease-apple), box-shadow 0.2s var(--ease-apple);
}
.property-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}
.property-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.property-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    min-width: 0;
}
.property-name i {
    font-size: 16px;
    color: var(--accent);
    flex-shrink: 0;
}
.property-name span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.property-arrow {
    font-size: 12px;
    color: var(--text-dim);
    flex-shrink: 0;
}
.property-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-bottom: 10px;
    min-height: 20px;
}
.stat-inline {
    font-size: 12px;
    font-weight: 600;
}
.stat-inline-red { color: var(--red); }
.stat-inline-yellow { color: var(--orange); }
.stat-inline-blue { color: var(--blue); }
.stats-inline-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding: 4px 0;
    min-height: 28px;
}
.property-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-dim);
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.property-footer i {
    margin-right: 4px;
}

/* ── Member Detail Page ────────────────────────── */
.members-detail-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.member-detail-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.member-detail-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}
.member-detail-avatar {
    font-size: 30px;
    color: var(--accent);
    flex-shrink: 0;
}
.member-detail-info {
    flex: 1;
    min-width: 0;
}
.member-detail-name {
    font-weight: 600;
    font-size: 15px;
}
.member-detail-role {
    font-size: 12px;
    color: var(--text-dim);
}
.member-detail-stats {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.mini-stat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    background: var(--surface-2);
    color: var(--text-dim);
}
.mini-stat-red { background: var(--red-bg); color: var(--red); }
.mini-stat-yellow { background: var(--orange-bg); color: var(--orange); }
.mini-stat-blue { background: rgba(96, 165, 250, 0.15); color: var(--blue); }
.mini-stat-green { background: var(--green-bg); color: var(--green); }
.member-detail-body {
    padding: 12px 16px;
}

/* ── Member Stat Cards (Location Detail Grid) ──── */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.member-stat-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s var(--ease-apple), border-color 0.2s var(--ease-apple), box-shadow 0.2s var(--ease-apple);
}
.member-stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}
.member-stat-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.member-stat-avatar {
    font-size: 28px;
    color: var(--accent);
    flex-shrink: 0;
}
.member-stat-info {
    flex: 1;
    min-width: 0;
}
.member-stat-name {
    font-size: 14px;
    font-weight: 700;
}
.member-stat-role {
    font-size: 11px;
    color: var(--text-dim);
}
.member-role-tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: var(--orange-bg);
    padding: 4px 10px;
    border-radius: 8px;
}
.member-stat-card .property-stats-row {
    margin-bottom: 10px;
}
.member-stat-card .property-footer {
    padding-top: 8px;
}

/* ── Date Picker ──────────────────────────────── */
.date-picker-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}
.date-picker-wrap .date-input {
    flex: 1;
    min-width: 0;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}
.date-picker-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s;
}
.date-picker-btn:hover {
    background: var(--accent-hover);
}
.date-picker-btn i {
    pointer-events: none;
}

/* ── Responsive ─────────────────────────────────── */

/* Tablet (768px-1023px) — minor adjustments only */
@media (max-width: 1023px) {
    .property-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .member-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .location-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* Phone (<768px) — compact, concise, touch-friendly */
@media (max-width: 767px) {
    body { font-size: 13px; overflow-x: hidden; position: relative; }
    .main { padding: 12px; overflow-x: hidden; }
    .card, .nav, .nav-inner, .page-header, .stats-row, .dashboard-grid,
    .right-column, .property-grid, .member-grid, .members-detail-list,
    .location-grid, .member-card, .login-card, .filter-tabs,
    .stats-inline-row, .flash-container { max-width: 100%; }

    /* Nav */
    .nav-inner { padding: 0 12px; height: 48px; }
    .nav-link { padding: 6px 10px; font-size: 13px; }
    .nav-links .nav-link span { display: none; }
    .badge { font-size: 10px; min-width: 16px; padding: 1px 5px; }

    /* Stats */
    .stats-row { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .stat-card { padding: 12px; }
    .stat-number { font-size: 24px; }

    /* Dashboard */
    .dashboard-grid { grid-template-columns: 1fr; gap: 12px; }
    .dashboard-section { margin-bottom: 12px !important; }
    .right-column { gap: 12px; }

    /* Cards */
    .card-header { padding: 10px 14px; }
    .card-header h2, .card-header h3 { font-size: 14px; }
    .card-body { padding: 10px 14px; }

    /* Tasks */
    .task-item { padding: 8px 10px; gap: 8px; }
    .task-title { font-size: 13px; }
    .task-desc { font-size: 12px; display: none; }
    .task-check { font-size: 16px; }
    .tag { font-size: 10px; padding: 1px 6px; }

    /* Page header */
    .page-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .page-header h1 { font-size: 18px; }
    .page-header-left h1 { font-size: 18px; }
    .page-header-left { flex-wrap: wrap; gap: 8px; }

    /* Buttons */
    .btn { padding: 8px 14px; font-size: 13px; }
    .btn-sm { padding: 5px 10px; font-size: 12px; }
    .btn-group { flex-wrap: wrap; }

    /* Property grid */
    .property-grid { grid-template-columns: 1fr; gap: 10px; }
    .property-card { padding: 14px; }
    .property-name { font-size: 13px; }
    .property-stats-row { gap: 3px 10px; }
    .property-footer { font-size: 11px; }

    /* Member stat grid */
    .member-grid { grid-template-columns: 1fr; gap: 10px; }
    .member-stat-card { padding: 14px; }
    .member-stat-name { font-size: 13px; }

    /* Member detail */
    .member-role-tag { font-size: 10px; padding: 2px 8px; }
    .member-detail-card { }
    .member-detail-header { padding: 10px 12px; }
    .member-detail-avatar { font-size: 24px; }
    .member-detail-name { font-size: 14px; }
    .member-detail-body { padding: 10px 12px; }
    .mini-stat { min-width: 22px; height: 22px; font-size: 11px; }

    /* Filter tabs */
    .filter-tabs { overflow-x: auto; width: 100%; padding: 3px; gap: 2px; }
    .filter-tab { padding: 6px 12px; font-size: 12px; white-space: nowrap; }

    /* Calendar */
    .calendar-event { padding: 8px 0; gap: 10px; }
    .cal-day { font-size: 22px; }
    .calendar-event-title { font-size: 13px; }
    .calendar-event-details { font-size: 12px; }

    /* Modal - full screen on phone */
    .modal-overlay { padding: 0; align-items: flex-end; }
    .modal { max-width: 100%; max-height: 85vh; border-radius: 18px 18px 0 0; }
    .modal-header { padding: 14px 16px; }
    .modal-form { padding: 16px; }
    .input { padding: 8px 10px; font-size: 13px; }

    /* Date picker */
    .date-picker-btn { width: 32px; height: 32px; font-size: 12px; }

    /* Events mini */
    .event-mini-day { font-size: 16px; }

    /* Done list */
    .done-item { font-size: 12px; }
    .done-time { display: none; }

    /* Recently done - hide on phone */
    .dashboard-section:last-child .done-list .done-time { display: none; }

    /* Stats inline */
    .stats-inline-row { font-size: 12px; gap: 4px 12px; }

    /* Form rows */
    .form-row { grid-template-columns: 1fr; }
}

/* Small phone (<420px) — extra compact */
@media (max-width: 420px) {
    .main { padding: 8px; }
    .nav-inner { padding: 0 8px; }
    .stat-number { font-size: 20px; }
    .stat-card { padding: 8px; }
    .nav-brand { font-size: 12px; }
    .nav-logo { height: 18px; }
    .page-header h1 { font-size: 16px; }
    .card-header { padding: 8px 10px; }
    .card-header h2 { font-size: 13px; }
    .card-body { padding: 8px 10px; }
}

/* Desktop (>=1024px) — spacious layout, more real estate */
@media (min-width: 1024px) {
    .main { max-width: 1400px; }
    .dashboard-main { max-width: 960px; }
    .dashboard-section { margin-bottom: 24px; }
    .task-item { padding: 16px 16px; gap: 14px; }
    .task-title { font-size: 15px; font-weight: 600; margin-bottom: 3px; }
    .task-desc { font-size: 14px; }
    .card-body { padding: 20px 24px; }

    /* Calendar — more spacious on desktop */
    .cal-cell { min-height: 80px; padding: 10px 8px; }
    .cal-day-num { font-size: 16px; }
    .cal-today .cal-day-num { width: 32px; height: 32px; font-size: 14px; }
    .cal-dot { width: 7px; height: 7px; }
    .cal-detail { padding: 24px 28px; }
    .cal-month-name { font-size: 22px; }
}

/* ── Team Page: All Tasks Overview ─────────────── */
.filter-bar.team-filter-bar {
    margin-bottom: 16px;
}
.filter-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.filter-group .filter-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-dim);
    opacity: 0.7;
}
.filter-group select.input {
    min-width: 220px;
}
.team-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.team-prop-section {
    display: block;
}
.team-prop-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    margin-bottom: 4px;
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
}
.team-prop-header i {
    font-size: 14px;
    color: var(--accent);
    opacity: 0.7;
}
.team-prop-count {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    background: var(--surface-2);
    padding: 2px 10px;
    border-radius: 999px;
}
.team-prop-section .task-list .completed-separator {
    margin: 8px 0;
}

/* ── Time Carousel (iOS-style rolling drum) ────────── */
.time-carousel {
    width: 100%;
    user-select: none;
    -webkit-user-select: none;
}
.time-carousel .wheel {
    display: flex;
    padding: 4px 6px 6px;
    background: var(--surface-2);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
}
.time-carousel .wheel-cols {
    position: relative;
    display: flex;
    gap: 4px;
    width: 100%;
}
.time-carousel .wheel-col-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.time-carousel .wheel-arrow {
    height: 20px;
    border: none;
    background: transparent;
    color: var(--accent);
    font-size: 10px;
    cursor: pointer;
    opacity: 0.8;
    padding: 0;
    line-height: 1;
}
.time-carousel .wheel-arrow:hover { opacity: 1; }
.time-carousel .wheel-col {
    height: 120px;                      /* 3 visible rows x 40px */
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 28%, #000 72%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 28%, #000 72%, transparent 100%);
    cursor: pointer;
}
.time-carousel .wheel-col::-webkit-scrollbar { display: none; }
.time-carousel .wheel-spacer { height: 40px; flex-shrink: 0; }
.time-carousel .wheel-item {
    height: 40px;
    line-height: 40px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dim);
    scroll-snap-align: center;
    transition: color 0.12s, transform 0.12s;
    flex-shrink: 0;
}
.time-carousel .wheel-item.selected {
    color: #fff;
    font-weight: 800;
    transform: scale(1.1);
}
.time-carousel .wheel-highlight {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 40px;
    transform: translateY(-50%);
    border-top: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    background: rgba(217, 119, 6, 0.10);
    border-radius: 6px;
    pointer-events: none;
}

/* ── Color Palette ──────────────────────────────── */
/* Warm Amber is the permanent default theme (baked into :root above).
   Palette switcher widget and alternate themes removed Aug 2026. */

/* ══════════════════════════════════════════════════════════════
   APPLE POLISH OVERRIDE — layered on Warm Amber Dark (Aug 2026)
   Visual-only. No class renames. No logic. No JS hooks.
   ══════════════════════════════════════════════════════════════ */

/* ── Typography: heading tracking / leading (Apple: display = negative tracking) ── */
.card-header h2, .card-header h3, .modal-header h3 { letter-spacing: -0.01em; }
.page-header h1, .page-header-left h1, .login-title, .cal-month-name { letter-spacing: -0.02em; }
.login-title { line-height: 1.1; }
.cal-month-name { letter-spacing: -0.01em; }
.page-header h1, .page-header-left h1 { line-height: 1.15; }
.member-info h3, .member-detail-name, .member-stat-name { letter-spacing: -0.01em; }

/* ── Cards: gentle base depth (border + layered shadow, no harsh outline) ── */
.card, .stat-card, .property-card, .member-stat-card,
.member-detail-card, .cal-detail, .tasks-stats-bar, .login-card {
    box-shadow: var(--shadow-card);
}

/* ── Interaction: Apple easing on every control (replaces transition: all) ── */
.btn, .btn-primary, .btn-icon, .filter-tab, .date-picker-btn, .cal-nav-btn,
.nav-link, .task-check, .task-content, .property-card, .member-stat-card {
    transition: transform 0.2s var(--ease-apple),
                background-color 0.2s var(--ease-apple),
                border-color 0.2s var(--ease-apple),
                color 0.2s var(--ease-apple),
                box-shadow 0.2s var(--ease-apple),
                opacity 0.2s var(--ease-apple);
}

/* ── Pointer-down feedback (:active) — the big missing layer ── */
.btn:active, .btn-primary:active, .filter-tab:active { transform: scale(0.97); }
.btn-icon:active, .cal-nav-btn:active, .date-picker-btn:active,
.nav-link:active { transform: scale(0.92); }
.task-check:active { transform: scale(0.85); color: var(--accent); }
.task-content:active .task-title { color: var(--accent); }
.property-card:active, .member-stat-card:active { transform: translateY(-1px) scale(0.98); }
.cal-cell:active { background: rgba(217, 119, 6, 0.07); }

/* ── Primary button: restrained amber glow on hover, pressed = scale down ── */
.btn-primary { box-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.btn-primary:hover { box-shadow: 0 2px 8px rgba(217, 119, 6, 0.18); }

/* ── Task rows: hover lift + eased background ── */
.task-item { transition: background-color 0.2s var(--ease-apple), transform 0.2s var(--ease-apple); }
.task-item:hover { transform: translateX(3px); }
.cal-detail-item { transition: background-color 0.2s var(--ease-apple); }
.calendar-event { transition: background-color 0.2s var(--ease-apple); }

/* ── Calendar today marker: soft amber halo (Apple calendar ring feel) ── */
.cal-today .cal-day-num { box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.14); }

/* ── Task check: enlarge hit area without moving the row (padding + negative margin) ── */
.task-check { padding: 6px; margin: -6px; border-radius: 8px; }

/* ── Keyboard focus: visible amber rings on every interactive element ── */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}
.task-check:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Modal entrance (JS toggles display, so animations replay on every open) ── */
.modal-overlay { animation: overlay-in 0.25s var(--ease-apple); }
.modal { animation: modal-in 0.35s var(--ease-apple); transform-origin: center; }
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ── Phone: bottom-sheet slide-up instead of scale (respects existing flex-end overlay) ── */
@media (max-width: 767px) {
    .modal { animation-name: modal-in-phone; }
    @keyframes modal-in-phone {
        from { transform: translateY(100%); }
        to   { transform: translateY(0); }
    }
    .nav-link { min-height: 32px; }  /* slightly larger tap target, no layout change */
}

/* ── Text selection: amber tint (small Apple detail) ── */
::selection { background: rgba(217, 119, 6, 0.35); }

/* ── Fallback: no backdrop-filter support → solid nav (prevents see-through) ── */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .nav { background: var(--surface); }
}

/* ── Reduced motion: kill all animation/transition (Apple accessibility) ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .task-item:hover, .property-card:hover, .member-stat-card:hover { transform: none; }
}


/* ══════════════════════════════════════════════════════════════
   SECTION 1 — DESIGN TOKENS & GLOBAL CANVAS (Iteration 16)
   Visible Transformation: Warm Amber Dark, Apple × Linear × Vercel
   Append AFTER the Apple Polish Override block (end of file).
   ══════════════════════════════════════════════════════════════ */

:root {
    /* Deep obsidian canvas — 2 full steps darker than Iteration 15 */
    --bg: #0d0b09;
    --surface: #181410;
    --surface-2: #201b15;
    --surface-3: #282119;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);

    /* Brighter text stack for contrast on the darker canvas */
    --text: #f2ead9;
    --text-dim: #a89c8c;
    --text-faint: #7d7364;

    /* Amber family — brighter key, deep gradient partner, glow token */
    --accent: #f59e0b;
    --accent-deep: #d97706;
    --accent-soft: #fbbf24;
    --accent-glow: rgba(245, 158, 11, 0.35);
    --accent-glow-soft: rgba(217, 119, 6, 0.15);

    /* Semantic colors brightened for dark-bg legibility */
    --green: #a3e635;
    --green-bg: rgba(101, 163, 13, 0.15);
    --orange: #f59e0b;
    --orange-bg: rgba(217, 119, 6, 0.15);
    --red: #f87171;
    --red-bg: rgba(220, 38, 38, 0.15);
    --blue: #7dd3fc;
    --blue-bg: rgba(56, 189, 248, 0.15);
    --purple: #c4b5fd;
    --purple-bg: rgba(167, 139, 250, 0.15);

    /* Elevation & depth */
    --radius-card: 18px;
    --radius-modal: 20px;
    --radius-control: 12px;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.40);
    --shadow-card-hover: 0 10px 24px rgba(0, 0, 0, 0.45), 0 0 10px rgba(217, 119, 6, 0.06);
    --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 16px rgba(217, 119, 6, 0.05);
    --shadow-glow: 0 2px 8px rgba(217, 119, 6, 0.18);

    /* Motion */
    --ease-apple: cubic-bezier(0.32, 0.72, 0, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --nav-blur: 24px;
    --hairline: rgba(255, 255, 255, 0.08);
    --ring: rgba(245, 158, 11, 0.35);
}

/* Global canvas: fixed ambient amber glows (the "warm" in warm dark) */
html { background: #0d0b09; }
body {
    background:
        radial-gradient(ellipse 90% 45% at 50% -8%,  rgba(217, 119, 6, 0.06), transparent 62%),
        radial-gradient(ellipse 55% 35% at 92% 105%, rgba(217, 119, 6, 0.04), transparent 60%),
        radial-gradient(ellipse 45% 35% at 6%  55%,  rgba(245, 158, 11, 0.04), transparent 60%),
        var(--bg);
    background-attachment: fixed;
}

/* Refined scrollbars (Vercel-style) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: rgba(245, 158, 11, 0.35); }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent; }

/* ── Navigation: floating frosted pill bar ── */
.nav {
    background: rgba(13, 11, 9, 0.55);
    backdrop-filter: blur(var(--nav-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--nav-blur)) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 12px;
    margin: 12px auto 0;
    max-width: 1232px;               /* 1200 (nav-inner) + 2×16 */
    z-index: 100;
}
.nav-inner { height: 60px; }
.nav-brand { gap: 2px; }
.nav-brand i { font-size: 22px; filter: drop-shadow(0 0 8px rgba(245,158,11,0.45)); }
.nav-brand-text {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--accent-soft);
}
.nav-link {
    border-radius: 999px;            /* pill nav items */
    padding: 8px 16px;
    font-weight: 600;
    font-size: 13.5px;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.nav-link.active {
    color: #ffd27d;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(217, 119, 6, 0.12));
    box-shadow:
        inset 0 0 0 1px rgba(245, 158, 11, 0.40),
        0 0 10px rgba(217, 119, 6, 0.12);   /* amber underglow pill */
}
.logout-link { color: #f87171; }
.logout-link:hover { background: var(--red-bg); color: #fca5a5; }

/* Solid fallback when backdrop-filter is unsupported (re-declared after the
   earlier @supports block so it wins) */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .nav { background: #14110e; }
}

/* ── Cards: gradient elevation + hairline + layered depth ── */
.card, .stat-card, .property-card, .member-stat-card, .member-detail-card,
.cal-detail, .tasks-stats-bar, .login-card, .team-member-card {
    background: linear-gradient(180deg, #1b1611 0%, #161210 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}
.card { overflow: hidden; }
.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.015);
}
.card-header h2, .card-header h3 {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.card-header i { color: var(--accent); filter: drop-shadow(0 0 6px rgba(245,158,11,0.5)); }
.card-body { padding: 18px 22px; }

/* Clickable cards lift + glow (property cards, member stat cards) */
.property-card, .member-stat-card {
    border-radius: 18px;
    padding: 18px;
    transition: transform 0.2s var(--ease-apple), border-color 0.2s var(--ease-apple),
                box-shadow 0.2s var(--ease-apple), background-color 0.2s var(--ease-apple);
}
.property-card:hover, .member-stat-card:hover {
    border-color: rgba(245, 158, 11, 0.40);
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
}
.property-card:active, .member-stat-card:active { transform: translateY(-1px) scale(0.98); }

/* ── Page headers: bigger, bolder, chip icons ── */
.page-header { margin-bottom: 22px; }
.page-header h1, .page-header-left h1 {
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}
.page-header h1 i, .page-header-left h1 i {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.30), rgba(217, 119, 6, 0.08));
    color: #fbbf24;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.35), 0 0 8px rgba(217, 119, 6, 0.10);
    flex-shrink: 0;
}
.cal-month-name {
    font-size: clamp(20px, 2.4vw, 26px);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}
.cal-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-dim);
    transition: background-color 0.2s var(--ease-apple), color 0.2s var(--ease-apple),
                border-color 0.2s var(--ease-apple), transform 0.2s var(--ease-apple);
}
.cal-nav-btn:hover {
    background: var(--orange-bg);
    border-color: rgba(245, 158, 11, 0.35);
    color: var(--accent-soft);
}

/* ── Calendar: sleek floating cells (replaces the single bordered slab) ── */
.cal-grid {
    background: transparent;
    border: none;
    border-radius: 20px;
    padding: 10px;
    margin-bottom: 16px;
}
.cal-header-row { background: transparent; border-bottom: none; padding-bottom: 6px; }
.cal-head {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-faint);
}
.cal-row { gap: 6px; }
.cal-row + .cal-row { margin-top: 6px; }
.cal-cell {
    border: 1px solid rgba(255, 255, 255, 0.06);   /* overrides old border-right/bottom */
    border-radius: 14px;
    background: var(--surface);
    min-height: 68px;
    padding: 10px 6px;
    transition: transform 0.2s var(--ease-apple), background-color 0.2s var(--ease-apple),
                border-color 0.2s var(--ease-apple), box-shadow 0.2s var(--ease-apple);
}
.cal-cell:hover {
    background: var(--surface-2);
    border-color: rgba(245, 158, 11, 0.30);
    transform: translateY(-1px);
}
.cal-other { background: transparent; border-color: transparent; }
.cal-other:hover { background: transparent; border-color: transparent; }
.cal-today {
    background: linear-gradient(180deg, rgba(217, 119, 6, 0.18), rgba(217, 119, 6, 0.06));
    border-color: rgba(245, 158, 11, 0.45);
}
.cal-today .cal-day-num {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18), 0 0 10px rgba(217, 119, 6, 0.30);
    font-weight: 800;
}
.cal-selected {
    box-shadow: inset 0 0 0 2px var(--accent), 0 0 12px rgba(217, 119, 6, 0.14);
    background: rgba(217, 119, 6, 0.07);
}
.cal-has-items .cal-day-num { font-weight: 700; }
.cal-day-num { font-size: 15px; }

/* Indicator dots: bigger, glowing */
.cal-dots { gap: 4px; min-height: 9px; }
.cal-dot { width: 7px; height: 7px; border-radius: 50%; }
.cal-dot-event { background: var(--accent); box-shadow: 0 0 8px rgba(245, 158, 11, 0.8); }
.cal-dot-task  { background: #fbbf24; box-shadow: 0 0 8px rgba(251, 191, 36, 0.8); }

/* Detail panel — elevated card + tiled rows */
.cal-detail { border-radius: 20px; padding: 22px 26px; }
.cal-detail-header h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.cal-detail-subhead {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-dim);
}
.cal-detail-subhead i {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: var(--orange-bg);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}
.cal-detail-item {
    border-radius: 12px;
    border-left: 3px solid;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    transition: background-color 0.2s var(--ease-apple), transform 0.2s var(--ease-apple),
                border-color 0.2s var(--ease-apple);
}
.cal-detail-item:hover { background: var(--surface-2); transform: translateX(3px); }
.cal-item-task { border-left-color: var(--accent); }
.cal-item-event { border-left-color: var(--green); }
.cal-item-time { font-size: 15px; font-weight: 700; color: var(--accent-soft); }
.cal-item-title { font-size: 14.5px; font-weight: 600; }
.cal-empty-day { padding: 40px; }
.cal-empty-day i {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--orange-bg);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    opacity: 1;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.25);
}
.cal-today-btn {
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--text-dim);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s var(--ease-apple);
}
.cal-today-btn:hover { color: var(--accent-soft); border-color: rgba(245,158,11,0.4); background: var(--orange-bg); }

/* ── Task items: elevated card rows with glowing priority accent ── */
.task-list { gap: 10px; }
.task-item {
    position: relative;
    border-left: none;                          /* old border-left priority → ::before bar */
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    padding: 14px 14px 14px 20px;
    gap: 14px;
    transition: transform 0.2s var(--ease-apple), background-color 0.2s var(--ease-apple),
                border-color 0.2s var(--ease-apple), box-shadow 0.2s var(--ease-apple);
}
.task-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 3px;
    border-radius: 3px;
    background: var(--task-accent, var(--accent));
    box-shadow: 0 0 10px var(--task-accent, var(--accent));
    pointer-events: none;
}
.task-item:hover {
    background: var(--surface-2);
    border-color: rgba(245, 158, 11, 0.28);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), 0 0 10px rgba(217, 119, 6, 0.06);
}
/* Priority accent colors */
.task-urgent  { --task-accent: #f87171; }
.task-high    { --task-accent: #f59e0b; }
.task-medium  { --task-accent: #d97706; }
.task-low     { --task-accent: #7dd3fc; }

.task-check {
    font-size: 20px;
    color: #6b6153;
    border-radius: 50%;
    padding: 6px;
    margin: -6px;
}
.task-check:hover { color: var(--accent-soft); text-shadow: 0 0 12px rgba(245, 158, 11, 0.6); }
.task-check.checked { color: var(--green); text-shadow: 0 0 12px rgba(163, 230, 53, 0.55); }

.task-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 3px; }
.task-title.done { color: var(--text-faint); }
.task-desc { font-size: 13.5px; color: var(--text-dim); }
.task-meta { gap: 6px; margin-top: 6px; }
.task-actions { gap: 2px; }

/* ── Buttons: gradient primary with glow, dark text (Linear/Vercel style) ── */
.btn {
    border-radius: var(--radius-control);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--surface-3);
    color: var(--text);
    font-weight: 600;
    padding: 11px 18px;
    transition: transform 0.2s var(--ease-apple), background-color 0.2s var(--ease-apple),
                border-color 0.2s var(--ease-apple), box-shadow 0.2s var(--ease-apple),
                color 0.2s var(--ease-apple);
}
.btn:hover {
    background: #2e271e;
    border-color: rgba(245, 158, 11, 0.45);
    color: var(--text);
}
.btn:active { transform: scale(0.97); }
.btn-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: #1a1206;                       /* dark text on bright amber = modern + readable */
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1a1206;
    border: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}
.btn-primary:active { transform: translateY(0) scale(0.97); }
.btn-sm { padding: 7px 14px; border-radius: 10px; font-size: 13px; }

/* Icon buttons: squircle hover tiles */
.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text-dim);
    transition: background-color 0.2s var(--ease-apple), color 0.2s var(--ease-apple),
                transform 0.2s var(--ease-apple), box-shadow 0.2s var(--ease-apple);
}
.btn-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10);
}
.btn-icon:active { transform: scale(0.90); }

/* ── Filter tabs: capsule pills ── */
.filter-tabs {
    border-radius: 999px;
    padding: 5px;
    gap: 2px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.filter-tab {
    border-radius: 999px;
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    transition: background-color 0.2s var(--ease-apple), color 0.2s var(--ease-apple),
                box-shadow 0.2s var(--ease-apple), transform 0.2s var(--ease-apple);
}
.filter-tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.filter-tab.active {
    color: #1a1206;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    font-weight: 700;
}
.filter-tab:active { transform: scale(0.96); }

/* ── Tags: translucent pills with matching borders ── */
.tag {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    letter-spacing: 0.01em;
}
.tag i { margin-right: 3px; }
.tag-urgent         { background: var(--red-bg);    color: #f87171; border-color: rgba(248, 113, 113, 0.25); }
.tag-high, .tag-medium { background: var(--orange-bg); color: #fbbf24; border-color: rgba(245, 158, 11, 0.28); }
.tag-low            { background: var(--blue-bg);   color: #7dd3fc; border-color: rgba(125, 211, 252, 0.25); }
.tag-due            { background: rgba(168, 157, 140, 0.12); color: #c9bda9; border-color: rgba(255, 255, 255, 0.10); }
.tag-due.overdue    { background: var(--red-bg);    color: #f87171; border-color: rgba(248, 113, 113, 0.30); }
.tag-person         { background: var(--purple-bg); color: #c4b5fd; border-color: rgba(196, 181, 253, 0.25); }
.tag-location       { background: var(--green-bg);  color: #a3e635; border-color: rgba(163, 230, 53, 0.25); }
.tag-status-pending    { background: var(--orange-bg); color: #fbbf24; border-color: rgba(245, 158, 11, 0.28); }
.tag-status-in_progress{ background: var(--blue-bg);   color: #7dd3fc; border-color: rgba(125, 211, 252, 0.25); }
.tag-status-completed  { background: var(--green-bg);  color: #a3e635; border-color: rgba(163, 230, 53, 0.25); }

/* ── Tasks stats bar: tile badges with icon chips ── */
.tasks-stats-bar {
    border-radius: 18px;
    padding: 16px 20px;
    margin-bottom: 20px;
}
.tasks-stats-info { gap: 12px; }
.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 10px 16px;
}
.stat-badge i {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.stat-pending i { background: var(--orange-bg); color: var(--accent-soft); box-shadow: 0 0 8px rgba(217,119,6,0.15); }
.stat-done i    { background: var(--green-bg);  color: var(--green); }
.stat-total i   { background: rgba(255, 255, 255, 0.08); color: var(--text-dim); }
.stat-total { color: var(--text-dim); font-weight: 600; }

/* ── Completed separator: glowing pill + gradient rule ── */
.completed-separator {
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #a3e635;
    background: linear-gradient(90deg, rgba(101, 163, 13, 0.20), rgba(101, 163, 13, 0.05));
    border: 1px solid rgba(163, 230, 53, 0.30);
    box-shadow: 0 0 20px rgba(101, 163, 13, 0.12);
}
.completed-separator i { font-size: 14px; }
.completed-separator::after {
    height: 2px;
    background: linear-gradient(90deg, rgba(163, 230, 53, 0.55), transparent);
    opacity: 1;
}
.loc-tasks-separator {
    color: #fbbf24;
    background: linear-gradient(90deg, rgba(217, 119, 6, 0.22), rgba(217, 119, 6, 0.05));
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.08);
}
.loc-tasks-separator::after { background: linear-gradient(90deg, rgba(245, 158, 11, 0.55), transparent); }

/* ── Property cards: bento tiles with icon chips ── */
.property-grid, .member-grid { gap: 18px; }
.property-card-top { margin-bottom: 16px; }
.property-name { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.property-name i {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(217, 119, 6, 0.10));
    color: var(--accent-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.30);
}
.property-arrow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--text-dim);
    transition: transform 0.2s var(--ease-apple), background-color 0.2s var(--ease-apple), color 0.2s var(--ease-apple);
}
.property-card:hover .property-arrow { transform: translateX(3px); background: var(--orange-bg); color: var(--accent-soft); }
.property-stats-row { gap: 6px 14px; }
.stat-inline { font-size: 12px; font-weight: 600; }
.stat-inline i { margin-right: 4px; }
.property-footer { font-size: 12px; padding-top: 12px; border-top-color: rgba(255, 255, 255, 0.06); }

/* Member stat cards (location detail grid) */
.member-stat-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(217, 119, 6, 0.10));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--accent-soft);
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.30);
}
.member-stat-name { font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; }
.member-role-tag {
    border-radius: 999px;
    background: var(--orange-bg);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.28);
    padding: 4px 12px;
    font-weight: 600;
}

/* Team page: property section headers */
.team-prop-header { padding: 12px 16px; font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.team-prop-header i {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--orange-bg);
    color: var(--accent-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    opacity: 1;
}
.team-prop-count {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
}

/* ── Modals: deep frost overlay, floating amber-lit window, spring entrance ── */
.modal-overlay {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.modal {
    background: linear-gradient(180deg, #201a14 0%, #16120e 100%);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 20px;
    box-shadow: var(--shadow-modal);
    max-width: 500px;
    animation: modal-spring 0.4s var(--ease-spring);
    transform-origin: center;
}
@keyframes modal-spring {
    from { opacity: 0; transform: translateY(24px) scale(0.92); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.modal-header h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.modal-form { padding: 22px; }

/* Inputs: deep wells with amber focus bloom */
.input {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    padding: 12px 14px;
    color: var(--text);
    transition: border-color 0.2s var(--ease-apple), box-shadow 0.2s var(--ease-apple);
}
.input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16), 0 0 8px rgba(217, 119, 6, 0.10);
}
.form-group label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 6px;
}
.date-picker-btn {
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.20);
}
.date-picker-btn:hover { background: linear-gradient(135deg, #fbbf24, #f59e0b); }

/* ── Time carousel: visual retune ONLY (scroll-snap/heights/mask untouched) ── */
.time-carousel .wheel {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
}
.time-carousel .wheel-arrow { color: var(--accent-soft); font-size: 11px; }
.time-carousel .wheel-highlight {
    border-top: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    background: rgba(245, 158, 11, 0.12);
    box-shadow: 0 0 8px rgba(217, 119, 6, 0.15);
    border-radius: 8px;
}
.time-carousel .wheel-item.selected { color: #ffd27d; }

/* ── Recently Done: visible card, dimmed rows (present but calm) ── */
.recent-done-section {
    margin-top: 8px;
    padding: 16px 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
}
.recent-done-header {
    opacity: 1;
    color: var(--text-faint);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 0 0 8px;
}
.done-item { opacity: 0.8; padding: 7px 0; font-size: 13.5px; }
.done-check { color: #a3e635; opacity: 0.7; }
.done-title { color: var(--text-dim); }
.done-time { color: var(--text-faint); }

/* ── Login: glowing centerpiece ── */
.login-card {
    border: 1px solid rgba(245, 158, 11, 0.30);
    border-radius: 24px;
    background: linear-gradient(180deg, #1c1611 0%, #14100c 100%);
    box-shadow: 0 0 30px rgba(217, 119, 6, 0.07), var(--shadow-lg);
    padding: 52px 44px;
}
.login-logo { filter: drop-shadow(0 0 14px rgba(245, 158, 11, 0.40)); }
.login-title { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; }
.login-subtitle { color: var(--text-dim); font-size: 14px; }
.login-form .btn-primary { padding: 13px; font-size: 15px; border-radius: 14px; }

/* ── Flash: frosted tiles ── */
.flash {
    border-radius: 14px;
    border: 1px solid;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-weight: 600;
}
.flash-success { background: rgba(101, 163, 13, 0.14); border-color: rgba(163, 230, 53, 0.30); color: #a3e635; }
.flash-error   { background: rgba(220, 38, 38, 0.14); border-color: rgba(248, 113, 113, 0.30); color: #f87171; }

/* ── Empty states ── */
.empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--orange-bg);
    color: var(--accent-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    opacity: 1;
    margin-bottom: 12px;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.25), 0 0 8px rgba(217, 119, 6, 0.08);
}
.empty-state { padding: 40px 20px; color: var(--text-dim); }

/* ── Member detail page ── */
.member-role-tag { border-radius: 999px; }        /* already styled above */
.stats-inline-row { font-size: 13px; }
.stat-inline-red { color: #f87171; }
.stat-inline-yellow { color: #fbbf24; }
.stat-inline-blue { color: #7dd3fc; }

/* ── Bento spacing & hierarchy ── */
.main { padding: 28px 20px 60px; }
.dashboard-main { max-width: 860px; }
.dashboard-section { margin-bottom: 28px; }
.dashboard-calendar { margin-top: 28px; margin-bottom: 44px; }
.card, .cal-grid, .cal-detail, .tasks-stats-bar, .property-card,
.member-stat-card, .member-detail-card, .login-card { transition: border-color 0.2s var(--ease-apple); }

/* Phone (<768px) — the new components collapse gracefully */
@media (max-width: 767px) {
    .nav { margin: 8px 8px 0; border-radius: 16px; top: 8px; }
    .nav-inner { height: 52px; }
    .nav-link { padding: 7px 12px; font-size: 13px; }
    .page-header h1 i, .page-header-left h1 i { width: 38px; height: 38px; font-size: 15px; border-radius: 12px; }
    .cal-grid { padding: 6px; }
    .cal-row { gap: 4px; }
    .cal-row + .cal-row { margin-top: 4px; }
    .cal-cell { min-height: 46px; padding: 8px 2px; border-radius: 11px; }
    .cal-day-num { font-size: 12.5px; }
    .task-item { padding: 12px 12px 12px 18px; }
    .task-list { gap: 8px; }
    .stat-badge { padding: 8px 12px; font-size: 12.5px; }
    .tasks-stats-info { gap: 8px; flex-wrap: wrap; }
    .dashboard-main { max-width: 100%; }
    .recent-done-section { padding: 12px 14px; }
    .modal { animation-name: modal-in-phone; animation-duration: 0.35s; animation-timing-function: var(--ease-apple); }
    .filter-tab { padding: 8px 14px; }
}

/* Desktop (>=1024px) — the dramatic spacious layer */
@media (min-width: 1024px) {
    .main { max-width: 1400px; padding: 32px 24px 80px; }
    .dashboard-main { max-width: 920px; }
    .task-item { padding: 18px 18px 18px 24px; }
    .task-title { font-size: 16px; }
    .task-desc { font-size: 14px; }
    .cal-cell { min-height: 88px; padding: 12px 8px; }
    .cal-day-num { font-size: 16px; }
    .cal-today .cal-day-num { width: 34px; height: 34px; font-size: 15px; }
    .cal-dot { width: 8px; height: 8px; }
    .cal-detail { padding: 26px 30px; }
    .card-body { padding: 22px 26px; }
    .property-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .member-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

/* ── Motion & accessibility guards (Iteration 16) ── */
.modal-overlay { animation: overlay-in 0.25s var(--ease-apple); }
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-control);
}
::selection { background: rgba(245, 158, 11, 0.35); }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .task-item:hover, .property-card:hover, .member-stat-card:hover,
    .cal-cell:hover, .cal-detail-item:hover, .btn-primary:hover { transform: none; }
}

/* ══════════════════════════════════════════════════════════════
   Iteration 17 — compact tags (Oscar: tags must not compete with the title)
   ══════════════════════════════════════════════════════════════ */
.tag, .member-role-tag {
    font-size: 10px !important;
    padding: 2px 6px !important;
    border-radius: 5px !important;
    letter-spacing: 0;
}
.tag i, .member-role-tag i { font-size: 9px !important; margin-right: 2px; }
.tag-due { font-size: 10px !important; }


/* Iteration 18 — Lucide icon sizing (scale with font like FA did) */
[data-lucide] { width: 1em; height: 1em; vertical-align: -0.125em; stroke-width: 2; }
.btn-icon [data-lucide] { width: 1em; height: 1em; }
.tag [data-lucide] { width: 0.9em; height: 0.9em; vertical-align: -0.15em; }
/* Time carousel chevrons (time-carousel.js stays UNTOUCHED — override its FA icons via CSS) */
.wheel-arrow { position: relative; }
.wheel-arrow i { display: none !important; }
.wheel-arrow::after { content: ''; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; background: center/contain no-repeat; opacity: .8; }
.wheel-arrow.up::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8e0d4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m18 15-6-6-6 6'/%3E%3C/svg%3E"); }
.wheel-arrow.down::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8e0d4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }

/* ── Iteration 19 — priority color separation + compact tags (Oscar) ── */
/* low=blue · medium=amber · high=PURPLE (was same amber as medium) · urgent=red */
.tag-low            { background: rgba(96, 165, 250, 0.12); color: #7dd3fc; border-color: rgba(125, 211, 252, 0.22); }
.tag-medium         { background: var(--orange-bg); color: #fbbf24; border-color: rgba(245, 158, 11, 0.28); }
.tag-high           { background: rgba(167, 139, 250, 0.14); color: #c4b5fd; border-color: rgba(167, 139, 250, 0.30); }
.tag-urgent         { background: var(--red-bg); color: #f87171; border-color: rgba(248, 113, 113, 0.25); }
/* Priority accent bar on task cards matches new colors */
.task-low     { --task-accent: #7dd3fc; }
.task-medium  { --task-accent: #d97706; }
.task-high    { --task-accent: #a78bfa; }
.task-urgent  { --task-accent: #f87171; }
/* Tags even smaller (was 10px) — title stays the hero */
.tag, .member-role-tag {
    font-size: 8px !important;
    padding: 1px 5px !important;
    border-radius: 4px !important;
}
.tag i, .member-role-tag i { font-size: 7px !important; margin-right: 2px; }
.tag-due { font-size: 8px !important; }
/* Nav logo svg sizing */
.nav-logo { height: 24px; width: 24px; }

/* ══════════════════════════════════════════════════════════════
   Iteration 21 — QUICK ADD · FOCUS · SNOOZE/UNDO · PHONE FLOW
   ══════════════════════════════════════════════════════════════ */

/* ── Quick Add bar ─────────────────────────────────────────── */
.qa {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg);
    border: 1.5px solid rgba(217, 119, 6, 0.35);
    border-radius: 16px;
    padding: 13px 16px;
    margin-bottom: 10px;
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.05), 0 8px 24px rgba(0, 0, 0, 0.3);
}
.qa input {
    flex: 1;
    min-width: 0;
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
}
.qa input::placeholder { color: rgba(245, 240, 232, 0.35); font-weight: 500; }
.qa .go {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #1a1206;
    border: none;
    border-radius: 12px;
    padding: 9px 20px;
    font-weight: 800;
    font-size: 13.5px;
    cursor: pointer;
    font-family: inherit;
    flex: none;
}
.qa .go:disabled { opacity: 0.5; cursor: not-allowed; }
.qa-hint { font-size: 12px; font-weight: 600; color: rgba(245, 240, 232, 0.4); margin: 2px 0 14px; }

/* chips */
.chips { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.chip {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(245, 240, 232, 0.8);
}
.chip button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    padding: 0 0 0 2px;
    opacity: 0.7;
}
.chip button:hover { opacity: 1; }
.chip.b { background: rgba(217, 119, 6, 0.15); border-color: rgba(217, 119, 6, 0.35); color: #fbbf24; }
.chip.x { background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.3); color: #f87171; }
.chip.g { background: rgba(74, 222, 128, 0.1); border-color: rgba(74, 222, 128, 0.3); color: #4ade80; }
.chip.p { background: rgba(196, 181, 253, 0.12); border-color: rgba(196, 181, 253, 0.35); color: #c4b5fd; }

/* duplicate warning */
.dup-warn {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: rgba(217, 119, 6, 0.06);
    border: 1px dashed rgba(217, 119, 6, 0.35);
    border-radius: 10px;
    padding: 9px 12px;
    margin-bottom: 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(245, 240, 232, 0.75);
}
.dup-warn .dup-msg b { color: #fbbf24; }
.dup-warn .dup-actions { margin-left: auto; display: flex; gap: 6px; }
.dup-warn button {
    background: rgba(217, 119, 6, 0.15);
    color: #fbbf24;
    border: none;
    border-radius: 8px;
    padding: 5px 12px;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
}
.dup-warn button.skip { background: rgba(255, 255, 255, 0.07); color: rgba(245, 240, 232, 0.7); }

/* ── Focus strip + card ────────────────────────────────────── */
.focus-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 2px;
    flex-wrap: wrap;
}
.focus-title-wrap { display: flex; flex-direction: column; gap: 2px; }
.focus-header h2 {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 9px;
}
.focus-header h2 i { color: var(--accent); }
.focus-header .qa-hint { margin: 0; }
.focus-card { border-color: rgba(217, 119, 6, 0.3); }
.fstrip { display: flex; gap: 12px; margin: 12px 0 4px; }
.fcell {
    flex: 1;
    background: linear-gradient(180deg, #1b1611, #161210);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 14px 16px;
}
.fcell .n { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.fcell .l {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(245, 240, 232, 0.45);
    margin-top: 2px;
}
.fcell.green .n { color: #4ade80; }
.fcell.hot .n { color: #fbbf24; }
.fcell.red .n { color: #f87171; }
.focus-divider {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: rgba(245, 240, 232, 0.35);
    text-transform: uppercase;
    margin: 14px 0 8px;
}

/* ── Toasts ────────────────────────────────────────────────── */
#toast-root {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
    max-width: 94vw;
}
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #221b13;
    border: 1px solid rgba(217, 119, 6, 0.4);
    border-radius: 14px;
    padding: 12px 16px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
    font-size: 13.5px;
    font-weight: 600;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s var(--ease-apple), transform 0.25s var(--ease-apple);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-ok { border-color: rgba(74, 222, 128, 0.4); }
.toast .toast-msg b { color: var(--text); }
.toast .undo {
    margin-left: auto;
    background: rgba(217, 119, 6, 0.2);
    color: #fbbf24;
    border: none;
    border-radius: 9px;
    padding: 7px 14px;
    font-weight: 800;
    font-size: 12.5px;
    cursor: pointer;
    font-family: inherit;
    flex: none;
}

/* ── Snooze button + transient snoozed state ───────────────── */
.snooze-btn {
    background: rgba(217, 119, 6, 0.12);
    border: 1px solid rgba(217, 119, 6, 0.35);
    color: #fbbf24;
    display: flex;
    align-items: center;
    gap: 4px;
    /* Icon-button base is a fixed 34px square; the '→ Tomorrow' label is
       wider than that, so let the box grow to fit its content instead of
       letting the text spill out of the boundary. */
    width: auto;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.snooze-btn::after { content: '→ Tomorrow'; font-size: 10.5px; font-weight: 800; }
.snooze-btn:hover { background: rgba(217, 119, 6, 0.22); color: #fbbf24; }
.task-item.snoozed { border-style: dashed; border-color: rgba(217, 119, 6, 0.45); }

/* ── Swipe-to-complete reveal (touch) ──────────────────────── */
.task-item { overflow: hidden; }
.swipe-done {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 64px;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #062c12;
    border-radius: 0 14px 14px 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s var(--ease-apple);
    z-index: 5;
}
.swipe-done span { font-size: 20px; font-weight: 900; }

/* ── FAB (floating quick-add bubble — all screens, dashboard only) + done-today pill ── */
.fab {
    display: flex;
    position: fixed;
    bottom: 20px;
    right: 18px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #1a1206;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 8px 24px rgba(217, 119, 6, 0.45);
    z-index: 120;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.fab:hover { transform: scale(1.06); box-shadow: 0 10px 30px rgba(217, 119, 6, 0.55); }
.fab:active { transform: scale(0.94); }
.fab i { width: 22px; height: 22px; }
.pdone {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.22);
    border-radius: 999px;
    padding: 6px 12px;
    width: fit-content;
}
.pdone i { width: 13px; height: 13px; }

/* ── Mobile (≤767px) ───────────────────────────────────────── */
@media (max-width: 767px) {
    .fstrip { gap: 8px; }
    .fcell { padding: 11px 10px; }
    .fcell .n { font-size: 19px; }
    .fcell .l { font-size: 9.5px; letter-spacing: 0.05em; }
    .qa { padding: 10px 12px; gap: 10px; }
    .qa .go { padding: 8px 14px; font-size: 12.5px; }
    .snooze-btn { width: 30px; height: 30px; padding: 6px; }
    .snooze-btn::after { content: ''; }
}

@media (prefers-reduced-motion: reduce) {
    .toast { transition-duration: 0.01ms; }
    .swipe-done { transition-duration: 0.01ms; }
}
/* ── Iteration 25 — Projects ─────────────────────────────────────────────── */
.projects-stats-row { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 14px; min-height: 20px; }
.stat-num { font-weight: 800; font-size: 18px; margin-right: 4px; }
.stat-num.pstat-active  { color: var(--green); }
.stat-num.pstat-on_hold { color: var(--orange); }
.stat-num.pstat-done    { color: var(--blue); }

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.project-card {
    display: block; text-decoration: none;
    background: linear-gradient(180deg, #1b1611, #161210);
    border: 1px solid rgba(217, 119, 6, 0.14);
    border-radius: var(--radius-card, 18px);
    padding: 16px;
    box-shadow: var(--shadow-card);
    transition: transform .18s var(--ease-apple), border-color .18s var(--ease-apple), box-shadow .18s var(--ease-apple);
}
.project-card:hover {
    transform: translateY(-2px);
    border-color: rgba(217, 119, 6, 0.45);
    box-shadow: var(--shadow-card-hover), var(--shadow-glow);
}
.project-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.project-card-name { font-size: 15px; font-weight: 800; line-height: 1.25; color: var(--text); }
.pstat-pill {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
    padding: 2px 8px; border-radius: 999px; white-space: nowrap; flex: none;
}
.pstat-active   { background: var(--green-bg); color: var(--green); }
.pstat-on_hold  { background: var(--orange-bg); color: var(--orange); }
.pstat-done     { background: var(--blue-bg); color: var(--blue); }
.pstat-archived { background: rgba(120, 113, 108, 0.15); color: #a8a29e; }
.pcard-done     { opacity: .72; }
.pcard-archived { opacity: .5; }

.project-card-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); margin-top: 8px; }
.project-card-meta i { width: 14px; height: 14px; flex: none; }

.project-progress { margin-top: 12px; }
.progress-track { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #f59e0b, #d97706); transition: width .3s ease; }
.progress-label { display: block; font-size: 11px; color: var(--text-dim); margin-top: 5px; }

.target-overdue { color: var(--red); font-weight: 700; }
.target-soon    { color: var(--orange); font-weight: 700; }

/* Detail page */
.project-detail-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.project-header-tags { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; align-items: center; }
.project-header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn-ghost { background: rgba(255, 255, 255, 0.04); color: var(--text-dim); border: 1px solid rgba(255, 255, 255, 0.12); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.btn-danger { background: var(--red-bg); color: var(--red); border: 1px solid rgba(248, 113, 113, 0.3); }
.btn-danger:hover { background: rgba(248, 113, 113, 0.18); }

.project-detail-layout { display: grid; grid-template-columns: 1fr 280px; gap: 18px; align-items: start; margin-top: 16px; }
.project-tasks-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.project-tasks-head h2 { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.project-group { margin-bottom: 16px; }
.project-group-header {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px;
    color: var(--text-dim); padding: 4px 2px 6px;
}
.project-detail-rail { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 76px; }
.rail-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.rail-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 5px 0; border-bottom: 1px solid var(--hairline, rgba(255,255,255,0.07)); }
.rail-row span { color: var(--text-dim); }
.rail-notes { font-size: 13px; line-height: 1.5; color: var(--text); white-space: pre-wrap; }
.tag-project { background: rgba(217, 119, 6, 0.12); color: #fbbf24; border-color: rgba(251, 191, 36, 0.25); }

@media (max-width: 900px) {
    .project-detail-layout { grid-template-columns: 1fr; }
    .project-detail-rail { position: static; }
}
@media (max-width: 560px) {
    .project-grid { grid-template-columns: 1fr; }
    .project-detail-header { flex-direction: column; }
    .project-header-actions { width: 100%; }
}

/* ── Iteration 29: drag-and-drop task reorder (project detail) ─────────── */
/* Appended after the polish override so these win the cascade. */
body.reorder-mode .task-item { cursor: grab; }
body.reorder-mode .task-item:active { cursor: grabbing; }
.task-item.dragging { opacity: 0.45; }
.task-item.drop-before { box-shadow: 0 -3px 0 0 var(--accent); }
.task-item.drop-after  { box-shadow: 0  3px 0 0 var(--accent); }
.drag-handle { display: none; color: var(--text-dim); cursor: grab; flex: none; margin-right: 2px; }
body.reorder-mode .drag-handle { display: inline-flex; align-items: center; }
body.reorder-mode .drag-handle i { width: 16px; height: 16px; }
#reorder-toggle.active { background: var(--orange-bg); color: #fbbf24; border-color: rgba(245,158,11,.4); }
