/* Upgraded CSS - Tactical HUD Premium Aesthetic */
:root {
    --bg-main: #0a0c0e;
    --bg-darker: #040506;
    --card-bg: rgba(16, 21, 26, 0.55);
    --card-border: rgba(255, 255, 255, 0.04);
    
    /* Tactical Palette */
    --army-gold: #ffd043;
    --army-gold-hover: #e6b72a;
    --army-gold-rgb: 255, 208, 67;
    --olive-drab: #53644e;
    --olive-drab-light: #6b8265;
    --olive-drab-dark: #374234;
    
    /* Neon Status Indicators */
    --color-success: #00ff88;
    --color-success-bg: rgba(0, 255, 136, 0.08);
    --color-success-border: rgba(0, 255, 136, 0.25);
    --color-danger: #ff4757;
    --color-danger-bg: rgba(255, 71, 87, 0.08);
    --color-danger-border: rgba(255, 71, 87, 0.25);
    --color-warning: #ffd043;
    --color-warning-bg: rgba(255, 208, 67, 0.08);
    --color-warning-border: rgba(255, 208, 67, 0.25);
    
    /* Typography */
    --text-primary: #f5f6f8;
    --text-secondary: #a3b2bc;
    --text-muted: #5e6c76;
    
    /* Core Constants */
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Roboto Condensed', sans-serif;
    --font-mono: 'Orbitron', monospace;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset and Base Layout */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    /* Premium shifting gradient mesh containing dark teal, olive, and gold blends */
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(83, 100, 78, 0.15) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(255, 208, 67, 0.05) 0%, transparent 45%),
        radial-gradient(circle at 50% 30%, rgba(53, 90, 80, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-main) 100%);
    background-attachment: fixed;
}

/* Floating Ambient Glow Spheres */
body::before {
    content: '';
    position: fixed;
    top: -15vw;
    left: -15vw;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(107, 130, 101, 0.16) 0%, rgba(83, 100, 78, 0.04) 45%, transparent 70%);
    filter: blur(120px);
    pointer-events: none;
    z-index: -1;
    animation: floatGlow1 25s infinite ease-in-out alternate;
}

body::after {
    content: '';
    position: fixed;
    bottom: -15vw;
    right: -15vw;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, rgba(255, 208, 67, 0.06) 0%, rgba(255, 208, 67, 0.01) 45%, transparent 70%);
    filter: blur(140px);
    pointer-events: none;
    z-index: -1;
    animation: floatGlow2 30s infinite ease-in-out alternate-reverse;
}

@keyframes floatGlow1 {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    100% { transform: translate(8%, 10%) scale(1.12) rotate(20deg); }
}

@keyframes floatGlow2 {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    100% { transform: translate(-10%, -6%) scale(1.06) rotate(-20deg); }
}

.app-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 30px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Header Styling */
.app-header {
    background: linear-gradient(135deg, rgba(14, 18, 22, 0.85) 0%, rgba(6, 8, 10, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-bottom: 3px solid var(--army-gold);
    border-radius: var(--radius-lg);
    padding: 24px 36px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.app-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 208, 67, 0.3), transparent);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 28px;
}

.army-star-container {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 12px rgba(255, 208, 67, 0.45));
}

.army-star {
    width: 100%;
    height: 100%;
    animation: rotatePulse 12s infinite linear;
}

.header-text {
    display: flex;
    flex-direction: column;
}

.header-title {
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: 5px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #ffffff 60%, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-subtitle {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 900;
    color: var(--army-gold);
    letter-spacing: 3px;
    margin-top: 4px;
    text-shadow: 0 0 8px rgba(255, 208, 67, 0.2);
}

/* Tabs Navigation Styling */
.app-tabs {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 4px;
}

.tab-btn {
    background: rgba(16, 21, 26, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    color: var(--text-secondary);
    padding: 14px 24px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    position: relative;
}

.tab-btn:hover {
    background: rgba(255, 208, 67, 0.05);
    color: #ffffff;
    border-color: rgba(255, 208, 67, 0.15);
}

.tab-btn.active {
    background: var(--card-bg);
    border-color: var(--card-border);
    color: var(--army-gold);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.tab-btn.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--army-gold);
}

