/** © 2026 HardYard - ALL RIGHTS RESERVED. */
* { box-sizing: border-box; }

:root {
    --accent-cyan: #00f2ff;
    --panel-glass: rgba(10, 10, 10, 0.85);
    --card-border: rgba(0, 242, 255, 0.2);
    --text-main: #ffffff;
    --sos-red: #ff3333;
    --warn-orange: #ff9900;
    --accent-gold: #FFC107;
    --nav-bg: #050505;
    --high-vis-orange: #FF5F1F;
}

body, html { 
    margin: 0; padding: 0; width: 100vw; height: 100%; overflow-x: hidden;
    /* Rugged Carbon Fiber Texture */
    background: 
        radial-gradient(black 15%, transparent 16%) 0 0,
        radial-gradient(black 15%, transparent 16%) 8px 8px,
        radial-gradient(rgba(255,255,255,.1) 15%, transparent 20%) 0 1px,
        radial-gradient(rgba(255,255,255,.1) 15%, transparent 20%) 8px 9px;
    background-color: #0a0a0a;
    background-size: 16px 16px;
    color: var(--text-main);
    font-family: 'Segoe UI', Arial, sans-serif;
    overflow: hidden;
}

/* --- TOP BAR REDESIGN --- */
.top-bar {
    position: fixed; top: 0; left: 0; width: 100%; height: 75px; /* Increased for visibility */
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 20px; box-sizing: border-box; z-index: 2000;
    background: linear-gradient(to bottom, #000, transparent);
}

.corner-logo { font-size: 24px; font-weight: 900; color: #fff; letter-spacing: 1px; }
.corner-logo span { color: var(--accent-cyan); font-weight: 100; font-size: 16px; }

.profile-icon {
    width: 45px; height: 45px; border-radius: 50%; /* Bigger profile tap target */
    border: 2px solid var(--accent-cyan);
    background: #111; color: var(--accent-cyan);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: bold;
}

/* --- HUB DASHBOARD ELEMENTS --- */
.status-panel {
    background: var(--panel-glass);
    margin: 15px; padding: 25px;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    backdrop-filter: blur(15px);
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.05);
}

.section-label {
    font-size: 12px; letter-spacing: 2px; color: var(--accent-cyan);
    margin: 25px 15px 12px 15px; text-transform: uppercase; font-weight: 900;
}

.hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 15px; }

.hub-card {
    background: var(--panel-glass);
    border: 1px solid var(--card-border);
    padding: 20px; border-radius: 10px;
    backdrop-filter: blur(10px);
    display: flex; flex-direction: column; gap: 8px;
    transition: all 0.2s ease;
    min-height: 100px; /* Bigger cards for gloves */
    position: relative;
}

.hub-card:active { background: rgba(0, 242, 255, 0.2); border-color: var(--accent-cyan); }
.yard-card {
    background: var(--panel-glass);
    border: 1px solid var(--card-border);
    padding: 0;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    position: relative;
}
.yard-card:active {
    transform: scale(0.97);
    background: rgba(0, 242, 255, 0.2);
    border-color: var(--accent-cyan);
}
.card-icon { font-size: 32px; margin-bottom: 5px; }
.card-label { font-size: 14px; font-weight: 900; }
.card-sub { font-size: 11px; color: #aaa; }

/* --- THE TOOL BELT (NAV BAR) --- */
.nav-bar {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 90px; /* Taller for thumbs */
    background: var(--nav-bg); border-top: 2px solid var(--accent-cyan);
    display: flex; justify-content: space-around; align-items: center;
    z-index: 2000; padding-bottom: 15px;
}

/* The Center Measure Button - Flat Style */
.nav-center-btn {
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--accent-cyan)
}

.nav-center-btn.active {
    color: var(--accent-cyan);
    font-weight: 900;
}

.nav-center-btn svg {
    width: 24px; height: 24px;
    stroke: currentColor;
    fill: none;
    transition: all 0.2s ease;
}

.nav-center-label {
    font-size: 11px;
}

