/* =========================================================
    RESET & VARIABLES (Neon Red Theme)
========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

:root {
    --red: #ff1029;
    --red-dark: #b50017;
    --red-light: #ff3349;
    --bg: #070a0d;
    --bg-2: #0a0e12;
    --card: #0d1318;
    --card-2: #10171d;
    --border: rgba(255,255,255,0.10);
    --border-red: rgba(255,16,41,0.65);
    --text: #f4f6f8;
    --muted: #8b969f;
    --shadow-red: 0 0 15px rgba(255,16,41,.3), 0 0 40px rgba(255,16,41,.15);
    --radius: 10px;
}

body {
    font-family: "Inter", sans-serif;
    background:
        radial-gradient(circle at 80% 15%, rgba(255, 16, 41, 0.12), transparent 35%),
        radial-gradient(circle at 10% 50%, rgba(255, 16, 41, 0.06), transparent 30%),
        #070a0d;
    color: #f2f5f7;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: linear-gradient(to bottom, black, transparent 80%);
    z-index: -1;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, textarea, select {
    font-family: inherit;
    cursor: pointer;
}

.container {
    width: min(1450px, calc(100% - 60px));
    margin: 0 auto;
}

.red { color: var(--red); }
.glow { text-shadow: 0 0 10px rgba(255,16,41,.8), 0 0 35px rgba(255,16,41,.4); }

/* =========================================================
    HEADER
========================================================= */
header {
    height: 84px;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(7,10,13,.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255,255,255,.09);
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    width: 48px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--red);
}

.logo-icon svg {
    width: 46px;
    height: 52px;
    filter: drop-shadow(0 0 6px rgba(255,16,41,.9)) drop-shadow(0 0 20px rgba(255,16,41,.4));
}

.logo-title {
    font-family: "Rajdhani", sans-serif;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1;
}

.logo-subtitle {
    color: #84909a;
    font-size: 11px;
    margin-top: 4px;
}

nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

nav a {
    position: relative;
    padding: 31px 20px;
    font-size: 14px;
    color: #d9dde0;
    transition: .25s ease;
}

nav a:hover, nav a.active {
    color: #fff;
}

nav a.active::after {
    content: "";
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 14px;
    height: 3px;
    background: var(--red);
    box-shadow: 0 0 10px var(--red), 0 0 22px rgba(255,16,41,.7);
}

.login-button {
    height: 48px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 22px;
    color: #fff;
    border: 1px solid var(--red);
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(255,16,41,.12), rgba(255,16,41,.02));
    box-shadow: var(--shadow-red);
    transition: .25s ease;
}

.login-button:hover {
    background: var(--red);
    box-shadow: 0 0 20px rgba(255,16,41,.8), 0 0 50px rgba(255,16,41,.4);
    color: #080a0d;
}

.login-button svg { width: 19px; }

.mobile-menu {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    background: #0d1217;
    color: #fff;
    border-radius: 6px;
    font-size: 20px;
    align-items: center;
    justify-content: center;
}

/* =========================================================
    HERO
========================================================= */
.hero {
    position: relative;
    min-height: 455px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,.06);
    background: radial-gradient(circle at 85% 50%, rgba(255,16,41,.18), transparent 45%);
}

.network {
    position: absolute;
    width: 850px;
    height: 550px;
    right: -40px;
    top: -20px;
    opacity: .75;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255,16,41,.85) 0 2px, transparent 3px);
    background-size: 90px 90px;
    mask-image: radial-gradient(circle at 70% 50%, black 30%, transparent 75%);
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

.hero-content { padding: 55px 0; }

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--red);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.hero-label::before {
    content: "";
    width: 24px;
    height: 2px;
    background: var(--red);
    box-shadow: 0 0 10px var(--red);
}

.hero h1 {
    max-width: 750px;
    font-family: "Rajdhani", sans-serif;
    font-size: clamp(36px, 5vw, 76px);
    line-height: .92;
    font-weight: 700;
    letter-spacing: -1px;
}