.tab-icon {
    width: 18px;
    height: 18px;
}

/* Grid Layout */
.app-main {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 30px;
}

@media (max-width: 1150px) {
    .app-main {
        grid-template-columns: 1fr;
    }
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.02);
    transition: var(--transition);
}

.glass-card:hover {
    border-color: rgba(255, 208, 67, 0.15);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 208, 67, 0.02);
    transform: translateY(-2px);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #ffffff;
    border-left: 4px solid var(--army-gold);
    padding-left: 12px;
    margin-bottom: 24px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.text-center {
    text-align: center;
    border-left: none;
    padding-left: 0;
}

/* Left Panel Input Sections */
.config-and-inputs {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Toggle Group Selector */
.toggle-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.toggle-btn {
    background: rgba(10, 14, 18, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    padding: 18px;
    cursor: pointer;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.01);
    transition: var(--transition);
}

.toggle-btn:hover {
    background: rgba(18, 24, 30, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.toggle-btn.active {
    background: linear-gradient(135deg, var(--olive-drab-dark) 0%, rgba(14, 19, 24, 0.95) 100%);
    border-color: var(--army-gold);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(255, 208, 67, 0.08), inset 0 0 15px rgba(255, 208, 67, 0.03);
}

.toggle-btn.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--army-gold);
}

.btn-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.btn-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Demographics Controls */
.demographics-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
}

.demo-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.full-width {
    grid-column: span 2;
}

.input-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
}

/* Gender toggle switches */
.toggle-group-sm {
    display: flex;
    background: rgba(6, 8, 10, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: 5px;
    height: 46px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8);
}

.toggle-btn-sm {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    letter-spacing: 1px;
    transition: var(--transition);
}

.toggle-btn-sm:hover {
    color: #ffffff;
}

.toggle-btn-sm.active {
    background: var(--olive-drab);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Dropdowns wrapper */
.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper::after {
    content: '\25BE';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--army-gold);
    pointer-events: none;
    font-size: 1rem;
}

.custom-select {
    width: 100%;
    height: 46px;
    background: rgba(6, 8, 10, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    color: #ffffff;
    padding: 0 40px 0 16px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8);
    transition: var(--transition);
}

.custom-select:focus {
    outline: none;
    border-color: var(--army-gold);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 208, 67, 0.1);
}

/* Events Panel */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.event-card {
    background: rgba(10, 14, 18, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.01);
    transition: var(--transition);
}

.event-card:hover {
    background: rgba(14, 20, 26, 0.7);
    transform: translateX(4px);
}

/* Dynamic scoring colors on event cards */
.event-card.card-fail {
    border-left: 4px solid var(--color-danger);
    border-color: rgba(255, 71, 87, 0.08) rgba(255, 71, 87, 0.08) rgba(255, 71, 87, 0.08) var(--color-danger);
}

.event-card.card-pass {
    border-left: 4px solid var(--color-success);
    border-color: rgba(0, 255, 136, 0.05) rgba(0, 255, 136, 0.05) rgba(0, 255, 136, 0.05) var(--color-success);
}

.event-card.card-excellent {
    border-left: 4px solid var(--color-warning);
    border-color: rgba(255, 208, 67, 0.1) rgba(255, 208, 67, 0.1) rgba(255, 208, 67, 0.1) var(--color-warning);
    box-shadow: 0 4px 20px rgba(255, 208, 67, 0.02), inset 0 1px 0 rgba(255, 255, 255, 0.01);
}

.event-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.event-icon-container {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: rgba(255, 208, 67, 0.06);
    border: 1px solid rgba(255, 208, 67, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--army-gold);
    flex-shrink: 0;
    transition: var(--transition);
}

.event-card:hover .event-icon-container {
    background: rgba(255, 208, 67, 0.12);
    border-color: rgba(255, 208, 67, 0.3);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 208, 67, 0.2);
}

.event-icon {
    width: 22px;
    height: 22px;
}

.event-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.event-abbr {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 900;
    color: var(--army-gold);
    letter-spacing: 1.5px;
}

.event-name {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
}

