:root {
    --bg: #07142b;
    --bg-2: #091a36;
    --card: #0d1b36;
    --card-2: #102041;
    --text: #f3f7ff;
    --muted: #c7d2e3;
    --muted-2: #9fb0ca;
    --border: rgba(255, 255, 255, 0.08);
    --primary: #2f66e0;
    --primary-hover: #2456c5;
    --secondary: #50627d;
    --secondary-hover: #5d7090;
    --danger: #c83d4d;
    --danger-hover: #ae3342;
    --success-bg: rgba(34, 197, 94, 0.14);
    --success-border: rgba(34, 197, 94, 0.35);
    --success-text: #c7f9d6;
    --error-bg: rgba(239, 68, 68, 0.14);
    --error-border: rgba(239, 68, 68, 0.35);
    --error-text: #ffd1d1;
    --link: #8bb3ff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top, #0f2550 0%, var(--bg) 42%, #05101f 100%);
    color: var(--text);
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.site-header {
    border-bottom: 1px solid var(--border);
    background: rgba(5, 14, 30, 0.92);
    backdrop-filter: blur(8px);
}

.site-header-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 16px;
}

.brand {
    color: var(--text);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-decoration: none;
}

.brand:hover {
    text-decoration: none;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 20px 16px 36px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.topbar h1 {
    margin: 0;
    font-size: 36px;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.topbar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.card,
.box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card:hover {
    border-color: rgba(139, 179, 255, 0.25);
}

.small-card {
    max-width: 520px;
    margin: 40px auto 0;
}

.card h1,
.card h2,
.box h1,
.box h2 {
    margin-top: 0;
}

.card h1,
.box h1 {
    margin-bottom: 20px;
    font-size: 34px;
    line-height: 1.15;
}

.card h2,
.box h2 {
    margin-bottom: 16px;
    font-size: 26px;
    line-height: 1.2;
}

p {
    margin: 0 0 16px;
    color: var(--muted);
}

.alert {
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    font-weight: 600;
}

.alert.success {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success-text);
}

.alert.error {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error-text);
}

.form-grid {
    display: grid;
    gap: 12px;
}

.form-row {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

label {
    display: block;
    font-weight: 700;
    color: var(--text);
}

input,
select,
textarea {
    width: 100%;
    background: var(--card-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 16px;
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--muted-2);
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(139, 179, 255, 0.45);
    box-shadow: 0 0 0 3px rgba(139, 179, 255, 0.12);
}

button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    background: var(--primary);
    transition: background 0.2s ease, transform 0.05s ease;
}

button:hover,
.btn:hover {
    background: var(--primary-hover);
    text-decoration: none;
}

button:active,
.btn:active {
    transform: translateY(1px);
}

.btn.secondary {
    background: var(--secondary);
}

.btn.secondary:hover {
    background: var(--secondary-hover);
}

.btn.danger {
    background: var(--danger);
}

.btn.danger:hover {
    background: var(--danger-hover);
}

.info-grid {
    display: grid;
    gap: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.label {
    color: var(--muted);
    font-weight: 700;
    min-width: 140px;
}

.value {
    color: var(--text);
    text-align: right;
    word-break: break-word;
}

.mono {
    font-family: Consolas, Monaco, monospace;
}

.break {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
    color: var(--muted);
}

th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 14px;
}

td strong,
td b {
    color: var(--text);
}

.admin-actions {
    display: grid;
    gap: 6px;
    grid-template-columns: 1fr;
    min-width: 160px;
}

@media (max-width: 600px) {
    .admin-actions {
        grid-template-columns: 1fr 1fr;
    }
}

.admin-actions form {
    margin: 0;
    display: grid;
    gap: 8px;
}

.ok {
    color: #6ee7a8;
    font-weight: 700;
}

.bad {
    color: #ff9b9b;
    font-weight: 700;
}

