/* Admin modul — dashboard stil */
.admin-page {
    padding: 20px;
    font-family: 'Century Gothic', CenturyGothic, AppleGothic, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    padding: 12px 21px;
    border-radius: 21px;
    color: #fff;
    background: linear-gradient(135deg, #dc3545 0%, #6f42c1 100%);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .09);
}

.admin-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.admin-header h1, .admin-header h2 { color: #fff; font-weight: 700; margin: 0; font-size: 1.6rem; line-height: 1.2; }
.admin-header p { margin: 0; opacity: .75; color: #fff; font-size: .85rem; line-height: 1.2; }

.admin-back-btn {
    background-color: rgba(255,255,255,.95);
    color: var(--patient-heading);
    border: 1px solid rgba(255,255,255,.3);
    padding: 8px 16px;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.25s ease;
    font-weight: 700;
}

.admin-back-btn:hover {
    background-color: #fff;
    color: #dc3545;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15,23,42,.12);
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.admin-stat-card {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    border: 1px solid rgba(148,163,184,.18);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.admin-stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--patient-accent), #14b8a6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.admin-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(15,23,42,.12);
    border-color: rgba(20,184,166,.3);
}

.admin-stat-card:hover::before {
    opacity: 1;
}.admin-stat-card h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.admin-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.admin-module-card {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    border: 1px solid rgba(148,163,184,.18);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.admin-module-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--patient-accent), #14b8a6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.admin-module-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(15,23,42,.12);
    border-color: rgba(20,184,166,.3);
}

.admin-module-card:hover::before {
    opacity: 1;
}.admin-module-card h6 {
    font-weight: 600;
    margin-bottom: 8px;
}

.admin-module-card p {
    color: var(--patient-muted);
    font-size: .875rem;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 16px;
    }
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.admin-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--patient-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ===== Admin sidebar layout ===== */
.admin-detail-page {
    display: flex;
    min-height: 100vh;
    background: #f4f7fb;
}

.admin-sidebar {
    width: 280px;
    min-width: 280px;
    background: linear-gradient(180deg, #1a2236 0%, #15203a 55%, #101a30 100%);
    box-shadow: 14px 0 34px rgba(15,23,42,.18);
    padding: 18px 14px;
    overflow-y: auto;
    position: sticky;
    top: 0;
    height: 100vh;
}

.admin-sidebar-header {
    padding: 0 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    margin-bottom: 14px;
}

.admin-sidebar-header h4 {
    color: #fff;
    font-size: 1.512rem;
    font-weight: 850;
    margin: 0;
}

.admin-sidebar-header p {
    font-size: 1.1875rem;
    color: rgba(255,255,255,.78);
}

.admin-sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: rgba(255,255,255,.84);
    text-decoration: none;
    font-size: 1.14rem;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: 14px;
    transition: all 0.25s ease;
}

.admin-sidebar-menu li a:hover {
    background: rgba(220,53,69,.12);
    color: #fff;
    border-color: rgba(220,53,69,.3);
}

.admin-sidebar-menu li a.active {
    background: rgba(220,53,69,.18);
    color: #fff;
    border-color: #dc3545;
    font-weight: 600;
}

.admin-sidebar-menu li a i {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255,255,255,.1);
    font-size: 0.9rem;
}

.admin-sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,.08);
    margin: 14px 6px;
}

.admin-sidebar-section-title {
    padding: 0 14px 8px;
    font-size: .75rem;
    font-weight: 700;
    color: rgba(255,255,255,.4);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 6px;
}

/* Admin main content area */
.admin-main {
    flex: 1;
    padding: 20px;
    overflow-y: visible;
}

/* Admin small banner (diskretan, na uzoru kabinet-banner-sm) */
.admin-banner-sm {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 21px;
    border-radius: 21px;
    background: linear-gradient(135deg, rgba(220,53,69,.06) 0%, rgba(111,66,193,.06) 100%);
    border: 1px solid rgba(148,163,184,.12);
    border-left: 4px solid #dc3545;
    margin-bottom: 18px;
}

.admin-banner-sm > div:first-child > i {
    font-size: 1.3rem;
    color: #dc3545;
}

.admin-banner-sm h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    color: var(--patient-heading, #1e293b);
}

.admin-banner-sm p {
    font-size: .85rem;
    line-height: 1.2;
    margin: 0;
}

.admin-logout-btn {
    background-color: transparent;
    color: #e74c3c;
    border: 1px solid #e74c3c;
    padding: 5px 14px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s ease;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
}

.admin-logout-btn:hover {
    background-color: #e74c3c;
    color: #fff;
    text-decoration: none;
}

