/* Liv v5.0.0 - Main Styles */
/* Using Lucide icons via CDN */

:root {
    --primary-dark: #3d4f47;
    --primary-teal: #4a8b8b;
    --sage-green: #7a9484;
    --card-light: #e8e6df;
    --bg-warm: #f5f3ef;
    --text-primary: #2d3a34;
    --text-secondary: #5a6961;
    --text-muted: #7d8a82;
    --text-light: rgba(255,255,255,0.9);
    --text-light-muted: rgba(255,255,255,0.6);
    --accent-mint: #a5d78a;
    --accent-warm: #d9a857;
    --accent-rose: #d4a5a5;
    --accent-coral: #e07a5f;
    --glass-bg: rgba(232,230,223,0.85);
    --glass-border: rgba(255,255,255,0.4);
    --glass-shadow: 0 8px 32px rgba(61,79,71,0.12);
    --sidebar-width: 260px;
    --header-height: 64px;
    --icon-color: #4a8b8b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-warm);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(122,148,132,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(74,139,139,0.06) 0%, transparent 50%),
        var(--bg-warm);
    z-index: -1;
}

/* Layout */
.app-container { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--primary-dark);
    position: fixed;
    left: 0; top: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo { width: 40px; height: 40px; border-radius: 10px; }
.sidebar-brand {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-light);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    color: var(--text-light-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    background: rgba(74,139,139,0.15);
    color: var(--text-light);
}

.nav-item.active {
    background: var(--primary-teal);
    color: white;
    box-shadow: 0 4px 12px rgba(74,139,139,0.3);
}

.nav-item svg { width: 20px; height: 20px; stroke-width: 2; }

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* Main wrapper */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.main-header {
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left, .header-right { display: flex; align-items: center; gap: 16px; }

.header-greeting {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 500;
}

.header-date { font-size: 0.9rem; color: var(--text-muted); }

.fitbit-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #00b0b9 0%, #00838f 100%);
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.fitbit-badge:hover { transform: scale(1.05); }
.fitbit-badge svg { width: 16px; height: 16px; }

.badges-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--accent-warm) 0%, #c9953f 100%);
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.badges-btn:hover { transform: scale(1.05); }

/* Fitbit Modal */
.fitbit-history { display: flex; flex-direction: column; gap: 8px; }

.fitbit-day {
    background: var(--card-light);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fitbit-day.today { background: rgba(74,139,139,0.15); border: 2px solid var(--primary-teal); }
.fitbit-day-name { font-weight: 600; min-width: 70px; font-size: 0.9rem; }

.fitbit-stats { display: flex; gap: 12px; flex-wrap: wrap; }

.fitbit-stat {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.85rem;
}

.fitbit-stat-icon { font-size: 0.8rem; }
.fitbit-stat-value { font-weight: 600; min-width: 35px; }

@media (max-width: 480px) {
    .fitbit-day { padding: 8px 12px; }
    .fitbit-day-name { min-width: 60px; font-size: 0.85rem; }
    .fitbit-stats { gap: 8px; }
    .fitbit-stat { font-size: 0.8rem; gap: 2px; }
    .fitbit-stat-value { min-width: 30px; }
}

/* Badges Modal */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.badge-card {
    background: var(--card-light);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s;
}

.badge-card.earned {
    background: linear-gradient(135deg, rgba(165,215,138,0.3) 0%, rgba(74,139,139,0.2) 100%);
    border: 2px solid var(--accent-mint);
}

.badge-card.locked { opacity: 0.6; }

.badge-icon { font-size: 2rem; margin-bottom: 8px; }
.badge-card.locked .badge-icon { filter: grayscale(1); }

.badge-name { font-weight: 600; margin-bottom: 4px; }
.badge-desc { font-size: 0.8rem; color: var(--text-muted); }
.badge-progress { font-size: 0.75rem; color: var(--primary-teal); margin-top: 6px; font-weight: 600; }

/* SOS Button - Emergency Support */
.sos-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background: #e8e8e8;
    color: #c44;
    border: 2px solid #c44;
    border-radius: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(204,68,68,0.1);
    line-height: 1;
    min-width: 50px;
}

.sos-btn:hover { 
    background: #c44; 
    color: white;
    transform: translateY(-1px); 
    box-shadow: 0 4px 12px rgba(204,68,68,0.25);
}

.sos-btn svg { 
    display: none; /* Hide icon for stacked text layout */
}