.event-score-badge {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 900;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    min-width: 85px;
    text-align: center;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.event-score-badge.fail {
    background: var(--color-danger-bg);
    color: var(--color-danger);
    border: 1px solid var(--color-danger-border);
    text-shadow: 0 0 8px rgba(255, 71, 87, 0.3);
}

.event-score-badge.pass {
    background: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid var(--color-success-border);
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.3);
}

.event-score-badge.excellent {
    background: var(--color-warning-bg);
    color: var(--color-warning);
    border: 1px solid var(--color-warning-border);
    text-shadow: 0 0 8px rgba(255, 208, 67, 0.3);
}

/* Event Controls Row */
.event-controls-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.slider-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

/* Range input visual overhaul */
.custom-range-slider {
    width: 100%;
    height: 8px;
    background: rgba(6, 8, 10, 0.9);
    outline: none;
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
    transition: var(--transition);
}

/* Dynamic background fill on sliders */
.custom-range-slider {
    background-image: linear-gradient(to right, var(--slider-color, var(--army-gold)) var(--slider-fill, 0%), rgba(6, 8, 10, 0.9) var(--slider-fill, 0%));
}

.event-card.card-fail .custom-range-slider {
    --slider-color: var(--color-danger);
}

.event-card.card-pass .custom-range-slider {
    --slider-color: var(--color-success);
}

.event-card.card-excellent .custom-range-slider {
    --slider-color: var(--color-warning);
}

.custom-range-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    border: 4px solid var(--slider-color, var(--army-gold));
    box-shadow: 0 0 12px var(--slider-color, var(--army-gold));
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.custom-range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25);
    background: #ffffff;
}

.input-numeric-container {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 120px;
    flex-shrink: 0;
}

.input-numeric-container.time-inputs {
    width: 150px;
}

.custom-num-input {
    width: 100%;
    height: 40px;
    background: rgba(6, 8, 10, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    color: #ffffff;
    text-align: center;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 700;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.8);
    transition: var(--transition);
}

.custom-num-input:focus {
    outline: none;
    border-color: var(--army-gold);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.8), 0 0 10px rgba(255, 208, 67, 0.1);
}

.time-colon {
    font-weight: 900;
    color: var(--text-muted);
}

.input-suffix {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* Dashboard Panel (Right Side) */
.results-dashboard {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.gauge-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: sticky;
    top: 30px;
}

/* SCI-FI HUD Gauge Circle */
.gauge-wrapper {
    position: relative;
    width: 240px;
    height: 240px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gauge-wrapper::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.03);
    pointer-events: none;
    animation: rotatePulse 40s infinite linear;
}

.gauge-wrapper::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 1px solid rgba(255, 208, 67, 0.05);
    pointer-events: none;
}

.progress-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: transparent;
    stroke: rgba(6, 8, 10, 0.6);
    stroke-width: 6;
}

.progress-ring-fg {
    fill: transparent;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 251.2;
    stroke-dashoffset: 251.2;
    transition: stroke-dashoffset 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), stroke 0.4s ease;
}

.gauge-text-container {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 85%;
    text-align: center;
    z-index: 2;
}

.total-score-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 2px;
}

.total-score-value {
    font-family: var(--font-mono);
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    margin: 6px 0;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

.pass-fail-badge {
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    padding: 4px 16px;
    border-radius: 30px;
    text-transform: uppercase;
}

.pass-fail-badge.fail {
    background: var(--color-danger);
    color: #000000;
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.45);
}

.pass-fail-badge.pass {
    background: var(--color-success);
    color: #000000;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.45);
}

/* Dynamic glow effect on circle gauge based on parent status */
.progress-ring {
    filter: drop-shadow(0 0 8px var(--gauge-glow-color, var(--color-danger)));
}

.gauge-card:has(.pass-fail-badge.pass) .progress-ring {
    --gauge-glow-color: rgba(0, 255, 136, 0.5);
}

.gauge-card:has(.pass-fail-badge.fail) .progress-ring {
    --gauge-glow-color: rgba(255, 71, 87, 0.5);
}

