@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-main: hsl(220, 25%, 6%);
    --bg-glass: hsla(220, 25%, 11%, 0.65);
    --bg-glass-hover: hsla(220, 25%, 15%, 0.8);
    --border-glass: hsla(220, 20%, 20%, 0.45);
    --border-glass-light: hsla(220, 20%, 28%, 0.6);
    
    --accent-primary: hsl(205, 90%, 55%); /* Blue (Digital/Focus) */
    --accent-success: hsl(145, 70%, 45%); /* Green (Earnings/Moto) */
    --accent-warning: hsl(35, 90%, 50%);  /* Orange (Transition/CNH) */
    --accent-danger: hsl(355, 80%, 55%);  /* Red (Debts/Alerts) */
    --accent-purple: hsl(270, 75%, 60%);  /* Purple (Future Scale/Apartment) */
    
    --text-primary: hsl(210, 25%, 96%);
    --text-secondary: hsl(210, 15%, 70%);
    --text-muted: hsl(210, 10%, 45%);
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-sans);
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 10% 10%, hsla(205, 90%, 55%, 0.08) 0px, transparent 50%),
        radial-gradient(at 90% 90%, hsla(145, 70%, 45%, 0.05) 0px, transparent 50%),
        radial-gradient(at 90% 10%, hsla(270, 75%, 60%, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-glass);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

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

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--border-glass);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-success));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.brand-icon i {
    color: white;
    width: 22px;
    height: 22px;
}

.brand-name h2 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-name span {
    font-size: 0.75rem;
    color: var(--accent-success);
    font-weight: 500;
    text-transform: uppercase;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item button {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: left;
}

.nav-item button i {
    width: 20px;
    height: 20px;
    transition: var(--transition-smooth);
}

.nav-item button:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

.nav-item button:hover i {
    transform: translateX(3px);
}

.nav-item.active button {
    background: linear-gradient(135deg, hsla(205, 90%, 55%, 0.15), hsla(145, 70%, 45%, 0.05));
    color: var(--text-primary);
    border-left: 3px solid var(--accent-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.nav-item.active button i {
    color: var(--accent-primary);
}

.sidebar-footer {
    border-top: 1px solid var(--border-glass);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--border-glass-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent-primary);
}

.user-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
}

.user-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    padding: 2rem 2.5rem;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Header Section */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 1.5rem;
}

.welcome-msg h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.welcome-msg p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.quick-stats {
    display: flex;
    gap: 1.5rem;
}

.quick-stat-badge {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.quick-stat-badge.earnings {
    border-color: hsla(145, 70%, 45%, 0.3);
    color: var(--accent-success);
}

.quick-stat-badge.kids-alert {
    border-color: hsla(205, 90%, 55%, 0.3);
    color: var(--accent-primary);
}

/* Tab Panels */
.tab-panel {
    display: none;
    flex-direction: column;
    gap: 2rem;
    animation: fadeIn 0.4s ease-out;
}

.tab-panel.active {
    display: flex;
}

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

/* Glass Cards */
.glass-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: var(--border-glass-light);
    background: var(--bg-glass-hover);
}

.glass-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.glass-card-title {
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.glass-card-title i {
    color: var(--accent-primary);
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

/* Dashboard Summary Cards */
.metric-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.metric-subtext {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.metric-card.success .metric-value { color: var(--accent-success); }
.metric-card.primary .metric-value { color: var(--accent-primary); }
.metric-card.warning .metric-value { color: var(--accent-warning); }
.metric-card.danger .metric-value { color: var(--accent-danger); }
.metric-card.purple .metric-value { color: var(--accent-purple); }

/* Phase Board */
.phases-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.phase-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    background: hsla(220, 20%, 15%, 0.4);
    border: 1px solid var(--border-glass);
    position: relative;
    transition: var(--transition-smooth);
}

.phase-item.active {
    border-color: var(--accent-primary);
    background: hsla(205, 90%, 55%, 0.05);
}

.phase-item.completed {
    border-color: var(--accent-success);
    background: hsla(145, 70%, 45%, 0.03);
}

.phase-badge {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-main);
    border: 2px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.phase-item.active .phase-badge {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 0 10px hsla(205, 90%, 55%, 0.2);
}

.phase-item.completed .phase-badge {
    border-color: var(--accent-success);
    color: var(--accent-success);
    background: hsla(145, 70%, 45%, 0.1);
}

.phase-info {
    flex-grow: 1;
}

.phase-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.phase-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.phase-status-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    background: var(--border-glass);
    color: var(--text-secondary);
}

.phase-item.active .phase-status-label {
    background: hsla(205, 90%, 55%, 0.15);
    color: var(--accent-primary);
}

.phase-item.completed .phase-status-label {
    background: hsla(145, 70%, 45%, 0.15);
    color: var(--accent-success);
}

/* Forms & Inputs */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper span {
    position: absolute;
    left: 12px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.input-wrapper input, .form-group select {
    width: 100%;
    background: hsla(220, 20%, 15%, 0.5);
    border: 1px solid var(--border-glass);
    padding: 0.75rem 0.75rem 0.75rem 12px;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    outline: none;
    transition: var(--transition-smooth);
}

.input-wrapper input {
    padding-left: 38px;
}

.form-group select {
    padding-left: 12px;
}

.input-wrapper input:focus, .form-group select:focus {
    border-color: var(--accent-primary);
    background: hsla(220, 20%, 15%, 0.8);
    box-shadow: 0 0 10px hsla(205, 90%, 55%, 0.1);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), hsl(205, 95%, 45%));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-success), hsl(145, 75%, 38%));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    transition: var(--transition-smooth);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.3);
}