.sos-btn span {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sos-btn span:first-of-type {
    font-size: 0.6rem;
    opacity: 0.8;
}

/* Keep old liv-btn for backwards compatibility */
.liv-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--primary-teal);
    color: white;
    border: none;
    border-radius: 24px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(74,139,139,0.25);
}

.liv-btn:hover { background: #3d7a7a; transform: translateY(-2px); }
.liv-btn svg { width: 18px; height: 18px; }

.settings-btn {
    width: 40px; height: 40px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-btn:hover { background: var(--card-light); }
.settings-btn svg { width: 20px; height: 20px; }

/* Main content */
.main-content {
    flex: 1;
    padding: 32px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.glass-card:hover { transform: translateY(-2px); }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(61,79,71,0.1);
}

.card-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title svg { width: 22px; height: 22px; color: var(--icon-color); }

.card-badge {
    background: var(--primary-teal);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn svg { width: 18px; height: 18px; }

.btn-primary {
    background: var(--primary-teal);
    color: white;
    box-shadow: 0 4px 12px rgba(74,139,139,0.25);
}

.btn-primary:hover { background: #3d7a7a; transform: translateY(-2px); }
.btn-primary:disabled { background: var(--card-light); color: var(--text-muted); cursor: not-allowed; transform: none; }

.btn-secondary {
    background: var(--card-light);
    color: var(--text-secondary);
    border: 1px solid rgba(61,79,71,0.15);
}

.btn-secondary:hover { background: white; border-color: var(--primary-teal); }

.btn-row {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    gap: 12px;
}

/* Progress dots */
.flow-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
    padding: 16px;
    background: white;
    border-radius: 16px;
}

.progress-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--card-light);
    transition: all 0.3s ease;
}

.progress-dot.completed { background: var(--primary-teal); }
.progress-dot.current {
    background: var(--primary-teal);
    transform: scale(1.3);
    box-shadow: 0 0 0 4px rgba(74,139,139,0.2);
}

.progress-line { width: 24px; height: 2px; background: var(--card-light); }
.progress-line.completed { background: var(--primary-teal); }

.progress-label { font-size: 0.85rem; color: var(--text-muted); margin-left: 12px; }

/* Flow steps */
.flow-step { display: none; animation: fadeSlideIn 0.4s ease; }
.flow-step.active { display: block; }

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Sleep options */
.sleep-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.sleep-btn {
    padding: 24px 20px;
    border: 2px solid var(--card-light);
    border-radius: 16px;
    background: white;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.sleep-btn:hover { border-color: var(--primary-teal); transform: translateY(-4px); }
.sleep-btn.selected {
    border-color: var(--primary-teal);
    background: linear-gradient(135deg, rgba(74,139,139,0.08) 0%, rgba(122,148,132,0.08) 100%);
}

.sleep-btn svg { width: 48px; height: 48px; color: var(--icon-color); margin-bottom: 12px; }
.sleep-btn .label { font-weight: 600; font-size: 1rem; margin-bottom: 4px; }
.sleep-btn .desc { font-size: 0.85rem; color: var(--text-muted); }

/* State check */
.state-grid { display: flex; flex-direction: column; gap: 12px; }

.state-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--card-light);
}

.state-label { display: flex; align-items: center; gap: 12px; }
.state-icon { color: var(--icon-color); }
.state-icon svg { width: 24px; height: 24px; }
.state-name { font-weight: 600; }
.state-hint { font-size: 0.8rem; color: var(--text-muted); }

.rating-btns { display: flex; gap: 6px; }

