/* ========================================
   RESET
======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: #07100d;
    color: #f2f7f4;
    line-height: 1.6;
    min-width: 320px;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.hidden {
    display: none !important;
}


/* ========================================
   NAVBAR
======================================== */

.navbar {
    width: 100%;
    height: 78px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 6%;

    border-bottom:
        1px solid rgba(255,255,255,0.07);

    background:
        rgba(7,16,13,0.85);

    backdrop-filter: blur(18px);

    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 9px;

    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;

    flex-shrink: 0;
}

.logo > span:last-child > span {
    color: #4ade80;
}

.logo-icon {
    color: #4ade80;
    font-size: 25px;
}

.nav-links {
    display: flex;
    gap: 34px;

    color: #9daaa4;
    font-size: 14px;
}

.nav-links a {
    transition:
        color 0.25s ease;
}

.nav-links a:hover {
    color: #ffffff;
}

.language-selector {
    position: relative;
    flex-shrink: 0;
}

.language-button {
    background: transparent;

    border:
        1px solid rgba(255,255,255,0.12);

    color: #d7e2dc;

    padding: 9px 15px;

    border-radius: 10px;

    font-size: 13px;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.language-button:hover {
    background:
        rgba(255,255,255,0.04);

    border-color:
        rgba(74,222,128,0.25);
}

.language-button:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.match-select-button:focus-visible,
.map-control-button:focus-visible {
    outline:
        2px solid rgba(74,222,128,0.7);

    outline-offset: 3px;
}


/* ========================================
   HERO
======================================== */

.hero {
    min-height: 720px;

    display: grid;
    grid-template-columns:
        minmax(0, 1.05fr)
        minmax(0, 0.95fr);

    align-items: center;

    gap: 70px;

    padding: 100px 8% 90px;

    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";

    position: absolute;

    width: 650px;
    height: 650px;

    background:
        rgba(34,197,94,0.08);

    filter: blur(120px);

    border-radius: 50%;

    top: 50px;
    left: -250px;

    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;

    min-width: 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    padding: 8px 13px;

    border:
        1px solid rgba(74,222,128,0.18);

    background:
        rgba(74,222,128,0.05);

    border-radius: 999px;

    color: #9fb3a7;

    font-size: 12px;

    margin-bottom: 28px;
}

.status-dot {
    width: 7px;
    height: 7px;

    flex: 0 0 7px;

    border-radius: 50%;

    background: #4ade80;

    box-shadow:
        0 0 12px rgba(74,222,128,0.8);
}

.hero h1 {
    max-width: 760px;

    font-size:
        clamp(52px, 6vw, 88px);

    line-height: 0.98;

    letter-spacing: -5px;

    font-weight: 850;

    overflow-wrap: break-word;
}

.hero h1 span {
    display: block;
    color: #4ade80;
}

.hero-description {
    max-width: 570px;

    margin-top: 30px;

    color: #98a8a0;

    font-size: 18px;

    line-height: 1.8;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-top: 38px;
}

.primary-button,
.secondary-button {
    border-radius: 12px;

    padding: 14px 21px;

    border: none;

    font-weight: 700;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease;

    -webkit-tap-highlight-color: transparent;
}

.primary-button {
    background: #4ade80;
    color: #061009;

    box-shadow:
        0 10px 30px rgba(74,222,128,0.14);
}

.primary-button:hover:not(:disabled) {
    transform: translateY(-2px);

    box-shadow:
        0 15px 35px rgba(74,222,128,0.25);
}

.primary-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.primary-button span {
    margin-left: 8px;
}

.secondary-button {
    background:
        rgba(255,255,255,0.04);

    color: #d9e3de;

    border:
        1px solid rgba(255,255,255,0.1);
}

.secondary-button:hover {
    transform: translateY(-2px);

    background:
        rgba(255,255,255,0.07);
}

.hero-trust {
    display: flex;

    gap: 35px;

    margin-top: 55px;
}

.hero-trust div {
    display: flex;
    flex-direction: column;

    min-width: 0;
}

.hero-trust strong {
    font-size: 23px;
}

.hero-trust span {
    color: #687770;

    font-size: 11px;

    text-transform: uppercase;

    letter-spacing: 1px;
}


/* ========================================
   INTELLIGENCE CARD
======================================== */

.hero-visual {
    position: relative;

    display: flex;
    justify-content: center;

    min-width: 0;
}

.intelligence-card {
    width: min(100%, 530px);

    padding: 24px;

    border:
        1px solid rgba(255,255,255,0.09);

    border-radius: 24px;

    background:
        linear-gradient(
            145deg,
            rgba(21,35,29,0.96),
            rgba(9,19,15,0.96)
        );

    box-shadow:
        0 35px 80px rgba(0,0,0,0.35);

    position: relative;

    overflow: hidden;
}

.intelligence-card::before {
    content: "";

    position: absolute;

    width: 250px;
    height: 250px;

    border-radius: 50%;

    background:
        rgba(74,222,128,0.06);

    filter: blur(50px);

    top: -100px;
    right: -70px;

    pointer-events: none;
}

.card-header {
    display: flex;

    justify-content: space-between;
    align-items: flex-start;

    gap: 15px;

    margin-bottom: 24px;

    position: relative;
    z-index: 1;
}

.mini-label,
.eyebrow {
    color: #4ade80;

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 2px;
}

.card-header h3 {
    margin-top: 6px;

    font-size: 20px;
}

.live-indicator {
    font-size: 9px;

    color: #4ade80;

    border:
        1px solid rgba(74,222,128,0.2);

    padding: 5px 8px;

    border-radius: 6px;

    white-space: nowrap;
}


/* ========================================
   ALERT
======================================== */

.rescue-alert {
    display: grid;

    grid-template-columns:
        auto
        minmax(0, 1fr)
        auto;

    gap: 14px;

    align-items: center;

    padding: 16px;

    background:
        rgba(255,255,255,0.035);

    border:
        1px solid rgba(255,255,255,0.07);

    border-radius: 15px;
}

.food-icon {
    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    background:
        rgba(74,222,128,0.09);

    border-radius: 12px;

    font-size: 24px;
}

.alert-content {
    display: flex;
    flex-direction: column;

    min-width: 0;
}

.alert-label {
    font-size: 9px;

    color: #facc15;

    letter-spacing: 1.4px;
}

.alert-content strong {
    margin: 3px 0;

    font-size: 14px;

    overflow-wrap: anywhere;
}

.alert-content span:last-child {
    color: #718079;
    font-size: 10px;
}

.priority {
    text-align: right;
}

.priority span {
    display: block;

    font-size: 8px;

    color: #6f7d76;

    letter-spacing: 1px;
}

.priority strong {
    color: #facc15;

    font-size: 24px;
}


/* ========================================
   MATCHING HERO
======================================== */

.matching-section {
    margin-top: 22px;
}

.section-title {
    color: #788780;

    font-size: 10px;

    text-transform: uppercase;

    letter-spacing: 1.5px;

    margin-bottom: 10px;
}

.match {
    display: grid;

    grid-template-columns:
        auto
        minmax(0, 1fr)
        auto;

    align-items: center;

    gap: 11px;

    padding: 12px;

    border-bottom:
        1px solid rgba(255,255,255,0.06);
}

.match-avatar {
    width: 35px;
    height: 35px;

    display: grid;
    place-items: center;

    border-radius: 10px;

    background:
        rgba(74,222,128,0.08);

    color: #4ade80;

    font-size: 12px;

    font-weight: 800;
}

.match-info {
    display: flex;
    flex-direction: column;

    min-width: 0;
}

.match-info strong {
    font-size: 12px;

    overflow-wrap: anywhere;
}

.match-info span {
    color: #697770;

    font-size: 9px;

    overflow-wrap: anywhere;
}

.match-score {
    color: #4ade80;

    font-size: 12px;

    font-weight: 800;
}


/* ========================================
   PROGRESS
======================================== */

.rescue-progress {
    margin-top: 22px;
}

.progress-header {
    display: flex;

    justify-content: space-between;

    gap: 10px;

    color: #7e8c85;

    font-size: 10px;

    margin-bottom: 8px;
}

.progress-header strong {
    color: #4ade80;
}

.progress-bar {
    width: 100%;
    height: 5px;

    background:
        rgba(255,255,255,0.07);

    border-radius: 999px;

    overflow: hidden;
}

.progress-value {
    width: 68%;
    height: 100%;

    background: #4ade80;

    border-radius: inherit;
}


/* ========================================
   GENERAL SECTIONS
======================================== */

.impact-section,
.how-section {
    padding: 120px 8%;
}

.section-heading {
    max-width: 650px;

    margin-bottom: 55px;
}

.section-heading h2 {
    font-size:
        clamp(36px, 4vw, 58px);

    line-height: 1.05;

    letter-spacing: -2.5px;

    margin-top: 12px;
}

.section-heading p {
    color: #82918a;

    margin-top: 18px;

    max-width: 560px;
}


/* ========================================
   IMPACT
======================================== */

.impact-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 15px;
}

