/* ============================================================
   Skoon Flex Platform — design system
   Palette derived from the Skoon MVP presentation
   ============================================================ */
:root {
    --skoon-navy: #0F1B33;
    --skoon-navy-2: #16243f;
    --skoon-navy-3: #1d2d4d;
    --skoon-blue: #000E8F;          /* brand blue (logo) — used on light surfaces */
    --skoon-blue-dark: #000a6e;
    --skoon-blue-bright: #4A5BF0;   /* lighter accent for the dark navy sidebar */
    --skoon-mint: #16C098;
    --skoon-mint-bg: #DAF6EC;
    --skoon-mint-text: #0E8C6A;
    --skoon-amber-bg: #FDEBC8;
    --skoon-amber-text: #B6791B;
    --skoon-blue-bg: #E2E4F6;
    --skoon-bg: #F4F6FA;
    --skoon-card-border: #E6EAF1;
    --skoon-text: #0F1B33;
    --skoon-text-2: #6B7890;
    --skoon-text-3: #98A2B3;
}

html, body {
    font-family: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--skoon-bg);
}

/* MudBlazor global font override */
.mud-typography, .mud-input, .mud-button-root, .mud-nav-link {
    font-family: 'Poppins', sans-serif !important;
}

h1:focus { outline: none; }

/* ---------- Sidebar ---------- */
.skoon-sidebar {
    background: var(--skoon-navy) !important;
    border: none !important;
    color: rgba(255,255,255,0.72);
}

.skoon-sidebar .mud-drawer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.skoon-brand {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    padding: 26px 24px 22px 24px;
}
.skoon-brand .dot { color: var(--skoon-mint); }

.skoon-navlabel {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.38);
    padding: 6px 24px;
    margin-top: 8px;
}

/* Nav links inside the navy sidebar */
.skoon-sidebar .mud-nav-link {
    color: rgba(255,255,255,0.72) !important;
    margin: 2px 12px;
    border-radius: 9px;
    padding-top: 10px;
    padding-bottom: 10px;
    font-weight: 500;
    font-size: 0.92rem;
    border-left: 3px solid transparent;
}
.skoon-sidebar .mud-nav-link:hover {
    background: rgba(255,255,255,0.06) !important;
    color: #fff !important;
}
.skoon-sidebar .mud-nav-link.active {
    background: rgba(74,91,240,0.20) !important;
    color: #fff !important;
    border-left: 3px solid var(--skoon-blue-bright);
}
.skoon-sidebar .mud-nav-link.active .mud-icon-root {
    color: var(--skoon-blue-bright) !important;
}
.skoon-sidebar .mud-nav-link .mud-icon-root {
    color: rgba(255,255,255,0.55);
}

.skoon-sidebar-spacer { flex: 1 1 auto; }

.skoon-account {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 16px 20px 20px 20px;
}
.skoon-account-name {
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}
.skoon-account-role {
    color: rgba(255,255,255,0.5);
    font-size: 0.74rem;
}

/* role + language toggles in the sidebar */
.skoon-toggle {
    display: flex;
    background: rgba(255,255,255,0.07);
    border-radius: 9px;
    padding: 3px;
    gap: 3px;
    margin-top: 14px;
}
.skoon-toggle button {
    flex: 1;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.62);
    font-size: 0.74rem;
    font-weight: 600;
    padding: 7px 4px;
    border-radius: 7px;
    cursor: pointer;
    font-family: inherit;
    transition: all .12s ease;
}
.skoon-toggle button:hover { color: #fff; }
.skoon-toggle button.active {
    background: var(--skoon-blue-bright);
    color: #fff;
}
.skoon-lang { margin-top: 10px; }
.skoon-lang button { font-size: 0.72rem; padding: 5px 4px; }

/* ---------- Main canvas ---------- */
.skoon-main { background: var(--skoon-bg); }

/* ---------- Page headers ---------- */
.page-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2.2px;
    text-transform: uppercase;
    color: var(--skoon-blue);
    margin-bottom: 6px;
}
.page-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--skoon-text);
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin-bottom: 6px;
}
.page-subtitle {
    color: var(--skoon-text-2);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

/* ---------- Section label (inside cards / forms) ---------- */
.section-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--skoon-blue);
    margin: 6px 0 4px 0;
}
.section-label::before {
    content: "";
    width: 7px; height: 7px;
    background: var(--skoon-mint);
    border-radius: 2px;
    transform: rotate(45deg);
    display: inline-block;
}

/* ---------- Cards ---------- */
.skoon-card {
    background: #fff;
    border: 1px solid var(--skoon-card-border);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15,27,51,0.04);
}
.skoon-card-pad { padding: 22px 24px; }