.rating-btn {
    width: 40px; height: 40px;
    border: 2px solid var(--card-light);
    border-radius: 10px;
    background: white;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.rating-btn:hover { border-color: var(--primary-teal); transform: scale(1.1); }
.rating-btn.selected { color: white; }
.rating-btn.selected.r0 { background: var(--accent-rose); border-color: var(--accent-rose); }
.rating-btn.selected.r1 { background: var(--accent-warm); border-color: var(--accent-warm); }
.rating-btn.selected.r2 { background: var(--primary-teal); border-color: var(--primary-teal); }
.rating-btn.selected.r3 { background: var(--accent-mint); border-color: var(--accent-mint); }

/* Liv Take */
.liv-take-container {
    background: linear-gradient(135deg, rgba(74,139,139,0.08) 0%, rgba(122,148,132,0.08) 100%);
    border-radius: 16px;
    padding: 24px;
    border-left: 4px solid var(--primary-teal);
    margin-top: 20px;
}

.liv-take-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.liv-avatar {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: var(--primary-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.liv-avatar svg { width: 24px; height: 24px; }
.liv-take-content { color: var(--text-secondary); line-height: 1.7; }

/* Dashboard grid */
.dash-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

/* Collapsible Liv Take */
.liv-take-card { transition: all 0.3s ease; }

.liv-take-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.liv-take-body {
    margin-top: 16px;
    transition: opacity 0.3s ease, margin 0.3s ease;
}

/* Ensure content is readable on mobile */
@media (max-width: 768px) {
    .liv-take-content {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .liv-take-container {
        padding: 16px;
    }
}

.liv-take-card.collapsed .liv-take-body {
    display: none;
}

.liv-take-card.collapsed {
    padding: 12px 20px;
}

.liv-take-card.collapsed .card-title::after {
    content: ' ✓';
    color: var(--accent-mint);
}

.dash-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--glass-border);
}

.dash-card.full { grid-column: 1 / -1; }

.dash-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-title svg { width: 20px; height: 20px; color: var(--icon-color); }

/* Tasks */
.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.task-item:hover { transform: translateX(4px); }

.task-checkbox {
    width: 22px; height: 22px;
    accent-color: var(--primary-teal);
    cursor: pointer;
}

.task-text { flex: 1; }

.calendar-event {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 10px;
    margin-bottom: 8px;
    border-left: 3px solid var(--primary-teal);
}

.event-time { font-weight: 600; font-size: 0.85rem; color: var(--primary-teal); min-width: 70px; }

.add-row { display: flex; gap: 8px; margin-top: 16px; }
.add-row input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--card-light);
    border-radius: 10px;
    font-family: inherit;
}

.add-row input:focus { outline: none; border-color: var(--primary-teal); }
.add-row button {
    padding: 12px 20px;
    background: var(--primary-teal);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

/* Urgent tasks preview */
.urgent-tasks-preview {
    background: linear-gradient(135deg, rgba(224,122,95,0.08) 0%, rgba(217,168,87,0.08) 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.urgent-task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 10px;
    margin-bottom: 8px;
    border-left: 3px solid var(--accent-coral);
}

.urgent-task-item svg { width: 18px; height: 18px; color: var(--accent-coral); }
.urgent-task-item.overdue { border-left-color: var(--accent-rose); }

/* Bonds */
.bonds-header {
    text-align: center;
    padding: 32px;
    background: linear-gradient(135deg, rgba(74,139,139,0.1) 0%, rgba(165,215,138,0.1) 100%);
    border-radius: 20px;
    margin-bottom: 24px;
}

.bonds-header svg { width: 48px; height: 48px; color: var(--icon-color); margin-bottom: 8px; }
.bonds-title { font-family: 'Fraunces', Georgia, serif; font-size: 2rem; margin-bottom: 8px; }

.bonds-actions-row {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    justify-content: center;
}

.bonds-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .bonds-categories { grid-template-columns: 1fr; }
}

.bond-category-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--glass-border);
    min-height: auto;
    transition: all 0.3s ease;
}

