/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:           #F8F8F8;
    --bg-card:      #FFFFFF;
    --bg-hover:     #F3F4F6;
    --border:       #E5E7EB;
    --accent:       #DE3B38;
    --accent-hover: #CB3532;
    --accent-soft:  #DE3B3812;
    --accent-mid:   #DE3B3822;
    --green:        #16a34a;
    --yellow:       #d97706;
    --red:          #DE3B38;
    --text:         #111827;
    --text-muted:   #6B7280;
    --text-light:   #9CA3AF;
    --radius:       14px;
    --radius-sm:    8px;
    --radius-xs:    6px;
    --sidebar-w:    240px;
    --nav-h:        64px;
    --shadow:       0 4px 20px rgba(0,0,0,0.09), 0 1px 4px rgba(0,0,0,0.05);
    --shadow-sm:    0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-accent: 0 4px 20px rgba(222,59,56,0.22);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

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

/* ===== PAGE ANIMATION ===== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.page-body { animation: fadeUp 0.25s ease; }

/* ===== LAYOUT ===== */
.app-wrapper { display: flex; min-height: 100vh; }

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    padding: 24px 0;
    box-shadow: 2px 0 16px rgba(0,0,0,0.04);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    padding: 0 24px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}
.logo-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--text);
    line-height: 1;
}
.logo-text .logo-v { color: var(--accent); }

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.15s ease;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
    box-shadow: inset 2px 0 0 var(--accent);
}
.nav-separator {
    height: 1px;
    background: var(--border);
    margin: 6px 4px;
}
.nav-item.nav-trash           { color: var(--red); opacity: 0.65; }
.nav-item.nav-trash:hover     { background: #DE3B3810; color: var(--red); opacity: 1; }
.nav-item.nav-trash.active    { background: #DE3B3812; color: var(--red); opacity: 1; font-weight: 600; box-shadow: inset 2px 0 0 var(--red); }

.sidebar-footer {
    padding: 20px 24px 0;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}
.user-avatar {
    width: 34px; height: 34px;
    background: var(--accent);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}

/* Avatar upload overlay (profile page) */
.avatar-change-overlay {
    position: absolute; inset: 0;
    border-radius: 50%;
    background: rgba(0,0,0,0.48);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; cursor: pointer;
    transition: opacity 0.18s;
    color: #fff;
}
.avatar-change-overlay:hover { opacity: 1; }
.avatar-change-overlay svg   { width: 22px; height: 22px; }
.user-name  { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.user-email { font-size: 11px; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sidebar-user-link {
    display: flex; align-items: center; gap: 10px; flex: 1;
    text-decoration: none; color: inherit; min-width: 0;
    border-radius: var(--radius-sm); padding: 4px;
    transition: background 0.15s;
}
.sidebar-user-link:hover { background: var(--bg-hover); }
.sidebar-user-info { min-width: 0; }

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-height: 100vh;
    padding: 32px 36px 40px;
    max-width: calc(100vw - var(--sidebar-w));
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 8px;
}
.page-title { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; }
.header-date { font-size: 13px; color: var(--text-muted); padding-top: 6px; }

/* ===== MOBILE TOPBAR ===== */
.mobile-topbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.mobile-topbar .logo-text { font-size: 20px; }
.mobile-topbar-date { font-size: 12px; color: var(--text-muted); font-weight: 500; }

/* ===== BOTTOM NAV (mobile) ===== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    z-index: 200;
    justify-content: space-around;
    align-items: center;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 16px rgba(0,0,0,0.07);
}
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 7px 10px;
    border-radius: 14px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
    flex: 1;
}
.bottom-nav-item svg { width: 20px; height: 20px; }
.bottom-nav-item.active {
    color: var(--accent);
    background: var(--accent-soft);
    font-weight: 600;
}
.bottom-nav-item:active {
    transform: scale(0.92);
    opacity: 0.8;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.card-sm { padding: 14px 16px; }

/* ===== GRID ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ===== WELCOME BLOCK ===== */
.welcome-block {
    background: linear-gradient(135deg, #DE3B38 0%, #f05350 60%, #ff6b68 100%);
    border-radius: var(--radius);
    padding: 22px 28px;
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: var(--shadow-accent);
    position: relative;
    overflow: hidden;
}
.welcome-block::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 180px; height: 180px;
    background: rgba(255,255,255,0.07);
    border-radius: 50%;
    pointer-events: none;
}
.welcome-block::after {
    content: '';
    position: absolute;
    bottom: -60px; right: 120px;
    width: 220px; height: 220px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    pointer-events: none;
}
.welcome-left { position: relative; z-index: 1; }
.welcome-greeting {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 4px;
    line-height: 1.2;
}
.welcome-sub {
    font-size: 14px;
    opacity: 0.85;
    font-weight: 400;
}

/* ===== QUICK ACTIONS ===== */
.quick-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.qa-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.32);
    border-radius: var(--radius-sm);
    color: #fff;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
    white-space: nowrap;
    font-family: inherit;
    cursor: pointer;
    backdrop-filter: blur(4px);
}
.qa-btn:hover {
    background: rgba(255,255,255,0.28);
    transform: translateY(-1px);
}
.qa-btn svg { width: 14px; height: 14px; }

/* ===== STAT CARDS ===== */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.stat-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}
.stat-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.stat-icon svg { width: 20px; height: 20px; }
.stat-icon.purple { background: #6366f112; color: #6366f1; }
.stat-icon.green  { background: #16a34a12; color: var(--green); }
.stat-icon.yellow { background: #d9770612; color: var(--yellow); }
.stat-icon.red    { background: #DE3B3812; color: var(--red); }
.stat-icon.blue   { background: #3B82F612; color: #3B82F6; }
.stat-value { font-size: 30px; font-weight: 700; letter-spacing: -1px; line-height: 1; }
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 400; }

/* ===== TASK PROGRESS BAR ===== */
.task-progress-wrap { margin-bottom: 16px; }
.task-progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.task-progress-label { font-size: 12px; color: var(--text-muted); }
.task-progress-pct { font-size: 12px; font-weight: 600; color: var(--accent); }
.task-progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
}
.task-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #DE3B38 0%, #ff6b68 100%);
    border-radius: 99px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

/* ===== SECTION HEADER ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.section-title { font-size: 15px; font-weight: 600; letter-spacing: -0.1px; }

/* ===== FORMS ===== */
.form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 140px; }
.form-label { font-size: 12px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

input, textarea, select {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    padding: 10px 14px;
    width: 100%;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
    -webkit-appearance: none;
}
input:focus, textarea:focus, select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { resize: vertical; min-height: 80px; }
select option { background: #fff; color: var(--text); }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(222,59,56,0.3); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }
.btn-danger { background: #DE3B3810; color: var(--red); border: 1px solid #DE3B3825; }
.btn-danger:hover { background: #DE3B3820; }
.btn-success { background: #16a34a10; color: var(--green); border: 1px solid #16a34a25; }
.btn-success:hover { background: #16a34a20; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-icon { padding: 8px; }

/* ===== TASK ITEMS ===== */
.task-list { display: flex; flex-direction: column; gap: 8px; }
.task-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: border-color 0.18s, box-shadow 0.18s;
    box-shadow: var(--shadow-sm);
}
.task-item:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.task-item.completed { opacity: 0.5; }
.task-item.completed .task-title { text-decoration: line-through; color: var(--text-muted); }
.task-check {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.18s;
}
.task-check:hover { border-color: var(--green); background: #16a34a10; }
.task-item.completed .task-check { background: var(--green); border-color: var(--green); }
.task-check-icon { color: #fff; display: none; }
.task-check-icon svg { width: 12px; height: 12px; }
.task-item.completed .task-check-icon { display: flex; }
.task-info { flex: 1; min-width: 0; }
.task-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.task-actions { display: flex; gap: 6px; opacity: 0; transition: opacity 0.18s; }
.task-item:hover .task-actions { opacity: 1; }
.priority-badge {
    font-size: 11px; font-weight: 600;
    padding: 3px 9px; border-radius: 20px; flex-shrink: 0;
}
.priority-high   { background: #DE3B3812; color: var(--red); }
.priority-medium { background: #d9770612; color: var(--yellow); }
.priority-low    { background: #16a34a12; color: var(--green); }

/* ===== NOTES GRID ===== */
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.note-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 18px;
    cursor: pointer;
    position: relative;
    border: 1px solid var(--border);
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    min-height: 140px;
    color: var(--text);
    box-shadow: var(--shadow-sm);
}
.note-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.note-title { font-weight: 600; font-size: 14px; margin-bottom: 8px; padding-right: 56px; }
.note-content { font-size: 13px; color: var(--text-muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.note-footer { margin-top: 12px; font-size: 11px; color: var(--text-light); }

.note-actions {
    position: absolute; top: 10px; right: 10px;
    display: flex; gap: 4px;
    opacity: 0; transition: opacity 0.18s;
}
.note-card:hover .note-actions { opacity: 1; }
.note-action-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    cursor: pointer; padding: 5px;
    display: flex; align-items: center;
    transition: all 0.15s;
}
.note-action-btn:hover { color: var(--text); background: var(--bg-hover); }
.note-action-btn.delete-btn:hover { color: var(--red); border-color: #DE3B3840; }
.note-action-btn svg { width: 13px; height: 13px; }

/* ===== CALENDAR ===== */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-header-cell {
    text-align: center; font-size: 11px; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase; padding: 6px 0;
    letter-spacing: 0.5px;
}
.cal-day {
    aspect-ratio: 1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 4px; border-radius: var(--radius-sm);
    cursor: pointer; transition: background 0.15s;
    position: relative;
}
.cal-day:hover { background: var(--bg-hover); }
.cal-day.today {
    background: var(--accent);
    border-radius: var(--radius-sm);
}
.cal-day.today .cal-day-num { color: #fff; font-weight: 700; }
.cal-day.other-month { opacity: 0.28; }
.cal-day.has-event::after {
    content: ''; width: 4px; height: 4px;
    border-radius: 50%; background: var(--accent);
    position: absolute; bottom: 4px;
}
.cal-day.today.has-event::after { background: rgba(255,255,255,0.7); }
.cal-day-num { font-size: 13px; font-weight: 500; }
.cal-nav { display: flex; align-items: center; gap: 12px; }
.cal-month-title { font-size: 15px; font-weight: 600; min-width: 140px; text-align: center; }

.events-list { display: flex; flex-direction: column; gap: 8px; }
.event-item {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 12px 14px;
    transition: border-color 0.18s, box-shadow 0.18s;
}
.event-item:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.event-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.event-info { flex: 1; }
.event-title { font-size: 14px; font-weight: 500; }
.event-date { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

/* ===== ALARM ===== */
.alarm-list { display: flex; flex-direction: column; gap: 10px; }
.alarm-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 20px;
    display: flex; align-items: center; gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.18s, box-shadow 0.18s;
}
.alarm-item:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.alarm-time {
    font-size: 34px; font-weight: 300;
    letter-spacing: -1.5px; font-variant-numeric: tabular-nums;
    color: var(--text);
}
.alarm-label { font-size: 14px; font-weight: 500; }
.alarm-repeat { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Toggle switch */
.toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: #D1D5DB; border-radius: 24px; cursor: pointer; transition: background 0.2s;
}
.toggle-slider::before {
    content: ''; position: absolute;
    height: 18px; width: 18px; left: 3px; top: 3px;
    background: #fff; border-radius: 50%; transition: transform 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ===== WEATHER ===== */
.weather-hero {
    background: linear-gradient(135deg, #DE3B38 0%, #f05350 50%, #ff6b68 100%);
    border-radius: var(--radius); padding: 36px 32px;
    text-align: center; margin-bottom: 20px; color: #fff;
    box-shadow: var(--shadow-accent);
}
.weather-temp { font-size: 72px; font-weight: 200; letter-spacing: -3px; color: #fff; }
.weather-desc { font-size: 18px; color: rgba(255,255,255,0.88); margin-top: 4px; }
.weather-location {
    font-size: 14px; color: rgba(255,255,255,0.75); margin-top: 8px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.weather-location svg { width: 14px; height: 14px; }
.weather-icon { font-size: 64px; margin-bottom: 8px; line-height: 1; }

.weather-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.weather-detail-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px; text-align: center;
    box-shadow: var(--shadow-sm);
}
.detail-value { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.detail-label { font-size: 12px; color: var(--text-muted); }

.forecast-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.forecast-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 16px;
    text-align: center; flex-shrink: 0; min-width: 86px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s;
}
.forecast-item:hover { border-color: var(--accent); }
.forecast-day { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-bottom: 8px; }
.forecast-icon { font-size: 24px; margin-bottom: 6px; }
.forecast-temp { font-size: 14px; font-weight: 600; }
.forecast-min { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.weather-loading { text-align: center; padding: 60px; color: var(--text-muted); }
.weather-error { text-align: center; padding: 40px; color: var(--red); }

/* ===== DASHBOARD QUICK TASK LIST ===== */
.quick-task {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid var(--border);
    transition: opacity 0.15s;
}
.quick-task:last-child { border-bottom: none; padding-bottom: 0; }
.quick-task:hover { opacity: 0.75; }
.quick-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* ===== EMPTY STATE ===== */
.empty-state {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 32px 24px;
    text-align: center; gap: 10px;
}
/* legacy: feather icon directly inside empty-state */
.empty-state > svg,
.empty-state > i + svg { width: 36px; height: 36px; opacity: 0.2; }
/* rich empty state elements */
.es-icon {
    width: 72px; height: 72px;
    background: var(--accent-soft);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
    margin-bottom: 6px;
}
.es-icon svg       { width: 30px; height: 30px; opacity: 1; }
.es-icon-muted     { background: var(--bg-hover); color: var(--text-light); }
.es-icon-green     { background: #16a34a10; color: var(--green); }
.es-title          { font-size: 16px; font-weight: 600; color: var(--text); }
.es-sub            { font-size: 13px; color: var(--text-muted); max-width: 260px; line-height: 1.55; margin-bottom: 4px; }
.es-sub strong     { color: var(--text); font-weight: 600; }

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 500;
    display: none;
    align-items: center; justify-content: center;
    padding: 16px;
    backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px;
    width: 100%; max-width: 480px; position: relative;
    box-shadow: 0 8px 48px rgba(0,0,0,0.14);
    animation: fadeUp 0.2s ease;
}
.modal-title { font-size: 18px; font-weight: 600; margin-bottom: 18px; }
.modal-close {
    position: absolute; top: 16px; right: 16px;
    background: transparent; border: none;
    color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 6px;
}
.modal-close:hover { background: var(--bg-hover); color: var(--text); }
.modal-close svg { width: 18px; height: 18px; }

/* ===== TOAST ===== */
.toast {
    position: fixed; bottom: 90px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 12px 20px;
    font-size: 14px; font-weight: 500;
    opacity: 0; transition: all 0.25s ease;
    z-index: 1000; white-space: nowrap; pointer-events: none;
    box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error   { border-color: var(--red); color: var(--red); }

/* ===== FILTER TABS ===== */
.filter-tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.filter-tab {
    padding: 7px 14px; border-radius: 20px; font-size: 13px; font-weight: 500;
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-muted); cursor: pointer; transition: all 0.15s;
    box-shadow: var(--shadow-sm);
}
.filter-tab:hover { color: var(--text); border-color: #D1D5DB; }
.filter-tab.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* ===== MISC ===== */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
    .main-content { padding: 28px 28px 40px; }
}

@media (max-width: 900px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .weather-details { grid-template-columns: repeat(2, 1fr); }
    .welcome-block { padding: 24px 24px; }
}

@media (max-width: 640px) {
    .sidebar { display: none; }
    .bottom-nav { display: flex; }
    .main-content {
        margin-left: 0; max-width: 100vw;
        padding: 16px 16px calc(var(--nav-h) + 16px);
    }
    .page-header { margin-bottom: 16px; }
    .page-title { font-size: 20px; }
    .header-date { display: none; }
    .mobile-topbar { display: flex; }
    .page-header { display: none; }

    /* Stats: 2Ã—2 on mobile */
    .grid-4 { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-value { font-size: 24px; }

    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .weather-details { grid-template-columns: repeat(3, 1fr); }
    .alarm-time { font-size: 28px; }
    .weather-temp { font-size: 56px; }
    .form-row { flex-direction: column; }
    .task-actions { opacity: 1; }
    .toast { bottom: calc(var(--nav-h) + 12px); }

    .welcome-block {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        margin-bottom: 16px;
        gap: 14px;
    }
    .welcome-greeting { font-size: 18px; }
    .quick-actions {
        flex-wrap: wrap;
        width: 100%;
        gap: 6px;
    }

    .weather-hero { padding: 24px 20px; }
    .weather-icon { font-size: 48px; }
    .notes-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}

/* ===== AUTH PAGES ===== */
.auth-page {
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
.auth-wrap { width: 100%; max-width: 420px; }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .logo-text { font-size: 28px; }
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 32px;
    box-shadow: var(--shadow);
}
.auth-title { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; margin-bottom: 6px; text-align: center; }
.auth-sub   { text-align: center; color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }
.auth-link  { text-align: center; color: var(--text-muted); font-size: 14px; margin-top: 20px; }
.auth-link a { color: var(--accent); font-weight: 500; }
.auth-link a:hover { color: var(--accent-hover); text-decoration: underline; }
.auth-error {
    background: #DE3B3810; border: 1px solid #DE3B3830; color: var(--red);
    border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; margin-bottom: 16px;
}
.auth-success {
    background: #16a34a10; border: 1px solid #16a34a30; color: var(--green);
    border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; margin-bottom: 16px;
}
@media (max-width: 480px) {
    .auth-card { padding: 24px 20px; }
}

/* ===== ALARM PULSE ANIMATION ===== */
@keyframes alarmPulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.12); }
}

@media (max-width: 400px) {
    .grid-4 { grid-template-columns: 1fr 1fr; }
    .notes-grid { grid-template-columns: 1fr; }
    .weather-details { grid-template-columns: 1fr 1fr; }
}

/* ===== SEARCH BAR ===== */
.search-bar { margin-bottom: 16px; }
.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.search-icon-inline {
    position: absolute;
    left: 12px;
    width: 16px; height: 16px;
    color: var(--text-light);
    pointer-events: none;
    flex-shrink: 0;
}
.search-input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    font-size: 14px;
    color: var(--text);
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(222,59,56,0.08);
}
.search-input::placeholder { color: var(--text-light); }

/* ===== TRASH ===== */
.trash-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 20px;
    flex-shrink: 0;
    white-space: nowrap;
}
.trash-type-badge.task  { background: #6366f112; color: #6366f1; }
.trash-type-badge.note  { background: #d9770612; color: var(--yellow); }
.trash-type-badge.event { background: #DE3B3812; color: var(--red); }
.trash-type-badge.alarm { background: #16a34a12; color: var(--green); }
.trash-item-deleted {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 3px;
}
.trash-restore-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-xs);
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    transition: background 0.13s, border-color 0.13s;
    white-space: nowrap;
}
.trash-restore-btn:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}
.trash-restore-btn svg { width: 14px; height: 14px; }

/* ===== EMOJI PICKER ===== */
.input-with-emoji {
    position: relative;
    display: flex;
    align-items: stretch;
}
.input-with-emoji input,
.input-with-emoji textarea {
    flex: 1;
    padding-right: 36px;
}
.emoji-trigger-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    background: none; border: none; padding: 0;
    font-size: 17px; line-height: 1;
    cursor: pointer; border-radius: var(--radius-xs);
    transition: background 0.12s;
    z-index: 1;
}
.emoji-trigger-btn:hover { background: var(--bg-hover); }
.input-with-emoji.is-textarea .emoji-trigger-btn {
    top: 8px; transform: none;
}

.emoji-picker {
    display: none;
    position: fixed;
    z-index: 10001;
    width: 280px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 10px;
    user-select: none;
}
.emoji-picker.open { display: block; }

.emoji-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.emoji-tab {
    flex: 1;
    background: none; border: none;
    border-radius: var(--radius-xs);
    font-size: 17px; padding: 4px 2px;
    cursor: pointer; text-align: center;
    transition: background 0.12s;
    line-height: 1;
}
.emoji-tab:hover  { background: var(--bg-hover); }
.emoji-tab.active { background: var(--accent-soft); }

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 1px;
    max-height: 148px;
    overflow-y: auto;
}
.emoji-item {
    background: none; border: none;
    border-radius: var(--radius-xs);
    font-size: 20px; padding: 4px 1px;
    cursor: pointer; text-align: center;
    line-height: 1;
    transition: background 0.1s;
}
.emoji-item:hover { background: var(--bg-hover); }

/* ===== NOTE FULLSCREEN ===== */
.note-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: var(--bg-card);
    flex-direction: column;
    overflow: hidden;
}
.nfs-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 32px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    gap: 20px;
}
.nfs-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    letter-spacing: -0.4px;
}
.nfs-date   { font-size: 13px; color: var(--text-muted); }
.nfs-actions { display: flex; gap: 8px; flex-shrink: 0; padding-top: 2px; align-items: flex-start; }
.nfs-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
    white-space: pre-wrap;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
}
@media (max-width: 640px) {
    .nfs-header  { padding: 16px 20px 14px; gap: 12px; }
    .nfs-title   { font-size: 18px; }
    .nfs-actions { gap: 4px; }
    .nfs-content { padding: 20px; font-size: 15px; max-width: 100%; }
}

/* ===== WEATHER LOADING SPINNER ===== */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.weather-loading svg { animation: spin 1.2s linear infinite; width: 32px; height: 32px; opacity: 0.5; display: block; margin: 0 auto; }
.weather-loading p   { margin-top: 12px; font-size: 14px; }

/* ===== SETTINGS PAGE ===== */
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.settings-row:last-child { border-bottom: none; }
.settings-row-info  { flex: 1; min-width: 0; }
.settings-row-label { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 2px; }
.settings-row-desc  { font-size: 12px; color: var(--text-muted); }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    margin-bottom: 4px;
}
.stat-cell { background: var(--bg); border-radius: 12px; padding: 14px 10px; text-align: center; }
.stat-cell-count { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1; margin-bottom: 4px; }
.stat-cell-label { font-size: 11px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }

/* ===== CATEGORIES ===== */
.cat-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    flex-shrink: 0;
    white-space: nowrap;
}
.cat-work      { background: #3B82F612; color: #3B82F6; }
.cat-study     { background: #8B5CF612; color: #8B5CF6; }
.cat-personal  { background: #0EA5E912; color: #0284C7; }
.cat-health    { background: #16a34a12; color: #16a34a; }
.cat-important { background: #DE3B3812; color: #DE3B38; }

/* ===== PIN BUTTON ===== */
.btn-pin {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-xs);
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.15s, background 0.15s;
}
.btn-pin svg { width: 15px; height: 15px; }
.btn-pin:hover         { color: var(--accent); background: var(--accent-soft); }
.btn-pin.pinned        { color: var(--accent); }
.btn-pin.pinned svg    { fill: var(--accent); }

/* Pinned visual indicators */
.task-item.is-pinned { box-shadow: inset 3px 0 0 var(--accent); }
.note-card.is-pinned { box-shadow: inset 0 3px 0 var(--accent), 0 2px 8px rgba(0,0,0,0.06); }

/* Pin button inside note-actions (bookmark icon) */
.note-action-btn.is-pinned-btn        { color: var(--accent); }
.note-action-btn.is-pinned-btn svg    { fill: var(--accent); }

/* Note footer â€” flex for category badge + date */
.note-footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ===== KANBAN BOARD ===== */
.kanban-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.kanban-tabs::-webkit-scrollbar { display: none; }
.kanban-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    border: none;
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    font-family: inherit;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}
.kanban-tab.active { background: var(--accent); color: #fff; }
.ktab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255,255,255,0.22);
}
.kanban-tab:not(.active) .ktab-count { background: var(--bg); color: var(--text-muted); }

/* Board */
.kanban-board {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 80px;
    align-items: flex-start;
}
.kanban-board::-webkit-scrollbar { display: none; }

/* Column */
.kanban-col {
    flex: 0 0 88%;
    min-width: 240px;
    scroll-snap-align: start;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.kanban-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.kanban-col-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.kanban-col-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.kanban-col-dot.todo        { background: #9CA3AF; }
.kanban-col-dot.in-progress { background: #F59E0B; }
.kanban-col-dot.done        { background: #16A34A; }
.kanban-col-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg);
    border-radius: 12px;
    padding: 2px 9px;
    min-width: 26px;
    text-align: center;
}
.kanban-cards {
    padding: 12px;
    flex: 1;
    min-height: 80px;
}
.kanban-empty {
    text-align: center;
    padding: 28px 16px;
    color: var(--text-light);
    font-size: 13px;
    font-style: italic;
}

/* â”€â”€ Kanban Card â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.kcard {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 10px;
    transition: box-shadow 0.15s, transform 0.1s;
}
.kcard:last-child { margin-bottom: 0; }
.kcard:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.09);
    transform: translateY(-1px);
}
.kcard.is-pinned { box-shadow: inset 0 3px 0 var(--accent); }
.kcard.is-pinned:hover { box-shadow: inset 0 3px 0 var(--accent), 0 4px 14px rgba(0,0,0,0.09); }

.kcard-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}
.kcard-pinmark {
    margin-left: auto;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
}
.kcard-pinmark svg { width: 13px; height: 13px; fill: var(--accent); }

.kcard-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 4px;
    word-break: break-word;
}
.kcard-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 8px;
    word-break: break-word;
}
.kcard-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.kcard-due {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}
.kcard-due svg { width: 11px; height: 11px; }

.kcard-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: 8px;
    margin-top: 2px;
}
.kcard-btn-group {
    display: flex;
    align-items: center;
    gap: 2px;
}
.kcard-move-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: var(--radius-xs);
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, color 0.12s;
    flex-shrink: 0;
}
.kcard-move-btn svg   { width: 16px; height: 16px; }
.kcard-move-btn:hover { background: var(--bg); color: var(--text); }
.kcard-move-spacer    { width: 26px; flex-shrink: 0; display: inline-block; }

/* â”€â”€ Desktop 3-column layout â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (min-width: 769px) {
    .kanban-tabs { display: none; }
    .kanban-board {
        overflow: visible;
        padding-bottom: 0;
        align-items: flex-start;
    }
    .kanban-col {
        flex: 1 1 0;
        min-width: 200px;
    }
    .kanban-cards {
        max-height: calc(100vh - 420px);
        overflow-y: auto;
    }
}

/* ===== MOBILE UX OVERHAUL ===== */

/* Slide-up for bottom-sheet modals */
@keyframes slideUp {
    from { transform: translateY(32px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Task form: selects in a 3-col grid (desktop) */
.task-selects-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

@media (max-width: 640px) {

    /* Stop any element from pushing page wider than viewport */
    html, body { overflow-x: hidden; }

    /* Bump nav height so the variable drives all derived spacings */
    :root { --nav-h: 68px; }

    /* â”€â”€ Bottom Nav â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .bottom-nav {
        height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        padding-left:  env(safe-area-inset-left,   0px);
        padding-right: env(safe-area-inset-right,  0px);
    }
    .bottom-nav-item {
        /* min 44 px tap target height */
        min-height: 52px;
        padding: 6px 2px;
        font-size: 9.5px;
        letter-spacing: 0;
        gap: 2px;
    }
    .bottom-nav-item svg { width: 22px; height: 22px; }

    /* â”€â”€ Modals â†’ bottom sheets â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
        padding-top: 52px; /* tap-to-close strip at top */
    }
    .modal {
        max-width:   100%;
        border-radius: var(--radius) var(--radius) 0 0;
        padding:     20px 16px calc(28px + env(safe-area-inset-bottom, 0px));
        max-height:  calc(100dvh - 52px);
        overflow-y:  auto;
        -webkit-overflow-scrolling: touch;
        animation:   slideUp 0.22s cubic-bezier(0.33, 1, 0.68, 1);
    }
    /* drag handle pill */
    .modal::before {
        content:      '';
        display:      block;
        width:        36px;
        height:       4px;
        background:   var(--border);
        border-radius: 2px;
        margin:       0 auto 16px;
    }
    .modal-close {
        top:   16px;
        right: 14px;
        /* Make close hit-target 44px */
        padding: 10px;
        margin: -10px;
    }
    .modal-title { font-size: 16px; }

    /* â”€â”€ Touch targets â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    /* Inputs & selects: at least 44 px tall */
    input:not([type='checkbox']):not([type='radio']):not([type='date']),
    select {
        min-height: 44px;
    }
    /* Date input: let browser decide height but add padding */
    input[type='date'] { padding-top: 10px; padding-bottom: 10px; }

    /* Primary / ghost buttons: at least 44 px tall */
    .btn:not(.btn-sm):not(.btn-icon) { min-height: 44px; }
    /* Icon-only buttons: 40 px square */
    .btn.btn-icon { min-width: 40px; min-height: 40px; }

    /* â”€â”€ Form layout â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .form-group { min-width: 0; } /* prevent min-width:140px blowout */

    /* Task selects: 2 cols [Status|Priority] / [Category full] */
    .task-selects-row { grid-template-columns: 1fr 1fr; }
    .task-selects-row .form-group:last-child { grid-column: span 2; }

    /* â”€â”€ Cards: tighter on mobile â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .card { padding: 14px; }

    /* â”€â”€ Notes: always 1 column â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .notes-grid { grid-template-columns: 1fr !important; gap: 10px; }

    /* â”€â”€ Kanban: consistent ~24 px peek of next column â”€ */
    .kanban-col {
        flex: 0 0 calc(100% - 38px);
        min-width: 0;
    }
    .kanban-cards { padding: 10px; }
    .kcard { padding: 10px; }
    .kcard-move-btn  { min-width: 36px; min-height: 36px; }
    .kcard-btn-group .btn { min-height: 36px; min-width: 36px; padding: 6px; }
    .kanban-tab { padding: 7px 10px; font-size: 12px; }

    /* â”€â”€ Settings: stack action button below text â”€â”€â”€â”€â”€â”€â”€ */
    .settings-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .settings-row .btn,
    .settings-row label.btn {
        width: 100%;
        justify-content: center;
    }

    /* â”€â”€ Trash items: allow wrapping on narrow â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .task-item { flex-wrap: wrap; }

    /* â”€â”€ Alarm list: tighter â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .alarm-time { font-size: 26px; }

    /* â”€â”€ Dashboard welcome: smaller â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .welcome-greeting { font-size: 17px; }
}

/* Extra-narrow (360 px and below) */
@media (max-width: 380px) {
    .main-content { padding-left: 12px; padding-right: 12px; }
    .kanban-col { flex: 0 0 calc(100% - 26px); }
    .bottom-nav-item { font-size: 8.5px; }
    .kcard { padding: 8px; }
}

/* ===== Language Toggle Button ===== */
.lang-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    font-family: inherit;
    flex-shrink: 0;
    line-height: 1.4;
}
.lang-btn:hover {
    background: var(--accent-soft, #fdecea);
    color: var(--accent);
    border-color: var(--accent);
}

/* ===== MOBILE UX v2: Targeted Improvements ===== */
@media (max-width: 640px) {

    /* â”€â”€ Bottom nav: 5-item spacing â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .bottom-nav { gap: 0; }
    .bottom-nav-item {
        flex: 1;
        font-size: 10px;
        gap: 3px;
        padding: 6px 4px;
        min-height: 52px;
    }
    .bottom-nav-item svg { width: 22px; height: 22px; }

    /* â”€â”€ Kanban: sticky tabs so they don't scroll away â”€â”€ */
    .kanban-tabs {
        position: sticky;
        top: 0;
        z-index: 20;
        background: var(--bg);
        padding: 8px 16px 10px;
        margin: 0 -16px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }

    /* Remove double bottom clearance â€” main-content already handles it */
    .kanban-board { padding-bottom: 8px; }

    /* â”€â”€ Add task: full-width submit button on mobile â”€â”€â”€ */
    #task-form button[type="submit"] {
        width: 100%;
        justify-content: center;
    }

    /* â”€â”€ Stat cards: compact â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .stat-card { padding: 14px 12px; gap: 8px; }
    .stat-icon { width: 34px; height: 34px; border-radius: 8px; }
    .stat-icon svg { width: 17px; height: 17px; }
    .stat-label { font-size: 12px; }
    .stat-value { font-size: 22px; }

    /* â”€â”€ Quick action buttons: tap-friendly â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .qa-btn { min-height: 40px; padding: 8px 12px; font-size: 12px; }

    /* â”€â”€ Welcome block: tighter â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .welcome-block { padding: 18px 16px; margin-bottom: 14px; }
    .welcome-greeting { font-size: 17px; }
    .welcome-sub { font-size: 13px; }

    /* â”€â”€ Alarm: compact clock card and alarm items â”€â”€â”€â”€â”€ */
    #current-time { font-size: 46px !important; letter-spacing: -1px !important; }
    .alarm-item { padding: 14px 16px; gap: 12px; }
    .alarm-time { font-size: 28px; }

    /* â”€â”€ Calendar: event list items don't overflow â”€â”€â”€â”€â”€â”€ */
    .event-item { gap: 10px; padding: 10px 0; }
    .event-item > div:last-child { flex-shrink: 0; }
    .events-list .event-item:first-child { padding-top: 0; }

    /* â”€â”€ Trash items: clean wrap on narrow screens â”€â”€â”€â”€â”€â”€ */
    .task-item { gap: 10px; padding: 12px 14px; align-items: flex-start; }
    .task-info { padding-top: 1px; }
    .task-title { white-space: normal; }
    .task-actions { margin-left: auto; flex-shrink: 0; }

    /* â”€â”€ Section headers â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .section-header { margin-bottom: 10px; }
    .section-title { font-size: 14px; }

    /* â”€â”€ Notes grid: always 1 column â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .notes-grid { grid-template-columns: 1fr !important; }

    /* â”€â”€ Card: consistent compact padding â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .card { padding: 14px 14px; }

    /* â”€â”€ Profile: wider on mobile â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .profile-page-wrap { max-width: 100% !important; }

    /* â”€â”€ Weather: inputs wrap cleanly â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    #city-input { min-height: 44px; }
}

/* â”€â”€ Extra-narrow tweaks (â‰¤380 px) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 380px) {
    #current-time { font-size: 38px !important; }
    .qa-btn { font-size: 11px; padding: 7px 10px; }
    .kanban-tabs { padding-left: 12px; padding-right: 12px; margin: 0 -12px; }
    .stat-value { font-size: 20px; }
    .bottom-nav-item { font-size: 9px; }
}

/* ===== MOBILE LAYOUT FINAL OVERRIDES ===== */
/* Fixes conflicts from previous blocks. All !important to win cascade. */
@media (max-width: 640px) {

    /* All grid layouts â†’ 1 column */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    /* Weather detail cards â†’ 2 columns (4-6 small metric tiles, 2-col is readable) */
    .weather-details {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    /* Notes grid â†’ always 1 column */
    .notes-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* Cards: consistent compact padding */
    .card {
        padding: 16px !important;
    }

    /* Stat cards compact */
    .stat-card {
        padding: 14px 12px !important;
        gap: 8px !important;
    }
    .stat-value { font-size: 22px !important; }
    .stat-label { font-size: 12px !important; }

    /* Buttons: minimum 44px tap target */
    .btn:not(.btn-sm):not(.btn-icon) {
        min-height: 44px !important;
    }

    /* Content must clear bottom nav */
    .main-content {
        padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 16px) !important;
    }

    /* Text must not overflow */
    .card, .stat-card, .note-card, .task-item, .alarm-item, .event-item {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

@media (max-width: 400px) {
    /* â‰¤400px: weather still 2 col, but notes and grids stay 1 col */
    .weather-details { grid-template-columns: 1fr 1fr !important; }
    .grid-4 { grid-template-columns: 1fr !important; }
    .notes-grid { grid-template-columns: 1fr !important; }
}

/* ===== MOBILE KANBAN + MODALS ===== */

/* â”€â”€ Mobile Add Task FAB button â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#mobile-add-task-btn {
    display: none;
    position: fixed;
    bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 16px);
    right: 16px;
    z-index: 100;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 22px;
    height: 44px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 12px rgba(222,59,56,0.28);
    transition: transform 0.12s, box-shadow 0.12s;
    -webkit-tap-highlight-color: transparent;
}
#mobile-add-task-btn:active { transform: scale(0.95); box-shadow: 0 1px 6px rgba(222,59,56,0.22); }
#mobile-add-task-btn svg { width: 16px; height: 16px; }

@media (max-width: 640px) {
    /* â”€â”€ Hide desktop Add Task form; show FAB â”€â”€â”€â”€â”€â”€â”€â”€ */
    #add-task-card  { display: none !important; }
    #mobile-add-task-btn { display: flex; }

    /* â”€â”€ Kanban tabs: sticky at top â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .kanban-tabs {
        position: sticky;
        top: 0;
        z-index: 30;
        background: var(--bg);
        padding: 8px 0 10px;
        margin-bottom: 0;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    }
    .kanban-tab {
        flex: 1;
        justify-content: center;
        border-radius: 10px;
        padding: 8px 6px;
        font-size: 13px;
        font-weight: 500;
        min-height: 38px;
    }

    /* â”€â”€ Kanban board: horizontal swipe â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .kanban-board {
        display: flex;
        overflow-x: auto;
        overflow-y: visible;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 10px;
        padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 72px);
    }
    .kanban-board::-webkit-scrollbar { display: none; }

    /* Each column = 88vw, peek of ~12vw shows next col */
    .kanban-col {
        flex: 0 0 88vw !important;
        min-width: 0 !important;
        scroll-snap-align: start;
        background: var(--bg-card);
        border-radius: var(--radius);
        border: 1px solid var(--border);
        box-shadow: var(--shadow-sm);
    }

    /* Kanban cards area */
    .kanban-cards {
        padding: 8px 10px 10px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    /* Task cards: compact */
    .kcard {
        padding: 10px 12px;
        border-radius: 10px;
    }
    .kcard-title { font-size: 14px; line-height: 1.4; }
    .kcard-desc  { font-size: 12px; margin-top: 4px; }
    .kcard-meta  { margin-top: 6px; }
    .kcard-actions {
        padding-top: 8px;
        margin-top: 6px;
    }

    /* Action buttons: 40px min, always visible */
    .kcard-btn-group .btn { min-width: 38px; min-height: 38px; padding: 6px; }
    .kcard-move-btn { min-width: 38px; min-height: 38px; padding: 6px; }
    .btn-pin { min-width: 34px; min-height: 34px; padding: 5px; }

    /* â”€â”€ Modals: full-screen bottom sheet â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .modal-overlay {
        align-items: flex-end !important;
        padding: 0 !important;
    }
    .modal {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 92vh !important;
        border-radius: 24px 24px 0 0 !important;
        padding: 0 16px calc(24px + env(safe-area-inset-bottom, 0px)) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    /* Drag handle */
    .modal::before {
        content: '';
        display: block;
        width: 40px; height: 4px;
        background: var(--border);
        border-radius: 2px;
        margin: 14px auto 20px;
        flex-shrink: 0;
    }

    /* Modal inputs/textareas: no overflow */
    .modal input,
    .modal select,
    .modal textarea {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* â”€â”€ Search bar: above sticky tabs â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .search-bar { margin-bottom: 10px; }
}

@media (max-width: 380px) {
    .kanban-col { flex: 0 0 86vw !important; }
    #mobile-add-task-btn { right: 12px; padding: 0 14px; }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   Mobile Fix: Kanban height, swipe hint, calendar,
   profile padding, global nav clearance
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* Swipe hint: hidden on desktop */
.swipe-hint { display: none; }

@media (max-width: 640px) {
    /* Page body: animation can clip content when body has overflow-x:hidden;
       remove transform, keep fade only */
    .page-body {
        padding-top: 8px;
        animation: none;
    }

    /* â”€â”€ Swipe hint â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .swipe-hint {
        display: block;
        text-align: center;
        font-size: 11px;
        color: var(--text-light);
        padding: 4px 0 6px;
        letter-spacing: 0.4px;
        opacity: 0.8;
    }

    /* â”€â”€ Kanban board: fixed height, horizontal-only scroll â”€â”€ */
    .kanban-board {
        height: calc(100dvh - var(--nav-h) - env(safe-area-inset-bottom, 0px) - 216px) !important;
        min-height: 340px !important;
        overflow-y: hidden !important;
        padding-bottom: 0 !important;
    }

    /* Columns fill board height */
    .kanban-col {
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Column header stays at top */
    .kanban-col-header { flex-shrink: 0 !important; }

    /* Cards area: fills remaining height, scrolls vertically */
    .kanban-cards {
        flex: 1 1 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 8px 10px 24px !important;
    }

    /* â”€â”€ Profile: extra bottom padding so Danger Zone clears nav â”€â”€ */
    .profile-page-wrap {
        padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 48px) !important;
    }

    /* â”€â”€ All pages: bottom nav must not cover last content â”€â”€ */
    .main-content {
        padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 28px) !important;
    }
}

/* â”€â”€ Quick Tools (Dashboard) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.quick-tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tool-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text);
    transition: box-shadow 0.15s, transform 0.12s, border-color 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.tool-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--border-hover, var(--border));
    transform: translateY(-1px);
}

.tool-card:active { transform: scale(0.97); }

.tool-card-body { min-width: 0; }

.tool-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-card-desc {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 640px) {
    .quick-tools-grid { gap: 10px; }
    .tool-card { padding: 12px 14px; gap: 12px; }
    .tool-card-title { font-size: 13px; }
}

@media (max-width: 340px) {
    .quick-tools-grid { grid-template-columns: 1fr; }
}

/* â”€â”€ Dashboard: mobile section order â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 640px) {
    .dash-sections {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    /* Nullify inline margin-bottom/top so gap drives spacing */
    .dash-sections > * { margin-top: 0 !important; margin-bottom: 0 !important; }

    #dash-today      { order: 1; }
    #dash-main-grid  { order: 2; }
    #dash-notes-wrap { order: 3; }
}

/* â”€â”€ Welcome block: mobile compact + hide duplicate tools â”€â”€ */
@media (max-width: 640px) {
    .qa-mobile-hide { display: none !important; }

    .welcome-block {
        padding: 14px 16px !important;
        gap: 10px !important;
    }
    .welcome-greeting { font-size: 17px !important; }
}


/* ===== SERVICES PAGE ===== */
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.service-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 18px;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s, transform 0.12s, border-color 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.service-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.service-card:active { transform: scale(0.97); }

.service-card-body { flex: 1; min-width: 0; }

.service-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.service-card-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

.service-card-arrow {
    color: var(--text-light);
    flex-shrink: 0;
}
.service-card-arrow svg { width: 16px; height: 16px; }

@media (min-width: 900px) {
    .services-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}

@media (max-width: 360px) {
    .services-grid { grid-template-columns: 1fr; }
}

/* ===== DASHBOARD SERVICES SHORTCUT WIDGET ===== */
.services-shortcuts {
    display: flex;
    gap: 10px;
}

.service-shortcut {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    flex: 1;
    box-shadow: var(--shadow-sm);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

.service-shortcut:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    color: var(--text);
}

.service-shortcut:active { transform: scale(0.95); }

.service-shortcut .stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .services-shortcuts { gap: 8px; }
    .service-shortcut { padding: 12px 6px; font-size: 11px; }
    .service-shortcut .stat-icon { width: 32px; height: 32px; border-radius: 8px; }
}

@media (max-width: 360px) {
    .service-shortcut span { display: none; }
    .service-shortcut { padding: 12px; }
}

/* ===== DASHBOARD TODAY SECTION ===== */
.today-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.today-summary {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.today-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.today-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
    min-height: 80px;
}

.today-card-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-light);
    margin-bottom: 7px;
}

.today-card-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.today-card-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.today-card-meta {
    font-size: 12px;
    color: var(--text-muted);
    padding-left: 15px;
}

.today-card-empty {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 4px;
    line-height: 1.4;
}

/* ===== COMPACT EMPTY STATE (inside cards) ===== */
.empty-state-sm {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 0;
    color: var(--text-muted);
    font-size: 13px;
}
.empty-state-sm svg {
    width: 15px;
    height: 15px;
    opacity: 0.45;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .today-grid { gap: 10px; }
    .today-card { padding: 12px 14px; min-height: 72px; }
    .today-card-title { font-size: 13px; }
    .today-summary { font-size: 11px; }
    .empty-state-sm { padding: 14px 0; font-size: 12px; }
}

@media (max-width: 340px) {
    .today-grid { grid-template-columns: 1fr; }
}

/* ===== SERVICES PAGE â€” GROUPS & SUBTITLE ===== */
.services-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
    margin-top: -4px;
    line-height: 1.5;
}

.services-group {
    margin-bottom: 24px;
}
.services-group:last-child { margin-bottom: 0; }

.services-group-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--text-light);
    margin-bottom: 10px;
    padding-left: 2px;
}

.service-card-full {
    grid-column: span 2;
}

@media (max-width: 640px) {
    .services-subtitle { font-size: 13px; margin-bottom: 16px; }
    .services-group { margin-bottom: 20px; }
    .service-card { padding: 14px 12px; gap: 10px; }
    .service-card-title { font-size: 13px; }
    .service-card-desc { font-size: 12px; }
}

/* ===== SERVICE LIST (vertical cards for services.php) ===== */
.service-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px 20px;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    min-height: 76px;
    transition: box-shadow 0.15s, transform 0.12s, border-color 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.service-list-item:hover {
    box-shadow: var(--shadow);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.service-list-item:active { transform: scale(0.98); opacity: 0.9; }

.service-list-body { flex: 1; min-width: 0; }

.service-list-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
}

.service-list-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

.service-list-arrow {
    color: var(--text-light);
    flex-shrink: 0;
}
.service-list-arrow svg { width: 16px; height: 16px; }

@media (max-width: 640px) {
    .service-list { gap: 10px; }
    .service-list-item { padding: 16px 16px; border-radius: 16px; min-height: 72px; }
    .service-list-title { font-size: 14px; }
}

/* ===== PLAN PAGE ===== */
.plan-tabs {
    display: flex;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
    gap: 4px;
}

.plan-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}
.plan-tab svg { width: 16px; height: 16px; }
.plan-tab.active {
    background: var(--bg-card);
    color: var(--text);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}
.plan-tab:active { opacity: 0.8; transform: scale(0.97); }

@media (max-width: 640px) {
    .plan-tabs { margin-bottom: 16px; }
    .plan-tab { font-size: 13px; padding: 9px 8px; gap: 6px; }
}

/* ===== HOME PAGE ===== */

/* Compact Welcome */
.home-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.home-welcome-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.2px;
    margin-bottom: 2px;
}
.home-welcome-sub { font-size: 13px; color: var(--text-muted); }
.home-quick-btns  { display: flex; gap: 8px; flex-wrap: wrap; }
.home-qa-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.home-qa-btn:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.home-qa-btn svg   { width: 14px; height: 14px; }

/* Services Grid â€” 4 columns Ã— 2 rows */
.home-services-card { margin-bottom: 16px; }
.home-services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
/* legacy flex alias kept for back-compat */
.home-services-row  { display: flex; justify-content: space-around; gap: 4px; }
.home-svc-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text-muted);
    padding: 10px 4px;
    border-radius: var(--radius-sm);
    transition: color 0.15s, background 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.home-svc-item:hover          { color: var(--text); background: var(--bg-hover); }
.home-svc-item .stat-icon     { width: 44px; height: 44px; border-radius: 12px; }
.home-svc-label {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* Main Grid */
.home-main-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 16px;
    align-items: start;
}
.home-right-col { display: flex; flex-direction: column; gap: 16px; }

/* Schedule */
.home-sched-summary {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.sched-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}
.sched-chip svg    { width: 12px; height: 12px; }
.sched-chip strong { color: var(--text); font-weight: 600; }

.home-sched-timeline { margin-bottom: 14px; }
.sched-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
}
.sched-row:last-child { border-bottom: none; padding-bottom: 0; }
.sched-time {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    min-width: 36px;
    flex-shrink: 0;
}
.sched-title {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.sched-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.sched-badge-event { background: #3B82F612; color: #3B82F6; }
.sched-badge-task  { background: #6366f112; color: #6366f1; }
.sched-badge-alarm { background: var(--accent-soft); color: var(--accent); }

.sched-empty {
    text-align: center;
    padding: 20px 0;
    color: var(--text-muted);
    font-size: 14px;
}
.home-sched-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Weather Compact */
.home-weather-card  { display: flex; align-items: center; gap: 14px; }
.hwc-emoji          { font-size: 34px; line-height: 1; flex-shrink: 0; }
.hwc-body           { flex: 1; min-width: 0; }
.hwc-city           { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-bottom: 1px; }
.hwc-temp           { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.1; }
.hwc-desc           { font-size: 12px; color: var(--text-muted); }

/* Notes List */
.home-note-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: opacity 0.15s;
}
.home-note-row:last-child { border-bottom: none; padding-bottom: 0; }
.home-note-row:hover      { opacity: 0.7; }
.home-note-dot  { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.home-note-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.home-note-when { font-size: 11px; color: var(--text-light); flex-shrink: 0; }

/* Responsive */
@media (max-width: 900px) {
    .home-main-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .home-welcome { padding: 14px 16px; flex-direction: column; align-items: flex-start; gap: 12px; }
    .home-quick-btns { width: 100%; }
    .home-qa-btn { flex: 1; justify-content: center; min-height: 40px; }
    .home-svc-label { font-size: 10px; }
    .home-svc-item .stat-icon { width: 40px; height: 40px; border-radius: 11px; }
    .sched-row { gap: 8px; padding: 8px 0; }
    .sched-title { font-size: 13px; }
    .home-weather-card { flex-wrap: wrap; }
    .home-sched-actions .btn { flex: 1; justify-content: center; }
}

@media (max-width: 340px) {
    .home-services-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== SCHEDULE PAGE ===== */
.sched-page-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
    margin-top: -4px;
}

/* Date strip */
.sched-date-strip {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.sched-date-strip::-webkit-scrollbar { display: none; }

.scd-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    min-width: 46px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    transition: background 0.15s, border-color 0.15s;
}
.scd-day.active { background: var(--accent); border-color: var(--accent); }
.scd-dow {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}
.scd-day.active .scd-dow { color: rgba(255,255,255,0.8); }
.scd-num { font-size: 15px; font-weight: 700; color: var(--text); }
.scd-day.active .scd-num { color: #fff; }

/* Tabs */
.sched-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4px;
}
.sched-tab {
    flex: 1;
    background: none;
    border: none;
    border-radius: 9px;
    padding: 9px 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.sched-tab.active { background: var(--accent); color: #fff; font-weight: 600; }

/* Group label (week / all tabs) */
.sched-group-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    padding: 0 2px 8px;
    margin-top: 20px;
}
.sched-group-label:first-child { margin-top: 0; }

/* Timeline card */
.sched-tl-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px 16px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
}

.sched-tl-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.sched-tl-row:last-child { border-bottom: none; }

.sched-tl-time {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    min-width: 36px;
    flex-shrink: 0;
    padding-top: 3px;
}
.sched-tl-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
}
.sched-tl-body { flex: 1; min-width: 0; }
.sched-tl-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 5px;
    word-break: break-word;
}

/* Empty state */
.sched-page-empty {
    text-align: center;
    padding: 52px 24px;
    color: var(--text-muted);
}
.spe-icon {
    width: 64px; height: 64px;
    background: var(--accent-soft);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
    margin: 0 auto 14px;
}
.spe-icon svg { width: 28px; height: 28px; }
.spe-text { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.spe-sub  { font-size: 13px; }

@media (max-width: 640px) {
    .sched-page-sub { font-size: 13px; margin-bottom: 12px; }
    .scd-day { min-width: 40px; padding: 7px 6px; }
    .scd-num { font-size: 14px; }
    .sched-tab { padding: 8px 6px; font-size: 12px; }
    .sched-tl-row { gap: 10px; padding: 10px 0; }
    .sched-tl-time { min-width: 30px; font-size: 11px; }
    .sched-tl-title { font-size: 13px; }
    .sched-tl-card { padding: 4px 12px; }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   SCHEDULE â€” KANBAN DAY PLANNER
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* Kanban board: horizontal scroll-snap on mobile, 3-col grid on desktop */
.sched-kanban-board {
    display: flex;
    gap: 14px;
    padding: 4px 0 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.sched-kanban-board::-webkit-scrollbar { display: none; }

/* Each column */
.sched-kanban-col {
    flex: 0 0 calc(100% - 40px); /* almost full width on mobile */
    scroll-snap-align: start;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: 16px 14px;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Column header */
.skc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.skc-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.skc-emoji { font-size: 20px; line-height: 1; }
.skc-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}
.skc-range {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-alt);
    border-radius: 20px;
    padding: 2px 8px;
    font-variant-numeric: tabular-nums;
}
.skc-count {
    font-size: 12px;
    font-weight: 600;
    background: var(--accent);
    color: #fff;
    border-radius: 20px;
    padding: 2px 8px;
    min-width: 22px;
    text-align: center;
}
.skc-cards { display: flex; flex-direction: column; gap: 10px; }
.skc-empty {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    padding: 24px 12px;
    border: 1.5px dashed var(--border);
    border-radius: 14px;
}

/* Kanban card */
.sched-kanban-card {
    background: var(--bg-card);
    border-radius: 18px;
    padding: 14px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    border: 1px solid var(--border);
    cursor: default;
    transition: box-shadow .15s;
}
.sched-kanban-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

/* Card top row: time + dot + badge */
.skcard-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}
.skcard-time {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    margin-right: 2px;
}
.skcard-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.skcard-badge {
    font-size: 10px;
    font-weight: 600;
    border-radius: 20px;
    padding: 2px 8px;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-left: auto;
}
.skcard-badge-event { background: #DE3B3815; color: #DE3B38; }
.skcard-badge-task  { background: #6366f115; color: #6366f1; }
.skcard-badge-alarm { background: #d9770615; color: #d97706; }

.skcard-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    word-break: break-word;
}
.skcard-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Swipe hint (mobile only) */
.sched-swipe-hint {
    display: none;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    padding-bottom: 4px;
}

/* List view (ÐÐµÐ´ÐµÐ»Ñ / Ð’ÑÐµ tabs) */
.sched-list-view {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 16px;
}

/* FAB button */
.sched-fab {
    position: fixed;
    right: 16px;
    bottom: calc(var(--nav-h) + 16px);
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(222,59,56,.35);
    cursor: pointer;
    z-index: 200;
    transition: transform .15s, box-shadow .15s;
}
.sched-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(222,59,56,.45);
}
.sched-fab svg { width: 20px; height: 20px; }
.sched-fab-label { font-size: 14px; font-weight: 600; }

/* Modal: type selection */
.sched-add-types {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sched-add-type-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1.5px solid var(--border);
    background: var(--bg);
    text-decoration: none;
    color: var(--text);
    transition: border-color .15s, background .15s;
}
.sched-add-type-card:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.sat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sat-icon svg { width: 20px; height: 20px; }
.sat-body { flex: 1; }
.sat-title { font-size: 14px; font-weight: 600; color: var(--text); }
.sat-desc  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.sat-arrow { color: var(--text-muted); flex-shrink: 0; }
.sat-arrow svg { width: 18px; height: 18px; }

/* Desktop: 3-col board side by side, no scroll */
@media (min-width: 820px) {
    .sched-kanban-board {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        overflow-x: visible;
        scroll-snap-type: none;
        padding-bottom: 20px;
    }
    .sched-kanban-col {
        flex: unset;
        width: auto;
        min-width: 0;
        scroll-snap-align: unset;
    }
    .sched-swipe-hint { display: none !important; }
    .sched-fab {
        /* On desktop, sidebar is 240px wide, adjust right spacing */
        right: 32px;
        bottom: 32px;
    }
}

/* Mobile-only tweaks */
@media (max-width: 819px) {
    .sched-swipe-hint { display: block; }
    .sched-kanban-col { min-width: min(280px, calc(100vw - 64px)); }
}

/* ========================================================
   HOME HERO â€” beautiful gradient welcome block
   ======================================================== */
.home-hero {
    background: linear-gradient(135deg, #c52f2c 0%, #DE3B38 30%, #e85553 65%, #ff7b78 100%);
    border-radius: 22px;
    padding: 32px 28px 24px;
    color: #fff;
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(222,59,56,0.32), 0 2px 10px rgba(0,0,0,0.08);
}
/* Decorative circles */
.home-hero::before {
    content: '';
    position: absolute;
    top: -70px; right: -70px;
    width: 220px; height: 220px;
    background: rgba(255,255,255,0.07);
    border-radius: 50%;
    pointer-events: none;
}
.home-hero::after {
    content: '';
    position: absolute;
    bottom: -90px; left: -50px;
    width: 260px; height: 260px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    pointer-events: none;
}
.hh-spark {
    position: absolute;
    font-size: 22px;
    opacity: 0.6;
    line-height: 1;
    pointer-events: none;
    color: rgba(255,255,255,0.95);
    font-style: normal;
    user-select: none;
}
.hh-spark-1 { top: 20px; right: 28px; font-size: 20px; }
.hh-spark-2 { top: 50px; right: 52px; font-size: 12px; opacity: 0.45; }
.hh-spark-3 { bottom: 26px; right: 80px; font-size: 14px; opacity: 0.38; }

.hh-content {
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
}
.hh-greeting {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.8px;
    line-height: 1.15;
    margin: 0 0 7px;
    color: #fff;
}
.hh-sub {
    font-size: 15px;
    opacity: 0.86;
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
}
.hh-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.hh-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.18);
    border: 1.5px solid rgba(255,255,255,0.30);
    border-radius: 11px;
    color: #fff;
    padding: 9px 17px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, transform 0.12s;
    white-space: nowrap;
    font-family: inherit;
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-tap-highlight-color: transparent;
    letter-spacing: 0.1px;
}
.hh-btn:hover {
    background: rgba(255,255,255,0.28);
    transform: translateY(-1px);
}
.hh-btn:active { transform: scale(0.95); opacity: 0.9; }
.hh-btn svg { width: 14px; height: 14px; }

@media (max-width: 640px) {
    .home-hero { padding: 24px 18px 20px; border-radius: 18px; margin-bottom: 14px; }
    .hh-greeting { font-size: 22px; letter-spacing: -0.5px; }
    .hh-sub { font-size: 13px; }
    .hh-content { margin-bottom: 16px; }
    .hh-actions { gap: 6px; }
    .hh-btn { padding: 8px 12px; font-size: 12px; border-radius: 9px; gap: 5px; }
    .hh-spark-1 { top: 14px; right: 16px; font-size: 16px; }
}
@media (max-width: 380px) {
    .hh-greeting { font-size: 19px; }
    .hh-btn { padding: 7px 10px; font-size: 11px; }
}

/* â”€â”€ Quick task modal on home page â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#hq-task-modal .modal { max-width: 420px; }

/* â”€â”€ Notes page header improvements â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.notes-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.notes-page-count {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* â”€â”€ Profile page improvements â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.profile-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -0.1px;
}
.profile-avatar-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 18px;
}
.profile-avatar-lg {
    width: 84px;
    height: 84px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}
.profile-name-lg {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 3px;
}
.profile-email-lg {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 3px;
}
.profile-joined-lg {
    font-size: 12px;
    color: var(--text-light);
}
.profile-avatar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

/* ===== LANDING PAGE (index.php) ===== */
.lp-page { display: flex; flex-direction: column; gap: 24px; }

/* Hero */
.lp-hero {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid var(--border);
    padding: 40px 32px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}
.lp-hero-brand { margin: 0; }
.lp-hero-logo {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -2px;
    color: var(--text);
    line-height: 1;
    display: inline-block;
}
.lp-logo-a { color: var(--accent); }
.lp-hero-illus {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.lp-hero-illus svg {
    width: 100%;
    max-width: 260px;
    height: auto;
    display: block;
    opacity: 0.65;
}

/* Section */
.lp-section { display: flex; flex-direction: column; gap: 24px; }
.lp-section-sub {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 4px;
}
.lp-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-light);
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.lp-section-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text);
}

/* Services grid */
.lp-svc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.lp-svc-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 16px 20px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    text-align: center;
}
.lp-svc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.09);
    border-color: #D8D8D8;
}
.lp-svc-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}
.lp-svc-icon svg { width: 22px; height: 22px; }
.lp-svc-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.1px;
    line-height: 1.3;
}

