/* ===== MATERIAL DESIGN 3 - FREECOUNT WEBAPP ===== */
/* Based on Material You design language */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* MD3 Color Tokens - Light Theme - Freecount Green */
    /* Primary - Freecount Green */
    --md-sys-color-primary: #2E7D4A;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #B8F1C8;
    --md-sys-color-on-primary-container: #002110;
    
    /* Secondary */
    --md-sys-color-secondary: #5C5F5E;
    --md-sys-color-on-secondary: #FFFFFF;
    --md-sys-color-secondary-container: #E0E3E1;
    --md-sys-color-on-secondary-container: #1A1C1B;
    
    /* Tertiary */
    --md-sys-color-tertiary: #6B5778;
    --md-sys-color-on-tertiary: #FFFFFF;
    --md-sys-color-tertiary-container: #F3DAFF;
    --md-sys-color-on-tertiary-container: #251432;
    
    /* Error */
    --md-sys-color-error: #BA1A1A;
    --md-sys-color-on-error: #FFFFFF;
    --md-sys-color-error-container: #FFDAD6;
    --md-sys-color-on-error-container: #410002;
    
    /* Surface - Subtle warm tones */
    --md-sys-color-surface: #FEFCF9;
    --md-sys-color-on-surface: #1C1B1A;
    --md-sys-color-surface-variant: #EDE8E0;
    --md-sys-color-on-surface-variant: #4A4640;
    
    /* Surface containers (MD3 elevation) - Warm beige */
    --md-sys-color-surface-container-lowest: #FFFFFF;
    --md-sys-color-surface-container-low: #FAF5EF;
    --md-sys-color-surface-container: #F5EFE7;
    --md-sys-color-surface-container-high: #EFE9E0;
    --md-sys-color-surface-container-highest: #E9E3DA;
    
    /* Outline */
    --md-sys-color-outline: #787672;
    --md-sys-color-outline-variant: #CAC7C2;
    
    /* Inverse */
    --md-sys-color-inverse-surface: #2F3033;
    --md-sys-color-inverse-on-surface: #F1F0F4;
    --md-sys-color-inverse-primary: #82D995;
    
    /* Success (custom) */
    --md-sys-color-success: #146B2F;
    --md-sys-color-on-success: #FFFFFF;
    --md-sys-color-success-container: #A6F5A9;
    --md-sys-color-on-success-container: #002107;
    
    /* Warning (custom) */
    --md-sys-color-warning: #7D5700;
    --md-sys-color-on-warning: #FFFFFF;
    --md-sys-color-warning-container: #FFDEA6;
    --md-sys-color-on-warning-container: #271900;
    
    /* State layers */
    --md-sys-state-hover-opacity: 0.08;
    --md-sys-state-focus-opacity: 0.12;
    --md-sys-state-pressed-opacity: 0.12;
    --md-sys-state-dragged-opacity: 0.16;
    
    /* Shapes - MD3 uses larger radii */
    --md-sys-shape-corner-none: 0px;
    --md-sys-shape-corner-extra-small: 4px;
    --md-sys-shape-corner-small: 8px;
    --md-sys-shape-corner-medium: 12px;
    --md-sys-shape-corner-large: 16px;
    --md-sys-shape-corner-extra-large: 28px;
    --md-sys-shape-corner-full: 9999px;
    
    /* Typography - MD3 Scale */
    --md-sys-typescale-display-large: 57px;
    --md-sys-typescale-display-medium: 45px;
    --md-sys-typescale-display-small: 36px;
    --md-sys-typescale-headline-large: 32px;
    --md-sys-typescale-headline-medium: 28px;
    --md-sys-typescale-headline-small: 24px;
    --md-sys-typescale-title-large: 22px;
    --md-sys-typescale-title-medium: 16px;
    --md-sys-typescale-title-small: 14px;
    --md-sys-typescale-body-large: 16px;
    --md-sys-typescale-body-medium: 14px;
    --md-sys-typescale-body-small: 12px;
    --md-sys-typescale-label-large: 14px;
    --md-sys-typescale-label-medium: 12px;
    --md-sys-typescale-label-small: 11px;
    
    /* Legacy mappings for compatibility */
    --bg-primary: var(--md-sys-color-surface);
    --bg-secondary: var(--md-sys-color-surface-container-low);
    --bg-tertiary: var(--md-sys-color-surface-container);
    --text-primary: var(--md-sys-color-on-surface);
    --text-secondary: var(--md-sys-color-on-surface-variant);
    --text-muted: var(--md-sys-color-outline);
    --border-color: var(--md-sys-color-outline-variant);
    --accent: var(--md-sys-color-primary);
    --accent-light: var(--md-sys-color-primary-container);
    --success: var(--md-sys-color-success);
    --warning: var(--md-sys-color-warning);
    --danger: var(--md-sys-color-error);
    --danger-light: var(--md-sys-color-error-container);
    
    /* Sizes */
    --sidebar-width: 280px;
    --header-height: 64px;
    --bottom-nav-height: 80px;
    --modal-max-width: 560px;
    
    /* Elevation (MD3 uses tonal elevation, but we'll keep shadows for floating elements) */
    --md-sys-elevation-1: 0 1px 3px 1px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.3);
    --md-sys-elevation-2: 0 2px 6px 2px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.3);
    --md-sys-elevation-3: 0 4px 8px 3px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.3);
    --md-sys-elevation-4: 0 6px 10px 4px rgba(0, 0, 0, 0.15), 0 2px 3px rgba(0, 0, 0, 0.3);
    --md-sys-elevation-5: 0 8px 12px 6px rgba(0, 0, 0, 0.15), 0 4px 4px rgba(0, 0, 0, 0.3);
}

/* ===== DARK THEME ===== */
[data-theme="dark"] {
    /* Primary - Freecount Green */
    --md-sys-color-primary: #82D995;
    --md-sys-color-on-primary: #00391C;
    --md-sys-color-primary-container: #005229;
    --md-sys-color-on-primary-container: #B8F1C8;
    
    /* Secondary */
    --md-sys-color-secondary: #B7CCB9;
    --md-sys-color-on-secondary: #233426;
    --md-sys-color-secondary-container: #394B3C;
    --md-sys-color-on-secondary-container: #D3E8D4;
    
    /* Tertiary */
    --md-sys-color-tertiary: #D6BEE4;
    --md-sys-color-on-tertiary: #3B2948;
    --md-sys-color-tertiary-container: #533F60;
    --md-sys-color-on-tertiary-container: #F3DAFF;
    
    /* Error */
    --md-sys-color-error: #FFB4AB;
    --md-sys-color-on-error: #690005;
    --md-sys-color-error-container: #93000A;
    --md-sys-color-on-error-container: #FFDAD6;
    
    /* Surface - MD3 dark theme surface colors */
    --md-sys-color-surface: #121412;
    --md-sys-color-on-surface: #E1E3DE;
    --md-sys-color-surface-variant: #414941;
    --md-sys-color-on-surface-variant: #C1C9BF;
    
    /* Surface containers */
    --md-sys-color-surface-container-lowest: #0C0E0C;
    --md-sys-color-surface-container-low: #1C1F1C;
    --md-sys-color-surface-container: #232623;
    --md-sys-color-surface-container-high: #2D302D;
    --md-sys-color-surface-container-highest: #383B38;
    
    /* Outline */
    --md-sys-color-outline: #8B938A;
    --md-sys-color-outline-variant: #414941;
    
    /* Inverse */
    --md-sys-color-inverse-surface: #E1E3DE;
    --md-sys-color-inverse-on-surface: #2F312E;
    --md-sys-color-inverse-primary: #2E7D4A;
    
    /* Success */
    --md-sys-color-success: #8BD88D;
    --md-sys-color-on-success: #003912;
    --md-sys-color-success-container: #00531C;
    --md-sys-color-on-success-container: #A6F5A9;
    
    /* Warning */
    --md-sys-color-warning: #F8BD4F;
    --md-sys-color-on-warning: #422D00;
    --md-sys-color-warning-container: #5F4200;
    --md-sys-color-on-warning-container: #FFDEA6;
}

/* Dark auth overrides */
[data-theme="dark"] #auth-screen {
    background: linear-gradient(160deg, #0F1A12 0%, #121412 40%, #171914 100%);
}

[data-theme="dark"] .auth-card {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .auth-card:focus-within {
    box-shadow: 0 4px 24px rgba(130, 217, 149, 0.08), 0 0 0 1px rgba(130, 217, 149, 0.1);
}

[data-theme="dark"] .auth-logo img {
    filter: drop-shadow(0 4px 12px rgba(130, 217, 149, 0.12));
}

[data-theme="dark"] .auth-form .btn-primary {
    box-shadow: 0 2px 8px rgba(130, 217, 149, 0.15);
}

[data-theme="dark"] .auth-form .btn-primary:hover {
    box-shadow: 0 4px 16px rgba(130, 217, 149, 0.25);
}

[data-theme="dark"] .auth-form .form-group input:focus {
    box-shadow: 0 0 0 3px rgba(130, 217, 149, 0.1);
}

/* ===== GROUP THEMES (per-trip) ===== */
/* Group themes change accent AND surface colors for full visual impact */

/* Rose theme - Light */
[data-group-theme="rose"] #trip-screen {
    --md-sys-color-primary: #B4637A;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #FFD9E0;
    --md-sys-color-on-primary-container: #3E0018;
    --md-sys-color-secondary-container: #FFD9E0;
    --md-sys-color-on-secondary-container: #2B1519;
    --md-sys-color-outline: #847376;
    --md-sys-color-surface: #FFF8F8;
    --md-sys-color-surface-container-lowest: #FFFFFF;
    --md-sys-color-surface-container-low: #FFF4F5;
    --md-sys-color-surface-container: #FFEFF1;
    --md-sys-color-surface-container-high: #FFE8EC;
    --md-sys-color-surface-container-highest: #FFE0E6;
    --md-sys-color-on-surface: #1C1B1B;
    --md-sys-color-on-surface-variant: #534346;
    --md-sys-color-outline-variant: #E0D0D3;
}
/* Rose theme - Dark */
[data-theme="dark"][data-group-theme="rose"] #trip-screen {
    --md-sys-color-primary: #FFB1C0;
    --md-sys-color-on-primary: #66002E;
    --md-sys-color-primary-container: #8C1D47;
    --md-sys-color-on-primary-container: #FFD9E0;
    --md-sys-color-secondary-container: #5D3F44;
    --md-sys-color-on-secondary-container: #FFD9E0;
    --md-sys-color-outline: #9F8C8F;
    --md-sys-color-surface: #1A1113;
    --md-sys-color-surface-container-lowest: #0F0A0B;
    --md-sys-color-surface-container-low: #231A1C;
    --md-sys-color-surface-container: #271E20;
    --md-sys-color-surface-container-high: #32282A;
    --md-sys-color-surface-container-highest: #3D3335;
    --md-sys-color-on-surface: #F0DDDF;
    --md-sys-color-on-surface-variant: #D6C2C5;
    --md-sys-color-outline-variant: #524345;
}

