/* --- SPOLEČNÉ PROMĚNNÉ A ZÁKLAD --- */
:root {
    --sc-red: #e63946; 
    --sc-dark-bg: #121212; 
    --sc-card-bg: #1e1e1e; 
    --sc-text: #e0e0e0;
    --sc-border: #ff8a3c; /* Oranžová barva pro záři a tlačítko */
}

body {
    background-color: var(--sc-dark-bg);
    color: var(--sc-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    background-image: url('../img/pattern2.webp');
    background-repeat: repeat; 
}

/* --- LOGIN STRÁNKA --- */
.login-page {
    min-height: 100vh;

    display: flex;
    align-items: center;      /* vertikální střed */
    justify-content: center;  /* horizontální střed */

    position: relative;

    background:
        linear-gradient(
            to bottom,
            rgba(30, 30, 30, 0.5),
            rgba(18, 18, 18, 0.9)
        ),
        url('../img/pattern2.webp');

    background-repeat: repeat;
}

/* STYL PRO LOGO */
.login-logo {
    position: absolute;
    top: calc(50% - 520px); /* polovina karty + mezera */
    left: 50%;
    transform: translateX(-50%);
    max-width: 480px;
}

/* === SIMPLE-CAR LOGIN CARD – PREMIUM UI GLASS === */
.login-card {
    position: relative;
    width: 100%;
    max-width: 500px;

    /* UI glass panel */
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.08),
            rgba(40, 40, 40, 0.92)
        );

    border: 1px solid rgba(255, 140, 0, 0.55);
    border-radius: 16px;

    /* Automotive glow (idle) */
    box-shadow:
        0 0 25px rgba(255, 140, 0, 0.35),
        0 0 60px rgba(0, 0, 0, 0.85);

    overflow: hidden;

    /* Smooth interactions */
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

/* Jemný skleněný odlesk */
.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.10),
            rgba(255, 255, 255, 0.02) 40%,
            rgba(0, 0, 0, 0.15)
        );

    pointer-events: none;
}

/* Hover + focus (input aktivní) */
.login-card:hover,
.login-card:focus-within {
    border-color: rgba(255, 140, 0, 1);

    box-shadow:
        /* VNITŘNÍ EDGE GLOW */
        inset 0 0 0 1px rgba(255, 140, 0, 0.85),
        inset 0 0 18px rgba(255, 140, 0, 0.35),

        /* VNĚJŠÍ GLOW */
        0 0 35px rgba(255, 140, 0, 0.55),
        0 0 90px rgba(0, 0, 0, 0.9);

    transform: scale(1.01);
}

/* Obsah karty */
.login-card .card-body {
    position: relative;
    z-index: 1;

    background: transparent !important;
    padding: 3rem !important;
}

.login-card .form-control {
    background: #2a2a2a;
    border: 1px solid var(--sc-border);
    color: white;
    padding: 12px;
    width: 100%; 
}

.login-card .form-control:focus {
    border-color: var(--sc-border); /* Oranžový okraj při fokusu */
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.5); /* Oranžová záře při fokusu */
}

/* === SIMPLE-CAR CMS METAL LOGO === */
.logo-cms {
    letter-spacing: 0.06em;
    color: white;
}

.logo-cms .cms {
    letter-spacing: normal; /* ← KLÍČOVÉ */
}

.logo-cms .cms span {
    font-weight: 900;

    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.65);
}

.logo-cms .cms span + span {
    margin-left: -0.30em;
}

/* C – černá */
.cms-c {
    color: #000000;
}

/* M – výrazná oranžová (brand) */
.cms-m {
    color: #ff8a3c;
}

/* S – čistě bílá */
.cms-s {
    color: #000000;
}

