/* =========================================
   RadioSpace Admin
   Archivo:
   ~/minecraft/web/html/css/admin.css
   ========================================= */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;

    background:
        radial-gradient(
            circle at top,
            rgba(50, 255, 80, 0.08),
            transparent 40%
        ),
        #050805;

    color: #e8ffe8;

    font-family:
        Arial,
        Helvetica,
        sans-serif;
}


/* =========================================
   Container
   ========================================= */

.admin-container {
    width: min(1100px, 92%);
    margin: 0 auto;
    padding: 40px 0;
}


/* =========================================
   Header
   ========================================= */

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 35px;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-brand img {
    width: 48px;
    height: 48px;

    object-fit: contain;
}

.admin-brand h1 {
    margin: 0;

    font-size: 26px;
    letter-spacing: 1px;
}

.admin-brand h1 span {
    color: #65ff65;
}


/* =========================================
   Admin Navigation
   Botones Logout
   ========================================= */

.admin-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-button {
    padding: 10px 16px;

    border-radius: 8px;

    font-family: inherit;

    font-size: 13px;
    font-weight: 700;

    letter-spacing: 0.3px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


/* =========================================
   Logout & Home
   ========================================= */

.nav-button.home {
    background: #65ff65;

    border: 1px solid #65ff65;

    color: #000;
}

.nav-button.home:hover {
    background: #4dff4d;

    border-color: #4dff4d;

    transform: translateY(-1px);
}


/* =========================================
   Logout & Login
   ========================================= */

.nav-button.login {
    background: transparent;

    border: 1px solid #2b522b;

    color: #a8c8a8;
}

.nav-button.login:hover {
    background: #0d170d;

    border-color: #65ff65;

    color: #65ff65;

    transform: translateY(-1px);
}


/* =========================================
   Button Active
   ========================================= */

.nav-button:active {
    transform: translateY(0);
}


/* =========================================
   Legacy Back Link
   ========================================= */

.back-link {
    color: #65ff65;

    text-decoration: none;

    font-size: 14px;
}

.back-link:hover {
    text-decoration: underline;
}


/* =========================================
   Cards
   ========================================= */

.admin-card {
    margin-bottom: 25px;
    padding: 28px;

    background: rgba(11, 17, 11, 0.92);

    border: 1px solid #1d351d;
    border-radius: 14px;

    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.25);
}


/* =========================================
   Card Header
   ========================================= */

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 25px;
}

.card-header h2 {
    margin: 0;

    font-size: 20px;
}


/* =========================================
   Server Status
   ========================================= */

.server-status {
    display: flex;
    align-items: center;
    gap: 8px;

    font-weight: bold;
}

.status-dot {
    width: 10px;
    height: 10px;

    border-radius: 50%;

    background: #777;
}

.status-dot.online {
    background: #65ff65;

    box-shadow:
        0 0 10px #65ff65;
}

.status-dot.offline {
    background: #ff4d4d;

    box-shadow:
        0 0 10px #ff4d4d;
}


/* =========================================
   Statistics
   ========================================= */

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 15px;
}

.stat-box {
    padding: 20px;

    background: #070c07;

    border: 1px solid #182518;
    border-radius: 10px;
}

.stat-box small {
    display: block;

    margin-bottom: 8px;

    color: #789078;

    font-size: 12px;
    text-transform: uppercase;
}

.stat-box strong {
    font-size: 22px;
}


/* =========================================
   Server Actions
   ========================================= */

.server-actions {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 15px;
}

.action-button {
    padding: 15px;

    border: 1px solid #2b522b;
    border-radius: 10px;

    background: #0d170d;

    color: #bfffbf;

    font-size: 15px;
    font-weight: bold;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.action-button:hover {
    background: #142214;

    border-color: #65ff65;

    transform: translateY(-1px);
}

.action-button.start {
    color: #65ff65;
}

.action-button.stop {
    color: #ff7070;
}

.action-button.restart {
    color: #ffd866;
}


/* =========================================
   Messages
   ========================================= */

.admin-message {
    min-height: 20px;

    margin-top: 20px;

    color: #91a891;

    font-size: 14px;
}


/* =========================================
   Admin Login
   ========================================= */

.login-container {
    min-height: 100vh;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;

    padding: 40px;

    background: #111;

    border: 1px solid #222;
    border-radius: 16px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5);
}

.login-brand {
    text-align: center;

    margin-bottom: 32px;
}

.login-brand img {
    width: 64px;
    height: 64px;

    margin-bottom: 12px;
}

.login-brand h1 {
    margin: 0;

    font-size: 28px;
    font-weight: 700;
}