/* Blue theme - Light */
[data-group-theme="blue"] #trip-screen {
    --md-sys-color-primary: #1A73E8;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #D3E4FF;
    --md-sys-color-on-primary-container: #001C3A;
    --md-sys-color-secondary-container: #D3E4FF;
    --md-sys-color-on-secondary-container: #151C28;
    --md-sys-color-outline: #74777F;
    --md-sys-color-surface: #F8FAFF;
    --md-sys-color-surface-container-lowest: #FFFFFF;
    --md-sys-color-surface-container-low: #F2F6FF;
    --md-sys-color-surface-container: #ECF2FF;
    --md-sys-color-surface-container-high: #E4ECFF;
    --md-sys-color-surface-container-highest: #DCE6FF;
    --md-sys-color-on-surface: #1A1C1E;
    --md-sys-color-on-surface-variant: #44474E;
    --md-sys-color-outline-variant: #C4C7D0;
}
/* Blue theme - Dark */
[data-theme="dark"][data-group-theme="blue"] #trip-screen {
    --md-sys-color-primary: #8AB4F8;
    --md-sys-color-on-primary: #003060;
    --md-sys-color-primary-container: #004787;
    --md-sys-color-on-primary-container: #D3E4FF;
    --md-sys-color-secondary-container: #3B4858;
    --md-sys-color-on-secondary-container: #D3E4FF;
    --md-sys-color-outline: #8E9099;
    --md-sys-color-surface: #111318;
    --md-sys-color-surface-container-lowest: #0A0C10;
    --md-sys-color-surface-container-low: #191C22;
    --md-sys-color-surface-container: #1D2026;
    --md-sys-color-surface-container-high: #272A31;
    --md-sys-color-surface-container-highest: #32353C;
    --md-sys-color-on-surface: #E2E2E6;
    --md-sys-color-on-surface-variant: #C4C6D0;
    --md-sys-color-outline-variant: #44474F;
}

/* Purple theme - Light */
[data-group-theme="purple"] #trip-screen {
    --md-sys-color-primary: #7C4DFF;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #E8DEFF;
    --md-sys-color-on-primary-container: #21005D;
    --md-sys-color-secondary-container: #E8DEFF;
    --md-sys-color-on-secondary-container: #1D1927;
    --md-sys-color-outline: #7A757F;
    --md-sys-color-surface: #FBF8FF;
    --md-sys-color-surface-container-lowest: #FFFFFF;
    --md-sys-color-surface-container-low: #F8F2FF;
    --md-sys-color-surface-container: #F2ECFF;
    --md-sys-color-surface-container-high: #EBE4FF;
    --md-sys-color-surface-container-highest: #E4DCFF;
    --md-sys-color-on-surface: #1C1B1E;
    --md-sys-color-on-surface-variant: #48454E;
    --md-sys-color-outline-variant: #CBC4D4;
}
/* Purple theme - Dark */
[data-theme="dark"][data-group-theme="purple"] #trip-screen {
    --md-sys-color-primary: #B794F6;
    --md-sys-color-on-primary: #380088;
    --md-sys-color-primary-container: #5200B8;
    --md-sys-color-on-primary-container: #E8DEFF;
    --md-sys-color-secondary-container: #4A4458;
    --md-sys-color-on-secondary-container: #E8DEFF;
    --md-sys-color-outline: #948F99;
    --md-sys-color-surface: #15121A;
    --md-sys-color-surface-container-lowest: #0D0A12;
    --md-sys-color-surface-container-low: #1D1A24;
    --md-sys-color-surface-container: #211E28;
    --md-sys-color-surface-container-high: #2C2833;
    --md-sys-color-surface-container-highest: #37333E;
    --md-sys-color-on-surface: #E6E1E9;
    --md-sys-color-on-surface-variant: #CAC4D0;
    --md-sys-color-outline-variant: #49454E;
}

/* Orange theme - Light */
[data-group-theme="orange"] #trip-screen {
    --md-sys-color-primary: #E65100;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #FFDBC9;
    --md-sys-color-on-primary-container: #351000;
    --md-sys-color-secondary-container: #FFDBC9;
    --md-sys-color-on-secondary-container: #2B1A11;
    --md-sys-color-outline: #85736A;
    --md-sys-color-surface: #FFFBF8;
    --md-sys-color-surface-container-lowest: #FFFFFF;
    --md-sys-color-surface-container-low: #FFF6F0;
    --md-sys-color-surface-container: #FFF0E8;
    --md-sys-color-surface-container-high: #FFE8DB;
    --md-sys-color-surface-container-highest: #FFE0CE;
    --md-sys-color-on-surface: #1F1B18;
    --md-sys-color-on-surface-variant: #52443C;
    --md-sys-color-outline-variant: #D8C4BA;
}
/* Orange theme - Dark */
[data-theme="dark"][data-group-theme="orange"] #trip-screen {
    --md-sys-color-primary: #FFB074;
    --md-sys-color-on-primary: #542100;
    --md-sys-color-primary-container: #793200;
    --md-sys-color-on-primary-container: #FFDBC9;
    --md-sys-color-secondary-container: #5C4433;
    --md-sys-color-on-secondary-container: #FFDBC9;
    --md-sys-color-outline: #A08D84;
    --md-sys-color-surface: #1A1310;
    --md-sys-color-surface-container-lowest: #110C09;
    --md-sys-color-surface-container-low: #231B16;
    --md-sys-color-surface-container: #271F1A;
    --md-sys-color-surface-container-high: #322924;
    --md-sys-color-surface-container-highest: #3D342E;
    --md-sys-color-on-surface: #F0DDD5;
    --md-sys-color-on-surface-variant: #D5C4BA;
    --md-sys-color-outline-variant: #534439;
}

/* Teal theme - Light */
[data-group-theme="teal"] #trip-screen {
    --md-sys-color-primary: #00897B;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #A0F2E5;
    --md-sys-color-on-primary-container: #002019;
    --md-sys-color-secondary-container: #CCE8E3;
    --md-sys-color-on-secondary-container: #0E1F1C;
    --md-sys-color-outline: #6F7977;
    --md-sys-color-surface: #F5FFFE;
    --md-sys-color-surface-container-lowest: #FFFFFF;
    --md-sys-color-surface-container-low: #EEFAF8;
    --md-sys-color-surface-container: #E6F6F4;
    --md-sys-color-surface-container-high: #DEF2EF;
    --md-sys-color-surface-container-highest: #D6EEEA;
    --md-sys-color-on-surface: #161D1C;
    --md-sys-color-on-surface-variant: #3F4947;
    --md-sys-color-outline-variant: #BEC9C6;
}
/* Teal theme - Dark */
[data-theme="dark"][data-group-theme="teal"] #trip-screen {
    --md-sys-color-primary: #4DB6AC;
    --md-sys-color-on-primary: #00382F;
    --md-sys-color-primary-container: #005045;
    --md-sys-color-on-primary-container: #A0F2E5;
    --md-sys-color-secondary-container: #334B47;
    --md-sys-color-on-secondary-container: #CCE8E3;
    --md-sys-color-outline: #899390;
    --md-sys-color-surface: #0F1514;
    --md-sys-color-surface-container-lowest: #080D0C;
    --md-sys-color-surface-container-low: #171D1C;
    --md-sys-color-surface-container: #1B2120;
    --md-sys-color-surface-container-high: #252B2A;
    --md-sys-color-surface-container-highest: #303635;
    --md-sys-color-on-surface: #DEE4E2;
    --md-sys-color-on-surface-variant: #BFC9C6;
    --md-sys-color-outline-variant: #3F4946;
}

/* Pink theme - Light */
[data-group-theme="pink"] #trip-screen {
    --md-sys-color-primary: #E91E63;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #FFD9E4;
    --md-sys-color-on-primary-container: #3E001D;
    --md-sys-color-secondary-container: #FFD9E4;
    --md-sys-color-on-secondary-container: #2B151C;
    --md-sys-color-outline: #837378;
    --md-sys-color-surface: #FFF8FA;
    --md-sys-color-surface-container-lowest: #FFFFFF;
    --md-sys-color-surface-container-low: #FFF2F6;
    --md-sys-color-surface-container: #FFECF2;
    --md-sys-color-surface-container-high: #FFE4EC;
    --md-sys-color-surface-container-highest: #FFDCE6;
    --md-sys-color-on-surface: #1E1A1B;
    --md-sys-color-on-surface-variant: #514347;
    --md-sys-color-outline-variant: #DEC8CE;
}
/* Pink theme - Dark */
[data-theme="dark"][data-group-theme="pink"] #trip-screen {
    --md-sys-color-primary: #FF80AB;
    --md-sys-color-on-primary: #650033;
    --md-sys-color-primary-container: #8C0E49;
    --md-sys-color-on-primary-container: #FFD9E4;
    --md-sys-color-secondary-container: #5C3F47;
    --md-sys-color-on-secondary-container: #FFD9E4;
    --md-sys-color-outline: #9E8C91;
    --md-sys-color-surface: #1A1012;
    --md-sys-color-surface-container-lowest: #110A0C;
    --md-sys-color-surface-container-low: #23181B;
    --md-sys-color-surface-container: #271C1F;
    --md-sys-color-surface-container-high: #322629;
    --md-sys-color-surface-container-highest: #3D3134;
    --md-sys-color-on-surface: #F0DCE0;
    --md-sys-color-on-surface-variant: #D6C2C8;
    --md-sys-color-outline-variant: #524347;
}

/* Indigo theme - Light */
[data-group-theme="indigo"] #trip-screen {
    --md-sys-color-primary: #3F51B5;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #DEE0FF;
    --md-sys-color-on-primary-container: #00105C;
    --md-sys-color-secondary-container: #DEE0FF;
    --md-sys-color-on-secondary-container: #1A1C2E;
    --md-sys-color-outline: #777680;
    --md-sys-color-surface: #FAF8FF;
    --md-sys-color-surface-container-lowest: #FFFFFF;
    --md-sys-color-surface-container-low: #F4F2FC;
    --md-sys-color-surface-container: #EEEDF8;
    --md-sys-color-surface-container-high: #E8E6F2;
    --md-sys-color-surface-container-highest: #E2E0EC;
    --md-sys-color-on-surface: #1B1B1E;
    --md-sys-color-on-surface-variant: #46464F;
    --md-sys-color-outline-variant: #C7C5D0;
}
/* Indigo theme - Dark */
[data-theme="dark"][data-group-theme="indigo"] #trip-screen {
    --md-sys-color-primary: #9FA8DA;
    --md-sys-color-on-primary: #08197A;
    --md-sys-color-primary-container: #263092;
    --md-sys-color-on-primary-container: #DEE0FF;
    --md-sys-color-secondary-container: #454559;
    --md-sys-color-on-secondary-container: #DEE0FF;
    --md-sys-color-outline: #91909A;
    --md-sys-color-surface: #131318;
    --md-sys-color-surface-container-lowest: #0B0B10;
    --md-sys-color-surface-container-low: #1B1B22;
    --md-sys-color-surface-container: #1F1F26;
    --md-sys-color-surface-container-high: #292930;
    --md-sys-color-surface-container-highest: #34343B;
    --md-sys-color-on-surface: #E4E1E9;
    --md-sys-color-on-surface-variant: #C7C5D0;
    --md-sys-color-outline-variant: #46464F;
}

