/* =========================================================
   !!!EMPIRE WORLD DASHBOARD
   Main Stylesheet
   ========================================================= */


/* ---------------------------------------------------------
   RESET
   --------------------------------------------------------- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* ---------------------------------------------------------
   THEME VARIABLES
   --------------------------------------------------------- */

:root {
    --primary-dark: #2a2416;
    --secondary-dark: #3d3a2f;
    --accent-color: #d4af37;
    --accent-light: #e8d7a8;
    --text-primary: #f5f0e8;
    --text-secondary: #c9b89a;
    --border-color: #5a5240;
    --danger: #c94444;
    --success: #7a9d4a;
    --warning: #c97a44;
}


/* ---------------------------------------------------------
   PAGE
   --------------------------------------------------------- */

body {
    font-family: Georgia, Garamond, serif;
    background:
        linear-gradient(
            135deg,
            #2a2416 0%,
            #3d3a2f 50%,
            #2a2416 100%
        );
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
}


/* ---------------------------------------------------------
   HEADER
   --------------------------------------------------------- */

.header {
    background:
        linear-gradient(
            180deg,
            #3d3a2f 0%,
            #2a2416 100%
        );

    border-top: 2px solid var(--accent-color);
    border-bottom: 3px solid var(--accent-color);

    padding: 20px 0;
    margin-bottom: 30px;

    box-shadow:
        0 4px 15px rgba(212, 175, 55, 0.2),
        inset 0 1px 0 rgba(232, 220, 200, 0.1);
}


.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}


.header-title {
    font-size: 2em;
    font-weight: bold;
    color: var(--accent-color);

    text-shadow:
        2px 2px 4px rgba(0, 0, 0, 0.7),
        0 0 8px rgba(212, 175, 55, 0.2);

    letter-spacing: 3px;
    font-family: Georgia, serif;
}


.header-subtitle {
    font-size: 0.85em;
    color: var(--text-secondary);
    font-style: italic;
}


/* ---------------------------------------------------------
   WORLD TIME HEADER
   --------------------------------------------------------- */

.world-time-badge {
    display: flex;
    gap: 30px;
    font-size: 0.95em;
}


.time-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}


.time-label {
    color: var(--text-secondary);
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 1px;
}


.time-value {
    color: var(--accent-light);
    font-size: 1.2em;
    font-weight: bold;
    font-family: "Courier New", monospace;
}


/* ---------------------------------------------------------
   WORLD BULLETIN / MARQUEE
   --------------------------------------------------------- */

.marquee-container {
    background-color: var(--secondary-dark);

    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);

    overflow: hidden;
    margin-bottom: 30px;
    padding: 0;

    box-shadow:
        inset 0 0 8px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(232, 220, 200, 0.1);
}


.marquee-header {
    background:
        linear-gradient(
            90deg,
            rgba(212, 175, 55, 0.15) 0%,
            rgba(212, 175, 55, 0.05) 100%
        );

    border-bottom: 2px solid var(--accent-color);

    padding: 8px 15px;

    font-size: 0.85em;
    color: var(--accent-light);
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: Georgia, serif;
}


.marquee-content {
    padding: 12px 20px;
    height: 50px;

    display: flex;
    align-items: center;

    background-color: var(--secondary-dark);

    position: relative;
    overflow: hidden;
}


.marquee-text {
    display: inline-block;

    padding-left: 100%;

    animation: scroll-marquee 20s linear infinite;

    white-space: nowrap;

    color: var(--accent-light);
    font-style: italic;
    font-weight: 500;
}


.marquee-empty {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.9em;
}


@keyframes scroll-marquee {

    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}


.marquee-content:hover .marquee-text {
    animation-play-state: paused;
}


/* ---------------------------------------------------------
   MAIN CONTAINER
   --------------------------------------------------------- */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}


/* ---------------------------------------------------------
   WORLD INFORMATION PANEL
   --------------------------------------------------------- */

.world-info-panel {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(250px, 1fr));

    gap: 15px;

    margin-bottom: 30px;
}


/* ---------------------------------------------------------
   INFORMATION CARDS
   --------------------------------------------------------- */

.info-card {
    background-color: rgba(61, 58, 47, 0.7);

    border: 2px solid var(--border-color);
    border-radius: 0;

    padding: 15px;

    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        background-color 0.3s ease;

    box-shadow:
        inset 0 1px 0 rgba(232, 220, 200, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.3);
}


