/* ═══════════════════════════════════════════════════════════
   FRIGOBLOCK SELECT — Enterprise Design System
   ═══════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────── */
:root {
    --fb-navy:        #0d1f3c;
    --fb-navy-mid:    #162847;
    --fb-navy-light:  #1e3a5f;
    --fb-accent:      #00b4d8;
    --fb-accent-dark: #0096b7;
    --fb-success:     #16a34a;
    --fb-warning:     #d97706;
    --fb-danger:      #dc2626;
    --fb-bg:          #f0f4f8;
    --fb-card:        #ffffff;
    --fb-border:      #dde3ec;
    --fb-text:        #1e293b;
    --fb-text-muted:  #64748b;
    --fb-topbar-h:    58px;
    --fb-subbar-h:    36px;
    --fb-footer-h:    44px;
    --shadow-card:    0 1px 4px rgba(13,31,60,.08), 0 4px 16px rgba(13,31,60,.06);
    --shadow-elevated:0 4px 20px rgba(13,31,60,.14);
}

/* ── Reset & Base ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; font-size: 14px; }

body {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--fb-bg);
    color: var(--fb-text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    margin: 0;
}

/* ── Top Bar ────────────────────────────────────── */
.fb-topbar {
    background: var(--fb-navy);
    height: auto;
    min-height: var(--fb-topbar-h);
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
    border-bottom: 2px solid var(--fb-accent);
    box-shadow: 0 2px 12px rgba(0,0,0,.25);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.fb-topbar .container-fluid { min-height: var(--fb-topbar-h); }

.fb-logo { flex-shrink: 0; }

.fb-brand-link {
    text-decoration: none;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -.3px;
    line-height: 1.2;
    display: block;
}

.fb-brand-accent { color: var(--fb-accent); }

.fb-brand-sub {
    color: rgba(255,255,255,.45);
    font-size: 0.68rem;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.fb-nav-link {
    color: rgba(255,255,255,.75);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 500;
    padding: .35rem .75rem;
    border-radius: 5px;
    transition: all .15s;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.fb-nav-link:hover, .fb-nav-link.active {
    color: #fff;
    background: rgba(0,180,216,.2);
}

.fb-nav-separator {
    width: 1px;
    height: 18px;
    background: rgba(255,255,255,.15);
    margin: 0 2px;
}

.fb-version-badge {
    background: rgba(0,180,216,.15);
    color: var(--fb-accent);
    border: 1px solid rgba(0,180,216,.3);
    border-radius: 4px;
    font-size: .68rem;
    font-weight: 700;
    padding: 2px 7px;
    letter-spacing: .5px;
}

/* ── Sub Bar ────────────────────────────────────── */
.fb-subbar {
    background: var(--fb-navy-mid);
    height: var(--fb-subbar-h);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.fb-subbar-title {
    color: rgba(255,255,255,.9);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .2px;
}

.fb-subbar-right {
    color: rgba(255,255,255,.4);
    font-size: .72rem;
    letter-spacing: .3px;
}

.fb-subbar-right .separator { opacity: .3; }

.text-accent { color: var(--fb-accent) !important; }

/* ── Main Content ───────────────────────────────── */
.fb-main {
    flex: 1 0 auto;
    overflow-y: auto;
    padding-bottom: calc(var(--fb-footer-h) + 8px);
}

/* ── Footer ─────────────────────────────────────── */
.fb-footer {
    background: var(--fb-navy);
    height: var(--fb-footer-h);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    border-top: 1px solid rgba(255,255,255,.08);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1020;
}

.fb-footer-brand {
    color: rgba(255,255,255,.85);
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: -.2px;
}

.fb-footer-copy {
    color: rgba(255,255,255,.35);
    font-size: .72rem;
}

/* ── Cards ──────────────────────────────────────── */
.card {
    border: 1px solid var(--fb-border);
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    background: var(--fb-card);
}

.card-header {
    border-bottom: 1px solid var(--fb-border);
    border-radius: 8px 8px 0 0 !important;
    padding: .6rem 1rem;
    font-size: .82rem;
}

.card-header.fb-header-navy {
    background: var(--fb-navy);
    color: white;
    border-bottom-color: rgba(255,255,255,.08);
}

.card-header.fb-header-accent {
    background: linear-gradient(135deg, var(--fb-navy-light), var(--fb-navy));
    color: white;
    border-left: 3px solid var(--fb-accent);
}

.card-header.fb-header-success {
    background: linear-gradient(135deg, #14532d, #166534);
    color: white;
    border-left: 3px solid #4ade80;
}

.card-header.fb-header-warning {
    background: linear-gradient(135deg, #78350f, #92400e);
    color: white;
    border-left: 3px solid #fbbf24;
}

.card-header.fb-header-info {
    background: linear-gradient(135deg, #0c4a6e, #075985);
    color: white;
    border-left: 3px solid #38bdf8;
}

/* ── Inputs ─────────────────────────────────────── */
.form-control, .form-select {
    border: 1px solid #c8d3e0;
    border-radius: 6px;
    font-size: .83rem;
    color: var(--fb-text);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--fb-accent);
    box-shadow: 0 0 0 3px rgba(0,180,216,.12);
    outline: none;
}

.input-group-text {
    background: #f1f5f9;
    border-color: #c8d3e0;
    color: var(--fb-text-muted);
    font-size: .78rem;
    font-weight: 600;
}

.form-label {
    font-size: .78rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

/* ── Buttons ─────────────────────────────────────── */
.btn-fb-primary {
    background: linear-gradient(135deg, var(--fb-accent-dark), var(--fb-accent));
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: .85rem;
    padding: .55rem 1.4rem;
    transition: all .2s;
    box-shadow: 0 2px 8px rgba(0,180,216,.35);
}
.btn-fb-primary:hover {
    background: linear-gradient(135deg, var(--fb-accent), #22d3ee);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,180,216,.45);
    color: #fff;
}

.btn-fb-secondary {
    background: #f1f5f9;
    color: var(--fb-navy);
    border: 1px solid #c8d3e0;
    border-radius: 6px;
    font-weight: 600;
    font-size: .85rem;
    padding: .55rem 1.4rem;
    transition: all .2s;
}
.btn-fb-secondary:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

/* ── Wizard Stepper ─────────────────────────────── */
.wizard-line {
    position: absolute;
    top: 21px;
    left: 12%;
    right: 12%;
    height: 2px;
    background: #dde3ec;
    z-index: 0;
}

.wizard-step { z-index: 1; }

.wizard-step-icon {
    width: 42px;
    height: 42px;
    font-size: 16px;
    background: #e8edf5;
    color: #94a3b8;
    border: 2.5px solid #dde3ec;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .25s ease;
}
.wizard-step-icon.active {
    background: var(--fb-navy);
    color: white;
    border-color: var(--fb-accent);
    box-shadow: 0 0 0 4px rgba(0,180,216,.2);
}
.wizard-step-icon.completed {
    background: var(--fb-success);
    color: white;
    border-color: #4ade80;
}
.wizard-step-label {
    font-size: 10.5px;
    color: #94a3b8;
    white-space: nowrap;
    letter-spacing: .2px;
}
.wizard-step-label.active   { color: var(--fb-navy); font-weight: 700; }
.wizard-step-label.completed { color: var(--fb-success); font-weight: 600; }

/* ── Tables ─────────────────────────────────────── */
.table { font-size: .82rem; }
.table thead th {
    background: #f8fafc;
    color: #374151;
    font-weight: 700;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 2px solid var(--fb-border);
}

/* ── KPI / Metric Tiles ─────────────────────────── */
.fb-kpi {
    background: var(--fb-card);
    border: 1px solid var(--fb-border);
    border-radius: 8px;
    padding: .9rem 1rem;
    box-shadow: var(--shadow-card);
}
.fb-kpi-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--fb-navy);
    line-height: 1.1;
}
.fb-kpi-unit {
    font-size: .8rem;
    font-weight: 600;
    color: var(--fb-accent);
}
.fb-kpi-label {
    font-size: .7rem;
    color: var(--fb-text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: 2px;
}

/* ── Alerts ─────────────────────────────────────── */
.alert {
    border-radius: 7px;
    font-size: .82rem;
    border-width: 1px;
}

/* ── Badges ─────────────────────────────────────── */
.badge {
    font-size: .7rem;
    font-weight: 600;
    border-radius: 4px;
}

/* ── Misc ───────────────────────────────────────── */
.section-title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: var(--fb-text-muted);
    border-bottom: 1px solid var(--fb-border);
    padding-bottom: .4rem;
    margin-bottom: .75rem;
}

.sticky-col {
    position: sticky;
    top: calc(var(--fb-topbar-h) + var(--fb-subbar-h) + 12px);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f0f4f8; }
::-webkit-scrollbar-thumb { background: #c8d3e0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
