﻿
:root {
    --bg: #0f1319;
    --card: #171f2e;
    --header: #0f1319;
    --accent: #00d4ff;
    --green: #00ff9d;
    --danger: #ff4d5e;
    --danger-bg: rgba(255, 77, 94, 0.12);
    --text: #ffffff;
    --text-muted: #b0c4de;
    --border: #2a3a5c;
    --hint-bg: rgba(116, 143, 170, 0.14);
    --hint-border: rgba(141, 169, 196, 0.22);
    --hint-text: #d7e4f2;
    --gradient: linear-gradient(135deg, #0099ff, #00e676);
    --gradient-text: linear-gradient(135deg, #0056b3, #008f58);
    /* Biến cho Item nạp tiền */
    --item-bg: #1a202c;
    --item-border: #3d4a5d;
    --item-text: #f8fafc;
    --item-price: #4ade80;
    --item-hover-bg: #242c3d;
    --item-hover-border: #4a5568;
    --item-active-bg: rgba(99, 102, 241, 0.15);
    --item-active-border: #6366f1;
    --item-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

/* --- LIGHT MODE OVERRIDE --- */
[data-theme="light"] {
    --bg: #f0f2f5;
    --card: #ffffff;
    --header: #ffffff;
    --accent: #0066ff;
    --green: #00b359;
    --danger: #d92d20;
    --danger-bg: rgba(217, 45, 32, 0.1);
    --text: #1a1a2e;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --hint-bg: rgba(0, 102, 255, 0.08);
    --hint-border: rgba(0, 102, 255, 0.16);
    --hint-text: #35506f;
    --gradient: linear-gradient(135deg, #0066ff, #00c853);
    --gradient-text: linear-gradient(135deg, #0044aa, #007a46);
    /* Biến cho Item nạp tiền (Light Mode) */
    --item-bg: #ffffff;
    --item-border: #e2e8f0;
    --item-text: #1e293b;
    --item-price: #16a34a;
    --item-hover-bg: #f8fafc;
    --item-hover-border: #cbd5e0;
    --item-active-bg: rgba(79, 70, 229, 0.08);
    --item-active-border: #4f46e5;
    --item-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* --- RESET CƠ BẢN --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Exo 2',sans-serif;
}

html {
    font-size: 13px;
}

body {
    background: var(--bg);
    color: var(--text) !important;
    min-height: 100vh;
    transition: all .5s;
}

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

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

header {
    background: var(--header);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
}

.header-inner {
    max-width: 1400px;
    margin: auto;
    padding: 8px 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-height: 56px;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    flex-shrink: 0;
}

.common-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-controls {
    display: none;
    align-items: center;
    gap: 8px;
}

.control-btn {
    padding: 8px 12px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    min-height: 40px;
    gap: 6px;
    white-space: nowrap;
    transition: all .3s;
    background: var(--card);
    border: 1px solid var(--border);
}

.login-btn, .register-btn, .username-display {
    background: var(--gradient);
    color: #000;
}

.logout-btn {
    background: var(--danger);
    color: #fff;
    border-color: transparent;
}

.username-display {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 8px 12px;
    border-radius: 40px;
    cursor: pointer;
}

.lang-btn, .theme-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
}

.lang-selector {
    position: relative;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-top: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,.4);
    min-width: 180px;
    display: none;
    z-index: 999;
}

    .lang-dropdown.active {
        display: block;
    }

.lang-item {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: .3s;
    font-size: 14px;
}

    .lang-item:hover {
        background: rgba(0,212,255,.12);
    }

.container {
    max-width: 1400px;
    margin: auto;
    padding: 12px 12px 64px;
}

.nav-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: var(--card);
    margin: 16px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,.3);
}

.nav-btn {
    flex: 0 0 48%;
    min-width: 160px;
    max-width: 320px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 6px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all .4s;
    position: relative;
    overflow: hidden;
}

@media (min-width:900px) {
    .nav-tabs {
        flex-wrap: nowrap;
    }

        .nav-tabs .nav-btn {
            flex: 0 0 auto;
            min-width: 120px;
            width: auto;
        }
}

@media (max-width:480px) {
    .nav-tabs .nav-btn {
        min-width: 45%;
        font-size: 12px;
        padding: 10px;
    }
}

.nav-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient);
    opacity: 0;
    transition: .4s;
}