@media (max-width: 768px) {
    .container {
        padding: 14px 12px 28px;
    }

    .topbar {
        gap: 14px;
    }

    .topbar h1 {
        font-size: 30px;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .topbar-actions .btn {
        flex: 1 1 calc(50% - 10px);
    }

    .card,
    .box {
        padding: 18px;
        border-radius: 16px;
    }

    .card h1,
    .box h1 {
        font-size: 30px;
    }

    .card h2,
    .box h2 {
        font-size: 24px;
    }

    .info-row {
        flex-direction: column;
        gap: 8px;
    }

    .value {
        text-align: left;
    }

    th,
    td {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .site-header-inner {
        padding: 14px 12px;
    }

    .brand {
        font-size: 20px;
    }

    .topbar h1 {
        font-size: 28px;
    }

    .topbar-actions .btn,
    button,
    .btn {
        width: 100%;
    }

    .small-card {
        margin-top: 20px;
    }

    .card,
    .box {
        padding: 16px;
        border-radius: 14px;
    }

    .card h1,
    .box h1 {
        font-size: 28px;
    }

    .card h2,
    .box h2 {
        font-size: 22px;
    }

    p,
    li,
    input,
    select,
    textarea,
    button,
    .btn {
        font-size: 16px;
    }
}
.nav-strip {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.nav-strip .btn {
    min-height: 40px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid transparent;
}

.status-badge.ok {
    color: #baf7d0;
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(34, 197, 94, 0.32);
}

.status-badge.bad {
    color: #ffd1d1;
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.32);
}

.status-badge.warn {
    color: #ffe7ad;
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.32);
}

.muted {
    color: var(--muted-2);
    font-size: 14px;
}

.actions-stack {
    display: grid;
    gap: 8px;
    min-width: 210px;
}

.actions-stack form {
    margin: 0;
    display: grid;
    gap: 8px;
}

.inline-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.inline-form input,
.inline-form select {
    flex: 1 1 160px;
}

.section-title {
    margin-bottom: 14px;
}

.table-note {
    margin-top: 12px;
    color: var(--muted-2);
    font-size: 14px;
}

.card:hover,
.box:hover {
    border-color: rgba(139, 179, 255, 0.25);
}

.admin-actions {
    display: grid;
    gap: 8px;
    min-width: 180px;
}

@media (max-width: 768px) {
    .nav-strip .btn {
        flex: 1 1 calc(50% - 10px);
    }

    .actions-stack,
    .admin-actions {
        min-width: 160px;
    }
}

@media (max-width: 480px) {
    .nav-strip .btn {
        flex: 1 1 100%;
    }
}

.main-header {

background: rgba(5,14,30,0.9);

border-bottom: 1px solid var(--border);

backdrop-filter: blur(8px);

}

.header-inner {

max-width: 1120px;

margin: 0 auto;

padding: 20px 16px;

}

.logo {

margin: 0 0 16px 0;

font-size: 36px;

font-weight: 900;

letter-spacing: 0.4px;

color: #8bb3ff;

}

.nav-grid {

display: grid;

grid-template-columns: 1fr 1fr;

gap: 10px;

}

.nav-grid .btn {

width: 100%;

}

@media (min-width: 700px) {

.nav-grid {

grid-template-columns: repeat(5, auto);

}

}

/* ===== ADMIN ANNOUNCEMENT ===== */

.announcement-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.announcement-box h2 {
    margin-top: 0;
    margin-bottom: 16px;
    color: var(--text);
}

.announcement-form {
    display: grid;
    gap: 12px;
}

.announcement-form label {
    display: block;
    font-weight: 700;
    color: var(--text);
}

.announcement-form input[type="text"],
.announcement-form textarea {
    width: 100%;
    background: var(--card-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 16px;
    outline: none;
}

.announcement-form input[type="text"]::placeholder,
.announcement-form textarea::placeholder {
    color: var(--muted-2);
}

.announcement-form input[type="text"]:focus,
.announcement-form textarea:focus {
    border-color: rgba(139, 179, 255, 0.45);
    box-shadow: 0 0 0 3px rgba(139, 179, 255, 0.12);
}

.announcement-form textarea {
    min-height: 140px;
    resize: vertical;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--text);
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex: 0 0 auto;
}

.announcement-box .alert.success {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success-text);
}

/* ===== ANNOUNCEMENT BANNER ===== */

.announcement-banner {
    background: linear-gradient(180deg, rgba(47, 102, 224, 0.18) 0%, rgba(13, 27, 54, 0.96) 100%);
    border: 1px solid rgba(139, 179, 255, 0.24);
    border-left: 4px solid var(--primary);
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.announcement-banner-label {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8bb3ff;
}

.announcement-banner h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    line-height: 1.2;
    color: var(--text);
}

.announcement-banner p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.links {
    margin-top: 16px;
    text-align: center;
    display: grid;
    gap: 10px;
}

.btn.full {
    width: 100%;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
    font-size: 14px;
    cursor: pointer;
}

.checkbox-row input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-row a {
    color: #60a5fa;
    text-decoration: none;
}

.checkbox-row a:hover {
    text-decoration: underline;
}

/* ===== TOP NAV / DROPDOWN ===== */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.logo-link {
    text-decoration: none;
}

.logo-link:hover {
    text-decoration: none;
}

.top-nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.top-nav-btn {
    min-height: 44px;
}

.menu-dropdown {
    position: relative;
}

.menu-toggle {
    min-width: 100px;
}

.menu-dropdown-content {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 260px;
    background: rgba(9, 26, 54, 0.98);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 10px;
    display: none;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.menu-dropdown.open .menu-dropdown-content {
    display: block;
}

.menu-section {
    padding: 10px 12px 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-2);
}

.menu-dropdown-content a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
}

.menu-dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

.menu-divider {
    height: 1px;
    margin: 8px 0;
    background: var(--border);
}

.logout-link {
    color: #ff9b9b !important;
}

.logout-link:hover {
    background: rgba(200, 61, 77, 0.12) !important;
}

@media (max-width: 768px) {
    .top-nav {
        align-items: stretch;
    }

    .top-nav-right {
        width: 100%;
    }

    .top-nav-btn,
    .menu-dropdown {
        flex: 1 1 calc(33.333% - 10px);
    }

    .menu-toggle {
        width: 100%;
    }

    .menu-dropdown-content {
        right: 0;
        left: auto;
        min-width: 240px;
    }
}

@media (max-width: 480px) {
    .top-nav-right {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .top-nav-btn,
    .menu-dropdown {
        width: 100%;
    }

    .menu-dropdown-content {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        left: auto;
        min-width: 240px;
        max-width: calc(100vw - 24px);
    }
}
