/* ═══ TastyPack Data Center v2.0 ═══ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #f5f6fa;
    color: #333;
    min-height: 100vh;
}

.layout {
    display: flex;
    min-height: 100vh;
}

/* ═══ Sidebar ═══ */
.sidebar {
    width: 220px;
    background: #fff;
    border-right: 1px solid #eee;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0, 0, 0, .03);
}

.sidebar-logo {
    padding: 24px 20px 20px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-logo .logo-icon {
    font-size: 42px;
    margin-bottom: 4px;
}

.sidebar-logo .logo-text {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: .5px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    border-left: 3px solid transparent;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: #f8f5ff;
    color: #6C5CE7;
}

.nav-item.active {
    background: #f3f0ff;
    color: #6C5CE7;
    font-weight: 600;
    border-left-color: #6C5CE7;
}

.nav-item .nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.nav-item .nav-badge {
    margin-left: auto;
    background: #ff4757;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.nav-item .nav-badge.green {
    background: #00b894;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    font-size: 11px;
    color: #bbb;
    text-align: center;
}

/* ═══ Main ═══ */
.main {
    margin-left: 220px;
    flex: 1;
    min-height: 100vh;
}

/* ═══ Topbar ═══ */
.topbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background: #fff;
    padding: 0 28px;
    height: 56px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.online-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8f5e9;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #2e7d32;
}

.online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00b894;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: .3
    }
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}

.topbar-user .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6C5CE7, #a29bfe);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.btn-logout-sm {
    color: #ff6b6b;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border: 1px solid rgba(255, 107, 107, .3);
    border-radius: 5px;
    transition: all .15s;
}

.btn-logout-sm:hover {
    background: rgba(255, 107, 107, .1);
}

/* ═══ Page ═══ */
.page-content {
    padding: 24px 28px;
}

.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.page-header p {
    font-size: 13px;
    color: #888;
}