.impact-card {
    min-height: 180px;

    padding: 25px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    background:
        rgba(255,255,255,0.025);

    border:
        1px solid rgba(255,255,255,0.07);

    border-radius: 18px;

    min-width: 0;
}

.impact-icon {
    font-size: 24px;
}

.impact-card strong {
    font-size: 32px;

    overflow-wrap: anywhere;
}

.impact-card > span:last-child {
    color: #77867f;

    font-size: 12px;
}


/* ========================================
   HOW IT WORKS
======================================== */

.steps {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;
}

.step-card {
    min-height: 300px;

    padding: 28px;

    border-radius: 20px;

    background:
        rgba(255,255,255,0.025);

    border:
        1px solid rgba(255,255,255,0.07);

    position: relative;

    min-width: 0;
}

.step-number {
    position: absolute;

    top: 20px;
    right: 22px;

    color: #34443c;

    font-size: 28px;

    font-weight: 900;
}

.step-icon {
    font-size: 32px;

    margin-bottom: 55px;
}

.step-card h3 {
    font-size: 23px;

    margin-bottom: 12px;
}

.step-card p {
    color: #77867f;

    font-size: 14px;

    line-height: 1.7;
}


/* ========================================
   NETWORK
======================================== */

.network-section {
    min-height: 650px;

    display: grid;

    grid-template-columns:
        minmax(0, 0.8fr)
        minmax(0, 1.2fr);

    align-items: center;

    gap: 50px;

    padding: 100px 8%;

    background:
        radial-gradient(
            circle at 70% 50%,
            rgba(74,222,128,0.08),
            transparent 35%
        );
}

.network-content {
    min-width: 0;
}

.network-content h2 {
    max-width: 550px;

    font-size:
        clamp(42px, 5vw, 70px);

    line-height: 1;

    letter-spacing: -3px;

    margin: 15px 0 25px;
}

.network-content p {
    max-width: 470px;

    color: #7e8d86;

    margin-bottom: 30px;
}

.network-visual {
    width: 480px;
    height: 480px;

    position: relative;

    margin: auto;

    max-width: 100%;
}

