/* =============================================================================
   REEWIRE - Simple Personal Assistant UI
   ============================================================================= */

/* CSS Variables */
:root {
    /* ========================================
       COLOR PALETTE
       ======================================== */
    
    /* Main Palette Colors */
    --mint: #A9E5C3;
    --mint-dark: #68ffa0;
    --mint-bg: rgba(169, 229, 195, 0.15);
    
    --sky: #A0C7D9;
    --sky-dark: #7eb3c9;
    --sky-bg: rgba(160, 199, 217, 0.15);
    
    --lavender: #D2A3E6;
    --lavender-dark: #c08ad6;
    --lavender-bg: rgba(210, 163, 230, 0.15);
    
    /* Semantic Colors */
    --primary: var(--sky);
    --primary-light: var(--sky-dark);
    --primary-bg: var(--sky-bg);
    
    --success: var(--mint);
    --success-bg: var(--mint-bg);
    
    --warning: #e9c46a;
    --warning-bg: rgba(233, 196, 106, 0.15);
    
    --error: #e76f51;
    --error-bg: rgba(231, 111, 81, 0.15);
    
    /* Button Colors */
    --btn-primary-bg: #0a0a0a;
    --btn-primary-text: #ffffff;
    --btn-primary-border: #333333;
    --btn-primary-hover: #1a1a1a;
    
    /* ========================================
       DARK THEME (default)
       ======================================== */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #161616;
    --bg-elevated: #1c1c1c;
    
    --text-primary: #f0f0f0;
    --text-secondary: #9a9a9a;
    --text-muted: #666666;
    
    --border: #222222;
    --border-light: #333333;
    
    --toggle-knob: #ffffff;
    --toggle-track: #333333;
    
    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    
    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Safe areas */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Light theme */
[data-theme="light"] {
    --bg-primary: #fafaf9;
    --bg-secondary: #f5f5f4;
    --bg-card: #ffffff;
    --bg-elevated: #ffffff;
    
    --text-primary: #1c1917;
    --text-secondary: #57534e;
    --text-muted: #a8a29e;
    
    --border: #e7e5e4;
    --border-light: #f5f5f4;
    
    --toggle-knob: #57534e;
    --toggle-track: #d6d3d1;
}

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

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: var(--text-base);
}

/* =============================================================================
   APP LAYOUT
   ============================================================================= */

.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-primary);
    padding-top: var(--safe-top);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    height: 56px;
}

.header-left, .header-right {
    width: 40px;
}

.header-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    color: var(--text-primary);
    transition: background 0.2s;
}

.header-back:hover {
    background: var(--bg-secondary);
}

.header-title {
    font-size: var(--text-base);
    font-weight: 600;
}

.header-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: #0a0a0a;
    font-weight: 600;
    font-size: var(--text-sm);
    overflow: hidden;
}

.header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content */
.app-content {
    flex: 1;
    padding: var(--space-4);
    padding-bottom: calc(80px + var(--safe-bottom));
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding-bottom: var(--safe-bottom);
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-3) var(--space-2);
    color: var(--text-muted);
    font-size: var(--text-xs);
    transition: color 0.2s;
}

.nav-item svg {
    width: 24px;
    height: 24px;
}

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

/* Flash Messages */
.flash-messages {
    padding: 0 var(--space-4);
}

.flash {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
    font-size: var(--text-sm);
    transition: opacity 0.3s;
}

.flash svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.flash-success {
    background: var(--success-bg);
    color: var(--success);
}

.flash-error {
    background: var(--error-bg);
    color: var(--error);
}

/* =============================================================================
   CARDS
   ============================================================================= */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-4);
}

.card-flat {
    background: var(--bg-secondary);
    border: none;
}

/* =============================================================================
   BUTTONS
   ============================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

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

.btn-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: 1px solid var(--btn-primary-border);
}

.btn-primary:hover {
    background: var(--btn-primary-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-secondary);
}

.btn-large {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
}

.btn-block {
    width: 100%;
}

/* =============================================================================
   FORMS
   ============================================================================= */

.form-group {
    margin-bottom: var(--space-5);
}

.form-group > label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
textarea,
select {
    width: 100%;
    padding: var(--space-4);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

.error-text {
    display: block;
    color: var(--error);
    font-size: var(--text-sm);
    margin-top: var(--space-2);
}

/* Toggle */
.toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    height: 30px;
}

.toggle input {
    display: none;
}

.toggle-slider {
    width: 48px;
    height: 28px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    position: relative;
    transition: background 0.2s;
    display: inline-block;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: var(--toggle-knob);
    border-radius: var(--radius-full);
    transition: transform 0.2s;
}

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

.toggle input:checked + .toggle-slider::after {
    transform: translateX(20px);
}

/* =============================================================================
   DASHBOARD
   ============================================================================= */