.bond-category-card.repair { border-left: 4px solid #e74c3c; }
.bond-category-card.reconnect { border-left: 4px solid #3498db; }
.bond-category-card.rituals { border-left: 4px solid #9b59b6; }
.bond-category-card.recognition { border-left: 4px solid #f1c40f; }

.bond-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 0;
}

.bond-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bond-count {
    background: var(--card-light);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.bond-toggle {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.bond-category-card.collapsed .bond-toggle {
    transform: rotate(-90deg);
}

.bond-category-body {
    overflow: hidden;
    max-height: 500px;
    transition: all 0.3s ease;
}

.bond-category-card.collapsed .bond-category-body {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.bond-category-card:not(.collapsed) .bond-category-body {
    margin-top: 12px;
}

.bond-category-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.bond-add-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--card-light);
    background: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bond-add-btn:hover { border-color: var(--primary-teal); background: var(--primary-teal); color: white; }

.bond-items { display: flex; flex-direction: column; gap: 8px; }

.bond-empty { color: var(--text-muted); font-size: 0.9rem; font-style: italic; padding: 20px 0; text-align: center; }

.bond-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: white;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.bond-item:hover { transform: translateX(4px); }

.bond-item-check {
    width: 24px;
    height: 24px;
    border: 2px solid var(--card-light);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: transparent;
    font-size: 0.8rem;
}

.bond-item-check:hover { border-color: var(--primary-teal); color: var(--primary-teal); }

.bond-item-content { flex: 1; cursor: pointer; }
.bond-item-person { font-weight: 600; font-size: 0.95rem; }
.bond-item-action { font-size: 0.85rem; color: var(--text-secondary); }

.bond-days {
    background: rgba(52,152,219,0.15);
    color: #2980b9;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.bond-frequency {
    background: rgba(155,89,182,0.15);
    color: #8e44ad;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.bond-item-delete {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.bond-item:hover .bond-item-delete { opacity: 1; }
.bond-item-delete:hover { color: var(--accent-rose); }

/* Bond forms */
.bond-form { display: flex; flex-direction: column; gap: 12px; }
.bond-input {
    padding: 12px 16px;
    border: 2px solid var(--card-light);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    width: 100%;
}
.bond-input:focus { outline: none; border-color: var(--primary-teal); }

/* Vault list */
.vault-list { display: flex; flex-direction: column; gap: 8px; max-height: 400px; overflow-y: auto; }

.vault-person {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--card-light);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.vault-person:hover { background: white; transform: translateX(4px); }

.vault-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-teal);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.vault-info { flex: 1; }
.vault-name { font-weight: 600; }
.vault-rel { font-size: 0.85rem; color: var(--text-muted); }
.vault-days { font-size: 0.85rem; color: var(--text-muted); }

/* Person detail */
.person-details { background: var(--card-light); border-radius: 12px; padding: 16px; }
.detail-row { padding: 8px 0; border-bottom: 1px solid rgba(61,79,71,0.1); }
.detail-row:last-child { border-bottom: none; }
.detail-label { font-weight: 600; margin-right: 8px; }

/* Bonds Completed Log */
.bonds-log-section {
    margin-top: 32px;
    background: var(--glass-bg);
    border-radius: 16px;
    overflow: hidden;
}

.bonds-log-header {
    padding: 16px 20px;
    background: var(--card-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
}

.bonds-log-header:hover { background: rgba(61,79,71,0.12); }

.bonds-log-content {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.bonds-log-content.hidden { display: none; }

.bond-log-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 24px;
    font-style: italic;
}

.bond-log-entry {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 10px;
    margin-bottom: 8px;
}

.bond-log-entry:last-child { margin-bottom: 0; }

.bond-log-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-light);
    border-radius: 8px;
    font-size: 1rem;
}

.bond-log-details { flex: 1; }

.bond-log-action { font-size: 0.95rem; }

.bond-log-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: capitalize;
}

/* Photos */
.photos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

.photo-card { border-radius: 12px; overflow: hidden; background: white; box-shadow: var(--glass-shadow); }
.photo-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.photo-meta { padding: 12px; }

.photo-upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border: 2px dashed var(--card-light);
    border-radius: 12px;
    cursor: pointer;
    background: white;
}

.photo-upload-btn:hover { border-color: var(--primary-teal); }
.photo-upload-btn svg { width: 32px; height: 32px; color: var(--icon-color); margin-bottom: 8px; }

/* Settings */
.settings-section { background: white; border-radius: 16px; margin-bottom: 20px; overflow: hidden; }
.settings-section-title {
    padding: 20px 24px;
    font-weight: 600;
    font-size: 1.1rem;
    background: var(--card-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-section-title svg { width: 20px; height: 20px; color: var(--icon-color); }

.settings-item {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(61,79,71,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-item:last-child { border-bottom: none; }
.settings-item-title { font-weight: 600; margin-bottom: 4px; }
.settings-item-desc { font-size: 0.85rem; color: var(--text-muted); }

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(45,58,52,0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 24px;
}

.modal-overlay.visible { display: flex; }

.modal-content {
    background: white;
    border-radius: 24px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--card-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title { font-family: 'Fraunces', Georgia, serif; font-size: 1.3rem; font-weight: 600; }

.modal-close {
    width: 36px; height: 36px;
    border: none;
    background: var(--card-light);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close svg { width: 20px; height: 20px; }
.modal-body { padding: 24px; }

/* Coach modal - Chat style */
#coach-chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 60vh;
}

#coach-messages {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    margin-bottom: 16px;
    max-height: 300px;
}

.coach-message {
    margin-bottom: 12px;
    display: flex;
}

.coach-message.user {
    justify-content: flex-end;
}

.coach-message.luz {
    justify-content: flex-start;
}

.coach-message-content {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.coach-message.user .coach-message-content {
    background: var(--primary-teal);
    color: white;
    border-bottom-right-radius: 4px;
}

.coach-message.luz .coach-message-content {
    background: var(--card-light);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

#coach-trigger-section {
    margin-bottom: 16px;
}

.coach-trigger-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.coach-trigger-btn {
    padding: 14px 12px;
    border: 2px solid var(--card-light);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    transition: all 0.2s;
}

.coach-trigger-btn:hover { border-color: var(--primary-teal); background: rgba(74,139,139,0.05); }
.coach-trigger-btn.selected { border-color: var(--primary-teal); background: var(--primary-teal); color: white; }

#coach-input-section {
    margin-top: auto;
}

.coach-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--card-light);
    border-radius: 20px;
    font-family: inherit;
    font-size: 0.95rem;
    min-height: 50px;
    max-height: 120px;
    resize: none;
    margin-bottom: 12px;
}

.coach-textarea:focus { outline: none; border-color: var(--primary-teal); }

.coach-btn-row {
    display: flex;
    gap: 12px;
}

.coach-btn-row .btn { flex: 1; }

.coach-uses-left { text-align: center; font-size: 0.85rem; color: var(--text-muted); margin-top: 16px; }

/* Auth overlay */
.auth-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.auth-overlay.hidden { display: none; }

.auth-modal {
    background: white;
    border-radius: 24px;
    padding: 48px;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.auth-logo { margin-bottom: 32px; }
.auth-logo img { width: 72px; height: 72px; margin-bottom: 16px; }
.auth-logo h1 { font-family: 'Fraunces', Georgia, serif; font-size: 2rem; margin-bottom: 8px; }

.auth-input {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--card-light);
    border-radius: 12px;
    font-size: 1rem;
    margin-bottom: 16px;
}

.auth-input:focus { outline: none; border-color: var(--primary-teal); }

.auth-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary-teal);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.auth-btn:disabled { background: var(--card-light); cursor: not-allowed; }
.auth-status { margin-top: 16px; padding: 12px; border-radius: 10px; }
.auth-status.success { background: rgba(165,215,138,0.2); color: #4a7c59; }
.auth-status.error { background: rgba(212,165,165,0.2); color: #a55; }
.auth-divider { margin-top: 24px; color: var(--text-muted); font-size: 0.85rem; }

/* Utilities */
.hidden { display: none !important; }

textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--card-light);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
}

textarea:focus { outline: none; border-color: var(--primary-teal); }

.collapsible { display: none; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--card-light); }
.collapsible.visible { display: block; }

/* Incognito counters */
.incognito-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--card-light);
    border-radius: 10px;
    cursor: pointer;
    margin-top: 20px;
    color: var(--text-muted);
}

