/* ==========================================================================
   PERSONAL OS — GOOGLE DARK MODE DESIGN SYSTEM & STYLES
   ========================================================================== */

:root {
    --bg-dark: #121212;
    --surface-1: #1e1e1e;
    --surface-2: #28292c;
    --surface-3: #333538;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.18);

    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --text-disabled: #5f6368;

    --google-blue: #4285F4;
    --google-blue-glow: rgba(66, 133, 244, 0.35);

    --google-green: #34A853;
    --google-green-glow: rgba(52, 168, 83, 0.35);

    --google-yellow: #FBBC05;
    --google-yellow-glow: rgba(251, 188, 5, 0.35);

    --google-red: #EA4335;
    --google-red-glow: rgba(234, 67, 53, 0.35);

    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Roboto Mono', monospace;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(66, 133, 244, 0.25);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.hidden {
    display: none !important;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
}

.app-container {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 40px;
}

/* SMART UNIVERSAL INPUT */
.top-smart-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.smart-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 6px 8px 6px 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.smart-input-wrapper:focus-within {
    border-color: var(--google-blue);
    box-shadow: 0 0 16px var(--google-blue-glow);
}

.sparkle-icon {
    color: var(--google-blue);
    width: 22px;
    height: 22px;
    margin-right: 12px;
    flex-shrink: 0;
    animation: sparklePulse 3s infinite ease-in-out;
}

@keyframes sparklePulse {

    0%,
    100% {
        opacity: 0.7;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

.smart-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 400;
}

.smart-input-wrapper input::placeholder {
    color: var(--text-secondary);
}

.btn-google-blue {
    background: linear-gradient(135deg, var(--google-blue), #2b6cb0);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    padding: 10px 18px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-google-blue:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px var(--google-blue-glow);
}

.smart-hints {
    display: flex;
    gap: 8px;
    padding-left: 12px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.smart-hints::-webkit-scrollbar {
    display: none;
}

.hint-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 12px;
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.hint-tag:hover {
    color: var(--text-primary);
    border-color: var(--border-highlight);
}

.hint-tag i {
    width: 13px;
    height: 13px;
}

.hint-todo i {
    color: var(--google-blue);
}

.hint-habit i {
    color: var(--google-green);
}

.hint-cal i {
    color: var(--google-yellow);
}

.hint-goal i {
    color: var(--google-red);
}

.hint-prio i {
    color: var(--google-red);
}

/* JARVIS CORE SCORE CARD */
.jarvis-core-card {
    position: relative;
    background: linear-gradient(145deg, #18191c 0%, #111215 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.jarvis-background-glow {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    height: 150px;
    background: radial-gradient(circle, var(--google-blue-glow) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
    opacity: 0.8;
}

.jarvis-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.jarvis-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--google-blue);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--google-blue);
    box-shadow: 0 0 10px var(--google-blue);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.4);
        opacity: 0.5;
    }
}

.icon-btn {
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-highlight);
    background: var(--surface-3);
}

.jarvis-core-body {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 20px;
    align-items: center;
}

@media (max-width: 600px) {
    .jarvis-core-body {
        grid-template-columns: 1fr;
        justify-items: center;
    }
}

.core-reactor-container {
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reactor-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.reactor-track {
    fill: none;
    stroke: var(--surface-2);
    stroke-width: 10;
}

.reactor-progress {
    fill: none;
    stroke: var(--google-blue);
    stroke-width: 10;
    stroke-dasharray: 440;
    stroke-dashoffset: 220;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s ease-in-out;
    filter: drop-shadow(0 0 6px var(--google-blue));
}

.reactor-content {
    position: absolute;
    text-align: center;
}

.level-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
}

.level-number {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.score-number {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--google-blue);
    font-weight: 600;
    margin-top: 2px;
}

.category-nodes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
}