.nav-center-btn:active {
    transform: scale(0.97);
}

.nav-item { color: #888; font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.nav-item span:first-child { font-size: 28px; } /* Bigger emojis in nav */
.nav-item.active { color: var(--accent-cyan); font-weight: 900; }

/* --- CALCULATOR UI (Glove Friendly) --- */
.page { position: fixed; inset: 0; display: none; flex-direction: column; z-index: 100; }
.page.active { display: flex; }
.page-content { flex: 1; overflow-y: auto; padding: 90px 0 130px 0; width: 100%; }

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border: 2px solid #333;
    width: 100%;
}

.input-wrapper input {
    width: 100%;
    height: 70px;
    font-size: 26px;
    background: #000;
    color: #fff;
    border: 1px solid #555;
    padding: 0 15px;
    font-weight: bold;
    margin-top: 5px;
}

.input-wrapper select {
    width: 100%;
    height: 70px;
    background: #111;
    color: var(--accent-cyan);
    border: 2px solid var(--accent-cyan);
    font-size: 20px;
    font-weight: bold;
    margin-top: 5px;
}

.input-wrapper span {
    width: 100%;
    text-align: left;
    display: block;
    font-size: 14px;
    font-weight: 900;
    color: #888;
}

.calc-btn {
    background: #FF8C00; color: #000; border: 1px solid #000000;
    padding: 25px; font-weight: 900; text-transform: uppercase; margin-top: 15px;
    font-size: 20px; letter-spacing: 1px;
    display: flex; justify-content: center; align-items: center; text-align: center;
}

.calc-btn:active {
    background: #cc7000;
    border-color: #fff;
}

.calc-btn:disabled {
    background: #333 !important;
    color: #888 !important;
    border-color: #444 !important;
    cursor: not-allowed;
}

/* Clear/Reset Styling */
.reset-btn { background: #222; color: #fff; border: 2px solid #444; margin-top: 15px; padding: 22px; font-weight: bold; font-size: 18px; }

/* --- OTHER ENGINE STYLES --- */
#sos-active-overlay {
    position: fixed; inset: 0; z-index: 5000; display: none;
    flex-direction: column; align-items: center; justify-content: center;
    background: var(--sos-red); padding: 20px; text-align: center;
}

.btn-sos { background: var(--sos-red); color: #fff; border: none; padding: 35px; font-weight: 900; font-size: 24px; width: calc(100% - 30px); margin: 15px; border-radius: 8px; box-shadow: 0 0 20px rgba(255,0,0,0.4); }

/* --- YARD & SUPPLIER OVERRIDES --- */
#yard-feed img {
    border-radius: 4px 4px 0 0;
    display: block;
    width: 100%;
}

.yard-menu-btn {
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
    color: #666;
}

.yard-menu-btn.active {
    background: rgba(0, 255, 255, 0.1) !important;
    border-color: var(--accent-cyan) !important;
    color: var(--accent-cyan) !important;
}

#runner-map-container {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    z-index: 1;
}

/* Shield Status Tags & DNA Styles */
.status-tag {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 900;
    text-transform: uppercase;
}
.tag-ok { background: rgba(0, 255, 255, 0.2); color: #00ffff; border: 1px solid #00ffff; }
.tag-stolen { background: rgba(255, 51, 51, 0.2); color: #ff3333; border: 1px solid #ff3333; }

.dna-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid #333;
    padding: 8px;
    font-size: 10px;
    color: #aaa;
    margin-top: 5px;
    border-radius: 4px;
    font-style: italic;
}

/* Waste Margin & Select Overrides for Gloves */
#waste-margin, #skip-size, #material-type, #conc-delivery-type, #mix-ratio, #parent-kit-select {
    height: 70px !important;
    font-size: 20px !important;
    margin-top: 10px;
}
.glass-panel {
    background: var(--panel-glass);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    border-radius: 10px;
}

button:active, .calc-btn:active, .yard-menu-btn:active {
    transform: scale(0.97);
    transition: transform 0.1s;
}