.hero h1 span {
    display: block;
    color: var(--red);
    text-shadow: 0 0 10px rgba(255,16,41,.6), 0 0 35px rgba(255,16,41,.3);
}

.hero-description {
    max-width: 620px;
    margin-top: 25px;
    color: #aab4bc;
    font-size: 16px;
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    gap: 13px;
    margin-top: 30px;
}

.btn-primary {
    min-height: 52px;
    padding: 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    border: none;
    border-radius: 6px;
    color: #090b0d;
    background: var(--red);
    font-weight: 800;
    box-shadow: 0 0 15px rgba(255,16,41,.5), 0 0 40px rgba(255,16,41,.2);
    transition: .25s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: #ff3046;
    box-shadow: 0 0 22px rgba(255,16,41,.8), 0 0 55px rgba(255,16,41,.4);
}

.btn-secondary {
    min-height: 52px;
    padding: 0 25px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 6px;
    color: #dbe0e4;
    background: rgba(255,255,255,.025);
    transition: .25s ease;
}

.btn-secondary:hover {
    border-color: var(--red);
    color: #fff;
    box-shadow: 0 0 15px rgba(255,16,41,.2);
}

.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    position: relative;
}

.shield {
    width: 250px;
    height: 290px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--red);
    filter: drop-shadow(0 0 12px rgba(255,16,41,.9)) drop-shadow(0 0 50px rgba(255,16,41,.35));
    animation: floating 5s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.shield svg { width: 100%; height: 100%; }

/* =========================================================
    DASHBOARD & STATS
========================================================= */
.dashboard {
    margin-top: -1px;
    position: relative;
    z-index: 5;
    padding-bottom: 50px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 305px;
    gap: 25px;
}

.stats-wrapper {
    padding: 20px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(15,21,26,.98), rgba(8,12,15,.98));
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 17px;
}

.stat {
    min-height: 75px;
    display: flex;
    align-items: center;
    padding: 13px 17px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 6px;
    background: linear-gradient(145deg, rgba(255,255,255,.025), rgba(255,255,255,.01));
    transition: .25s ease;
}

.stat-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 13px;
    color: var(--red);
    border-radius: 7px;
    background: rgba(255,16,41,.08);
    box-shadow: inset 0 0 15px rgba(255,16,41,.08);
    flex-shrink: 0;
}

.stat-icon svg { width: 26px; height: 26px; }
.stat-number { font-family: "Rajdhani", sans-serif; font-size: 22px; font-weight: 700; line-height: 1; }
.stat-label { margin-top: 5px; color: #87929b; font-size: 11px; }

/* =========================================================
    SEARCH
========================================================= */
.search-area {
    display: flex;
    margin-top: 25px;
    height: 52px;
    border: 1px solid rgba(255,16,41,.7);
    border-radius: 7px;
    overflow: hidden;
    background: #090d11;
    box-shadow: inset 0 0 25px rgba(255,16,41,.04), 0 0 15px rgba(255,16,41,.15);
}

.search-icon {
    width: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--red);
    flex-shrink: 0;
}

.search-icon svg { width: 20px; }

.search-area input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    color: #fff;
    background: transparent;
    font-size: 13px;
    padding: 0 10px;
}

.search-area input::placeholder { color: #66727c; }

.search-submit {
    width: 145px;
    border: none;
    background: var(--red);
    color: #080a0d;
    font-weight: 800;
    transition: .2s ease;
    box-shadow: 0 0 15px rgba(255,16,41,.4);
    flex-shrink: 0;
}

/* =========================================================
    WHY SECTION & FEATURES
========================================================= */
.why { margin-top: 38px; }

.section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    font-family: "Rajdhani", sans-serif;
    font-size: 27px;
    font-weight: 700;
}

.section-title::before {
    content: "";
    width: 4px;
    height: 27px;
    background: var(--red);
    box-shadow: 0 0 10px var(--red), 0 0 25px rgba(255,16,41,.5);
}