.login-brand h1 span {
    color: #65ff65;
}

.login-brand p {
    margin: 8px 0 0;

    color: #888;

    font-size: 14px;
}


/* =========================================
   Login Form
   ========================================= */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;

    margin-bottom: 8px;

    color: #ccc;

    font-size: 14px;
    font-weight: 600;
}

.form-group input {
    width: 100%;

    padding: 13px 14px;

    background: #0a0a0a;

    color: #fff;

    border: 1px solid #333;
    border-radius: 8px;

    outline: none;

    font-size: 15px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-group input:focus {
    border-color: #65ff65;

    box-shadow:
        0 0 0 2px rgba(101, 255, 101, 0.12);
}


/* =========================================
   Login Button
   ========================================= */

.login-button {
    width: 100%;

    padding: 13px;

    margin-top: 8px;

    background: #65ff65;

    color: #000;

    border: none;
    border-radius: 8px;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.1s ease;
}

.login-button:hover {
    background: #4dff4d;
}

.login-button:active {
    transform: scale(0.98);
}


/* =========================================
   Login Messages
   ========================================= */

.login-message {
    min-height: 20px;

    margin-top: 16px;

    text-align: center;

    font-size: 14px;
}

.login-message.error {
    color: #ff5c5c;
}

.login-message.success {
    color: #65ff65;
}


/* =========================================
   Login Back Link
   ========================================= */

.login-card .back-link {
    display: block;

    margin-top: 24px;

    text-align: center;

    color: #888;

    text-decoration: none;

    font-size: 14px;
}

.login-card .back-link:hover {
    color: #65ff65;
}

/* =========================================
   Player Management
   ========================================= */

.player-management-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.player-management-grid:last-of-type {
    margin-bottom: 0;
}

.player-management-box {
    padding: 20px;
    background: linear-gradient(
        145deg,
        #0b120b,
        #070c07
    );
    border: 1px solid #1b2c1b;
    border-radius: 12px;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.player-management-box:hover {
    border-color: #294329;
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.player-management-box h3 {
    display: flex;
    align-items: center;
    gap: 9px;

    margin: 0 0 17px;

    color: #e8ffe8;

    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}


/* =========================================
   Player Form
   ========================================= */

.player-form {
    display: flex;
    gap: 10px;
}

.player-form input {
    flex: 1;
    min-width: 0;

    height: 42px;
    padding: 0 13px;

    background: #080d08;
    color: #e8ffe8;

    border: 1px solid #263d26;
    border-radius: 8px;

    outline: none;

    font-family: inherit;
    font-size: 14px;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.player-form input::placeholder {
    color: #607060;
}

.player-form input:hover {
    border-color: #345334;
}

.player-form input:focus {
    background: #0a110a;

    border-color: #65ff65;

    box-shadow:
        0 0 0 3px rgba(
            101,
            255,
            101,
            0.08
        );
}


/* =========================================
   Player Buttons
   ========================================= */

.player-button {
    min-width: 78px;
    height: 42px;
    padding: 0 16px;

    border-radius: 8px;

    font-family: inherit;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 0.06em;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease;
}

.player-button:hover {
    transform: translateY(-1px);
}

.player-button:active {
    transform: translateY(0);
}

.player-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}


/* Whitelist */

.player-button.whitelist-add {
    background: rgba(101, 255, 101, 0.05);

    border: 1px solid #65ff65;

    color: #65ff65;
}

.player-button.whitelist-add:hover {
    background: rgba(101, 255, 101, 0.11);

    box-shadow:
        0 0 14px rgba(101, 255, 101, 0.08);
}


/* Blacklist */

.player-button.blacklist-add {
    background: rgba(255, 112, 112, 0.05);

    border: 1px solid #ff7070;

    color: #ff7070;
}

.player-button.blacklist-add:hover {
    background: rgba(255, 112, 112, 0.11);

    box-shadow:
        0 0 14px rgba(255, 112, 112, 0.08);
}


/* =========================================
   Player Lists
   ========================================= */

.player-lists {
    margin-top: 2px;
}

.player-list {
    display: flex;
    flex-direction: column;
    gap: 7px;

    min-height: 52px;
}

.player-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    min-height: 44px;

    padding: 6px 7px 6px 13px;

    background: #080d08;

    border: 1px solid #182618;
    border-radius: 8px;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.player-list-item:hover {
    background: #0d150d;

    border-color: #294329;

    transform: translateX(2px);
}

.player-name {
    display: flex;
    align-items: center;

    min-width: 0;

    color: #dff5df;

    font-size: 14px;
    font-weight: 500;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-name::before {
    content: "";

    width: 7px;
    height: 7px;

    margin-right: 9px;

    flex: 0 0 7px;

    border-radius: 50%;

    background: #65ff65;

    box-shadow:
        0 0 8px rgba(101, 255, 101, 0.35);
}


/* Red indicator inside blacklist */

.player-management-box:nth-child(2)
.player-name::before {
    background: #ff7070;

    box-shadow:
        0 0 8px rgba(255, 112, 112, 0.35);
}


/* =========================================
   List Action Buttons
   ========================================= */

.player-list-action {
    flex-shrink: 0;

    height: 31px;

    padding: 0 11px;

    background: transparent;

    border: 1px solid #263526;
    border-radius: 7px;

    color: #8b9b8b;

    font-family: inherit;
    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.04em;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.player-list-action:hover {
    background: #121b12;

    border-color: #3b513b;

    color: #e8ffe8;
}

.player-list-action.unban:hover {
    background: rgba(101, 255, 101, 0.07);

    border-color: rgba(101, 255, 101, 0.35);

    color: #65ff65;
}


/* =========================================
   Empty List
   ========================================= */

.player-list-empty {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 52px;

    padding: 10px;

    background: rgba(0, 0, 0, 0.12);

    border: 1px dashed #1c2b1c;
    border-radius: 8px;

    color: #5f6f5f;

    font-size: 12px;
}


/* =========================================
   Player Message
   ========================================= */

.player-message {
    min-height: 20px;

    margin-top: 14px;

    color: #8fa18f;

    font-size: 13px;
}


/* =========================================
   Mobile
   ========================================= */

@media (max-width: 700px) {

    .player-management-grid {
        grid-template-columns: 1fr;
    }

    .player-form {
        flex-direction: column;
    }

    .player-button {
        width: 100%;
    }

    .player-management-box {
        padding: 16px;
    }
}


/* =========================================
   Player Lists
   ========================================= */

.player-lists {
    margin-top: 15px;
}

.player-list {
    display: flex;

    flex-direction: column;

    gap: 8px;

    min-height: 45px;
}

.player-list-item {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;

    padding: 10px 12px;

    background: #0a100a;

    border: 1px solid #182518;
    border-radius: 7px;
}

.player-name {
    color: #d8f5d8;

    font-size: 14px;
    font-weight: 600;
}

.player-list-action {
    padding: 6px 10px;

    background: transparent;

    border: 1px solid #334833;
    border-radius: 6px;

    color: #9aaa9a;

    font-family: inherit;

    font-size: 11px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.player-list-action:hover {
    background: #142214;

    border-color: #65ff65;

    color: #65ff65;
}

.player-list-action.unban:hover {
    border-color: #ff7070;

    color: #ff7070;
}

.player-list-empty {
    padding: 12px;

    color: #607060;

    font-size: 13px;

    text-align: center;
}


/* =========================================
   Player Message
   ========================================= */

.player-message {
    margin-top: 15px;
}


/* =========================================
   Mobile
   ========================================= */

@media (max-width: 700px) {

    .admin-container {
        padding: 25px 0;
    }

    .admin-header {
        align-items: flex-start;

        flex-direction: column;

        gap: 20px;
    }

    .admin-navigation {
        width: 100%;

        justify-content: center;

        flex-wrap: wrap;
    }

    .nav-button {
        flex: 1;

        min-width: 150px;
    }

    .stats-grid,
    .server-actions,
    .player-management-grid {
        grid-template-columns: 1fr;
    }

    .admin-card {
        padding: 20px;
    }

    .card-header {
        align-items: flex-start;

        flex-direction: column;

        gap: 15px;
    }
}


/* =========================================
   Login Mobile
   ========================================= */

@media (max-width: 500px) {

    .login-card {
        padding: 30px 22px;
    }

    .login-brand h1 {
        font-size: 24px;
    }
}

/* =========================================
   Player Management — RadioSpace
   ========================================= */

.player-management {
    margin-top: 24px;
}

.player-management-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.player-management-box {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 18px;
    min-width: 0;
}

.player-management-box h3 {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #f1f5f2;
}

/* ---------- Add player ---------- */

.player-form {
    display: flex;
    gap: 10px;
}

.player-form input {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding: 0 13px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 9px;
    outline: none;
    background: rgba(0, 0, 0, 0.20);
    color: #f5f7f5;
    font-size: 14px;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.player-form input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.player-form input:focus {
    border-color: rgba(76, 175, 80, 0.65);
    background: rgba(0, 0, 0, 0.28);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.10);
}

.player-button {
    height: 42px;
    min-width: 76px;
    padding: 0 16px;
    border: 0;
    border-radius: 9px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        filter 0.15s ease,
        opacity 0.15s ease;
}

.player-button:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

.player-button:active {
    transform: translateY(0);
}

.player-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Whitelist */

.whitelist-add {
    background: #2e7d32;
}

/* Blacklist */

.blacklist-add {
    background: #b83a3a;
}

/* ---------- Player lists ---------- */

.player-lists {
    margin-top: 18px;
}

.player-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 52px;
}

.player-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
    padding: 7px 8px 7px 13px;
    border: 1px solid rgba(255, 255, 255, 0.065);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.16);
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease;
}

.player-list-item:hover {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateX(2px);
}

.player-name {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: #e8eee9;
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-name::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #55b85a;
    box-shadow: 0 0 8px rgba(85, 184, 90, 0.35);
}

/* Red indicator for blacklist */

.player-management-box:nth-child(2) .player-list .player-name::before {
    background: #d94a4a;
    box-shadow: 0 0 8px rgba(217, 74, 74, 0.35);
}

.player-list-action {
    flex-shrink: 0;
    height: 32px;
    padding: 0 11px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 7px;
    background: transparent;
    color: rgba(255, 255, 255, 0.65);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition:
        color 0.15s ease,
        background 0.15s ease,
        border-color 0.15s ease;
}

.player-list-action:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
}

.player-list-action.unban:hover {
    color: #65c76b;
    border-color: rgba(101, 199, 107, 0.35);
    background: rgba(101, 199, 107, 0.08);
}

/* ---------- Empty state ---------- */

.player-list-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.32);
    font-size: 12px;
}