.nav-btn:hover::before {
    opacity: .12;
}

.nav-btn.active {
    background: var(--gradient);
    color: #000;
    box-shadow: 0 0 20px rgba(0,212,255,.5);
}

.nav-btn span:first-child {
    font-size: 20px;
}

.tab-content {
    display: none;
}

    .tab-content.active {
        display: block !important;
    }

/* CARD - Đã fix màu chữ */
.card {
    background: var(--card);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    border: 1px solid var(--border);
    overflow-x: auto;
    color: var(--text) !important;
}

    .card h2, .card h3, .card strong, .card span {
        color: var(--text);
    }

    .card p {
        color: var(--text-muted);
        margin-bottom: 8px;
    }

        .card p span:not(.linked):not(.unlinked) {
            color: var(--text) !important;
            font-weight: 600;
        }

select, input {
    width: 100%;
    padding: 12px 14px;
    margin: 8px 0;
    background: var(--card) !important;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text) !important;
    font-size: 14px;
    transition: all .3s;
}

    input::placeholder {
        color: var(--text-muted);
        opacity: 0.9;
    }

    input:focus, select:focus {
        outline: none;
        border-color: var(--accent);
        box-shadow: 0 0 0 4px rgba(0,212,255,.12);
    }

/* Nút chính dùng Gradient sáng */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 40px;
    font-weight: 700;
    cursor: pointer;
    background: var(--gradient);
    color: #000;
    transition: all .4s;
    width: 100%;
    margin-top: 12px;
    font-size: 14px;
}

    .btn:hover {
        transform: translateY(-3px);
    }

.btn:disabled {
        opacity: .5;
        cursor: not-allowed;
    }

.modal-btn-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.modal-btn-group .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.social-btn {
    margin: 8px 0;
    padding: 10px;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

    .social-btn.facebook {
        background: #1877f2;
    }

    .social-btn.google {
        background: #db4437;
    }

    .social-btn.apple {
        background: #000;
    }

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 12px;
}

    .modal.active {
        display: flex;
    }

.modal-content {
    background: var(--card);
    width: 96%;
    max-width: 480px;
    border-radius: 16px;
    padding: 24px 18px;
    box-shadow: 0 20px 60px rgba(0,212,255,.18);
    border: 1px solid var(--border);
    position: relative;
}

    .modal-content h2 {
        background: var(--gradient-text) !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
    }

.close {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 30px;
    cursor: pointer;
    color: var(--text-muted);
}

    .close:hover {
        color: var(--accent);
    }

footer {
    text-align: center;
    padding: 12px;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
    background: var(--card);
}

.hidden {
    display: none !important;
}

.error-msg {
    color: #ff3b30;
    margin-top: 8px;
    text-align: center;
    font-size: 13px;
}

.success-msg {
    color: var(--green);
    margin-top: 8px;
    text-align: center;
    font-size: 13px;
}

.switch-link {
    text-align: center;
    margin: 12px 0;
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
    font-size: 13px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 13px;
}

th, td {
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    word-wrap: break-word;
}

th {
    background: var(--gradient);
    color: #000;
    font-size: 13px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.page-btn {
    padding: 6px 12px;
    border-radius: 30px;
    background: var(--card);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all .3s;
    color: var(--text);
    font-size: 13px;
    min-width: 64px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .page-btn:hover {
        background: var(--gradient);
        color: #000;
    }

    .page-btn.disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

#pageInfo {
    min-width: 100px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 10px;
    background: transparent;
    font-weight: 600;
    color: var(--text);
}

.linked {
    color: #2ecc71 !important;
    font-weight: bold;
    margin-right: 10px;
}

.unlinked {
    color: #e74c3c !important;
    font-weight: bold;
    margin-right: 10px;
}

.unlink-btn {
    background: #c0392b !important;
    color: #ffffff !important;
    border: none !important;
    transition: background 0.3s;
}

    .unlink-btn:hover {
        background: #e74c3c !important;
        cursor: pointer;
    }

.link-btn {
    color: white !important;
    border: none !important;
}

.section {
    margin-top: 12px;
}

.not-logged-in {
    text-align: center;
    color: var(--text-muted);
    padding: 12px;
    font-size: 13px;
}

@media (max-width: 768px) {
    table {
        table-layout: fixed;
    }

    .logo {
        font-size: 18px;
    }

    th:nth-child(1), td:nth-child(1) {
        width: 35%;
        text-align: left;
        padding-left: 10px;
    }

    th:nth-child(2), td:nth-child(2) {
        width: 30%;
        text-align: left;
        padding-left: 10px;
    }

    th:nth-child(3), td:nth-child(3) {
        width: 20%;
        text-align: right;
        padding-right: 10px;
    }

    .header-inner {
        min-height: 48px;
    }

    .modal-content {
        padding: 18px;
    }
}

.user-controls .username-display, .user-controls .logout-btn, #guestControls .login-btn {
    height: 40px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px !important;
    font-size: 14px;
}

