/* admin.css */
:root {
    --admin-bg: #0d1117;
    --admin-card: #161b22;
    --admin-border: #30363d;
    --admin-accent: #238636;
    --admin-accent-hover: #2ea043;
    --admin-text: #c9d1d9;
    --admin-text-muted: #8b949e;
}

.admin-body {
    background-color: var(--admin-bg);
    color: var(--admin-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    margin: 0;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--admin-border);
    padding-bottom: 20px;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 10px 20px;
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    color: var(--admin-text);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
}

.tab-btn.active {
    background: var(--admin-accent);
    border-color: var(--admin-accent);
    color: white;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Styles */
.card {
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--admin-text-muted);
    font-size: 0.9rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    background: #0d1117;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    color: var(--admin-text);
    font-size: 1rem;
    box-sizing: border-box;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--admin-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(35, 134, 54, 0.3);
}

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

.btn-submit {
    background: var(--admin-accent);
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    width: 100%;
}

.btn-submit:hover {
    background: var(--admin-accent-hover);
    transform: translateY(-2px);
}

/* Test Case Builder */
.test-cases-container {
    background: #0d1117;
    border: 1px dashed var(--admin-border);
    padding: 20px;
    border-radius: 8px;
    margin-top: 10px;
}

.test-case-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: flex-start;
}

.test-case-row input {
    flex: 1;
}

.btn-remove-case {
    background: #da3633;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-add-case {
    background: transparent;
    border: 1px solid var(--admin-accent);
    color: var(--admin-accent);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 10px;
}

/* User Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th,
td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--admin-border);
}

th {
    color: var(--admin-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.reset-btn {
    background: transparent;
    border: 1px solid var(--admin-border);
    color: var(--admin-text);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.reset-btn:hover {
    border-color: var(--admin-text);
}

/* MOBILE RESPONSIVENESS */
@media (max-width: 768px) {
    .admin-container {
        padding: 20px 5%;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .admin-tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1;
        text-align: center;
        min-width: 140px;
    }

    #users-list-container table {
        min-width: unset;
        width: 100%;
    }

    #users-list-container table thead {
        display: none;
    }

    #users-list-container table tbody tr {
        display: flex;
        flex-direction: column;
        background-color: var(--admin-card);
        border: 1px solid var(--admin-border);
        border-radius: 8px;
        margin-bottom: 16px;
        padding: 16px;
    }

    #users-list-container table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border-bottom: 1px solid var(--admin-border);
        text-align: right;
        word-break: break-all;
    }

    #users-list-container table td:last-child {
        border-bottom: none;
    }

    #users-list-container table td::before {
        font-weight: 600;
        color: var(--admin-text-muted);
        font-size: 0.8rem;
        text-transform: uppercase;
        margin-right: 16px;
    }

    #users-list-container table td:nth-child(1)::before {
        content: "User";
    }

    #users-list-container table td:nth-child(2)::before {
        content: "Mobile";
    }

    #users-list-container table td:nth-child(3)::before {
        content: "Hash";
    }

    #users-list-container table td:nth-child(4)::before {
        content: "Op";
    }
}