.category-node {
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-node:hover {
    border-color: var(--border-highlight);
    transform: translateY(-2px);
    background: var(--surface-2);
}

.node-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.google-blue {
    background: rgba(66, 133, 244, 0.15);
    color: var(--google-blue);
}

.google-green {
    background: rgba(52, 168, 83, 0.15);
    color: var(--google-green);
}

.google-yellow {
    background: rgba(251, 188, 5, 0.15);
    color: var(--google-yellow);
}

.google-red {
    background: rgba(234, 67, 53, 0.15);
    color: var(--google-red);
}

.node-info {
    display: flex;
    flex-direction: column;
}

.node-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.node-val {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* NAVIGATION TABS */
.app-navigation {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 6px;
    gap: 6px;
}

@media (max-width: 600px) {
    .app-navigation {
        grid-template-columns: repeat(3, 1fr);
    }
}

.nav-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px 8px;
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-tab i {
    width: 18px;
    height: 18px;
}

.nav-tab:hover {
    color: var(--text-primary);
}

.nav-tab.active {
    background: var(--surface-2);
    color: var(--google-blue);
    box-shadow: inset 0 0 0 1px var(--google-blue-glow);
}

/* MAIN CONTENT & STREAM DASHBOARD FLOW */
.app-main {
    min-height: 350px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.tab-pane {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    transition: transform 0.2s ease, opacity 0.2s ease;
    animation: fadeIn 0.25s ease;
}

.tab-pane.primary-focus {
    order: -1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary {
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--surface-3);
    border-color: var(--border-highlight);
}

.filter-pills {
    display: flex;
    gap: 6px;
}

.pill {
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pill.active {
    background: var(--google-blue);
    color: white;
    border-color: var(--google-blue);
}

/* PRIORITY BADGE */
.priority-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.priority-badge:hover {
    transform: scale(1.05);
}

/* TO-DO CARDS */
.todo-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.todo-card {
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.2s ease;
}

.todo-card:hover {
    border-color: var(--border-highlight);
    background: var(--surface-2);
}

.todo-card.completed {
    opacity: 0.55;
}

.todo-card.completed .todo-title {
    text-decoration: line-through;
    color: var(--text-disabled);
}

.todo-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.custom-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.todo-card.completed .custom-checkbox {
    background: var(--google-green);
    border-color: var(--google-green);
    color: white;
}

.todo-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.todo-title {
    font-size: 0.95rem;
    font-weight: 500;
}

.todo-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.xp-badge {
    background: rgba(66, 133, 244, 0.15);
    color: var(--google-blue);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.7rem;
    font-family: var(--font-mono);
}

.delete-btn {
    background: transparent;
    border: none;
    color: var(--text-disabled);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.delete-btn:hover {
    color: var(--google-red);
}

/* HABITS GRID & CARDS */
.habits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

/* HABIT MATRIX TABLE GRID */
.habit-matrix-wrapper {
    grid-column: 1 / -1;
    width: 100%;
    overflow-x: auto;
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    box-sizing: border-box;
}

.habit-matrix-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 6px;
}

.habit-matrix-table th {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-align: center;
    padding: 8px 4px;
}

.habit-matrix-table th.th-habit-name {
    text-align: left;
    min-width: 180px;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.habit-matrix-table td {
    vertical-align: middle;
}

.habit-matrix-cell {
    width: 42px;
    height: 42px;
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 auto;
    color: var(--text-disabled);
    font-size: 0.85rem;
}

.habit-matrix-cell:hover {
    border-color: var(--google-green);
    background: var(--surface-3);
    transform: scale(1.08);
}

.habit-matrix-cell.done {
    background: rgba(52, 168, 83, 0.22);
    border: 1px solid var(--google-green);
    color: var(--google-green);
    box-shadow: 0 0 10px rgba(52, 168, 83, 0.3);
}

.habit-matrix-cell.is-today {
    box-shadow: inset 0 0 0 1px var(--google-yellow);
}

.habit-matrix-cell.is-today.done {
    box-shadow: 0 0 12px rgba(52, 168, 83, 0.4), inset 0 0 0 1px var(--google-yellow);
}

.habit-row-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.habit-row-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.habit-row-meta {
    display: flex;
    gap: 6px;
    align-items: center;
}

.habit-card {
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s ease;
}

.habit-card:hover {
    border-color: var(--border-highlight);
}

.habit-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.habit-header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.habit-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.streak-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(52, 168, 83, 0.15);
    color: var(--google-green);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.habit-actions-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.habit-action-btn {
    flex: 1;
    background: var(--surface-2);
    border: 1px solid var(--google-green);
    color: var(--google-green);
    padding: 10px;
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.habit-action-btn.done {
    background: var(--google-green);
    color: white;
}

.habit-action-btn:hover {
    box-shadow: 0 0 12px var(--google-green-glow);
}

/* GOOGLE CALENDAR CONNECT CARD */
.gcal-connect-card {
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.08) 0%, rgba(52, 168, 83, 0.05) 100%);
    border: 1px solid var(--google-blue-glow);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.gcal-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gcal-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.gcal-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.btn-gcal {
    background: var(--surface-2);
    border: 1px solid var(--border-highlight);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-gcal:hover {
    background: var(--google-blue);
    border-color: var(--google-blue);
    color: white;
}

.btn-gcal.connected {
    background: rgba(52, 168, 83, 0.2);
    border-color: var(--google-green);
    color: var(--google-green);
}

/* MULTI-CALENDAR FILTER BAR */
.gcal-filter-bar {
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.gcal-filter-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.gcal-pills-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.gcal-pill {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 14px;
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.gcal-pill:hover {
    border-color: var(--border-highlight);
    color: var(--text-primary);
}

.gcal-pill.active {
    background: rgba(66, 133, 244, 0.15);
    border-color: var(--google-blue);
    color: var(--google-blue);
}

.gcal-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--google-blue);
}

.cal-name-tag {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    margin-left: 4px;
}

/* CALENDAR SEARCH WRAPPER */
.cal-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.cal-search-wrapper .search-icon {
    position: absolute;
    left: 10px;
    width: 14px;
    height: 14px;
    color: var(--text-secondary);
}

.cal-search-wrapper input {
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 6px 12px 6px 30px;
    font-family: var(--font-main);
    font-size: 0.8rem;
    color: var(--text-primary);
    outline: none;
    width: 180px;
    transition: all 0.2s ease;
}

.cal-search-wrapper input:focus {
    border-color: var(--google-blue);
    width: 230px;
    box-shadow: 0 0 10px rgba(66, 133, 244, 0.2);
}

/* DUAL LAYOUT WITH MINI-CALENDAR SIDEBAR */
.cal-main-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 16px;
    align-items: start;
    width: 100%;
}

@media (max-width: 900px) {
    .cal-main-layout {
        grid-template-columns: 1fr;
    }

    .mini-cal-sidebar {
        display: none;
    }
}

/* GOOGLE CALENDAR SIDEBAR CREATE BUTTON */
.btn-create-gcal {
    background: #ffffff;
    color: #3c4043;
    border: none;
    border-radius: 24px;
    padding: 12px 22px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    margin-bottom: 8px;
    width: fit-content;
}

.btn-create-gcal:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 6px 16px rgba(0, 0, 0, 0.3);
    background: #f8f9fa;
}

.btn-create-gcal .plus-icon {
    width: 20px;
    height: 20px;
    color: #4285F4;
}

/* MEINE KALENDER CHECKBOXES CARD */
.my-calendars-card {
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.my-cal-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.my-cal-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cal-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

.cal-checkbox-item input[type="checkbox"] {
    accent-color: var(--google-blue);
    cursor: pointer;
}

.custom-chk-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

/* ALL-DAY EVENT BANNER ROW */
.all-day-banner-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.all-day-banner {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* DRAG-TO-CREATE TIME RANGE SELECTION BOX */
.drag-select-box {
    position: absolute;
    left: 60px;
    right: 8px;
    background: rgba(66, 133, 244, 0.35);
    border: 2px solid var(--google-blue);
    border-radius: 6px;
    pointer-events: none;
    z-index: 20;
    display: flex;
    align-items: center;
    padding-left: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff;
}

/* MINI CALENDAR SIDEBAR */
.mini-cal-card {
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mini-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mini-month-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.icon-btn-sm {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn-sm:hover {
    color: var(--text-primary);
    background: var(--surface-2);
}

.icon-btn-sm i {
    width: 14px;
    height: 14px;
}

.mini-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-disabled);
}

.mini-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.mini-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-secondary);
    position: relative;
    transition: all 0.15s ease;
}

.mini-day:hover {
    background: var(--surface-3);
    color: var(--text-primary);
}

.mini-day.today {
    border: 1px solid var(--google-yellow);
    color: var(--google-yellow);
    font-weight: 700;
}

.mini-day.selected {
    background: var(--google-blue);
    color: white;
    font-weight: 700;
}

.mini-day.has-events::after {
    content: '';
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--google-yellow);
    position: absolute;
    bottom: 2px;
}

/* LIVE TIME INDICATOR LINE */
.current-time-indicator {
    position: absolute;
    left: 50px;
    right: 0;
    height: 2px;
    background: var(--google-red);
    z-index: 10;
    pointer-events: none;
}

.current-time-indicator::before {
    content: '';
    position: absolute;
    left: -4px;
    top: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--google-red);
}

.timeline-hour-slot {
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
}

.timeline-hour-slot:hover {
    background: rgba(66, 133, 244, 0.08);
}

/* ALL DAY BANNER VS TIMED CHIPS */
.cal-event-chip.all-day-chip {
    border-left: 3px solid rgba(255, 255, 255, 0.6);
    font-weight: 700;
}

@media (max-width: 768px) {
    .app-container {
        padding: 8px 6px;
        gap: 12px;
    }
}

/* AGENDA VIEW CONTAINER */
.agenda-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 4px;
}

.agenda-day-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.agenda-day-header {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--google-blue);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 4px;
    margin-top: 4px;
}

