:root {
    --ingleby-green: #295b3d;
    --ingleby-gold: #d8a84c;
    --background: #f7f7f7;
    --text: #222;
    --muted: #666;
    --border: #d9d9d9;
}
@font-face {
    font-family: 'Digital-7';
    src: url('/fonts/digital-7.ttf') format('truetype');
}

/* ==== BASE ==== */
body {
    margin: 0;
    background: #F5F5EB;
    color: #295B3D;
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* ==== WATERMARK ==== */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('/images/ingleby_sprout.png') no-repeat center;
    background-size: min(35vh, 500px);
    opacity: 0.10;
    pointer-events: none;
}

/* ==== SYSTEM MODE ==== */
.mode-banner {
    position: fixed;
    top: 0;
    width: 100%;
    text-align: center;
    font-weight: bold;
    font-size: 26px;
    padding: 6px;
    z-index: 1000;
}

/* ==== STATUS ==== */
.status-box {
    position: fixed;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #00c800;
}

/* ==== SCALE NAME ==== */
.scale-name {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 50px;
    font-weight: 600;
}

/* ==== CLOCK ==== */
.clock {
    position: fixed;
    bottom: 12px;
    left: 35px;
    font-size: 30px;
}

/* ==== TRAFFIC LIGHT ==== */
.traffic-light {
    position: fixed;
    top: 35px;
    left: 35px;
    width: 70px;
    padding: 14px;
    background: #1a1a1a;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    z-index : 200;
}

.light {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #333;
    opacity: 0.2;
    transition: all 0.2s ease;
}

    .light.on {
        opacity: 1;
    }

    .light.red.on {
        background: #ff2a2a;
        opacity: 1;
        box-shadow: 0 0 18px #ff2a2a;
    }

    .light.yellow.on {
        background: #ffd11a;
        opacity: 1;
        box-shadow: 0 0 18px #ffd11a;
    }

    .light.green.on {
        background: #00cc44;
        opacity: 1;
        box-shadow: 0 0 18px #00cc44;
    }

/* ==== LOGO ==== */
.logo-bottom-center {
    position: fixed;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    height: 80px;
    background: url('/images/ingleby_logo_transparent.png') no-repeat center;
    background-size: contain;
}

/* ==== FOOTER ==== */
.footer {
    position: fixed;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    opacity: 0.6;
}

/* ==== APP ==== */
.app-container {
    position: relative;
    z-index: 1;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.screen {
    display: none;
    text-align: center;
    width: 100%;
    height: 100%;
    max-width: 600px;
    flex-direction: column;
}

.screen.active {
    display: flex;
}

.app-card {
    width: min(90vw, 480px);
    height: min(70vh, 650px);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(6px);
    background: transparent;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.08);
}
.card-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 35px 35px 20px 35px;
}

.card-actions {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: auto;
    box-sizing: border-box;
    padding: 0 35px 35px 35px;
}

.card-actions button {
    width: 100%;
    max-width: 450px;
    margin : 0;
}

.menu-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2000;
}
.card-button {
    width: 100%;
    max-width: 350px;
    padding: 16px 20px;
    font-size: 20px;
    margin: 0 auto;
}
.menu-button {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 26px !important;
}
.app-menu {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    width: 220px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
    z-index: 10000;
}

    .app-menu.open {
        display: block;
    }

    .app-menu button {
        width: 100%;
        margin: 0;
        border-radius: 0;
        font-size: 18px;
        padding: 15px;
    }

.hidden {
    display: none;
}
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5000;
}

.modal-card {
    width: 100%;
    max-width: 550px;
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    width: 40px;
    height: 40px;
    font-size: 18px;
    padding: 0;
    margin: 0;
}

.modal-body {
    margin-top: 20px;
}
.modal.hidden {
    display: none !important;
}

/* ==== WEIGHT ==== */
.weight {
    font-family: 'Digital-7', monospace;
    font-size: 140px;
    line-height: 1;
    margin: 20px 0;
    text-shadow: 0 0 12px rgba(0,0,0,0.15);
}

.nav-ws {
    margin-top: 10px;
    font-size: 18px;
    opacity: 0.7;
}
.nav-processing-panel {
    width: 100%;
    margin-top: 25px;
    font-size: 17px;
    text-align: left;
    opacity: 0.85;
}

.nav-step {
    margin: 6px 0;
}

    .nav-step.pending {
        color: #666;
    }

    .nav-step.done {
        color: #295B3D;
        font-weight: 600;
    }

    .nav-step.error {
        color: #b00020;
        font-weight: 600;
    }

.harvest-actions {
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

    .harvest-actions button:disabled {
        opacity: 0.45;
        cursor: wait;
    }

.nav-progress {
    width: 100%;
    max-width: 350px;
    height: 5px;
    background: rgba(41, 91, 61, 0.18);
    border-radius: 999px;
    overflow: hidden;
}

.nav-progress-bar {
    height: 100%;
    background: #295B3D;
    border-radius: 999px;
}

.nav-progress.running .nav-progress-bar {
    width: 35%;
    animation: navProgressSlide 1.25s linear infinite;
}

.nav-progress.complete .nav-progress-bar {
    width: 100%;
    animation: none;
    transform: none;
    transition: width 0.35s ease;
}

.nav-progress.timeout .nav-progress-bar {
    width: 100%;
    animation: none;
    transform: none;
    background: #FFD11A;
    transition: width 0.35s ease;
}

.nav-progress-text {
    min-height: 18px;
    font-size: 13px;
    color: var(--muted);
    opacity: 0.75;
}

@keyframes navProgressSlide {
    from {
        transform: translateX(-120%);
    }

    to {
        transform: translateX(320%);
    }
}
.gps-status {
    position: fixed;
    bottom: 18px;
    right: 35px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 22px;
    font-weight: 600;
    color: #666;
}

.gps-icon {
    flex-shrink: 0;
}

/* ==== BUTTON ==== */
button {
    width: 100%;
    padding: 25px;
    margin-top: 20px;
    font-size: 28px;
    border: none;
    border-radius: 10px;
    background: #295B3D;
    color: white;
}

button {
    box-shadow: 0 4px 0 rgba(0,0,0,0.25);
}

    button:active {
        transform: translateY(4px);
        box-shadow: 0 1px 0 rgba(0,0,0,0.25);
    }
    /* Mouse + touch press */
    button:active {
        transform: translateY(3px);
        box-shadow: inset 0 3px 8px rgba(0,0,0,0.35);
        filter: brightness(0.92);
    }

    button:hover {
        filter: brightness(1.05);
    }
    button:disabled {
        opacity: 0.85;
        cursor: wait;
    }
/* ==== INPUT ==== */
input {
    width: 100%;
    padding: 20px;
    font-size: 24px;
    margin-top: 20px;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.done-message {
    margin-top: 15px;
    font-size: 24px;
}

.cooldown-progress {
    position: relative;
    width: 100%;
    max-width: 350px;
    height: 32px;
    background: rgba(41,91,61,0.15);
    border-radius: 999px;
    overflow: hidden;
}

.cooldown-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: rgba(41,91,61,0.35);
    transition: width 1s linear;
}

.cooldown-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #295B3D;
    z-index: 10;
}
.cooldown-text {
    margin-top: 12px;
    font-size: 14px;
    opacity: 0.7;
}