/* ---------- List rows (asset / tender overview) ---------- */
.list-row {
    display: flex;
    align-items: center;
    gap: 18px;
    background: #fff;
    border: 1px solid var(--skoon-card-border);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 12px;
    transition: box-shadow .15s ease, border-color .15s ease;
}
.list-row:hover {
    box-shadow: 0 6px 18px rgba(15,27,51,0.08);
    border-color: #d3dbe8;
}
.list-row-body { flex: 1 1 auto; min-width: 0; }
.list-row-title {
    font-weight: 700;
    color: var(--skoon-text);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.list-row-sub {
    color: var(--skoon-text-2);
    font-size: 0.84rem;
    margin-top: 3px;
}
.list-row-metrics {
    display: flex;
    align-items: center;
    gap: 26px;
    flex-shrink: 0;
}

/* ---------- Icon tiles ---------- */
.icon-tile {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.icon-tile .mud-icon-root { font-size: 1.5rem; }
.tile-green  { background: #DAF6EC; } .tile-green  .mud-icon-root { color: #16C098; }
.tile-blue   { background: #E2E4F6; } .tile-blue   .mud-icon-root { color: #000E8F; }
.tile-amber  { background: #FDEBC8; } .tile-amber  .mud-icon-root { color: #E0A22A; }
.tile-violet { background: #ECE7FE; } .tile-violet .mud-icon-root { color: #7C5CFC; }
.tile-cyan   { background: #D6F2F8; } .tile-cyan   .mud-icon-root { color: #1196B0; }

/* ---------- Status badges ---------- */
.badge {
    display: inline-block;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    padding: 4px 9px;
    border-radius: 6px;
    white-space: nowrap;
}
.badge-available { background: var(--skoon-mint-bg); color: var(--skoon-mint-text); }
.badge-open      { background: var(--skoon-blue-bg); color: var(--skoon-blue); }
.badge-soon      { background: var(--skoon-amber-bg); color: var(--skoon-amber-text); }

/* ---------- Metric block (right side of list rows) ---------- */
.metric { text-align: right; }
.metric-value { font-weight: 700; color: var(--skoon-text); font-size: 0.98rem; line-height: 1.15; }
.metric-label { color: var(--skoon-text-3); font-size: 0.64rem; letter-spacing: 1px; text-transform: uppercase; margin-top: 2px; }

/* green price chip */
.price-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    border: 1.5px solid var(--skoon-mint);
    color: var(--skoon-mint-text);
    border-radius: 10px;
    padding: 6px 12px;
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1.1;
}
.price-chip small { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--skoon-text-3); }

/* ---------- Metric cards (detail page grid) ---------- */
.metric-card {
    background: #fff;
    border: 1px solid var(--skoon-card-border);
    border-radius: 13px;
    padding: 16px 18px;
    height: 100%;
}
.metric-card .mc-icon { margin-bottom: 10px; }
.metric-card .mc-label { color: var(--skoon-text-3); font-size: 0.66rem; letter-spacing: 1px; text-transform: uppercase; }
.metric-card .mc-value { color: var(--skoon-text); font-weight: 800; font-size: 1.25rem; margin-top: 2px; }
.metric-card .mc-hint  { color: var(--skoon-text-2); font-size: 0.76rem; margin-top: 2px; }

/* ---------- Info / interest panel ---------- */
.info-panel {
    background: linear-gradient(160deg, #F0F5FF, #E7EEFF);
    border: 1px solid #D4E0FF;
    border-radius: 14px;
    padding: 22px;
    height: 100%;
}
.info-panel h6 { color: var(--skoon-blue); font-weight: 700; margin-bottom: 8px; }

/* ---------- Hero banner (location offering) ---------- */
.hero-banner {
    background: linear-gradient(120deg, var(--skoon-navy), var(--skoon-navy-3));
    border-radius: 16px;
    padding: 24px 28px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}
.hero-banner h5 { font-weight: 800; font-size: 1.3rem; margin-bottom: 6px; }
.hero-banner .hero-sub { color: rgba(255,255,255,0.65); font-size: 0.85rem; }
.hero-price { text-align: right; }
.hero-price .hp-value { font-size: 2rem; font-weight: 800; color: var(--skoon-mint); line-height: 1; }
.hero-price .hp-label { color: rgba(255,255,255,0.6); font-size: 0.72rem; letter-spacing: 0.5px; }

/* filter bar tags */
.filter-tag {
    font-size: 0.58rem; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase;
    color: var(--skoon-mint-text); background: var(--skoon-mint-bg);
    border-radius: 4px; padding: 2px 6px; margin-left: 6px;
}

/* primary button polish */
.mud-button-filled-primary { box-shadow: 0 2px 8px rgba(0,14,143,0.28) !important; }

/* ---------- Validation ---------- */
.valid.modified:not([type=checkbox]) { outline: 1px solid #16C098; }
.invalid { outline: 1px solid #e5484d; }
.validation-message { color: #e5484d; }

/* ============================================================
   Boilerplate (loading / error) — recolored
   ============================================================ */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 1rem;
    color: white;
}
.blazor-error-boundary::after { content: "An error has occurred." }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}
.loading-progress circle {
    fill: none;
    stroke: #e0e6f0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}
.loading-progress circle:last-child {
    stroke: var(--skoon-blue);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}
.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    color: var(--skoon-navy);
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}
.loading-progress-text:after { content: var(--blazor-load-percentage-text, "Loading"); }