/* Amber theme - Light */
[data-group-theme="amber"] #trip-screen {
    --md-sys-color-primary: #FF8F00;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #FFDEA6;
    --md-sys-color-on-primary-container: #2A1800;
    --md-sys-color-secondary-container: #FFDEA6;
    --md-sys-color-on-secondary-container: #261A00;
    --md-sys-color-outline: #817567;
    --md-sys-color-surface: #FFFBF5;
    --md-sys-color-surface-container-lowest: #FFFFFF;
    --md-sys-color-surface-container-low: #FFF8ED;
    --md-sys-color-surface-container: #FFF4E3;
    --md-sys-color-surface-container-high: #FFEED6;
    --md-sys-color-surface-container-highest: #FFE8C9;
    --md-sys-color-on-surface: #1E1B16;
    --md-sys-color-on-surface-variant: #4E4639;
    --md-sys-color-outline-variant: #D2C5B4;
}
/* Amber theme - Dark */
[data-theme="dark"][data-group-theme="amber"] #trip-screen {
    --md-sys-color-primary: #FFD54F;
    --md-sys-color-on-primary: #412D00;
    --md-sys-color-primary-container: #5D4200;
    --md-sys-color-on-primary-container: #FFDEA6;
    --md-sys-color-secondary-container: #564419;
    --md-sys-color-on-secondary-container: #FFDEA6;
    --md-sys-color-outline: #9B8F80;
    --md-sys-color-surface: #17140E;
    --md-sys-color-surface-container-lowest: #0F0D08;
    --md-sys-color-surface-container-low: #201C15;
    --md-sys-color-surface-container: #242019;
    --md-sys-color-surface-container-high: #2E2A22;
    --md-sys-color-surface-container-highest: #39352D;
    --md-sys-color-on-surface: #ECE1D4;
    --md-sys-color-on-surface-variant: #D0C5B8;
    --md-sys-color-outline-variant: #4E4639;
}

/* Cyan theme - Light */
[data-group-theme="cyan"] #trip-screen {
    --md-sys-color-primary: #00ACC1;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #A2EFFF;
    --md-sys-color-on-primary-container: #001F26;
    --md-sys-color-secondary-container: #CCE8ED;
    --md-sys-color-on-secondary-container: #0E1F22;
    --md-sys-color-outline: #6F797B;
    --md-sys-color-surface: #F5FDFF;
    --md-sys-color-surface-container-lowest: #FFFFFF;
    --md-sys-color-surface-container-low: #EEF9FC;
    --md-sys-color-surface-container: #E6F5F8;
    --md-sys-color-surface-container-high: #DEF1F4;
    --md-sys-color-surface-container-highest: #D6ECEF;
    --md-sys-color-on-surface: #161D1E;
    --md-sys-color-on-surface-variant: #3F484A;
    --md-sys-color-outline-variant: #BFC8CB;
}
/* Cyan theme - Dark */
[data-theme="dark"][data-group-theme="cyan"] #trip-screen {
    --md-sys-color-primary: #4DD0E1;
    --md-sys-color-on-primary: #00363E;
    --md-sys-color-primary-container: #004F59;
    --md-sys-color-on-primary-container: #A2EFFF;
    --md-sys-color-secondary-container: #334B4F;
    --md-sys-color-on-secondary-container: #CCE8ED;
    --md-sys-color-outline: #899294;
    --md-sys-color-surface: #0E1415;
    --md-sys-color-surface-container-lowest: #070C0D;
    --md-sys-color-surface-container-low: #161C1E;
    --md-sys-color-surface-container: #1A2022;
    --md-sys-color-surface-container-high: #242A2C;
    --md-sys-color-surface-container-highest: #2F3537;
    --md-sys-color-on-surface: #DEE3E5;
    --md-sys-color-on-surface-variant: #BFC8CB;
    --md-sys-color-outline-variant: #3F484A;
}

/* ===== BASE STYLES ===== */
html, body {
    height: 100%;
    font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--md-sys-color-on-surface);
    background: var(--md-sys-color-surface);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app {
    height: 100%;
    width: 100%;
}

/* ===== UTILITIES ===== */
.hidden { display: none !important; }
.secondary { color: var(--md-sys-color-on-surface-variant); }
.muted { color: var(--md-sys-color-outline); }

/* ===== MATERIAL SYMBOLS ===== */
.material-symbols-rounded {
    font-family: 'Material Symbols Rounded', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Twemoji styling */
img.emoji {
    height: 1em;
    width: 1em;
    margin: 0 .05em 0 .1em;
    vertical-align: -0.1em;
}

.trip-icon img.emoji,
.trip-emoji img.emoji,
.spending-icon img.emoji {
    height: 1.5em;
    width: 1.5em;
}

/* Material Symbols in icon containers */
.empty-icon .material-symbols-rounded {
    font-size: inherit;
}

.stat-icon .material-symbols-rounded {
    font-size: inherit;
}

.spending-icon .material-symbols-rounded {
    font-size: inherit;
}

.type-icon .material-symbols-rounded,
.payment-type-icon .material-symbols-rounded {
    font-size: inherit;
}

.participant-actions .material-symbols-rounded {
    font-size: inherit;
}

.payment-actions .material-symbols-rounded {
    font-size: inherit;
}

.setting-btn .material-symbols-rounded {
    font-size: 24px;
}

h3 > .material-symbols-rounded {
    font-size: 20px;
    vertical-align: -3px;
    margin-right: 4px;
}

.item-remove .material-symbols-rounded {
    font-size: 18px;
}

.remove-tag .material-symbols-rounded {
    font-size: 14px;
    vertical-align: -2px;
}

/* ===== MD3 BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 10px 24px;
    font-size: var(--md-sys-typescale-label-large);
    font-weight: 500;
    letter-spacing: 0.1px;
    border: none;
    border-radius: var(--md-sys-shape-corner-full);
    cursor: pointer;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    font-family: inherit;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity 200ms;
}

.btn:hover::before {
    opacity: var(--md-sys-state-hover-opacity);
}

.btn:active::before {
    opacity: var(--md-sys-state-pressed-opacity);
}

.btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.btn:disabled::before {
    opacity: 0;
}

/* Filled Button (Primary) */
.btn-primary {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.btn-primary:hover {
    box-shadow: var(--md-sys-elevation-1);
}

/* Tonal Button (Secondary) */
.btn-secondary {
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

/* Outlined Button */
.btn-outline {
    background: transparent;
    color: var(--md-sys-color-primary);
    border: 1.5px solid var(--md-sys-color-primary);
}

.btn-outline:hover {
    background: rgba(46, 125, 74, 0.08);
}

/* Error Button */
.btn-danger {
    background: var(--md-sys-color-error);
    color: var(--md-sys-color-on-error);
}

.btn-danger-outline {
    background: transparent;
    color: var(--md-sys-color-error);
    border: 1px solid var(--md-sys-color-outline);
}

.btn-danger-outline:hover {
    background: rgba(186, 26, 26, 0.08);
}

.btn-block {
    width: 100%;
}

.btn-small {
    min-height: 32px;
    padding: 6px 16px;
    font-size: var(--md-sys-typescale-label-medium);
}

/* Icon Button */
.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    border-radius: var(--md-sys-shape-corner-full);
    font-size: 24px;
    cursor: pointer;
    transition: background 200ms;
    color: var(--md-sys-color-on-surface-variant);
    position: relative;
}

.icon-btn .material-symbols-rounded {
    font-size: 24px;
}

.icon-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--md-sys-color-on-surface);
    opacity: 0;
    transition: opacity 200ms;
}

.icon-btn:hover::before {
    opacity: var(--md-sys-state-hover-opacity);
}

.icon-btn.small {
    width: 40px;
    height: 40px;
    font-size: 18px;
}

.link-btn {
    background: none;
    border: none;
    color: var(--md-sys-color-primary);
    font-size: var(--md-sys-typescale-label-large);
    font-weight: 500;
    cursor: pointer;
    padding: 8px;
}

.link-btn:hover {
    text-decoration: underline;
}

/* ===== MD3 FORMS ===== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: var(--md-sys-typescale-body-small);
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    letter-spacing: 0.2px;
}

/* MD3 Outlined Text Field */
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: var(--md-sys-typescale-body-large);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-medium);
    background: var(--md-sys-color-surface-container-lowest);
    color: var(--md-sys-color-on-surface);
    transition: border-color 200ms;
    caret-color: var(--md-sys-color-primary);
    box-sizing: border-box;
    font-family: inherit;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--md-sys-color-outline);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    border-width: 2px;
    padding: 13px 15px;
}

.form-group input::placeholder {
    color: var(--md-sys-color-outline);
}

/* Custom select arrow */
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23787672' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 20px;
    padding-right: 44px;
    cursor: pointer;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.flex-1 { flex: 1; }

.password-input {
    position: relative;
}

.password-input input {
    padding-right: 56px;
}

.password-input .toggle-password {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 12px;
    color: var(--md-sys-color-on-surface-variant);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: var(--md-sys-typescale-body-medium);
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--md-sys-color-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-label a {
    color: var(--md-sys-color-primary);
}

.form-hint {
    font-size: var(--md-sys-typescale-body-small);
    color: var(--md-sys-color-on-surface-variant);
    text-align: center;
    margin-top: 16px;
}

/* ===== MD3 SEARCH ===== */
.search-bar {
    padding: 8px 16px 12px;
    background: var(--md-sys-color-surface);
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--md-sys-color-surface-container-high);
    border-radius: var(--md-sys-shape-corner-full);
    padding: 0 12px;
}

.search-input-wrap > .material-symbols-rounded {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 20px;
    flex-shrink: 0;
}

.search-input-wrap input {
    flex: 1;
    padding: 12px;
    font-size: var(--md-sys-typescale-body-large);
    border: none;
    background: transparent;
    color: var(--md-sys-color-on-surface);
}

.search-input-wrap input:focus {
    outline: none;
}

.search-input-wrap .icon-btn {
    flex-shrink: 0;
}

.search-input-wrap .icon-btn .material-symbols-rounded {
    font-size: 18px;
}

/* MD3 Filter Chips */
.filter-chips {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 16px;
    font-size: var(--md-sys-typescale-label-large);
    font-weight: 500;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-small);
    background: transparent;
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    transition: all 200ms;
}

.chip:hover {
    background: rgba(0, 0, 0, 0.08);
}

.chip.active {
    background: var(--md-sys-color-secondary-container);
    border-color: transparent;
    color: var(--md-sys-color-on-secondary-container);
}

/* ===== AUTH SCREEN ===== */
#auth-screen {
    width: 100%;
    justify-content: center;
    align-items: center;
    background: linear-gradient(160deg, #F0F9F3 0%, #FEFCF9 40%, #FDF8F0 100%);
    min-height: 100vh;
    min-height: 100dvh;
}

.auth-container {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}

.auth-logo {
    text-align: center;
    margin-bottom: 48px;
}

.auth-logo img {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    filter: drop-shadow(0 4px 12px rgba(46, 125, 74, 0.15));
    transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-logo img:hover {
    transform: scale(1.08) rotate(-3deg);
}

.auth-logo h1 {
    font-size: 30px;
    font-weight: 600;
    margin-top: 16px;
    color: var(--md-sys-color-on-surface);
    letter-spacing: -0.5px;
}

.auth-logo p {
    color: var(--md-sys-color-on-surface-variant);
    font-size: var(--md-sys-typescale-body-medium);
    margin-top: 6px;
    font-style: italic;
    opacity: 0.8;
}

/* MD3 Card for auth */
.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--md-sys-color-surface-container-lowest);
    border-radius: var(--md-sys-shape-corner-extra-large);
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
    transition: box-shadow 300ms ease;
}

.auth-card:focus-within {
    box-shadow: 0 4px 24px rgba(46, 125, 74, 0.1), 0 0 0 1px rgba(46, 125, 74, 0.08);
}

/* MD3 Tabs */
.auth-tabs {
    display: flex;
    background: transparent;
    padding: 4px;
    gap: 2px;
}

.auth-tab {
    flex: 1;
    padding: 14px 12px;
    font-size: var(--md-sys-typescale-label-large);
    font-weight: 500;
    border: none;
    background: none;
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: var(--md-sys-shape-corner-small) var(--md-sys-shape-corner-small) 0 0;
    letter-spacing: 0.3px;
}

.auth-tab:hover {
    color: var(--md-sys-color-on-surface);
    background: var(--md-sys-color-surface-container);
}

