@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800&display=fallback&subset=latin,latin-ext');

/* 
   OILCORP – GAME DESIGN SYSTEM
   Dark luxury · Gold accents · Industrial typography
 */

:root {
    --gold:        #c8a84b;
    --gold2:       #e8cc7a;
    --gold3:       #a08030;
    --gold-dim:    rgba(200,168,75,.12);
    --gold-border: rgba(200,168,75,.25);
    --gold-glow:   rgba(200,168,75,.3);

    --bg:          #08080f;
    --bg2:         #0f0f18;
    --bg3:         #161622;
    --bg4:         #1e1e2e;
    --bg5:         #252535;

    --text:        #e8e8f0;
    --text2:       rgba(232,232,240,.6);
    --text3:       rgba(232,232,240,.35);

    --red:         #e05555;
    --red-dim:     rgba(224,85,85,.12);
    --green:       #4ec97a;
    --green-dim:   rgba(78,201,122,.1);
    --blue:        #5b9cf6;
    --orange:      #f0a050;

    --border:      rgba(200,168,75,.18);
    --border2:     rgba(255,255,255,.06);

    --radius:      8px;
    --radius-lg:   12px;
    --shadow:      0 8px 32px rgba(0,0,0,.55);
    --shadow-lg:   0 20px 60px rgba(0,0,0,.7);
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', 'Segoe UI', Arial, 'Noto Sans', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 15%, rgba(200,168,75,.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 85%, rgba(200,168,75,.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* LAYOUT */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 0;
    position: relative;
    z-index: 1;
    width: 100%;
}

/* HEADER */
.header {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 16px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    position: relative;
    gap: 4px 0;
    flex-wrap: wrap;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0;
    width: 100px; height: 1px;
    background: linear-gradient(90deg, var(--gold), transparent);
}

.header h1 {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 6px;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--gold2) 0%, var(--gold) 45%, var(--gold3) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(200,168,75,.35));
    line-height: 1;
    position: relative;
}

.header h1 a.link-plain {
    background: inherit;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.header h1 span { color: var(--text); font-weight: 300; }

.header h1 small {
    display: block;
    font-size: 7.5px;
    letter-spacing: 4.5px;
    color: rgba(200,168,75,.55);
    font-weight: 500;
    margin-top: 5px;
    text-transform: uppercase;
    -webkit-text-fill-color: rgba(200,168,75,.55);
}

.user-nav {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 0 0 100%;
    min-width: 0;
    padding-bottom: 2px;
}
.user-nav::-webkit-scrollbar { display: none; }

/* Przyciski w navie kompaktowe, eby zmieci wszystkie w jednej linii */
.user-nav .btn {
    padding: 5px 10px;
    font-size: 9px;
    letter-spacing: 0.8px;
    gap: 3px;
}
.user-nav .topbar-user-link {
    padding: 3px 7px 3px 3px;
    gap: 6px;
}

.user-greeting {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--text3);
    text-transform: uppercase;
}

/* Aktywny link nawigacji globalny, dziaa na kadej stronie */
.user-nav .nav-active {
    background: rgba(200,168,75,.15) !important;
    border-color: rgba(200,168,75,.4) !important;
    color: #c8a84b !important;
}