/* --- DASHBOARD NAVBAR A ZBYTEK STYLŮ (beze změny) --- */
.navbar {
    background: transparent !important;
    box-shadow: none !important;
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.stat-card {
    background: var(--sc-card-bg);
    border: 1px solid var(--sc-border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--sc-red);
}

.stat-card h5 {
    font-size: 0.8rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.table-container {
    background: var(--sc-card-bg);
    border: 1px solid var(--sc-border);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 2rem;
}

.table {
    color: var(--sc-text);
    margin-bottom: 0;
}

.table thead {
    background: #252525;
}

.table thead th {
    border: none;
    color: #888;
    font-size: 0.75rem;
    padding: 15px;
    text-transform: uppercase;
}

.table-scroll-wrapper {
    max-height: 620px;          /* 5 řádků cca 140px*/
    overflow-y: auto;
    overflow-x: hidden;

    border-radius: 14px;
}

th.sortable {
    cursor: pointer;
    user-select: none;
}

th.sorted-asc .sort-indicator::after {
    content: " ▲";
    font-size: 0.7em;
}

th.sorted-desc .sort-indicator::after {
    content: " ▼";
    font-size: 0.7em;
}

/* jemný scrollbar (webkit) */
.table-scroll-wrapper::-webkit-scrollbar {
    width: 8px;
}

.table-scroll-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.table-scroll-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
}

.table-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.modal {
    display: none; 
    background: rgba(0,0,0,0.85);
}

.modal.show {
    display: block; 
}

.modal-backdrop {
    display: none !important; 
}

.modal.fade .modal-dialog {
    transform: translateY(-50px);
    transition: transform 0.3s ease-out;
}

.modal-content {
    background: var(--sc-card-bg);
    color: var(--sc-text);
    border: 1px solid var(--sc-border);
    border-radius: 16px;
}

.modal-header {
    border-bottom: 1px solid var(--sc-border);
    padding: 20px;
}

.modal-header .btn-close {
    filter: invert(1);
}

.msg-body-box {
    background: #121212;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid var(--sc-red);
    white-space: pre-wrap;
    margin: 15px 0;
}

/* --- TLAČÍTKA --- */
.btn-center-block {
    display: block;
    margin: 0 auto; 
    width: auto; 
    min-width: 200px; /* Volitelně minimální šířka */
}

.btn-sc-primary {
    background: var(--sc-border); 
    color: white;
    border: none;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.btn-sc-primary:hover {
    background: #ffaa55;
    color: white;
}

.btn-sc-outline {
    background: transparent;
    color: #ff8a3c;
    border: 1px solid var(--sc-border);
}

.btn-sc-outline:hover {
    border-color: var(--sc-red);
    color: var(--sc-red);
}

.badge-sent {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid #2ecc71;
}

.badge-spam {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.badge-blocked {
    background: rgba(241, 196, 15, 0.12);
    color: #f1c40f;
    border: 1px solid #f1c40f;
}

.nav-pills .nav-link {
    color: #ff8a3c;
    border: 1px solid var(--sc-border);
    background: transparent;
    padding: 10px 25px;
    font-weight: 600;
}

.nav-pills .nav-link.active {
    background-color: var(--sc-red) !important;
    color: white !important;
    border-color: var(--sc-red);
}

.nav-pills .nav-link:hover:not(.active) {
    border-color: var(--sc-red);
    color: var(--sc-red);
}

/* ===============================
   TOPBAR – FAKE GLASS (BOOTSTRAP SAFE)
   =============================== */

.sc-topbar {
    position: relative;

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.06),
            rgba(25, 25, 25, 0.94)
        );

    border: 1px solid rgba(255, 140, 0, 0.45);
    border-radius: 14px;

    box-shadow:
        0 0 28px rgba(255, 140, 0, 0.28),
        0 0 90px rgba(0, 0, 0, 0.95);
}

.sc-topbar::before {
    content: "";
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.10),
            rgba(255, 255, 255, 0.03) 40%,
            rgba(0, 0, 0, 0.22)
        );

    pointer-events: none;
}

.sc-topbar > * {
    position: relative;
    z-index: 1;
}

.sc-app {
    max-width: 1600px;        /* klíčové */
    margin: 0 auto;
    padding: 0 24px;
}

.sc-layout {
    display: flex;
    gap: 24px;
}

.sc-sidebar {
    width: 220px;             /* ne bootstrap col */
    flex-shrink: 0;
}

.sc-main {
    flex: 1;
}


/* =========================================================
   SIMPLE-CAR DASHBOARD GLASS (LOGIN STYLE)
   ========================================================= */

.sc-glass {
    position: relative;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.07),
            rgba(30, 30, 30, 0.92)
        );

    border: 1px solid rgba(255, 140, 0, 0.45);
    border-radius: 16px;

    box-shadow:
        0 0 22px rgba(255, 140, 0, 0.25),
        0 0 60px rgba(0, 0, 0, 0.85);

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