.network-node {
    position: absolute;

    display: grid;

    place-items: center;

    border-radius: 50%;

    border:
        1px solid rgba(74,222,128,0.25);

    background:
        rgba(10,28,19,0.95);

    box-shadow:
        0 0 40px rgba(74,222,128,0.05);
}

.node-center {
    width: 130px;
    height: 130px;

    top: 175px;
    left: 175px;

    color: #4ade80;

    font-size: 12px;

    font-weight: 900;

    text-align: center;

    letter-spacing: 1px;
}

.node-one,
.node-two,
.node-three,
.node-four {
    width: 70px;
    height: 70px;

    font-size: 24px;
}

.node-one {
    top: 35px;
    left: 205px;
}

.node-two {
    right: 30px;
    top: 205px;
}

.node-three {
    bottom: 35px;
    left: 205px;
}

.node-four {
    left: 30px;
    top: 205px;
}

.network-line {
    position: absolute;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(74,222,128,0.35),
            transparent
        );

    transform-origin: center;
}

.line-one {
    width: 150px;

    top: 205px;
    left: 165px;

    transform: rotate(-90deg);
}

.line-two {
    width: 150px;

    top: 240px;
    left: 165px;

    transform: rotate(0deg);
}

.line-three {
    width: 150px;

    top: 275px;
    left: 165px;

    transform: rotate(90deg);
}

.line-four {
    width: 150px;

    top: 240px;
    left: 165px;

    transform: rotate(180deg);
}


/* ========================================
   FOOTER
======================================== */

footer {
    padding: 45px 8%;

    border-top:
        1px solid rgba(255,255,255,0.07);

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    color: #65736d;

    font-size: 11px;
}

.footer-logo {
    color: #dce6e1;

    font-size: 15px;

    font-weight: 800;
}


/* ========================================
   SURPLUS SUBMISSION
======================================== */

.submission-section {
    padding: 120px 8%;

    border-top:
        1px solid rgba(255,255,255,0.06);
}

.submission-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 0.8fr);

    gap: 25px;

    align-items: start;
}


/* ========================================
   FORM
======================================== */

.surplus-form {
    padding: 30px;

    background:
        rgba(255,255,255,0.025);

    border:
        1px solid rgba(255,255,255,0.07);

    border-radius: 22px;

    min-width: 0;
}

.form-group {
    display: flex;

    flex-direction: column;

    gap: 8px;

    margin-bottom: 20px;
}

.form-group label {
    color: #aab7b1;

    font-size: 12px;

    font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;

    padding: 13px 14px;

    border-radius: 10px;

    border:
        1px solid rgba(255,255,255,0.09);

    background:
        rgba(0,0,0,0.18);

    color: #e8f0ec;

    outline: none;

    font: inherit;

    transition:
        border-color 0.2s ease,
        background 0.2s ease;

    color-scheme: dark;
}

.form-group select option {
    background: #0b1711;
    color: #e8f0ec;
}

.form-group textarea {
    resize: vertical;

    min-height: 110px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color:
        rgba(74,222,128,0.5);

    background:
        rgba(74,222,128,0.025);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #526159;
}

.form-row {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 15px;
}

.submit-button {
    width: 100%;

    margin-top: 5px;
}


/* ========================================
   ANALYSIS RESULT
======================================== */

.analysis-result {
    min-height: 520px;

    padding: 30px;

    border-radius: 22px;

    border:
        1px solid rgba(74,222,128,0.12);

    background:
        linear-gradient(
            145deg,
            rgba(17,34,25,0.9),
            rgba(8,18,13,0.9)
        );

    position: sticky;

    top: 100px;

    min-width: 0;
}

.result-empty {
    min-height: 450px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;
}

.result-icon {
    width: 75px;
    height: 75px;

    display: grid;

    place-items: center;

    border-radius: 20px;

    background:
        rgba(74,222,128,0.08);

    font-size: 32px;

    margin-bottom: 22px;
}

.result-empty h3 {
    font-size: 22px;

    margin-bottom: 10px;
}

.result-empty p {
    max-width: 330px;

    color: #718078;

    font-size: 13px;
}


/* ========================================
   RESULT CONTENT
======================================== */

.result-label {
    color: #4ade80;

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 2px;
}

.priority-score {
    display: flex;

    align-items: baseline;

    gap: 7px;

    margin-top: 10px;
}

.priority-score strong {
    font-size: 82px;

    line-height: 1;

    letter-spacing: -5px;

    overflow-wrap: anywhere;
}

.priority-score span {
    color: #65746d;

    font-size: 16px;
}

.priority-level {
    display: inline-block;

    margin-top: 12px;

    padding: 6px 10px;

    border-radius: 7px;

    background:
        rgba(250,204,21,0.08);

    color: #facc15;

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 1px;
}

.result-divider {
    height: 1px;

    background:
        rgba(255,255,255,0.07);

    margin: 25px 0;
}

.result-factors {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 18px;
}

.result-factors div {
    display: flex;

    flex-direction: column;

    gap: 4px;

    min-width: 0;
}

.result-factors span {
    color: #64736b;

    font-size: 10px;

    text-transform: uppercase;

    letter-spacing: 1px;
}

.result-factors strong {
    color: #d9e5df;

    font-size: 13px;

    overflow-wrap: anywhere;
}

.recommendation {
    margin-top: 28px;

    padding: 17px;

    border-radius: 13px;

    background:
        rgba(74,222,128,0.05);

    border:
        1px solid rgba(74,222,128,0.1);
}

.recommendation > span {
    color: #4ade80;

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.5px;
}

.recommendation p {
    margin-top: 7px;

    color: #aebbb5;

    font-size: 13px;

    line-height: 1.6;

    overflow-wrap: anywhere;
}