.btn-icon {
    background: var(--border-glass);
    border: 1px solid var(--border-glass-light);
    color: var(--text-primary);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-icon:hover {
    background: var(--bg-glass-hover);
    color: var(--accent-primary);
}

/* Debts / Goal Bars */
.goal-bar-container {
    background: var(--border-glass);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin: 0.75rem 0;
}

.goal-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.goal-bar-fill.success {
    background: linear-gradient(to right, var(--accent-success), hsl(145, 80%, 55%));
}

.goal-bar-fill.primary {
    background: linear-gradient(to right, var(--accent-primary), hsl(205, 95%, 60%));
}

.goal-bar-fill.danger {
    background: linear-gradient(to right, var(--accent-danger), hsl(355, 90%, 65%));
}

.goal-bar-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Debt items list */
.debt-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.debt-item {
    background: hsla(220, 20%, 15%, 0.3);
    border: 1px solid var(--border-glass);
    padding: 1rem;
    border-radius: var(--radius-md);
}

.debt-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    align-items: center;
}

.debt-title {
    font-size: 0.9rem;
    font-weight: 600;
}

.debt-amount {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-danger);
}

/* Routine Tab: Calendar Grid */
.week-toggle-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-glass);
    padding: 1rem 1.5rem;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
}

.toggle-switch-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toggle-label {
    font-size: 0.95rem;
    font-weight: 600;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-glass-light);
    transition: .4s;
    border-radius: 34px;
}

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

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

input:focus + .slider {
    box-shadow: 0 0 1px var(--accent-primary);
}

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

/* Schedule Layout */
.schedule-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75rem;
}

.schedule-day {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 0.85rem;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: var(--transition-smooth);
}

.schedule-day.kids-active {
    border-color: hsla(205, 90%, 55%, 0.4);
    background: linear-gradient(180deg, var(--bg-glass) 70%, hsla(205, 90%, 55%, 0.06) 100%);
}

.day-header {
    text-align: center;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.5rem;
}

.day-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.day-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.schedule-block {
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    border-left: 3px solid transparent;
}

.schedule-block-time {
    font-weight: 600;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.schedule-block.moto {
    background: hsla(145, 70%, 45%, 0.08);
    border-left-color: var(--accent-success);
    color: hsl(145, 70%, 75%);
}

.schedule-block.digital {
    background: hsla(205, 90%, 55%, 0.08);
    border-left-color: var(--accent-primary);
    color: hsl(205, 90%, 75%);
}

.schedule-block.kids {
    background: hsla(270, 75%, 60%, 0.1);
    border-left-color: var(--accent-purple);
    color: hsl(270, 75%, 80%);
}

.schedule-block.rest {
    background: hsla(220, 15%, 20%, 0.2);
    border-left-color: var(--text-muted);
    color: var(--text-secondary);
}

/* Checklist Styling */
.checklist-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.checklist-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.5rem;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checklist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: hsla(220, 20%, 15%, 0.2);
    border: 1px solid var(--border-glass);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
}

.checklist-item:hover {
    border-color: var(--border-glass-light);
    background: hsla(220, 20%, 15%, 0.4);
}