.info-card:hover {
    border-color: var(--accent-color);

    box-shadow:
        inset 0 1px 0 rgba(232, 220, 200, 0.1),
        0 4px 12px rgba(212, 175, 55, 0.2);
}


.info-card-title {
    color: var(--accent-color);

    font-size: 0.8em;
    font-weight: bold;

    text-transform: uppercase;
    letter-spacing: 2px;

    margin-bottom: 10px;

    border-bottom: 2px solid var(--accent-color);

    padding-bottom: 8px;

    font-family: Georgia, serif;
}


/* ---------------------------------------------------------
   WEATHER
   --------------------------------------------------------- */

.weather-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}


.weather-item {
    display: flex;
    flex-direction: column;
    gap: 4px;

    padding: 8px;

    background-color: rgba(212, 175, 55, 0.05);

    border-left: 2px solid rgba(212, 175, 55, 0.3);
}


.weather-item-label {
    font-size: 0.75em;
    color: var(--text-secondary);
    text-transform: uppercase;
}


.weather-item-value {
    font-size: 1em;
    color: var(--accent-light);
    font-weight: bold;
}


/* ---------------------------------------------------------
   DAYLIGHT INDICATORS
   --------------------------------------------------------- */

.daylight-indicator {
    display: inline-block;

    padding: 4px 12px;

    border-radius: 3px;

    font-size: 0.85em;
    font-weight: bold;

    margin-top: 5px;
}


.daylight-day {
    background-color: rgba(201, 150, 68, 0.2);
    color: #d9a745;
}


.daylight-night {
    background-color: rgba(100, 80, 60, 0.3);
    color: #c9b89a;
}


.daylight-dawn {
    background-color: rgba(212, 175, 55, 0.18);
    color: #e8d7a8;
}


.daylight-dusk {
    background-color: rgba(157, 107, 68, 0.2);
    color: #d9a745;
}


/* ---------------------------------------------------------
   CONTENT SECTIONS
   --------------------------------------------------------- */

.section {
    background-color: rgba(61, 58, 47, 0.65);

    border: 2px solid var(--border-color);
    border-radius: 0;

    padding: 20px;
    margin-bottom: 20px;

    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease;

    box-shadow:
        inset 0 1px 0 rgba(232, 220, 200, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.3);
}


.section:hover {
    border-color: var(--accent-color);

    box-shadow:
        inset 0 1px 0 rgba(232, 220, 200, 0.1),
        0 4px 12px rgba(212, 175, 55, 0.2);
}


.section h2 {
    color: var(--accent-color);

    font-size: 1.2em;

    margin-bottom: 15px;
    padding-bottom: 10px;

    border-bottom: 3px solid var(--accent-color);

    text-transform: uppercase;
    letter-spacing: 2px;

    font-family: Georgia, serif;
}


.section h3 {
    color: var(--accent-color);

    font-size: 0.95em;

    margin-top: 15px;
    margin-bottom: 10px;

    text-transform: uppercase;

    letter-spacing: 0.5px;
}


/* ---------------------------------------------------------
   STAT ROWS
   --------------------------------------------------------- */

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 15px;

    padding: 8px 10px;
    margin-bottom: 4px;

    background-color: rgba(212, 175, 55, 0.03);

    border-left: 2px solid rgba(212, 175, 55, 0.2);

    font-size: 0.95em;

    transition: background-color 0.2s ease;
}


.stat:hover {
    background-color: rgba(212, 175, 55, 0.08);
}


.stat-label {
    color: var(--text-secondary);

    font-weight: bold;

    text-transform: uppercase;

    font-size: 0.85em;

    letter-spacing: 0.5px;
}


.stat-value {
    color: var(--accent-light);

    font-weight: bold;

    font-family: "Courier New", monospace;

    text-align: right;
}


/* ---------------------------------------------------------
   STATUS INDICATORS
   --------------------------------------------------------- */

.status-running {
    color: var(--success);
    font-weight: bold;
}


.status-waiting {
    color: var(--warning);
    font-weight: bold;
}


.status-error {
    color: var(--danger);
    font-weight: bold;
}


.status-badge {
    display: inline-block;

    padding: 3px 8px;

    border-radius: 3px;

    font-size: 0.8em;
    font-weight: bold;
}


.status-badge.running {
    background-color: rgba(122, 157, 74, 0.15);
    color: var(--success);
}


.status-badge.waiting {
    background-color: rgba(201, 122, 68, 0.15);
    color: var(--warning);
}


.status-badge.error {
    background-color: rgba(201, 68, 68, 0.15);
    color: var(--danger);
}


