/* =====================================================
   ADMIN LAYOUT
===================================================== */

html {
    min-height: 100%;
}

body.admin-page-body {
    min-height: 100%;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background: #f5f7fa;
    color: #172033;
    font-size: 13px;
}

.admin-page-body .admin-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-page-body .sidebar {
    padding: 18px 13px;
    color: #fff;
    background: #172033;
}

.admin-page-body .sidebar h2 {
    margin: 0 0 16px;
    padding: 0 8px;
    font-size: 18px;
}

.admin-page-body .sidebar a {
    display: block;
    margin: 2px 0;
    padding: 8px 10px;

    color: #cdd5e0;
    border-radius: 7px;

    font-size: 13px;
    text-decoration: none;
}

.admin-page-body .sidebar a:hover,
.admin-page-body .sidebar a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.admin-page-body .admin-content {
    min-width: 0;
    padding: 18px 22px;
}

.admin-page-body .admin-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 10px;
}

.admin-page-body .admin-heading span {
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.admin-page-body .admin-heading h1 {
    margin: 3px 0 6px;
    color: #172033;
    font-size: 27px;
    line-height: 1.2;
}


/* =====================================================
   CARD
===================================================== */

.admin-page-body .card {
    margin-bottom: 12px;
    padding: 14px 16px;

    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;

    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.04);
}

.admin-page-body .card h2 {
    margin: 0 0 10px;
    font-size: 17px;
}

.admin-page-body .section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}


/* =====================================================
   STATISTICS
===================================================== */

.admin-page-body .stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 8px;
    margin: 10px 0 12px;
}

.admin-page-body .stats article {
    padding: 11px 13px;

    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
}

.admin-page-body .stats strong,
.admin-page-body .stats span {
    display: block;
}

.admin-page-body .stats strong {
    color: var(--primary);
    font-size: 22px;
}

.admin-page-body .stats span {
    margin-top: 2px;
    color: #667085;
    font-size: 11px;
}


/* =====================================================
   FORM
===================================================== */

.admin-page-body label {
    display: block;
    margin: 4px 0;
    font-size: 12px;
    font-weight: 700;
}

.admin-page-body input,
.admin-page-body select,
.admin-page-body textarea,
.admin-page-body .admin-select {
    width: 100%;
    min-height: 35px;
    padding: 6px 9px;

    color: #172033;
    background: #fff;

    border: 1px solid #d0d5dd;
    border-radius: 6px;

    font: inherit;
    font-size: 13px;
}

.admin-page-body input:focus,
.admin-page-body select:focus,
.admin-page-body textarea:focus {
    border-color: var(--primary);
    outline: 2px solid rgba(159, 18, 57, 0.12);
}

.admin-page-body input[type="color"] {
    width: 54px;
    padding: 3px;
}

.admin-page-body .form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 9px 12px;
}

.admin-page-body .field-large {
    grid-column: span 2;
}

.admin-page-body .checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}

.admin-page-body .checkbox-row input {
    width: 17px;
    min-height: auto;
    height: 17px;
}

.admin-page-body button,
.admin-page-body .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 34px;
    padding: 7px 13px;

    color: #fff;
    background: var(--primary);

    border: 0;
    border-radius: 6px;

    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.admin-page-body button:hover,
.admin-page-body .button:hover {
    opacity: 0.9;
}

.admin-page-body .button-secondary {
    color: #344054;
    background: #f2f4f7;
}

.admin-page-body .button-danger {
    color: #b42318;
    background: #fee4e2;
}

.admin-page-body .cancel-link {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}


/* =====================================================
   ALERT
===================================================== */

.admin-page-body .success-box,
.admin-page-body .error-box,
.admin-page-body .warning-box {
    margin-bottom: 12px;
    padding: 10px 13px;

    border: 1px solid transparent;
    border-radius: 8px;

    font-size: 12px;
}

.admin-page-body .success-box {
    color: #067647;
    background: #ecfdf3;
    border-color: #abefc6;
}

