/* =========================================================
   DRONEGUARD – FUTURISTIC DARK-RED SECURITY THEME
   ========================================================= */

/* --- RESET & BASE ------------------------------------------ */
* {
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    background: #0c0c0c;
}

body {
    font-family: "Segoe UI", Roboto, sans-serif;
    color: #e6e6e6;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px 180px !important;
    min-height: 100vh;
}

/* ============================================================
   GLOBAL FUTURISTIC VISUALS
   ============================================================ */

:root {
    --red-primary: #d00000;
    --red-glow: #ff2e2e;
    --red-soft: #ff7a7a;
    --dark-1: #0d0d0d;
    --dark-2: #151515;
    --dark-3: #1c1c1c;
    --dark-border: #2a2a2a;
}

/* animated noise background */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
    z-index: -1;
    animation: noiseShift 12s linear infinite;
}

@keyframes noiseShift {
    0% { transform: translate(0,0); }
    100% { transform: translate(10px,-10px); }
}


/* ============================================================
   HEADER / NAVIGATION (MOVED FROM header.php)
   ============================================================ */

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;

    width: 90%;
    max-width: 1600px;
    margin: 18px auto 0;

    background: radial-gradient(circle at top left, #200, #000 55%);
    padding: 14px 28px;
    color: #fff;

    border-radius: 18px;
    border: 1px solid rgba(255,80,80,0.25);
    box-shadow:
        0 18px 45px rgba(50,0,0,0.85),
        0 0 0 1px rgba(70,0,0,0.8);

    position: sticky;
    top: 10px;
    z-index: 999;

    backdrop-filter: blur(16px) saturate(180%);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-left img {
    height: 40px;
    filter: drop-shadow(0 0 4px rgba(0,0,0,0.4));
}

.nav-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: 0.9;
}

/* MENU CENTER */
.nav-menu {
    display: flex;
    gap: 22px;
    align-items: center;
}

.nav-menu a {
    position: relative;
    color: #ffe5e5;
    font-size: 14px;
    text-decoration: none;
    padding: 6px 4px;
    font-weight: 500;
    transition: color 0.25s ease, transform 0.18s ease, text-shadow 0.25s;
}

.nav-menu a:hover {
    color: var(--red-glow);
    text-shadow: 0 0 8px rgba(255,80,80,0.5);
    transform: translateY(-1px);
}

.nav-menu a.active {
    color: var(--red-soft);
}

.nav-menu a.active::before {
    content: "";
    position: absolute;
    inset: -8px -12px;
    border-radius: 999px;
    background: radial-gradient(circle at top, rgba(255,70,70,0.35), transparent 60%);
    opacity: 0.8;
    z-index: -2;
}

.nav-menu a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    width: 80%;
    height: 2px;
    margin: 0 auto;

    background: linear-gradient(90deg, #ff7a7a, #ff0000, #ff7a7a);
    border-radius: 999px;
    box-shadow:
        0 0 6px rgba(255,60,60,0.8),
        0 0 18px rgba(255,0,0,0.9);

    animation: holoGlowRed 1.6s ease-in-out infinite alternate;
}

@keyframes holoGlowRed {
    from { opacity: 0.65; transform: translateY(0); }
    to   { opacity: 1; transform: translateY(-1px); }
}

/* RIGHT USER PANEL */
.nav-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-right span {
    font-size: 14px;
    opacity: 0.9;
}

.logout-link {
    color: var(--red-soft) !important;
    text-decoration: none;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: 0.2s ease;
}

.logout-link:hover {
    color: #fff5f5 !important;
    border-color: rgba(255,80,80,0.6);
    background: radial-gradient(circle at top, rgba(120,0,0,0.9), rgba(100,0,0,0.3));
    box-shadow: 0 0 14px rgba(255,80,80,0.75);
}

/* FLASH container under header */
.flash-container {
    max-width: 1600px;
    width: 90%;
    margin: 0 auto;
    padding: 14px 0 0 0;
}


/* ============================================================
   CONTAINERS
   ============================================================ */

.container,
.content-box,
.login-box {
    background: rgba(20,20,20,0.92);
    border: 1px solid rgba(255,50,50,0.15);
    border-radius: 14px;
    padding: 40px 50px;
    width: 100%;
    max-width: 1100px;
    margin-bottom: 140px !important;
    box-shadow:
        0 0 20px rgba(255,0,0,0.05),
        inset 0 0 12px rgba(255,0,0,0.08);
    backdrop-filter: blur(6px);
    overflow-x: auto;
}


/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3 {
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow:
        0 0 6px rgba(255,50,50,0.6),
        0 0 16px rgba(255,0,0,0.25);
}

p, label {
    color: #cccccc;
    line-height: 1.6;
}