/* Skleněný odlesk – KLÍČOVÝ */
.sc-glass::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.10),
            rgba(255, 255, 255, 0.02) 40%,
            rgba(0, 0, 0, 0.20)
        );

    pointer-events: none;
}

/* Hover = lehké „nadechnutí“ */
.sc-glass-hover:hover {
    border-color: rgba(255, 140, 0, 0.9);

    box-shadow:
        inset 0 0 0 1px rgba(255, 140, 0, 0.8),
        inset 0 0 18px rgba(255, 140, 0, 0.35),
        0 0 35px rgba(255, 140, 0, 0.55),
        0 0 90px rgba(0, 0, 0, 0.9);

    transform: translateY(-2px);
}

/* Varianty */
.sc-glass-card {
    padding: 22px;
}

.sc-glass-panel {
    padding: 32px;
}

/* ===============================
   SIDEBAR – GLASS POLISH
   =============================== */

.sc-sidebar {
    border-radius: 16px;
}

/* Base nav link */
.sc-sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.65);
    padding: 10px 14px;
    border-radius: 10px;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s ease;
}

/* Hover */
.sc-sidebar-nav .nav-link:hover {
    color: #fff;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.08),
            rgba(0, 0, 0, 0.25)
        );

    box-shadow:
        inset 0 0 0 1px rgba(255, 140, 0, 0.35),
        0 0 12px rgba(255, 140, 0, 0.25);

    transform: translateX(2px);
}

/* Active item */
.sc-sidebar-nav .nav-link.active {
    color: #fff;

    background:
        linear-gradient(
            135deg,
            rgba(255, 140, 0, 0.25),
            rgba(40, 40, 40, 0.85)
        );

    box-shadow:
        inset 0 0 0 1px rgba(255, 140, 0, 0.9),
        inset 0 0 18px rgba(255, 140, 0, 0.35),
        0 0 22px rgba(255, 140, 0, 0.45);

    transform: none;
}

/* ===============================
   SIDEBAR – HLAVNÍ POLOŽKY (JEDINÝ MODEL)
   =============================== */

.sc-sidebar-nav > .nav-link,
.sc-sidebar-nav > .sc-nav-group > .sc-nav-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 6px;
    padding: 14px 10px;

    text-align: center;
    border-radius: 12px;

    color: rgba(255,255,255,0.75);
    cursor: pointer;

    transition:
        background .2s ease,
        color .2s ease,
        box-shadow .2s ease,
        transform .15s ease;
}

.sc-sidebar-nav > .nav-link i.bi,
.sc-sidebar-nav > .sc-nav-group > .sc-nav-toggle i.bi {
    font-size: 28px;
    line-height: 1;
    color: rgba(255,255,255,.85);

    transition:
        transform .2s ease,
        color .2s ease,
        text-shadow .2s ease;
}

.sc-sidebar-nav > .nav-link span,
.sc-sidebar-nav > .sc-nav-group > .sc-nav-toggle span {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
}

.sc-nav-sub a {
    text-align: left;
    font-size: 14px;
    padding: 6px 14px;
}

.sc-nav-sub i.bi {
    display: none;
}

/* ===============================
   TOGGLE BUTTON – VNITŘNÍ WRAP
   =============================== */

/* zarovnání šipky */
.sc-nav-toggle {
    justify-content: space-between;
}

.sc-nav-toggle .sc-nav-arrow {
    align-self: center;
}

/* ===============================
   SIDEBAR – COLLAPSIBLE GROUPS
   =============================== */

.sc-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Folder button */
.sc-nav-toggle {
    all: unset;
    width: 100%;
    box-sizing: border-box;

    /* STEJNÉ jako .nav-link */
    color: rgba(255, 255, 255, 0.65);
    padding: 10px 14px;
    border-radius: 10px;

    font-weight: 500;
    cursor: pointer;

    display: flex;
    justify-content: space-between;
    align-items: center;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s ease;
}

.sc-nav-toggle:hover {
    color: #fff;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.08),
            rgba(0, 0, 0, 0.25)
        );

    box-shadow:
        inset 0 0 0 1px rgba(255, 140, 0, 0.35),
        0 0 12px rgba(255, 140, 0, 0.25);

    transform: translateX(2px);
}