/* Topbar avatar i link profilu (globalny, adowany na kadej stronie) */
.topbar-user-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    padding: 3px 8px 3px 4px;
    border-radius: 20px;
    border: 1px solid rgba(200,168,75,.2);
    transition: all .2s;
    flex-shrink: 0;
}
.topbar-user-link:hover {
    background: rgba(200,168,75,.1);
    border-color: rgba(200,168,75,.4);
}
.topbar-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(200,168,75,.4);
    flex-shrink: 0;
}
.topbar-avatar-initials {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(200,168,75,.2);
    color: #c8a84b;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.main-content { padding-bottom: 24px; }

.game-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.game-shell-heading {
    border: 1px solid rgba(200,168,75,.18);
    background: rgba(255,255,255,.025);
    border-radius: 8px;
    padding: 16px 18px;
}
.game-shell-heading h2 {
    margin: 0;
    color: var(--gold);
    font-size: 15px;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.game-shell-module {
    min-width: 0;
}

/* CARDS */
.card {
    background: linear-gradient(145deg, var(--bg3), var(--bg2));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px;
    margin-bottom: 22px;
    box-shadow: var(--shadow);
    transition: border-color .25s, box-shadow .25s;
}

.card:hover {
    border-color: rgba(200,168,75,.32);
    box-shadow: 0 12px 40px rgba(0,0,0,.6);
}

.card h2 {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h2::before {
    content: '';
    display: inline-block;
    width: 3px; height: 13px;
    background: var(--gold);
    border-radius: 2px;
    flex-shrink: 0;
}

.card-warning { border-left: 3px solid var(--orange); }
.card-danger  { border-left: 3px solid var(--red); }
.card-success { border-left: 3px solid var(--green); }

/* STATUS GRID */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.status-item {
    background: var(--bg4);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color .2s;
}

.status-item:hover { border-color: var(--border); }

.status-label {
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text3);
    font-weight: 700;
}

.status-value {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}

/* KPI STATUS BAR (redesign) przeniesione z home.css 
   Klasy .status-kpi* musz by globalne  uywane przez status_grid.php
   na kadej stronie gry (market, bank, transport, itp.)
 */

.status-grid--redesign {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.status-kpi {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    background: linear-gradient(145deg, var(--bg3), var(--bg2));
    border: 1px solid rgba(200, 168, 75, .15);
    border-radius: 10px;
    padding: 12px 14px;
    transition: border-color .18s, transform .15s;
}

.status-kpi:hover {
    border-color: rgba(200, 168, 75, .32);
    transform: translateY(-1px);
}

.status-kpi-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(200, 168, 75, .22);
    background: rgba(200, 168, 75, .1);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Segoe UI Symbol', sans-serif;
    line-height: 1;
}

.status-kpi-icon span {
    display: block;
    line-height: 1;
    width: 18px;
    height: 18px;
    color: inherit;
}

.status-kpi-icon svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.status-kpi-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.status-kpi-body--compact {
    justify-content: center;
}

.status-kpi-label {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text3);
    margin-bottom: 4px;
}

.status-kpi-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -.02em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-kpi-sub {
    font-size: 10px;
    color: var(--text3);
    margin-top: 2px;
}

.status-kpi-bar {
    height: 3px;
    background: rgba(255, 255, 255, .07);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.status-kpi-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold3), var(--gold));
    border-radius: 2px;
    transition: width .4s;
}

.status-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    animation: statusPulse 1.8s infinite;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-btn-icon {
    width: 15px;
    height: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.action-btn-icon svg {
    display: block;
    width: 15px;
    height: 15px;
    fill: currentColor;
}

@keyframes statusPulse {
    0%   { box-shadow: 0 0 0 0   rgba(78, 201, 122, .5); }
    70%  { box-shadow: 0 0 0 6px rgba(78, 201, 122, 0);  }
    100% { box-shadow: 0 0 0 0   transparent;             }
}

@media (max-width: 768px) {
    .status-grid--redesign { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .status-grid--redesign { grid-template-columns: 1fr 1fr; }
}

/* COLOR UTILITIES */
.money, .green  { color: var(--green) !important; }
.danger, .red   { color: var(--red) !important; }
.warning        { color: var(--orange) !important; }
.storage, .blue { color: var(--blue) !important; }
.gold           { color: var(--gold) !important; }
.muted          { color: var(--text2); }
.muted2         { color: var(--text3); }
.success        { color: var(--green); }


/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    line-height: 1;
}

.btn:disabled { opacity: .35; cursor: not-allowed; pointer-events: none; }

.btn-primary {
    background: var(--gold);
    color: #000;
}
.btn-primary:hover:not(:disabled) {
    background: var(--gold2);
    box-shadow: 0 4px 20px var(--gold-glow);
    transform: translateY(-1px);
}

.btn-success {
    background: transparent;
    color: var(--green);
    border: 1px solid rgba(78,201,122,.3);
}
.btn-success:hover:not(:disabled) {
    background: var(--green-dim);
    border-color: var(--green);
}

.btn-danger {
    background: transparent;
    color: var(--red);
    border: 1px solid rgba(224,85,85,.3);
}
.btn-danger:hover:not(:disabled) {
    background: var(--red-dim);
    border-color: var(--red);
}

.btn-warning {
    background: transparent;
    color: var(--orange);
    border: 1px solid rgba(240,160,80,.3);
}
.btn-warning:hover:not(:disabled) { background: rgba(240,160,80,.1); border-color: var(--orange); }

.btn-secondary {
    background: var(--bg4);
    color: var(--text2);
    border: 1px solid var(--border2);
}
.btn-secondary:hover:not(:disabled) { background: var(--bg5); color: var(--text); border-color: var(--border); }

.btn-info {
    background: transparent;
    color: var(--blue);
    border: 1px solid rgba(91,156,246,.3);
}
.btn-info:hover:not(:disabled) { background: rgba(91,156,246,.1); border-color: var(--blue); }

.btn-full { width: 100%; }
.btn-sm   { padding: 6px 12px; font-size: 10px; letter-spacing: 1px; }

/* FORMS */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-label, label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text3);
}