.admin-page-body .error-box {
    color: #b42318;
    background: #fef3f2;
    border-color: #fecdca;
}

.admin-page-body .warning-box {
    color: #854a0e;
    background: #fffaeb;
    border-color: #fedf89;
}

.admin-page-body .success-box ul,
.admin-page-body .error-box ul,
.admin-page-body .warning-box ul {
    margin: 5px 0 0;
    padding-left: 18px;
}


/* =====================================================
   TABLE
===================================================== */

.admin-page-body .table-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
}

.admin-page-body table {
    width: 100%;
    margin-top: 7px;
    border-collapse: collapse;
    font-size: 12px;
}

.admin-page-body th,
.admin-page-body td {
    padding: 7px 8px;
    border-bottom: 1px solid #eaecf0;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.admin-page-body th {
    color: #475467;
    background: #f9fafb;
    font-size: 11px;
    font-weight: 800;
}

.admin-page-body tr:hover td {
    background: #fcfcfd;
}

.admin-page-body .empty-table {
    padding: 25px;
    color: #667085;
    text-align: center;
}

.admin-page-body .row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-page-body .row-actions form {
    margin: 0;
}

.admin-page-body .button-link {
    min-height: auto;
    padding: 0;

    color: var(--primary);
    background: transparent;

    font-size: 12px;
}

.admin-page-body .color-preview {
    display: block;
    width: 23px;
    height: 23px;

    border: 2px solid #fff;
    border-radius: 50%;

    box-shadow: 0 0 0 1px #d0d5dd;
}

.admin-page-body .row-detail {
    display: block;
    margin-top: 2px;
    color: #667085;
    font-size: 10px;
}

.admin-page-body .status-active,
.admin-page-body .status-inactive {
    display: inline-block;
    padding: 3px 7px;

    border-radius: 999px;

    font-size: 10px;
    font-weight: 800;
}

.admin-page-body .status-active {
    color: #067647;
    background: #dcfae6;
}

.admin-page-body .status-inactive {
    color: #b42318;
    background: #fee4e2;
}

.admin-page-body .site-footer {
    display: none;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1100px) {
    .admin-page-body .form-grid {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }
}

@media (max-width: 800px) {
    .admin-page-body .admin-layout {
        display: block;
    }

    .admin-page-body .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-page-body .admin-content {
        padding: 12px;
    }
}

@media (max-width: 600px) {
    .admin-page-body .form-grid,
    .admin-page-body .stats {
        grid-template-columns: 1fr;
    }

    .admin-page-body .field-large {
        grid-column: span 1;
    }
}
/* =====================================================
   FIX CUỘN TRANG ADMIN
===================================================== */

html {
    width: 100% !important;
    height: auto !important;
    min-height: 100% !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;
}

body.admin-page-body {
    position: static !important;

    width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;
}

body.admin-page-body .admin-layout {
    position: relative !important;

    width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;

    overflow: visible !important;
}

body.admin-page-body .admin-content {
    position: relative !important;

    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;

    overflow: visible !important;
}

body.admin-page-body .sidebar {
    align-self: stretch;
    height: auto !important;
    min-height: 100vh;
    max-height: none !important;

    overflow: visible !important;
}

body.admin-page-body .table-scroll {
    overflow-x: auto !important;
    overflow-y: visible !important;
}

/* =========================================================
   TRANG QUẢN LÝ KHÁCH HÀNG
   ========================================================= */