/* CALENDAR & GOOGLE CALENDAR ENGINE */
.cal-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.calendar-card {
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

@media (max-width: 600px) {
    .calendar-card {
        padding: 8px 4px;
    }
}

.cal-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

.cal-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.month-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-top: 2px;
    margin-bottom: 4px;
    width: 100%;
}

.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
    width: 100%;
    box-sizing: border-box;
}

.cal-day {
    min-height: 88px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    background: #1e1f22;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 2px 1.5px 3px 1.5px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: background 0.15s ease, border-color 0.15s ease;
    overflow: hidden;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .cal-day {
        min-height: 76px;
        padding: 1px 1px 2px 1px;
    }
}

.cal-day:hover {
    background: var(--surface-3);
    border-color: var(--border-highlight);
}

.cal-day.empty {
    background: transparent;
    border-color: transparent;
    cursor: default;
    pointer-events: none;
}

.cal-day.other-month {
    opacity: 0.3;
    background: #161719;
}

.cal-day.today {
    background: #232429;
    border: 1px solid rgba(251, 188, 5, 0.5);
}

.cal-day.selected {
    box-shadow: inset 0 0 0 1.5px var(--google-blue);
}

.cal-day-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 0 1px 0;
    margin-bottom: 1px;
}

.cal-day-num {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-secondary);
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.cal-day.today .cal-day-num {
    background: #ffffff;
    color: #121212;
    font-weight: 800;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

/* Google Calendar Red Time-Indicator Bar across current day */
.cal-day-time-bar {
    position: absolute;
    left: 0;
    right: 0;
    height: 1.5px;
    background: #ea4335;
    box-shadow: 0 0 4px #ea4335;
    z-index: 10;
    pointer-events: none;
}

.cal-day-time-bar::before {
    content: '';
    position: absolute;
    left: -2px;
    top: -2.5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ea4335;
}

.cal-events-container {
    display: flex;
    flex-direction: column;
    gap: 1.5px;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.cal-event-chip {
    font-size: 0.50rem;
    line-height: 1.1;
    padding: 1px 2px;
    border-radius: 2px;
    color: #ffffff;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
    box-sizing: border-box;
    letter-spacing: -0.3px;
}

#calMonthView .cal-event-chip {
    pointer-events: none;
}

.current-time-indicator {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #ea4335;
    box-shadow: 0 0 6px rgba(234, 67, 53, 0.8);
    z-index: 10;
    pointer-events: none;
}

.current-time-indicator::before {
    content: '';
    position: absolute;
    left: -4px;
    top: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ea4335;
    box-shadow: 0 0 4px rgba(234, 67, 53, 0.9);
}

.cal-event-chip.chip-blue {
    background: #1a73e8;
}

.cal-event-chip.chip-green {
    background: #188038;
}

.cal-event-chip.chip-red {
    background: #d93025;
}

.cal-event-chip.chip-yellow {
    background: #f29900;
    color: #ffffff;
}

.cal-event-chip.chip-purple {
    background: #8e24aa;
}

.more-chip-count {
    font-size: 0.5rem;
    color: var(--text-secondary);
    font-weight: 700;
    padding: 0 1px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#calDayView,
#calWeekView,
#calMonthView,
#calAgendaView {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* WEEK VIEW STYLES */
.week-header-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
    margin-top: 4px;
    width: 100%;
}

.week-head-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 0.75rem;
}

