* {
    box-sizing: border-box;
}

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

body {
    font-family: Arial, "Noto Sans Thai", sans-serif;
    color: #e5e7eb;
    background: #070b14;
}

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

/* Login */

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(
            circle at top,
            rgba(247, 147, 26, 0.15),
            transparent 35%
        ),
        #070b14;
}

.login-shell {
    width: 100%;
    max-width: 430px;
}

.login-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-bottom: 30px;
}

.login-brand h1 {
    margin: 0;
    font-size: 30px;
}

.login-brand p {
    margin: 4px 0 0;
    color: #94a3b8;
}

.brand-symbol {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    font-size: 34px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #f7931a, #f15a24);
    box-shadow: 0 15px 40px rgba(247, 147, 26, 0.25);
}

.brand-symbol.small {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 25px;
}

.login-card {
    padding: 32px;
    border: 1px solid #1f2937;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.94);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.login-heading h2 {
    margin: 0 0 8px;
}

.login-heading p {
    margin: 0 0 26px;
    color: #94a3b8;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #cbd5e1;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #334155;
    border-radius: 10px;
    outline: none;
    color: #fff;
    background: #0b1220;
}

.form-group input:focus {
    border-color: #f7931a;
    box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.12);
}

.login-button {
    width: 100%;
    height: 50px;
    margin-top: 5px;
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    background: linear-gradient(135deg, #f7931a, #f15a24);
}

.login-footer {
    margin-top: 22px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}

.alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 9px;
    line-height: 1.5;
    font-size: 14px;
}

.alert-error {
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: rgba(127, 29, 29, 0.25);
}

.alert-warning {
    color: #fde68a;
    border: 1px solid rgba(245, 158, 11, 0.35);
    background: rgba(120, 53, 15, 0.25);
}

/* Dashboard */

.admin-body {
    min-height: 100vh;
    background: #080d17;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 245px;
    padding: 24px 17px;
    border-right: 1px solid #172033;
    background: #0b111d;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 25px;
}

.sidebar-brand strong,
.sidebar-brand span {
    display: block;
}

.sidebar-brand span {
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

.sidebar-nav {
    display: grid;
    gap: 5px;
}

.sidebar-nav a {
    padding: 12px 14px;
    border-radius: 9px;
    color: #94a3b8;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: #fff;
    background: #172033;
}

.sidebar-nav a.active {
    border-left: 3px solid #f7931a;
}

.main-content {
    min-height: 100vh;
    margin-left: 245px;
    padding: 28px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

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

.topbar p {
    margin: 6px 0 0;
    color: #64748b;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 18px;
    text-align: right;
}

.admin-profile strong,
.admin-profile span {
    display: block;
}

.admin-profile span {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
}

.admin-profile a {
    padding: 9px 13px;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 13px;
}

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

.status-card {
    min-height: 170px;
    padding: 22px;
    border: 1px solid #172033;
    border-radius: 15px;
    background: #0d1523;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.card-label {
    color: #94a3b8;
    font-size: 14px;
}

.card-status {
    margin-top: 12px;
    font-size: 13px;
}

.card-status.online {
    color: #22c55e;
}

.card-value {
    margin-top: 22px;
    font-size: 29px;
    font-weight: bold;
    letter-spacing: -0.7px;
}

.card-note {
    margin-top: 10px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

@media (max-width: 1150px) {
    .status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .sidebar {
        position: static;
        width: auto;
        min-height: auto;
    }

    .sidebar-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .main-content {
        margin-left: 0;
        padding: 18px;
    }

    .topbar {
        align-items: flex-start;
        gap: 18px;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }
}