@keyframes flash {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* --- TRADE GRID CATEGORIES --- */
.trade-category {
    background: var(--panel-glass);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
}

.trade-category-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #FF8C00;
    cursor: pointer;
    font-weight: 900;
    letter-spacing: 1px;
    color: #000000;
    border-bottom: 1px solid #000000;
    transition: all 0.2s ease;
}

.trade-category-header:active {
    background: rgba(0, 242, 255, 0.15);
}

.trade-category-grid {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 10px;
    justify-items: center;
}

/* Override #trade-grid-list styles when categorized */
#trade-grid-list.categorized {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
}

/* --- DRAINAGE GRADIENT TOGGLES --- */
.gradient-btn {
    flex: 1;
    background: #111;
    border: 1px solid #444;
    color: #888;
    padding: 10px;
    font-weight: bold;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.gradient-btn:hover {
    background: #222;
}

.gradient-btn.active {
    background: rgba(0, 242, 255, 0.2);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.blink-text {
    animation: flash 1s infinite;
}

/* --- CONTACT HUB MODAL --- */
.contact-hub-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.contact-hub-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.contact-hub-panel {
    background: var(--panel-glass);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    width: 100%;
    max-width: 500px;
    margin: 10px;
    padding: 20px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.contact-hub-overlay.active .contact-hub-panel {
    transform: translateY(0);
}

.contact-option-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    background: #222;
    border: 1px solid #444;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.2s ease;
}

.contact-option-btn:active {
    transform: scale(0.97);
    background: rgba(0, 242, 255, 0.1);
    border-color: var(--accent-cyan);
}

/* --- HIGH VISIBILITY & SUPPLIER BUTTONS --- */
.btn-high-vis {
    background: var(--high-vis-orange) !important;
    color: #000000 !important;
    border: 1px solid #000 !important;
    font-weight: 900 !important;
}

.supplier-btn {
    min-width: 100px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 900;
    text-decoration: none;
    color: #000 !important;
    background: var(--high-vis-orange) !important;
    border: 1px solid #000 !important;
    box-sizing: border-box;
    white-space: normal;
    line-height: 1.2;
    transition: transform 0.1s;
}

.supplier-btn:active {
    transform: scale(0.97);
}

.supplier-btn span:first-child {
    font-size: 24px;
    margin-bottom: 5px;
    display: block;
}

.supplier-btn span:last-child {
    display: block;
    width: 100%;
    word-wrap: break-word;
}

/* --- SHUTTER FLASH EFFECT --- */
@keyframes shutter-flash {
    0% { opacity: 0; }
    30% { opacity: 1; }
    100% { opacity: 0; }
}
.shutter-effect {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 6000;
    pointer-events: none;
    animation: shutter-flash 0.3s ease-out forwards;
}

/* --- SHIELD MANUAL ENTRY OVERLAY --- */
.manual-overlay {
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
}

.manual-input-container {
    display: flex;
    gap: 5px;
    width: 100%;
}

.manual-segment {
    background: #111;
    color: #fff;
    border: 1px solid #444;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.manual-segment:focus {
    border-color: var(--accent-cyan);
    background: rgba(0, 242, 255, 0.1);
    outline: none;
}

.viewfinder-success {
    border-color: #00ff00 !important;
    box-shadow: 0 0 20px #00ff00;
}
#calc-container .glass-panel {
    overflow: visible !important;
    transform: translateZ(0);
}
.row-opts select:not(#fall-ratio) {
    flex: none !important;
    width: 100% !important;
    height: 70px !important;
    font-size: 18px !important;
    background: #111;
    color: var(--accent-cyan);
    border: 2px solid var(--accent-cyan);
    font-weight: bold;
    padding: 0 10px;
    display: block !important;
    box-sizing: border-box;
}

.row-opts > div:not(#gradient-tool):not(#gradient-tool > div):not(#ready-mix-options):not(#self-mix-options) {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px;
    width: 100%;
}