.week-head-col.today .week-day-num {
    background: #ffffff;
    color: #121212;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.week-body-container {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    flex: 1;
    width: 100%;
    min-height: 260px;
    max-height: 420px;
    overflow-y: auto;
    margin-top: 6px;
    scroll-behavior: smooth;
}

.week-col {
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 100px;
}

/* DAY TIMELINE STYLES */
.day-timeline-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    width: 100%;
    min-height: 260px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 4px;
    margin-top: 6px;
}

.timeline-hour-slot {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-color);
    padding: 6px 8px;
    min-height: 42px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.timeline-hour-slot.is-current-hour {
    background: rgba(66, 133, 244, 0.05);
}

.hour-label {
    width: 48px;
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.hour-events {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

/* AGENDA EVENTS LIST */
.day-events-section {
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.event-item {
    background: var(--surface-2);
    border-left: 4px solid var(--google-yellow);
    padding: 10px 12px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.event-item.gcal-item {
    border-left-color: var(--google-blue);
}

.recurrence-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.68rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 10px;
    color: var(--text-secondary);
    margin-left: 6px;
}

/* GOALS */
.goals-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.goal-card {
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.goal-title {
    font-size: 1rem;
    font-weight: 700;
}

.goal-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--surface-2);
    border-radius: 4px;
    overflow: hidden;
}

.goal-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--google-red), #ff7b00);
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* MODAL & TOAST */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 16px;
}