.customer-stats {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.customer-filter-form {
    display: grid;
    grid-template-columns:
        minmax(240px, 1fr)
        minmax(220px, 300px)
        auto;
    gap: 10px;
    align-items: end;
}

.customer-filter-form label {
    display: block;
    margin-bottom: 4px;
    color: #475467;
    font-size: 12px;
    font-weight: 700;
}

.customer-filter-form input,
.customer-filter-form select {
    width: 100%;
    min-height: 36px;
    margin: 0;
    padding: 6px 9px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background: #ffffff;
    color: #101828;
    font-size: 13px;
}

.customer-filter-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.customer-filter-actions button,
.customer-filter-actions .secondary-button {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.customer-filter-actions button {
    border: 1px solid var(--primary);
    background: var(--primary);
    color: #ffffff;
    cursor: pointer;
}

.customer-filter-actions .secondary-button {
    border: 1px solid #d0d5dd;
    background: #ffffff;
    color: #344054;
}

.customer-page-information {
    color: #667085;
    font-size: 12px;
}

.customer-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #eaecf0;
    border-radius: 7px;
}

.customer-table {
    width: 100%;
    min-width: 1080px;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 12px;
}

.customer-table th,
.customer-table td {
    padding: 7px 8px;
    border-bottom: 1px solid #eaecf0;
    text-align: left;
    vertical-align: middle;
}

.customer-table th {
    background: #f8fafc;
    color: #475467;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.customer-table td {
    color: #344054;
}

.customer-table tbody tr:hover td {
    background: #fffaf3;
}

.customer-table tbody tr:last-child td {
    border-bottom: 0;
}

.customer-name {
    color: var(--primary);
    white-space: nowrap;
}

.customer-status {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.customer-status.status-active {
    background: #dcfce7;
    color: #166534;
}

.customer-status.status-completed {
    background: #dbeafe;
    color: #1d4ed8;
}

.customer-status.status-inactive {
    background: #fee2e2;
    color: #b42318;
}

.customer-status.status-default {
    background: #f2f4f7;
    color: #475467;
}

.customer-empty-state {
    padding: 30px 15px;
    color: #667085;
    font-size: 13px;
    text-align: center;
}

.customer-pagination {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    margin-top: 10px;
}

.customer-pagination a,
.customer-pagination span {
    display: inline-flex;
    min-width: 32px;
    min-height: 31px;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    border: 1px solid #d0d5dd;
    border-radius: 5px;
    background: #ffffff;
    color: #344054;
    font-size: 12px;
    text-decoration: none;
}

.customer-pagination .current {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .customer-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .customer-filter-form {
        grid-template-columns: 1fr 1fr;
    }

    .customer-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .customer-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .customer-filter-form {
        grid-template-columns: 1fr;
    }

    .customer-filter-actions {
        grid-column: auto;
    }
}

/* =========================================================
   SIDEBAR DÙNG CHUNG
   ========================================================= */

.admin-page-body .sidebar {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 14px 11px;
}

.admin-page-body .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 13px;
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-page-body .sidebar-brand-icon {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 18px;
}

.admin-page-body .sidebar-brand strong,
.admin-page-body .sidebar-brand small {
    display: block;
}

.admin-page-body .sidebar-brand strong {
    color: #ffffff;
    font-size: 14px;
}

.admin-page-body .sidebar-brand small {
    margin-top: 1px;
    color: #98a2b3;
    font-size: 10px;
}

.admin-page-body .sidebar-navigation {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-page-body .sidebar-navigation a,
.admin-page-body .sidebar-footer a {
    display: flex;
    min-height: 36px;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 7px 8px;
}

.admin-page-body .sidebar-menu-icon {
    display: inline-flex;
    width: 22px;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    font-size: 14px;
}

.admin-page-body .sidebar-menu-label {
    min-width: 0;
    flex: 1;
}

.admin-page-body .sidebar-coming-soon {
    padding: 2px 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: #98a2b3;
    font-size: 8px;
    white-space: nowrap;
}

.admin-page-body .sidebar a.menu-disabled {
    color: #7f8b9d;
    cursor: not-allowed;
    opacity: 0.75;
}

.admin-page-body .sidebar a.menu-disabled:hover {
    background: transparent;
}

.admin-page-body .sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: auto;
    padding-top: 14px;
}

.admin-page-body .sidebar-footer::before {
    display: block;
    height: 1px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.1);
    content: "";
}

.admin-page-body .sidebar .sidebar-logout {
    color: #fda29b;
}

/* =========================================================
   DASHBOARD
   ========================================================= */

.admin-page-body .admin-heading-description {
    margin: 0;
    color: #667085;
    font-size: 12px;
}

.admin-page-body .dashboard-stats article {
    position: relative;
    overflow: hidden;
}

.admin-page-body .dashboard-stats article::after {
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    content: "";
    opacity: 0.75;
}

.admin-page-body .dashboard-stats small {
    display: block;
    margin-top: 5px;
    color: #98a2b3;
    font-size: 10px;
}

.admin-page-body .dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 12px;
}