.checklist-item.completed {
    border-color: hsla(145, 70%, 45%, 0.2);
    background: hsla(145, 70%, 45%, 0.02);
}

.checklist-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.checklist-checkbox-wrapper {
    position: relative;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checklist-checkbox-wrapper input {
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: var(--bg-main);
    border: 2px solid var(--border-glass);
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.checklist-checkbox-wrapper:hover input ~ .checkmark {
    border-color: var(--accent-primary);
}

.checklist-checkbox-wrapper input:checked ~ .checkmark {
    background-color: var(--accent-success);
    border-color: var(--accent-success);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checklist-checkbox-wrapper input:checked ~ .checkmark:after {
    display: block;
}

.checklist-checkbox-wrapper .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checklist-text {
    font-size: 0.95rem;
    font-weight: 500;
}

.checklist-item.completed .checklist-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.checklist-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.checklist-price-tag {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.checklist-item.completed .checklist-price-tag {
    color: var(--accent-success);
}

/* History / Earnings Logs Table */
.earnings-table-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    margin-top: 1rem;
}

.earnings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.earnings-table th, .earnings-table td {
    padding: 0.75rem 1rem;
    text-align: left;
}

.earnings-table th {
    background: hsla(220, 20%, 15%, 0.8);
    color: var(--text-secondary);
    font-weight: 600;
    position: sticky;
    top: 0;
}

.earnings-table tr {
    border-bottom: 1px solid var(--border-glass);
}

.earnings-table tr:last-child {
    border-bottom: none;
}

.earnings-table tr:hover td {
    background: var(--bg-glass-hover);
}

.badge-source {
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-source.moto {
    background: hsla(145, 70%, 45%, 0.15);
    color: var(--accent-success);
}

.badge-source.digital {
    background: hsla(205, 90%, 55%, 0.15);
    color: var(--accent-primary);
}

/* Tab/Layout Responsiveness for Mobile Devices */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        bottom: 0;
        top: auto;
        flex-direction: row;
        padding: 0.5rem 1rem;
        border-right: none;
        border-top: 1px solid var(--border-glass);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    }
    
    .brand-section, .sidebar-footer {
        display: none; /* Hide brand & user badge on mobile tabbar */
    }
    
    .nav-links {
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
        gap: 0;
    }
    
    .nav-item button {
        padding: 0.5rem;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        font-size: 0.7rem;
    }
    
    .nav-item button i {
        width: 18px;
        height: 18px;
    }
    
    .nav-item button:hover i {
        transform: none;
    }
    
    .nav-item.active button {
        border-left: none;
        border-bottom: 3px solid var(--accent-primary);
        border-radius: 0;
        background: transparent;
        color: var(--accent-primary);
    }
    
    .main-content {
        padding: 1.5rem 1rem 5.5rem 1rem; /* Space for bottom tab bar */
        height: calc(100vh - 65px);
    }
    
    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .quick-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .schedule-grid {
        grid-template-columns: 1fr;
    }
    
    .schedule-day {
        min-height: auto;
    }
}

/* Gamification Ranks Styling */
.rank-survivor {
    border-left: 5px solid var(--accent-danger) !important;
    background: linear-gradient(135deg, var(--bg-glass), hsla(355, 80%, 55%, 0.03)) !important;
}
.rank-transition {
    border-left: 5px solid var(--accent-warning) !important;
    background: linear-gradient(135deg, var(--bg-glass), hsla(35, 90%, 50%, 0.03)) !important;
}
.rank-solid {
    border-left: 5px solid var(--accent-primary) !important;
    background: linear-gradient(135deg, var(--bg-glass), hsla(205, 90%, 55%, 0.03)) !important;
}
.rank-home {
    border-left: 5px solid var(--accent-purple) !important;
    background: linear-gradient(135deg, var(--bg-glass), hsla(270, 75%, 60%, 0.04)) !important;
    box-shadow: 0 0 15px hsla(270, 75%, 60%, 0.1), var(--shadow-premium) !important;
}
.rank-king {
    border-left: 5px solid var(--accent-success) !important;
    background: linear-gradient(135deg, var(--bg-glass), hsla(145, 70%, 45%, 0.05)) !important;
    box-shadow: 0 0 25px hsla(145, 70%, 45%, 0.15), var(--shadow-premium) !important;
}

/* Backup and Restore Utilities */
.backup-section {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-glass);
    padding-top: 1.5rem;
}