.modal-backdrop.hidden {
    display: none;
}

.modal-box {
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 450px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow-card);
}

.modal-box h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.form-group input,
.form-group select {
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.95rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.xp-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--google-blue), var(--google-green));
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(54, 168, 83, 0.4);
    z-index: 200;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.xp-toast.hidden {
    opacity: 0;
    transform: translate(-50%, 20px) scale(0.8);
    pointer-events: none;
}

/* COMPACT HEADER GOOGLE ACCOUNT WIDGET */
.header-google-widget {
    display: flex;
    align-items: center;
    gap: 6px;
}

.compact-gcal-btn {
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 4px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.compact-gcal-btn:hover {
    background: var(--surface-3);
    border-color: var(--google-blue);
}

.compact-gcal-btn.connected {
    background: rgba(54, 168, 83, 0.15);
    border-color: var(--google-green);
    color: var(--google-green);
}

/* QUESTS TAB SYSTEM */
.quests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.quest-card {
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.quest-card:hover {
    transform: translateY(-2px);
    border-color: var(--google-blue);
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.15);
}

.quest-card.completed {
    opacity: 0.6;
    border-color: var(--google-green);
}

.quest-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.quest-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.quest-xp-tag {
    background: rgba(251, 188, 5, 0.2);
    color: var(--google-yellow);
    border: 1px solid rgba(251, 188, 5, 0.4);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 700;
}

.quest-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.quest-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
}

.quest-claim-btn {
    background: linear-gradient(135deg, var(--google-blue), var(--google-green));
    color: white;
    border: none;
    border-radius: 16px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quest-claim-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(54, 168, 83, 0.3);
}