/* ═══ Stats ═══ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 14px;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon.blue {
    background: #e8f0fe;
    color: #1a73e8;
}

.stat-icon.green {
    background: #e8f5e9;
    color: #2e7d32;
}

.stat-icon.orange {
    background: #fff3e0;
    color: #ef6c00;
}

.stat-icon.red {
    background: #ffebee;
    color: #c62828;
}

.stat-info .stat-num {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
}

.stat-info .stat-label {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

/* ═══ Toolbar ═══ */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.toolbar-left {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.toolbar-right {
    display: flex;
    gap: 8px;
}

.select {
    padding: 8px 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
}

.select:focus {
    border-color: #6C5CE7;
    outline: none;
}

.search-input {
    padding: 8px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    width: 220px;
    font-family: inherit;
}

.search-input:focus {
    border-color: #6C5CE7;
    outline: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    background: #fff;
    color: #333;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: all .15s;
}

.btn:hover {
    border-color: #6C5CE7;
    color: #6C5CE7;
}

.btn-primary {
    background: #6C5CE7;
    color: #fff;
    border-color: #6C5CE7;
}

.btn-primary:hover {
    background: #5b4bd5;
    border-color: #5b4bd5;
    color: #fff;
}

.btn-alt {
    border-color: #6C5CE7;
    color: #6C5CE7;
}

/* ═══ Table ═══ */
.table-wrap {
    background: #fff;
    border-radius: 12px;
    overflow-x: auto;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
    border: 1px solid #eee;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

thead th {
    background: #f8f9fa;
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .5px;
    text-align: left;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

tbody td {
    padding: 11px 14px;
    font-size: 13px;
    color: #444;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: top;
    word-break: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
}

tbody tr:hover td {
    background: #fafbff;
}

.no-data {
    text-align: center !important;
    color: #bbb !important;
    padding: 48px !important;
}

.addr {
    max-width: 160px;
    font-size: 12px;
    color: #888;
}

tbody td div {
    margin-bottom: 2px;
}

/* ═══ Status ═══ */
.status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    text-decoration: none;
}

.status--draft {
    background: #E3F2FD;
    color: #1565C0;
}

.status--pending {
    background: #FFF8E1;
    color: #F57F17;
}

.status--completed {
    background: #E8F5E9;
    color: #2E7D32;
}

/* ═══ Pagination ═══ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    font-size: 13px;
    color: #888;
}

/* ═══ Delete ═══ */
.btn-del {
    opacity: .3;
    text-decoration: none;
    font-size: 14px;
    transition: all .15s;
}

.btn-del:hover {
    opacity: 1;
}

/* ═══ Settings ═══ */
.s-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 18px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
    border: 1px solid #eee;
}

.s-section h2 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.s-hint {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
    line-height: 1.6;
}

.panel-url-box {
    background: #f8f9fa;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.panel-url-label {
    font-size: 13px;
    color: #666;
    font-weight: 600;
    white-space: nowrap;
    min-width: 85px;
}

.panel-url-value {
    font-size: 14px;
    color: #6C5CE7;
    font-weight: 600;
    word-break: break-all;
    flex: 1;
}

.copy-btn {
    background: #6C5CE7;
    color: #fff;
    border: none;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
}

.copy-btn:hover {
    background: #5b4bd5;
}

.copy-btn.copied {
    background: #00b894;
}

.bind-form {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 14px;
}

.bind-label {
    background: #f0f0f0;
    padding: 10px 14px;
    border: 1.5px solid #ddd;
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

.bind-input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #ddd;
    border-radius: 0;
    font-size: 13px;
    font-family: inherit;
    outline: none;
}

.bind-input:focus {
    border-color: #6C5CE7;
}

.bind-submit {
    background: #6C5CE7;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.bound-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.bound-header h3 {
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bound-count {
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}

.bound-refresh {
    margin-left: auto;
    cursor: pointer;
    font-size: 16px;
    color: #888;
    transition: transform .3s;
}

.bound-refresh:hover {
    transform: rotate(180deg);
    color: #333;
}

.bound-item {
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bound-domain {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.bound-status {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
}

.bound-dates {
    font-size: 11px;
    color: #999;
    margin-top: 3px;
}

.bound-delete {
    margin-left: auto;
    color: #ff6b6b;
    font-size: 16px;
    cursor: pointer;
    border: none;
    background: transparent;
}

.bound-note {
    font-size: 12px;
    color: #888;
    margin-top: 10px;
    line-height: 1.5;
}

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

.pwd-input {
    padding: 10px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    width: 260px;
    font-family: inherit;
    outline: none;
}

.pwd-input:focus {
    border-color: #6C5CE7;
}

.pwd-btn {
    background: #6C5CE7;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.settings-msg {
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 18px;
    font-weight: 500;
}

.settings-msg--success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.settings-msg--error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.settings-msg--warning {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

/* ═══ Live Cards ═══ */
.live-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
    border: 1px solid #eee;
    border-left: 4px solid #00b894;
}

.live-card.off {
    border-left-color: #ddd;
    opacity: .5;
}

.live-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.live-dot-big {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #00b894;
    box-shadow: 0 0 6px #00b894;
    display: inline-block;
}

.live-uid {
    font-family: monospace;
    font-size: 12px;
    color: #888;
}

.card-badge {
    background: #2d8cf0;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.live-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 6px;
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.live-meta strong {
    color: #444;
}

.live-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.live-actions button,
.live-actions .live-btn {
    padding: 5px 12px;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #fff;
}

.btn-finish {
    background: #00b894;
}

.btn-finish:hover {
    background: #00a381;
}

.btn-3ds {
    background: #6c5ce7;
}

.btn-3ds:hover {
    background: #5b4bd5;
}

.btn-reject {
    background: #ff7675;
}

.btn-reject:hover {
    background: #e66767;
}

.btn-refresh-page {
    background: #0984e3;
}

.btn-refresh-page:hover {
    background: #0873c9;
}

/* ═══ Coming Soon ═══ */
.coming-soon {
    background: #fff;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
    border: 1px solid #eee;
}

.coming-soon .cs-icon {
    font-size: 52px;
    margin-bottom: 16px;
}

.coming-soon h2 {
    font-size: 18px;
    color: #333;
    margin-bottom: 8px;
}

.coming-soon p {
    font-size: 13px;
    color: #999;
}

/* ═══ Login ═══ */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
}

.login-card {
    background: rgba(255, 255, 255, .97);
    padding: 40px;
    border-radius: 20px;
    width: 380px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
}

.login-logo {
    font-size: 48px;
    margin-bottom: 12px;
}

.login-card h1 {
    font-size: 20px;
    margin-bottom: 6px;
    color: #1a1a2e;
}

.login-sub {
    color: #888;
    font-size: 13px;
    margin-bottom: 24px;
}

.login-error {
    background: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

.login-card input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 12px;
    font-family: inherit;
}

.login-card input:focus {
    border-color: #6C5CE7;
    outline: none;
}

.login-card button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #6C5CE7, #a29bfe);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: transform .1s, box-shadow .2s;
}

.login-card button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, .3);
}

/* ═══ Responsive ═══ */
@media(max-width:768px) {
    .sidebar {
        width: 60px;
    }

    .sidebar .nav-label,
    .sidebar-logo .logo-text,
    .sidebar-footer,
    .nav-badge {
        display: none;
    }

    .sidebar-logo {
        padding: 16px 8px 12px;
    }

    .nav-item {
        padding: 12px 18px;
        justify-content: center;
    }

    .main {
        margin-left: 60px;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .table-wrap {
        overflow-x: auto;
    }

    table {
        min-width: 900px;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-left {
        flex-direction: column;
    }

    .search-input {
        width: 100% !important;
    }
}

@keyframes flash {
    0% {
        background: #e8f5e9;
        transform: scale(1.002)
    }

    100% {
        background: transparent;
        transform: scale(1)
    }
}

/* ═══ Role Badges ═══ */
.role-badge {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
}

.perm-badge {
    display: inline-block;
    background: #e3f2fd;
    color: #1565c0;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
}

/* ═══ Modal ═══ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(3px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-card {
    background: #fff;
    border-radius: 16px;
    width: 440px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
    overflow: hidden;
    animation: modalIn .2s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(.96)
    }

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    font-size: 16px;
    color: #1a1a2e;
}

.modal-close {
    font-size: 18px;
    color: #999;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all .15s;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 20px 24px;
}

.modal-footer {
    padding: 14px 24px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    background: #fafafa;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color .15s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #6C5CE7;
}

/* ── Toggle Switch ── */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.toggle-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.toggle-icon {
    font-size: 22px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(108, 92, 231, 0.08);
    border-radius: 10px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 30px;
    border-radius: 15px;
    cursor: pointer;
    transition: background .3s;
    text-decoration: none;
}

.toggle-on {
    background: #6C5CE7;
}

.toggle-off {
    background: #ccc;
}

.toggle-knob {
    position: absolute;
    top: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
    transition: left .3s;
}

.toggle-on .toggle-knob {
    left: 27px;
}

.toggle-off .toggle-knob {
    left: 3px;
}