:root {
    /* Color Palette - Premium Zinc & Emerald Accent */
    --primary: #10b981;
    --primary-hover: #059669;
    --secondary: #0A2A5B;

    --bg-dark: #09090b;
    --bg-card: #18181b;
    --bg-input: #27272a;

    --text-primary: #FFFFFF;
    --text-secondary: #B0B0B0;
    --text-muted: #666666;

    --border-color: #333333;

    --success: #4CAF50;
    --warning: #FFC107;
    --danger: #F44336;

    /* Spacing & Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Manrope', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
}

.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-center {
    text-align: center;
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 8px;
}

.gap-4 {
    gap: 16px;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.hidden {
    display: none;
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.input-group {
    margin-bottom: 16px;
    width: 100%;
}

.input-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.input-field {
    width: 100%;
    padding: 12px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.input-field:focus {
    border-color: var(--primary);
    outline: none;
}

/* Login Page Specifics */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(circle at top right, #064e3b 0%, var(--bg-dark) 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.logo-large {
    width: 150px;
    margin-bottom: 32px;
}

/* Dashboard Specifics */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.user-avatar {
    padding: 0;
    box-sizing: border-box;
    font-family: 'Manrope', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
}

.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-center {
    text-align: center;
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 8px;
}

.gap-4 {
    gap: 16px;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.hidden {
    display: none;
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Toggle Buttons */
.btn-toggle {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-toggle.active {
    background-color: var(--bg-card); /* Or a lighter grey */
    color: var(--text-primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.input-group {
    margin-bottom: 16px;
    width: 100%;
}

.input-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.input-field {
    width: 100%;
    padding: 12px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.input-field:focus {
    border-color: var(--primary);
    outline: none;
}

/* Login Page Specifics */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(circle at top right, #1a1a1a 0%, var(--bg-dark) 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.logo-large {
    width: 150px;
    margin-bottom: 32px;
}

/* Dashboard Specifics */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background-size: cover;
    background-position: center;
    border: 2px solid var(--primary);
}

/* Accelerometer */
.accelerometer-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 80%;
    max-height: 200px;
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 2.5;
}

.circle {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    animation: progress 1s ease-out forwards;
    transition: stroke-dasharray 1s ease;
    stroke: var(--primary);
    filter: drop-shadow(0 0 4px rgba(255, 107, 0, 0.5));
}

.percentage-display {
    text-align: center;
    z-index: 10;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

.percentage-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 12px 0;
    display: flex;
    justify-content: space-around;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.nav-item.active {
    color: var(--primary);
}

/* Ranking List */
.ranking-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-item:active {
    background-color: rgba(255, 255, 255, 0.02);
}

.rank-badge {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    font-weight: bold;
    font-size: 0.8rem;
    color: var(--text-primary);
}

.rank-badge.top-1 {
    background-color: #FFD700;
    color: #000;
}

.rank-badge.top-2 {
    background-color: #C0C0C0;
    color: #000;
}

.rank-badge.top-3 {
    background-color: #CD7F32;
    color: #000;
}

/* Agenda/Flight Plan */
.agenda-day-selector {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 20px;
}

.day-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 4px;
    border-radius: 12px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    transition: all 0.2s;
}

.day-tab.active {
    background: rgba(255, 107, 0, 0.15);
    border-color: var(--primary);
}

.day-tab.active span {
    color: var(--primary);
}

.timeline-item {
    display: flex;
    gap: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-time {
    width: 45px;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.timeline-marker {
    width: 4px;
    background-color: var(--primary);
    border-radius: var(--radius-full);
}

.timeline-content {
    flex: 1;
}

/* Utilities Grid */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.divide-y > * + * { border-top-width: 1px; }
.divide-white\/5 > * + * { border-color: rgba(255, 255, 255, 0.05); }
.space-y-3 > * + * { margin-top: 0.75rem; }
.bg-black\/20 { background-color: rgba(0, 0, 0, 0.2); }
.text-xs { font-size: 0.75rem; }
.tracking-wider { letter-spacing: 0.05em; }
.uppercase { text-transform: uppercase; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }
.border-white\/5 { border-color: rgba(255, 255, 255, 0.05); }

/* Responsive Adjustments */
@media (min-width: 768px) {
    .login-card {
        max-width: 450px;
    }

    .bottom-nav {
        display: none;
        /* Hide bottom nav on desktop */
    }

    .desktop-nav {
        display: flex;
        /* Show desktop nav */
    }

    main {
        padding-bottom: 0;
        /* Remove bottom padding needed for nav */
    }
}