/* FAQ */
.lp-faq-wrap { display: flex; flex-direction: column; gap: 0; }
.lp-faq-item { border-bottom: 1px solid var(--border); }
.lp-faq-item:first-child { border-top: 1px solid var(--border); }
.lp-faq-q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 20px 0;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    font-family: inherit;
    transition: color 0.15s;
}
.lp-faq-q:hover { color: var(--accent); }
.lp-faq-chevron {
    flex-shrink: 0;
    color: var(--text-light);
    transition: transform 0.22s ease, color 0.15s;
}
.lp-faq-item.open .lp-faq-chevron { transform: rotate(90deg); color: var(--accent); }
.lp-faq-item.open .lp-faq-q { color: var(--accent); }
.lp-faq-a {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.26s ease, padding 0.18s ease;
}
.lp-faq-item.open .lp-faq-a { max-height: 200px; }
.lp-faq-a-inner {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    padding-bottom: 20px;
}

/* FAQ section: label + faq stacked neatly */
.lp-faq-header { text-align: center; padding: 12px 0 8px; }

/* LP Footer */
.lp-footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    padding: 8px 0 4px;
}

/* â”€â”€ LP Responsive â”€â”€ */
@media (max-width: 900px) {
    .lp-hero { padding: 36px 28px 28px; gap: 18px; }
    .lp-hero-logo { font-size: 44px; }
    .lp-hero-illus svg { max-width: 220px; }
    .lp-svc-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
    .lp-hero { padding: 32px 20px 24px; gap: 14px; }
    .lp-hero-illus { max-width: 180px; margin: 0 auto; }
    .lp-hero-logo { font-size: 40px; letter-spacing: -1.5px; }
    .lp-svc-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .lp-svc-card { padding: 18px 10px 16px; border-radius: 14px; gap: 10px; }
    .lp-svc-name { font-size: 12px; }
    .lp-svc-icon { width: 40px; height: 40px; }
    .lp-svc-icon svg { width: 18px; height: 18px; }
    .lp-section-title { font-size: 18px; }
    .lp-page { gap: 24px; }
}
@media (max-width: 360px) {
    .lp-svc-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== FINAL OVERRIDES: LANDING PAGE SAFETY FIX ===== */
.lp-page {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
}

.lp-hero {
    background: #fff !important;
    border: 1px solid var(--border) !important;
    border-radius: 24px !important;
    padding: 40px 32px 32px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 20px !important;
    overflow: hidden !important;
}

.lp-hero-logo {
    font-size: 52px !important;
    font-weight: 800 !important;
    letter-spacing: -2px !important;
    color: var(--text) !important;
    line-height: 1 !important;
}

.lp-logo-a { color: var(--accent) !important; }

.lp-hero-illus {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.lp-hero-illus svg {
    width: 100% !important;
    max-width: 260px !important;
    height: auto !important;
    opacity: 0.65 !important;
}

.lp-section {
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
}

.lp-section-title {
    font-size: 26px !important;
    font-weight: 700 !important;
    letter-spacing: -0.5px !important;
    color: var(--text) !important;
}

.lp-section-sub {
    font-size: 13px !important;
    color: var(--text-muted) !important;
    margin-top: 4px !important;
}

.lp-svc-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 14px !important;
}

.lp-svc-card {
    background: #fff !important;
    border: 1px solid var(--border) !important;
    border-radius: 16px !important;
    padding: 24px 16px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    text-align: center !important;
    color: inherit !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
}

.lp-svc-icon {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background: var(--accent-soft) !important;
    color: var(--accent) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.lp-svc-icon svg {
    width: 22px !important;
    height: 22px !important;
}

.lp-svc-name {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--text) !important;
    line-height: 1.3 !important;
}

.lp-faq-wrap {
    display: flex !important;
    flex-direction: column !important;
}

.lp-faq-item {
    border-bottom: 1px solid var(--border) !important;
}

.lp-faq-item:first-child {
    border-top: 1px solid var(--border) !important;
}

.lp-faq-q {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    background: transparent !important;
    border: none !important;
    padding: 20px 0 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--text) !important;
    font-family: inherit !important;
    cursor: pointer !important;
    text-align: left !important;
}