/* ========================================
   SMART MATCHING
======================================== */

.smart-matching {
    margin-top: 28px;

    padding-top: 24px;

    border-top:
        1px solid rgba(255,255,255,0.07);
}

.matching-header {
    display: flex;

    flex-direction: column;

    gap: 5px;

    margin-bottom: 16px;
}

.matching-header span {
    color: #4ade80;

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.7px;
}

.matching-header strong {
    color: #dce7e1;

    font-size: 16px;
}

.matching-results {
    display: flex;

    flex-direction: column;

    gap: 10px;
}

.matching-empty {
    padding: 18px;

    border-radius: 12px;

    background:
        rgba(255,255,255,0.025);

    border:
        1px solid rgba(255,255,255,0.06);

    color: #718078;

    font-size: 12px;

    line-height: 1.6;
}


/* ========================================
   MATCH CARD
======================================== */

.match-result-card {
    display: grid;

    grid-template-columns:
        auto
        minmax(0, 1fr)
        auto;

    align-items: center;

    gap: 12px;

    padding: 14px;

    border-radius: 13px;

    background:
        rgba(255,255,255,0.025);

    border:
        1px solid rgba(255,255,255,0.07);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;

    min-width: 0;
}

.match-result-card:hover {
    transform: translateY(-2px);

    border-color:
        rgba(74,222,128,0.2);

    background:
        rgba(74,222,128,0.025);
}

.match-result-avatar {
    width: 38px;
    height: 38px;

    display: grid;

    place-items: center;

    border-radius: 10px;

    background:
        rgba(74,222,128,0.08);

    color: #4ade80;

    font-size: 13px;

    font-weight: 800;
}

.match-result-info {
    min-width: 0;

    display: flex;

    flex-direction: column;

    gap: 3px;
}

.match-result-info strong {
    color: #dce7e1;

    font-size: 12px;

    overflow-wrap: anywhere;
}

.match-result-info span {
    color: #697770;

    font-size: 9px;

    overflow-wrap: anywhere;
}

.match-result-reason {
    margin-top: 3px;

    color: #87958e !important;

    font-size: 8px !important;
}

.match-result-score {
    text-align: right;

    min-width: 72px;
}

.match-result-score strong {
    display: block;

    color: #4ade80;

    font-size: 18px;
}

.match-result-score span {
    color: #607069;

    font-size: 8px;

    text-transform: uppercase;

    letter-spacing: 0.8px;
}


/* ========================================
   MATCH SELECT BUTTON
======================================== */

.match-select-button {
    display: inline-block;

    margin-top: 7px;

    padding: 5px 8px;

    border:
        1px solid rgba(74,222,128,0.22);

    border-radius: 6px;

    background:
        rgba(74,222,128,0.06);

    color: #4ade80;

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 0.8px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.match-select-button:hover {
    background:
        rgba(74,222,128,0.12);

    border-color:
        rgba(74,222,128,0.4);

    transform: translateY(-1px);
}


/* ========================================
   RESCUE OPERATION
======================================== */

.rescue-operation {
    margin-top: 20px;

    padding: 20px;

    border-radius: 15px;

    background:
        rgba(74,222,128,0.035);

    border:
        1px solid rgba(74,222,128,0.14);
}

.operation-header {
    display: flex;

    flex-direction: column;

    gap: 5px;

    margin-bottom: 20px;
}

.operation-header span {
    color: #4ade80;

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.7px;
}

.operation-header strong {
    color: #dce7e1;

    font-size: 15px;

    overflow-wrap: anywhere;
}

.operation-status {
    display: grid;

    grid-template-columns:
        auto
        minmax(20px, 1fr)
        auto
        minmax(20px, 1fr)
        auto;

    align-items: center;

    gap: 8px;

    margin-bottom: 20px;
}

.status-step {
    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 6px;

    min-width: 55px;

    text-align: center;
}

.status-step > span {
    width: 28px;
    height: 28px;

    display: grid;

    place-items: center;

    border-radius: 50%;

    background:
        rgba(255,255,255,0.05);

    border:
        1px solid rgba(255,255,255,0.08);

    color: #65746d;

    font-size: 10px;

    font-weight: 800;
}

.status-step strong {
    color: #64736b;

    font-size: 7px;

    letter-spacing: 0.8px;
}

.status-step.active > span {
    background:
        rgba(74,222,128,0.12);

    border-color:
        rgba(74,222,128,0.3);

    color: #4ade80;
}

.status-step.active strong {
    color: #4ade80;
}

.status-line {
    height: 1px;

    background:
        rgba(255,255,255,0.08);
}

#startRescueButton {
    width: 100%;
}


/* ========================================
   COMMAND CENTER
======================================== */

.command-center-section {
    padding: 120px 8%;

    border-top:
        1px solid rgba(255,255,255,0.06);

    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(74,222,128,0.045),
            transparent 30%
        );
}

.command-center-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.15fr)
        minmax(0, 0.85fr);

    gap: 20px;

    margin-bottom: 20px;
}

.command-card,
.history-card {
    padding: 28px;

    border-radius: 22px;

    background:
        rgba(255,255,255,0.025);

    border:
        1px solid rgba(255,255,255,0.07);

    min-width: 0;
}

.command-card-header {
    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 20px;

    margin-bottom: 25px;
}

.command-label {
    display: block;

    color: #4ade80;

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.7px;

    margin-bottom: 6px;
}

.command-card-header h3 {
    font-size: 20px;
}

.operation-badge {
    padding: 6px 9px;

    border-radius: 7px;

    background:
        rgba(255,255,255,0.04);

    color: #7c8983;

    border:
        1px solid rgba(255,255,255,0.08);

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 1px;

    white-space: nowrap;
}