.incognito-toggle svg { width: 18px; height: 18px; }

.incognito-content { display: none; margin-top: 12px; padding: 16px; background: white; border-radius: 12px; }
.incognito-content.visible { display: block; }

.counter-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.counter-label { font-size: 1.2rem; display: flex; align-items: center; gap: 8px; }
.counter-label svg { width: 24px; height: 24px; color: var(--icon-color); }
.counter-controls { display: flex; align-items: center; gap: 8px; }

.counter-btn {
    width: 36px; height: 36px;
    border: 2px solid var(--card-light);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 1.1rem;
}

.counter-btn:hover { border-color: var(--primary-teal); }
.counter-value { width: 40px; text-align: center; font-weight: 600; font-size: 1.1rem; }
.counter-total { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--card-light); display: flex; justify-content: space-between; font-weight: 600; }

/* Dishes tracker */
.dishes-dates { display: flex; gap: 6px; margin-bottom: 4px; }
.dishes-dates .dish-date {
    flex: 1;
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}
.dishes-dates .dish-date.today {
    color: var(--primary-teal);
    font-weight: 700;
}

.dishes-row { display: flex; gap: 6px; }

.dish-day {
    flex: 1;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid var(--card-light);
    cursor: pointer;
    font-size: 0.75rem;
}

.dish-day.current { font-weight: 700; border-color: var(--primary-teal); }
.dish-day:hover { border-color: var(--primary-teal); }
.dish-day.you { background: rgba(165,215,138,0.3); border-color: var(--accent-mint); }
.dish-day.partner { background: rgba(74,139,139,0.3); border-color: var(--primary-teal); }
.dish-day.both { background: rgba(155,89,182,0.3); border-color: #9b59b6; }

.dishes-legend { display: flex; gap: 16px; margin-top: 8px; font-size: 0.8rem; color: var(--text-muted); }

/* Photo capture */
.photo-capture { margin-top: 20px; }

.photo-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--card-light);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
}

