/*
 * Yokogawa Communication Design Guidelines EN ver. 5.0 alignment.
 *
 * This layer applies the communication font, corporate/communication colors,
 * and Leading Square treatment to the navigation interface. Report templates
 * intentionally retain their separate, source-document layouts.
 */

:root {
    --yokogawa-yellow: #FFEE00;
    --yokogawa-blue: #004F9B;
    --yokogawa-green: #00A04C;
    --yokogawa-indigo: #00316C;

    --earth-yellow: #FDD000;
    --earth-orange: #EB8E42;
    --earth-red: #C74643;
    --earth-brown: #7F623A;
    --earth-gray: #95A0A4;
    --earth-light-green: #76B059;
    --earth-moss-green: #56785A;
    --earth-sea-blue: #3DAAB1;
    --earth-purple: #85699F;

    --ci-ink: #17212B;
    --ci-muted: #52606B;
    --ci-line: #D8DEE3;
    --ci-surface: #FFFFFF;
    --ci-canvas: #F4F6F7;
    --ci-blue-soft: #EAF2F8;
    --ci-indigo-soft: #E7EDF5;
}

html {
    color-scheme: light;
}

body {
    min-width: 320px;
    background: var(--ci-canvas);
    color: var(--ci-ink);
    font-family: "Noto Sans KR", "Noto Sans", "맑은 고딕", Arial, sans-serif;
    line-height: 1.55;
}

button,
input,
select {
    font: inherit;
}

button,
a,
input,
select,
summary {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--yokogawa-yellow);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px var(--yokogawa-indigo);
}

/* -------------------------------------------------------------------------
   Brand header and Leading Square
   ------------------------------------------------------------------------- */

.site-header {
    box-sizing: border-box;
    padding: 24px 32px 0;
    overflow: hidden;
    background: var(--ci-canvas);
    color: #FFFFFF;
    text-align: left;
}

.site-header-band {
    position: relative;
    box-sizing: border-box;
    width: min(1440px, calc(100% - 18px));
    min-height: 128px;
    margin: 0 auto;
    padding: 28px 40px 28px 80px;
    display: flex;
    align-items: center;
    background:
        linear-gradient(112deg, var(--yokogawa-indigo) 0%, var(--yokogawa-blue) 72%, #075D96 100%);
    box-shadow: 0 8px 24px rgba(0, 49, 108, 0.18);
}

.leading-square {
    position: absolute;
    left: -13px;
    top: 50%;
    width: 64px;
    height: 64px;
    transform: translateY(-50%);
    background: var(--yokogawa-yellow);
    box-shadow:
        0 0 7px 3px rgba(255, 238, 0, 0.78),
        0 0 22px 8px rgba(255, 238, 0, 0.30);
    filter: blur(0.35px);
    pointer-events: none;
}

.site-header-copy {
    min-width: 0;
}

.site-header-eyebrow {
    margin: 0 0 4px;
    color: #DCE9F4;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.site-header h1 {
    margin: 0;
    color: #FFFFFF;
    font-size: clamp(29px, 3vw, 42px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.site-header-subtitle {
    margin: 7px 0 0;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 400;
}

/* -------------------------------------------------------------------------
   Main navigation surfaces
   ------------------------------------------------------------------------- */

main {
    box-sizing: border-box;
    width: min(1504px, 100%);
    margin: 0 auto;
    padding: 34px 32px 44px;
}

#plant-list > h2 {
    margin: 0 0 20px;
    padding-left: 14px;
    border-left: 5px solid var(--yokogawa-blue);
    color: var(--yokogawa-indigo);
    font-size: 23px;
    line-height: 1.25;
}

.plant-overview-help {
    margin: -6px 0 18px;
    color: var(--ci-muted);
    font-size: 14px;
}

.plant-overview-scroll {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #7890A5;
    border-radius: 8px;
    background: #0A3047;
    box-shadow: 0 14px 34px rgba(0, 31, 70, 0.20);
}

.plant-overview-map {
    position: relative;
    width: 100%;
    min-width: 760px;
    aspect-ratio: 1484 / 1060;
    overflow: hidden;
    isolation: isolate;
}

.plant-overview-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.plant-map-marker {
    position: absolute;
    z-index: 2;
    min-height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    background: rgba(0, 31, 70, 0.72);
    color: #FFFFFF;
    box-shadow:
        0 2px 0 rgba(255, 238, 0, 0.94) inset,
        0 7px 18px rgba(0, 20, 45, 0.42);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    cursor: pointer;
    white-space: nowrap;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease,
        filter 160ms ease;
}

.plant-map-pin {
    box-sizing: border-box;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    margin: 0 0 0 11px;
    border: 3px solid #FFFFFF;
    border-radius: 50%;
    background: var(--yokogawa-yellow);
    box-shadow:
        0 0 0 2px rgba(255, 238, 0, 0.70),
        0 2px 6px rgba(0, 0, 0, 0.36);
}

.plant-map-label {
    min-height: 36px;
    padding: 7px 12px 7px 8px;
    display: inline-flex;
    align-items: center;
    border: 0;
    background: transparent;
    color: inherit;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.48);
    font-size: clamp(12px, 1.05vw, 15px);
    font-weight: 750;
    letter-spacing: 0;
}

.plant-map-marker:hover,
.plant-map-marker:focus-visible {
    border-color: #FFFFFF;
    background: rgba(0, 98, 182, 0.96);
    box-shadow:
        0 3px 0 var(--yokogawa-yellow) inset,
        0 10px 24px rgba(0, 31, 70, 0.50);
    filter: brightness(1.05);
    outline: 3px solid rgba(255, 238, 0, 0.94);
    outline-offset: 3px;
}

.plant-map-marker:hover .plant-map-pin,
.plant-map-marker:focus-visible .plant-map-pin {
    background: #FFFFFF;
    box-shadow:
        0 0 0 3px var(--yokogawa-yellow),
        0 3px 9px rgba(0, 0, 0, 0.42);
}

.plant-map-marker.marker-left {
    flex-direction: row-reverse;
    transform: translate(-100%, -50%);
}

.plant-map-marker.marker-left .plant-map-pin {
    margin: 0 11px 0 0;
}

.plant-map-marker.marker-left .plant-map-label {
    padding: 7px 8px 7px 12px;
}

.plant-map-marker.marker-right {
    transform: translate(0, -50%);
}

.plant-map-marker.marker-up {
    transform: translate(-50%, -100%);
}

.plant-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
    gap: 18px;
}

