/* =============================================================================
   UI Polish — Wave 9-F
   Small targeted overrides for the polish bundle. Do not bloat existing files.
   ============================================================================= */

/* ---------------------------------------------------------------------------
   H7 — Aktuelni Plan & multi-row finance/pocetni-plan headers were unreadable:
   the inline background-color: #f8f9fa overrode the default dark header bg,
   but the white text from .igc-table thead th was left inheriting. Force a
   dark slate text color on light-background headers so labels are legible.
   --------------------------------------------------------------------------- */
.igc-table.finance-table thead th,
.igc-table.pocetni-plan-table thead th {
    color: #1f2937;
    font-weight: 600;
}

/* Keep dark separators visible on the light header rows. */
.igc-table.finance-table thead th[colspan],
.igc-table.pocetni-plan-table thead th[colspan] {
    border-bottom: 1px solid #d1d5db;
}

/* The SECOND header row (% Režije sub-headers: Grupe/Sektor/Država/Firma)
   keeps the default dark .igc-table th background, so the dark-slate color
   from H7 above made it unreadable (dark on dark). White text there. */
.igc-table.finance-table thead tr:nth-child(2) th,
.igc-table.pocetni-plan-table thead tr:nth-child(2) th {
    color: #fff;
}

/* ---------------------------------------------------------------------------
   L3 — Multi-row "% Rezultat" rowspan needs to sit cleanly above the
   sub-headers. Give the rowspanned cells a clear vertical anchor so they
   don't visually float behind the sub-header row's text.
   --------------------------------------------------------------------------- */
.igc-table.pocetni-plan-table thead th[rowspan] {
    vertical-align: middle;
    background-color: #f8f9fa;
    border-right: 1px solid #e5e7eb;
}

/* ---------------------------------------------------------------------------
   M9 — Force horizontal scroll on SEF ulazne fakture so a 2700px-wide
   9-column table is reachable from a 1130px viewport. The Bootstrap
   .table-responsive wrapper does the heavy lifting; this just ensures
   the inner table never collapses below its natural column widths.
   --------------------------------------------------------------------------- */
.ulazne-sef-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.ulazne-sef-scroll > .igc-table-wrapper {
    overflow-x: visible;
}
.ulazne-sef-scroll table.igc-table {
    min-width: 2400px;
}

/* ---------------------------------------------------------------------------
   L2 — Make the "Pozivnica na cekanju" stat card clickable so it filters
   to the invitations tab.
   --------------------------------------------------------------------------- */
.stats-card[data-action="show-invitations"] {
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.stats-card[data-action="show-invitations"]:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

/* ---------------------------------------------------------------------------
   L4 — Company-select header bars: replace gaudy purple/pink/cyan/green
   with a flat blue-grey palette that matches the rest of the app.
   --------------------------------------------------------------------------- */
.firma-box .box-header,
.sektor-box .box-header,
.grupa-box .box-header,
.mesto-box .box-header {
    background: #34495e !important;
    color: #ffffff !important;
}

/* ---------------------------------------------------------------------------
   L9 — Signed-out alert on login.php. Small, unobtrusive, dismissable.
   --------------------------------------------------------------------------- */
.alert-signed-out {
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 18px;
    font-size: 14px;
}