.operation-badge.live {
    color: #4ade80;

    border-color:
        rgba(74,222,128,0.25);

    background:
        rgba(74,222,128,0.07);
}

.operation-badge.completed {
    color: #86efac;

    border-color:
        rgba(134,239,172,0.25);

    background:
        rgba(134,239,172,0.06);
}

.command-empty {
    min-height: 220px;

    display: grid;

    place-items: center;

    text-align: center;

    color: #697770;

    font-size: 12px;

    line-height: 1.7;

    padding: 20px;
}

.command-organization {
    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 22px;
}

.command-avatar {
    width: 44px;
    height: 44px;

    display: grid;

    place-items: center;

    border-radius: 12px;

    background:
        rgba(74,222,128,0.09);

    color: #4ade80;

    font-size: 11px;

    font-weight: 900;

    flex-shrink: 0;
}

.command-organization div:last-child {
    display: flex;

    flex-direction: column;

    gap: 2px;

    min-width: 0;
}

.command-organization strong {
    font-size: 13px;

    overflow-wrap: anywhere;
}

.command-organization span {
    color: #687770;

    font-size: 9px;
}

.command-facts {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 10px;

    margin-bottom: 25px;
}

.command-facts div {
    padding: 13px;

    border-radius: 12px;

    background:
        rgba(255,255,255,0.025);

    border:
        1px solid rgba(255,255,255,0.05);

    min-width: 0;
}

.command-facts span {
    display: block;

    color: #627169;

    font-size: 8px;

    text-transform: uppercase;

    letter-spacing: 0.8px;

    margin-bottom: 5px;
}

.command-facts strong {
    color: #dce7e1;

    font-size: 11px;

    overflow-wrap: anywhere;
}

.command-timeline {
    display: flex;

    align-items: center;

    gap: 10px;
}

.command-step {
    display: flex;

    align-items: center;

    gap: 8px;

    flex: 1;

    opacity: 0.45;

    min-width: 0;
}

.command-step.active {
    opacity: 1;
}

.command-step > span {
    width: 27px;
    height: 27px;

    flex:
        0 0 27px;

    display: grid;

    place-items: center;

    border-radius: 50%;

    background:
        rgba(255,255,255,0.05);

    border:
        1px solid rgba(255,255,255,0.08);

    color: #718078;

    font-size: 9px;

    font-weight: 800;
}

.command-step.active > span {
    color: #4ade80;

    border-color:
        rgba(74,222,128,0.3);

    background:
        rgba(74,222,128,0.09);
}

.command-step div {
    display: flex;

    flex-direction: column;

    gap: 2px;

    min-width: 0;
}

.command-step strong {
    color: #b7c5be;

    font-size: 8px;

    letter-spacing: 0.8px;
}

.command-step small {
    color: #637169;

    font-size: 7px;
}


/* ========================================
   PERFORMANCE
======================================== */

.performance-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 12px;
}

.performance-item {
    min-height: 110px;

    padding: 18px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    border-radius: 14px;

    background:
        rgba(255,255,255,0.025);

    border:
        1px solid rgba(255,255,255,0.05);

    min-width: 0;
}

.performance-item strong {
    color: #4ade80;

    font-size: 27px;

    overflow-wrap: anywhere;
}

.performance-item span {
    color: #697770;

    font-size: 9px;

    text-transform: uppercase;

    letter-spacing: 0.7px;
}


/* ========================================
   HISTORY
======================================== */

.history-card {
    margin-top: 20px;
}

.rescue-history {
    display: flex;

    flex-direction: column;

    gap: 10px;
}

.history-empty {
    padding: 25px;

    text-align: center;

    border-radius: 13px;

    background:
        rgba(255,255,255,0.02);

    border:
        1px solid rgba(255,255,255,0.05);

    color: #697770;

    font-size: 11px;
}

.history-item {
    display: grid;

    grid-template-columns:
        auto
        minmax(0, 1fr)
        auto;

    align-items: center;

    gap: 13px;

    padding: 15px;

    border-radius: 13px;

    background:
        rgba(255,255,255,0.025);

    border:
        1px solid rgba(255,255,255,0.06);
}

.history-icon {
    width: 38px;
    height: 38px;

    display: grid;

    place-items: center;

    border-radius: 10px;

    background:
        rgba(74,222,128,0.08);

    color: #4ade80;

    font-size: 16px;
}

.history-main {
    min-width: 0;

    display: flex;

    flex-direction: column;

    gap: 3px;
}

.history-main strong {
    color: #dce7e1;

    font-size: 12px;

    overflow-wrap: anywhere;
}

.history-main span {
    color: #697770;

    font-size: 9px;

    overflow-wrap: anywhere;
}

.history-meta {
    text-align: right;

    white-space: nowrap;
}

.history-meta strong {
    display: block;

    color: #4ade80;

    font-size: 13px;
}

.history-meta span {
    color: #64736b;

    font-size: 8px;
}


/* ========================================
   ADVANCED INTELLIGENCE
======================================== */

.advanced-intelligence {
    margin-top: 20px;

    padding: 28px;

    border-radius: 22px;

    background:
        linear-gradient(
            145deg,
            rgba(16,31,23,0.92),
            rgba(8,18,13,0.96)
        );

    border:
        1px solid rgba(74,222,128,0.12);

    box-shadow:
        0 25px 60px rgba(0,0,0,0.18);

    min-width: 0;
}

.advanced-header {
    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 20px;

    margin-bottom: 22px;
}

.advanced-header h3 {
    font-size: 21px;

    margin-top: 4px;
}