.photo-btn:hover { background: var(--primary-teal); color: white; }
.photo-btn svg { width: 20px; height: 20px; }
.photo-hidden-input { display: none; }
.photo-preview { margin-top: 12px; }
.photo-preview img { max-width: 200px; border-radius: 12px; }

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pulse { animation: pulse 1.5s infinite; }

/* Mobile responsive */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-wrapper { margin-left: 0; width: 100%; }
    .main-header { padding: 0 12px; }
    .header-greeting { display: none; }
    .header-left, .header-right { gap: 8px; }
    .streak-badge { padding: 6px 10px; font-size: 0.8rem; }
    .wellness-badge { width: 40px; height: 40px; }
    .liv-btn { padding: 8px 12px; font-size: 0.85rem; }
    .sos-btn { padding: 4px 10px; min-width: 44px; }
    .sos-btn span { font-size: 0.55rem; }
    .sos-btn span:first-of-type { font-size: 0.5rem; }
    .main-content { padding: 12px; overflow-x: hidden; }
    .sleep-options { grid-template-columns: 1fr; }
    .dash-grid { grid-template-columns: 1fr; }
    .coach-trigger-grid { grid-template-columns: 1fr; }
    .mobile-menu-btn { display: flex !important; }
    .glass-card { padding: 16px; }
    .flow-progress { padding: 12px 16px; overflow-x: auto; }
    .btn-row { flex-wrap: wrap; gap: 8px; }
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    width: 40px; height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.mobile-menu-btn span { display: block; width: 24px; height: 2px; background: var(--text-primary); border-radius: 2px; }

.sidebar-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(45,58,52,0.5);
    z-index: 999;
    display: none;
}

.sidebar-overlay.visible { display: block; }

/* ==================== */
/* RIP - HYPERFOCUS DARK ROOM */
/* ==================== */

/* Nav divider and dark section */
.sidebar-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(74,139,139,0.3), transparent);
    margin: 16px 12px;
}

.sidebar-nav-dark {
    padding: 0 8px;
}

.nav-item-dark {
    color: rgba(255,255,255,0.6) !important;
}

.nav-item-dark:hover {
    background: rgba(30,30,30,0.5) !important;
    color: rgba(255,255,255,0.8) !important;
}

.nav-item-dark.active {
    background: rgba(30,30,30,0.7) !important;
    color: rgba(255,255,255,0.9) !important;
}

/* Dark room container */
.hyperfocus-dark {
    background: #1a1a1a;
    min-height: 100%;
    color: #e0e0e0;
    position: relative;
}

/* When hyperfocus view is active, darken the whole main area */
.main-wrapper:has(.hyperfocus-dark:not(.hidden)) {
    background: #1a1a1a;
}

.main-wrapper:has(.hyperfocus-dark:not(.hidden)) .main-header {
    background: rgba(26,26,26,0.95);
    border-bottom-color: rgba(74,139,139,0.2);
}

/* Rip chat bubbles */
.rip-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

.rip-bubble {
    background: rgba(45,45,45,0.8);
    border-radius: 16px 16px 16px 4px;
    padding: 16px 20px;
    margin-bottom: 12px;
    max-width: 85%;
    opacity: 0;
    transform: translateY(10px);
    animation: ripFadeIn 0.4s ease forwards;
    color: #e0e0e0;
    line-height: 1.6;
    font-size: 1rem;
}

.rip-bubble.typing {
    background: rgba(45,45,45,0.5);
}

.rip-bubble .cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: rgba(74,139,139,0.8);
    margin-left: 2px;
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

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

.rip-bubble-fade {
    animation: ripFadeOut 0.5s ease forwards;
}

@keyframes ripFadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Trigger category cards */
.rip-triggers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 24px 0;
}

.rip-trigger-card {
    background: rgba(45,45,45,0.6);
    border: 1px solid rgba(74,139,139,0.2);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.rip-trigger-card:hover {
    background: rgba(55,55,55,0.8);
    border-color: rgba(74,139,139,0.4);
}

.rip-trigger-card.selected {
    background: rgba(74,139,139,0.2);
    border-color: rgba(74,139,139,0.6);
}

.rip-trigger-card .icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.rip-trigger-card .label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
}