/* Arrow */
.sc-nav-arrow {
    font-size: 12px;

    transition:
        transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Submenu */
.sc-nav-sub {
    max-height: 0;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    gap: 4px;

    padding-left: 12px;

    transition:
        max-height 0.65s cubic-bezier(0.22, 0.61, 0.36, 1),
        opacity 0.35s ease;

    opacity: 0;
}

/* Sub links */
.sc-nav-sub a {
    color: rgba(255, 255, 255, 0.6);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
}

.sc-nav-sub a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

/* OPEN STATE */
.sc-nav-group.open > .sc-nav-toggle {
    color: #fff;

    background:
        linear-gradient(
            135deg,
            rgba(255, 140, 0, 0.20),
            rgba(40, 40, 40, 0.85)
        );

    box-shadow:
        inset 0 0 0 1px rgba(255, 140, 0, 0.6),
        inset 0 0 14px rgba(255, 140, 0, 0.25);
}

.sc-nav-group.open .sc-nav-sub {
    max-height: 440px;
    opacity: 1;
}

.sc-nav-group.open .sc-nav-arrow {
    transform: rotate(180deg);
}

/* ===== GLASS FILTER INPUTS ===== */
.sc-glass .form-control,
.sc-glass .form-select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 140, 0, 0.35);
    color: #fff;
    cursor: pointer;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    box-shadow:
        inset 0 0 0 1px rgba(255, 140, 0, 0.15),
        0 0 18px rgba(0, 0, 0, 0.6);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.sc-glass .form-control::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.sc-glass .form-control:focus,
.sc-glass .form-select:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 140, 0, 0.9);

    box-shadow:
        inset 0 0 0 1px rgba(255, 140, 0, 0.6),
        0 0 25px rgba(255, 140, 0, 0.45);

    outline: none;
}

/* ===== FILTER PANEL WIDTH FIX ===== */
.filter-panel {
    padding: 1rem 1.25rem; /* stejný vnitřní spacing jako tabulka */
}

.filter-panel .row {
    margin-left: 0;
    margin-right: 0;
}

/* ===== FIX SELECT DROPDOWN VISIBILITY ===== */
.sc-glass select option {
    background: #1e1e1e;   /* tmavé pozadí */
    color: #ffffff;        /* bílý text */
}

/* === FILTER SELECT FIX === */
.sc-filter {
    background-color: rgba(20, 20, 20, 0.85) !important;
    color: #eee !important;
    border: 1px solid rgba(255, 170, 60, 0.35);
}

.sc-filter:focus {
    background-color: rgba(20, 20, 20, 0.95) !important;
    color: #fff !important;
    box-shadow: 0 0 0 0.15rem rgba(255, 170, 60, 0.25);
}

/* dropdown options */
.sc-filter option {
    background-color: #111 !important;
    color: #eee !important;
}

/* =====================================================
   FIX: TABLE HOVER + FAKE GLASS (KONEČNÁ VERZE)
   ===================================================== */

/* Glass overlay NEPLATÍ pro obsah tabulky */
.sc-glass .table,
.sc-glass .table * {
    position: relative;
    z-index: 2;
}

/* Glass overlay zůstane jen na pozadí panelu */
.sc-glass::before {
    z-index: 1;
}

/* Panel samotný */
.sc-glass {
    position: relative;
    z-index: 0;
}

/* Vypnutí bootstrap hover backgroundu */
.sc-glass .table-hover > tbody > tr:hover > * {
    background-color: transparent !important;
    --bs-table-bg-state: transparent !important;
    color: var(--sc-text) !important;
}

/* Jemné zvýraznění řádku (BEZ překrytí textu) */
.sc-glass .table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
    outline: 1px solid rgba(255, 165, 0, 0.35);
    outline-offset: -1px;
}

.ip-cell {
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sc-modal-glow {
    position: relative;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.sc-modal-glow:hover,
.modal.show .sc-modal-glow {
    border-color: rgba(255, 140, 0, 0.9);
    box-shadow:
        inset 0 0 0 1px rgba(255, 140, 0, 0.7),
        0 0 35px rgba(255, 140, 0, 0.45),
        0 0 90px rgba(0, 0, 0, 0.9);
}