.plant-card {
    box-sizing: border-box;
    width: auto;
    min-height: 205px;
    padding: 23px 22px 21px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--ci-line);
    border-top: 5px solid var(--yokogawa-blue);
    border-radius: 2px;
    background: var(--ci-surface);
    box-shadow: 0 5px 16px rgba(0, 49, 108, 0.08);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.plant-card:hover {
    border-top-color: var(--yokogawa-yellow);
    box-shadow: 0 9px 24px rgba(0, 49, 108, 0.14);
    transform: translateY(-2px);
}

.plant-card h2 {
    margin: 0 0 8px;
    color: var(--yokogawa-indigo);
    font-size: 20px;
    line-height: 1.3;
}

.plant-card p {
    margin: 0 0 22px;
    color: var(--ci-muted);
    font-size: 13px;
}

.plant-button {
    min-height: 44px;
    margin-top: auto;
    padding: 10px 14px;
    border: 1px solid var(--yokogawa-blue);
    border-radius: 2px;
    background: var(--yokogawa-blue);
    color: #FFFFFF;
    font-weight: 700;
    transition: background-color 150ms ease, border-color 150ms ease;
}

.plant-button:hover {
    border-color: var(--yokogawa-indigo);
    background: var(--yokogawa-indigo);
}

.plant-view {
    border: 1px solid var(--ci-line);
    border-top: 5px solid var(--yokogawa-blue);
    border-radius: 2px;
    background: var(--ci-surface);
    box-shadow: 0 5px 16px rgba(0, 49, 108, 0.07);
}

.plant-view > h2 {
    margin-top: 0;
    color: var(--yokogawa-indigo);
    font-size: 24px;
}

.plant-view > p {
    color: var(--ci-muted);
}

.plant-image-box {
    border-color: var(--yokogawa-blue);
}

.hotspot-label {
    border-radius: 2px;
    background-color: rgba(0, 49, 108, 0.92);
}

/* Confirmed inspection-state colors for hotspots remain unchanged. */
.hotspot:hover {
    background-color: #FFFF00;
}

.shaheen-package-card {
    border: 1px solid var(--yokogawa-blue);
    border-radius: 2px;
    background: linear-gradient(135deg, var(--yokogawa-indigo), var(--yokogawa-blue));
    box-shadow: 0 6px 16px rgba(0, 49, 108, 0.20);
}

.shaheen-package-card:hover {
    border-color: var(--yokogawa-yellow);
    box-shadow: 0 9px 22px rgba(0, 49, 108, 0.25);
}

.package-back-button,
.back-button {
    min-height: 42px;
    border: 1px solid var(--earth-gray);
    border-radius: 2px;
    background: #FFFFFF;
    color: var(--yokogawa-indigo);
}

.package-back-button:hover,
.back-button:hover {
    border-color: var(--yokogawa-indigo);
    background: var(--ci-indigo-soft);
    color: var(--yokogawa-indigo);
}

/* -------------------------------------------------------------------------
   Data panels
   ------------------------------------------------------------------------- */

.plant-revinf-panel {
    border-color: #9EBAD4;
    border-radius: 2px;
    box-shadow: none;
}

.plant-revinf-head {
    border-bottom-color: #B9CAD9;
    background: var(--ci-blue-soft);
}

.plant-revinf-title,
.plant-system-no,
.plant-round-title {
    color: var(--yokogawa-indigo);
}

.plant-revinf-help,
.plant-revinf-status,
.plant-round-detail {
    color: var(--ci-muted);
}

.plant-revinf-import-button {
    background: var(--yokogawa-blue);
}

.plant-revinf-import-button:hover {
    background: var(--yokogawa-indigo);
}