/* FUSED CALENDAR TO-DOS */
.day-todos-section {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
}

.day-todos-header {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--google-blue);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.calendar-todo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 10px;
    margin-bottom: 6px;
    font-size: 0.82rem;
    transition: all 0.15s ease;
}

.calendar-todo-item:hover {
    background: var(--surface-3);
}

.calendar-todo-item.completed span {
    text-decoration: line-through;
    color: var(--text-disabled);
}

/* ==========================================================================
   RPG LEVELING, STATS & HUNTER RANK SYSTEM
   ========================================================================== */
.rpg-stats-container {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rpg-rank-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.rpg-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.15), rgba(156, 39, 176, 0.2));
    border: 1px solid rgba(66, 133, 244, 0.4);
    border-radius: 12px;
    padding: 6px 14px;
    box-shadow: 0 0 14px rgba(66, 133, 244, 0.2);
    transition: all 0.3s ease;
}

.rpg-rank-badge.rank-e {
    border-color: #888;
    color: #bbb;
    background: rgba(255, 255, 255, 0.06);
}

.rpg-rank-badge.rank-d {
    border-color: #34A853;
    color: #34A853;
    background: rgba(52, 168, 83, 0.12);
    box-shadow: 0 0 12px rgba(52, 168, 83, 0.25);
}

.rpg-rank-badge.rank-c {
    border-color: #4285F4;
    color: #4285F4;
    background: rgba(66, 133, 244, 0.15);
    box-shadow: 0 0 14px rgba(66, 133, 244, 0.3);
}

.rpg-rank-badge.rank-b {
    border-color: #FBBC05;
    color: #FBBC05;
    background: rgba(251, 188, 5, 0.15);
    box-shadow: 0 0 16px rgba(251, 188, 5, 0.35);
}

.rpg-rank-badge.rank-a {
    border-color: #EA4335;
    color: #EA4335;
    background: rgba(234, 67, 53, 0.15);
    box-shadow: 0 0 20px rgba(234, 67, 53, 0.4);
}

.rpg-rank-badge.rank-s {
    border-color: #a855f7;
    color: #c084fc;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(236, 72, 153, 0.25));
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.6);
    animation: sRankPulse 2.5s infinite ease-in-out;
}

@keyframes sRankPulse {

    0%,
    100% {
        box-shadow: 0 0 16px rgba(168, 85, 247, 0.4);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 26px rgba(236, 72, 153, 0.7);
        transform: scale(1.02);
    }
}

.rank-letter {
    font-family: var(--font-mono);
    font-weight: 900;
    font-size: 1.15rem;
    line-height: 1;
}

.rank-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.rpg-xp-info {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rpg-xp-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.76rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.rpg-xp-track {
    width: 100%;
    height: 8px;
    background: var(--surface-2);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
}

.rpg-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--google-blue), var(--google-green), var(--google-yellow));
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 10px rgba(66, 133, 244, 0.6);
}

.rpg-attributes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
}

.rpg-attr-chip {
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    cursor: default;
    transition: all 0.2s ease;
}

.rpg-attr-chip:hover {
    border-color: var(--google-blue);
    transform: translateY(-2px);
    background: var(--surface-3);
}

.attr-icon {
    font-size: 0.95rem;
}

.attr-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.attr-val {
    font-size: 0.85rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

/* ==========================================================================
   DUOLINGO-STYLE EVOLVING FLAME SYSTEM
   ========================================================================== */
.flame-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    position: relative;
    transition: all 0.3s ease;
}

.flame-icon-svg {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

/* Stage 0: Inactive / 0 Streak */
.flame-stage-0 {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-disabled);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.flame-stage-0 .flame-icon-svg {
    filter: grayscale(1) opacity(0.4);
}

/* Stage 1: Warm Ember (1-3 Days) */
.flame-stage-1 {
    background: rgba(251, 188, 5, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(251, 188, 5, 0.3);
}

.flame-stage-1 .flame-icon-svg {
    filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.6));
    animation: flameGentleFlicker 1.8s infinite ease-in-out;
}

