:root {
    --ddosc-primary: #0b2e59;
    --ddosc-secondary: #123d73;
    --ddosc-accent: #f2c14e;
    --ddosc-accent-2: #ffd76a;
    --ddosc-light: #f4f8fc;
    --ddosc-surface: rgba(255, 255, 255, 0.88);
    --ddosc-border: rgba(255, 255, 255, 0.18);
    --ddosc-text: #10233e;
    --ddosc-muted: #6b7b93;
    --cyber-cyan: #4dd0e1;
    --cyber-green: #39d98a;
    --danger-soft: #ff6b6b;
    --sidebar-width: 285px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--ddosc-text);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at 10% 20%, rgba(77, 208, 225, 0.12), transparent 18%),
        radial-gradient(circle at 90% 10%, rgba(242, 193, 78, 0.16), transparent 20%),
        radial-gradient(circle at 80% 80%, rgba(57, 217, 138, 0.12), transparent 18%),
        linear-gradient(135deg, #07111f 0%, #0b2447 35%, #123d73 100%);
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(77, 208, 225, 0.04) 45%, transparent 55%);
    animation: scanline 10s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes scanline {
    0% {
        transform: translateX(-25%);
    }
    100% {
        transform: translateX(25%);
    }
}

a {
    text-decoration: none;
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.sidebar {
    width: var(--sidebar-width);
    background:
        linear-gradient(180deg, rgba(6, 18, 36, 0.96), rgba(11, 46, 89, 0.96)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.05)'%3E%3Cpath d='M0 30h180M0 90h180M0 150h180M30 0v180M90 0v180M150 0v180'/%3E%3C/g%3E%3C/svg%3E");
    color: #fff;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1030;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 8px 0 30px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-brand {
    padding: 1.15rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(90deg, rgba(242, 193, 78, 0.1), rgba(255, 255, 255, 0.03));
}

.sidebar-brand-link {
    display: block;
    color: #fff;
}

.brand-logos {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.9rem;
    flex-wrap: wrap;
}

.sidebar-brand img,
.brand-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    padding: 6px;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.brand-text {
    display: block;
}

.brand-title {
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.3px;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.77rem;
    line-height: 1.35;
}

.security-chip {
    margin: 0.8rem 1rem 0;
    padding: 0.65rem 0.85rem;
    border-radius: 14px;
    background: rgba(77, 208, 225, 0.08);
    border: 1px solid rgba(77, 208, 225, 0.18);
    color: #d8f9ff;
    font-size: 0.8rem;
}

.sidebar-section-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    color: rgba(255, 255, 255, 0.56);
    padding: 1rem 1rem 0.35rem;
    margin: 0 0.7rem;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.86);
    padding: 0.9rem 1rem;
    border-radius: 14px;
    margin: 0.22rem 0.8rem;
    transition: 0.22s ease;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.sidebar .nav-link::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(242, 193, 78, 0.14), rgba(77, 208, 225, 0.1));
    opacity: 0;
    transition: 0.22s ease;
}

.sidebar .nav-link:hover::before,
.sidebar .nav-link.active::before {
    opacity: 1;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #fff;
    transform: translateX(4px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.sidebar .nav-link i,
.sidebar .nav-link span {
    position: relative;
    z-index: 1;
}

.sidebar .nav-link i {
    margin-right: 10px;
    color: var(--ddosc-accent);
}

.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.topbar {
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 6px 20px rgba(9, 20, 40, 0.08);
}

.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: linear-gradient(135deg, #d62828, #ff4d4d);
    color: #ffffff;
    border: 1px solid rgba(214, 40, 40, 0.35);
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.content-area {
    padding: 1.5rem;
}

.glass-card,
.card {
    background: var(--ddosc-surface);
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    box-shadow: 0 16px 40px rgba(10, 22, 44, 0.16);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 22px !important;
}

.card-header {
    border-top-left-radius: 22px !important;
    border-top-right-radius: 22px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.section-subtitle,
.text-muted {
    color: var(--ddosc-muted) !important;
}

.btn {
    border-radius: 14px;
    font-weight: 600;
    box-shadow: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--ddosc-primary), var(--ddosc-secondary));
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--ddosc-secondary), #0c4c93);
}

.btn-warning {
    background: linear-gradient(135deg, #f0b429, #ffd76a);
    color: #2b1b00;
    border: none;
}

.btn-outline-primary {
    border-color: rgba(11, 46, 89, 0.18);
    color: var(--ddosc-primary);
    background: rgba(255, 255, 255, 0.65);
}

.btn-outline-secondary,
.btn-secondary {
    border: none;
}

.table thead th {
    background: linear-gradient(180deg, #eff5fb, #e8f0f9);
    color: var(--ddosc-primary);
    border-bottom: none;
    font-size: 0.88rem;
}

.table tbody tr:hover {
    background: rgba(77, 208, 225, 0.06);
}

.form-control,
.form-select,
textarea {
    border-radius: 14px !important;
    border: 1px solid #d7e3f3 !important;
    background: rgba(255, 255, 255, 0.92) !important;
    color: var(--ddosc-text);
    padding: 0.78rem 0.95rem;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    border-color: rgba(77, 208, 225, 0.75) !important;
    box-shadow: 0 0 0 0.22rem rgba(77, 208, 225, 0.16) !important;
}

.badge {
    border-radius: 999px;
    padding: 0.55rem 0.8rem;
    font-weight: 700;
}

.user-badge {
    background: linear-gradient(90deg, rgba(11, 46, 89, 0.08), rgba(242, 193, 78, 0.12));
    color: var(--ddosc-primary);
    border-radius: 999px;
    padding: 0.55rem 1rem;
    font-size: 0.88rem;
    font-weight: 700;
    border: 1px solid rgba(11, 46, 89, 0.08);
}

.logout-btn {
    border-radius: 12px;
}

.mobile-toggle {
    display: none;
}

.hero-mini {
    background: linear-gradient(135deg, rgba(11, 46, 89, 0.96), rgba(18, 61, 115, 0.9));
    color: #fff;
    border-radius: 22px;
    padding: 1.25rem 1.35rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.hero-mini::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(242, 193, 78, 0.18), transparent 65%);
}

.alert {
    border: none !important;
    border-radius: 16px !important;
}

.seal-wrapper {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 1.25rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
    text-align: center;
    height: 100%;
}

.seal-wrapper h5 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.seal-wrapper p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.92rem;
    margin-bottom: 1rem;
}

.seal-image {
    width: 100%;
    max-width: 50px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.22));
}

/* Overlay and modal stacking */
.sidebar-overlay {
    display: none;
}

.sidebar-overlay.show {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1040;
}

.modal {
    z-index: 1060 !important;
}

.modal-backdrop {
    z-index: 1055 !important;
}

.modal-dialog {
    pointer-events: none;
}

.modal-content,
.modal-content * {
    pointer-events: auto;
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease-in-out;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .topbar {
        padding: 1rem;
    }

    .content-area {
        padding: 1rem;
    }
}

@media (max-width: 767.98px) {
    .brand-logos {
        gap: 0.5rem;
    }

    .sidebar-brand img,
    .brand-logo {
        width: 50px;
        height: 50px;
    }

    .brand-title {
        font-size: 0.92rem;
    }

    .brand-subtitle {
        font-size: 0.72rem;
    }

    .user-badge {
        width: 100%;
        text-align: center;
    }

    .topbar {
        align-items: flex-start !important;
    }
}