.auth-tab.active {
    color: var(--md-sys-color-primary);
    font-weight: 600;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background: var(--md-sys-color-primary);
    border-radius: 3px 3px 0 0;
    animation: tabIndicator 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes tabIndicator {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.auth-form {
    display: none;
    padding: 28px 28px 32px;
}

.auth-form.active {
    display: block;
    animation: authFormIn 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes authFormIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Auth-specific form styling */
.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form .form-group input {
    border-radius: var(--md-sys-shape-corner-medium);
    background: var(--md-sys-color-surface-container-low);
    border-color: var(--md-sys-color-outline-variant);
}

.auth-form .form-group input:focus {
    background: var(--md-sys-color-surface-container-lowest);
    box-shadow: 0 0 0 3px rgba(46, 125, 74, 0.08);
}

.auth-form .btn-primary {
    border-radius: var(--md-sys-shape-corner-full);
    padding: 16px 24px;
    font-size: var(--md-sys-typescale-title-small);
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 8px;
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(46, 125, 74, 0.2);
}

.auth-form .btn-primary:hover {
    box-shadow: 0 4px 16px rgba(46, 125, 74, 0.3);
    transform: translateY(-1px);
}

.auth-form .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(46, 125, 74, 0.2);
}

.auth-form .link-btn {
    display: block;
    text-align: center;
    width: 100%;
    margin-top: 16px;
    font-size: var(--md-sys-typescale-body-small);
    opacity: 0.7;
    transition: opacity 200ms;
}

.auth-form .link-btn:hover {
    opacity: 1;
}

/* Social Login */
.social-login-section {
    padding: 0 28px 28px;
}

.social-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.social-divider::before,
.social-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--md-sys-color-outline-variant);
}

.social-divider span {
    font-size: var(--md-sys-typescale-body-small);
    color: var(--md-sys-color-on-surface-variant);
    text-transform: lowercase;
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    border-radius: var(--md-sys-shape-corner-full);
    font-size: var(--md-sys-typescale-body-large);
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 200ms;
    border: 1.5px solid var(--md-sys-color-outline-variant);
    background: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
}

.social-btn:hover {
    background: var(--md-sys-color-surface-container);
    border-color: var(--md-sys-color-outline);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.social-btn:active {
    transform: scale(0.98);
}

.social-btn svg {
    flex-shrink: 0;
}

.apple-btn {
    background: #000;
    color: #fff;
    border-color: #000;
}

.apple-btn:hover {
    background: #1a1a1a;
    border-color: #333;
}

[data-theme="dark"] .apple-btn {
    background: #fff;
    color: #000;
    border-color: #fff;
}

[data-theme="dark"] .apple-btn:hover {
    background: #e8e8e8;
    border-color: #e8e8e8;
}

[data-theme="dark"] .apple-btn svg {
    fill: #000;
}

/* ===== SCREENS ===== */
.screen {
    display: none;
    height: 100%;
}

.screen.active {
    display: flex;
}

/* ===== MAIN SCREEN LAYOUT ===== */
#main-screen {
    flex-direction: row;
}

/* MD3 Navigation Rail / Drawer */
.sidebar {
    display: none;
    flex-direction: column;
    width: var(--sidebar-width);
    background: var(--md-sys-color-surface-container-low);
    height: 100%;
    border-right: none;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--md-sys-shape-corner-medium);
}

.sidebar-title {
    font-size: var(--md-sys-typescale-title-large);
    font-weight: 400;
    color: var(--md-sys-color-on-surface);
}

.sidebar-nav {
    flex: 1;
    padding: 12px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px;
    border: none;
    background: none;
    border-radius: var(--md-sys-shape-corner-full);
    font-size: var(--md-sys-typescale-label-large);
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    transition: all 200ms;
    position: relative;
}

.sidebar-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--md-sys-color-on-surface);
    opacity: 0;
    transition: opacity 200ms;
}

.sidebar-item:hover::before {
    opacity: var(--md-sys-state-hover-opacity);
}

.sidebar-item.active {
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.sidebar-item .icon,
.sidebar-item .material-symbols-rounded {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.sidebar-footer {
    padding: 12px;
}

.sidebar-item.danger {
    color: var(--md-sys-color-error);
}

.sidebar-item.danger:hover::before {
    background: var(--md-sys-color-error);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    padding-bottom: var(--bottom-nav-height);
}

/* Views */
.view {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.view.active {
    display: flex;
}

/* MD3 Top App Bar */
.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 16px 16px;
    background: var(--md-sys-color-surface);
    min-height: 64px;
}

.view-header h1 {
    font-size: var(--md-sys-typescale-title-large);
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
}

.header-actions {
    display: flex;
    gap: 4px;
}

/* MD3 Navigation Bar (Bottom) - Android style */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: var(--md-sys-color-surface-container);
    padding: 8px 16px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 100;
    border-top: 1px solid var(--md-sys-color-outline-variant);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border: none;
    background: none;
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    transition: all 200ms;
    border-radius: var(--md-sys-shape-corner-large);
    position: relative;
    min-width: 64px;
}

.nav-item .nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 32px;
    border-radius: var(--md-sys-shape-corner-full);
    transition: background 200ms, transform 200ms;
}

.nav-item .nav-icon .material-symbols-rounded {
    font-size: 24px;
}

.nav-item:hover .nav-icon {
    background: var(--md-sys-color-surface-container-high);
}

.nav-item:active .nav-icon {
    transform: scale(0.92);
}

.nav-item.active {
    color: var(--md-sys-color-on-surface);
}

.nav-item.active .nav-icon {
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.nav-label {
    font-size: var(--md-sys-typescale-label-small);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ===== TRIPS VIEW ===== */
.sort-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--md-sys-color-surface);
}

.sort-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: var(--md-sys-typescale-label-large);
    font-weight: 500;
    border: none;
    border-radius: var(--md-sys-shape-corner-small);
    background: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-on-surface);
    cursor: pointer;
    transition: background 200ms;
}

.sort-btn:hover {
    background: var(--md-sys-color-surface-container-highest);
}

.sort-btn .arrow {
    font-size: 10px;
    opacity: 0.7;
}

.trip-count {
    font-size: var(--md-sys-typescale-label-medium);
    color: var(--md-sys-color-outline);
    margin-left: auto;
}

.trip-actions {
    display: flex;
    gap: 12px;
    padding: 8px 16px 16px;
    position: relative;
    z-index: 1;
}

.trip-actions .btn {
    flex: 1;
    height: 44px;
    font-size: var(--md-sys-typescale-label-large);
}

.trip-actions .btn .material-symbols-rounded {
    font-size: 18px;
}

.trips-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 16px;
}

/* MD3 Card for trips - Android style */
.trip-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    background: var(--md-sys-color-surface-container-low);
    border-radius: var(--md-sys-shape-corner-large);
    border: 1px solid var(--md-sys-color-outline-variant);
    cursor: pointer;
    transition: all 200ms;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    overflow: visible;
}

.trip-card:hover {
    background: var(--md-sys-color-surface-container);
    box-shadow: var(--md-sys-elevation-1);
}

.trip-card:active {
    transform: scale(0.98);
}

/* Top row: icon + name + balance */
.trip-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.trip-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.trip-info {
    flex: 1;
    min-width: 0;
}

.trip-name {
    font-size: var(--md-sys-typescale-title-medium);
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trip-code {
    font-size: var(--md-sys-typescale-body-small);
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 2px;
}

.trip-balance-section {
    text-align: right;
    flex-shrink: 0;
}

.trip-balance {
    font-size: var(--md-sys-typescale-title-medium);
    font-weight: 600;
    white-space: nowrap;
}

.trip-balance.positive { color: var(--md-sys-color-success); }
.trip-balance.negative { color: var(--md-sys-color-error); }

.trip-balance-label {
    font-size: var(--md-sys-typescale-body-small);
    color: var(--md-sys-color-on-surface-variant);
}

/* Bottom row: stats */
.trip-card-footer {
    display: flex;
    align-items: center;
    gap: 16px;
}

.trip-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--md-sys-typescale-body-small);
    color: var(--md-sys-color-on-surface-variant);
}

.trip-stat .material-symbols-rounded {
    font-size: 16px;
}

/* Archive button on trip cards */
.trip-share-btn,
.trip-archive-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border: none;
    border-radius: var(--md-sys-shape-corner-full);
    background: transparent;
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    transition: all 200ms;
    opacity: 0;
}

.trip-archive-btn {
    margin-left: auto;
}

.trip-card:hover .trip-share-btn,
.trip-card:hover .trip-archive-btn {
    opacity: 1;
}

/* Always visible on touch devices */
@media (hover: none) {
    .trip-share-btn,
    .trip-archive-btn {
        opacity: 0.7;
    }
}

.trip-share-btn:hover,
.trip-archive-btn:hover {
    background: var(--md-sys-color-surface-container-highest);
    color: var(--md-sys-color-on-surface);
}

.trip-share-btn .material-symbols-rounded,
.trip-archive-btn .material-symbols-rounded {
    font-size: 20px;
}

/* Archived toggle button */
.archived-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: var(--md-sys-typescale-label-large);
    font-weight: 500;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-small);
    background: transparent;
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    transition: all 200ms;
    font-family: inherit;
}

.archived-toggle.active {
    background: var(--md-sys-color-secondary-container);
    border-color: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.archived-toggle .material-symbols-rounded {
    font-size: 18px;
}

/* Split view for active / archived */
.trips-list.split-view {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
    align-content: start;
}

.split-column {
    display: flex;
    flex-direction: column;
    min-height: 120px;
    background: var(--md-sys-color-surface-container-lowest);
    border-radius: var(--md-sys-shape-corner-large);
    border: 1px solid var(--md-sys-color-outline-variant);
    padding: 16px;
    overflow: hidden;
    transition: border-color 200ms, box-shadow 200ms, background 200ms;
}

/* Drag & drop states */
.split-column.drop-target {
    border-style: dashed;
    border-color: var(--md-sys-color-primary);
}

.split-column.drag-over {
    background: color-mix(in srgb, var(--md-sys-color-primary) 8%, var(--md-sys-color-surface-container-lowest));
    border-color: var(--md-sys-color-primary);
    box-shadow: inset 0 0 0 1px var(--md-sys-color-primary);
}

.trip-card[draggable="true"] {
    cursor: grab;
}

.trip-card[draggable="true"]:active {
    cursor: grabbing;
}

.trip-card.dragging {
    opacity: 0.4;
    transform: scale(0.97);
}

.split-column-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 0 14px;
    font-size: var(--md-sys-typescale-title-medium);
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    border-bottom: 2px solid var(--md-sys-color-outline-variant);
    margin-bottom: 14px;
}

.split-column-header .material-symbols-rounded {
    font-size: 22px;
    color: var(--md-sys-color-primary);
}

.split-column-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.split-column-content .trip-card {
    margin-bottom: 12px;
}

.split-column-content .trip-card:last-child {
    margin-bottom: 0;
}

/* On mobile, split view is not used — archived shown as separate tab */

.empty-state.small {
    padding: 32px 24px;
}

.empty-state.small .material-symbols-rounded {
    font-size: 36px;
    opacity: 0.4;
    margin-bottom: 8px;
}

.empty-state.small p {
    font-size: var(--md-sys-typescale-body-medium);
    color: var(--md-sys-color-on-surface-variant);
}

.trip-meta {
    font-size: var(--md-sys-typescale-body-small);
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 4px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    text-align: center;
}

.empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: var(--md-sys-typescale-body-large);
    color: var(--md-sys-color-on-surface-variant);
}

.empty-state .hint {
    font-size: var(--md-sys-typescale-body-medium);
    color: var(--md-sys-color-outline);
    margin-top: 8px;
}