.username-display {
    cursor: pointer;
}

.qr-container {
    text-align: center;
    margin: 16px 0;
    display: block;
    border: 2px solid var(--accent);
    border-radius: 10px;
    padding: 10px;
    background: rgba(0,212,255,.05);
}

.qr-instructions {
    font-size: 14px;
    color: var(--text);
    margin-top: 8px;
    font-weight: 600;
}

.social-btn.qr-btn {
    background: #4caf50;
    font-weight: bold;
    border: 2px solid var(--green);
}

#qrCode {
    margin: 0 auto;
    width: 200px;
    height: 200px;
}

iframe {
    display: block;
    border: none;
}

#supportBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 48px;
    height: 48px;
    padding: 0 !important;
    cursor: pointer;
    z-index: 1000;
}

    #supportBtn img#supportIcon {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
    }

#messengerModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

    #messengerModal.active {
        display: flex;
    }

#messengerModalContent {
    background: var(--card);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0,212,255,.18);
    border: 2px solid var(--accent);
    width: 90%;
    max-width: 400px;
    height: 80vh;
    position: relative;
    overflow: hidden;
}

#messengerClose {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text);
    z-index: 10001;
}

#messengerIframe {
    width: 100%;
    height: 100%;
    border: none;
}

#messengerTitle {
    text-align: center;
    padding: 10px;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 18px;
    font-weight: 600;
}

/* TOAST CONFIG - Góc Phải + Đổ bóng */
#toast-container {
    top: 80px !important;
    right: 12px !important;
}

    #toast-container > div {
        background-color: var(--card);
        color: var(--text);
        border: 1px solid var(--border);
        box-shadow: 0 8px 20px rgba(0,0,0,0.3) !important;
        font-weight: 600;
        opacity: 1 !important;
        border-radius: 8px;
    }

.toast-success {
    border-left: 5px solid var(--green) !important;
}

.toast-error {
    border-left: 5px solid #ff3b30 !important;
}

#historyBody td span {
    color: #00d4ff;
}

#historyBody td:nth-child(3) {
    color: #00ff9d;
    font-family: monospace;
    font-size: 1.1em;
}

body {
    font-family: var(--font-main);
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    flex: 1;
    padding-top: calc(var(--header-height) + 30px);
    padding-bottom: 40px;
    max-width: auto;
}

.hidden {
    display: none !important;
}

[data-theme="dark"] .character-input[readonly] {
    background-color: #2d3748;
    color: #ffffff;
    border: 1px solid #4a5568;
    cursor: not-allowed;
}
[data-theme="light"] .character-input[readonly] {
    background-color: #f1f3f6;
    color: #1a1a2e;
    border: 1px solid #d1d5db;
    cursor: not-allowed;
}


.package-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
}

