/**
 * Base styles - shared across all views.
 * Load Tailwind CDN in base.html for utility classes.
 */

/* =============================================================================
   Base
   ============================================================================= */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* =============================================================================
   Layout
   ============================================================================= */

.app-container {
    max-width: 100%;
    margin: 0;
    padding: 0.4rem 0.5rem;
}

/* =============================================================================
   Navbar
   ============================================================================= */

.app-navbar {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    color: white;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.app-navbar__brand {
    display: flex;
    align-items: center;
}

.app-navbar__brand h1 {
    font-size: 1.25rem;
    font-weight: 600;
}

.app-navbar__clock {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-navbar__clock .sim-time {
    /* background: rgba(255, 255, 255, 0.2); */
    color: white;
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-weight: 500;
}

.app-navbar__clock .btn {
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
}

/* =============================================================================
   Cards
   ============================================================================= */

.card {
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.card-header h2 {
    font-size: 1.1rem;
    color: #1a365d;
}

/* =============================================================================
   Badges
   ============================================================================= */

.badge {
    background: #e2e8f0;
    color: #4a5568;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge--cohort {
    background: #48bb78;
    color: white;
    margin-right: 0.5rem;
}

/* =============================================================================
   Buttons
   ============================================================================= */

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background: #3182ce;
    color: white;
}

.btn-primary:hover {
    background: #2c5282;
}

.btn-secondary {
    background: #3182ce;
    color: white;
}

.btn-secondary:hover {
    background: #2c5282;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.btn-loading {
    min-width: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.advance-btn__content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.advance-spinner {
    width: 1rem;
    height: 1rem;
    display: block;
    animation: advance-spinner-spin 0.9s linear infinite;
}

.advance-spinner__track {
    display: none;
}

.advance-spinner__arc {
    fill: none;
    stroke: #ffffff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 18 56.55;
    stroke-dashoffset: 0;
    transform-origin: 50% 50%;
}

@keyframes advance-spinner-spin {
    0% {
        transform: rotate(-90deg);
    }
    100% {
        transform: rotate(270deg);
    }
}

/* =============================================================================
   Utilities
   ============================================================================= */

.text-muted {
    color: #718096;
}