/* ===== GLOBAL BALANCE VIEW ===== */
.balance-summary-card {
    margin: 16px;
    padding: 20px 24px;
    background: var(--md-sys-color-surface-container-high);
    border-radius: var(--md-sys-shape-corner-large);
    color: var(--md-sys-color-on-surface);
    text-align: center;
}

.balance-total .label {
    display: block;
    font-size: var(--md-sys-typescale-label-medium);
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 4px;
}

.balance-total .amount {
    font-size: var(--md-sys-typescale-headline-large);
    font-weight: 500;
}

.balance-total .amount.positive { color: var(--md-sys-color-success); }
.balance-total .amount.negative { color: var(--md-sys-color-error); }

.balance-status {
    font-size: var(--md-sys-typescale-body-small);
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 8px;
}

.balance-list {
    padding: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.balance-columns {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0 16px 16px;
}

.balance-column-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--md-sys-typescale-title-small);
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 12px;
    padding: 0 4px;
}

.balance-column-title .material-symbols-rounded {
    font-size: 20px;
    color: var(--md-sys-color-primary);
}

.balance-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    background: var(--md-sys-color-surface-container-low);
    border-radius: var(--md-sys-shape-corner-medium);
}

.balance-user-item {
    gap: 12px;
}

.balance-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
}

.balance-user-summary {
    font-size: var(--md-sys-typescale-body-large);
    font-weight: 500;
}

.balance-user-summary.positive { color: var(--md-sys-color-success); }
.balance-user-summary.negative { color: var(--md-sys-color-error); }

.balance-trip-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.balance-trip-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.balance-trip-icon {
    font-size: 28px;
}

.balance-trip-name {
    font-size: var(--md-sys-typescale-body-large);
    font-weight: 500;
}

.balance-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.balance-detail-row {
    font-size: var(--md-sys-typescale-body-small);
    color: var(--md-sys-color-on-surface-variant);
}

.balance-detail-name {
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
}

.balance-detail-row .positive { color: var(--md-sys-color-success); font-weight: 500; }
.balance-detail-row .negative { color: var(--md-sys-color-error); font-weight: 500; }

/* ===== PROFILE VIEW ===== */
.profile-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 24px;
    background: var(--md-sys-color-surface-container-low);
    border-radius: var(--md-sys-shape-corner-extra-large);
    margin-bottom: 16px;
}

.avatar {
    width: 96px;
    height: 96px;
    border-radius: var(--md-sys-shape-corner-full);
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 500;
    margin-bottom: 16px;
}

.profile-card h2 {
    font-size: var(--md-sys-typescale-headline-small);
    font-weight: 400;
    margin-bottom: 4px;
}

.badge {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 12px;
    font-size: var(--md-sys-typescale-label-medium);
    font-weight: 500;
    border-radius: var(--md-sys-shape-corner-small);
    background: var(--md-sys-color-warning-container);
    color: var(--md-sys-color-on-warning-container);
    margin-top: 12px;
}

/* ===== SETTINGS VIEW ===== */
.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

/* Trip settings tab — reduce inner padding so cards fill width */
#trip-settings-tab .settings-content {
    padding: 4px 0;
}

/* ===== COMBINED ACCOUNT VIEW ===== */
#account-view {
    display: none; /* Hidden by default on mobile */
}

.account-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.account-column {
    flex: 1;
    min-width: 0;
}

/* MD3 Card */
.card {
    background: var(--md-sys-color-surface-container-low);
    border-radius: var(--md-sys-shape-corner-medium);
    padding: 14px 16px;
    margin-bottom: 12px;
}

.card h3 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--md-sys-typescale-title-small);
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 12px;
    letter-spacing: 0.1px;
}

.card h3 .material-symbols-rounded {
    font-size: 18px;
}

.card.highlight {
    background: var(--md-sys-color-primary-container);
}

.card.highlight h3 {
    color: var(--md-sys-color-on-primary-container);
}

.card.danger {
    border: 1px solid var(--md-sys-color-error);
}

.card.danger h3 {
    color: var(--md-sys-color-error);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.card-header h3 {
    margin-bottom: 0;
}

/* MD3 List Items */
.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    color: var(--md-sys-color-on-surface);
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-row.clickable {
    cursor: pointer;
    margin: 0 -16px;
    padding: 16px;
    border-radius: var(--md-sys-shape-corner-medium);
    border-bottom: none;
    margin-bottom: 4px;
    position: relative;
}

.setting-row.clickable::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--md-sys-color-on-surface);
    opacity: 0;
    transition: opacity 200ms;
}

.setting-row.clickable:hover::before {
    opacity: var(--md-sys-state-hover-opacity);
}

.setting-value {
    color: var(--md-sys-color-on-surface-variant);
    font-size: var(--md-sys-typescale-body-medium);
}

.setting-label-with-preview {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-theme-preview {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--md-sys-color-primary);
    border: 2px solid var(--md-sys-color-outline-variant);
    flex-shrink: 0;
}

.setting-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px 0;
    border: none;
    background: none;
    font-size: var(--md-sys-typescale-body-large);
    color: var(--md-sys-color-on-surface);
    cursor: pointer;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    text-align: left;
}

.setting-btn:last-child {
    border-bottom: none;
}

.setting-btn.danger {
    color: var(--md-sys-color-error);
}

.version {
    text-align: center;
    font-size: var(--md-sys-typescale-body-small);
    color: var(--md-sys-color-outline);
    margin-top: 32px;
}

/* MD3 Segmented Button */
.segmented-btn {
    display: inline-flex;
    border-radius: var(--md-sys-shape-corner-full);
    overflow: hidden;
    border: 1px solid var(--md-sys-color-outline);
}

.seg-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--md-sys-color-on-surface);
    font-size: var(--md-sys-typescale-label-large);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    border-right: 1px solid var(--md-sys-color-outline);
    white-space: nowrap;
}

.seg-option:last-child {
    border-right: none;
}

.seg-option .material-symbols-rounded {
    font-size: 18px;
}

.seg-option:hover {
    background: var(--md-sys-color-surface-container-highest);
}

.seg-option.active {
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.setting-row .segmented-btn {
    flex-shrink: 0;
}

/* Theme Picker Menu */
.theme-grid {
    position: relative;
    margin-top: 8px;
}

.theme-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 0;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--md-sys-color-on-surface);
    font-size: var(--md-sys-typescale-body-large);
}

.theme-trigger-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-trigger-color {
    width: 24px;
    height: 24px;
    border-radius: var(--md-sys-shape-corner-full);
    border: 2px solid rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.theme-trigger .material-symbols-rounded {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 20px;
}

/* Theme popup scrim (backdrop) */
.theme-popup-scrim {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.4);
    justify-content: center;
    align-items: center;
    padding: 24px;
    animation: scrim-fade-in 200ms ease;
}

.theme-popup-scrim.open {
    display: flex;
}

@keyframes scrim-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popup-slide-up {
    from { opacity: 0; transform: translateY(24px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Theme popup dialog */
.theme-popup {
    background: var(--md-sys-color-surface-container-high);
    border-radius: var(--md-sys-shape-corner-extra-large);
    box-shadow: var(--md-sys-elevation-3);
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: popup-slide-up 250ms cubic-bezier(0.2, 0, 0, 1);
}

.theme-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 12px;
}

.theme-popup-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
}

.theme-popup-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    border-radius: var(--md-sys-shape-corner-full);
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    transition: background 0.15s;
}

.theme-popup-close:hover {
    background: var(--md-sys-color-surface-container-highest);
}

.theme-popup-body {
    padding: 8px 24px 24px;
    overflow-y: auto;
}

/* Preset theme grid (chips) */
.theme-preset-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.theme-preset-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 2px solid var(--md-sys-color-outline-variant);
    background: var(--md-sys-color-surface-container);
    border-radius: var(--md-sys-shape-corner-large);
    cursor: pointer;
    color: var(--md-sys-color-on-surface);
    font-size: 13px;
    transition: all 0.15s ease;
}

.theme-preset-chip:hover {
    background: var(--md-sys-color-surface-container-highest);
}

.theme-preset-chip.active {
    border-color: var(--md-sys-color-primary);
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    font-weight: 500;
}

.theme-preset-swatch {
    width: 20px;
    height: 20px;
    border-radius: var(--md-sys-shape-corner-full);
    border: 2px solid rgba(0,0,0,0.08);
    flex-shrink: 0;
}

/* Divider */
.theme-menu-divider {
    height: 1px;
    background: var(--md-sys-color-outline-variant);
    margin: 16px 0;
}

/* Custom theme section */
.theme-custom-section {
    display: flex;
    flex-direction: column;
}

.theme-custom-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 0;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--md-sys-color-on-surface);
    font-size: var(--md-sys-typescale-body-large);
}

.theme-custom-toggle .material-symbols-rounded {
    font-size: 22px;
    color: var(--md-sys-color-primary);
}

.theme-custom-toggle .toggle-arrow {
    margin-left: auto;
    font-size: 20px;
    color: var(--md-sys-color-on-surface-variant);
}

.theme-custom-toggle.active {
    color: var(--md-sys-color-primary);
    font-weight: 500;
}

.theme-custom-panel {
    display: none;
    padding: 12px 0 4px;
    flex-direction: column;
    gap: 14px;
}

.theme-custom-panel.open {
    display: flex;
}

.theme-custom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.theme-custom-row label {
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
}

.theme-custom-row input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    width: 44px;
    height: 44px;
    border: 2px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-medium);
    padding: 3px;
    cursor: pointer;
    background: transparent;
}

.theme-custom-row input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.theme-custom-row input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: calc(var(--md-sys-shape-corner-medium) - 3px);
}

.theme-custom-row input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: calc(var(--md-sys-shape-corner-medium) - 3px);
}

.theme-custom-panel .btn-small {
    align-self: flex-end;
    font-size: 13px;
    padding: 8px 24px;
    border-radius: var(--md-sys-shape-corner-full);
    margin-top: 4px;
}

/* MD3 Switch */
.toggle {
    position: relative;
    width: 52px;
    height: 32px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--md-sys-color-surface-container-highest);
    border: 2px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-full);
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-full);
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle input:checked + .toggle-slider {
    background: var(--md-sys-color-primary);
    border-color: var(--md-sys-color-primary);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateY(-50%) translateX(20px);
    background: var(--md-sys-color-on-primary);
    width: 24px;
    height: 24px;
    left: 2px;
}

/* ===== TRIP SCREEN ===== */
#trip-screen {
    flex-direction: column;
}

.trip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px 8px 4px;
    background: var(--md-sys-color-surface);
    min-height: 64px;
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: none;
    background: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--md-sys-color-on-surface);
    border-radius: var(--md-sys-shape-corner-full);
}

.trip-header-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.trip-emoji {
    font-size: 32px;
}

.trip-header-text h1 {
    font-size: var(--md-sys-typescale-title-large);
    font-weight: 600;
    line-height: 1.2;
}

.trip-code {
    font-size: var(--md-sys-typescale-label-small);
    color: var(--md-sys-color-outline);
    font-family: 'Roboto Mono', monospace;
    letter-spacing: 1px;
}

/* MD3 Secondary Tabs */
.trip-tabs {
    display: flex;
    background: var(--md-sys-color-surface);
}

.trip-tab {
    flex: 1;
    padding: 16px;
    font-size: var(--md-sys-typescale-title-small);
    font-weight: 500;
    border: none;
    background: none;
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    position: relative;
    transition: color 200ms;
}

.trip-tab:hover {
    color: var(--md-sys-color-on-surface);
}

.trip-tab.active {
    color: var(--md-sys-color-primary);
}