.plant-revinf-clear-button,
.plant-alarm-clear-button,
.hotspot-txt-clear-button {
    background: #687680;
}

.plant-revinf-clear-button:hover,
.plant-alarm-clear-button:hover,
.hotspot-txt-clear-button:hover {
    background: #45545F;
}

.plant-system-count,
.plant-system-type {
    background: var(--yokogawa-blue);
}

.plant-system-card,
.plant-round-card {
    border-radius: 2px;
}

.plant-system-card-head {
    background: var(--ci-blue-soft);
}

.plant-alarm-panel {
    border-color: #D3A479;
    border-radius: 2px;
    box-shadow: none;
}

.plant-alarm-head {
    border-bottom-color: #D7B18E;
    background: #FFF3E9;
}

.plant-alarm-title,
.plant-alarm-round-title {
    color: #6E3B12;
}

.plant-alarm-help,
.plant-alarm-status,
.plant-alarm-round-detail {
    color: var(--ci-muted);
}

.plant-alarm-import-button {
    background: #9A531D;
}

.plant-alarm-import-button:hover {
    background: #6E3B12;
}

.plant-round-card.warning,
.plant-alarm-round-card.warning {
    border-color: var(--earth-orange);
    background: #FFF7F0;
}

/* -------------------------------------------------------------------------
   SYSTEM LIST
   ------------------------------------------------------------------------- */

.system-modal-overlay {
    background-color: rgba(0, 31, 70, 0.64);
}

.system-modal {
    border: 1px solid #74889C;
    border-radius: 2px;
    box-shadow: 0 20px 54px rgba(0, 31, 70, 0.34);
}

.system-modal-header {
    border-bottom: 5px solid var(--yokogawa-yellow);
    background: var(--yokogawa-indigo);
}

.system-modal-subtitle {
    color: #DCE9F4;
}

.system-modal-close {
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 2px;
}

.system-modal-toolbar {
    border-bottom-color: var(--ci-line);
    background: #F7F9FA;
}

.system-search,
.system-type-filter {
    border-color: #A8B3BD;
    border-radius: 2px;
}

.system-search:focus,
.system-type-filter:focus {
    border-color: var(--yokogawa-blue);
    outline: 3px solid rgba(255, 238, 0, 0.82);
    outline-offset: 1px;
}

.system-count,
.system-type-badge {
    border-radius: 2px;
    background: var(--ci-indigo-soft);
    color: var(--yokogawa-indigo);
}

.system-report-notice {
    border-bottom-color: #E3CD75;
    background: #FFF9D9;
    color: #594A00;
}

.report-refresh-button {
    border-radius: 2px;
    background: var(--yokogawa-blue);
}

.report-refresh-button:hover {
    background: var(--yokogawa-indigo);
}

.system-list-table th {
    background: var(--yokogawa-blue);
    color: #FFFFFF;
}

.system-list-table th,
.system-list-table td {
    border-color: var(--ci-line);
}

.system-list-table tbody tr:nth-child(even) {
    background: #F7F9FA;
}

.system-list-table tbody tr:hover {
    background: #FFF9D9;
}

.report-round,
.report-link,
.report-missing,
.report-upload-button,
.report-replace-button,
.report-create-link,
.report-alarm-create-link,
.hotspot-txt-import-button,
.hotspot-txt-clear-button {
    border-radius: 2px;
}

.report-round-title {
    color: var(--yokogawa-indigo);
}

.report-upload-label,
.hotspot-txt-import-button {
    background: var(--yokogawa-blue);
}

.report-upload-label:hover,
.hotspot-txt-import-button:hover {
    background: var(--yokogawa-indigo);
}

.report-create-link {
    background: #A9551F;
}

.report-create-link:hover {
    background: #743814;
}

.report-create-link.thermal-ready {
    border-color: #6F5586;
    background: #6F5586;
}

.site-footer {
    box-sizing: border-box;
    width: min(1440px, calc(100% - 64px));
    margin: 0 auto 30px;
    padding: 16px 0;
    border-top: 1px solid var(--ci-line);
    color: #687680;
    font-size: 11px;
}

.site-footer p {
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media (max-width: 720px) {
    .site-header {
        padding: 14px 14px 0;
    }

    .site-header-band {
        width: calc(100% - 12px);
        min-height: 108px;
        padding: 22px 20px 22px 62px;
    }

    .leading-square {
        left: -10px;
        width: 48px;
        height: 48px;
    }

    .site-header-eyebrow {
        font-size: 9px;
        letter-spacing: 0.12em;
    }

    main {
        padding: 24px 14px 34px;
    }

    .plant-container {
        grid-template-columns: 1fr;
    }

    .plant-overview-help {
        font-size: 13px;
    }

    .plant-overview-map {
        min-width: 720px;
    }

    .plant-map-label {
        font-size: 12px;
    }

    .plant-card {
        min-height: 180px;
    }

    .plant-view {
        padding: 18px;
    }

    .site-footer {
        width: calc(100% - 28px);
        margin-bottom: 18px;
    }
}