.ai-confidence {
    padding: 7px 10px;

    border-radius: 8px;

    border:
        1px solid rgba(255,255,255,0.08);

    color: #697770;

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 1px;

    white-space: nowrap;
}

.ai-confidence.ready {
    color: #4ade80;

    border-color:
        rgba(74,222,128,0.25);

    background:
        rgba(74,222,128,0.06);
}

.advanced-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 12px;
}

.advanced-card {
    min-height: 190px;

    padding: 18px;

    border-radius: 15px;

    background:
        rgba(255,255,255,0.025);

    border:
        1px solid rgba(255,255,255,0.06);

    min-width: 0;
}

.advanced-card-label {
    display: block;

    color: #4ade80;

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 1.3px;

    margin-bottom: 12px;
}

.advanced-card h4 {
    color: #dce7e1;

    font-size: 13px;

    line-height: 1.5;

    margin-bottom: 10px;

    overflow-wrap: anywhere;
}

.advanced-card p {
    color: #718078;

    font-size: 10px;

    line-height: 1.7;

    overflow-wrap: anywhere;
}


/* ========================================
   SIGNALS
======================================== */

.signal-list {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;
}

.signal-pill,
.signal-good {
    display: inline-flex;

    align-items: center;

    padding: 6px 8px;

    border-radius: 7px;

    background:
        rgba(250,204,21,0.06);

    border:
        1px solid rgba(250,204,21,0.14);

    color: #facc15;

    font-size: 8px;

    overflow-wrap: anywhere;
}

.signal-good {
    background:
        rgba(74,222,128,0.05);

    border-color:
        rgba(74,222,128,0.12);

    color: #78d995;
}

.signal-empty {
    color: #65746d;

    font-size: 9px;
}


/* ========================================
   FORECAST
======================================== */

.forecast-value {
    color: #4ade80;

    font-size: 34px;

    line-height: 1;

    font-weight: 850;

    letter-spacing: -1px;

    margin: 12px 0 6px;

    overflow-wrap: anywhere;
}

.forecast-trend {
    color: #9aaba2;

    font-size: 8px;

    letter-spacing: 0.7px;

    text-transform: uppercase;

    overflow-wrap: anywhere;
}


/* ========================================
   OPERATION IMPACT
======================================== */

.operation-impact-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 9px;
}

.operation-impact-grid div {
    padding: 11px;

    border-radius: 10px;

    background:
        rgba(255,255,255,0.025);

    border:
        1px solid rgba(255,255,255,0.05);

    min-width: 0;
}

.operation-impact-grid strong {
    display: block;

    color: #4ade80;

    font-size: 18px;

    margin-bottom: 3px;

    overflow-wrap: anywhere;
}

.operation-impact-grid span {
    color: #66756e;

    font-size: 7px;

    text-transform: uppercase;

    letter-spacing: 0.6px;
}


/* ========================================
   LIVE RESCUE MAP
======================================== */

.map-section {
    padding: 120px 8%;

    border-top:
        1px solid rgba(255,255,255,0.06);
}

.map-shell {
    position: relative;

    width: 100%;

    min-height: 560px;

    overflow: hidden;

    border-radius: 24px;

    border:
        1px solid rgba(74,222,128,0.16);

    background: #07100d;

    box-shadow:
        0 30px 80px rgba(0,0,0,0.3);
}

.rescue-map {
    width: 100%;

    height: 560px;
}

.map-overlay {
    position: absolute;

    top: 18px;

    left: 18px;

    right: 18px;

    z-index: 500;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 10px;

    pointer-events: none;
}

.map-status,
.map-control-button {
    pointer-events: auto;
}

.map-status {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    padding: 9px 12px;

    border-radius: 9px;

    background:
        rgba(7,16,13,0.88);

    border:
        1px solid rgba(255,255,255,0.1);

    backdrop-filter: blur(12px);

    color: #4ade80;

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 1.2px;

    white-space: nowrap;
}