.trip-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 3px;
    background: var(--md-sys-color-primary);
    border-radius: 3px 3px 0 0;
}

.trip-content {
    flex: 1;
    overflow: hidden;
}

.tab-content {
    display: none;
    height: 100%;
    overflow-y: auto;
    padding: 12px;
}

.tab-content.active {
    display: block;
}

/* Desktop tab titles - hidden on mobile */
.desktop-tab-title {
    display: none;
    font-size: var(--md-sys-typescale-title-large);
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

/* Spendings List */
.spendings-list {
    padding-bottom: 24px;
}

/* Add Spending Card Button */
.add-spending-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin: 0 auto 8px;
    background: var(--md-sys-color-surface-container-low);
    border-radius: var(--md-sys-shape-corner-medium);
    cursor: pointer;
    transition: all 200ms;
    position: relative;
    border: 2px dashed var(--md-sys-color-outline-variant);
    width: 88%;
    text-align: left;
    font-family: inherit;
}

.add-spending-card:hover {
    background: var(--md-sys-color-surface-container);
    border-color: var(--md-sys-color-primary);
}

.add-spending-card:active {
    transform: scale(0.98);
}

.add-spending-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--md-sys-shape-corner-medium);
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-spending-icon .material-symbols-rounded {
    font-size: 24px;
    font-weight: 600;
}

.add-spending-label {
    font-size: var(--md-sys-typescale-body-medium);
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
}

.spending-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    margin-bottom: 8px;
    background: var(--md-sys-color-surface-container-low);
    border-radius: var(--md-sys-shape-corner-medium);
    cursor: pointer;
    transition: all 200ms;
    position: relative;
}

.spending-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--md-sys-color-on-surface);
    opacity: 0;
    transition: opacity 200ms;
}

.spending-card:hover::before {
    opacity: var(--md-sys-state-hover-opacity);
}

.spending-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--md-sys-shape-corner-full);
    background: var(--md-sys-color-secondary-container);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.spending-info {
    flex: 1;
    min-width: 0;
}

.spending-description {
    font-size: var(--md-sys-typescale-body-large);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spending-meta {
    font-size: var(--md-sys-typescale-body-small);
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 4px;
}

.spending-items-list {
    list-style: none;
    padding: 0;
    margin: 6px 0 4px 0;
    font-size: var(--md-sys-typescale-body-small);
}

.spending-items-list .spending-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    margin: 2px 0;
    background: var(--md-sys-color-surface-container-high);
    border-radius: 6px;
    color: var(--md-sys-color-on-surface);
}

.spending-items-list .spending-item.hidden-item {
    display: none;
}

.spending-items-list .item-price-small {
    font-weight: 500;
    color: var(--md-sys-color-primary);
    margin-left: 8px;
    white-space: nowrap;
}

.items-toggle-btn {
    background: none;
    border: none;
    color: var(--md-sys-color-primary);
    font-size: var(--md-sys-typescale-label-small);
    font-weight: 500;
    padding: 4px 8px;
    margin-left: -8px;
    cursor: pointer;
    text-decoration: underline;
    position: relative;
    z-index: 10;
}

.spending-amount {
    font-size: var(--md-sys-typescale-title-medium);
    font-weight: 500;
}

/* Summary Tab */
.summary-content {
    padding-bottom: 96px;
}

.trip-balances {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--md-sys-color-surface-container);
    border-radius: var(--md-sys-shape-corner-small);
}

.user-balance-name {
    font-size: var(--md-sys-typescale-body-large);
    font-weight: 500;
}

.user-balance-amount {
    font-size: var(--md-sys-typescale-title-small);
    font-weight: 500;
}

.user-balance-amount.positive { color: var(--md-sys-color-success); }
.user-balance-amount.negative { color: var(--md-sys-color-error); }

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.transaction-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
    background: var(--md-sys-color-surface-container);
    border-radius: var(--md-sys-shape-corner-small);
}

.transaction-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
    font-size: var(--md-sys-typescale-body-medium);
}

.transaction-from,
.transaction-to {
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
}

.transaction-arrow {
    color: var(--md-sys-color-outline);
}

.transaction-amount {
    font-weight: 500;
    color: var(--md-sys-color-primary);
}

.participants-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.participant-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: var(--md-sys-shape-corner-small);
    transition: background 200ms;
}

.participant-row:hover {
    background: var(--md-sys-color-surface-container);
}

.participant-name {
    font-size: var(--md-sys-typescale-body-large);
    font-weight: 500;
}

.participant-you {
    font-size: var(--md-sys-typescale-label-small);
    color: var(--md-sys-color-primary);
    margin-left: 8px;
}

/* MD3 FAB */
.fab {
    display: none;
}

/* Trip Settings */
.share-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--md-sys-color-surface-container);
    border-radius: var(--md-sys-shape-corner-medium);
    font-family: 'Roboto Mono', monospace;
    font-size: var(--md-sys-typescale-title-medium);
    font-weight: 500;
    letter-spacing: 3px;
    margin-bottom: 12px;
}

.color-preview {
    width: 28px;
    height: 28px;
    border-radius: var(--md-sys-shape-corner-full);
}

/* ===== MD3 MODALS (Bottom Sheets) ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 300ms;
    z-index: 200;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 90vh;
    background: var(--md-sys-color-surface-container-lowest);
    border-radius: var(--md-sys-shape-corner-extra-large) var(--md-sys-shape-corner-extra-large) 0 0;
    transform: translateY(100%);
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 201;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    visibility: hidden;
}

.modal.active {
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px;
}

.modal-header h2 {
    font-size: var(--md-sys-typescale-headline-small);
    font-weight: 400;
    color: var(--md-sys-color-on-surface);
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: var(--md-sys-shape-corner-full);
    font-size: 18px;
    cursor: pointer;
    color: var(--md-sys-color-on-surface-variant);
    transition: background 200ms;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close .material-symbols-rounded {
    font-size: 20px;
}

.modal-close:hover {
    background: var(--md-sys-color-surface-container);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 24px;
}

.modal-hint {
    font-size: var(--md-sys-typescale-body-medium);
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 16px;
}

/* Balance trips list for settings */
.balance-trips-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.balance-trip-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--md-sys-shape-corner-medium);
    cursor: pointer;
    transition: background 200ms;
}

.balance-trip-toggle:hover {
    background: var(--md-sys-color-surface-container);
}

.toggle-trip-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.toggle-trip-icon {
    font-size: 22px;
}

.toggle-trip-name {
    font-size: var(--md-sys-typescale-body-medium);
    color: var(--md-sys-color-on-surface);
}

.balance-trip-toggle .toggle {
    flex-shrink: 0;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.modal-actions .btn {
    flex: 1;
}

/* Icon/Color Picker */
.icon-picker,
.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.icon-option,
.color-option {
    width: 48px;
    height: 48px;
    border: 2px solid transparent;
    border-radius: var(--md-sys-shape-corner-medium);
    background: var(--md-sys-color-surface-container);
    font-size: 24px;
    cursor: pointer;
    transition: all 200ms;
}

.icon-option:hover,
.color-option:hover {
    background: var(--md-sys-color-surface-container-high);
}

.icon-option.selected,
.color-option.selected {
    border-color: var(--md-sys-color-primary);
    background: var(--md-sys-color-primary-container);
}

.color-option {
    border-radius: var(--md-sys-shape-corner-full);
}

/* Trip Preview Card */
.trip-preview-container {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--md-sys-color-surface-container-lowest);
    border-radius: 16px;
    border: 1px dashed var(--md-sys-color-outline);
}

.trip-preview-container .preview-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--md-sys-color-primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.trip-preview-card {
    display: flex !important;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 14px;
    background: #fef3e2;
    border: 2px solid #EF4444;
    transition: all 300ms ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-height: 80px;
}

.trip-preview-card .preview-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    border-radius: 12px;
    background: white;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.trip-preview-card .preview-details {
    flex: 1;
    min-width: 0;
}

.trip-preview-card .preview-name {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Custom Emoji Input */
.custom-emoji-input {
    margin-top: 12px;
}

.custom-emoji-input input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-medium);
    background: var(--md-sys-color-surface-container-lowest);
    color: var(--md-sys-color-on-surface);
    font-size: 16px;
    transition: border-color 200ms;
    box-sizing: border-box;
}

.custom-emoji-input input:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    border-width: 2px;
    padding: 11px 13px;
}

/* Custom Color Input */
.custom-color-input {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    padding: 10px 14px;
    background: var(--md-sys-color-surface-container-low);
    border-radius: 12px;
    border: 1px solid var(--md-sys-color-outline-variant);
}

.custom-color-input input[type="color"] {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 3px solid var(--md-sys-color-surface);
    border-radius: 50%;
    cursor: pointer;
    background: transparent;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.custom-color-input input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.custom-color-input input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.custom-color-input input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 50%;
}

.custom-color-input .color-input-label {
    font-size: var(--md-sys-typescale-body-medium);
    color: var(--md-sys-color-on-surface-variant);
}

/* Tag Input */
.tag-input {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-medium);
    background: var(--md-sys-color-surface-container-lowest);
}

.tag-input:focus-within {
    border-color: var(--md-sys-color-primary);
    border-width: 2px;
    padding: 11px;
}

.tag-input input {
    flex: 1;
    min-width: 100px;
    padding: 8px;
    border: none;
    background: none;
    font-size: var(--md-sys-typescale-body-large);
    color: var(--md-sys-color-on-surface);
}

.tag-input input:focus {
    outline: none;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 8px 0 12px;
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
    border-radius: var(--md-sys-shape-corner-small);
    font-size: var(--md-sys-typescale-label-large);
}

.tag .remove-tag {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--md-sys-color-on-secondary-container);
    border-radius: var(--md-sys-shape-corner-full);
}

/* Join Preview */
.join-preview {
    padding: 16px;
    background: var(--md-sys-color-surface-container);
    border-radius: var(--md-sys-shape-corner-medium);
    margin-top: 16px;
}

.preview-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--md-sys-typescale-title-medium);
    font-weight: 500;
    margin-bottom: 16px;
}

.participant-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.participant-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--md-sys-color-surface-container-low);
    border-radius: var(--md-sys-shape-corner-small);
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 200ms;
}

.participant-option:hover {
    background: var(--md-sys-color-surface-container);
}

.participant-option.selected {
    border-color: var(--md-sys-color-primary);
    background: var(--md-sys-color-primary-container);
}

/* Item Mode */
.mode-toggle {
    padding: 12px 0 16px;
    margin-bottom: 16px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--md-sys-typescale-body-medium);
    cursor: pointer;
    color: var(--md-sys-color-on-surface-variant);
}

/* Simple checkbox toggle */
.toggle-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--md-sys-color-primary);
    cursor: pointer;
}

.items-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: var(--md-sys-typescale-title-small);
    font-weight: 500;
}

.items-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 6px;
    background: var(--md-sys-color-surface-container-low);
    border-radius: var(--md-sys-shape-corner-medium);
}

.item-details {
    flex: 1;
}

.item-name {
    font-size: var(--md-sys-typescale-body-large);
    font-weight: 500;
}

.item-participants {
    font-size: var(--md-sys-typescale-body-small);
    color: var(--md-sys-color-on-surface-variant);
}

.item-price {
    font-size: var(--md-sys-typescale-title-small);
    font-weight: 500;
    margin-right: 16px;
}

.item-remove {
    background: none;
    border: none;
    color: var(--md-sys-color-error);
    cursor: pointer;
    font-size: 20px;
    padding: 8px;
    border-radius: var(--md-sys-shape-corner-full);
    transition: background 200ms;
}