/* Stage 2: Blazing Fire (4-7 Days) */
.flame-stage-2 {
    background: rgba(249, 115, 22, 0.18);
    color: #ff7700;
    border: 1px solid rgba(249, 115, 22, 0.45);
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.25);
}

.flame-stage-2 .flame-icon-svg {
    filter: drop-shadow(0 0 7px rgba(255, 119, 0, 0.8));
    animation: flameRoar 1.2s infinite ease-in-out alternate;
}

/* Stage 3: Blue-Hot Plasma Fire (8-14 Days) */
.flame-stage-3 {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 14px rgba(59, 130, 246, 0.4);
}

.flame-stage-3 .flame-icon-svg {
    filter: drop-shadow(0 0 9px #3b82f6) drop-shadow(0 0 2px #93c5fd);
    animation: flameIntenseBlue 0.9s infinite ease-in-out alternate;
}

/* Stage 4: Neon Violet / Cyber Inferno (15-29 Days) */
.flame-stage-4 {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.22), rgba(236, 72, 153, 0.22));
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.55);
    box-shadow: 0 0 18px rgba(236, 72, 153, 0.45);
}

.flame-stage-4 .flame-icon-svg {
    filter: drop-shadow(0 0 11px #ec4899) drop-shadow(0 0 4px #a855f7);
    animation: flameCyberDance 0.75s infinite ease-in-out alternate;
}

/* Stage 5: GOD TIER SOLAR CORONA (30+ Days) */
.flame-stage-5 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 77, 0, 0.3));
    color: #ffe066;
    border: 1px solid #ffd700;
    box-shadow: 0 0 24px rgba(255, 215, 0, 0.65), inset 0 0 12px rgba(255, 120, 0, 0.4);
    animation: godTierPulse 2s infinite ease-in-out;
}

.flame-stage-5 .flame-icon-svg {
    filter: drop-shadow(0 0 14px #ffd700) drop-shadow(0 0 6px #ff4500);
    animation: flameGodTier 0.6s infinite ease-in-out alternate;
}

@keyframes flameGentleFlicker {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.08) rotate(2deg);
    }
}

@keyframes flameRoar {
    0% {
        transform: scale(1) translateY(0) rotate(-2deg);
    }

    50% {
        transform: scale(1.15) translateY(-2px) rotate(3deg);
    }

    100% {
        transform: scale(1.05) translateY(-1px) rotate(-1deg);
    }
}

@keyframes flameIntenseBlue {
    0% {
        transform: scale(1.05) rotate(1deg);
        filter: drop-shadow(0 0 8px #3b82f6);
    }

    100% {
        transform: scale(1.22) translateY(-2px) rotate(-3deg);
        filter: drop-shadow(0 0 14px #60a5fa);
    }
}

@keyframes flameCyberDance {
    0% {
        transform: scale(1.1) rotate(-3deg);
    }

    50% {
        transform: scale(1.28) translateY(-3px) rotate(4deg);
    }

    100% {
        transform: scale(1.15) rotate(-1deg);
    }
}

@keyframes flameGodTier {
    0% {
        transform: scale(1.2) rotate(2deg);
    }

    50% {
        transform: scale(1.38) translateY(-4px) rotate(-4deg);
    }

    100% {
        transform: scale(1.25) rotate(3deg);
    }
}

@keyframes godTierPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    }

    50% {
        box-shadow: 0 0 32px rgba(255, 100, 0, 0.85), 0 0 10px #fff;
    }
}

/* ==========================================================================
   DRAG & DROP REORDERING STYLES
   ========================================================================== */
.drag-handle {
    cursor: grab;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-disabled);
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    touch-action: none;
}

.drag-handle:hover,
.drag-handle:active {
    color: var(--google-blue);
    background: rgba(66, 133, 244, 0.1);
}

.drag-handle:active {
    cursor: grabbing;
}