/* Banner boje po admin podstranicama */
.admin-banner-sm.banner-korisnici { border-left-color: #0d6efd; }
.admin-banner-sm.banner-korisnici > div:first-child > i { color: #0d6efd; }
.admin-banner-sm.banner-lekari { border-left-color: #198754; }
.admin-banner-sm.banner-lekari > div:first-child > i { color: #198754; }
.admin-banner-sm.banner-kabineti { border-left-color: #0dcaf0; }
.admin-banner-sm.banner-kabineti > div:first-child > i { color: #0dcaf0; }
.admin-banner-sm.banner-specijalizacije { border-left-color: #fd7e14; }
.admin-banner-sm.banner-specijalizacije > div:first-child > i { color: #fd7e14; }
.admin-banner-sm.banner-cenovnik { border-left-color: #6f42c1; }
.admin-banner-sm.banner-cenovnik > div:first-child > i { color: #6f42c1; }
.admin-banner-sm.banner-paketi { border-left-color: #20c997; }
.admin-banner-sm.banner-paketi > div:first-child > i { color: #20c997; }
.admin-banner-sm.banner-plate { border-left-color: #fd7e14; }
.admin-banner-sm.banner-plate > div:first-child > i { color: #fd7e14; }
.admin-banner-sm.banner-health { border-left-color: #e74c3c; }
.admin-banner-sm.banner-health > div:first-child > i { color: #e74c3c; }
.admin-banner-sm.banner-lab { border-left-color: #0dcaf0; }
.admin-banner-sm.banner-lab > div:first-child > i { color: #0dcaf0; }
.admin-banner-sm.banner-dokumenti { border-left-color: #6c757d; }
.admin-banner-sm.banner-dokumenti > div:first-child > i { color: #6c757d; }
.admin-banner-sm.banner-audit { border-left-color: #dc3545; }
.admin-banner-sm.banner-audit > div:first-child > i { color: #dc3545; }
.admin-banner-sm.banner-migracije { border-left-color: #495057; }
.admin-banner-sm.banner-migracije > div:first-child > i { color: #495057; }
.admin-banner-sm.banner-kpi { border-left-color: #0d6efd; }
.admin-banner-sm.banner-kpi > div:first-child > i { color: #0d6efd; }
.admin-banner-sm.banner-protokol { border-left-color: #198754; }
.admin-banner-sm.banner-protokol > div:first-child > i { color: #198754; }
.admin-banner-sm.banner-postavke { border-left-color: #6c757d; }
.admin-banner-sm.banner-postavke > div:first-child > i { color: #6c757d; }
.admin-banner-sm.banner-backup { border-left-color: #0d6efd; }
.admin-banner-sm.banner-backup > div:first-child > i { color: #0d6efd; }
.admin-banner-sm.banner-i18n { border-left-color: #fd7e14; }
.admin-banner-sm.banner-i18n > div:first-child > i { color: #fd7e14; }
.admin-banner-sm.banner-fhir { border-left-color: #20c997; }
.admin-banner-sm.banner-fhir > div:first-child > i { color: #20c997; }
.admin-banner-sm.banner-finansije { border-left-color: #198754; }
.admin-banner-sm.banner-finansije > div:first-child > i { color: #198754; }
.admin-banner-sm.banner-kontrola { border-left-color: #dc3545; }
.admin-banner-sm.banner-kontrola > div:first-child > i { color: #dc3545; }
.admin-banner-sm.banner-predikcije { border-left-color: #6f42c1; }
.admin-banner-sm.banner-predikcije > div:first-child > i { color: #6f42c1; }

@media (max-width: 768px) {
    .admin-detail-page { flex-direction: column; }
    .admin-sidebar { width: 100%; min-width: 100%; height: auto; position: relative; }
}

/* ===== Super Admin sidebar section ===== */
.super-admin-section {
    margin-top: 4px;
}
.super-admin-label {
    color: #6f42c1;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 14px 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.super-admin-section a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    color: rgba(255,255,255,.84);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: 10px;
    transition: all 0.25s ease;
}
.super-admin-section a:hover {
    background: rgba(111,66,193,.15);
    color: #fff;
    border-color: rgba(111,66,193,.4);
}
.super-admin-section a.active {
    background: rgba(111,66,193,.22);
    color: #fff;
    border-color: #6f42c1;
}
.super-admin-section a i {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(111,66,193,.15);
    font-size: 0.85rem;
}
.impersonate-stop-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: #ffc107 !important;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    border: 1px solid rgba(255,193,7,.3);
    border-radius: 10px;
    background: rgba(255,193,7,.08);
    transition: all 0.25s ease;
}
.impersonate-stop-link:hover {
    background: rgba(255,193,7,.18);
    color: #fff !important;
    border-color: #ffc107;
}

/* Admin — lista kabineta: AutoFit kolone, Opis širok, Status/Akcije uske */
.admin-kabineti-table-wrap {
    width: 100%;
    overflow-x: hidden;
    overflow-y: visible;
    max-height: none;
}

.admin-kabineti-table-wrap .admin-kabineti-table {
    table-layout: fixed;
    width: 100%;
    min-width: 0;
    margin-bottom: 0;
    font-family: 'Century Gothic', CenturyGothic, AppleGothic, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    font-size: 1rem;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-kabineti-table-wrap .admin-kabineti-table th,
.admin-kabineti-table-wrap .admin-kabineti-table td {
    vertical-align: middle;
    padding: 0.7rem 0.85rem;
    word-break: normal !important;
    overflow-wrap: normal !important;
    max-width: none !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    font-family: inherit !important;
}

.admin-kabineti-table-wrap .admin-kabineti-table thead th {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #134e4a;
    background: #f0fdfa;
    white-space: nowrap;
}

.admin-kabineti-table .col-kab-idx,
.admin-kabineti-table .col-kab-red {
    width: 1%;
    white-space: nowrap;
    text-align: center;
}

.admin-kabineti-table .col-kab-idx {
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 600;
}

.admin-kabineti-table .col-kab-naziv {
    font-size: 1.05rem;
    font-weight: 600;
    color: #134e4a;
    white-space: nowrap;
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-kabineti-table .col-kab-oznaka {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #475569;
    white-space: nowrap;
}

.admin-kabineti-table .col-kab-red {
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
}

.admin-kabineti-table .col-kab-opis {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
    min-width: 8rem;
    max-width: none;
}

.admin-kabineti-table .col-kab-status {
    width: 1%;
    white-space: nowrap;
    text-align: center;
}

.admin-kabineti-table .col-kab-status .badge {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.45em 0.7em;
    letter-spacing: 0.02em;
}

.admin-kabineti-table .col-kab-akcije {
    width: var(--mcl-col-actions-w) !important;
    min-width: var(--mcl-col-actions-min) !important;
    max-width: var(--mcl-col-actions-w) !important;
    white-space: nowrap;
    text-align: center;
}

.admin-kabineti-table .kab-akcije-group {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    flex-wrap: nowrap;
}

.admin-kabineti-table .btn-sm {
    font-family: inherit !important;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    line-height: 1.25;
}

.admin-kabineti-table tbody tr:hover td {
    background: rgba(6, 182, 212, 0.04);
}

/* Admin stranice — jedan vertikalni skrol (body), bez ugnježdenog u tabelama */
.content-wrapper .table-responsive {
    overflow-y: visible;
    max-height: none;
}

/* Admin — cenovnik/norme/lekari: bez horizontalnog skrola */
.admin-cenovnik-table-wrap,
.admin-norme-table-wrap,
.admin-lekari-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
    overflow-y: visible !important;
}

/* ============================================================
   Standardizovane tabele — vidi mcl-tables-forms.css (AutoFit global)
   Klasa mcl-report-table ostaje za semantiku; layout = auto po sadržaju
   ============================================================ */
.mcl-report-table {
    /* Nasleđuje global iz mcl-tables-forms.css */
}

/* Admin tabele — horizontalni red, bez lomljenja u vertikalni stub */
.admin-layout-table,
.admin-spec-table {
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: collapse;
}

.admin-layout-table thead th,
.admin-layout-table tbody td,
.admin-spec-table thead th,
.admin-spec-table tbody td {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    vertical-align: middle;
    padding: 0.55rem 0.75rem;
}

.admin-layout-table .mcl-cell-wrap,
.admin-spec-table .mcl-cell-wrap,
.admin-kabineti-table .col-kab-opis {
    white-space: normal !important;
    word-break: break-word !important;
    min-width: 8rem;
    max-width: 24rem;
}

.admin-spec-table .col-spec-idx {
    width: 1%;
    text-align: center;
}

.admin-spec-table .col-spec-akcije {
    width: var(--mcl-col-actions-w) !important;
    min-width: var(--mcl-col-actions-min) !important;
    max-width: var(--mcl-col-actions-w) !important;
    text-align: center;
}

.admin-spec-table .col-spec-naziv {
    font-weight: 600;
    color: #134e4a;
}

.mcl-table-loading {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.15s ease;
}
