* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #090c12;
    --bg-2: #0f141d;
    --panel: #151b24;
    --panel-2: #1a2230;
    --panel-3: #10151d;
    --border: #273243;
    --border-soft: #1e2734;
    --text: #e5e7eb;
    --muted: #96a2b4;
    --title: #ffffff;
    --green: #16a34a;
    --green-2: #15803d;
    --green-soft: rgba(22, 163, 74, .12);
    --red: #991b1b;
    --red-2: #7f1d1d;
    --blue: #1d4ed8;
    --yellow: #7c5b11;
    --shadow: 0 18px 50px rgba(0, 0, 0, .28);
    --radius: 16px;
}

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

body {
    font-family: Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255,255,255,.03), transparent 18%),
        linear-gradient(180deg, var(--bg), var(--bg-2));
}

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

.container {
    width: 100%;
    max-width: 470px;
    margin: 70px auto;
    padding: 20px;
}

.card,
.box,
.stat {
    position: relative;
    overflow: hidden;
}

.card::before,
.box::before,
.stat::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,.02), transparent 35%);
}

.card {
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
}

h1 {
    font-size: 26px;
    margin-bottom: 8px;
    color: var(--title);
    letter-spacing: .2px;
}

.subtitle {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
    color: #d8dee9;
    font-weight: bold;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="file"],
textarea,
select {
    width: 100%;
    background: #0d1219;
    color: #fff;
    border: 1px solid #2a3646;
    border-radius: 12px;
    padding: 12px 14px;
    outline: none;
    margin-bottom: 16px;
    transition: .18s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}

input[type="file"] {
    padding: 10px 12px;
}

input:hover,
textarea:hover,
select:hover {
    border-color: #334155;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, .12);
}

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

button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(180deg, var(--green), var(--green-2));
    color: #fff;
    border: 0;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    font-weight: bold;
    transition: .18s ease;
    box-shadow: 0 10px 24px rgba(22, 163, 74, .16);
}

button:hover,
.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

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

.btn-secondary {
    background: linear-gradient(180deg, #263140, #1c2532);
    border: 1px solid #384658;
    box-shadow: none;
}

.btn-secondary:hover {
    background: linear-gradient(180deg, #2a3748, #202938);
}

.btn-danger {
    background: linear-gradient(180deg, var(--red), var(--red-2));
    box-shadow: 0 10px 24px rgba(153, 27, 27, .16);
}

.btn-danger:hover {
    filter: brightness(1.05);
}

.btn-small {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 10px;
}

.alert {
    padding: 13px 15px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.45;
    border: 1px solid transparent;
}

.alert-error {
    background: rgba(122, 18, 18, .18);
    border-color: rgba(185, 28, 28, .32);
    color: #ffd0d0;
}

.alert-success {
    background: rgba(18, 49, 29, .32);
    border-color: rgba(22, 101, 52, .36);
    color: #bbf7d0;
}

.topbar {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(12, 16, 24, .92);
    border-bottom: 1px solid rgba(39, 50, 67, .94);
    backdrop-filter: blur(12px);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    box-shadow: 0 8px 25px rgba(0,0,0,.14);
}

.logo {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 38px;
    padding-left: 50px;
    font-size: 20px;
    font-weight: bold;
    color: #f8fafc;
    letter-spacing: .2px;
}

.logo::before {
    content: "";
    width: 36px;
    height: 36px;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 10px;
    background-image: url('../../images/logo.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    background-color: #0f1115;
    border: 1px solid #2d3442;
    box-shadow: 0 6px 16px rgba(0,0,0,.22);
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-link {
    color: #cbd5e1;
    padding: 10px 13px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 14px;
    transition: .18s ease;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(22, 163, 74, .08);
    border-color: rgba(22, 163, 74, .18);
    color: #ffffff;
}

.page {
    max-width: 1180px;
    margin: 30px auto;
    padding: 0 20px 26px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 20px;
}

.box {
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.muted {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.report-item {
    background: linear-gradient(180deg, #11161f, #0d1219);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 16px;
    margin-top: 14px;
}

.report-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.report-name {
    font-weight: bold;
    color: #ffffff;
}

.report-date {
    font-size: 13px;
    color: var(--muted);
}

.report-text {
    white-space: pre-wrap;
    color: var(--text);
    line-height: 1.6;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

table th,
table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: middle;
}

table th {
    color: #dbe4ef;
    background: #121923;
}

table tr:hover td {
    background: rgba(255,255,255,.015);
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid transparent;
}

.badge-admin {
    background: rgba(29, 78, 216, .16);
    color: #dbeafe;
    border-color: rgba(29, 78, 216, .24);
}

.badge-func {
    background: rgba(22, 101, 52, .18);
    color: #bbf7d0;
    border-color: rgba(22, 101, 52, .24);
}

.badge-on {
    background: rgba(22, 101, 52, .18);
    color: #bbf7d0;
    border-color: rgba(22, 101, 52, .24);
}

.badge-off {
    background: rgba(63, 63, 70, .18);
    color: #e4e4e7;
    border-color: rgba(113, 113, 122, .18);
}

.action-form {
    display: inline-block;
    margin: 0;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.stat {
    background: linear-gradient(180deg, #161e29, #101721);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 26px;
    font-weight: bold;
    color: #ffffff;
    margin-top: 6px;
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 16px 0;
}

/* scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0c1016;
}

::-webkit-scrollbar-thumb {
    background: #2a3646;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #344255;
}

@media (max-width: 980px) {
    .grid-2,
    .stats {
        grid-template-columns: 1fr;
    }

    .page {
        padding: 0 14px 24px;
    }

    .box,
    .card {
        padding: 18px;
    }
}

@media (max-width: 720px) {
    .topbar {
        padding: 12px 14px;
    }

    .logo {
        font-size: 17px;
        padding-left: 42px;
    }

    .logo::before {
        width: 30px;
        height: 30px;
    }

    .nav-link,
    .btn,
    button {
        width: 100%;
    }

    .topbar-left,
    .topbar-right {
        width: 100%;
    }

    .topbar-right {
        justify-content: flex-start;
    }

    .filter-form,
    .meta-progress-row,
    .row-form,
    .row-actions {
        flex-direction: column;
        align-items: stretch !important;
    }

    .row-form input[type="password"],
    .meta-progress-row input {
        width: 100% !important;
    }

    .container {
        margin: 34px auto;
        padding: 14px;
    }

    h1 {
        font-size: 24px;
    }
}