.greeting {
    margin-bottom: var(--space-6);
}

.greeting-time {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-1);
}

.greeting-name {
    font-size: var(--text-2xl);
    font-weight: 700;
}

.streak-card {
    background: linear-gradient(135deg, var(--mint) 0%, var(--mint-dark) 100%);
    color: var(--btn-primary-bg);
    border: none;
    text-align: center;
    padding: var(--space-6);
}

.streak-number {
    font-size: var(--text-3xl);
    font-weight: 700;
    margin-bottom: var(--space-1);
}

.streak-label {
    font-size: var(--text-sm);
    opacity: 0.9;
}

.section-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-4);
}

/* Habit Items */
.habit-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.habit-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color 0.2s;
}

.habit-item:hover {
    border-color: var(--border-light);
}

.habit-item--logged {
    border-left: 3px solid var(--success);
    background: var(--success-bg);
}

.habit-item--pending {
    border-left: 3px solid var(--border);
}

.habit-name {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-bottom: var(--space-1);
}

.habit-name-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.habit-name-link:hover,
.habit-name-link:focus {
    color: var(--text-primary);
    text-decoration: none;
    opacity: 0.85;
}

.habit-name-link:visited {
    color: var(--text-primary);
}

.habit-logged-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--success);
    padding: var(--space-1) var(--space-2);
    background: rgba(169, 229, 195, 0.2);
    border-radius: var(--radius-full);
}

.habit-logged-badge i {
    width: 14px;
    height: 14px;
}

.habit-pending-badge {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: 500;
}

.habit-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.habit-icon svg {
    width: 24px;
    height: 24px;
}

.habit-info {
    flex: 1;
    min-width: 0;
}

.habit-name {
    font-weight: 600;
    margin-bottom: var(--space-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.habit-meta {
    font-size: var(--text-sm);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.habit-streak {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    color: var(--mint);
}

.habit-action .btn {
    padding: var(--space-2) var(--space-4);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-10) var(--space-4);
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-4);
    background: var(--sky-bg);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sky);
}

.empty-icon svg {
    width: 32px;
    height: 32px;
}

.empty-title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.empty-text {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-6);
}

/* =============================================================================
   LOG FORM
   ============================================================================= */

.log-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.log-habit-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
}

.log-habit-icon svg {
    width: 32px;
    height: 32px;
}

.log-habit-name {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-1);
}

.log-date {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

/* Quick Date Picker */
.date-picker {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    padding: var(--space-1);
    margin: 0 calc(-1 * var(--space-1));
    margin-bottom: var(--space-6);
    -webkit-overflow-scrolling: touch;
}

.date-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-3);
    min-width: 56px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    flex-shrink: 0;
}

.date-btn:hover {
    background: var(--bg-elevated);
}

.date-btn.selected {
    background: var(--primary-bg);
    border-color: var(--primary);
}

.date-btn-day {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-bottom: var(--space-1);
}

.date-btn.selected .date-btn-day {
    color: var(--primary);
}

.date-btn-num {
    font-size: var(--text-lg);
    font-weight: 700;
}

.date-btn.selected .date-btn-num {
    color: var(--primary);
}

/* Log entry mode: manual vs screenshot */
.entry-mode-toggle {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.entry-mode-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3);
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    transition: all 0.2s;
}

.entry-mode-btn i {
    width: 18px;
    height: 18px;
}

.entry-mode-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.entry-mode-btn.selected {
    background: var(--primary-bg);
    border-color: var(--primary);
    color: var(--primary);
}

.screenshot-upload-block {
    padding: var(--space-4);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-6);
}

.screenshot-hint {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}

.screenshot-status {
    font-size: var(--text-sm);
    margin-top: var(--space-3);
}

.screenshot-status.success {
    color: var(--success);
}

.screenshot-status.error {
    color: var(--error);
}

/* Mood Selector */
.mood-grid {
    display: flex;
    justify-content: space-between;
    gap: var(--space-2);
}

.mood-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-3);
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.mood-btn:hover {
    background: var(--bg-elevated);
}

.mood-btn.selected {
    background: var(--sky-bg);
    border-color: var(--sky);
}

.mood-emoji {
    font-size: 1.5rem;
    margin-bottom: var(--space-1);
}

.mood-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* =============================================================================
   HABITS LIST PAGE
   ============================================================================= */

.habits-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
}

.habits-title {
    font-size: var(--text-xl);
    font-weight: 700;
}

.habit-card {
    display: block;
    padding: var(--space-5);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
    transition: border-color 0.2s;
}

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

.habit-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.habit-card-info {
    flex: 1;
}

.habit-card-name {
    font-weight: 600;
    font-size: var(--text-base);
}