.form-input, input[type="text"], input[type="email"],
input[type="password"], input[type="number"],
select, textarea {
    width: 100%;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 11px 14px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    outline: none;
    transition: border-color .2s, background .2s;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus, input:focus, select:focus, textarea:focus {
    border-color: var(--gold);
    background: rgba(255,255,255,.06);
}

.form-input::placeholder, input::placeholder { color: var(--text3); }
select option { background: var(--bg3); color: var(--text); }
.form-group small { font-size: 10px; color: var(--text3); }

/* Shared module tabs */
.module-tabs {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0;
    padding: 0 12px;
    border-bottom: 1px solid var(--border2);
    background: rgba(255,255,255,.015);
}

.module-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    background: transparent;
    color: var(--text3);
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.6px;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.module-tab:hover {
    color: var(--text2);
    background: rgba(255,255,255,.03);
}

.module-tab.active {
    color: var(--gold);
    background: rgba(212,177,74,.12);
    border-color: rgba(212,177,74,.24);
    box-shadow: inset 0 -1px 0 rgba(212,177,74,.28);
}

.module-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    letter-spacing: 0;
}

.module-tab-badge--ok {
    background: rgba(53,214,122,.18);
    color: var(--green);
}

.module-tab-badge--gold {
    background: rgba(212,177,74,.18);
    color: var(--gold);
}

.module-tab-badge--warn {
    background: rgba(255,122,89,.18);
    color: #ff9b7b;
}

.module-tab-badge--muted {
    background: rgba(255,255,255,.12);
    color: var(--text2);
}

@media (max-width: 900px) {
    .module-tabs { padding: 0 8px; }
    .module-tab { padding: 0 14px; }
}

/* Shared action/footer layout */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    align-items: stretch;
}

.action-grid > a,
.action-grid > form {
    min-width: 0;
}

.action-grid > form {
    display: flex;
}

.action-grid > a.btn,
.action-grid > form .btn {
    width: 100%;
    min-width: 0;
}