/* ---------------------------------------------------------
   ERROR MESSAGES
   --------------------------------------------------------- */

.error {
    color: var(--danger);

    background-color: rgba(201, 68, 68, 0.1);

    padding: 15px;

    border: 2px solid var(--danger);
    border-radius: 4px;

    margin: 20px 0;

    font-family: "Courier New", monospace;
    font-size: 0.9em;
}


.error strong {
    display: block;

    margin-bottom: 8px;

    color: #ff8888;
}


/* ---------------------------------------------------------
   GENERIC GRID LAYOUTS
   --------------------------------------------------------- */

.grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}


.grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}


/* ---------------------------------------------------------
   TIMESTAMP
   --------------------------------------------------------- */

.timestamp {
    text-align: center;

    padding: 20px;

    color: var(--text-secondary);

    font-size: 0.85em;

    margin-top: 40px;

    border-top: 1px solid var(--border-color);
}


/* ---------------------------------------------------------
   SCROLLBAR
   --------------------------------------------------------- */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}


::-webkit-scrollbar-track {
    background-color: var(--secondary-dark);
}


::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}


::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-color);
}


/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media (max-width: 768px) {

    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }


    .header-title {
        font-size: 1.5em;
    }


    .world-time-badge {
        width: 100%;

        gap: 15px;

        justify-content: space-between;

        font-size: 0.85em;
    }


    .world-info-panel {
        grid-template-columns: 1fr;
    }


    .weather-grid {
        grid-template-columns: 1fr;
    }


    .grid-2col,
    .grid-3col {
        grid-template-columns: 1fr;
    }


    .stat {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }


    .stat-value {
        text-align: left;
    }
}

/* ---------------------------------------------------------
   INSTITUTION DASHBOARD LAYOUT
   --------------------------------------------------------- */

body {
    min-width: 320px;
    background:
        linear-gradient(rgba(38, 34, 25, 0.96), rgba(38, 34, 25, 0.96)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 4px);
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    background: #171613;
    border-top: 3px solid #6f5b2c;
    border-bottom: 1px solid #0b0b0a;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
}

.topbar-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 26px;
}

.brand {
    color: #d5b35c;
    font-family: Georgia, serif;
    font-size: 1.35rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-decoration: none;
    white-space: nowrap;
}