/* Rip input */
.rip-input-container {
    margin: 20px 0;
}

.rip-input {
    width: 100%;
    background: rgba(45,45,45,0.6);
    border: 1px solid rgba(74,139,139,0.3);
    border-radius: 12px;
    padding: 14px 16px;
    color: #e0e0e0;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.rip-input:focus {
    border-color: rgba(74,139,139,0.6);
}

.rip-input::placeholder {
    color: rgba(255,255,255,0.4);
}

/* Rip buttons */
.rip-btn {
    background: rgba(74,139,139,0.3);
    border: 1px solid rgba(74,139,139,0.5);
    color: #e0e0e0;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.rip-btn:hover {
    background: rgba(74,139,139,0.5);
}

.rip-btn-primary {
    background: rgba(74,139,139,0.5);
}

/* Option buttons */
.rip-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.rip-option {
    background: rgba(45,45,45,0.6);
    border: 1px solid rgba(74,139,139,0.3);
    border-radius: 20px;
    padding: 10px 18px;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.rip-option:hover {
    background: rgba(74,139,139,0.3);
    border-color: rgba(74,139,139,0.5);
}

/* Flow/Trap slider */
.rip-slider-container {
    background: rgba(35,35,35,0.8);
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
    text-align: center;
}

.rip-slider-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 0.85rem;
}

.rip-slider-flow {
    color: rgba(74,139,139,0.9);
    font-weight: 600;
}

.rip-slider-trap {
    color: rgba(200,150,100,0.9);
    font-weight: 600;
}

.rip-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, rgba(74,139,139,0.5), rgba(200,150,100,0.5));
    border-radius: 4px;
    outline: none;
}

.rip-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.rip-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.rip-slider-hint {
    margin-top: 12px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    min-height: 40px;
}