/* ---------- Messages ---------- */

.player-message {
    min-height: 20px;
    margin-top: 14px;
    font-size: 13px;
}

/* ---------- Mobile ---------- */

@media (max-width: 700px) {

    .player-management-grid {
        grid-template-columns: 1fr;
    }

    .player-form {
        flex-direction: column;
    }

    .player-button {
        width: 100%;
    }

}
/* =========================================
   Access & Capacity
   ========================================= */

.access-capacity-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 15px;
}

.access-setting-box {
    padding: 20px;
    background: #070c07;
    border: 1px solid #182518;
    border-radius: 10px;
}

.access-setting-box h3 {
    margin: 0 0 15px;
    font-size: 15px;
    color: #d5e8d5;
}

.whitelist-state {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #789078;
    font-size: 13px;
    text-transform: uppercase;
}

.whitelist-state strong {
    min-width: 32px;
    text-align: right;
}

.state-on {
    color: #65ff65;
}

.state-off {
    color: #ff7070;
}

.state-unavailable {
    color: #ffd866;
}

.whitelist-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.setting-button {
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid #2b522b;
    border-radius: 9px;
    background: #0d170d;
    color: #bfffbf;
    font-weight: 700;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.setting-button:hover:not(:disabled) {
    background: #142214;
    border-color: #65ff65;
    transform: translateY(-1px);
}

.setting-button:disabled {
    opacity: 0.55;
    cursor: wait;
}

.whitelist-off {
    color: #ff8a8a;
}

.whitelist-on {
    color: #65ff65;
}

.whitelist-off.active {
    background: #2b1111;
    border-color: #ff7070;
    box-shadow: 0 0 12px rgba(255, 112, 112, 0.15);
}

.whitelist-on.active {
    background: #102910;
    border-color: #65ff65;
    box-shadow: 0 0 12px rgba(101, 255, 101, 0.15);
}

.max-players-form {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) auto;
    gap: 12px;
}

.max-players-form input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #2b522b;
    border-radius: 9px;
    background: #050905;
    color: #e8ffe8;
    font-size: 18px;
    font-weight: 700;
    outline: none;
}

.max-players-form input:focus {
    border-color: #65ff65;
    box-shadow: 0 0 0 2px rgba(101, 255, 101, 0.08);
}

.max-players-save {
    min-width: 100px;
    color: #ffd866;
}

.setting-help {
    display: block;
    margin-top: 11px;
    color: #789078;
    line-height: 1.4;
}

@media (max-width: 700px) {
    .access-capacity-grid {
        grid-template-columns: 1fr;
    }

    .whitelist-actions {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 460px) {
    .whitelist-actions,
    .max-players-form {
        grid-template-columns: 1fr;
    }

    .max-players-save {
        width: 100%;
    }
}

/* DayZ control panel */
.dayz-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.action-button.status {
    color: #b5c8ff;
}
.action-button:disabled {
    opacity: 0.55;
    cursor: wait;
    transform: none;
}
@media (max-width: 750px) {
    .dayz-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