.admin-page-body .dashboard-results {
    display: grid;
    grid-template-columns: repeat(4, minmax(95px, 1fr));
    gap: 7px;
    margin-top: 10px;
}

.admin-page-body .dashboard-results article {
    padding: 10px;
    border: 1px solid #eaecf0;
    border-radius: 7px;
    background: #f8fafc;
}

.admin-page-body .dashboard-results span,
.admin-page-body .dashboard-results strong {
    display: block;
}

.admin-page-body .dashboard-results span {
    color: #667085;
    font-size: 10px;
}

.admin-page-body .dashboard-results strong {
    margin-top: 4px;
    color: #172033;
    font-size: 20px;
}

.admin-page-body .dashboard-results .result-prize {
    border-left: 3px solid #16a34a;
}

.admin-page-body .dashboard-results .result-no-prize {
    border-left: 3px solid #98a2b3;
}

.admin-page-body .dashboard-results .result-retry {
    border-left: 3px solid #2563eb;
}

.admin-page-body .dashboard-results .result-extra {
    border-left: 3px solid #f59e0b;
}

.admin-page-body .dashboard-quick-links {
    display: grid;
    gap: 6px;
    margin-top: 10px;
}

.admin-page-body .dashboard-quick-links a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 9px;
    border: 1px solid #eaecf0;
    border-radius: 7px;
    color: #344054;
    text-decoration: none;
}

.admin-page-body .dashboard-quick-links a:hover {
    border-color: var(--primary);
    background: #fffaf3;
}

.admin-page-body .dashboard-quick-links > a > span {
    display: inline-flex;
    width: 31px;
    height: 31px;
    align-items: center;
    justify-content: center;
    flex: 0 0 31px;
    border-radius: 7px;
    background: #f2f4f7;
    font-size: 15px;
}

.admin-page-body .dashboard-quick-links strong,
.admin-page-body .dashboard-quick-links small {
    display: block;
}

.admin-page-body .dashboard-quick-links strong {
    font-size: 12px;
}

.admin-page-body .dashboard-quick-links small {
    margin-top: 2px;
    color: #667085;
    font-size: 10px;
}

/* =========================================================
   RESPONSIVE DASHBOARD VÀ SIDEBAR
   ========================================================= */