/* Action grid redesign - shared across home and subpages */
/* Uklad akcji - wspolny dla glownej i podstron */
.action-grid--redesign {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-btn--primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #e8cc7a 0%, #c8a84b 100%);
    color: #000;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 1px;
    border-radius: var(--radius);
    text-decoration: none;
    text-transform: uppercase;
    transition: all .2s;
    box-shadow: 0 4px 20px rgba(200, 168, 75, .2);
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.action-btn--primary:hover {
    background: linear-gradient(135deg, #f5e090 0%, #d4b560 100%);
    box-shadow: 0 6px 28px rgba(200, 168, 75, .35);
    transform: translateY(-1px);
}

.action-btn-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn-row > * {
    flex: 1;
    min-width: 100px;
}

.action-btn--secondary {
    flex: 1;
}

.footer {
    width: 100%;
    padding: 18px 0 24px;
    border-top: 1px solid var(--border2);
    text-align: center;
    color: var(--text3);
    font-size: 11px;
    box-sizing: border-box;
    clear: both;
}

.footer-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 10px;
}

.footer-link {
    color: var(--text3);
    text-decoration: none;
    transition: color .12s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 12px;
}

.footer-link:hover {
    color: var(--gold);
}
/* ============================================================
   BANERY BANKRUTA
   ============================================================ */

.header-bankruptcy-bar {
    background: rgba(224, 85, 85, 0.12);
    border: 1px solid rgba(224, 85, 85, 0.35);
    border-radius: var(--radius, 6px);
    padding: 8px 14px;
    font-size: 13px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.header-bankruptcy-bar strong {
    color: var(--red, #e05555);
}
.header-bankruptcy-bar a {
    color: var(--orange, #f0a050);
    font-weight: 600;
    white-space: nowrap;
    margin-left: auto;
    text-decoration: none;
}
.header-bankruptcy-bar a:hover {
    text-decoration: underline;
}

.bankruptcy-banner {
    background: rgba(224, 85, 85, 0.10);
    border: 1px solid rgba(224, 85, 85, 0.45);
    border-left: 4px solid var(--red, #e05555);
    border-radius: var(--radius, 6px);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.bankruptcy-banner-icon {
    font-size: 22px;
    flex-shrink: 0;
}
.bankruptcy-banner-body {
    flex: 1;
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
}
.bankruptcy-banner-body strong {
    color: var(--red, #e05555);
    display: block;
    margin-bottom: 2px;
}
.bankruptcy-banner-btn {
    background: var(--red, #e05555);
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--radius, 6px);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity 0.15s;
}
.bankruptcy-banner-btn:hover {
    opacity: 0.85;
}

@media (max-width: 600px) {
    .bankruptcy-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}


@keyframes trendPulse {
    0%, 100% { border-left-color: var(--red); }
    50%       { border-left-color: rgba(224,85,85,.4); }
}
.crisis-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 4px;
}
.crisis-sub {
    font-size: 13px;
    color: var(--text2);
    margin-bottom: 10px;
}
.crisis-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.crisis-counter {
    text-align: center;
    min-width: 70px;
}
.crisis-counter-val {
    font-size: 22px;
    font-weight: 700;
    color: var(--red);
    line-height: 1;
}
.crisis-counter-lbl {
    font-size: 10px;
    color: var(--text3);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
@media (max-width: 600px) {
    .crisis-overlay { grid-template-columns: auto 1fr; }
    .crisis-counter { display: none; }
}

.warning-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(240, 160, 80, .10);
    border: 1px solid rgba(240, 160, 80, .4);
    border-left: 4px solid var(--orange);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.warning-banner-icon { font-size: 18px; flex-shrink: 0; }
.warning-banner-body { flex: 1; font-size: 13px; color: var(--text2); }
.warning-banner-body strong { color: var(--orange); }
.warning-banner-actions { display: flex; gap: 6px; flex-shrink: 0; }

.offline-report-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(90, 120, 200, .10);
    border: 1px solid rgba(100, 140, 255, .30);
    border-left: 4px solid #6488ff;
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 16px;
    position: relative;
}
.offline-report-icon {
    font-size: 28px;
    flex-shrink: 0;
}
.offline-report-body { flex: 1; }
.offline-report-title {
    font-size: 14px;
    font-weight: 700;
    color: #8ba8ff;
    margin-bottom: 4px;
}
.offline-report-sub {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.5;
}
.offline-report-close {
    background: none;
    border: none;
    color: var(--text3);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    flex-shrink: 0;
    transition: color .15s;
}
.offline-report-close:hover { color: var(--text1); }

/* Badge "Tryb offline" w well_grid / player info */
/* Scroll wrapper for wide tables */
.table-scroll { overflow-x: auto; }



/* Utility */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }


/* Utility */
.hidden { display: none; }

.mt-md { margin-top: 1rem; }
.mb-md { margin-bottom: 1rem; }

/* 
   HEADER REDESIGN  2-row topbar
 */

.header--redesign {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    border-bottom: 1px solid var(--border);
    align-items: stretch;
}

/* Row 1 */
.header-row1 {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0 10px;
}

/* Logo */
.hdr-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: auto;
}
.hdr-logo-icon {
    font-size: 20px;
    line-height: 1;
    filter: drop-shadow(0 0 5px rgba(200,168,75,.4));
}
.hdr-logo-text {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 5px;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--gold2) 0%, var(--gold) 45%, var(--gold3) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 6px rgba(200,168,75,.3));
    line-height: 1;
}
.hdr-logo-sub {
    display: block;
    font-size: 7px;
    letter-spacing: 3.5px;
    color: rgba(200,168,75,.5);
    font-weight: 500;
    text-transform: uppercase;
    -webkit-text-fill-color: rgba(200,168,75,.5);
    margin-top: 3px;
    line-height: 1;
    white-space: nowrap;
}

/* Company pill */
.hdr-company-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    padding: 4px 10px 4px 4px;
    border-radius: 20px;
    border: 1px solid rgba(200,168,75,.2);
    transition: all .2s;
    flex-shrink: 0;
}
.hdr-company-pill:hover {
    background: rgba(200,168,75,.08);
    border-color: rgba(200,168,75,.4);
}
.hdr-company-name {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text2);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hdr-company-status {
    font-size: 10px;
    color: var(--green);
    white-space: nowrap;
}

/* Header language switcher / Przelacznik jezyka w naglowku */
.hdr-language {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.hdr-language-select {
    width: auto;
    min-width: 58px;
    height: 30px;
    padding: 0 14px;
    border-radius: 999px;
    border-color: rgba(200,168,75,.24);
    background-color: rgba(255,255,255,.035);
    color: var(--gold2);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1;
    text-align: center;
    text-align-last: center;
    text-transform: uppercase;
}

.hdr-language-select:focus {
    border-color: var(--gold);
}

/* Logout button */
.hdr-logout {
    flex-shrink: 0;
}

/* Mobile burger trigger */
.nav-burger {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    margin-left: auto;
    border: 1px solid rgba(200,168,75,.24);
    border-radius: 10px;
    background: rgba(255,255,255,.035);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,.22);
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
}

.nav-burger span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--gold2);
    box-shadow: 0 0 8px rgba(200,168,75,.15);
    transition: transform .2s ease, opacity .2s ease, background .2s ease;
}