.habit-card-type {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.habit-card-stats {
    display: flex;
    gap: var(--space-6);
}

.habit-stat {
    text-align: center;
}

.habit-stat-value {
    font-size: var(--text-lg);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
}

.habit-stat-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* =============================================================================
   ACHIEVEMENTS / PROGRESS
   ============================================================================= */

.progress-card {
    text-align: center;
    margin-bottom: var(--space-6);
}

.level-badge {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-4);
    background: linear-gradient(135deg, var(--lavender) 0%, var(--lavender-dark) 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--btn-primary-bg);
}

.level-title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.xp-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-2);
}

.xp-fill {
    height: 100%;
    background: var(--lavender);
    border-radius: var(--radius-full);
    transition: width 0.3s;
}

.xp-text {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
}

.badge-item {
    text-align: center;
    padding: var(--space-4);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.badge-item.locked {
    opacity: 0.4;
}

.badge-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-2);
    background: var(--lavender-bg);
    color: var(--lavender);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-icon svg {
    width: 24px;
    height: 24px;
}

.badge-item.locked .badge-icon {
    background: var(--bg-elevated);
    color: var(--text-muted);
}

.badge-name {
    font-size: var(--text-xs);
    font-weight: 500;
}

/* =============================================================================
   SETTINGS
   ============================================================================= */

.settings-group {
    margin-bottom: var(--space-6);
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--border);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-label {
    font-weight: 500;
}

.settings-desc {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* =============================================================================
   AUTH PAGES
   ============================================================================= */

.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: var(--space-6);
    padding-top: calc(var(--space-10) + var(--safe-top));
}

.auth-brand {
    text-align: center;
    margin-bottom: var(--space-8);
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-2);
}

.auth-logo svg {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.auth-tagline {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.auth-title {
    font-size: var(--text-xl);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-6);
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-6);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 500;
}

/* Landing Page */
.landing-card {
    text-align: center;
}

.landing-card h1 {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-3);
    line-height: 1.2;
}

.landing-card .subtitle {
    color: var(--text-secondary);
    font-size: var(--text-base);
    margin-bottom: var(--space-6);
    line-height: 1.5;
}

.landing-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
    text-align: left;
}

.landing-features .feature {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-base);
    color: var(--text-primary);
}

.landing-features .feature svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
    flex-shrink: 0;
}

.auth-buttons {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.auth-buttons .btn {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    font-weight: 600;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-elevated);
    border-color: var(--text-muted);
}

.auth-note {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin: 0;
}

/* Mobile optimizations for auth pages */
@media (max-width: 480px) {
    .auth-page {
        padding: var(--space-4);
        padding-top: calc(var(--space-6) + var(--safe-top));
        justify-content: center;
    }
    
    .auth-brand {
        margin-bottom: var(--space-6);
    }
    
    .auth-logo {
        font-size: var(--text-xl);
    }
    
    .auth-card {
        padding: var(--space-5);
    }
    
    .landing-card h1 {
        font-size: var(--text-xl);
    }
    
    .landing-card .subtitle {
        font-size: var(--text-sm);
    }
    
    .auth-buttons {
        flex-direction: column;
    }
    
    .auth-buttons .btn {
        width: 100%;
    }
}

/* =============================================================================
   UTILITIES
   ============================================================================= */

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.text-primary { color: var(--primary); }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }

/* Hide on mobile */
@media (max-width: 640px) {
    .hide-mobile { display: none !important; }
}

/* Onboarding */
.onboarding-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: var(--space-4);
    padding-top: calc(var(--space-4) + var(--safe-top));
}

.choice-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.choice-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-6);
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
}

.choice-card:hover {
    background: var(--bg-elevated);
}

.choice-card.selected,
.choice-card:has(input:checked) {
    background: var(--primary-bg);
    border-color: var(--primary);
}

.choice-card input {
    display: none;
}

.choice-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: grid;
    place-items: center;
    margin-bottom: var(--space-4);
}

.choice-icon.build {
    background: var(--mint-bg);
    color: var(--mint);
}

.choice-icon.break {
    background: var(--lavender-bg);
    color: var(--lavender);
}

.choice-icon i {
    display: grid;
    place-items: center;
}

.choice-icon svg {
    width: 32px !important;
    height: 32px !important;
}

.choice-title {
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.choice-description {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* Habit type grid */
.habit-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

.habit-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-4);
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
}

.habit-type-card:hover {
    background: var(--bg-elevated);
}

.habit-type-card.selected,
.habit-type-card:has(input:checked) {
    background: var(--primary-bg);
    border-color: var(--primary);
}

.habit-type-card input {
    display: none;
}

.habit-type-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: grid;
    place-items: center;
    margin-bottom: var(--space-3);
}

.habit-type-icon i {
    display: grid;
    place-items: center;
}

.habit-type-icon svg {
    width: 24px !important;
    height: 24px !important;
}

.habit-type-name {
    font-size: var(--text-sm);
    font-weight: 500;
}