/* Status details container */
.status-summary-details {
    width: 100%;
    background: rgba(6, 8, 10, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.highlight-val {
    font-weight: 800;
    color: #ffffff;
}

.status-msg {
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
    display: block;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.status-msg.fail {
    color: var(--color-danger);
    text-shadow: 0 0 5px rgba(255, 71, 87, 0.1);
}

.status-msg.pass {
    color: var(--color-success);
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.1);
}

/* HUD Dash Progress Bars */
.gauge-bars-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

.dash-bar-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dash-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.dash-bar-name {
    font-family: var(--font-mono);
    font-weight: 900;
}

.dash-bar-track {
    width: 100%;
    height: 8px;
    background: rgba(6, 8, 10, 0.8);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
}

.dash-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), background 0.4s ease;
    position: relative;
}

.dash-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 3px;
    height: 100%;
    background: #ffffff;
    box-shadow: 0 0 8px #ffffff;
}

.dash-bar-fill.fail {
    background: linear-gradient(90deg, rgba(255, 71, 87, 0.3) 0%, var(--color-danger) 100%);
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.3);
}

.dash-bar-fill.pass {
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.3) 0%, var(--color-success) 100%);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.dash-bar-fill.excellent {
    background: linear-gradient(90deg, rgba(255, 208, 67, 0.3) 0%, var(--color-warning) 100%);
    box-shadow: 0 0 10px rgba(255, 208, 67, 0.3);
}

/* Action Buttons Overhaul */
.action-buttons-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.primary-btn {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, var(--army-gold) 0%, #ffd966 100%);
    border: none;
    border-radius: var(--radius-md);
    color: #000000;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 6px 20px rgba(255, 208, 67, 0.25);
    transition: var(--transition);
}

.primary-btn:hover {
    background: linear-gradient(135deg, var(--army-gold-hover) 0%, var(--army-gold) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 208, 67, 0.4);
}

.secondary-btn {
    width: 100%;
    height: 46px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
}

.secondary-btn:hover {
    border-color: var(--army-gold);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.02);
    box-shadow: inset 0 0 10px rgba(255, 208, 67, 0.03);
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* History Log Dashboard Layout */
.history-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.history-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-dashboard-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 30px;
}