.topnav {
    display: flex;
    align-self: stretch;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.topnav a {
    color: #aaa18d;
    display: inline-flex;
    align-items: center;
    height: 100%;
    padding: 0 13px;
    font-size: 0.82rem;
    text-decoration: none;
    border-bottom: 3px solid transparent;
}

.topnav a:hover,
.topnav a.active {
    color: #f2e8d5;
    background: rgba(212, 175, 55, 0.08);
    border-bottom-color: #c49b3e;
}

.topbar-clock {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #9f957e;
    font-size: 0.78rem;
    white-space: nowrap;
}

.topbar-clock strong {
    color: #e0c67d;
    font-family: "Courier New", monospace;
    font-size: 1rem;
}

.institution-strip {
    background: #302c24;
    border-bottom: 1px solid #514833;
    color: #c8bda6;
    font-size: 0.78rem;
}

.institution-strip-inner {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.strip-label,
.eyebrow {
    color: #ad8a3e;
    font-size: 0.68rem;
    font-weight: bold;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.institution-strip strong {
    color: #f1e5ce;
}

.alert-badge {
    margin-left: auto;
    padding: 3px 8px;
    color: #f5d3b7;
    background: #743d2b;
    border: 1px solid #a85f43;
    font-size: 0.68rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.signal-button {
    padding: 3px 8px;
    color: #f4e4c5;
    background: #51442d;
    border: 1px solid #b18b3d;
    font: inherit;
    font-size: 0.68rem;
    cursor: pointer;
}

.signal-button:hover {
    background: #695636;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 214px minmax(0, 1fr);
    gap: 18px;
    padding-top: 18px;
    padding-bottom: 48px;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rail-panel,
.data-panel,
.feature-panel {
    background: rgba(56, 52, 43, 0.92);
    border: 1px solid #5e5544;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.rail-panel {
    padding-bottom: 8px;
}

.panel-heading,
.feature-heading {
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 11px;
    color: #eadbbd;
    background: linear-gradient(180deg, #4b463b, #332f27);
    border-bottom: 1px solid #6b5c3f;
    font-size: 0.72rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.rail-status,
.rail-stat,
.rail-note {
    color: #c6bba7;
    font-size: 0.76rem;
}

.rail-status {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 11px;
    border-bottom: 1px solid rgba(138, 121, 87, 0.25);
}

.status-dot {
    width: 7px;
    height: 7px;
    display: inline-block;
    background: #83a465;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(131, 164, 101, 0.7);
}

.rail-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 11px;
}

.rail-stat strong,
.rail-note strong {
    color: #eee2cf;
    font-size: 0.78rem;
}

.area-link {
    display: block;
    padding: 8px 11px;
    color: #bdb3a1;
    border-bottom: 1px solid rgba(138, 121, 87, 0.2);
    font-size: 0.8rem;
    text-decoration: none;
}

.area-link:hover,
.area-link.active {
    color: #f4e4c5;
    background: rgba(190, 153, 68, 0.13);
    box-shadow: inset 3px 0 #c49b3e;
}

.rail-note {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-bottom: 12px;
}

.rail-note .panel-heading {
    width: 100%;
    margin-bottom: 4px;
}

.rail-note > strong,
.rail-note > span {
    padding: 0 11px;
}

.rail-note > span {
    color: #9f957f;
    font-size: 0.72rem;
}

.main-column {
    min-width: 0;
}

.content-title {
    min-height: 57px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #5e5544;
    margin-bottom: 14px;
}

.content-title h1 {
    margin-top: 2px;
    color: #f1e6d4;
    font-family: Georgia, serif;
    font-size: 1.7rem;
    font-weight: normal;
}

.live-clock {
    color: #c8a653;
    font-family: "Courier New", monospace;
    font-size: 0.8rem;
    white-space: nowrap;
}

.feature-panel {
    margin-bottom: 14px;
}

.feature-heading {
    color: #eadbbd;
}

.feature-heading span:last-child {
    color: #bbae95;
    font-size: 0.68rem;
    font-weight: normal;
    letter-spacing: 0;
    text-transform: none;
}

.feature-body {
    display: grid;
    grid-template-columns: 1fr 190px;
    gap: 22px;
    padding: 18px;
}

.feature-body h2 {
    margin: 5px 0 6px;
    color: #ead9b8;
    font-family: Georgia, serif;
    font-size: 1.35rem;
    font-weight: normal;
}

.feature-body p {
    color: #c6bca9;
    font-size: 0.82rem;
}

.feature-body p strong {
    color: #e7d59e;
}

.schedule-callout {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 12px;
    background: rgba(27, 25, 21, 0.35);
    border-left: 2px solid #b18b3d;
}

.schedule-callout span,
.schedule-callout small {
    color: #a99c83;
    font-size: 0.68rem;
}

.schedule-callout strong {
    color: #efdfbc;
    font-family: Georgia, serif;
    font-size: 1rem;
}

.content-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.data-panel {
    margin-bottom: 14px;
}

.data-row {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 7px 11px;
    border-bottom: 1px solid rgba(139, 124, 94, 0.22);
    color: #b9af9d;
    font-size: 0.8rem;
}

.data-row:last-child {
    border-bottom: 0;
}

.data-row strong {
    color: #e4d6bc;
    font-family: "Courier New", monospace;
    font-size: 0.76rem;
    font-weight: normal;
    text-align: right;
}

.empty-state,
.page-footer {
    color: #a89d89;
    font-size: 0.78rem;
}

.empty-state {
    padding: 14px 11px;
}

.page-footer {
    padding: 12px 0;
    border-top: 1px solid #5e5544;
    text-align: right;
}

@media (max-width: 760px) {
    .topbar-inner,
    .institution-strip-inner {
        width: min(100% - 24px, 1180px);
    }

    .topbar-inner {
        min-height: 0;
        flex-wrap: wrap;
        gap: 0;
        padding-top: 12px;
    }

    .topnav {
        order: 3;
        width: 100%;
        min-height: 38px;
        overflow-x: auto;
    }

    .topnav a {
        padding: 0 10px;
        white-space: nowrap;
    }

    .topbar-clock {
        margin-left: auto;
    }

    .institution-strip-inner {
        flex-wrap: wrap;
        gap: 7px 12px;
        padding: 9px 0;
    }

    .alert-badge {
        margin-left: 0;
    }

    .dashboard-grid,
    .content-columns,
    .feature-body {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        width: min(100% - 24px, 1180px);
        padding-top: 12px;
    }

    .sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .rail-note {
        grid-column: 1 / -1;
    }

    .content-title {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
    }

    .feature-body {
        gap: 14px;
    }
}