.item-remove:hover {
    background: var(--md-sys-color-error-container);
}

.items-total {
    display: flex;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--md-sys-color-primary-container);
    border-radius: var(--md-sys-shape-corner-medium);
    font-size: var(--md-sys-typescale-title-small);
    font-weight: 500;
    color: var(--md-sys-color-on-primary-container);
}

/* Multi Payers */
.multi-payers {
    margin-top: 16px;
}

.payer-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.payer-row select {
    flex: 1;
    padding: 12px 44px 12px 14px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-medium);
    background: var(--md-sys-color-surface-container-lowest);
    font-size: var(--md-sys-typescale-body-medium);
    color: var(--md-sys-color-on-surface);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23787672' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.payer-row input {
    width: 100px;
    padding: 12px 14px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-medium);
    background: var(--md-sys-color-surface-container-lowest);
    font-size: var(--md-sys-typescale-body-medium);
    color: var(--md-sys-color-on-surface);
}

.payer-row .remove-payer {
    background: none;
    border: none;
    color: var(--md-sys-color-error);
    cursor: pointer;
    font-size: 22px;
    padding: 8px;
    border-radius: var(--md-sys-shape-corner-full);
    transition: background 200ms;
}

.payer-row .remove-payer:hover {
    background: var(--md-sys-color-error-container);
}

/* Split */
.split-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    background: var(--md-sys-color-surface-container);
    border-radius: var(--md-sys-shape-corner-full);
    padding: 3px;
}

.split-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: var(--md-sys-shape-corner-full);
    background: transparent;
    color: var(--md-sys-color-on-surface-variant);
    font-size: var(--md-sys-typescale-label-large);
    font-weight: 500;
    cursor: pointer;
    transition: all 200ms;
}

.split-btn.active {
    background: var(--md-sys-color-surface-container-lowest);
    color: var(--md-sys-color-on-surface);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.participants-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.participant-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: transparent;
    border: none;
    border-radius: var(--md-sys-shape-corner-small);
    cursor: pointer;
    transition: background 150ms;
}

.participant-checkbox:hover {
    background: var(--md-sys-color-surface-container);
}

/* Clean checkbox */
.participant-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--md-sys-color-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.participant-checkbox .name {
    flex: 1;
    font-size: var(--md-sys-typescale-body-large);
}

.participant-checkbox input[type="number"] {
    width: 80px;
    padding: 8px 12px;
    text-align: right;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-small);
    background: var(--md-sys-color-surface-container-lowest);
    font-size: var(--md-sys-typescale-body-medium);
}

.participant-checkbox input[type="number"]:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
}

/* Currency Modal */
.search-input {
    width: 100%;
    padding: 14px 16px;
    font-size: var(--md-sys-typescale-body-large);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-medium);
    background: var(--md-sys-color-surface-container-lowest);
    color: var(--md-sys-color-on-surface);
    margin-bottom: 16px;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    border-width: 2px;
    padding: 13px 15px;
}

.currency-list {
    max-height: 400px;
    overflow-y: auto;
}

.currency-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: var(--md-sys-shape-corner-medium);
    cursor: pointer;
    transition: all 200ms;
}

.currency-item:hover {
    background: var(--md-sys-color-surface-container);
}

.currency-item.selected {
    background: var(--md-sys-color-primary-container);
    border-radius: var(--md-sys-shape-corner-medium);
}

.currency-code {
    font-size: var(--md-sys-typescale-title-small);
    font-weight: 500;
}

.currency-name {
    color: var(--md-sys-color-on-surface-variant);
    font-size: var(--md-sys-typescale-body-medium);
}

.currency-symbol {
    color: var(--md-sys-color-outline);
}

.currency-btn {
    padding: 14px 16px;
    font-size: var(--md-sys-typescale-body-large);
    font-weight: 500;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-medium);
    background: var(--md-sys-color-surface-container-lowest);
    color: var(--md-sys-color-on-surface);
    cursor: pointer;
    transition: border-color 200ms;
}

.currency-btn:hover {
    border-color: var(--md-sys-color-outline);
}

/* Spending Detail */
.spending-detail {
    text-align: center;
}

.detail-amount {
    font-size: var(--md-sys-typescale-display-small);
    font-weight: 400;
    margin-bottom: 8px;
}

.detail-description {
    font-size: var(--md-sys-typescale-title-large);
    margin-bottom: 16px;
}

.detail-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    font-size: var(--md-sys-typescale-body-medium);
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 24px;
}

.detail-items {
    text-align: left;
    margin-bottom: 24px;
}

.detail-items h4,
.detail-split h4 {
    font-size: var(--md-sys-typescale-title-small);
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 12px;
}

.detail-split {
    text-align: left;
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--md-sys-color-surface-container);
    border-radius: var(--md-sys-shape-corner-small);
}

.payment-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.payment-type-icon {
    font-size: 24px;
}

.payment-type-name {
    font-size: var(--md-sys-typescale-label-medium);
    font-weight: 600;
    color: var(--md-sys-color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.payment-details {
    font-size: var(--md-sys-typescale-body-large);
    font-weight: 500;
}

.payment-label {
    font-size: var(--md-sys-typescale-body-small);
    color: var(--md-sys-color-on-surface-variant);
}

.payment-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 8px;
    color: var(--md-sys-color-on-surface-variant);
}

.empty-hint {
    color: var(--md-sys-color-outline);
    font-size: var(--md-sys-typescale-body-medium);
    text-align: center;
    padding: 24px;
}

/* ===== BUDGET ===== */
.budget-card {
    /* plain card */
}

.budget-display {
    margin-top: 16px;
}

.budget-progress-wrap {
    margin-bottom: 16px;
}

.budget-progress-bar {
    height: 8px;
    background: var(--md-sys-color-surface-container-highest);
    border-radius: var(--md-sys-shape-corner-full);
    overflow: hidden;
}

.budget-progress-fill {
    height: 100%;
    background: var(--md-sys-color-primary);
    border-radius: var(--md-sys-shape-corner-full);
    transition: width 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

.budget-progress-fill.warning {
    background: var(--md-sys-color-warning);
}

.budget-progress-fill.danger {
    background: var(--md-sys-color-error);
}

.budget-stats {
    display: flex;
    justify-content: space-between;
    font-size: var(--md-sys-typescale-body-small);
    color: var(--md-sys-color-on-surface-variant);
}

.budget-main-stat {
    text-align: center;
    padding: 8px 0;
}

.budget-spent {
    font-size: var(--md-sys-typescale-headline-small);
    font-weight: 400;
    color: var(--md-sys-color-on-surface);
}

.budget-total {
    font-size: var(--md-sys-typescale-body-medium);
    color: var(--md-sys-color-on-surface-variant);
}

.budget-remaining {
    font-size: var(--md-sys-typescale-body-medium);
    margin-top: 8px;
}

.budget-remaining.positive {
    color: var(--md-sys-color-success);
}

.budget-remaining.negative {
    color: var(--md-sys-color-error);
}

.budget-currency {
    padding: 12px 16px;
    background: var(--md-sys-color-surface-container);
    border-radius: var(--md-sys-shape-corner-small);
    font-size: var(--md-sys-typescale-title-small);
    font-weight: 500;
}

/* ===== PROFILE VIEW ===== */
.profile-view-content {
    text-align: center;
    padding: 16px;
}

.profile-view-avatar {
    width: 96px;
    height: 96px;
    border-radius: var(--md-sys-shape-corner-full);
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    font-size: 40px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.profile-view-name {
    font-size: var(--md-sys-typescale-headline-small);
    font-weight: 400;
    margin-bottom: 8px;
}

.profile-view-bio {
    color: var(--md-sys-color-on-surface-variant);
    font-size: var(--md-sys-typescale-body-medium);
    margin-bottom: 24px;
}

.profile-view-payments {
    text-align: left;
}

.profile-view-payments h4 {
    font-size: var(--md-sys-typescale-title-small);
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--md-sys-color-on-surface-variant);
}

.profile-view-payment-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--md-sys-color-surface-container);
    border-radius: var(--md-sys-shape-corner-small);
    margin-bottom: 8px;
}

.profile-view-payment-item .type-icon {
    font-size: 20px;
}

.profile-view-payment-item .label {
    font-size: var(--md-sys-typescale-body-small);
    color: var(--md-sys-color-on-surface-variant);
}

/* ===== PARTICIPANT ROW ENHANCED ===== */
.participant-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

.participant-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.participant-balance {
    font-size: var(--md-sys-typescale-body-medium);
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    flex-shrink: 0;
}

.participant-balance.positive {
    color: var(--md-sys-color-success, #2E7D4A);
}

.participant-balance.negative {
    color: var(--md-sys-color-error);
}

.participant-actions {
    display: flex;
    gap: 4px;
}

.participant-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 8px;
    border-radius: var(--md-sys-shape-corner-full);
    transition: background 200ms;
    color: var(--md-sys-color-on-surface-variant);
}

.participant-actions button:hover {
    background: var(--md-sys-color-surface-container-high);
}

.participant-actions button.danger:hover {
    background: var(--md-sys-color-error-container);
    color: var(--md-sys-color-on-error-container);
}

/* ===== MY BALANCE DISPLAY ===== */
.summary-hero {
    background: var(--md-sys-color-surface-container-high);
    border-radius: var(--md-sys-shape-corner-large);
    padding: 20px;
    margin-bottom: 16px;
}

.hero-balance {
    text-align: center;
}

.hero-balance-label {
    display: block;
    font-size: var(--md-sys-typescale-label-medium);
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 4px;
}

.my-balance-amount {
    display: block;
    font-size: var(--md-sys-typescale-headline-medium);
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
}

.my-balance-amount.positive {
    color: var(--md-sys-color-success);
}

.my-balance-amount.negative {
    color: var(--md-sys-color-error);
}

/* Inline stats row */
.hero-stats {
    display: flex;
    gap: 0;
    background: var(--md-sys-color-surface-container);
    border-radius: var(--md-sys-shape-corner-medium);
    padding: 4px 0;
    margin-bottom: 12px;
}

.hero-stat {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    position: relative;
}

.hero-stat:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: var(--md-sys-color-outline-variant);
}

.hero-stat-value {
    display: block;
    font-size: var(--md-sys-typescale-title-small);
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 2px;
}

.hero-stat-label {
    display: block;
    font-size: var(--md-sys-typescale-label-small);
    color: var(--md-sys-color-on-surface-variant);
}

/* Collapsible detail section */
.detail-section {
    margin-bottom: 12px;
}

.detail-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: var(--md-sys-typescale-label-large);
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    border-radius: var(--md-sys-shape-corner-medium);
    transition: background 200ms;
    list-style: none;
}

.detail-toggle::-webkit-details-marker {
    display: none;
}

.detail-toggle:hover {
    background: var(--md-sys-color-surface-container);
}

.detail-toggle .material-symbols-rounded {
    font-size: 20px;
}

.detail-chevron {
    margin-left: auto;
    transition: transform 200ms;
}

details[open] .detail-chevron {
    transform: rotate(180deg);
}

.detail-section .trip-balances {
    padding: 8px 16px 16px;
}

/* Text button / link style */
.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: none;
    border: none;
    font-size: var(--md-sys-typescale-label-large);
    font-weight: 500;
    font-family: inherit;
    color: var(--md-sys-color-primary);
    cursor: pointer;
    border-radius: var(--md-sys-shape-corner-small);
    transition: background 200ms;
}

.btn-text:hover {
    background: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
}

.btn-text .material-symbols-rounded {
    font-size: 18px;
}

.btn-text.btn-text-danger {
    color: var(--md-sys-color-error);
}