@media (max-width: 1024px) {
    .history-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.history-table-wrapper {
    background: rgba(6, 8, 10, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    padding: 20px;
    overflow-x: auto;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.history-table th, 
.history-table td {
    padding: 12px 16px;
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.history-table th {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 700;
}

.history-table td {
    color: #ffffff;
}

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

.table-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 4px;
}

.table-badge.pass {
    background: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid var(--color-success-border);
}

.table-badge.fail {
    background: var(--color-danger-bg);
    color: var(--color-danger);
    border: 1px solid var(--color-danger-border);
}

.delete-btn-sm {
    background: transparent;
    border: 1px solid rgba(255, 71, 87, 0.2);
    color: var(--color-danger);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    transition: var(--transition);
}

.delete-btn-sm:hover {
    background: var(--color-danger);
    color: #000000;
    border-color: var(--color-danger);
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.3);
}

.no-history-msg {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.history-chart-card {
    background: rgba(6, 8, 10, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.chart-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chart-container {
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Alternate Aerobic Selectors Styling */
.alt-event-select-wrapper {
    margin-bottom: 12px;
    width: 100%;
}

.alt-event-select {
    width: 100%;
    height: 38px;
    background: rgba(6, 8, 10, 0.85);
    border: 1px solid rgba(255, 208, 67, 0.2);
    border-radius: var(--radius-sm);
    color: #ffffff;
    padding: 0 12px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
    transition: var(--transition);
}

.alt-event-select:focus {
    outline: none;
    border-color: var(--army-gold);
    box-shadow: 0 0 8px rgba(255, 208, 67, 0.15);
}

/* Tape Measurements Grid (ABCP Inputs) */
.tape-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.tape-fields-grid .full-width {
    grid-column: span 2;
}

/* Educational training guide */
.training-library {
    margin-top: 30px;
    background: rgba(14, 18, 22, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg);
    padding: 36px;
    backdrop-filter: blur(20px);
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 8px;
    border-bottom: 2px solid var(--olive-drab-dark);
    padding-bottom: 10px;
    display: inline-block;
}

.section-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

/* Accordion components */
.accordion-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.accordion-item {
    border: 1px solid rgba(255, 255, 255, 0.03);
    background: rgba(6, 8, 10, 0.4);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.accordion-item:hover {
    border-color: rgba(255, 208, 67, 0.2);
    background: rgba(10, 14, 18, 0.5);
}

.accordion-header {
    width: 100%;
    padding: 18px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    outline: none;
}

.event-badge {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 900;
    color: #000000;
    background: var(--army-gold);
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(255, 208, 67, 0.2);
}

.accordion-title {
    flex-grow: 1;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: var(--transition);
}

.accordion-item:hover .accordion-title {
    color: var(--army-gold);
}

.accordion-arrow {
    font-size: 1rem;
    color: var(--text-muted);
    transition: transform 0.25s ease;
}

.accordion-item.active .accordion-arrow {
    transform: rotate(180deg);
    color: var(--army-gold);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: rgba(4, 5, 6, 0.4);
}

.accordion-content p {
    padding: 20px 24px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    line-height: 1.7;
}

.accordion-content p strong {
    color: #ffffff;
}

/* Footer layout */
.app-footer {
    margin-top: 50px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: 900px;
    margin: 0 auto;
}

/* Animations */
@keyframes rotatePulse {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.04); filter: drop-shadow(0 0 15px rgba(255, 208, 67, 0.6)); }
    100% { transform: rotate(360deg) scale(1); }
}

/* Print Layout settings */
.print-only {
    display: none;
}

@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
        background-image: none !important;
    }

    body::before, body::after {
        display: none !important;
    }

    .app-container {
        padding: 0;
    }

    .app-header, 
    .app-tabs,
    .app-main, 
    .training-library, 
    .app-footer {
        display: none !important;
    }

    /* Print only the active print template */
    .print-only.print-active {
        display: block !important;
        width: 100%;
        max-width: 800px;
        margin: 0 auto;
        font-family: 'Inter', system-ui, sans-serif;
    }

    .print-header {
        text-align: center;
        border-bottom: 3px double #000000;
        padding-bottom: 12px;
        margin-bottom: 20px;
    }

    .print-header h1 {
        font-family: 'Roboto Condensed', sans-serif;
        font-size: 1.8rem;
        font-weight: 700;
        margin: 4px 0;
    }

    .print-header h2 {
        font-size: 1.1rem;
        font-weight: 600;
        color: #555555;
    }

    .print-header h3 {
        font-size: 0.9rem;
        font-weight: 500;
        letter-spacing: 1px;
    }

    .print-meta-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        border: 1px solid #000000;
        padding: 12px;
        margin-bottom: 24px;
        background: #f8f9fa;
    }

    .print-meta-item {
        font-size: 0.85rem;
    }

    .print-meta-item strong {
        text-transform: uppercase;
        display: inline-block;
        width: 110px;
        color: #333333;
    }

    .print-score-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 24px;
    }

    .print-score-table th, 
    .print-score-table td {
        border: 1px solid #000000;
        padding: 10px 12px;
        text-align: left;
        font-size: 0.9rem;
    }

    .print-score-table th {
        background: #e9ecef;
        font-weight: 700;
        text-transform: uppercase;
    }

    .print-summary-box {
        display: flex;
        justify-content: space-between;
        border: 2px solid #000000;
        padding: 16px;
        margin-bottom: 30px;
        background: #f8f9fa;
    }

    .print-summary-item {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 1rem;
    }

    .print-summary-item strong {
        font-size: 1.1rem;
    }

    .score-large {
        font-size: 1.8rem;
        font-weight: 700;
        font-family: 'Orbitron', monospace;
    }

    .status-large {
        font-size: 1.4rem;
        font-weight: 800;
        border: 2px solid #000000;
        padding: 4px 16px;
        border-radius: 4px;
    }

    .signatures-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 50px;
        margin-top: 40px;
    }

    .signature-line {
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 0.8rem;
    }

    .sig-space {
        width: 100%;
        height: 40px;
        border-bottom: 1px solid #000000;
        margin-bottom: 6px;
    }

    .print-footer {
        margin-top: 40px;
        border-top: 1px solid #777777;
        padding-top: 16px;
        font-size: 0.75rem;
        color: #555555;
        text-align: center;
    }
}