.package-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .package-item:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: var(--primary, #00ff9d);
    }

    .package-item.active {
        background: var(--primary, #00ff9d);
        color: #000;
        border-color: var(--primary, #00ff9d);
        font-weight: 700;
    }

.package-price {
    font-size: 0.85rem;
    margin-top: 4px;
    opacity: 0.8;
}


.btn-primary {
    background: var(--gradient, linear-gradient(45deg, #00ff9d, #00ccff));
    border: none;
    color: #000;
    font-weight: 600;
}

    .btn-primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        background: #555;
        color: #888;
    }

.form-control, .form-select {
    height: 50px;
    padding: 10px 15px;
    font-size: 1rem;
    border-radius: 8px;
    background-color: var(--card-bg, #fff);
    border: 1px solid var(--border, #ccc);
    color: var(--text, #333);
    transition: all 0.3s ease;
}


    .form-control:focus, .form-select:focus {
        box-shadow: 0 0 0 4px rgba(0, 255, 157, 0.2);
        border-color: var(--primary, #00ff9d);
    }

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #fff;
}

    [data-theme="dark"] .form-control[readonly],
    [data-theme="dark"] .form-select[readonly] {
        background-color: #1a202c !important;
        border-color: #4a5568;
        color: #ffffff;
        opacity: 0.85;
        cursor: not-allowed;
        font-weight: 600;
    }

[data-theme="light"] .form-control[readonly],
[data-theme="light"] .form-select[readonly] {
    background-color: #f1f3f6 !important;
    border-color: #d1d5db;
    color: #1a1a2e;
    opacity: 1;
    cursor: not-allowed;
    font-weight: 600;
}


.form-label {
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-muted, #888);
}

.history-date {
    color: #6c757d;
}

[data-theme="dark"] .history-date {
    color: #adb5bd;
}
#methodList, #packageList {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.method-item, .package-item {
    flex: 0 1 calc(33.333% - 15px);
    min-width: 140px;
    max-width: 200px;
    background: var(--item-bg);
    border: 2px solid var(--item-border);
    border-radius: 12px;
    padding: 18px 15px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    box-shadow: var(--item-shadow);
    position: relative;
    color: var(--item-text); 
}

    .method-item:hover, .package-item:hover {
        border-color: var(--item-hover-border);
        background: var(--item-hover-bg);
        transform: translateY(-3px);
    }

    .method-item.active, .package-item.active {
        border-color: var(--item-active-border) !important;
        background-color: var(--item-active-bg) !important;
        box-shadow: 0 0 12px var(--item-active-bg);
        color: var(--item-text);
    }

        .method-item.active::after, .package-item.active::after {
            content: '✓';
            position: absolute;
            top: 5px;
            right: 8px;
            color: var(--item-active-border);
            font-weight: bold;
            font-size: 14px;
        }

.item-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--item-text); 
    margin-bottom: 4px;
}

.item-price {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--item-price);
}
.method-icon {
    width: 60px;       
    height: 60px;
    object-fit: contain; 
    margin-bottom: 10px; 
    display: block; 
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.method-item {
    overflow: hidden;
    min-height: 120px;
}

@media (max-width: 576px) {
    .method-item, .package-item {
        flex: 0 1 calc(50% - 10px);
        min-width: 120px;
        padding: 15px 10px;
    }
}


.policy-content-wrapper {
    color: var(--text);
    padding: 20px 0;
}

.policy-section {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

    .policy-section h1 {
        font-size: 1.4rem;
        color: var(--accent);
        margin-bottom: 15px;
        font-weight: 700;
        border-bottom: 1px solid var(--border);
        padding-bottom: 8px;
    }

    .policy-section p, .policy-section li {
        color: var(--text-muted);
        line-height: 1.7;
        margin-bottom: 12px;
    }

.policy-highlight {
    color: var(--accent);
    font-weight: 700;
}

.delete-account-box {
    background: rgba(255, 59, 48, 0.08);
    border: 1px dashed #ff3b30;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.step-badge {
    background: var(--gradient);
    color: #000;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 800;
    margin-right: 8px;
}

[lang="km"] .policy-content-wrapper {
    font-family: 'Kantumruy Pro', sans-serif;
    font-size: 15px;
}

.modern-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000; 
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

    .modern-modal.active {
        visibility: visible;
        opacity: 1;
    }

.modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px); 
}

.modal-container {
    position: relative;
    width: 95%;
    max-width: 850px;
    background: var(--card); 
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 2001;
}

.modern-modal.active .modal-container {
    transform: translateY(0) scale(1);
}


.modal-border-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
}

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

.header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-icon {
    font-size: 1.5rem;
    padding: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

    .modal-close-btn:hover {
        color: var(--accent);
    }

.modal-body {
    padding: 25px;
    max-height: 65vh;
    overflow-y: auto;
    color: var(--text);
}


.custom-scroll::-webkit-scrollbar {
    width: 6px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

    .custom-scroll::-webkit-scrollbar-thumb:hover {
        background: var(--accent);
    }
.modal-footer {
    padding: 15px 25px;
    background: rgba(0, 0, 0, 0.05);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.footer-btn {
    padding: 10px 25px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.btn-close {
    background: var(--card);
    color: var(--text);
}

    .btn-close:hover {
        background: var(--gradient);
        color: #000;
        border-color: transparent;
        transform: translateY(-2px);
    }
.modal-body .content {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}
.footer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center; 
    padding: 0 25px; 
    height: 40px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid var(--border);
    line-height: 1; 
    outline: none;
}

.btn-close span {
    display: block;
    margin: 0;
    padding: 0;
}
/* Device Management Specific Styles */
.security-alert { position: relative; overflow: hidden; background: linear-gradient(135deg, rgba(120, 13, 28, 0.92), rgba(57, 8, 16, 0.96)); border: 1px solid rgba(255, 99, 132, 0.55); border-radius: 16px; padding: 18px 18px 18px 22px; margin-bottom: 18px; display: none; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; box-shadow: 0 14px 34px rgba(138, 14, 37, 0.32); }
.security-alert::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: linear-gradient(180deg, #ff8a8a, #ff3b57); }
.security-alert::after { content: ""; position: absolute; inset: -40% -10% auto auto; width: 220px; height: 220px; background: radial-gradient(circle, rgba(255, 110, 110, 0.18), transparent 65%); pointer-events: none; }
.alert-text-group { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 250px; }
.alert-icon { font-size: 30px; color: #ffd15c; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2)); }
.alert-btns { display: flex; gap: 10px; align-items: center; }
.security-alert-title { color: #fff3f5; margin: 0 0 4px 0; font-weight: 800; letter-spacing: 0.01em; }
.security-alert-desc { margin: 0; font-size: 13px; color: rgba(255, 240, 242, 0.84); }
.security-alert-btn-primary { margin: 0; background: #fff; color: #7d1226; border-radius: 10px; font-weight: 700; }
.security-alert-btn-secondary { margin: 0; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 240, 242, 0.25); color: #fff3f5; border-radius: 10px; }
.device-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 14px; border: 1px solid transparent; border-bottom: 1px solid var(--border); border-radius: 14px; flex-wrap: wrap; gap: 10px; cursor: pointer; transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease; }
.device-row:last-child { border-bottom: none; }
.device-row:hover { background: rgba(255, 255, 255, 0.03); border-color: rgba(255, 255, 255, 0.08); transform: translateY(-1px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12); }
[data-theme="light"] .device-row:hover { background: rgba(0, 102, 255, 0.03); border-color: rgba(0, 102, 255, 0.1); box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08); }
.device-empty-state { text-align: center; padding: 28px 16px; border: 1px dashed var(--border); border-radius: 14px; background: rgba(255,255,255,0.02); }
.device-empty-icon { font-size: 34px; margin-bottom: 10px; color: var(--text-muted); }
.device-empty-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.device-empty-text { font-size: 13px; color: var(--text-muted); max-width: 360px; margin: 0 auto; }
.device-info { display: flex; align-items: center; gap: 15px; flex: 1; min-width: 240px; }
.device-icon { font-size: 28px; color: var(--text-muted); }
.device-icon.current { color: var(--green); }
.device-details h4 { margin: 0 0 4px 0; font-size: 15px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.device-details p { margin: 2px 0; font-size: 12px; color: var(--text-muted); }
.device-meta-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.device-tap-hint { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; font-size: 11px; color: var(--hint-text); font-weight: 700; letter-spacing: 0.01em; background: var(--hint-bg); border: 1px solid var(--hint-border); line-height: 1; white-space: nowrap; }
.tag-current { font-size: 10px; background: var(--green); color: #000; padding: 2px 8px; border-radius: 12px; font-weight: bold; text-transform: uppercase; }
.kick-btn { background: transparent; border: 1px solid var(--border); color: var(--danger); padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; transition: 0.3s; }
.kick-btn:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.device-detail-hero { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); margin-bottom: 16px; }
.device-detail-icon { width: 56px; height: 56px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 28px; background: rgba(0, 224, 255, 0.12); border: 1px solid rgba(0, 224, 255, 0.18); }
.device-detail-headings h3 { margin: 0 0 4px 0; color: var(--text); font-size: 18px; }
.device-detail-headings p { margin: 0; color: var(--text-muted); font-size: 13px; }
.device-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.device-detail-item { padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); }
.device-detail-label { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.device-detail-item strong { color: var(--text); font-size: 14px; word-break: break-word; }
@media (max-width: 767px) {
    .device-detail-grid { grid-template-columns: 1fr; }
    .security-alert { padding-right: 16px; }
}