/* Check-in time options */
.rip-time-options {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.rip-time-option {
    background: rgba(45,45,45,0.6);
    border: 1px solid rgba(74,139,139,0.3);
    border-radius: 8px;
    padding: 12px 20px;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.rip-time-option:hover {
    background: rgba(74,139,139,0.3);
}

.rip-time-option.selected {
    background: rgba(74,139,139,0.4);
    border-color: rgba(74,139,139,0.6);
}

/* Session timer display */
.rip-timer {
    font-size: 2.5rem;
    font-weight: 300;
    color: rgba(74,139,139,0.9);
    text-align: center;
    margin: 20px 0;
    font-family: 'SF Mono', 'Monaco', monospace;
}

/* Triggers list (home view) */
.rip-triggers-list {
    margin: 24px 0;
}

.rip-trigger-item {
    background: rgba(45,45,45,0.5);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.rip-trigger-item .icon {
    font-size: 1.3rem;
}

.rip-trigger-item .details {
    flex: 1;
}

.rip-trigger-item .name {
    font-weight: 500;
    margin-bottom: 4px;
}

.rip-trigger-item .specific {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}

.rip-start-btn {
    background: rgba(74,139,139,0.4);
    border: none;
    color: #e0e0e0;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}

.rip-start-btn:hover {
    background: rgba(74,139,139,0.6);
}

/* Session history */
.rip-sessions-list {
    margin: 24px 0;
}

.rip-session-item {
    background: rgba(40,40,40,0.5);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.rip-session-item .trigger {
    color: rgba(255,255,255,0.7);
}

.rip-session-item .duration {
    color: rgba(74,139,139,0.8);
}

.rip-session-item .date {
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .rip-triggers-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .rip-trigger-card {
        padding: 12px;
    }
    
    .rip-trigger-card .icon {
        font-size: 1.2rem;
    }
    
    .rip-trigger-card .label {
        font-size: 0.75rem;
    }
    
    .rip-container {
        padding: 20px 16px;
    }
    
    .rip-bubble {
        max-width: 95%;
        padding: 14px 16px;
        font-size: 0.95rem;
    }
}

/* Vertical Flow/Trap Slider */
.rip-slider-container-vertical {
    background: rgba(35,35,35,0.8);
    border-radius: 16px;
    padding: 24px;
    margin: 24px auto;
    text-align: center;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rip-slider-label-top,
.rip-slider-label-bottom {
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.rip-slider-label-top {
    color: rgba(74,139,139,0.9);
    margin-bottom: 4px;
}

.rip-slider-label-bottom {
    color: rgba(200,150,100,0.9);
    margin-top: 4px;
}

.rip-slider-hint-top,
.rip-slider-hint-bottom {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    max-width: 200px;
    min-height: 32px;
}

.rip-slider-hint-top {
    margin-bottom: 12px;
}

.rip-slider-hint-bottom {
    margin-top: 12px;
}

.rip-slider-vertical-wrapper {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rip-slider-vertical {
    -webkit-appearance: slider-vertical;
    appearance: slider-vertical;
    writing-mode: vertical-lr;
    direction: rtl;
    width: 12px;
    height: 160px;
    background: linear-gradient(180deg, rgba(74,139,139,0.5) 0%, rgba(200,150,100,0.5) 100%);
    border-radius: 6px;
    outline: none;
}

.rip-slider-vertical::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    background: #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.rip-slider-vertical::-moz-range-thumb {
    width: 28px;
    height: 28px;
    background: #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Firefox specific for vertical */
@-moz-document url-prefix() {
    .rip-slider-vertical {
        width: 160px;
        height: 12px;
        transform: rotate(-90deg);
        transform-origin: center;
    }
    
    .rip-slider-vertical-wrapper {
        width: 40px;
    }
}

/* ==================== */
/* PARALYSIS MODULE */
/* ==================== */

.paralysis-types {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.paralysis-type-card {
    background: rgba(45,45,45,0.6);
    border: 1px solid rgba(74,139,139,0.2);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.paralysis-type-card:hover {
    background: rgba(55,55,55,0.8);
    border-color: rgba(74,139,139,0.4);
    transform: translateX(4px);
}

.paralysis-type-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.paralysis-type-desc {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
}

.unstick-tools {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.unstick-tool-card {
    background: rgba(45,45,45,0.6);
    border: 1px solid rgba(74,139,139,0.2);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.unstick-tool-card:hover {
    background: rgba(74,139,139,0.2);
    border-color: rgba(74,139,139,0.4);
}

.unstick-tool-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.unstick-tool-info {
    flex: 1;
}

.unstick-tool-label {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    margin-bottom: 4px;
}

.unstick-tool-desc {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}

/* Quick prompt buttons for Rip chat */
.rip-quick-prompt {
    background: rgba(45,45,45,0.6);
    border: 1px solid rgba(74,139,139,0.3);
    border-radius: 16px;
    padding: 8px 14px;
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rip-quick-prompt:hover {
    background: rgba(74,139,139,0.3);
    border-color: rgba(74,139,139,0.5);
}

/* Quick Capture Floating Button */
.quick-capture-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-teal) 0%, #5a9b9b 100%);
    border: none;
    box-shadow: 0 4px 20px rgba(74,139,139,0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.quick-capture-btn svg {
    width: 24px;
    height: 24px;
    color: white;
}

.quick-capture-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(74,139,139,0.5);
}

.quick-capture-btn:active {
    transform: scale(0.95);
}

/* Task Completion Celebration */
@keyframes taskComplete {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes confetti {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

.task-complete-animation {
    animation: taskComplete 0.5s ease;
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--accent-green);
    pointer-events: none;
    z-index: 9999;
    animation: confetti 1s ease-out forwards;
}

@media (max-width: 768px) {
    .quick-capture-btn {
        bottom: 80px;
        right: 16px;
        width: 56px;
        height: 56px;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255,255,255,0.1);
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary-teal);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Vault Category Buttons */
.vault-category-btn {
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.vault-category-btn:hover {
    background: rgba(255,255,255,0.1);
}

.vault-category-btn.active {
    background: var(--primary-teal);
    color: white;
    border-color: var(--primary-teal);
}

/* Overdue Contact Styling */
.vault-person.overdue {
    border-left: 3px solid var(--accent-rose);
}

.vault-days.overdue {
    color: var(--accent-rose);
    font-weight: 600;
}

/* Integration Buttons - Stack on Mobile */
.integration-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

@media (max-width: 480px) {
    .settings-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .integration-buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .integration-buttons .btn {
        width: 100%;
    }
}

/* Settings Toggle Row */
.settings-toggle-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 16px !important;
}

.settings-toggle-row .toggle-switch {
    flex-shrink: 0;
    margin-left: 16px;
}

/* Onboarding Styles */
.type-select-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
}

.type-select-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--primary-teal);
    transform: translateX(4px);
}

.quiz-answer-btn {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    width: 100%;
    text-align: left;
}

.quiz-answer-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--primary-teal);
    transform: scale(1.02);
}

.quiz-answer-btn:active {
    transform: scale(0.98);
}