/* ============================================================
   BUTTONS
   ============================================================ */

button,
input[type="submit"],
.button {
    background: var(--red-primary);
    border: none;
    border-radius: 6px;
    padding: 12px 16px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.18s;
    box-shadow:
        0 0 12px rgba(255,0,0,0.25),
        inset 0 0 6px rgba(255,100,100,0.2);
}

button:hover,
input[type="submit"]:hover,
.button:hover {
    background: var(--red-glow);
    box-shadow:
        0 0 18px rgba(255,0,0,0.4),
        inset 0 0 10px rgba(255,80,80,0.25);
}

.button-secondary { background:#333; }
.button-secondary:hover { background:#555; }

.button-danger { background:#b30000; }
.button-danger:hover { background:#ff0000; }


/* ============================================================
   FORMS
   ============================================================ */

form {
    background: #1a1a1a;
    border: 1px solid rgba(255,40,40,0.2);
    border-radius: 10px;
    padding: 30px 40px;
    box-shadow: inset 0 0 18px rgba(255,0,0,0.08);
}

form input,
form select,
form textarea {
    width: 100%;
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 12px;
    color: #fff;
    margin-bottom: 14px;
    font-size: 15px;
    transition: 0.2s;
}

form input:focus,
form select:focus,
form textarea:focus {
    border-color: var(--red-primary);
    box-shadow: 0 0 6px rgba(255,0,0,0.4);
}


/* ============================================================
   TABLES
   ============================================================ */

table {
    width: 100%;
    border-collapse: collapse;
    background: #141414;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,50,50,0.17);
    font-size: 15px;
    box-shadow:
        0 0 20px rgba(255,0,0,0.06),
        inset 0 0 12px rgba(255,0,0,0.06);
}

table th {
    background: linear-gradient(90deg, #b30000, #ff0000);
    padding: 14px 18px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,0,0,0.25);
    font-size: 14px;
}

table td {
    padding: 14px 18px;
    border-bottom: 1px solid #262626;
    color: #ddd;
}

table tr:nth-child(even) {
    background: #1b1b1b;
}


/* ============================================================
   SECTION HEADERS
   ============================================================ */

.section-header {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--red-soft);
    margin: 30px 0 10px;
    text-transform: uppercase;
    text-shadow:
        0 0 8px rgba(255,80,80,0.4),
        0 0 12px rgba(255,0,0,0.25);
}


/* ============================================================
   FLASH MESSAGES
   ============================================================ */

.flash-message {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.flash-info {
    background: #330000;
    border-left: 4px solid var(--red-primary);
    color: #ffbcbc;
}

.flash-success {
    background: #0f330f;
    border-left: 4px solid #2ecc71;
    color: #c8f9d4;
}

.flash-warning {
    background: #3d2c00;
    border-left: 4px solid #ffcc00;
    color: #ffeeba;
}

.flash-error {
    background: #330000;
    border-left: 4px solid #ff4444;
    color: #ffb3b3;
}


/* ============================================================
   FOOTER – DARK RED
   ============================================================ */

.dg-footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1600px;
    padding: 20px 0;
    text-align: center;
    background: radial-gradient(circle at top, rgba(70,0,0,0.75), rgba(0,0,0,0.95));
    border-top: 1px solid rgba(255,0,0,0.25);
    border-radius: 18px 18px 0 0;
    backdrop-filter: blur(12px);
    box-shadow:
        0 -10px 25px rgba(0,0,0,0.6),
        inset 0 0 22px rgba(255,0,0,0.22);
    color: #ffdddd;
}

.dg-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 94%;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff7a7a, #ff0000, #ff7a7a);
    filter: blur(2px);
    animation: footerGlowRed 3s infinite alternate;
}

@keyframes footerGlowRed {
    from { opacity: 0.45; filter: blur(3px); }
    to   { opacity: 0.95; filter: blur(1px); }
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 960px) {
    .main-nav {
        flex-wrap: wrap;
        gap: 12px 16px;
        padding: 10px 16px;
    }

    .nav-menu {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        row-gap: 6px;
    }
}

@media (max-width:800px) {
    .container {
        padding: 25px 20px;
    }

    table th, table td {
        font-size: 13px;
        padding: 8px 10px;
    }

    .section-header {
        font-size: 1rem;
    }
}


/* ============================================================
   WIDE CONTAINER
   ============================================================ */

.container-wide {
    max-width: 1600px;
    width: 90%;
    margin: 0 auto 140px !important;
    padding: 0 40px;
}

.logo {
    width: 180px;        /* uprav dle pocitu: 140–220 */
    height: auto;        /* zachová poměr stran */
    max-width: 70%;      /* aby to na mobilu nebylo obří */
    display: block;
    margin: 0 auto 20px; /* centrování + odsazení dolů */
}