.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.feature {
    min-height: 190px;
    padding: 25px;
    position: relative;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 7px;
    background: linear-gradient(145deg, rgba(14,20,25,.95), rgba(9,13,16,.95));
    overflow: hidden;
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 17px;
    border: 1px solid rgba(255,16,41,.7);
    border-radius: 50%;
    color: var(--red);
    box-shadow: inset 0 0 15px rgba(255,16,41,.1), 0 0 15px rgba(255,16,41,.15);
}

.feature-icon svg { width: 24px; }
.feature h3 { font-size: 17px; margin-bottom: 9px; }
.feature p { color: #7f8b94; font-size: 13px; line-height: 1.55; }

/* =========================================================
    DATABASE TABLE SECTION
========================================================= */
.database-section {
    margin-top: 45px;
    padding: 25px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(15,21,26,.98), rgba(8,12,15,.98));
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cbfk-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
    min-width: 650px;
}

.cbfk-table th {
    background: #141c2d;
    color: var(--muted);
    padding: 15px 18px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.cbfk-table td {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

/* BADGES */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.badge-czerwony { background: rgba(255, 16, 41, 0.2); color: #ff3349; border: 1px solid rgba(255, 16, 41, 0.6); }
.badge-czerwony .dot { background: var(--red); box-shadow: 0 0 10px var(--red); }
.badge-pomaranczowy { background: rgba(249, 115, 22, 0.15); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.4); }
.badge-pomaranczowy .dot { background: #f97316; box-shadow: 0 0 8px #f97316; }
.badge-zolkty { background: rgba(234, 179, 8, 0.15); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.4); }
.badge-zolkty .dot { background: #eab308; box-shadow: 0 0 8px #eab308; }

/* =========================================================
    SIDEBAR
========================================================= */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.panel {
    padding: 23px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(14,20,25,.98), rgba(8,12,15,.98));
}

.panel.red-border {
    border-color: rgba(255,16,41,.85);
    box-shadow: 0 0 20px rgba(255,16,41,.15);
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 700;
}

.panel-title svg { color: var(--red); width: 21px; flex-shrink: 0; }

.input-group {
    position: relative;
    margin-bottom: 12px;
}

.input-group svg {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 17px;
    transform: translateY(-50%);
    color: #77838c;
}

.input-group input {
    width: 100%;
    height: 42px;
    padding: 0 14px 0 43px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 5px;
    outline: none;
    background: rgba(255,255,255,.025);
    color: #fff;
    font-size: 12px;
}

.panel-button {
    width: 100%;
    height: 42px;
    border: none;
    border-radius: 5px;
    background: var(--red);
    color: #080a0d;
    font-size: 12px;
    font-weight: 800;
    transition: .2s ease;
    box-shadow: 0 0 15px rgba(255,16,41,.3);
}

.forgot {
    display: block;
    margin-top: 15px;
    color: var(--red);
    text-align: center;
    font-size: 10px;
}

/* REPORT PANEL */
.report {
    position: relative;
    border: 2px solid var(--red);
    background: radial-gradient(circle at 80% 20%, rgba(255,16,41,.18), transparent 45%), #10090c;
    box-shadow: 0 0 30px rgba(255,16,41,.25), inset 0 0 30px rgba(255,16,41,.06);
}

.report-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border: 2px solid var(--red);
    border-radius: 50%;
    color: var(--red);
    box-shadow: 0 0 20px rgba(255,16,41,.4);
}

.report-icon svg { width: 26px; }
.report h3 { color: var(--red); font-family: "Rajdhani", sans-serif; font-size: 20px; margin-bottom: 9px; }
.report p { color: #a3adb4; font-size: 12px; line-height: 1.55; margin-bottom: 20px; }

.report-button {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 5px;
    background: var(--red);
    color: #080a0d;
    font-weight: 800;
    font-size: 12px;
    box-shadow: 0 0 20px rgba(255,16,41,.4);
}

/* =========================================================
    FOOTER & MODALS & TOAST
========================================================= */
footer {
    margin-top: 50px;
    border-top: 1px solid rgba(255,255,255,.08);
    background: #080b0e;
}

.footer-inner {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.copyright { color: #66717a; font-size: 11px; }

.footer-links {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #707b83;
    font-size: 11px;
}

.socials { display: flex; align-items: center; gap: 13px; }
.socials a { width: 25px; height: 25px; display: flex; align-items: center; justify-content: center; color: #71808a; }
.socials svg { width: 17px; }

.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0,0,0,.75);
    backdrop-filter: blur(10px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: .25s ease;
}

.modal-overlay.show { opacity: 1; visibility: visible; }

.modal {
    width: min(520px, 100%);
    position: relative;
    padding: 30px;
    border: 1px solid rgba(255,16,41,.8);
    border-radius: 10px;
    background: linear-gradient(145deg, #10161b, #080c0f);
    box-shadow: 0 0 40px rgba(255,16,41,.25);
}

.modal-close {
    position: absolute;
    right: 18px;
    top: 18px;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 5px;
    background: transparent;
    color: #fff;
    font-size: 18px;
}

.toast {
    position: fixed;
    right: 25px;
    bottom: 25px;
    min-width: 280px;
    padding: 15px 18px;
    border: 1px solid var(--red);
    border-radius: 7px;
    background: #0d1216;
    color: #fff;
    font-size: 12px;
    transform: translateY(100px);
    opacity: 0;
    transition: .3s ease;
    z-index: 10000;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast strong { color: var(--red); }

/* =========================================================
    RESPONSIVE DESIGN (MOBILE FIXES) - PEŁNA KONTROLA
========================================================= */
@media (max-width: 1024px) {
    .container {
        width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }
    
    .stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .features {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .hero-grid {
        grid-template-columns: 1fr !important;
        text-align: center;
    }
    
    .hero-content {
        padding: 30px 0 !important;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-visual {
        min-height: 250px;
    }

    .network {
        display: none;
    }
}

@media (max-width: 768px) {
    header {
        height: 70px;
    }
    
    nav, .header-login {
        display: none !important;
    }
    
    .mobile-menu {
        display: flex !important;
    }
    
    .hero h1 {
        font-size: 32px !important;
    }
    
    .hero-description {
        font-size: 14px !important;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-actions button {
        width: 100%;
    }
    
    .stats {
        grid-template-columns: 1fr !important;
    }
    
    .features {
        grid-template-columns: 1fr !important;
    }
    
    .sidebar {
        grid-template-columns: 1fr !important;
    }

    /* Wyszukiwarka elastyczna w pionie na telefonie */
    .search-area {
        height: auto !important;
        flex-direction: column !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        gap: 10px !important;
        margin-top: 15px;
    }

    .search-area .search-icon {
        display: none !important;
    }

    .search-area input {
        width: 100% !important;
        height: 46px !important;
        background: #090d11 !important;
        border: 1px solid rgba(255,16,41,.7) !important;
        border-radius: 7px !important;
        padding: 0 12px !important;
        font-size: 12px !important;
    }

    .search-submit {
        width: 100% !important;
        height: 44px !important;
        border-radius: 7px !important;
    }

    .database-section {
        padding: 15px 10px !important;
    }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 25px 0;
        gap: 15px;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}
/* =========================================================
    OSTATECZNA NAPRAWA TABELI I MOBILKA (Wklej na koniec style.css)
========================================================= */
@media (max-width: 768px) {
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid rgba(255,16,41,0.3);
        border-radius: 8px;
        background: #0d1318;
    }

    .cbfk-table {
        min-width: 100% !important; /* Wyłączamy sztywne 650px, żeby tabela nie rozpychała strony */
        width: 100% !important;
        font-size: 0.75rem !important;
    }

    .cbfk-table th, 
    .cbfk-table td {
        padding: 10px 8px !important;
        word-break: break-word; /* Zapobiega rozpychaniu przez długie maile lub numery */
    }

    /* Zabezpieczenie kontenera głównego przed wyjeżdżaniem */
    .container {
        max-width: 100% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}