.draggable-item {
    user-select: none;
    transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.draggable-item.is-dragging {
    opacity: 0.45;
    transform: scale(0.98);
    border-style: dashed !important;
    border-color: var(--google-blue) !important;
    box-shadow: 0 0 20px var(--google-blue-glow);
}

.drop-indicator-above {
    border-top: 2px solid var(--google-blue) !important;
}

.drop-indicator-below {
    border-bottom: 2px solid var(--google-blue) !important;
}

/* ACTION BUTTONS GROUP */
.item-actions-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.edit-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.edit-btn:hover {
    color: var(--google-blue);
    background: rgba(66, 133, 244, 0.15);
    transform: scale(1.1);
}

/* ==========================================================================
   LEVEL-UP & COMPLETION CELEBRATION MODAL & FLOATING XP
   ========================================================================== */
.floating-xp {
    position: fixed;
    pointer-events: none;
    font-family: var(--font-mono);
    font-weight: 900;
    font-size: 1.15rem;
    color: #ffdd44;
    text-shadow: 0 0 12px rgba(255, 221, 68, 0.8), 0 2px 4px rgba(0, 0, 0, 0.8);
    z-index: 10000;
    animation: floatUpAndFade 1.2s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes floatUpAndFade {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.6);
    }

    20% {
        opacity: 1;
        transform: translateY(-16px) scale(1.2);
    }

    100% {
        opacity: 0;
        transform: translateY(-60px) scale(1);
    }
}

.level-up-modal-card {
    background: linear-gradient(145deg, #1f1b2e 0%, #111019 100%);
    border: 2px solid #a855f7;
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.5), inset 0 0 20px rgba(168, 85, 247, 0.2);
    border-radius: 24px;
    padding: 32px 24px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    animation: levelUpPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes levelUpPop {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.level-up-badge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 900;
    color: white;
    box-shadow: 0 0 28px rgba(168, 85, 247, 0.8);
    margin-bottom: 16px;
    animation: badgeSpin 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badgeSpin {
    0% {
        transform: rotate(-180deg) scale(0);
    }

    100% {
        transform: rotate(0) scale(1);
    }
}

.level-up-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: #e9d5ff;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.level-up-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.level-up-perks {
    background: var(--surface-2);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 20px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
}

.level-up-perk-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #a7f3d0;
}

/* ==========================================================================
   CLEAN MOMENTUM & DAILY PERFORMANCE HUD
   ========================================================================== */
.momentum-hub-container {
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}

.momentum-level-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.momentum-level-badge {
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.2), rgba(52, 168, 83, 0.2));
    border: 1px solid var(--google-blue);
    border-radius: 12px;
    padding: 6px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 54px;
}

.level-tag {
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--google-blue);
}

.level-val {
    font-size: 1.3rem;
    font-weight: 900;
    line-height: 1;
    color: var(--text-primary);
}

.momentum-xp-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.momentum-xp-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.momentum-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

@media (max-width: 600px) {
    .momentum-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.kpi-chip {
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease;
}

.kpi-icon {
    font-size: 1.15rem;
}

.kpi-details {
    display: flex;
    flex-direction: column;
}

.kpi-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.kpi-val {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ==========================================================================
   24H DAILY FOCUS & TO-DO SECTION STYLES
   ========================================================================== */
.daily-focus-card {
    background: linear-gradient(180deg, rgba(66, 133, 244, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(66, 133, 244, 0.25);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.daily-focus-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.daily-focus-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--google-blue);
    display: flex;
    align-items: center;
    gap: 6px;
}

.daily-progress-container {
    width: 100%;
    height: 6px;
    background: var(--surface-3);
    border-radius: 3px;
    overflow: hidden;
}

.daily-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--google-blue), var(--google-green));
    border-radius: 3px;
    transition: width 0.4s ease;
}

.backlog-section-header {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 4px 6px;
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
}

/* 1-TAP REORDER BUTTONS */
.reorder-btns {
    display: inline-flex;
    flex-direction: column;
    gap: 1px;
    margin-right: 2px;
}

.btn-move {
    background: transparent;
    border: none;
    color: var(--text-disabled);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    line-height: 1;
    transition: all 0.15s ease;
}

.btn-move:hover {
    color: var(--google-blue);
    background: rgba(66, 133, 244, 0.15);
}