.nav-burger:hover,
.nav-burger:focus-visible {
    border-color: rgba(200,168,75,.42);
    background: rgba(200,168,75,.08);
    outline: none;
}

body.nav-open .nav-burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

body.nav-open .nav-burger span:nth-child(2) {
    opacity: 0;
}

body.nav-open .nav-burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-backdrop {
    display: none;
}

/* Row 2: Nav bar */
.user-nav--bar {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 6px 0 8px;
    border-top: 1px solid rgba(255,255,255,.05);
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.user-nav--bar::-webkit-scrollbar { display: none; }

/* Override button style for nav-bar context */
.user-nav--bar .btn {
    background: transparent;
    border-color: transparent;
    color: var(--text3);
    padding: 5px 11px;
    font-size: 10px;
    letter-spacing: .8px;
    border-radius: var(--radius);
    white-space: nowrap;
    transition: color .15s, background .15s;
    flex-shrink: 0;
}
.user-nav--bar .btn:hover {
    background: rgba(255,255,255,.04);
    color: var(--text2);
    border-color: transparent;
}
.user-nav--bar .btn.nav-active {
    background: rgba(200,168,75,.1) !important;
    color: var(--gold) !important;
    border-color: transparent !important;
    border-bottom: 2px solid var(--gold) !important;
    border-radius: var(--radius) var(--radius) 0 0 !important;
}
/* Danger btn in nav bar stays red */
.user-nav--bar .btn-danger {
    color: var(--red);
    border-color: rgba(224,85,85,.25);
}
.user-nav--bar .btn-danger:hover {
    background: rgba(224,85,85,.08);
    border-color: rgba(224,85,85,.4);
    color: var(--red);
}

/* Nav separator */
.nav-sep {
    display: inline-block;
    width: 1px;
    height: 18px;
    background: rgba(255,255,255,.1);
    margin: 0 4px;
    flex-shrink: 0;
    align-self: center;
}

/* Keep header-row1 h1 / old style compat if needed */
.header--redesign h1 { display: none; }

/* Mobile overrides */
@media (max-width: 900px) {
    .hdr-logo-text { font-size: 15px; letter-spacing: 4px; }
    .hdr-logo-sub  { display: none; }
    .hdr-company-name { max-width: 100px; font-size: 10px; }
}

@media (max-width: 600px) {
 /* Burger replaces row-2 nav */
    .nav-burger { display: flex !important; }
    .header--redesign .header-row1 { flex-wrap: nowrap; }
    .header-row1 { justify-content: space-between; }
    .hdr-logo-icon { font-size: 16px; }
    .hdr-logo-text { font-size: 13px; letter-spacing: 3px; }
    .hdr-company-pill { display: none; }
    .hdr-logout { display: none; }
    .hdr-language { margin-left: auto; }

 /* Row 2 nav hidden on mobile slides in from burger */
    .user-nav--bar {
        position: fixed !important;
        top: 0 !important; right: -280px !important;
        width: 260px !important; height: 100vh !important;
        height: 100dvh !important;
        background: var(--bg2, #0e0e18) !important;
        border-left: 1px solid var(--border, rgba(255,255,255,.08)) !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        padding: 64px 16px 32px !important;
        gap: 6px !important;
        z-index: 1001;
        border-top: none !important;
        transition: right .28s cubic-bezier(.4, 0, .2, 1);
        box-shadow: -6px 0 32px rgba(0, 0, 0, .5);
    }
    body.nav-open .user-nav--bar { right: 0 !important; }

    .nav-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(5, 6, 10, .62);
        backdrop-filter: blur(2px);
        z-index: 1000;
    }
    body.nav-open .nav-backdrop {
        display: block;
    }

 /* In the slide panel, items are full-width and left-aligned */
    .user-nav--bar .btn {
        width: 100% !important;
        text-align: left !important;
        justify-content: flex-start !important;
        padding: 11px 14px !important;
        font-size: 11px !important;
        letter-spacing: 1px !important;
        border-radius: var(--radius) !important;
        border-bottom: none !important;
    }
    .user-nav--bar .btn.nav-active {
        border-bottom: none !important;
        border-left: 2px solid var(--gold) !important;
        border-radius: 0 var(--radius) var(--radius) 0 !important;
    }
    .nav-sep {
        width: 100% !important;
        height: 1px !important;
        margin: 6px 0 !important;
    }
}
/* ═══════════════════════════════════════════════════════════════
   STAT-KARTY — kolory per pozycja
   ═══════════════════════════════════════════════════════════════ */

/* Gotówka (1) — zielona */
.status-kpi:nth-child(1) .status-kpi-icon {
    background: rgba(78, 201, 122, .1);
    border-color: rgba(78, 201, 122, .2);
    color: var(--green);
}
.status-kpi:nth-child(1) .status-kpi-value { color: var(--green); }

/* Magazyn (2) — biała wartość, złoty pasek */
.status-kpi:nth-child(2) .status-kpi-value { color: var(--text); }

/* Cena ropy (3) — złota wartość */
.status-kpi:nth-child(3) .status-kpi-value { color: var(--gold); }

/* Status (4) — zielona ikona */
.status-kpi:nth-child(4) .status-kpi-icon {
    background: rgba(78, 201, 122, .1);
    border-color: rgba(78, 201, 122, .2);
    color: var(--green);
}

/* Mobile — 2 kolumny poniżej 900px */
@media (max-width: 900px) {
    .status-grid--redesign {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 480px) {
    .status-grid--redesign {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    .status-kpi-value { font-size: 15px !important; }
}