.lp-faq-a {
    overflow: hidden !important;
    max-height: 0 !important;
    transition: max-height 0.26s ease !important;
}

.lp-faq-item.open .lp-faq-a {
    max-height: 200px !important;
}

.lp-faq-a-inner {
    font-size: 14px !important;
    color: var(--text-muted) !important;
    line-height: 1.7 !important;
    padding-bottom: 20px !important;
}

.lp-footer {
    text-align: center !important;
    font-size: 12px !important;
    color: var(--text-light) !important;
    padding: 8px 0 4px !important;
}

@media (max-width: 640px) {
    .lp-hero {
        padding: 32px 20px 24px !important;
        gap: 14px !important;
    }

    .lp-hero-logo {
        font-size: 40px !important;
        letter-spacing: -1.5px !important;
    }

    .lp-hero-illus svg {
        max-width: 180px !important;
    }

    .lp-svc-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
    }

    .lp-svc-card {
        padding: 18px 10px 16px !important;
        border-radius: 14px !important;
        gap: 10px !important;
    }

    .lp-svc-icon {
        width: 40px !important;
        height: 40px !important;
    }

    .lp-svc-icon svg {
        width: 18px !important;
        height: 18px !important;
    }

    .lp-svc-name {
        font-size: 12px !important;
    }

    .lp-section-title {
        font-size: 18px !important;
    }
}

@media (max-width: 360px) {
    .lp-svc-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}