@media (max-width: 1100px) {
    .admin-page-body .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .admin-page-body .dashboard-results {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 800px) {
    .admin-page-body .sidebar {
        min-height: auto !important;
        padding: 9px;
    }

    .admin-page-body .sidebar-brand {
        margin-bottom: 8px;
    }

    .admin-page-body .sidebar-navigation {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-page-body .sidebar-footer {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        margin-top: 8px;
        padding-top: 8px;
    }

    .admin-page-body .sidebar-footer::before {
        display: none;
    }
}

@media (max-width: 600px) {
    .admin-page-body .dashboard-results {
        grid-template-columns: 1fr 1fr;
    }

    .admin-page-body .admin-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* =========================================================
   TRANG QUY TẮC QUAY
   ========================================================= */

.admin-page-body .rules-campaign-form {
    max-width: 560px;
}

.admin-page-body .rules-campaign-form select {
    width: 100%;
    margin: 0;
}

.admin-page-body .rules-form {
    display: block;
}

.admin-page-body .rules-form .card {
    margin-bottom: 10px;
}

.admin-page-body .rules-form .card h2 {
    margin-bottom: 10px;
    color: #172033;
    font-size: 15px;
}

/* Chế độ vận hành */

.admin-page-body .mode-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.admin-page-body .mode-card {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0;
    padding: 11px;

    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #ffffff;

    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease;
}

.admin-page-body .mode-card:hover {
    border-color: #98a2b3;
    background: #f9fafb;
}

.admin-page-body .mode-card:has(input:checked) {
    border-color: var(--primary);
    background: #fff7ed;
    box-shadow: 0 0 0 1px var(--primary);
}

.admin-page-body .mode-card input {
    width: 17px;
    height: 17px;
    min-height: auto;
    margin: 1px 0 0;
    padding: 0;
    flex: 0 0 17px;
}

.admin-page-body .mode-card > span {
    min-width: 0;
}

.admin-page-body .mode-card b,
.admin-page-body .mode-card small {
    display: block;
}

.admin-page-body .mode-card b {
    color: #172033;
    font-size: 13px;
}

.admin-page-body .mode-card small {
    margin-top: 3px;
    color: #667085;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.45;
}

/* Form quy tắc */

.admin-page-body .rules-form .form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 8px 10px;
    margin-bottom: 8px;
}

.admin-page-body .rules-form .form-grid > div {
    min-width: 0;
}

.admin-page-body .rules-form .form-grid label {
    min-height: 17px;
}

.admin-page-body .rules-form input[type="text"],
.admin-page-body .rules-form input[type="number"] {
    margin: 0;
}

/* Công tắc */

.admin-page-body .switch-row {
    display: flex;
    align-items: center;
    gap: 8px;

    min-height: 34px;
    margin: 0;
    padding: 7px 0;

    border-bottom: 1px solid #f0f2f5;

    color: #344054;
    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
}

.admin-page-body .switch-row:last-child {
    border-bottom: 0;
}

.admin-page-body .switch-row input {
    width: 17px;
    height: 17px;
    min-height: auto;
    margin: 0;
    padding: 0;
    flex: 0 0 17px;
}

/* Cảnh báo Test */

.admin-page-body .test-warning {
    margin-top: 9px;
    padding: 9px 11px;

    border: 1px solid #fedf89;
    border-radius: 7px;
    background: #fffaeb;
    color: #854a0e;

    font-size: 11px;
}

.admin-page-body .test-warning strong {
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
}

.admin-page-body .test-warning p {
    margin: 0;
    line-height: 1.45;
}

.admin-page-body .test-warning[hidden] {
    display: none !important;
}

/* Khu vực lưu */

.admin-page-body .save-bar {
    position: sticky;
    z-index: 5;
    bottom: 8px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    margin-top: 10px;
    padding: 9px 12px;

    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);

    box-shadow: 0 -4px 15px rgba(16, 24, 40, 0.08);
    backdrop-filter: blur(7px);
}

.admin-page-body .save-bar p {
    margin: 0;
    color: #667085;
    font-size: 11px;
}

.admin-page-body .save-bar button {
    min-width: 130px;
}

/* Trạng thái khóa */

.admin-page-body #hotkey-settings {
    transition: opacity 0.2s ease;
}

.admin-page-body #hotkey-settings input:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

/* Responsive */

@media (max-width: 900px) {
    .admin-page-body .rules-form .form-grid {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }
}

@media (max-width: 700px) {
    .admin-page-body .mode-options,
    .admin-page-body .rules-form .form-grid {
        grid-template-columns: 1fr;
    }

    .admin-page-body .save-bar {
        position: static;
        align-items: stretch;
        flex-direction: column;
    }

    .admin-page-body .save-bar button {
        width: 100%;
    }
}

/* =========================================================
   LỊCH SỬ QUAY
   ========================================================= */

.admin-page-body .spin-history-stats {
    grid-template-columns: repeat(6, minmax(100px, 1fr));
}

.admin-page-body .spin-history-filter {
    display: grid;
    grid-template-columns:
        minmax(210px, 1.4fr)
        minmax(170px, 1fr)
        minmax(140px, 0.8fr)
        minmax(130px, 0.7fr)
        minmax(130px, 0.7fr)
        minmax(130px, 0.7fr);
    gap: 8px;
    align-items: end;
}