.map-control-button {
    padding: 9px 12px;

    border-radius: 9px;

    border:
        1px solid rgba(74,222,128,0.2);

    background:
        rgba(7,16,13,0.9);

    color: #dbe7e1;

    font-size: 9px;

    font-weight: 700;

    cursor: pointer;

    backdrop-filter: blur(12px);

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.map-control-button:hover {
    background:
        rgba(74,222,128,0.08);

    border-color:
        rgba(74,222,128,0.4);

    transform: translateY(-1px);
}

.map-popup {
    display: flex;

    flex-direction: column;

    gap: 4px;

    min-width: 170px;
}

.map-popup strong {
    font-size: 13px;
}

.map-popup span {
    font-size: 10px;
}

.leaflet-container {
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


/* ========================================
   WEATHER INTELLIGENCE
======================================== */

.weather-intelligence {
    margin-top: 20px;

    padding: 28px;

    border-radius: 22px;

    background:
        linear-gradient(
            145deg,
            rgba(14,30,22,0.94),
            rgba(7,17,12,0.96)
        );

    border:
        1px solid rgba(74,222,128,0.1);

    min-width: 0;
}

.weather-header {
    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 20px;

    margin-bottom: 20px;
}

.weather-header h3 {
    margin-top: 4px;

    font-size: 21px;
}

.weather-risk-badge {
    padding: 7px 10px;

    border-radius: 7px;

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 1px;

    border:
        1px solid rgba(255,255,255,0.08);

    color: #8b9891;

    white-space: nowrap;
}

.weather-risk-badge.medium {
    color: #facc15;

    border-color:
        rgba(250,204,21,0.2);

    background:
        rgba(250,204,21,0.05);
}

.weather-risk-badge.high {
    color: #fb7185;

    border-color:
        rgba(251,113,133,0.2);

    background:
        rgba(251,113,133,0.05);
}

.weather-risk-badge.low {
    color: #4ade80;

    border-color:
        rgba(74,222,128,0.2);

    background:
        rgba(74,222,128,0.05);
}

.weather-location {
    display: flex;

    align-items: baseline;

    flex-wrap: wrap;

    gap: 8px;

    margin-bottom: 18px;
}

.weather-location strong {
    color: #dce7e1;

    font-size: 14px;

    overflow-wrap: anywhere;
}

.weather-location span {
    color: #65746d;

    font-size: 9px;
}

.weather-metrics {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 10px;
}

.weather-metric {
    padding: 16px;

    border-radius: 13px;

    background:
        rgba(255,255,255,0.025);

    border:
        1px solid rgba(255,255,255,0.05);

    min-width: 0;
}

.weather-metric span {
    display: block;

    color: #66756e;

    font-size: 8px;

    text-transform: uppercase;

    letter-spacing: 0.7px;

    margin-bottom: 8px;
}

.weather-metric strong {
    color: #dce7e1;

    font-size: 20px;

    overflow-wrap: anywhere;
}

.weather-risk-bar {
    margin-top: 20px;
}

.weather-risk-bar > div:first-child {
    display: flex;

    justify-content: space-between;

    gap: 10px;

    margin-bottom: 8px;

    color: #74827b;

    font-size: 9px;
}

.weather-risk-bar strong {
    color: #4ade80;
}

.weather-progress {
    width: 100%;

    height: 6px;

    border-radius: 999px;

    background:
        rgba(255,255,255,0.06);

    overflow: hidden;
}

.weather-progress div {
    height: 100%;

    border-radius: inherit;

    background: #4ade80;

    transition:
        width 0.6s ease;
}

.weather-factors {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;

    margin-top: 18px;
}

.weather-factors span {
    padding: 6px 8px;

    border-radius: 7px;

    color: #facc15;

    background:
        rgba(250,204,21,0.05);

    border:
        1px solid rgba(250,204,21,0.12);

    font-size: 8px;

    overflow-wrap: anywhere;
}

.weather-factors .weather-safe {
    color: #4ade80;

    background:
        rgba(74,222,128,0.05);

    border-color:
        rgba(74,222,128,0.12);
}

.weather-recommendation {
    margin-top: 18px;

    padding: 15px;

    border-radius: 12px;

    background:
        rgba(74,222,128,0.035);

    border:
        1px solid rgba(74,222,128,0.08);
}

.weather-recommendation p {
    margin: 0 0 7px;

    color: #a5b4ad;

    font-size: 10px;

    line-height: 1.6;

    overflow-wrap: anywhere;
}

.weather-recommendation p:last-child {
    margin-bottom: 0;
}


/* ========================================
   RTL
======================================== */

html[dir="rtl"] body {
    direction: rtl;
}

html[dir="rtl"] .nav-links {
    direction: rtl;
}

html[dir="rtl"] .hero-actions {
    flex-direction: row-reverse;

    justify-content: flex-start;
}

html[dir="rtl"] .hero-trust {
    direction: rtl;
}

html[dir="rtl"] .priority {
    text-align: left;
}

html[dir="rtl"] .matching-header,
html[dir="rtl"] .operation-header {
    text-align: right;
}

html[dir="rtl"] .match-result-score,
html[dir="rtl"] .history-meta {
    text-align: left;
}

html[dir="rtl"] .map-overlay {
    direction: rtl;
}

html[dir="rtl"] .command-card-header,
html[dir="rtl"] .weather-header,
html[dir="rtl"] .advanced-header {
    direction: rtl;
}

html[dir="rtl"] .step-number {
    right: auto;
    left: 22px;
}

html[dir="rtl"] .foodrescue-language-menu {
    right: auto;
    left: 0;
}

html[dir="rtl"] .foodrescue-language-menu button {
    text-align: right;
}


/* ========================================
   RESPONSIVE — 1100
======================================== */

@media (max-width: 1100px) {

    .nav-links {
        gap: 22px;
    }

    .hero {
        gap: 40px;
    }

    .advanced-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .command-center-grid {
        grid-template-columns:
            minmax(0, 1fr);
    }

}


/* ========================================
   RESPONSIVE — 1000
======================================== */

@media (max-width: 1000px) {

    .hero {
        grid-template-columns: 1fr;

        padding-top: 70px;
    }

    .hero-visual {
        margin-top: 20px;
    }

    .impact-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .network-section {
        grid-template-columns: 1fr;
    }

}


/* ========================================
   RESPONSIVE — 900
======================================== */

@media (max-width: 900px) {

    .submission-layout {
        grid-template-columns: 1fr;
    }

    .analysis-result {
        position: static;
    }

    .command-facts {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .weather-metrics {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* ========================================
   RESPONSIVE — 800
======================================== */

@media (max-width: 800px) {

    .hero h1 {
        font-size:
            clamp(48px, 9vw, 72px);
    }

    .network-visual {
        width: 420px;
        height: 420px;
    }

    .node-center {
        width: 115px;
        height: 115px;

        top: 152px;
        left: 152px;
    }

    .node-one {
        top: 25px;
        left: 175px;
    }

    .node-two {
        right: 25px;
        top: 175px;
    }

    .node-three {
        bottom: 25px;
        left: 175px;
    }

    .node-four {
        left: 25px;
        top: 175px;
    }

    .line-one,
    .line-two,
    .line-three,
    .line-four {
        width: 130px;
        left: 145px;
    }

}


/* ========================================
   RESPONSIVE — 700
======================================== */

@media (max-width: 700px) {

    .navbar {
        height: 70px;

        padding: 0 5%;
    }

    .nav-links {
        display: none;
    }

    .logo {
        font-size: 18px;
    }

    .language-button {
        padding:
            8px 12px;
    }

    .hero {
        padding:
            70px 5% 70px;
    }

    .hero h1 {
        font-size: 52px;

        letter-spacing: -3px;
    }

    .hero-description {
        font-size: 16px;
    }

    .hero-actions {
        flex-direction: column;

        align-items: stretch;
    }

    .hero-actions .primary-button,
    .hero-actions .secondary-button {
        width: 100%;
    }

    .hero-trust {
        gap: 20px;

        justify-content: space-between;
    }

    .hero-trust strong {
        font-size: 20px;
    }

    .hero-trust span {
        font-size: 9px;
    }

    .impact-section,
    .how-section {
        padding:
            80px 5%;
    }

    .impact-grid,
    .steps {
        grid-template-columns: 1fr;
    }

    .network-section {
        padding:
            80px 5%;
    }

    .network-content h2 {
        letter-spacing: -2px;
    }

    .network-visual {
        width: 330px;
        height: 330px;
    }

    .node-center {
        width: 95px;
        height: 95px;

        top: 117px;
        left: 117px;
    }

    .node-one,
    .node-two,
    .node-three,
    .node-four {
        width: 60px;
        height: 60px;

        font-size: 21px;
    }

    .node-one {
        top: 8px;
        left: 135px;
    }

    .node-two {
        right: 4px;
        top: 135px;
    }

    .node-three {
        bottom: 8px;
        left: 135px;
    }

    .node-four {
        left: 4px;
        top: 135px;
    }

    .line-one,
    .line-two,
    .line-three,
    .line-four {
        width: 105px;
        left: 112px;
    }

    .line-one {
        top: 135px;
    }

    .line-two {
        top: 164px;
    }

    .line-three {
        top: 193px;
    }

    .line-four {
        top: 164px;
    }

    .submission-section {
        padding:
            80px 5%;
    }

    .surplus-form,
    .analysis-result {
        padding: 22px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .command-center-section {
        padding:
            80px 5%;
    }

    .command-card,
    .history-card {
        padding: 22px;
    }

    .command-facts {
        grid-template-columns:
            1fr 1fr;
    }

    .command-timeline {
        flex-direction: column;

        align-items: stretch;
    }

    .command-step {
        flex: none;
    }

    .command-connector {
        width: 1px;
        height: 15px;

        margin-left: 13px;
    }

    .history-item {
        grid-template-columns:
            auto
            minmax(0, 1fr);
    }

    .history-meta {
        grid-column: 2;

        text-align: left;

        white-space: normal;
    }

    .advanced-intelligence {
        padding: 22px;
    }

    .advanced-header {
        flex-direction: column;
    }

    .advanced-grid {
        grid-template-columns: 1fr;
    }

    .map-section {
        padding:
            80px 5%;
    }

    .map-shell,
    .rescue-map {
        min-height: 430px;
        height: 430px;
    }

    .map-overlay {
        top: 12px;

        left: 12px;

        right: 12px;
    }

    .map-status,
    .map-control-button {
        font-size: 8px;
    }

    footer {
        flex-direction: column;

        gap: 12px;

        text-align: center;
    }

}


/* ========================================
   RESPONSIVE — 600
======================================== */

@media (max-width: 600px) {

    .intelligence-card {
        padding: 18px;
    }

    .rescue-alert {
        grid-template-columns:
            auto
            minmax(0, 1fr);
    }

    .priority {
        grid-column: 2;

        text-align: left;

        margin-top: -4px;
    }

    .result-factors {
        grid-template-columns: 1fr;
    }

    .match-result-card {
        grid-template-columns:
            auto
            minmax(0, 1fr);
    }

    .match-result-score {
        grid-column: 2;

        text-align: left;

        margin-top: -4px;

        min-width: 0;
    }

    .operation-status {
        grid-template-columns:
            1fr;
    }

    .status-step {
        flex-direction: row;

        justify-content: flex-start;

        text-align: left;
    }

    .status-line {
        width: 1px;

        height: 15px;

        margin-left: 13px;
    }

    .performance-grid {
        grid-template-columns: 1fr;
    }

    .weather-intelligence {
        padding: 22px;
    }

    .weather-metrics {
        grid-template-columns: 1fr;
    }

    .weather-header {
        flex-direction: column;
    }

}


/* ========================================
   RESPONSIVE — 500
======================================== */

@media (max-width: 500px) {

    .hero h1 {
        font-size: 44px;

        letter-spacing: -2.5px;
    }

    .hero-trust {
        gap: 12px;
    }

    .hero-trust strong {
        font-size: 18px;
    }

    .hero-trust span {
        font-size: 8px;

        letter-spacing: 0.7px;
    }

    .priority-score strong {
        font-size: 68px;
    }

    .command-card-header {
        flex-direction: column;
    }

    .operation-badge,
    .ai-confidence,
    .weather-risk-badge {
        align-self: flex-start;
    }

    .command-facts {
        grid-template-columns: 1fr;
    }

    .weather-metrics {
        grid-template-columns: 1fr;
    }

}


/* ========================================
   RTL MOBILE
======================================== */

@media (max-width: 700px) {

    html[dir="rtl"] .hero-actions {
        flex-direction: column;
    }

    html[dir="rtl"] .priority {
        text-align: right;
    }

    html[dir="rtl"] .match-result-score,
    html[dir="rtl"] .history-meta {
        text-align: right;
    }

    html[dir="rtl"] .command-connector {
        margin-left: 0;
        margin-right: 13px;
    }

}