.btn-text.btn-text-danger:hover {
    background: color-mix(in srgb, var(--md-sys-color-error) 8%, transparent);
}

.export-link {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
    margin-bottom: 8px;
}

/* ===== SETTINGS HERO (Group Info Card) ===== */
.settings-hero-card {
    text-align: center;
    padding: 24px 16px 16px;
}

.settings-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.settings-hero-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    font-size: 36px;
    background: var(--md-sys-color-surface-container-high);
    border-radius: var(--md-sys-shape-corner-large);
}

.settings-hero-name {
    font-size: var(--md-sys-typescale-headline-small);
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
    margin: 0;
}

.settings-hero-edit {
    font-size: var(--md-sys-typescale-label-large);
    gap: 4px;
}

.settings-hero-edit .material-symbols-rounded {
    font-size: 16px;
}

/* ===== SETTINGS LIST ITEMS ===== */
.settings-list {
    display: flex;
    flex-direction: column;
}

.settings-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 4px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    color: var(--md-sys-color-on-surface);
}

.settings-list-item:last-child {
    border-bottom: none;
}

.settings-list-item.clickable {
    cursor: pointer;
    margin: 0 -12px;
    padding: 14px 12px;
    border-radius: var(--md-sys-shape-corner-medium);
    border-bottom: none;
    transition: background 200ms;
}

.settings-list-item.clickable:hover {
    background: color-mix(in srgb, var(--md-sys-color-on-surface) 6%, transparent);
}

.settings-item-icon {
    font-size: 28px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.settings-item-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: var(--md-sys-shape-corner-full);
    background: var(--md-sys-color-primary);
    flex-shrink: 0;
}

/* Group Color Picker */
.group-color-picker {
    padding: 16px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
    animation: slideDown 200ms ease;
}

.group-color-picker.hidden {
    display: none;
}

.color-preset-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    justify-items: center;
    margin-bottom: 16px;
}

.color-preset-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 150ms;
    padding: 0;
    outline: none;
}

.color-preset-dot:hover {
    transform: scale(1.15);
}

.color-preset-dot.selected {
    border-color: var(--md-sys-color-on-surface);
    box-shadow: 0 0 0 2px var(--md-sys-color-surface), 0 0 0 4px var(--md-sys-color-on-surface);
}

.color-custom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
}

.color-custom-row label {
    font-size: var(--md-sys-typescale-body-medium);
    color: var(--md-sys-color-on-surface-variant);
}

.color-custom-row input[type="color"] {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    background: none;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 300px; }
}

.settings-item-icon-md {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--md-sys-color-on-surface-variant);
    background: var(--md-sys-color-surface-container);
    border-radius: var(--md-sys-shape-corner-full);
    flex-shrink: 0;
}

.settings-item-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-item-title {
    font-size: var(--md-sys-typescale-body-large);
    color: var(--md-sys-color-on-surface);
}

.settings-item-subtitle {
    font-size: var(--md-sys-typescale-body-small);
    color: var(--md-sys-color-on-surface-variant);
}

.settings-item-action {
    font-size: var(--md-sys-typescale-label-large);
    color: var(--md-sys-color-primary);
    font-weight: 500;
    flex-shrink: 0;
}

.settings-item-chevron {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 20px;
    flex-shrink: 0;
}

/* Settings actions (leave/delete) */
.settings-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 8px 0;
}

/* ===== BALANCE GRAPH ===== */
.balance-graph {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 0;
}

.balance-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.balance-bar-name {
    width: 80px;
    font-size: var(--md-sys-typescale-body-small);
    color: var(--md-sys-color-on-surface);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.balance-bar-container {
    flex: 1;
    display: flex;
    height: 24px;
}

.balance-bar-negative,
.balance-bar-positive {
    flex: 1;
    display: flex;
    height: 100%;
}

.balance-bar-negative {
    justify-content: flex-end;
}

.balance-bar-positive {
    justify-content: flex-start;
}

.balance-bar-fill {
    height: 100%;
    border-radius: var(--md-sys-shape-corner-extra-small);
    transition: width 300ms cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 2px;
}

.balance-bar-fill.positive {
    background: var(--md-sys-color-success);
}

.balance-bar-fill.negative {
    background: var(--md-sys-color-error);
}

.balance-bar-amount {
    width: 80px;
    font-size: var(--md-sys-typescale-body-small);
    font-weight: 500;
    text-align: right;
}

.balance-bar-amount.positive {
    color: var(--md-sys-color-success);
}

.balance-bar-amount.negative {
    color: var(--md-sys-color-error);
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    background: var(--md-sys-color-surface-container);
    border-radius: var(--md-sys-shape-corner-medium);
    text-align: center;
}

.stat-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: var(--md-sys-typescale-title-medium);
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 4px;
}

.stat-label {
    font-size: var(--md-sys-typescale-body-small);
    color: var(--md-sys-color-on-surface-variant);
}

/* ===== TRANSACTION ROW ENHANCED ===== */
.btn-settle {
    background: var(--md-sys-color-success);
    color: var(--md-sys-color-on-success);
    min-height: 32px;
    padding: 6px 16px;
    font-size: var(--md-sys-typescale-label-medium);
    border-radius: var(--md-sys-shape-corner-full);
}

.btn-settle:hover {
    box-shadow: var(--md-sys-elevation-1);
}

/* ===== MD3 SNACKBAR (Toast) ===== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 14px 24px;
    background: var(--md-sys-color-inverse-surface);
    color: var(--md-sys-color-inverse-on-surface);
    border-radius: var(--md-sys-shape-corner-extra-small);
    font-size: var(--md-sys-typescale-body-medium);
    opacity: 0;
    visibility: hidden;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 300;
    max-width: calc(100% - 32px);
    text-align: center;
    box-shadow: var(--md-sys-elevation-3);
}

.toast.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ===== LOADING (Progress Indicator) ===== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 400;
}

.loading-overlay.hidden {
    pointer-events: none;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--md-sys-color-surface-container);
    border-top-color: var(--md-sys-color-primary);
    border-radius: var(--md-sys-shape-corner-full);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE - TABLET+ ===== */
@media (min-width: 768px) {
    .sidebar {
        display: flex;
    }
    
    .bottom-nav {
        display: none;
    }
    
    .main-content {
        padding-bottom: 0;
    }
    
    .view-header {
        padding: 20px 24px;
    }
    
    .trips-list,
    .balance-columns,
    .profile-content,
    .settings-content {
        padding: 0 24px 24px;
    }
    
    /* Profile and Settings nice layout on tablet+ */
    .profile-content,
    .settings-content {
        padding: 24px 48px 48px;
        max-width: 800px;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
    }
    
    .profile-card {
        margin-bottom: 24px;
        padding: 40px 32px;
    }
    
    .profile-card .avatar {
        width: 112px;
        height: 112px;
        font-size: 48px;
    }
    
    .settings-content .card {
        margin-bottom: 20px;
    }
    
    .settings-content .version {
        text-align: center;
        margin-top: 32px;
    }
    
    /* Hide combined account view on all devices */
    #account-view {
        display: none !important;
    }
    
    .trip-actions {
        padding: 0 24px 24px;
    }
    
    .modal {
        bottom: auto;
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%) scale(0.9);
        border-radius: var(--md-sys-shape-corner-extra-large);
        width: 90%;
        max-width: var(--modal-max-width);
        max-height: 85vh;
        opacity: 0;
        box-shadow: var(--md-sys-elevation-3);
    }
    
    .modal.active {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    
    .modal.modal-large {
        max-width: 600px;
    }
    
    .fab {
        bottom: 32px;
        right: 32px;
    }
}

/* ===== RESPONSIVE - DESKTOP ===== */
@media (min-width: 1024px) {
    .auth-container {
        min-height: 100vh;
    }
    
    .trips-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
        align-items: start;
        align-content: start;
    }

    .trips-list.split-view {
        grid-template-columns: 1fr 1fr !important;
    }

    .split-column-content {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 12px;
    }

    .split-column-content .trip-card {
        margin-bottom: 0;
    }
    
    .trip-card {
        margin-bottom: 0;
    }
    
    .balance-columns {
        flex-direction: row;
        gap: 24px;
    }
    
    .balance-columns .balance-column {
        flex: 1;
        min-width: 0;
    }
    
    .balance-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .account-content {
        padding: 24px 48px;
        gap: 40px;
        max-width: 900px;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Trip screen - show all tabs side by side on wide screens */
    .trip-tabs {
        display: none; /* Hide tab navigation on desktop */
    }
    
    .trip-content {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 20px;
        padding: 20px 5%;
        overflow-y: auto;
    }
    
    .tab-content {
        display: block !important;
        padding: 0;
        overflow-y: visible;
        height: auto;
        border-radius: var(--md-sys-shape-corner-large);
        background: var(--md-sys-color-surface-container-lowest);
    }
    
    #spendings-tab {
        border: 1px solid var(--md-sys-color-outline-variant);
        padding: 16px;
    }
    
    #summary-tab {
        border: 1px solid var(--md-sys-color-outline-variant);
        padding: 16px;
    }
    
    #summary-tab .summary-content {
        max-width: none;
    }
    
    #trip-settings-tab {
        border: 1px solid var(--md-sys-color-outline-variant);
        padding: 16px;
    }
    
    #trip-settings-tab .settings-content {
        max-width: none;
    }
    
    .desktop-tab-title {
        display: block;
    }
    
    .spendings-list {
        padding-bottom: 16px;
    }
}

/* Extra wide screens - more breathing room */
@media (min-width: 1400px) {
    .trip-content {
        padding: 24px 6%;
        gap: 24px;
    }
}

/* ===== ABOUT MODAL ===== */

.about-modal-body {
    overflow-y: auto;
}

.about-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.about-logo {
    width: 72px;
    height: 72px;
    border-radius: var(--md-sys-shape-corner-large, 16px);
}

.about-app-name {
    font-size: var(--md-sys-typescale-headline-small, 24px);
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
    margin-top: 12px;
    margin-bottom: 2px;
}

.about-version {
    font-size: var(--md-sys-typescale-body-medium, 14px);
    color: var(--md-sys-color-outline);
}

.about-card {
    background: var(--md-sys-color-surface-container);
    border-radius: var(--md-sys-shape-corner-large, 16px);
    padding: 16px;
    margin-bottom: 16px;
}

.about-card h4 {
    font-size: var(--md-sys-typescale-title-small, 14px);
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 12px;
}

.about-description {
    font-size: var(--md-sys-typescale-body-medium, 14px);
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.5;
}

.about-link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    color: var(--md-sys-color-on-surface);
    text-decoration: none;
    cursor: pointer;
    font-size: var(--md-sys-typescale-body-large, 16px);
    transition: opacity 150ms;
}

.about-link-row:hover {
    opacity: 0.7;
}

.about-link-row .material-symbols-rounded {
    font-size: 20px;
    color: var(--md-sys-color-outline);
}

.about-no-link {
    cursor: default;
}

.about-no-link:hover {
    opacity: 1;
}

.about-credit-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.about-credit-sub {
    font-size: var(--md-sys-typescale-body-small, 12px);
    color: var(--md-sys-color-outline);
}

.about-divider {
    height: 1px;
    background: var(--md-sys-color-outline-variant);
    opacity: 0.5;
}

.about-copyright {
    text-align: center;
    font-size: var(--md-sys-typescale-body-small, 12px);
    color: var(--md-sys-color-outline);
    margin-top: 8px;
    margin-bottom: 0;
}

/* ===== PRINT ===== */
@media print {
    .sidebar,
    .bottom-nav,
    .fab,
    .modal,
    .modal-overlay,
    .toast,
    .loading-overlay {
        display: none !important;
    }
}