.admin-page-body .spin-filter-search {
    min-width: 0;
}

.admin-page-body .spin-filter-actions {
    display: flex;
    grid-column: 1 / -1;
    gap: 6px;
}

.admin-page-body .spin-filter-actions .secondary-button {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background: #ffffff;
    color: #344054;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.admin-page-body .spin-history-table {
    min-width: 1180px;
}

.admin-page-body .spin-customer-name {
    color: var(--primary);
}

.admin-page-body .spin-result-badge,
.admin-page-body .spin-mode-test,
.admin-page-body .spin-mode-standard {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.admin-page-body .spin-result-prize {
    background: #dcfae6;
    color: #067647;
}

.admin-page-body .spin-result-none {
    background: #f2f4f7;
    color: #475467;
}

.admin-page-body .spin-result-retry {
    background: #dbeafe;
    color: #1d4ed8;
}

.admin-page-body .spin-result-extra {
    background: #fef0c7;
    color: #93370d;
}

.admin-page-body .spin-result-default {
    background: #f2f4f7;
    color: #667085;
}

.admin-page-body .spin-mode-standard {
    background: #ecfdf3;
    color: #067647;
}

.admin-page-body .spin-mode-test {
    background: #fff3cd;
    color: #854a0e;
}

.admin-page-body .spin-operator-action {
    display: block;
    font-size: 11px;
}

.admin-page-body .spin-operator-action small {
    display: block;
    margin-top: 2px;
    color: #667085;
    font-size: 9px;
}

.admin-page-body .spin-page-information {
    color: #667085;
    font-size: 11px;
}

@media (max-width: 1200px) {
    .admin-page-body .spin-history-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .admin-page-body .spin-history-filter {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 700px) {
    .admin-page-body .spin-history-stats,
    .admin-page-body .spin-history-filter {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-page-body .spin-filter-search,
    .admin-page-body .spin-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .admin-page-body .spin-history-stats,
    .admin-page-body .spin-history-filter {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   TRANG BÁO CÁO
   ========================================================= */

.admin-page-body .report-filter-form {
    display: grid;
    grid-template-columns:
        minmax(220px, 1.4fr)
        minmax(140px, 0.8fr)
        minmax(140px, 0.8fr)
        minmax(150px, 0.8fr)
        auto;
    gap: 8px;
    align-items: end;
}

.admin-page-body .report-filter-actions {
    display: flex;
    gap: 6px;
}

.admin-page-body .report-filter-actions .secondary-button {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background: #ffffff;
    color: #344054;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.admin-page-body .report-stats {
    grid-template-columns: repeat(6, minmax(110px, 1fr));
}

.admin-page-body .report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.admin-page-body .report-result-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
    margin-top: 10px;
}

.admin-page-body .report-result-list div,
.admin-page-body .report-inventory div {
    padding: 9px;
    border: 1px solid #eaecf0;
    border-radius: 7px;
    background: #f8fafc;
}

.admin-page-body .report-result-list span,
.admin-page-body .report-result-list strong,
.admin-page-body .report-inventory span,
.admin-page-body .report-inventory strong {
    display: block;
}

.admin-page-body .report-result-list span,
.admin-page-body .report-inventory span {
    color: #667085;
    font-size: 10px;
}

.admin-page-body .report-result-list strong,
.admin-page-body .report-inventory strong {
    margin-top: 3px;
    color: #172033;
    font-size: 18px;
}

.admin-page-body .report-inventory {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin-top: 10px;
}

.admin-page-body .report-prize-table {
    min-width: 900px;
}

@media (max-width: 1200px) {
    .admin-page-body .report-filter-form {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-page-body .report-filter-actions {
        grid-column: 1 / -1;
    }

    .admin-page-body .report-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .admin-page-body .report-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .admin-page-body .report-filter-form,
    .admin-page-body .report-stats {
        grid-template-columns: 1fr;
    }

    .admin-page-body .report-result-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-page-body .report-filter-actions {
        grid-column: auto;
    }
}

/* =========================================================
   QUẢN LÝ USER
   ========================================================= */

.admin-page-body .user-form-grid {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    margin-bottom: 10px;
}

.admin-page-body .user-form-grid small {
    display: block;
}

@media (max-width: 1100px) {
    .admin-page-body .user-form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .admin-page-body .user-form-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   QUẢN LÝ GIAO DIỆN VÒNG QUAY
   ========================================================= */

.admin-page-body .wheel-campaign-form {
    max-width: 560px;
}

.admin-page-body .wheel-interface-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 12px;
}

.admin-page-body .wheel-content-fields {
    display: grid;
    gap: 8px;
}

.admin-page-body .wheel-content-fields textarea {
    resize: vertical;
}

.admin-page-body .wheel-upload-list {
    display: grid;
    gap: 8px;
}

.admin-page-body .wheel-upload-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 90px auto;
    gap: 10px;
    align-items: center;
    padding: 9px;
    border: 1px solid #eaecf0;
    border-radius: 7px;
}

.admin-page-body .wheel-upload-row img {
    width: 80px;
    height: 58px;
    object-fit: contain;
    border: 1px solid #eaecf0;
    border-radius: 6px;
    background: #f8fafc;
}

.admin-page-body .wheel-upload-row small {
    display: block;
    margin-top: 3px;
    color: #667085;
    font-size: 10px;
}

.admin-page-body .wheel-upload-row .checkbox-row {
    margin: 0;
    font-size: 11px;
}

.admin-page-body .wheel-color-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(140px, 1fr));
    gap: 8px;
}

.admin-page-body .wheel-color-field > div {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 5px;
}

.admin-page-body .wheel-color-field input[type="color"] {
    width: 52px;
    height: 35px;
}

.admin-page-body .wheel-preview-column {
    min-width: 0;
}

.admin-page-body .wheel-preview-column .card {
    position: sticky;
    top: 12px;
}

.admin-page-body .wheel-interface-preview {
    overflow: hidden;
    min-height: 480px;
    padding: 18px;
    border-radius: 9px;
    background: var(--preview-bg);
    color: var(--preview-text);
    text-align: center;
}

.admin-page-body .preview-badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 5px;
    background: var(--primary);
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
}

.admin-page-body .wheel-interface-preview h3 {
    margin: 15px 0 7px;
    color: var(--preview-title);
    font-size: 25px;
    line-height: 1.1;
}

.admin-page-body .wheel-interface-preview p {
    margin: 0;
    font-size: 11px;
}

.admin-page-body .preview-wheel {
    display: flex;
    width: 220px;
    height: 220px;
    align-items: center;
    justify-content: center;
    margin: 22px auto;
    border: 9px solid var(--primary);
    border-radius: 50%;
    background: repeating-conic-gradient(
        var(--preview-wheel-one) 0deg 45deg,
        var(--preview-wheel-two) 45deg 90deg
    );
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.18);
}

.admin-page-body .preview-wheel-center {
    display: flex;
    width: 74px;
    height: 74px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 5px solid var(--secondary);
    border-radius: 50%;
    background: #ffffff;
    color: #667085;
    font-size: 10px;
}

.admin-page-body .preview-wheel-center img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.admin-page-body .wheel-interface-preview > strong {
    display: block;
    font-size: 11px;
}

@media (max-width: 1100px) {
    .admin-page-body .wheel-interface-grid {
        grid-template-columns: 1fr;
    }

    .admin-page-body .wheel-preview-column .card {
        position: static;
    }

    .admin-page-body .wheel-color-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .admin-page-body .wheel-upload-row,
    .admin-page-body .wheel-color-grid {
        grid-template-columns: 1fr;
    }
}

.admin-page-body .preview-logo-fallback {
    display: inline-flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: #98a2b3;
    font-size: 10px;
    font-weight: 800;
}

.admin-page-body .preview-logo-fallback[hidden] {
    display: none !important;
}