/*
 * app.css — Combined application styles
 * All on-page CSS extracted from view files.
 * Edit this single file to manage all styles.
 */

/* ===== SOURCE: layout/head.php ===== */
:root {
    --bg: #07071a;
    --surface: #0d0d24;
    --surface-2: #111128;
    --border: rgba(120, 100, 255, .1);
    --text: #e2e8f0;
    --muted: #8ea0bf;
    --accent: #6366f1;
    --primary-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

html,
body {
    height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: hidden;
    max-width: 100%;
}

#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.app-shell {
    position: relative;
    display: flex;
    height: 100vh;
    overflow: hidden;
    overflow-x: clip;
    max-width: 100%;
    width: 100%;
    min-width: 0;
}

.sidebar {
    width: 258px;
    flex-shrink: 0;
    background: rgba(7, 5, 20, .92);
    backdrop-filter: blur(24px);
    border-right: 1px solid rgba(99, 102, 241, .12);
    display: flex;
    flex-direction: column;
    z-index: 10;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width .25s ease;
}

/* ── Sidebar brand wrap + toggle button ── */
.sidebar-brand-wrap {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: relative;
    padding: 20px 8px 18px 18px;
}

.sidebar-brand-wrap .sidebar-brand {
    flex: 1;
    border-bottom: none;
    padding-right: 8px;
}

.sidebar-toggle-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, .22);
    background: rgb(99 102 241);
    color: #a5b4fc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-right: 14px;
    transition: background .18s, color .18s, border-color .18s;
    padding: 10px;
}

.sidebar-toggle-btn:hover {
    background: rgba(99, 102, 241, .22);
    color: #e0e7ff;
    border-color: rgba(99, 102, 241, .4);
}

/* ── Collapsed state ── */
.sidebar.sidebar-collapsed {
    width: 68px;
}

.sidebar.sidebar-collapsed .sidebar-brand-text,
.sidebar.sidebar-collapsed .pro-badge,
.sidebar.sidebar-collapsed .nav-section-label,
.sidebar.sidebar-collapsed .sidebar-upgrade,
.sidebar.sidebar-collapsed .sidebar-profile-info,
.sidebar.sidebar-collapsed .nav-badge {
    display: none;
}

.sidebar.sidebar-collapsed .sidebar-brand-wrap .sidebar-brand {
    padding-right: 0;
    flex: 0 0 auto;
}

.sidebar.sidebar-collapsed .sidebar-toggle-btn {
    margin-left: auto;
    margin-right: 8px;
}

.sidebar.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 9px 6px;
    position: relative;
}

.sidebar.sidebar-collapsed .nav-item>span:not(.nav-icon-box):not(.nav-mod-icon) {
    display: none;
}

.sidebar.sidebar-collapsed .sidebar-profile {
    justify-content: center;
    padding: 10px 6px;
}

.sidebar.sidebar-collapsed .sidebar-profile-dots {
    display: none;
}

.sidebar-collapsed-tooltip {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate3d(0, 0, 0);
    display: inline-flex;
    align-items: center;
    max-width: 220px;
    padding: 8px 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(15, 23, 42, .98), rgba(30, 41, 59, .98));
    color: #f8fafc;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: .01em;
    white-space: nowrap;
    box-shadow: 0 14px 30px rgba(2, 6, 23, .32);
    border: 1px solid rgba(148, 163, 184, .2);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    z-index: 10020;
    transition: opacity .16s ease, visibility .16s ease, transform .16s ease;
}

.sidebar-collapsed-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
}

.sidebar-collapsed-tooltip::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -6px;
    width: 12px;
    height: 12px;
    background: rgba(19, 29, 47, .98);
    border-left: 1px solid rgba(148, 163, 184, .2);
    border-bottom: 1px solid rgba(148, 163, 184, .2);
    transform: translateY(-50%) rotate(45deg);
    border-bottom-left-radius: 3px;
}

@media (max-width: 576px) {
    .sidebar-collapsed-tooltip {
        max-width: min(220px, calc(100vw - 92px));
        padding: 7px 10px;
        font-size: .74rem;
        white-space: normal;
        word-break: break-word;
    }
}

/* Chrome, Edge, Safari */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #8b5cf6 #0f172a;
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, .18);
    border-radius: 999px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.sidebar-brand--gemini {
    gap: 0;
}

.sidebar-brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f3f3f7, #9f7eeb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.15rem;
    box-shadow: 1px 5px 24px rgba(99, 102, 241, .35);
}

.sidebar-brand-copy {
    min-width: 0;
}

.sidebar-brand-copy--gemini {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
    min-width: 0;
}

.sidebar-brand-wordmark {
    display: block;
    width: 150px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 20px rgba(62, 147, 238, .18));
}

.sidebar-brand-copy--gemini .pro-badge {
    margin-left: 0;
}

.sidebar-brand-text {
    font-size: .96rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text);
}

.sidebar-brand-text span {
    color: #a5b4fc;
}

.sidebar-user-card-wrap {
    padding: 14px;
    border-bottom: 1px solid rgba(99, 102, 241, .08);
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(99, 102, 241, .08), rgba(99, 102, 241, .04));
    border: 1px solid rgba(99, 102, 241, .16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .02);
}

.sidebar-user-avatar,
.sidebar-user-avatar-image {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sidebar-user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #334155, #475569);
    color: #fff;
    font-size: .95rem;
    font-weight: 800;
    border: 2px solid rgba(148, 163, 184, .18);
}

.sidebar-user-avatar.is-admin {
    background: var(--primary-gradient);
    border-color: rgba(99, 102, 241, .35);
    box-shadow: 0 0 18px rgba(99, 102, 241, .24);
}

.sidebar-user-avatar-image {
    object-fit: cover;
    border: 2px solid rgba(99, 102, 241, .3);
}

.sidebar-user-meta {
    min-width: 0;
    flex: 1;
}

.sidebar-user-name {
    font-size: .9rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: .72rem;
    color: #a5b4fc;
    margin-top: 2px;
}

.sidebar-user-badge {
    display: inline-flex;
    align-items: center;
    margin-top: 7px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: .56rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
    background: var(--primary-gradient);
    box-shadow: 0 8px 18px rgba(99, 102, 241, .25);
}

.sidebar-nav {
    padding: 10px 12px 14px;
    flex: 1;
}

.nav-section-label {
    font-size: .58rem;
    font-weight: 700;
    color: rgba(140, 120, 240, .85);
    text-transform: uppercase;
    letter-spacing: .12em;
    padding: 8px 10px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    color: #a8b5c8;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all .18s ease;
    margin-bottom: 4px;
    border: 1px solid transparent;
}

.nav-item:hover {
    color: #c7d2fe;
    background: rgba(99, 102, 241, .1);
    border-color: rgba(99, 102, 241, .15);
}

.nav-item.active {
    color: #e0e7ff;
    background: linear-gradient(135deg, rgba(99, 102, 241, .2), rgba(139, 92, 246, .15));
    border-color: rgba(99, 102, 241, .3);
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(99, 102, 241, .1);
}

.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

.topbar {
    background: rgba(7, 7, 26, .85);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(99, 102, 241, .1);
    padding: 0 24px;
    height: 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.topbar-dashboard {
    justify-content: space-between;
    height: auto;
    min-height: 74px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.dashboard-topbar-welcome {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.dashboard-topbar-title {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.dashboard-wave {
    font-size: .96em;
}

.dashboard-topbar-subtitle {
    font-size: .9rem;
    color: var(--muted);
    margin-top: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-container>div:first-child {
    display: none;
}

.topbar-module-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(99, 102, 241, .15);
    border: 1px solid rgba(99, 102, 241, .25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.topbar-module-name {
    font-size: .92rem;
    font-weight: 700;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    flex-shrink: 1;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.profile-wrap {
    position: relative;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 10px 4px 6px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(99, 102, 241, .14);
    border-radius: 12px;
    color: inherit;
    cursor: pointer;
    transition: all .18s ease;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    outline: none;
}

.topbar-user:hover,
.topbar-user[aria-expanded="true"] {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(99, 102, 241, .24);
}

.topbar-avatar,
.profile-dropdown-avatar {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .82rem;
    font-weight: 800;
}

.topbar-avatar img,
.profile-dropdown-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.topbar-user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    line-height: 1.1;
}

.topbar-username {
    font-size: .78rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.topbar-userrole {
    font-size: .65rem;
    color: #a5b4fc;
    margin-top: 2px;
}

.profile-chevron {
    font-size: .86rem;
    color: #94a3b8;
    transition: transform .18s ease;
}

.topbar-user[aria-expanded="true"] .profile-chevron {
    transform: rotate(180deg);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 290px;
    background: rgba(8, 8, 24, .98);
    border: 1px solid rgba(99, 102, 241, .18);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 22px 60px rgba(0, 0, 0, .48);
    backdrop-filter: blur(26px);
    z-index: 40;
}

.profile-dropdown-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid rgba(99, 102, 241, .12);
    background: linear-gradient(180deg, rgba(99, 102, 241, .09), rgba(255, 255, 255, .01));
}

.profile-dropdown-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
}

.profile-dropdown-copy {
    min-width: 0;
    flex: 1;
}

.profile-dropdown-name {
    font-size: .92rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-dropdown-role {
    font-size: .72rem;
    color: #a5b4fc;
    margin-top: 3px;
}

.profile-dropdown-body {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(99, 102, 241, .08);
}

.profile-dropdown-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    font-size: .76rem;
    color: #94a3b8;
}

.profile-dropdown-row strong {
    color: var(--text);
    font-size: .76rem;
    font-weight: 700;
}

.profile-dropdown-actions {
    padding: 10px;
}

.profile-dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: .8rem;
    font-weight: 600;
    transition: all .18s ease;
}

.profile-dropdown-link:hover {
    background: rgba(99, 102, 241, .1);
    color: #fff;
}

.profile-dropdown-link.danger:hover {
    background: rgba(239, 68, 68, .1);
    color: #fda4af;
}

.profile-dropdown-button {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
}

.profile-modal-content {
    background: rgba(8, 8, 24, .98);
    border: 1px solid rgba(99, 102, 241, .22);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0, 0, 0, .8);
}

.profile-modal-header {
    padding: 18px 22px 14px;
    border-bottom: 1px solid rgba(99, 102, 241, .1);
}

.profile-modal-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(99, 102, 241, .12);
    border: 1px solid rgba(99, 102, 241, .25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a5b4fc;
    font-size: 1.1rem;
}

.profile-modal-title {
    font-size: .9rem;
    font-weight: 800;
    color: #e2e8f0;
}

.profile-modal-subtitle {
    font-size: .7rem;
    color: #64748b;
    margin-top: 1px;
}

.pdp-label {
    font-size: .7rem;
    font-weight: 700;
    color: #8899b4;
    text-transform: uppercase;
    letter-spacing: .05em;
    display: block;
    margin-bottom: 6px;
}

.pdp-label-muted {
    font-size: .62rem;
    font-weight: 400;
    text-transform: none;
    color: #475569;
}

.pdp-input {
    width: 100%;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(99, 102, 241, .15);
    border-radius: 7px;
    color: #e2e8f0;
    font-size: .8rem;
    padding: 8px 10px;
    outline: none;
    transition: border-color .15s;
    font-family: inherit;
}

.pdp-input:focus {
    border-color: rgba(99, 102, 241, .45);
}

.pdp-input::placeholder {
    color: #475569;
}

.pdp-input[readonly] {
    opacity: .45;
    cursor: not-allowed;
}

.qa-btn-cancel {
    background: transparent;
    border: 1px solid rgba(99, 102, 241, .14);
    color: #cbd5e1;
    border-radius: 8px;
    padding: 8px 16px;
}

.qa-btn-cancel:hover {
    background: rgba(99, 102, 241, .08);
    color: #fff;
}

.pdp-save-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border-radius: 8px;
    border: none;
    font-size: .82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pdp-avatar-preview {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    overflow: hidden;
    border: 3px solid rgba(99, 102, 241, .3);
}

.pdp-avatar-camera {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #6366f1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2.5px solid rgba(13, 13, 36, 1);
    color: #fff;
    font-size: .7rem;
}

@keyframes pdpSpin {
    to {
        transform: rotate(360deg);
    }
}

.pdp-crop-shell {
    padding: 10px 10px 2px;
}

.pdp-crop-stage {
    position: relative;
    width: min(100%, 320px);
    aspect-ratio: 1;
    margin: 0 auto;
    border-radius: 22px;
    overflow: hidden;
    background:
        linear-gradient(45deg, rgba(99, 102, 241, .08) 25%, transparent 25%, transparent 75%, rgba(99, 102, 241, .08) 75%),
        linear-gradient(45deg, rgba(99, 102, 241, .08) 25%, transparent 25%, transparent 75%, rgba(99, 102, 241, .08) 75%),
        linear-gradient(135deg, rgba(8, 8, 24, .98), rgba(14, 14, 36, .98));
    background-size: 24px 24px, 24px 24px, cover;
    background-position: 0 0, 12px 12px, center;
    border: 1px solid rgba(99, 102, 241, .22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03);
    touch-action: none;
    user-select: none;
    cursor: grab;
}

.pdp-crop-stage.is-dragging {
    cursor: grabbing;
}

.pdp-crop-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center center;
    will-change: transform;
    max-width: none;
    max-height: none;
    pointer-events: none;
}

.pdp-crop-overlay {
    position: absolute;
    inset: 0;
    border-radius: 22px;
    box-shadow: inset 0 0 0 2px rgba(226, 232, 240, .08), inset 0 0 0 999px rgba(5, 8, 22, .18);
    pointer-events: none;
}

.pdp-crop-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .12) 1px, transparent 1px);
    background-size: 33.333% 33.333%;
    opacity: .45;
}

.pdp-crop-controls {
    margin-top: 16px;
    display: grid;
    gap: 12px;
}

.pdp-crop-range {
    width: 100%;
    accent-color: #7c82ff;
}

.pdp-crop-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .74rem;
    color: #94a3b8;
    background: rgba(99, 102, 241, .08);
    border: 1px solid rgba(99, 102, 241, .14);
    border-radius: 12px;
    padding: 10px 12px;
}

.page-content {
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 24px 24px 0;
    min-width: 0;
    max-width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.page-content::-webkit-scrollbar {
    display: none;
}

@media (max-width: 1440px) {


    .storage-badge {
        display: none;
    }

    .topbar {
        flex-wrap: wrap;
        height: auto;
        min-height: 58px;
        row-gap: 10px;
    }

    .topbar-left {
        flex: 1 1 240px;
        min-width: 0;
    }

    .topbar-right {
        flex: 1 1 300px;
        min-width: 0;
        max-width: 100%;
    }

    .topbar.topbar-dashboard {
        min-height: 74px;
    }

    .topbar-search {
        width: auto;
        flex: 1 1 140px;
        max-width: 200px;
        min-width: 0;
    }

    .search-kbd {
        display: none;
    }
}

@media (max-width: 992px) {
    body {
        overflow-y: auto;
    }

    .app-shell {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow-x: hidden;
    }

    .sidebar {
        width: 100%;
        max-width: 300px;
        border-right: 0;
        border-bottom: 1px solid rgba(99, 102, 241, .12);
        overflow: visible;
        position: fixed;
        top: 0;
        bottom: 0;
    }

    .sidebar.sidebar-collapsed {
        width: 68px;
    }

    .sidebar-collapsed-tooltip {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 99999;
        padding: 10px 14px;
        border-radius: 10px;
        background: #111827;
        color: #fff;
        font-size: 14px;
        font-weight: 500;
        line-height: 1;
        pointer-events: none;
        opacity: 0;
        visibility: hidden;
        transform: translateX(10px);
        transition: all .25s ease;
        white-space: nowrap;
        box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    }

    .sidebar-collapsed-tooltip.is-visible {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }


    .content-area {
        width: 100%;
        max-width: 100%;
        overflow: visible;
        padding-left: 60px;
    }

    .page-content {
        overflow-x: hidden;
        overflow-y: visible;
    }

    .topbar {
        flex-wrap: wrap;
        height: auto;
        min-height: 58px;
        padding: 10px 16px;
        row-gap: 10px;
    }

    .topbar-left {
        flex: 1 1 200px;
        min-width: 0;
    }

    .topbar-right {
        flex: 1 1 280px;
        width: 100%;
        justify-content: flex-start;
    }

    .search-kbd {
        display: none;
    }

    .topbar-search {
        width: min(180px, 100%);
        flex: 1 1 140px;
    }
}

@media (max-width: 920px) {
    .topbar-dashboard {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .topbar-user-meta {
        display: none;
    }

    .dashboard-topbar-subtitle {
        white-space: normal;
    }

    .page-content {
        padding: 18px;
    }
}

@media (max-width: 768px) {
    #topbarCreditsText {
        display: none;
    }

    .credits-badge {
        padding: 7px 10px;
    }

    .topbar-search {
        flex: 1 1 100%;
        width: 100%;
        max-width: none;
    }

    .topbar-right {
        gap: 8px;
    }

    .pl-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 640px) {
    body {
        overflow-y: auto;
    }

    .topbar {
        padding: 12px 14px;
    }

    .topbar-module-name {
        font-size: .84rem;
    }

    .profile-dropdown {
        width: min(290px, calc(100vw - 28px));
        right: -6px;
    }
}

/* ===== SIDEBAR USER CARD ===== */
.sidebar-user-card-wrap {
    margin: 14px 12px 6px;
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(99, 102, 241, .07);
    border: 1px solid rgba(99, 102, 241, .14);
}

.sidebar-user-avatar-image {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-user-avatar.is-admin {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.sidebar-user-meta {
    min-width: 0;
    flex: 1;
}

.sidebar-user-name {
    font-size: .84rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: .65rem;
    color: #a5b4fc;
    margin-top: 2px;
    text-transform: capitalize;
}

.sidebar-user-badge {
    display: inline-block;
    font-size: .55rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(245, 158, 11, .18);
    color: #fcd34d;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* ===== SIDEBAR SCROLL & MODULE MENU ===== */
.menu-btn {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
}

.sidebar-collapsed .sidebar-brand-wrap .sidebar-brand {
    display: none;
}

.menu-btn span {
    width: 100%;
    height: 3px;
    background: #fff;
    border-radius: 10px;
    transition: 0.3s ease;
}

/* Close Animation */
.menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4.5px, -4.5px);
}

.sidebar-nav {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, .22) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 3px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, .3);
    border-radius: 4px;
}

.nav-module-icon {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    font-size: .56rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    background: rgba(99, 102, 241, .15);
    color: #a5b4fc;
    letter-spacing: .03em;
    white-space: nowrap;
}

.nav-badge-new {
    background: rgba(16, 185, 129, .18) !important;
    color: #6ee7b7 !important;
}

.sidebar-upgrade {
    margin: 0 12px 8px;
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, .15), rgba(139, 92, 246, .1));
    border: 1px solid rgba(99, 102, 241, .25);
    text-align: center;
}

.sidebar-upgrade-icon {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.sidebar-upgrade-title {
    font-size: .8rem;
    font-weight: 800;
    color: #e0e7ff;
    margin-bottom: 3px;
}

.sidebar-upgrade-desc {
    font-size: .67rem;
    color: #a5b4fc;
    margin-bottom: 10px;
    line-height: 1.4;
}

.sidebar-upgrade-btn {
    display: block;
    padding: 7px 12px;
    background: var(--primary-gradient);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: .73rem;
    font-weight: 700;
    transition: opacity .18s;
}

.sidebar-upgrade-btn:hover {
    opacity: .85;
    color: #fff;
}

/* ===== TOPBAR ADDITIONS ===== */
.topbar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, .07);
    border: 1px solid rgba(99, 102, 241, .18);
    border-radius: 9px;
    padding: 7px 13px;
    width: 220px;
}

.topbar-search input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: .79rem;
    min-width: 0;
}

.topbar-search input::placeholder {
    color: var(--muted);
}

.topbar-search i {
    color: var(--muted);
    font-size: .92rem;
    flex-shrink: 0;
}

.search-kbd {
    font-size: .62rem;
    padding: 2px 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    color: var(--muted);
    font-family: monospace;
    white-space: nowrap;
    flex-shrink: 0;
}

.credits-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 9px;
    background: rgba(16, 185, 129, .1);
    border: 1px solid rgba(16, 185, 129, .25);
    font-size: .73rem;
    font-weight: 700;
    color: #6ee7b7;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
}

.credits-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    animation: blink 2s infinite;
}

.storage-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 9px;
    background: rgba(56, 189, 248, .1);
    border: 1px solid rgba(56, 189, 248, .24);
    font-size: .73rem;
    font-weight: 700;
    color: #7dd3fc;
    white-space: nowrap;
    cursor: help;
    position: relative;
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
}

.storage-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #38bdf8;
    animation: blink 2s infinite;
}

.storage-badge[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 260px;
    max-width: min(260px, 70vw);
    padding: 9px 11px;
    border-radius: 10px;
    background: rgba(8, 8, 24, .98);
    border: 1px solid rgba(99, 102, 241, .2);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .38);
    color: #dbe4ff;
    font-size: .7rem;
    font-weight: 600;
    line-height: 1.45;
    white-space: normal;
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .16s ease, transform .16s ease;
    z-index: 60;
}

.storage-badge[data-tip]::before {
    content: '';
    position: absolute;
    top: calc(100% + 4px);
    right: 18px;
    width: 10px;
    height: 10px;
    background: rgba(8, 8, 24, .98);
    border-left: 1px solid rgba(99, 102, 241, .2);
    border-top: 1px solid rgba(99, 102, 241, .2);
    transform: rotate(45deg) translateY(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease;
    z-index: 59;
}

.storage-badge[data-tip]:hover::after,
.storage-badge[data-tip]:hover::before {
    opacity: 1;
    transform: translateY(0);
}

@keyframes blink {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: .3
    }
}

.topbar-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(99, 102, 241, .07);
    border: 1px solid rgba(99, 102, 241, .14);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 1.05rem;
    cursor: pointer;
    position: relative;
    transition: all .18s;
    flex-shrink: 0;
}

.topbar-icon-btn:hover {
    background: rgba(99, 102, 241, .15);
    color: var(--text);
}

.notif-dot {
    position: absolute;
    top: 6px;
    right: 7px;
    width: 6px;
    height: 6px;
    background: #f03f5e;
    border-radius: 50%;
    animation: blink 2s infinite;
}

/* ===== DASHBOARD STATS ===== */
.welcome-title {
    font-size: 1.18rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 3px;
}

.welcome-subtitle {
    font-size: .74rem;
    color: var(--muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
    max-width: 100%;
}

.stat-card {
    border-radius: 18px;
    padding: 20px;
    border: 1px solid rgba(99, 102, 241, .12);
    transition: transform .2s, box-shadow .2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
}

.stat-card-purple {
    background: linear-gradient(135deg, rgba(99, 102, 241, .14), rgba(139, 92, 246, .07), rgba(13, 13, 36, .6));
}

.stat-card-blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, .14), rgba(37, 99, 235, .07), rgba(13, 13, 36, .6));
}

.stat-card-green {
    background: linear-gradient(135deg, rgba(16, 185, 129, .14), rgba(5, 150, 105, .07), rgba(13, 13, 36, .6));
}

.stat-card-orange {
    background: linear-gradient(135deg, rgba(245, 158, 11, .14), rgba(217, 119, 6, .07), rgba(13, 13, 36, .6));
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin-bottom: 14px;
}

.stat-icon-purple {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
}

.stat-icon-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
}

.stat-icon-green {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}

.stat-icon-orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}

.stat-label {
    font-size: .67rem;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.stat-value {
    font-size: 1.55rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1;
}

.stat-trend {
    font-size: .7rem;
    color: #6ee7b7;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ===== DASHBOARD LAYOUT ===== */
.dash-main-grid {
    display: grid;
    grid-template-columns: 1fr 375px;
    gap: 20px;
    margin-bottom: 20px;
    max-width: 100%;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.module-card {
    border-radius: 16px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid rgba(99, 102, 241, .12);
    transition: all .2s;
    cursor: pointer;
    display: block;
    text-decoration: none;
}

.module-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, .3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}

.module-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 12px;
    transition: transform .2s;
}

.module-card:hover .module-card-icon {
    transform: scale(1.08);
}

.module-card-tag {
    display: inline-block;
    font-size: .59rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    margin-bottom: 8px;
    letter-spacing: .04em;
}

.module-card-new {
    display: inline-block;
    font-size: .56rem;
    background: rgba(16, 185, 129, .18);
    color: #6ee7b7;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
    font-weight: 700;
    vertical-align: middle;
}

.module-card-title {
    font-size: .88rem;
    font-weight: 800;
    color: #eef2ff;
    margin-bottom: 6px;
}

.module-card-desc {
    font-size: .72rem;
    color: var(--muted);
    line-height: 1.45;
    margin-bottom: 12px;
}

.module-card-btn {
    font-size: .73rem;
    font-weight: 700;
    color: #a5b4fc;
    display: flex;
    align-items: center;
    gap: 4px;
}

.section-card {
    background: var(--surface);
    border: 1px solid rgba(99, 102, 241, .12);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.section-card-last {
    margin-bottom: 0;
}

.section-card-title {
    font-size: .9rem;
    font-weight: 800;
    color: #eef2ff;
    margin-bottom: 16px;
}

/* ===== CONVERSATIONS TABLE ===== */
.conv-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    /* table-layout: fixed; */
}

.conv-table th {
    font-size: .63rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(99, 102, 241, .1);
}

.conv-table td {
    padding: 10px 10px;
    font-size: .98rem;
    color: var(--text);
    border-bottom: 1px solid rgba(99, 102, 241, .06);
    vertical-align: middle;
    min-width: 100px;
}

.conv-table tr:last-child td {
    border-bottom: none;
}

.conv-table tr:hover td {
    background: rgba(99, 102, 241, .04);
}

.conv-module-tag {
    display: inline-block;
    font-size: .71rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

/* ===== DONUT CHART ===== */
.donut-wrap {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: conic-gradient(#6366f1 0% 25%, #8b5cf6 25% 45%, #10b981 45% 65%, #f59e0b 65% 80%, #ec4899 80% 90%, #06b6d4 90% 100%);
    position: relative;
    margin: 0 auto 16px;
}

.donut-wrap::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--surface);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.donut-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    font-size: .68rem;
}

.donut-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
}

.donut-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ===== QUICK ACTIONS ===== */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.qa-btn {
    border-radius: 14px;
    padding: 16px 10px;
    text-align: center;
    border: 1px solid rgba(99, 102, 241, .12);
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    display: block;
    background: var(--surface);
}

.qa-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, .3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
}

.qa-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin: 0 auto 10px;
}

.qa-label {
    font-size: .7rem;
    font-weight: 700;
    color: var(--text);
}

/* ===== TIPS ===== */
.tip-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .18s;
    font-size: .77rem;
    color: var(--muted);
}

.tip-item:hover {
    background: rgba(99, 102, 241, .06);
    color: var(--text);
}

@media(max-width:992px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media(max-width:640px) {
    .quick-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
           REFERENCE DESIGN OVERRIDES
        ============================================================ */
.pro-badge {
    font-size: .62rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 5px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    letter-spacing: .05em;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-separator {
    height: 1px;
    background: rgba(99, 102, 241, .12);
    margin: 8px 14px;
}

.nav-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: all .18s;
}

.nib-purple {
    background: rgba(99, 102, 241, .18);
    border: 1px solid rgba(99, 102, 241, .25);
    color: #a5b4fc;
}

.nib-blue {
    background: rgba(59, 130, 246, .18);
    border: 1px solid rgba(59, 130, 246, .25);
    color: #60a5fa;
}

.nib-gray {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .09);
    color: #8ea0bf;
}

.nav-item.active .nib-gray,
.nav-item.active .nib-purple,
.nav-item.active .nib-blue {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    border: none !important;
    color: #fff !important;
}

.nav-mod-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    color: #fff;
    flex-shrink: 0;
}

.mod-blue {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.mod-purple {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.mod-green {
    background: linear-gradient(135deg, #059669, #10b981);
}

.mod-orange {
    background: linear-gradient(135deg, #ea580c, #f97316);
}

.mod-pink {
    background: linear-gradient(135deg, #db2777, #ec4899);
}

.mod-sky {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
}

.nav-item-chevron {
    margin-left: auto;
    font-size: .62rem;
    color: var(--muted);
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    border-top: 1px solid rgba(99, 102, 241, .1);
    flex-shrink: 0;
    position: relative;
}

.sidebar-profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .74rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sidebar-profile-info {
    flex: 1;
    min-width: 0;
}

.sidebar-profile-name {
    font-size: .82rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-profile-email {
    font-size: .63rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.sidebar-profile-dots {
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    border-radius: 7px;
    transition: background .18s;
    flex-shrink: 0;
    padding: 0;
}

.sidebar-profile-dots:hover {
    background: rgba(99, 102, 241, .1);
    color: var(--text);
}

.bell-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    background: #f03f5e;
    border: 2px solid var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .44rem;
    font-weight: 800;
    color: #fff;
    padding: 0 2px;
    line-height: 1;
}

/* STAT CARDS — icon on right */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
    max-width: 100%;
}

@media (max-width: 1440px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.stat-card {
    border-radius: 18px;
    padding: 15px;
    border: 1px solid rgba(99, 102, 241, .12);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    transition: transform .2s, box-shadow .2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .4);
}

.stat-card-purple {
    background: linear-gradient(145deg, rgba(99, 102, 241, .2), rgba(139, 92, 246, .1), rgba(7, 7, 26, .85));
}

.stat-card-blue {
    background: linear-gradient(145deg, rgba(59, 130, 246, .2), rgba(37, 99, 235, .1), rgba(7, 7, 26, .85));
}

.stat-card-green {
    background: linear-gradient(145deg, rgba(16, 185, 129, .2), rgba(5, 150, 105, .1), rgba(7, 7, 26, .85));
}

.stat-card-orange {
    background: linear-gradient(145deg, rgba(245, 158, 11, .2), rgba(180, 83, 9, .1), rgba(7, 7, 26, .85));
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: .72rem;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
    line-height: 1.05;
}

.stat-trend {
    font-size: .82rem;
    color: #6ee7b7;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

#topbarCreditsText {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    display: inline-block;
    vertical-align: bottom;
}

.stat-icon-right {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.sir-purple {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 6px 20px rgba(99, 102, 241, .4);
}

.sir-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 6px 20px rgba(59, 130, 246, .4);
}

.sir-green {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 6px 20px rgba(16, 185, 129, .4);
}

.sir-orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    box-shadow: 0 6px 20px rgba(245, 158, 11, .4);
}

/* SECTION CARD HEADER */
.sec-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
}

.sec-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sec-header-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(99, 102, 241, .14);
    border: 1px solid rgba(99, 102, 241, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a5b4fc;
    font-size: .88rem;
    flex-shrink: 0;
}

.sec-header-title {
    font-size: .92rem;
    font-weight: 800;
    color: #eef2ff;
}

.sec-header-sub {
    font-size: .7rem;
    color: var(--muted);
    margin-top: 1px;
}

.view-all-link {
    font-size: .74rem;
    font-weight: 700;
    color: #a5b4fc;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.view-all-link:hover {
    color: #e0e7ff;
}

/* AI MODULES HORIZONTAL ROW */
.module-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    overflow: visible;
    padding-bottom: 0;
    max-width: 100%;
}

.section-card>div:has(.conv-table) {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.module-row-card {
    min-width: 0;
    width: 100%;
    border-radius: 16px;
    padding: 16px 14px;
    background: var(--surface-2);
    border: 1px solid rgba(99, 102, 241, .12);
    transition: all .22s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
}

.module-row-card:hover {
    transform: translateY(-3px);
    border-color: rgba(99, 102, 241, .32);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .4);
}

.module-row-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 12px;
    transition: transform .22s;
}

.module-row-card:hover .module-row-icon {
    transform: scale(1.1);
}

.module-row-name {
    font-size: 1rem;
    font-weight: 800;
    color: #eef2ff;
    margin-bottom: 5px;
    overflow-wrap: anywhere;
}

.module-row-tag {
    display: inline-block;
    font-size: .78rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.module-row-desc {
    font-size: .88rem;
    color: var(--muted);
    line-height: 1.42;
    margin-bottom: 12px;
    flex: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.module-row-btn {
    font-size: .9rem;
    font-weight: 700;
    color: #a5b4fc;
    display: flex;
    align-items: center;
    gap: 4px;
}

.module-row-new {
    display: inline-block;
    font-size: .54rem;
    font-weight: 800;
    background: rgba(16, 185, 129, .18);
    color: #6ee7b7;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 3px;
    vertical-align: middle;
}

/* TABLE ACTIONS */
.conv-table .mod-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mod-icon-sm {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .6rem;
    color: #fff;
    flex-shrink: 0;
}

.table-actions {
    display: flex;
    gap: 5px;
}

.tbl-btn {
    width: 38px;
    height: 38px;
    border-radius: 7px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all .18s;
}

.tbl-btn-view {
    background: rgba(99, 102, 241, .12);
    color: #a5b4fc;
}

.tbl-btn-view:hover {
    background: rgba(99, 102, 241, .28);
    color: #e0e7ff;
}

.tbl-btn-del {
    background: rgba(239, 68, 68, .1);
    color: #fca5a5;
}

.tbl-btn-del:hover {
    background: rgba(239, 68, 68, .26);
    color: #fca5a5;
}

/* QUICK ACTIONS flex row */
.quick-grid {
    display: flex;
    gap: 10px;
}

.qa-btn {
    flex: 1;
    min-width: 0;
    border-radius: 14px;
    padding: 14px 8px;
    text-align: center;
    border: 1px solid rgba(99, 102, 241, .12);
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: var(--surface-2);
}

.qa-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, .32);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}

.qa-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
}

.qa-label {
    font-size: .7rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

/* MESSAGES BY MODULE — donut + side legend */
.donut-section {
    display: flex;
    gap: 18px;
    align-items: center;
}

.donut-wrap-ref {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(#6366f1 0% 25%, #8b5cf6 25% 45%, #10b981 45% 65%, #f59e0b 65% 80%, #ec4899 80% 90%, #06b6d4 90% 100%);
    position: relative;
    flex-shrink: 0;
}

.donut-wrap-ref::after {
    content: '';
    position: absolute;
    width: 54px;
    height: 54px;
    background: var(--surface);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.donut-legend-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.donut-leg-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.donut-leg-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    color: var(--muted);
}

.donut-leg-pct {
    font-size: .68rem;
    font-weight: 700;
    color: var(--text);
}

/* TIPS LIST */
.tip-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .18s;
}

.tip-row:hover {
    background: rgba(99, 102, 241, .07);
}

.tip-row-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .77rem;
    color: var(--muted);
}

.tip-icon-sm {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(99, 102, 241, .1);
    border: 1px solid rgba(99, 102, 241, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    color: #a5b4fc;
    flex-shrink: 0;
}

.tip-row:hover .tip-row-left {
    color: var(--text);
}

.tip-chevron {
    color: var(--muted);
    font-size: .68rem;
}

/* RESPONSIVE FINAL */
.dash-container {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.dash-main-grid>* {
    min-width: 0;
    max-width: 100%;
}

.sec-right {
    min-width: 0;
    max-width: 100%;
}

@media(max-width:1440px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .module-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media(max-width:1280px) {
    .module-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dash-main-grid {
        grid-template-columns: 1fr;
    }
}

@media(max-width:992px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .module-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media(max-width:768px) {
    .sec-header {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .view-all-link {
        white-space: normal;
    }

    .donut-section {
        flex-direction: column;
        align-items: center;
    }

    .donut-legend-side {
        width: 100%;
    }

    .quick-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .qa-btn {
        flex: unset;
        width: 100%;
        min-width: 0;
    }
}

@media(max-width:680px) {
    .welcome-title {
        font-size: 1.05rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-value {
        font-size: 1.15rem;
    }

    .stat-trend {
        font-size: .78rem;
        flex-wrap: wrap;
    }

    .stat-icon-right {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .module-row {
        grid-template-columns: 1fr;
    }

    .section-card {
        padding: 14px;
    }

    .conv-table th,
    .conv-table td {
        padding: 8px 6px;
        font-size: .82rem;
    }

    .conv-table th:nth-child(3),
    .conv-table td:nth-child(3),
    .conv-table th:nth-child(4),
    .conv-table td:nth-child(4) {
        display: none;
    }

    .conv-table td:first-child {
        max-width: 140px !important;
    }

    .tbl-btn {
        width: 32px;
        height: 32px;
        font-size: .9rem;
    }

    .dashboard-topbar-subtitle {
        white-space: normal;
    }
}

@media(max-width:480px) {
    .quick-grid {
        grid-template-columns: 1fr;
    }

    .sec-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .dash-chart-month-form {
        width: 100%;
        justify-content: flex-start;
    }

    .dash-chart-month-trigger {
        width: 100%;
        justify-content: space-between;
    }
}

/* ============================================================
           CHAT MODULE — Kimi / DeepSeek / GPT / Claude / Gemini
        ============================================================ */
.page-content.chat-page {
    padding: 0 !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
}

.chat-shell {
    display: flex;
    flex: 1;
    height: 100%;
    overflow: hidden;
}

/* topbar module icon override */
.topbar-mod-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
}

.topbar-mod-sub {
    font-size: .62rem;
    color: var(--muted);
    margin-top: 1px;
}

/* ── Chat History Panel ── */
.chat-history {
    width: 230px;
    flex-shrink: 0;
    border-right: 1px solid rgba(99, 102, 241, .12);
    background: rgba(7, 5, 20, .7);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-history-top {
    padding: 14px 12px 10px;
}

.new-chat-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 11px;
    background: var(--primary-gradient);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: opacity .18s;
    box-shadow: 0 6px 18px rgba(99, 102, 241, .35);
}

.new-chat-btn:hover {
    opacity: .88;
}

.chat-list-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, .15) transparent;
}

.chat-list-scroll::-webkit-scrollbar {
    width: 3px;
}

.chat-list-scroll::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, .2);
    border-radius: 3px;
}

.chat-day-label {
    font-size: .55rem;
    font-weight: 700;
    color: rgba(140, 120, 240, .7);
    text-transform: uppercase;
    letter-spacing: .1em;
    padding: 10px 6px 4px;
}

.chat-conv-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s;
    margin-bottom: 2px;
    border: 1px solid transparent;
}

.chat-conv-item:hover {
    background: rgba(99, 102, 241, .08);
}

.chat-conv-item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, .22), rgba(139, 92, 246, .14));
    border-color: rgba(99, 102, 241, .28);
}

.chat-conv-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(99, 102, 241, .18);
    border: 1px solid rgba(99, 102, 241, .25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
    color: #a5b4fc;
    flex-shrink: 0;
}

.chat-conv-info {
    flex: 1;
    min-width: 0;
}

.chat-conv-title {
    font-size: .72rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-conv-time {
    font-size: .6rem;
    color: var(--muted);
    margin-top: 2px;
}

.chat-conv-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6366f1;
    flex-shrink: 0;
}

.chat-upgrade-card {
    margin: 10px;
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, .18), rgba(139, 92, 246, .12));
    border: 1px solid rgba(99, 102, 241, .22);
}

.chat-upgrade-header {
    font-size: .66rem;
    color: var(--muted);
    margin-bottom: 4px;
}

.chat-upgrade-title {
    font-size: .82rem;
    font-weight: 800;
    color: #eef2ff;
    margin-bottom: 8px;
}

.chat-upgrade-desc {
    font-size: .64rem;
    color: var(--muted);
    line-height: 1.45;
    margin-bottom: 12px;
}

.chat-upgrade-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 9px 14px;
    border-radius: 9px;
    background: rgba(99, 102, 241, .25);
    border: 1px solid rgba(99, 102, 241, .35);
    color: #e0e7ff;
    font-size: .72rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s;
}

.chat-upgrade-btn:hover {
    background: rgba(99, 102, 241, .38);
}

/* ── Chat Main ── */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, .12) transparent;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, .18);
    border-radius: 4px;
}

.chat-msg-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.chat-msg-row.user-row {
    flex-direction: row-reverse;
}

/* user bubble */
.chat-bubble-user {
    background: var(--primary-gradient);
    color: #fff;
    padding: 13px 18px;
    border-radius: 18px 4px 18px 18px;
    font-size: .82rem;
    line-height: 1.55;
    max-width: 65%;
    box-shadow: 0 6px 20px rgba(99, 102, 241, .3);
}

.chat-msg-time-user {
    font-size: .6rem;
    color: var(--muted);
    margin-top: 5px;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

/* AI bubble wrapper */
.chat-ai-avatar {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
}

.chat-ai-content {
    flex: 1;
    min-width: 0;
}

/* code block */
.chat-code-block {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, .18);
    margin-bottom: 10px;
}

.chat-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    background: rgba(99, 102, 241, .1);
    border-bottom: 1px solid rgba(99, 102, 241, .14);
}

.chat-code-lang {
    font-size: .6rem;
    font-weight: 800;
    color: #a5b4fc;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.chat-copy-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .64rem;
    font-weight: 700;
    color: #a5b4fc;
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 6px;
    transition: background .15s;
}

.chat-copy-btn:hover {
    background: rgba(99, 102, 241, .18);
    color: #e0e7ff;
}

.chat-code-body {
    background: #07071f;
    padding: 14px 16px;
    overflow-x: auto;
}

.chat-code-body pre {
    margin: 0;
    font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: .75rem;
    line-height: 1.65;
    color: #c7d2fe;
}

.chat-code-body .line-num {
    display: inline-block;
    width: 20px;
    color: rgba(165, 180, 252, .35);
    user-select: none;
    font-size: .68rem;
}

.chat-msg-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 4px;
}

.chat-msg-time-ai {
    font-size: .6rem;
    color: var(--muted);
    flex: 1;
}

.chat-action-btn {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: none;
    border: 1px solid rgba(99, 102, 241, .14);
    color: var(--muted);
    font-size: .72rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}

.chat-action-btn:hover {
    background: rgba(99, 102, 241, .12);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, .28);
}

/* input bar */
.chat-input-bar {
    padding: 14px 20px 18px;
    border-top: 1px solid rgba(99, 102, 241, .1);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(7, 7, 26, .7);
    backdrop-filter: blur(12px);
}

.chat-input-toggle {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(99, 102, 241, .1);
    border: 1px solid rgba(99, 102, 241, .2);
    color: #a5b4fc;
    font-size: .88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .18s;
}

.chat-input-toggle:hover {
    background: rgba(99, 102, 241, .2);
}

.chat-input-field {
    flex: 1;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(99, 102, 241, .18);
    border-radius: 11px;
    padding: 11px 14px;
    color: var(--text);
    font-size: .8rem;
    outline: none;
    transition: border-color .18s;
}

.chat-input-field::placeholder {
    color: var(--muted);
}

.chat-input-field:focus {
    border-color: rgba(99, 102, 241, .45);
    background: rgba(99, 102, 241, .06);
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: none;
    color: #fff;
    font-size: .9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(99, 102, 241, .4);
    transition: transform .18s, box-shadow .18s;
}

.chat-send-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(99, 102, 241, .5);
}

/* ── Code Options Panel ── */
.chat-options {
    width: 220px;
    flex-shrink: 0;
    border-left: 1px solid rgba(99, 102, 241, .12);
    background: rgba(7, 5, 20, .7);
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 8px;
    overflow-y: auto;
}

.opt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.opt-header-title {
    font-size: .82rem;
    font-weight: 800;
    color: #eef2ff;
}

.opt-header-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(99, 102, 241, .1);
    border: 1px solid rgba(99, 102, 241, .2);
    color: #a5b4fc;
    font-size: .8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.opt-action-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(99, 102, 241, .14);
    color: var(--text);
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s;
}

.opt-action-btn:hover {
    background: rgba(99, 102, 241, .12);
    border-color: rgba(99, 102, 241, .28);
}

.opt-action-btn i {
    font-size: .82rem;
    color: #a5b4fc;
}

.opt-section-label {
    font-size: .55rem;
    font-weight: 700;
    color: rgba(140, 120, 240, .7);
    text-transform: uppercase;
    letter-spacing: .1em;
    padding: 8px 2px 2px;
}

.opt-select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 13px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(99, 102, 241, .14);
    color: var(--text);
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
}

.opt-select i {
    font-size: .75rem;
    color: var(--muted);
}

.opt-select-dot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    flex-shrink: 0;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: var(--bs-modal-padding);
    overflow-y: scroll;
    max-height: 650px;
    height: 100%;
}

.btn-close {
    background-color: #fff;
}


/* ===== SOURCE: layout/nav.php ===== */
.upgrade-modal-dialog {
    max-width: min(1320px, 96vw);
}

.upgrade-modal-dialog.is-direct-checkout {
    max-width: min(760px, 94vw);
}

.upgrade-modal-body {
    padding: 24px 22px 14px;
    min-height: min(72vh, 760px);
    max-height: min(72vh, 760px);
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(88, 28, 135, .12), transparent 26%),
        radial-gradient(circle at top right, rgba(37, 99, 235, .08), transparent 20%),
        linear-gradient(180deg, rgba(7, 10, 24, .98), rgba(9, 12, 28, .98));
}

.upgrade-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(350px, .9fr);
    gap: 20px;
    height: 100%;
    min-height: 0;
}

.upgrade-modal-dialog.is-direct-checkout .upgrade-layout {
    grid-template-columns: minmax(0, 1fr);
}

.upgrade-modal-dialog.is-direct-checkout .upgrade-plans-column {
    display: none;
}

.upgrade-modal-dialog.is-direct-checkout .upgrade-checkout-card {
    max-height: none;
}

.upgrade-plans-column,
.upgrade-checkout-card {
    min-height: 0;
}

.upgrade-hero-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .02);
    border: 1px solid rgba(99, 102, 241, .14);
}

.upgrade-hero-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px;
    min-width: 0;
}

.upgrade-hero-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: #fff;
    flex-shrink: 0;
}

.upgrade-hero-icon.is-purple {
    background: rgba(91, 33, 182, .28);
    box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .12);
}

.upgrade-hero-icon.is-blue {
    background: rgba(30, 64, 175, .28);
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .12);
}

.upgrade-hero-icon.is-green {
    background: rgba(6, 95, 70, .28);
    box-shadow: inset 0 0 0 1px rgba(52, 211, 153, .12);
}

.upgrade-hero-icon.is-amber {
    background: rgba(146, 64, 14, .28);
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, .12);
}

.upgrade-hero-title {
    font-size: .9rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 4px;
}

.upgrade-hero-copy {
    font-size: .74rem;
    line-height: 1.55;
    color: #9fb0d1;
}

.upgrade-column-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.upgrade-column-head-stack {
    margin-bottom: 16px;
}

.upgrade-section-title {
    font-size: .86rem;
    font-weight: 800;
    color: #eef2ff;
    margin-bottom: 4px;
}

.upgrade-section-subtitle {
    font-size: .72rem;
    line-height: 1.55;
    color: #8ea0bf;
}

.upgrade-plan-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(129, 140, 248, .18);
    background: rgba(99, 102, 241, .08);
    color: #c7d2fe;
    font-size: .68rem;
    font-weight: 800;
    white-space: nowrap;
}

.upgrade-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(275px, 1fr));
    gap: 18px;
    align-content: start;
    max-height: 100%;
    overflow: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, .22) transparent;
}

.upgrade-plan-grid::-webkit-scrollbar,
.upgrade-checkout-card::-webkit-scrollbar {
    width: 5px;
}

.upgrade-plan-grid::-webkit-scrollbar-thumb,
.upgrade-checkout-card::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, .22);
    border-radius: 999px;
}

.upgrade-plan-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 20px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(99, 102, 241, .12), transparent 32%),
        linear-gradient(180deg, rgba(22, 25, 56, .96), rgba(11, 14, 31, .98));
    border: 1px solid rgba(99, 102, 241, .18);
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, opacity .18s ease, box-shadow .18s ease;
    box-shadow: 0 22px 48px rgba(0, 0, 0, .22);
}

.upgrade-plan-card:hover {
    transform: translateY(-2px);
    border-color: rgba(129, 140, 248, .38);
    box-shadow: 0 28px 54px rgba(0, 0, 0, .3);
}

.upgrade-plan-card.is-disabled {
    opacity: .66;
    cursor: not-allowed;
    background: rgba(255, 255, 255, .02);
}

.upgrade-plan-card.is-disabled:hover {
    transform: none;
    border-color: rgba(99, 102, 241, .12);
}

.upgrade-plan-card.active {
    background:
        radial-gradient(circle at top center, rgba(139, 92, 246, .16), transparent 30%),
        linear-gradient(145deg, rgba(42, 33, 86, .98), rgba(18, 21, 49, .98));
    border-color: rgba(168, 85, 247, .6);
    box-shadow: 0 22px 54px rgba(91, 33, 182, .28);
}

.upgrade-plan-card-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.upgrade-plan-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.upgrade-plan-chip-active {
    color: #4ade80;
    background: rgba(34, 197, 94, .12);
    border: 1px solid rgba(74, 222, 128, .2);
}

.upgrade-plan-chip-available {
    color: #c7d2fe;
    background: rgba(99, 102, 241, .12);
    border: 1px solid rgba(129, 140, 248, .18);
}

.upgrade-plan-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.upgrade-plan-name {
    font-size: 1.12rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.35;
}

.upgrade-plan-price {
    font-size: 1.9rem;
    font-weight: 800;
    color: #fff;
    margin-top: 10px;
    line-height: 1;
}

.upgrade-plan-price span {
    display: inline-block;
    margin-left: 4px;
    white-space: nowrap;
}

.upgrade-plan-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    margin-bottom: 2px;
}

.upgrade-plan-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, .08);
    border: 1px solid rgba(148, 163, 184, .12);
    color: #cbd5e1;
    font-size: .66rem;
    font-weight: 700;
}

.upgrade-plan-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    flex: 1;
}

.upgrade-plan-action {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(99, 102, 241, .1);
    font-size: .74rem;
    font-weight: 700;
    color: #c7d2fe;
}

.upgrade-plan-list-group {
    display: grid;
    gap: 8px;
}

.upgrade-plan-list-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: .63rem;
    font-weight: 800;
    color: #9fb0d1;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.upgrade-plan-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: .75rem;
    color: #dbe4ff;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(11, 16, 38, .52);
    border: 1px solid rgba(99, 102, 241, .1);
}

.upgrade-plan-list-item span {
    min-width: 0;
}

.upgrade-plan-list-item strong {
    white-space: nowrap;
    color: #eef2ff;
}

.upgrade-checkout-card {
    padding: 20px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(76, 29, 149, .12), transparent 24%),
        linear-gradient(180deg, rgba(20, 24, 52, .98), rgba(13, 16, 34, .98));
    border: 1px solid rgba(99, 102, 241, .16);
    box-shadow: 0 22px 48px rgba(0, 0, 0, .22);
    overflow: auto;
}

.upgrade-checkout-section {
    margin-bottom: 18px;
}

.upgrade-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
}

.upgrade-form-group {
    margin-bottom: 14px;
}

.upgrade-label {
    display: block;
    margin-bottom: 8px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: #8ea0bf;
    text-transform: uppercase;
}

.upgrade-label-inner {
    font-size: .65rem;
    margin-bottom: 6px;
}

.upgrade-input {
    font-size: .78rem;
}

.upgrade-selected-plan,
.upgrade-current-plan {
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, .08), rgba(59, 130, 246, .05));
    border: 1px solid rgba(99, 102, 241, .18);
    color: #dbe4ff;
    font-size: .78rem;
    line-height: 1.55;
}

.upgrade-cycle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.upgrade-cycle-card {
    text-align: left;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, .14);
    background: rgba(255, 255, 255, .025);
    color: #dbe4ff;
    cursor: default;
}

.upgrade-cycle-card strong {
    display: block;
    font-size: .88rem;
    color: #fff;
}

.upgrade-cycle-card span {
    display: block;
    margin-top: 6px;
    font-size: .71rem;
    color: #97a9ca;
    line-height: 1.5;
}

.upgrade-cycle-card.active {
    border-color: rgba(139, 92, 246, .44);
    background: linear-gradient(135deg, rgba(76, 29, 149, .18), rgba(59, 130, 246, .08));
    box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .08);
}

.upgrade-gateway-list {
    display: grid;
    gap: 10px;
}

.upgrade-gateway-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(99, 102, 241, .14);
    background: rgba(255, 255, 255, .025);
    cursor: pointer;
}

.upgrade-gateway-option.is-disabled {
    opacity: .58;
    cursor: not-allowed;
    border-style: dashed;
}

.upgrade-gateway-option.is-disabled input {
    pointer-events: none;
}

.upgrade-gateway-option.active {
    border-color: rgba(139, 92, 246, .42);
    background: linear-gradient(135deg, rgba(99, 102, 241, .14), rgba(139, 92, 246, .08));
}

.upgrade-gateway-option input {
    accent-color: #6366f1;
}

.upgrade-checkout-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px 4px;
    color: #9fb0cf;
    font-size: .74rem;
}

.upgrade-modal-footer {
    padding: 14px 22px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(180deg, rgba(8, 11, 25, 0), rgba(8, 11, 25, .9));
}

.upgrade-purchase-btn {
    min-width: 260px;
    justify-content: center;
    background: linear-gradient(90deg, #7c3aed, #4f46e5) !important;
    border: none !important;
    box-shadow: 0 16px 34px rgba(99, 102, 241, .28);
}

.upgrade-empty-state {
    padding: 26px 20px;
    border-radius: 18px;
    text-align: center;
    color: #8ea0bf;
    background: rgba(255, 255, 255, .03);
    border: 1px dashed rgba(99, 102, 241, .18);
    font-size: .82rem;
}

@media(max-width:900px) {
    .upgrade-modal-body {
        min-height: auto;
        max-height: none;
        overflow: auto;
    }

    .upgrade-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .upgrade-hero-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .upgrade-plan-grid,
    .upgrade-checkout-card {
        max-height: none;
        overflow: visible;
    }

    .upgrade-form-grid {
        grid-template-columns: 1fr;
    }

    .upgrade-cycle-grid {
        grid-template-columns: 1fr;
    }

    .upgrade-modal-footer {
        flex-direction: column;
    }

    .upgrade-purchase-btn {
        width: 100%;
        min-width: 0;
    }
}

@media(max-width:640px) {
    .upgrade-column-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .upgrade-hero-strip {
        grid-template-columns: 1fr;
    }

    .upgrade-plan-grid {
        grid-template-columns: 1fr;
    }
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 320px;
    background: rgba(8, 8, 24, .98);
    border: 1px solid rgba(99, 102, 241, .22);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
    backdrop-filter: blur(20px);
    z-index: 99;
}

.search-drop-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
}

.search-drop-item:hover {
    background: rgba(99, 102, 241, .1);
}

.search-drop-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    color: #fff;
    flex-shrink: 0;
}

.search-drop-text {
    flex: 1;
    min-width: 0;
}

.search-drop-title {
    font-size: .75rem;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-drop-module {
    font-size: .62rem;
    color: #8ea0bf;
    margin-top: 1px;
}

.search-drop-empty {
    padding: 16px 14px;
    text-align: center;
    font-size: .75rem;
    color: #8ea0bf;
}

.search-drop-loading {
    padding: 12px 14px;
    text-align: center;
    font-size: .73rem;
    color: #a5b4fc;
}


/* ===== SOURCE: qa/_shared_styles.php ===== */
/* ── CSS var aliases (shared styles use these) ───────────────── */
:root {
    --mnc-bg: #07071a;
    --mnc-surface: #0d0d24;
    --mnc-surface-soft: #111128;
    --mnc-border-soft: rgba(99, 102, 241, .12);
    --mnc-text-main: #e2e8f0;
    --mnc-text-muted: #5b6b8a;
    --mnc-text-muted2: #8899b4;
    --mnc-accent: #6366f1;
}

/* ── Page header ──────────────────────────────────────────────── */
.qa-ph {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.qa-ph-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--mnc-text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.qa-ph-title i {
    font-size: 1.35rem;
}

.qa-ph-sub {
    font-size: .78rem;
    color: var(--mnc-text-muted);
    margin-top: 2px;
}

.qa-ph-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.qa-ph-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ── Stat cards ───────────────────────────────────────────────── */
.qa-stat-card {
    background: rgba(13, 13, 36, .9);
    border: 1px solid rgba(99, 102, 241, .1);
    border-radius: 12px;
    padding: 14px 20px;
    min-width: 110px;
}

.qa-stat-val {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--mnc-text-main);
    line-height: 1;
    margin-bottom: 4px;
}

.qa-stat-lbl {
    font-size: .72rem;
    color: var(--mnc-text-muted2);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ── Table card head ──────────────────────────────────────────── */
.qa-tcard-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.qa-tcard-title {
    font-size: .88rem;
    font-weight: 700;
    color: var(--mnc-text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.qa-tcard-title i {
    color: var(--mnc-accent);
}

/* ── Generic button ───────────────────────────────────────────── */
.qa-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 7px;
    border-radius: 9px;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s;
    border: 1px solid rgba(99, 102, 241, .3);
    background: rgba(99, 102, 241, .08);
    color: #a5b4fc;
    text-decoration: none;
}

.qa-btn:hover {
    background: rgba(99, 102, 241, .18);
    border-color: rgba(99, 102, 241, .55);
    color: #c7d2fe;
    text-decoration: none;
}

.qa-btn.primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
    color: #fff;
}

.qa-btn.primary:hover {
    background: linear-gradient(135deg, #7c7fef, #9b74f5);
    transform: translateY(-1px);
    text-decoration: none;
}

/* ── Form label / input (modal forms) ────────────────────────── */
.ss2-label {
    display: block;
    font-size: .74rem;
    font-weight: 600;
    color: var(--mnc-text-muted2);
    margin-bottom: 5px;
}

.ss2-input {
    width: 100%;
    background: rgba(7, 7, 30, .8);
    border: 1px solid rgba(99, 102, 241, .18);
    color: var(--mnc-text-main);
    border-radius: 9px;
    padding: 8px 12px;
    font-size: .82rem;
    outline: none;
    transition: border-color .15s;
    box-sizing: border-box;
}

.ss2-input:focus {
    border-color: rgba(99, 102, 241, .5);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .1);
}

.ss2-input::placeholder {
    color: rgba(91, 107, 138, .55);
}

select.ss2-input option {
    background: #0d0d24;
}

textarea.ss2-input {
    font-family: inherit;
    resize: vertical;
}

/* ── Table card ───────────────────────────────────────────────── */
.qa-tcard {
    background: rgba(13, 13, 36, .9);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(99, 102, 241, .12);
    border-radius: 16px;
    overflow: visible;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .5), 0 0 0 1px rgba(99, 102, 241, .05);
    padding: 20px;
}

.qa-tcard>.dataTables_wrapper>.dataTables_scroll,
.qa-tcard table.dataTable {
    overflow: visible !important;
}

/* ── DataTables ───────────────────────────────────────────────── */
.qa-tcard .dataTables_wrapper {
    color: var(--mnc-text-main);
}

.qa-tcard .dataTables_length label,
.qa-tcard .dataTables_filter label,
.qa-tcard .dataTables_info {
    color: var(--mnc-text-muted2);
    font-size: .78rem;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.qa-tcard .dataTables_filter {
    margin-left: auto;
}

.qa-tcard .dataTables_length select,
.qa-tcard .dataTables_filter input {
    background: rgba(7, 7, 30, .8);
    border: 1px solid rgba(99, 102, 241, .18);
    color: var(--mnc-text-main);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: .78rem;
    outline: none;
}

.qa-tcard .dataTables_filter input::placeholder {
    color: rgba(91, 107, 138, .7);
}

.qa-tcard .dataTables_length select:focus,
.qa-tcard .dataTables_filter input:focus {
    border-color: rgba(99, 102, 241, .5);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .1);
}

.qa-tcard .dataTables_top,
.qa-tcard .dataTables_bottom {
    padding: 12px 18px;
    background: rgba(14, 21, 37, .9);
}

.qa-tcard .dataTables_top {
    border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.qa-tcard .dataTables_bottom {
    border-top: 1px solid rgba(255, 255, 255, .05);
}

.qa-tcard table.dataTable thead th {
    background: rgba(9, 9, 28, .98);
    color: rgba(120, 100, 220, .7);
    font-size: .67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    border-bottom: 1px solid rgba(99, 102, 241, .1);
    padding: 11px 14px;
    white-space: nowrap;
}

.qa-tcard table.dataTable thead th:last-child {
    text-align: right;
    padding-right: 18px;
}

.qa-tcard table.dataTable tbody td {
    background: transparent;
    color: var(--mnc-text-main);
    border-bottom: 1px solid rgba(99, 102, 241, .07);
    padding: 11px 14px;
    font-size: .81rem;
    vertical-align: middle;
}

.qa-tcard table.dataTable tbody td:last-child {
    padding-right: 18px;
}

.qa-tcard table.dataTable tbody tr:last-child td {
    border-bottom: none;
}

.qa-tcard table.dataTable tbody tr {
    transition: background .12s;
}

.qa-tcard table.dataTable tbody tr:hover td {
    background: rgba(99, 102, 241, .07);
}

.qa-tcard .page-link {
    background: rgba(7, 7, 30, .8);
    border-color: rgba(99, 102, 241, .18);
    color: var(--mnc-text-muted2);
    font-size: .76rem;
    border-radius: 7px !important;
}

.qa-tcard .page-item.active .page-link {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: #6366f1;
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, .4);
}

.qa-tcard .page-link:hover {
    background: rgba(99, 102, 241, .15);
    color: #c7d2fe;
    border-color: rgba(99, 102, 241, .3);
}

/* ── Badges ───────────────────────────────────────────────────── */
.qa-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.qa-badge.green {
    background: rgba(34, 197, 94, .12);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, .2);
}

.qa-badge.slate {
    background: rgba(100, 116, 139, .1);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, .18);
}

.qa-badge.red {
    background: rgba(239, 68, 68, .12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, .2);
}

.qa-badge.yellow {
    background: rgba(245, 158, 11, .12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, .2);
}

.qa-badge.blue {
    background: rgba(59, 130, 246, .12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, .2);
}

.qa-badge.indigo {
    background: rgba(99, 102, 241, .12);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, .2);
}

.qa-badge.rose {
    background: rgba(244, 63, 94, .12);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, .2);
}

.qa-badge.teal {
    background: rgba(20, 184, 166, .12);
    color: #2dd4bf;
    border: 1px solid rgba(20, 184, 166, .2);
}

/* ── Action buttons ───────────────────────────────────────────── */
.qa-act-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .03);
    color: var(--mnc-text-muted2);
    font-size: .88rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
}

.qa-act-btn.edit:hover {
    border-color: rgba(59, 130, 246, .4);
    color: #60a5fa;
    background: rgba(59, 130, 246, .08);
}

.qa-act-btn.del:hover {
    border-color: rgba(239, 68, 68, .4);
    color: #f87171;
    background: rgba(239, 68, 68, .08);
}

.qa-act-btn.scan:hover {
    border-color: rgba(99, 102, 241, .4);
    color: #818cf8;
    background: rgba(99, 102, 241, .08);
}

.qa-act-btn.print:hover {
    border-color: rgba(20, 184, 166, .4);
    color: #2dd4bf;
    background: rgba(20, 184, 166, .08);
}

/* ── Action button tooltips (data-tip) ────────────────────────── */
.qa-act-btn {
    position: relative;
}

.qa-act-btn[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%) scale(.85);
    transform-origin: bottom center;
    background: rgba(10, 10, 30, .97);
    border: 1px solid rgba(99, 102, 241, .28);
    color: #e2e8f0;
    font-size: .68rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 4px 9px;
    border-radius: 7px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity .14s ease, transform .14s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
    letter-spacing: .01em;
}

.qa-act-btn[data-tip]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 1px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(99, 102, 241, .28);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity .14s ease;
}

.qa-act-btn[data-tip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.qa-act-btn[data-tip]:hover::before {
    opacity: 1;
}

/* ── Modal theme ──────────────────────────────────────────────── */
.qa-modal .modal-content {
    background: rgba(10, 10, 28, .97);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(99, 102, 241, .18);
    border-radius: 18px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, .7), 0 0 0 1px rgba(99, 102, 241, .06);
}

.qa-modal .modal-header {
    border-bottom: 1px solid rgba(99, 102, 241, .1);
    padding: 18px 22px;
}

.qa-modal .modal-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--mnc-text-main);
}

.qa-modal .modal-footer {
    border-top: 1px solid rgba(99, 102, 241, .1);
    padding: 14px 22px;
}

.qa-modal .modal-body {
    padding: 22px;
}

.qa-modal .form-label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--mnc-text-muted2);
    margin-bottom: 5px;
}

.qa-modal .form-control,
.qa-modal .form-select {
    background: rgba(7, 7, 30, .8);
    border: 1px solid rgba(99, 102, 241, .15);
    color: var(--mnc-text-main);
    border-radius: 9px;
    font-size: .82rem;
}

.qa-modal .form-control:focus,
.qa-modal .form-select:focus {
    background: rgba(7, 7, 30, .95);
    border-color: rgba(99, 102, 241, .5);
    color: var(--mnc-text-main);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}

.qa-modal .form-control::placeholder {
    color: rgba(91, 107, 138, .55);
}

.qa-modal .form-select option {
    background: #0d0d24;
    color: #e2e8f0;
}

.qa-modal .btn-close {
    filter: invert(1) opacity(.4);
}

.qa-modal .btn-close:hover {
    filter: invert(1) opacity(.8);
}

.qa-modal .alert-danger {
    background: rgba(239, 68, 68, .1);
    border-color: rgba(239, 68, 68, .25);
    color: #fca5a5;
    border-radius: 8px;
}

/* ── Cancel btn ───────────────────────────────────────────────── */
.qa-btn-cancel {
    background: rgba(19, 29, 48, .8) !important;
    border: 1px solid rgba(255, 255, 255, .08) !important;
    color: var(--mnc-text-muted2) !important;
    border-radius: 9px !important;
    font-size: .82rem !important;
}

.qa-btn-cancel:hover {
    color: var(--mnc-text-main) !important;
    background: rgba(30, 42, 65, .9) !important;
}

/* ── Back button ──────────────────────────────────────────────── */
.qa-back-btn {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .03);
    color: var(--mnc-text-muted2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1rem;
    transition: all .15s;
}

.qa-back-btn:hover {
    border-color: rgba(59, 130, 246, .4);
    color: #60a5fa;
    background: rgba(59, 130, 246, .08);
    text-decoration: none;
}

/* ── Disclaimer banner ────────────────────────────────────────── */
.ss-disclaimer {
    background: rgba(245, 158, 11, .07);
    border: 1px solid rgba(245, 158, 11, .2);
    border-left: 3px solid #f59e0b;
    border-radius: 10px;
    padding: 11px 16px;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .77rem;
    color: var(--mnc-text-muted2);
}

/* ── SweetAlert2 dark theme (all standard alerts) ─────────────── */
.swal2-popup {
    background: rgba(10, 10, 28, .98) !important;
    border: 1px solid rgba(99, 102, 241, .18) !important;
    border-radius: 16px !important;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .7) !important;
    color: #e2e8f0 !important;
}

.swal2-title {
    color: #f1f5f9 !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
}

.swal2-html-container {
    color: #94a3b8 !important;
    font-size: .86rem !important;
}

.swal2-confirm {
    border-radius: 9px !important;
    font-weight: 700 !important;
}

.swal2-cancel {
    border-radius: 9px !important;
    font-weight: 700 !important;
    background: rgba(71, 85, 105, .5) !important;
    color: #94a3b8 !important;
}

.swal2-cancel:hover {
    background: rgba(100, 116, 139, .5) !important;
}

/* ── Toast containers — never show a backdrop ─────────────────── */
.swal2-container.swal2-top-end,
.swal2-container.swal2-top-right,
.swal2-container.swal2-top-start,
.swal2-container.swal2-top-left,
.swal2-container.swal2-top,
.swal2-container.swal2-bottom-end,
.swal2-container.swal2-bottom-right,
.swal2-container.swal2-bottom-start,
.swal2-container.swal2-bottom-left,
.swal2-container.swal2-bottom {
    background: transparent !important;
    pointer-events: none;
}

.swal2-container.swal2-top-end .swal2-popup,
.swal2-container.swal2-top-right .swal2-popup,
.swal2-container.swal2-bottom-end .swal2-popup,
.swal2-container.swal2-bottom-right .swal2-popup {
    pointer-events: all;
    border-radius: 12px !important;
}

/* ── qaDelConfirm custom popup — scoped overrides ────────────── */
.qa-del-popup {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    width: auto !important;
    max-width: none !important;
}

.qa-del-popup .swal2-icon,
.qa-del-popup .swal2-title,
.qa-del-popup .swal2-actions,
.qa-del-popup .swal2-close {
    display: none !important;
}

.qa-del-popup .swal2-html-container {
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

@keyframes swalIn {
    from {
        opacity: 0;
        transform: scale(.88) translateY(16px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes swalOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

    to {
        opacity: 0;
        transform: scale(.88) translateY(12px);
    }
}

.swal2-show.qa-del-popup .swal2-html-container {
    animation: swalIn .28s cubic-bezier(.34, 1.56, .64, 1) both;
}

.swal2-hide.qa-del-popup .swal2-html-container {
    animation: swalOut .2s ease-in both;
}

@keyframes swalBdIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes swalBdOut {
    from {
        opacity: 1
    }

    to {
        opacity: 0
    }
}

.swal2-backdrop-show {
    animation: swalBdIn .22s ease both;
    background: rgba(0, 0, 0, .72) !important;
}

.swal2-backdrop-hide {
    animation: swalBdOut .22s ease both;
}

/* ── Global delete-confirm card (SweetAlert2 custom HTML) ─────── */
.del-card {
    width: 400px;
    background: linear-gradient(145deg, rgba(10, 10, 28, .99), rgba(7, 7, 22, .99));
    border: 1px solid rgba(239, 68, 68, .18);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(239, 68, 68, .06), 0 20px 60px rgba(0, 0, 0, .6);
}

.del-card-top {
    padding: 32px 28px 20px;
    text-align: center;
}

.del-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(239, 68, 68, .1);
    border: 1px solid rgba(239, 68, 68, .2);
    color: #f87171;
    font-size: 1.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 0 24px rgba(239, 68, 68, .12);
}

.del-card-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #f1f5f9;
    margin-bottom: 8px;
}

.del-card-sub {
    font-size: .8rem;
    color: #64748b;
    line-height: 1.6;
}

.del-card-sub strong {
    color: #f87171;
}

.del-card-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, .2), transparent);
}

.del-card-footer {
    padding: 18px 24px 24px;
    display: flex;
    gap: 10px;
}

.del-btn {
    flex: 1;
    padding: 11px 0;
    border: none;
    border-radius: 10px;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all .2s;
    letter-spacing: .02em;
}

.del-btn-confirm {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

.del-btn-confirm:hover {
    background: linear-gradient(135deg, #f87171, #ef4444);
    box-shadow: 0 6px 24px rgba(239, 68, 68, .5);
    transform: translateY(-1px);
}

.del-btn-confirm:active {
    transform: translateY(0);
}

.del-btn-cancel {
    background: rgba(51, 65, 85, .6);
    color: #94a3b8;
}

.del-btn-cancel:hover {
    background: rgba(71, 85, 105, .7);
    color: #cbd5e1;
}


/* ===== SOURCE: auth/login.php ===== */
:root {
    --bg: #060816;
    --panel: rgba(10, 14, 34, 0.9);
    --panel-soft: rgba(19, 27, 58, 0.82);
    --border: rgba(110, 126, 255, 0.16);
    --border-strong: rgba(110, 126, 255, 0.24);
    --text: #eef2ff;
    --muted: #98a6c8;
    --muted-2: #6f7da0;
    --cyan: #4fd1ff;
    --indigo: #6c63ff;
    --violet: #905cff;
    --pink: #ff4fa3;
    --success: #67f5c8;
    --hero-gradient:
        radial-gradient(circle at 18% 18%, rgba(79, 209, 255, 0.34), transparent 36%),
        radial-gradient(circle at 82% 74%, rgba(255, 79, 163, 0.22), transparent 34%),
        linear-gradient(160deg, rgba(23, 34, 78, 0.96), rgba(16, 33, 72, 0.92) 44%, rgba(63, 23, 78, 0.92));
    --form-gradient:
        radial-gradient(circle at 80% 100%, rgba(108, 99, 255, 0.18), transparent 36%),
        radial-gradient(circle at 12% 10%, rgba(79, 209, 255, 0.12), transparent 24%),
        linear-gradient(180deg, rgba(14, 20, 44, 0.96), rgba(18, 16, 45, 0.94));
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", system-ui, sans-serif;
    min-height: 100vh;
}

#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.login-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.login-frame {
    width: min(1120px, 100%);
    min-height: min(760px, calc(100vh - 56px));
    border-radius: 32px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    background: rgba(10, 14, 34, 0.76);
    border: 1px solid rgba(110, 126, 255, 0.18);
    box-shadow:
        0 38px 120px rgba(0, 0, 0, 0.56),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(22px);
}

.login-hero {
    position: relative;
    padding: 42px 44px 38px;
    background: var(--hero-gradient);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    isolation: isolate;
}

.login-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(130deg, rgba(255, 255, 255, .04), transparent 28%),
        linear-gradient(0deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, 0));
    pointer-events: none;
    z-index: -1;
}

.hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.hero-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-brand-badge {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    background:
        radial-gradient(circle at 28% 26%, rgba(79, 209, 255, .9), rgba(79, 209, 255, .1) 34%, transparent 35%),
        linear-gradient(145deg, #3777ff, #7a42ff 54%, #ff3f9f);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 18px 38px rgba(37, 99, 235, 0.28),
        0 0 28px rgba(144, 92, 255, 0.34);
}

.hero-brand-badge i {
    font-size: 2rem;
    color: #fff;
}

.hero-brand-copy h1 {
    font-size: 1.95rem;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -.03em;
}

.hero-brand-copy h1 span {
    color: var(--cyan);
}

.hero-brand-copy p {
    color: rgba(238, 242, 255, .7);
    font-size: .84rem;
    margin: 0;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .1);
    color: #dbeafe;
    font-size: .74rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.hero-main {
    padding: 34px 0 20px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--cyan);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hero-main h2 {
    font-size: clamp(2.2rem, 4vw, 3.55rem);
    line-height: .98;
    font-weight: 900;
    letter-spacing: -.045em;
    margin-bottom: 18px;
    max-width: 520px;
}

.hero-main h2 span {
    color: var(--cyan);
    text-shadow: 0 0 18px rgba(79, 209, 255, .24);
}

.hero-main p {
    font-size: 1.03rem;
    line-height: 1.75;
    color: rgba(238, 242, 255, .78);
    max-width: 520px;
}

.hero-feature-list {
    display: grid;
    gap: 14px;
    margin-top: 34px;
    max-width: 430px;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.hero-feature-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(79, 209, 255, .32), rgba(108, 99, 255, .3));
    border: 1px solid rgba(79, 209, 255, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan);
    font-size: 1rem;
    flex-shrink: 0;
}

.hero-feature-copy {
    color: #f8fbff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.hero-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 24px;
}

.hero-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(238, 242, 255, .8);
}

.hero-stat strong {
    display: block;
    font-size: .96rem;
    color: #fff;
}

.hero-stat span {
    display: block;
    font-size: .75rem;
    color: rgba(238, 242, 255, .58);
    margin-top: 2px;
}

.hero-stat-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), #8ff5ff);
    box-shadow: 0 0 16px rgba(79, 209, 255, .6);
    flex-shrink: 0;
}

.login-panel {
    position: relative;
    padding: 46px 48px 38px;
    background: var(--form-gradient);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-panel::before {
    content: "";
    position: absolute;
    inset: 22px;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, .03);
    pointer-events: none;
}

.login-panel-inner {
    width: min(430px, 100%);
    margin: 0 auto;
}

.panel-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 26px;
}

.panel-brand-logo {
    height: 54px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 26px rgba(108, 99, 255, .32));
}

.login-panel h3 {
    font-size: clamp(2.15rem, 4vw, 3.15rem);
    font-weight: 900;
    letter-spacing: -.04em;
    color: #f7fbff;
    margin-bottom: 10px;
    text-align: center;
}

.login-panel h3 span {
    color: var(--cyan);
}

.login-panel .panel-subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 34px;
}

.alert-danger {
    background: rgba(239, 68, 68, .12);
    border: 1px solid rgba(239, 68, 68, .22);
    color: #fecaca;
    font-size: .83rem;
    border-radius: 16px;
    padding: 12px 16px;
    margin-bottom: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .02);
}

.form-stack {
    display: grid;
    gap: 18px;
}

.field-wrap {
    display: grid;
    gap: 8px;
}

.field-label {
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
}

.field-shell {
    position: relative;
}

.field-icon,
.field-action {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8db2;
    font-size: 1.05rem;
    z-index: 2;
}

.field-icon {
    left: 16px;
}

.field-action {
    right: 16px;
    cursor: pointer;
    transition: color .18s ease;
}

.field-action:hover {
    color: var(--cyan);
}

.form-control {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(135deg, rgba(255, 255, 255, .05), rgba(93, 91, 255, .08));
    color: var(--text);
    border-radius: 18px;
    font-size: .92rem;
    padding: 16px 18px 16px 50px;
    min-height: 58px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .02);
}

.password-input {
    padding-right: 52px;
}

.form-control:focus {
    background: linear-gradient(135deg, rgba(255, 255, 255, .07), rgba(108, 99, 255, .12));
    border-color: rgba(79, 209, 255, .32);
    box-shadow: 0 0 0 4px rgba(79, 209, 255, .08);
    color: var(--text);
}

.form-control::placeholder {
    color: rgba(152, 166, 200, .62);
}

.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus,
.form-control:-webkit-autofill:active {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px rgba(28, 33, 68, 0.96) inset;
    box-shadow: 0 0 0 1000px rgba(28, 33, 68, 0.96) inset;
    transition: background-color 9999s ease-in-out 0s;
    border: 1px solid rgba(79, 209, 255, .18);
    caret-color: var(--text);
}

.form-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.remember-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.remember-check input {
    display: none;
}

.remember-box {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .03);
    position: relative;
    flex-shrink: 0;
}

.remember-check input:checked+.remember-box {
    background: linear-gradient(135deg, var(--indigo), var(--pink));
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(144, 92, 255, .24);
}

.remember-check input:checked+.remember-box::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-link {
    color: var(--cyan);
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
}

.forgot-link:hover {
    color: #8be8ff;
}

.btn-login {
    width: 100%;
    min-height: 58px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--indigo), var(--pink));
    color: #fff;
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow:
        0 20px 40px rgba(144, 92, 255, 0.28),
        0 0 0 1px rgba(255, 255, 255, .04) inset;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow:
        0 24px 46px rgba(144, 92, 255, 0.34),
        0 0 0 1px rgba(255, 255, 255, .06) inset;
}

.panel-help {
    text-align: center;
    color: var(--muted);
    font-size: .92rem;
    margin-top: 22px;
}

.panel-help a {
    color: var(--cyan);
    text-decoration: none;
    font-weight: 700;
}

.panel-help a:hover {
    color: #8be8ff;
}

@media (max-width: 980px) {
    .login-shell {
        padding: 18px;
    }

    .login-frame {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .login-hero {
        padding: 30px 26px;
    }

    .hero-main h2 {
        max-width: 100%;
    }

    .hero-feature-list {
        max-width: 100%;
    }

    .login-panel {
        padding: 34px 24px 30px;
    }
}

@media (max-width: 640px) {
    body {
        overflow-y: auto;
    }

    .login-shell {
        min-height: auto;
        padding: 14px;
    }

    .login-frame {
        border-radius: 24px;
    }

    .login-hero {
        padding: 24px 20px;
    }

    .hero-top,
    .hero-footer,
    .form-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-brand-copy h1 {
        font-size: 1.56rem;
    }

    .hero-main h2 {
        font-size: 2rem;
    }

    .hero-main p,
    .login-panel .panel-subtitle {
        font-size: .92rem;
    }

    .login-panel {
        padding: 28px 18px 24px;
    }

    .login-panel h3 {
        font-size: 2rem;
    }

    .panel-brand {
        margin-bottom: 18px;
    }

    .panel-brand-logo {
        height: 44px;
    }

    .field-shell {
        width: 100%;
    }
}


/* ===== SOURCE: auth/forgot_password.php ===== */
:root {
    --bg: #060816;
    --panel: rgba(10, 14, 34, 0.9);
    --border: rgba(110, 126, 255, 0.16);
    --text: #eef2ff;
    --muted: #98a6c8;
    --cyan: #4fd1ff;
    --indigo: #6c63ff;
    --pink: #ff4fa3;
    --hero-gradient:
        radial-gradient(circle at 18% 18%, rgba(79, 209, 255, 0.34), transparent 36%),
        radial-gradient(circle at 82% 74%, rgba(255, 79, 163, 0.22), transparent 34%),
        linear-gradient(160deg, rgba(23, 34, 78, 0.96), rgba(16, 33, 72, 0.92) 44%, rgba(63, 23, 78, 0.92));
    --form-gradient:
        radial-gradient(circle at 80% 100%, rgba(108, 99, 255, 0.18), transparent 36%),
        radial-gradient(circle at 12% 10%, rgba(79, 209, 255, 0.12), transparent 24%),
        linear-gradient(180deg, rgba(14, 20, 44, 0.96), rgba(18, 16, 45, 0.94));
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", system-ui, sans-serif;
    min-height: 100vh;
}

#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.auth-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.auth-frame {
    width: min(1120px, 100%);
    min-height: min(760px, calc(100vh - 56px));
    border-radius: 32px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    background: rgba(10, 14, 34, 0.76);
    border: 1px solid rgba(110, 126, 255, 0.18);
    box-shadow: 0 38px 120px rgba(0, 0, 0, 0.56), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(22px);
}

.auth-hero {
    padding: 42px 44px 38px;
    background: var(--hero-gradient);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hero-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-brand-badge {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    background:
        radial-gradient(circle at 28% 26%, rgba(79, 209, 255, .9), rgba(79, 209, 255, .1) 34%, transparent 35%),
        linear-gradient(145deg, #3777ff, #7a42ff 54%, #ff3f9f);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 18px 38px rgba(37, 99, 235, .28), 0 0 28px rgba(144, 92, 255, .34);
}

.hero-brand-badge i {
    font-size: 2rem;
}

.hero-brand-copy h1 {
    font-size: 1.95rem;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -.03em;
}

.hero-brand-copy h1 span {
    color: var(--cyan);
}

.hero-brand-copy p {
    color: rgba(238, 242, 255, .7);
    font-size: .84rem;
    margin: 0;
}

.hero-main {
    padding: 34px 0 20px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--cyan);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hero-main h2 {
    font-size: clamp(2.2rem, 4vw, 3.35rem);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -.045em;
    margin-bottom: 18px;
    max-width: 520px;
}

.hero-main h2 span {
    color: var(--cyan);
    text-shadow: 0 0 18px rgba(79, 209, 255, .24);
}

.hero-main p {
    font-size: 1rem;
    line-height: 1.75;
    color: rgba(238, 242, 255, .78);
    max-width: 520px;
}

.hero-note-list {
    display: grid;
    gap: 14px;
    margin-top: 34px;
    max-width: 440px;
}

.hero-note {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 15px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .1);
}

.hero-note-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(79, 209, 255, .32), rgba(108, 99, 255, .3));
    border: 1px solid rgba(79, 209, 255, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan);
}

.hero-note-copy strong {
    display: block;
    font-size: .95rem;
    color: #fff;
    margin-bottom: 4px;
}

.hero-note-copy span {
    display: block;
    font-size: .82rem;
    line-height: 1.55;
    color: rgba(238, 242, 255, .72);
}

.auth-panel {
    position: relative;
    padding: 46px 48px 38px;
    background: var(--form-gradient);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-panel-inner {
    width: min(430px, 100%);
    margin: 0 auto;
}

.auth-panel h3 {
    font-size: clamp(2.15rem, 4vw, 3rem);
    font-weight: 900;
    letter-spacing: -.04em;
    color: #f7fbff;
    margin-bottom: 10px;
    text-align: center;
}

.auth-panel h3 span {
    color: var(--cyan);
}

.panel-subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 30px;
}

.alert-box {
    font-size: .83rem;
    border-radius: 16px;
    padding: 12px 16px;
    margin-bottom: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .02);
}

.alert-error {
    background: rgba(239, 68, 68, .12);
    border: 1px solid rgba(239, 68, 68, .22);
    color: #fecaca;
}

.alert-success {
    background: rgba(34, 197, 94, .12);
    border: 1px solid rgba(34, 197, 94, .22);
    color: #bbf7d0;
}

.field-wrap {
    display: grid;
    gap: 8px;
}

.field-label {
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
}

.field-shell {
    position: relative;
}

.field-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8db2;
    font-size: 1.05rem;
    z-index: 2;
}

.form-control {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(135deg, rgba(255, 255, 255, .05), rgba(93, 91, 255, .08));
    color: var(--text);
    border-radius: 18px;
    font-size: .92rem;
    padding: 16px 18px 16px 50px;
    min-height: 58px;
}

.form-control:focus {
    background: linear-gradient(135deg, rgba(255, 255, 255, .07), rgba(108, 99, 255, .12));
    border-color: rgba(79, 209, 255, .32);
    box-shadow: 0 0 0 4px rgba(79, 209, 255, .08);
    color: var(--text);
}

.form-control::placeholder {
    color: rgba(152, 166, 200, .62);
}

.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus,
.form-control:-webkit-autofill:active {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px rgba(28, 33, 68, 0.96) inset;
    box-shadow: 0 0 0 1000px rgba(28, 33, 68, 0.96) inset;
    transition: background-color 9999s ease-in-out 0s;
    border: 1px solid rgba(79, 209, 255, .18);
    caret-color: var(--text);
}

.btn-primary-auth {
    width: 100%;
    min-height: 58px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--indigo), var(--pink));
    color: #fff;
    font-size: 1.02rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    box-shadow: 0 20px 40px rgba(144, 92, 255, 0.28);
}

.form-notes {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
}

.form-notes strong {
    display: block;
    color: #fff;
    font-size: .9rem;
    margin-bottom: 8px;
}

.form-notes p {
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.7;
    margin: 0;
}

.panel-help {
    text-align: center;
    color: var(--muted);
    font-size: .92rem;
    margin-top: 22px;
}

.panel-help a {
    color: var(--cyan);
    text-decoration: none;
    font-weight: 700;
}

.panel-help a:hover {
    color: #8be8ff;
}

@media (max-width: 980px) {
    .auth-shell {
        padding: 18px;
    }

    .auth-frame {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .auth-hero {
        padding: 30px 26px;
    }

    .auth-panel {
        padding: 34px 24px 30px;
    }
}

@media (max-width: 640px) {
    body {
        overflow-y: auto;
    }

    .auth-shell {
        min-height: auto;
        padding: 14px;
    }

    .auth-frame {
        border-radius: 24px;
    }

    .auth-hero {
        padding: 24px 20px;
    }

    .hero-brand-copy h1 {
        font-size: 1.56rem;
    }

    .hero-main h2 {
        font-size: 2rem;
    }

    .hero-main p,
    .panel-subtitle {
        font-size: .92rem;
    }

    .auth-panel {
        padding: 28px 18px 24px;
    }

    .auth-panel h3 {
        font-size: 2rem;
    }
}


/* ===== SOURCE: dashboard/index.php ===== */
.dash-chart-month-form {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.dash-chart-month-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.dash-chart-month-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, .22);
    background: linear-gradient(135deg, rgba(99, 102, 241, .16), rgba(79, 70, 229, .08));
    color: #e2e8f0;
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .01em;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease, opacity .18s ease;
}

.dash-chart-month-trigger:hover {
    transform: translateY(-1px);
    border-color: rgba(129, 140, 248, .45);
    background: linear-gradient(135deg, rgba(99, 102, 241, .22), rgba(79, 70, 229, .14));
    box-shadow: 0 14px 30px rgba(30, 41, 59, .22);
}

.dash-chart-month-trigger:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .18), 0 14px 30px rgba(30, 41, 59, .22);
}

.dash-chart-month-trigger.is-loading {
    opacity: .72;
}

.dash-chart-month-label {
    white-space: nowrap;
}

.dash-chart-month-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    color: #c4b5fd;
    font-size: 1rem;
}

.dash-chart-body {
    position: relative;
    min-height: 162px;
}

.dash-chart-body.is-loading {
    opacity: .78;
}

.dash-chart-loader {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(180deg, rgba(9, 9, 30, .16), rgba(9, 9, 30, .28));
    border-radius: 16px;
    z-index: 2;
    pointer-events: none;
}

.dash-chart-body.is-loading .dash-chart-loader {
    display: flex;
}

.dash-chart-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(165, 180, 252, .2);
    border-top-color: #818cf8;
    animation: dashChartSpin .8s linear infinite;
}

.dash-chart-loader span {
    color: #cbd5e1;
    font-size: .76rem;
    font-weight: 700;
}

.dash-chart-month-form+span {
    display: none !important;
}

@keyframes dashChartSpin {
    to {
        transform: rotate(360deg);
    }
}

.dash-chart-body>div {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.dash-chart-body svg {
    display: block;
    max-width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .sec-right .section-card>.sec-header {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .sec-right .section-card>.sec-header .sec-header-title {
        flex: 1 1 100%;
    }

    .dash-chart-body {
        min-height: 140px;
    }
}

@media (max-width: 480px) {
    .dash-chart-month-label {
        white-space: normal;
        text-align: left;
    }
}


/* ===== SOURCE: history/index.php ===== */
/* ── Page layout ─────────────────────────── */
.hist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    gap: 12px;
    flex-wrap: wrap;
}

.hist-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.hist-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, .15);
    background: rgba(99, 102, 241, .06);
    color: var(--muted);
    font-size: .73rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s;
    white-space: nowrap;
    user-select: none;
}

.hist-tab:hover,
.hist-tab.active {
    background: rgba(99, 102, 241, .18);
    border-color: rgba(99, 102, 241, .35);
    color: #e0e7ff;
}

.hist-tab .tab-count {
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: rgba(99, 102, 241, .25);
    color: #a5b4fc;
    font-size: .58rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* ── History table ─────────────────────── */
.hist-table {
    width: 100% !important;
    border-collapse: collapse;
}

.hist-table th {
    font-size: .63rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(99, 102, 241, .12);
    background: rgba(99, 102, 241, .05);
    white-space: nowrap;
}

.hist-table td {
    padding: 12px 14px;
    font-size: .78rem;
    color: var(--text);
    border-bottom: 1px solid rgba(99, 102, 241, .06);
    vertical-align: middle;
}

.hist-table tbody tr:last-child td {
    border-bottom: none;
}

.hist-table tbody tr:hover td {
    background: rgba(99, 102, 241, .04);
}

.hist-preview {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.hist-metric {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(99, 102, 241, .08);
    border: 1px solid rgba(99, 102, 241, .14);
    font-size: .68rem;
    font-weight: 700;
    color: #c7d2fe;
    white-space: nowrap;
}

.hist-metric.tokens {
    background: rgba(34, 211, 238, .08);
    border-color: rgba(34, 211, 238, .14);
    color: #a5f3fc;
}

.hist-metric.credits {
    background: rgba(16, 185, 129, .08);
    border-color: rgba(16, 185, 129, .14);
    color: #86efac;
}

.hist-empty {
    text-align: center;
    padding: 56px 0;
    color: var(--muted);
    font-size: .8rem;
}

.hist-empty i {
    font-size: 2.4rem;
    display: block;
    margin-bottom: 10px;
    color: rgba(99, 102, 241, .3);
}

.hist-actions {
    display: flex;
    gap: 5px;
}

.clear-all-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 9px;
    background: rgba(239, 68, 68, .08);
    border: 1px solid rgba(239, 68, 68, .2);
    color: #fca5a5;
    font-size: .72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s;
}

.clear-all-btn:hover {
    background: rgba(239, 68, 68, .18);
}

/* ── DataTables dark-theme overrides ───── */
.dataTables_wrapper {
    color: var(--text);
}

/* Top bar: length (left) + filter (right) */
.hist-dt-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(99, 102, 241, .08);
    margin-bottom: 2px;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.hist-dt-topbar .dataTables_length {
    position: relative;
    z-index: 20;
}

.hist-dt-topbar .dataTables_length label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .72rem;
    color: var(--muted);
    margin: 0;
    white-space: nowrap;
}

.hist-dt-topbar .dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
}

.hist-dt-topbar .dataTables_filter {
    position: relative;
}

.dataTables_length select {
    background: #1a1a3a;
    border: 1px solid rgba(99, 102, 241, .25);
    border-radius: 7px;
    color: #e2e8f0;
    font-size: .73rem;
    padding: 5px 10px;
    outline: none;
    font-family: inherit;
    cursor: pointer;
    position: relative;
    z-index: 20;
}

.dataTables_filter input[type="search"] {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(99, 102, 241, .18);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: .73rem;
    padding: 6px 12px 6px 34px;
    outline: none;
    font-family: inherit;
    width: 220px;
    transition: border-color .15s;
    margin-left: 0 !important;
}

.dataTables_filter input[type="search"]:focus {
    border-color: rgba(99, 102, 241, .5);
    background: rgba(99, 102, 241, .05);
}

.dataTables_filter input[type="search"]::placeholder {
    color: var(--muted);
}

/* Bottom bar: info (left) + paginate (right) */
.hist-dt-bottombar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(99, 102, 241, .08);
    flex-wrap: wrap;
    margin-top: 4px;
}

.dataTables_info {
    font-size: .7rem;
    color: var(--muted);
}

.dataTables_paginate {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dataTables_paginate .paginate_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 0px;
    border-radius: 7px !important;
    border: 1px solid rgba(99, 102, 241, .15) !important;
    background: rgba(99, 102, 241, .06) !important;
    color: var(--muted) !important;
    font-size: .7rem !important;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    line-height: 1;
}

.dataTables_paginate .paginate_button:hover:not(.disabled) {
    background: rgba(99, 102, 241, .18) !important;
    border-color: rgba(99, 102, 241, .35) !important;
    color: #e0e7ff !important;
}

.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button.current:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, .35) !important;
}

.dataTables_paginate .paginate_button.disabled,
.dataTables_paginate .paginate_button.disabled:hover {
    opacity: .3 !important;
    cursor: not-allowed !important;
    background: rgba(99, 102, 241, .04) !important;
}

/* Override BS5 DT pagination (uses .page-link / .page-item) */
.dataTables_paginate .pagination {
    display: flex;
    gap: 4px;
    margin: 0;
    list-style: none;
}

.dataTables_paginate .page-item .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 10px;
    border-radius: 7px !important;
    border: 1px solid rgba(99, 102, 241, .15) !important;
    background: rgba(99, 102, 241, .06) !important;
    color: var(--muted) !important;
    font-size: .7rem !important;
    font-weight: 600;
    line-height: 1;
    box-shadow: none !important;
    transition: all .15s;
}

.dataTables_paginate .page-item:hover:not(.disabled) .page-link {
    background: rgba(99, 102, 241, .18) !important;
    border-color: rgba(99, 102, 241, .35) !important;
    color: #e0e7ff !important;
}

.dataTables_paginate .page-item.active .page-link {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, .35) !important;
}

.dataTables_paginate .page-item.disabled .page-link {
    opacity: .35 !important;
    cursor: not-allowed !important;
}

/* Table scroll wrapper */
.dataTables_scroll {
    overflow-x: auto;
}

div.dataTables_wrapper div.dataTables_scrollBody {
    overflow-x: auto;
}

/* Sorting icons */
.hist-table thead th {
    position: relative;
    padding-right: 24px !important;
}

table.dataTable thead th.sorting {
    cursor: pointer;
}

table.dataTable thead th.sorting::after {
    content: '⇅';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: .7rem;
    opacity: .3;
}

table.dataTable thead th.sorting_asc::after {
    content: '↑';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #a5b4fc;
    opacity: 1;
}

table.dataTable thead th.sorting_desc::after {
    content: '↓';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #a5b4fc;
    opacity: 1;
}

table.dataTable thead th.sorting_disabled {
    padding-right: 14px !important;
}

table.dataTable thead th.sorting_disabled::after {
    display: none;
}

/* ── Chat modal ─────────────────────────── */
.chat-modal-body {
    max-height: 480px;
    overflow-y: auto;
    padding: 4px;
}

.cm-msg {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.cm-msg.user-msg {
    flex-direction: row-reverse;
}

.cm-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: .78rem;
    line-height: 1.5;
}

.cm-bubble.user-b {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border-radius: 14px 4px 14px 14px;
}

.cm-bubble.ai-b {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(99, 102, 241, .14);
    color: var(--text);
    border-radius: 4px 14px 14px 14px;
}

.cm-avatar {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    color: #fff;
}

.cm-avatar.user-av {
    background: var(--primary-gradient);
}

.cm-avatar.ai-av {
    background: rgba(99, 102, 241, .18);
    border: 1px solid rgba(99, 102, 241, .25);
    color: #a5b4fc;
}

/* ── Edit Project modal (Gemini VSL) ─────── */
.hist-ep-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hist-ep-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 28px 16px 20px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(148, 163, 184, .1);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: background .18s, border-color .18s;
}

.hist-ep-card:hover {
    background: rgba(6, 182, 212, .08);
    border-color: rgba(6, 182, 212, .3);
    color: inherit;
}

.hist-ep-card strong {
    color: #fff;
    font-size: .92rem;
}

.hist-ep-card p {
    font-size: .76rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
}

.hist-ep-icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(148, 163, 184, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.hist-ep-card.ep-disabled {
    opacity: .45;
    pointer-events: none;
}

.hist-ep-modal-content {
    background: #0d1224;
    border: 1px solid rgba(148, 163, 184, .12);
    border-radius: 20px;
}

.hist-ep-modal-header {
    border-bottom: 1px solid rgba(148, 163, 184, .08);
    padding: 20px 24px 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.hist-ep-modal-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(6, 182, 212, .15);
    border: 1px solid rgba(6, 182, 212, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22d3ee;
    flex-shrink: 0;
}


/* ===== SOURCE: profile/index.php ===== */
.profile-shell {
    /* max-width: 1100px; */
    margin: 0 auto;
}

.profile-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.profile-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #fff;
}

.profile-subtitle {
    font-size: .84rem;
    color: #8ea0bf;
    margin-top: 6px;
}

.profile-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 12px;
    font-size: .82rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    min-width: 140px;
    min-height: 42px;
}

.profile-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
}

.profile-btn-secondary {
    background: rgba(99, 102, 241, .08);
    border: 1px solid rgba(99, 102, 241, .18);
    color: #c7d2fe;
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(280px, 340px) 1fr;
    gap: 18px;
}

.profile-card {
    border-radius: 22px;
    padding: 24px;
    background: rgba(13, 13, 36, .78);
    border: 1px solid rgba(99, 102, 241, .12);
}

.profile-card-glow {
    background: linear-gradient(180deg, rgba(99, 102, 241, .14), rgba(13, 13, 36, .86));
    border-color: rgba(99, 102, 241, .16);
}

.profile-avatar-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.profile-avatar {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    object-fit: cover;
    border: 2px solid rgba(99, 102, 241, .28);
}

.profile-avatar-fallback {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.6rem;
    font-weight: 800;
}

.profile-kv {
    display: grid;
    gap: 10px;
}

.profile-sidebar-stack {
    display: grid;
    gap: 14px;
}

.profile-kv-item {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(99, 102, 241, .12);
}

.profile-kv-label {
    font-size: .66rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #8ea0bf;
}

.profile-kv-value {
    font-size: .84rem;
    color: #fff;
    margin-top: 5px;
    word-break: break-word;
}

.profile-kv-value-muted {
    font-size: .76rem;
    color: #8ea0bf;
}

.profile-active-plan-list {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.profile-active-plan-item {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(99, 102, 241, .08);
    border: 1px solid rgba(99, 102, 241, .14);
}

.profile-active-plan-name {
    font-size: .82rem;
    font-weight: 700;
    color: #fff;
}

.profile-active-plan-meta {
    font-size: .7rem;
    color: #a5b4fc;
    margin-top: 5px;
    line-height: 1.5;
}

.profile-sidebar-stats {
    display: grid;
    gap: 10px;
}

.profile-tab-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 18px;
}

.profile-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.profile-tab {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, .14);
    background: rgba(255, 255, 255, .03);
    color: #a5b4fc;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
}

.profile-tab.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, .22), rgba(139, 92, 246, .14));
    color: #fff;
    border-color: rgba(99, 102, 241, .28);
}

.profile-panel {
    display: none;
}

.profile-panel.active {
    display: block;
}

.profile-tab-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.profile-summary-grid {
    display: grid;
    gap: 12px;
}

.profile-summary-card {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(99, 102, 241, .06);
    border: 1px solid rgba(99, 102, 241, .12);
}

.profile-summary-label {
    font-size: .7rem;
    color: #8ea0bf;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.profile-summary-value {
    font-size: .92rem;
    color: #fff;
    font-weight: 700;
    margin-top: 5px;
}

.profile-billing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.profile-stat-card {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(99, 102, 241, .12);
}

.profile-stat-label {
    font-size: .68rem;
    color: #8ea0bf;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.profile-stat-value {
    font-size: 1rem;
    color: #fff;
    font-weight: 800;
    margin-top: 8px;
}

.profile-plan-card {
    padding: 20px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(124, 58, 237, .22), transparent 34%),
        radial-gradient(circle at top right, rgba(59, 130, 246, .18), transparent 30%),
        linear-gradient(180deg, rgba(7, 10, 24, .98), rgba(10, 14, 30, .96));
    border: 1px solid rgba(129, 140, 248, .2);
    box-shadow: 0 26px 70px rgba(2, 6, 23, .35);
    margin-bottom: 18px;
    overflow: hidden;
}

.profile-plan-highlights {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.profile-plan-highlight {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(148, 163, 184, .12);
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-plan-highlight i {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    background: linear-gradient(135deg, rgba(99, 102, 241, .45), rgba(59, 130, 246, .32));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}

.profile-plan-highlight-label {
    font-size: .68rem;
    color: #8ea0bf;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.profile-plan-highlight-value {
    font-size: .86rem;
    font-weight: 700;
    color: #fff;
    margin-top: 4px;
}

.profile-plan-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, .9fr);
    gap: 18px;
}

.profile-plan-main,
.profile-plan-side {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .025);
    border: 1px solid rgba(129, 140, 248, .14);
}

.profile-plan-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800;
    color: #fff;
}

.profile-plan-price {
    font-size: 2rem;
    color: #fff;
    font-weight: 800;
    margin-top: 10px;
}

.profile-plan-note {
    font-size: .86rem;
    color: #9fb0cf;
    margin-top: 8px;
    max-width: 520px;
    line-height: 1.6;
}

.profile-plan-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.profile-plan-meta-card {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(148, 163, 184, .12);
}

.profile-plan-meta-label {
    font-size: .66rem;
    color: #8ea0bf;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.profile-plan-meta-value {
    font-size: .84rem;
    color: #fff;
    font-weight: 700;
    margin-top: 5px;
}

.profile-module-list,
.profile-feature-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.profile-module-item,
.profile-feature-item {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(148, 163, 184, .12);
    color: #dbe4ff;
    font-size: .8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.profile-module-item i {
    color: #60a5fa;
    margin-right: 8px;
}

.profile-section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    margin-bottom: 10px;
}

.profile-section-caption {
    font-size: .68rem;
    color: #8ea0bf;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.profile-plan-side-section+.profile-plan-side-section {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, .12);
}

.profile-plan-side-label {
    font-size: .7rem;
    color: #8ea0bf;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.profile-plan-side-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    margin-top: 8px;
}

.profile-plan-side-copy {
    font-size: .82rem;
    color: #9fb0cf;
    margin-top: 8px;
    line-height: 1.6;
}

.profile-plan-side-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.profile-plan-side-card {
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(148, 163, 184, .12);
}

.profile-plan-side-card strong {
    display: block;
    color: #fff;
    font-size: .95rem;
}

.profile-plan-side-card span {
    display: block;
    margin-top: 4px;
    color: #8ea0bf;
    font-size: .72rem;
}

.profile-plan-side-actions {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.profile-plan-side-actions .profile-btn {
    width: 100%;
    justify-content: center;
}

.profile-section-title {
    font-size: .95rem;
    font-weight: 800;
    color: #eef2ff;
    margin-bottom: 12px;
}

.profile-history-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.profile-history-toolbar .profile-section-title {
    margin-bottom: 0;
}

.profile-history-search {
    position: relative;
    width: min(100%, 260px);
    margin-left: auto;
}

.profile-history-search i {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    font-size: .95rem;
    color: #8ea0bf;
    pointer-events: none;
}

.profile-history-search input {
    width: 100%;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, .16);
    background: rgba(255, 255, 255, .03);
    color: #eef2ff;
    font-size: .78rem;
    padding: 0 14px 0 38px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.profile-history-search input::placeholder {
    color: #7f8fb0;
}

.profile-history-search input:focus {
    border-color: rgba(99, 102, 241, .34);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .10);
    background: rgba(255, 255, 255, .05);
}

.profile-search-empty {
    display: none;
    margin-top: 12px;
}

.profile-search-empty.is-visible {
    display: block;
}

.profile-empty {
    padding: 22px 18px;
    border-radius: 16px;
    text-align: center;
    color: #8ea0bf;
    background: rgba(255, 255, 255, .03);
    border: 1px dashed rgba(99, 102, 241, .18);
}

.profile-table-wrap {
    overflow: auto;
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, .12);
    margin-top: 12px;
}

.profile-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    background: rgba(255, 255, 255, .02);
}

.profile-table th,
.profile-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(99, 102, 241, .08);
    font-size: .78rem;
}

.profile-table th {
    font-size: .66rem;
    color: #8ea0bf;
    text-transform: uppercase;
    letter-spacing: .08em;
    background: rgba(99, 102, 241, .04);
}

.profile-history-plan {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-history-meta {
    font-size: .67rem;
    color: #8ea0bf;
    line-height: 1.5;
}

.profile-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .65rem;
    font-weight: 800;
    text-transform: capitalize;
}

.status-active,
.status-success {
    color: #4ade80;
    background: rgba(34, 197, 94, .1);
}

.status-cancelled,
.status-failed {
    color: #f87171;
    background: rgba(239, 68, 68, .1);
}

.status-pending {
    color: #fbbf24;
    background: rgba(245, 158, 11, .1);
}

.status-refunded {
    color: #fb923c;
    background: rgba(251, 146, 60, .12);
    border: 1px solid rgba(251, 146, 60, .25);
}

.profile-refund-notice {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(251, 146, 60, .08);
    border: 1px solid rgba(251, 146, 60, .2);
    font-size: .67rem;
    font-weight: 600;
    color: #fdba74;
    line-height: 1.4;
}

.status-paused {
    color: #fbbf24;
    background: rgba(245, 158, 11, .1);
}

.profile-order-id {
    font-family: Consolas, monospace;
    color: #94a3b8;
}

.profile-table-actions {
    width: 110px;
    text-align: right;
}

.profile-btn-view {
    min-width: auto;
    min-height: 36px;
    padding: 8px 12px;
    font-size: .74rem;
    border-radius: 10px;
    background: rgba(99, 102, 241, .12);
    border: 1px solid rgba(99, 102, 241, .2);
    color: #dbe4ff;
}

.profile-plan-item-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.profile-plan-item-note {
    margin-top: 10px;
    font-size: .72rem;
    color: #fbbf24;
    line-height: 1.5;
}

.profile-billing-copy {
    font-size: .78rem;
    color: #8ea0bf;
    margin-bottom: 10px;
}

.profile-plan-modal {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(4, 6, 17, .78);
    backdrop-filter: blur(8px);
}

.profile-plan-modal.is-open {
    display: flex;
}

.profile-plan-modal-dialog {
    width: min(1180px, 100%);
    max-height: min(90vh, 920px);
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(10, 14, 30, .99), rgba(7, 10, 24, .99));
    border: 1px solid rgba(99, 102, 241, .2);
    box-shadow: 0 30px 90px rgba(2, 6, 23, .5);
    overflow: hidden;
}

.profile-plan-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(99, 102, 241, .14);
}

.profile-plan-modal-title {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
}

.profile-plan-modal-copy {
    font-size: .76rem;
    color: #8ea0bf;
    margin-top: 4px;
}

.profile-plan-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, .18);
    background: rgba(255, 255, 255, .04);
    color: #dbe4ff;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.profile-plan-modal-body {
    padding: 20px;
    max-height: calc(min(90vh, 920px) - 78px);
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(129, 140, 248, .45) transparent;
}

.profile-plan-modal-body::-webkit-scrollbar {
    width: 8px;
}

.profile-plan-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.profile-plan-modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(129, 140, 248, .55), rgba(99, 102, 241, .28));
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.profile-plan-modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(165, 180, 252, .75), rgba(129, 140, 248, .4));
    background-clip: padding-box;
}

@media(max-width:900px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .profile-billing-grid,
    .profile-plan-meta,
    .profile-plan-highlights,
    .profile-plan-shell {
        grid-template-columns: 1fr;
    }

    .profile-tab-header {
        align-items: stretch;
    }

    .profile-tab-actions {
        width: 100%;
        justify-content: stretch;
    }

    .profile-btn {
        width: 100%;
    }

    .profile-plan-main,
    .profile-plan-side {
        padding: 16px;
    }

    .profile-history-search {
        width: 100%;
    }

    .profile-plan-price {
        font-size: 1.65rem;
    }

    .profile-plan-modal {
        padding: 14px;
    }

    .profile-plan-modal-body {
        padding: 14px;
    }
}


/* ===== SOURCE: qa/api_settings/index.php ===== */
.aps-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.email-module-nav {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px;
    border-radius: 16px;
    background: rgba(7, 7, 26, .72);
    border: 1px solid rgba(99, 102, 241, .12);
    width: fit-content;
    max-width: 100%;
}

.email-module-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    text-decoration: none;
    color: #8ea0bf;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .04em;
}

.email-module-link.is-active {
    color: #eef2ff;
    background: rgba(99, 102, 241, .16);
    border-color: rgba(99, 102, 241, .22);
    box-shadow: 0 12px 22px rgba(99, 102, 241, .16);
}

.aps-hero {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 28px 30px;
    background:
        radial-gradient(circle at top right, rgba(139, 92, 246, .22), transparent 32%),
        radial-gradient(circle at left center, rgba(20, 184, 166, .16), transparent 26%),
        linear-gradient(145deg, rgba(13, 13, 36, .96), rgba(7, 7, 26, .96));
    border: 1px solid rgba(99, 102, 241, .16);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}

.aps-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #a5b4fc;
    margin-bottom: 12px;
}

.aps-kicker::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #22d3ee;
    box-shadow: 0 0 12px rgba(34, 211, 238, .7);
}

.aps-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: #eef2ff;
    margin: 0 0 8px;
}

.aps-copy {
    max-width: 700px;
    font-size: .88rem;
    line-height: 1.65;
    color: #94a3b8;
    margin: 0;
}

.aps-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: .84rem;
    font-weight: 700;
    border: 1px solid transparent;
    transition: opacity .35s ease, transform .35s ease, filter .35s ease;
    transform-origin: top center;
}

.aps-notice.is-hiding {
    opacity: 0;
    transform: translateY(-8px);
    filter: blur(2px);
}

.aps-notice.success {
    color: #86efac;
    background: rgba(34, 197, 94, .1);
    border-color: rgba(34, 197, 94, .18);
}

.aps-notice.error {
    color: #fca5a5;
    background: rgba(239, 68, 68, .1);
    border-color: rgba(239, 68, 68, .18);
}

.aps-toast-popup {
    border: 1px solid rgba(99, 102, 241, 0.22) !important;
    border-radius: 16px !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35) !important;
    backdrop-filter: blur(16px);
}

.aps-toast-popup .swal2-title {
    font-size: .88rem !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
}

.aps-toast-popup .swal2-timer-progress-bar {
    background: linear-gradient(90deg, #7c3aed, #38bdf8) !important;
}

.aps-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.aps-summary-card {
    padding: 16px 18px;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(13, 13, 36, .9), rgba(7, 7, 26, .92));
    border: 1px solid rgba(99, 102, 241, .12);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .18);
}

.aps-summary-label {
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #8ea0bf;
}

.aps-summary-value {
    margin-top: 10px;
    font-size: .96rem;
    font-weight: 800;
    color: #eef2ff;
    line-height: 1.4;
}

.aps-summary-copy {
    margin-top: 6px;
    font-size: .72rem;
    line-height: 1.6;
    color: #64748b;
}

.aps-tab-shell {
    display: grid;
    gap: 18px;
}

.aps-tab-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px;
    border-radius: 16px;
    background: rgba(7, 7, 26, .72);
    border: 1px solid rgba(99, 102, 241, .12);
}

.aps-tab-btn {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: #8ea0bf;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .04em;
}

.aps-tab-btn.is-active {
    color: #eef2ff;
    background: rgba(99, 102, 241, .16);
    border-color: rgba(99, 102, 241, .22);
    box-shadow: 0 12px 22px rgba(99, 102, 241, .16);
}

.aps-form {
    display: grid;
    gap: 18px;
}

.aps-tab-panel {
    display: none;
}

.aps-tab-panel.is-active {
    display: block;
}

.aps-card {
    background: linear-gradient(145deg, rgba(13, 13, 36, .92), rgba(7, 7, 26, .96));
    border: 1px solid rgba(99, 102, 241, .14);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .22);
}

.aps-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid rgba(99, 102, 241, .1);
}

.aps-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.aps-icon.openai {
    background: rgba(16, 163, 127, .16);
    color: #34d399;
}

.aps-icon.media {
    background: rgba(245, 158, 11, .16);
    color: #fbbf24;
}

.aps-icon.system {
    background: rgba(99, 102, 241, .18);
    color: #a5b4fc;
}

.aps-head-title {
    font-size: .95rem;
    font-weight: 800;
    color: #e2e8f0;
    margin: 0 0 3px;
}

.aps-head-copy {
    font-size: .85rem;
    color: #64748b;
    margin: 0;
}

.aps-card-body {
    padding: 20px 22px 22px;
    display: grid;
    gap: 16px;
}

.aps-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, .9fr);
    gap: 18px;
}

.aps-stack {
    display: grid;
    gap: 18px;
}

.aps-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.aps-field {
    display: grid;
    gap: 7px;
}

.aps-field.full {
    grid-column: 1 / -1;
}

.aps-field-compact {
    max-width: 360px;
}

.aps-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: .74rem;
    font-weight: 700;
    color: #cbd5e1;
    letter-spacing: .03em;
}

.aps-badge {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .03em;
}

.aps-badge.on {
    color: #86efac;
    background: rgba(34, 197, 94, .12);
    border: 1px solid rgba(34, 197, 94, .2);
}

.aps-badge.off {
    color: #fbbf24;
    background: rgba(245, 158, 11, .1);
    border: 1px solid rgba(245, 158, 11, .16);
}

.aps-input-wrap {
    position: relative;
}

.aps-input {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, .16);
    background: rgba(8, 8, 28, .74);
    color: #e2e8f0;
    font-size: .84rem;
    padding: 12px 42px 12px 14px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.aps-input:focus {
    border-color: rgba(99, 102, 241, .45);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .12);
    background: rgba(10, 10, 32, .92);
}

.aps-input.no-toggle {
    padding-right: 14px;
}

.aps-toggle {
    position: absolute;
    top: 50%;
    right: 11px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
}

.aps-toggle:hover {
    color: #a5b4fc;
}

.aps-hint {
    font-size: .7rem;
    color: #64748b;
    line-height: 1.55;
    margin: 0;
}

.aps-status-list {
    display: grid;
    gap: 10px;
}

.aps-status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(99, 102, 241, .12);
}

.aps-status-item span {
    font-size: .72rem;
    color: #8ea0bf;
}

.aps-status-item strong {
    font-size: .78rem;
    color: #eef2ff;
}

.aps-inline-note {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(99, 102, 241, .1);
    font-size: .74rem;
    line-height: 1.65;
    color: #94a3b8;
}

.aps-inline-note strong {
    color: #eef2ff;
}

.aps-provider-state {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(99, 102, 241, .12);
    background: rgba(255, 255, 255, .03);
}

.aps-provider-state strong {
    font-size: .8rem;
    color: #eef2ff;
}

.aps-provider-state span {
    font-size: .72rem;
    line-height: 1.55;
    color: #94a3b8;
}

.aps-provider-state.is-ready {
    border-color: rgba(34, 197, 94, .18);
    background: rgba(34, 197, 94, .08);
}

.aps-provider-state.is-warning {
    border-color: rgba(245, 158, 11, .18);
    background: rgba(245, 158, 11, .08);
}

.aps-events-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.aps-event-card {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(99, 102, 241, .12);
}

.aps-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px 22px;
}

.aps-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(13, 13, 36, .92), rgba(7, 7, 26, .96));
    border: 1px solid rgba(99, 102, 241, .14);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .22);
}

.aps-action-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.aps-tip {
    font-size: .74rem;
    color: #64748b;
}

.aps-tip strong {
    color: #cbd5e1;
}

.aps-save {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: .82rem;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(99, 102, 241, .28);
    transition: opacity .18s ease, transform .18s ease, box-shadow .18s ease;
}

.aps-save:hover {
    opacity: .92;
}

.aps-save:disabled {
    cursor: wait;
    opacity: .72;
}

.aps-save-alt {
    background: linear-gradient(135deg, #0891b2, #2563eb);
    box-shadow: 0 10px 24px rgba(37, 99, 235, .24);
}

.aps-save-icon,
.aps-save-spinner {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 16px;
}

.aps-save-spinner {
    display: none;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, .26);
    border-top-color: #ffffff;
    animation: apsSpin .7s linear infinite;
}

.aps-save.is-loading .aps-save-icon {
    display: none;
}

.aps-save.is-loading .aps-save-spinner {
    display: inline-flex;
}

.aps-save-label {
    white-space: nowrap;
}

@keyframes apsSpin {
    to {
        transform: rotate(360deg);
    }
}

.ems-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ems-preview-card {
    background: rgba(8, 8, 28, .48);
    border: 1px solid rgba(99, 102, 241, .14);
    border-radius: 16px;
    padding: 14px;
    display: grid;
    gap: 12px;
}

.ems-preview-card.is-active {
    border-color: rgba(56, 189, 248, .32);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, .08), 0 18px 34px rgba(0, 0, 0, .18);
}

.ems-preview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.ems-preview-title {
    font-size: .88rem;
    font-weight: 800;
    color: #eef2ff;
}

.ems-preview-copy {
    margin-top: 4px;
    font-size: .72rem;
    line-height: 1.6;
    color: #8ea0bf;
}

.ems-preview-badge {
    flex-shrink: 0;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: .62rem;
    font-weight: 800;
    color: #67e8f9;
    background: rgba(56, 189, 248, .1);
    border: 1px solid rgba(56, 189, 248, .18);
}

.ems-preview-frame {
    width: 100%;
    height: 300px;
    border: 1px solid rgba(99, 102, 241, .12);
    border-radius: 12px;
    background: #050816;
}

.ems-preview-actions {
    display: flex;
    justify-content: flex-end;
}

.ems-preview-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: .72rem;
    font-weight: 700;
    color: #c7d2fe;
    text-decoration: none;
    border: 1px solid rgba(99, 102, 241, .18);
    background: rgba(255, 255, 255, .04);
}

.ems-preview-link:hover {
    background: rgba(99, 102, 241, .12);
    color: #fff;
}

.ems-empty-state {
    min-height: 120px;
    border-radius: 14px;
    border: 1px dashed rgba(99, 102, 241, .18);
    background: rgba(255, 255, 255, .03);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    color: #8ea0bf;
    text-align: center;
    padding: 20px;
}

.ems-empty-state i {
    font-size: 1.6rem;
    color: #a5b4fc;
}

.ems-log-wrap {
    width: 100%;
    overflow-x: auto;
}

.ems-log-table {
    width: 100%;
    border-collapse: collapse;
}

.ems-log-table th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(99, 102, 241, .12);
    font-size: .62rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(140, 120, 240, .85);
}

.ems-log-table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(99, 102, 241, .08);
    vertical-align: top;
}

.ems-log-main {
    font-size: .78rem;
    line-height: 1.55;
    color: #e2e8f0;
}

.ems-log-sub {
    margin-top: 4px;
    font-size: .66rem;
    line-height: 1.55;
    color: #8ea0bf;
}

.ems-log-error {
    margin-top: 5px;
    font-size: .66rem;
    line-height: 1.55;
    color: #fda4af;
}

.ems-log-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .06em;
}

.ems-log-pill.is-sent {
    color: #86efac;
    background: rgba(34, 197, 94, .1);
    border: 1px solid rgba(34, 197, 94, .16);
}

.ems-log-pill.is-failed {
    color: #fca5a5;
    background: rgba(239, 68, 68, .1);
    border: 1px solid rgba(239, 68, 68, .16);
}

.ems-log-pill.is-skipped {
    color: #fde68a;
    background: rgba(245, 158, 11, .1);
    border: 1px solid rgba(245, 158, 11, .16);
}

.emt-page {
    display: grid;
    gap: 18px;
}

.emt-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(13, 13, 36, .96), rgba(7, 7, 26, .96));
    border: 1px solid rgba(99, 102, 241, .14);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .24);
}

.emt-topbar-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 1.45rem;
    color: #f5d0fe;
    background: linear-gradient(135deg, rgba(109, 40, 217, .8), rgba(217, 70, 239, .68));
    box-shadow: 0 0 24px rgba(168, 85, 247, .22);
}

.emt-topbar-copy h1 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.7rem;
    font-weight: 900;
}

.emt-topbar-copy p {
    margin: 6px 0 0;
    color: #8ea0bf;
    font-size: .84rem;
    line-height: 1.65;
    max-width: 760px;
}

.emt-topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.emt-topbar-form {
    margin: 0;
}

.emt-save-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #6d28d9, #8b5cf6);
    color: #fff;
    font-size: .8rem;
    font-weight: 800;
    box-shadow: 0 0 22px rgba(139, 92, 246, .22);
}

.emt-close-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .02);
    color: #94a3b8;
    text-decoration: none;
    font-size: 1.15rem;
}

.emt-main {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(360px, 1.1fr);
    gap: 18px;
}

.emt-left,
.emt-right {
    display: grid;
    gap: 18px;
}

.emt-panel {
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(13, 13, 36, .96), rgba(7, 7, 26, .96));
    border: 1px solid rgba(99, 102, 241, .14);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .22);
    padding: 22px;
}

.emt-control-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.emt-control label,
.emt-section-head h2,
.emt-preview-head h3,
.emt-detail-title {
    margin: 0;
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 900;
}

.emt-control label {
    display: block;
    margin-bottom: 5px;
    font-size: .82rem;
}

.emt-control p,
.emt-section-head p,
.emt-preview-head p {
    margin: 0 0 12px;
    color: #8ea0bf;
    font-size: .75rem;
    line-height: 1.6;
}

.emt-select-wrap {
    position: relative;
}

.emt-select-wrap select,
.emt-search-box input {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, .16);
    background: rgba(17, 21, 43, .86);
    color: #eef2ff;
    font-size: .82rem;
    padding: 12px 14px;
    outline: none;
}

.emt-tab-group,
.emt-style-group {
    display: flex;
    gap: 6px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(17, 21, 43, .86);
    border: 1px solid rgba(99, 102, 241, .14);
}

.emt-tab-btn,
.emt-style-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: none;
    border-radius: 10px;
    padding: 10px 12px;
    background: transparent;
    color: #8ea0bf;
    font-size: .78rem;
    font-weight: 700;
}

.emt-tab-btn.is-active,
.emt-style-btn.is-active {
    background: rgba(124, 92, 252, .22);
    color: #fff;
    box-shadow: 0 0 18px rgba(124, 92, 252, .18);
}

.emt-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.emt-section-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.emt-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 220px;
    padding: 0 12px;
    border-radius: 12px;
    background: rgba(17, 21, 43, .86);
    border: 1px solid rgba(99, 102, 241, .14);
    color: #8ea0bf;
}

.emt-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    color: #fff;
    font-size: .78rem;
    font-weight: 800;
    box-shadow: 0 0 18px rgba(139, 92, 246, .18);
}

.emt-search-box input {
    border: none;
    background: transparent;
    padding: 12px 0;
}

.emt-selector-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 18px;
}

.emt-selector-block {
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, .12);
    background: rgba(17, 21, 43, .58);
    padding: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.emt-selector-head {
    margin-bottom: 14px;
}

.emt-selector-head h3 {
    margin: 0 0 4px;
    color: #eef2ff;
    font-size: 1rem;
    font-weight: 800;
}

.emt-selector-head p {
    margin: 0;
    color: #8ea0bf;
    font-size: .74rem;
}

.emt-mail-list,
.emt-theme-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.emt-mail-item,
.emt-theme-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, .12);
    background: rgba(11, 16, 34, .76);
    padding: 12px 14px;
    color: #eef2ff;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.emt-mail-item:hover,
.emt-mail-item.is-active,
.emt-theme-item:hover,
.emt-theme-item.is-active {
    border-color: rgba(139, 92, 246, .42);
    background: rgba(22, 28, 56, .92);
    box-shadow: 0 0 0 1px rgba(139, 92, 246, .1), 0 14px 28px rgba(0, 0, 0, .18);
    transform: translateY(-1px);
}

.emt-mail-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(124, 58, 237, .22), rgba(59, 130, 246, .16));
    color: #d8b4fe;
    font-size: 1rem;
}

.emt-mail-copy,
.emt-theme-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.emt-mail-meta {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
}

.emt-mail-theme-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(124, 92, 252, .14);
    border: 1px solid rgba(139, 92, 246, .18);
    color: #d8b4fe;
    font-size: .66rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.emt-mail-copy strong,
.emt-theme-copy strong {
    color: #eef2ff;
    font-size: .86rem;
    font-weight: 800;
}

.emt-mail-copy small,
.emt-theme-copy small {
    margin-top: 2px;
    color: #8ea0bf;
    font-size: .7rem;
    line-height: 1.45;
}

.emt-theme-cover {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
}

.emt-theme-item {
    gap: 14px;
}

.emt-theme-copy {
    flex: 1;
}

.emt-theme-swatches {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.emt-color-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.emt-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .12);
}

.emt-color-more {
    margin-left: 4px;
    color: #cbd5e1;
    font-size: .7rem;
    font-weight: 700;
}

.emt-preview-panel {
    transition: background .2s ease;
}

.emt-preview-panel.is-light-shell {
    background: linear-gradient(145deg, rgba(233, 236, 255, .96), rgba(214, 220, 248, .98));
}

.emt-preview-panel.is-light-shell .emt-preview-head h3,
.emt-preview-panel.is-light-shell .emt-detail-title {
    color: #111827;
}

.emt-preview-panel.is-light-shell .emt-preview-head p {
    color: #475569;
}

.emt-preview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.emt-open-preview {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, .16);
    background: rgba(255, 255, 255, .03);
    text-decoration: none;
    color: #eef2ff;
    font-size: .76rem;
    font-weight: 700;
}

.emt-preview-frame-wrap {
    display: flex;
    justify-content: center;
    padding: 8px;
    border-radius: 18px;
    background: rgba(6, 10, 28, .4);
    border: 1px solid rgba(99, 102, 241, .1);
}

.emt-preview-frame {
    width: 100%;
    height: 760px;
    border: none;
    border-radius: 16px;
    background: #fff;
    transition: width .2s ease;
}

.emt-preview-frame.is-tablet {
    width: 82%;
}

.emt-preview-frame.is-mobile {
    width: 420px;
    max-width: 100%;
}

.emt-detail-title {
    margin-bottom: 14px;
}

.emt-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.emt-detail-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(99, 102, 241, .12);
}

.emt-detail-card small {
    display: block;
    color: #8ea0bf;
    font-size: .68rem;
    margin-bottom: 4px;
}

.emt-detail-card strong {
    color: #eef2ff;
    font-size: .82rem;
}

.emt-detail-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .04);
    color: #facc15;
    font-size: 1.15rem;
}

body.emt-modal-open {
    overflow: hidden;
}

.emt-modal[hidden] {
    display: none;
}

.emt-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.emt-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 6, 18, .78);
    backdrop-filter: blur(8px);
}

.emt-modal-dialog {
    position: relative;
    width: min(760px, 100%);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(13, 13, 36, .98), rgba(7, 7, 26, .98));
    border: 1px solid rgba(99, 102, 241, .16);
    box-shadow: 0 28px 70px rgba(0, 0, 0, .42);
    overflow: hidden;
}

.emt-modal-head,
.emt-modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(99, 102, 241, .1);
}

.emt-modal-foot {
    border-top: 1px solid rgba(99, 102, 241, .1);
    border-bottom: none;
}

.emt-modal-head h3 {
    margin: 0;
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 900;
}

.emt-modal-head p {
    margin: 4px 0 0;
    color: #8ea0bf;
    font-size: .74rem;
}

.emt-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .03);
    color: #94a3b8;
    font-size: 1.1rem;
}

.emt-modal-body {
    padding: 20px;
    display: grid;
    gap: 14px;
}

.emt-editor-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(99, 102, 241, .1);
}

.emt-editor-meta span {
    color: #8ea0bf;
    font-size: .72rem;
}

.emt-editor-meta strong {
    color: #eef2ff;
    font-size: .82rem;
}

.emt-editor-textarea {
    width: 100%;
    min-height: 280px;
    resize: vertical;
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, .16);
    background: rgba(17, 21, 43, .92);
    color: #e2e8f0;
    padding: 16px;
    outline: none;
    font-size: .8rem;
    line-height: 1.65;
    font-family: Consolas, "Courier New", monospace;
}

.emt-editor-help {
    color: #8ea0bf;
    font-size: .72rem;
    line-height: 1.6;
}

.emt-editor-feedback {
    min-height: 20px;
    font-size: .74rem;
    color: #8ea0bf;
}

.emt-editor-feedback.is-success {
    color: #86efac;
}

.emt-editor-feedback.is-error {
    color: #fca5a5;
}

.emt-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 12px;
    padding: 11px 16px;
    background: linear-gradient(135deg, #6d28d9, #8b5cf6);
    color: #fff;
    font-size: .78rem;
    font-weight: 800;
}

.emt-modal-btn-ghost {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    color: #cbd5e1;
}

.aiw-mic{
    display: none;
}
@media (max-width: 1100px) {
    .aps-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .aps-overview-grid {
        grid-template-columns: 1fr;
    }

    .emt-main {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    .aps-summary-grid,
    .aps-events-grid {
        grid-template-columns: 1fr;
    }

    .aps-overview-grid {
        grid-template-columns: 1fr;
    }

    .aps-grid {
        grid-template-columns: 1fr;
    }

    .ems-preview-grid {
        grid-template-columns: 1fr;
    }

    .aps-hero,
    .aps-card-head,
    .aps-card-body,
    .aps-footer,
    .aps-action-bar {
        padding-left: 18px;
        padding-right: 18px;
    }

    .aps-tab-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .aps-tab-nav::-webkit-scrollbar {
        display: none;
    }

    .aps-tab-btn {
        flex-shrink: 0;
    }

    .aps-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .aps-status-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .aps-field-compact,
    .aps-field[style*="max-width"] {
        max-width: none !important;
    }

    .aps-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .aps-action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .aps-action-group {
        width: 100%;
        flex-direction: column;
    }

    .aps-save {
        justify-content: center;
        width: 100%;
    }

    .ems-preview-head {
        flex-direction: column;
    }

    .ems-preview-frame {
        height: min(300px, 52vw);
    }

    .emt-control-grid,
    .emt-selector-grid,
    .emt-detail-grid {
        grid-template-columns: 1fr;
    }

    .emt-theme-item,
    .emt-mail-item {
        padding: 12px;
    }

    .emt-mail-item {
        align-items: flex-start;
    }

    .emt-mail-meta {
        margin-left: 0;
        margin-top: 6px;
    }

    .emt-mail-item {
        flex-wrap: wrap;
    }

    .emt-theme-swatches {
        gap: 5px;
    }

    .email-module-nav {
        width: 100%;
    }

    .emt-topbar,
    .emt-section-head,
    .emt-preview-head,
    .emt-modal-head,
    .emt-modal-foot {
        flex-direction: column;
        align-items: stretch;
    }

    .emt-section-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .emt-topbar-actions {
        margin-left: 0;
    }

    .emt-search-box {
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .aps-hero {
        padding-top: 22px;
        padding-bottom: 22px;
    }

    .aps-tab-btn {
        padding: 8px 12px;
        font-size: .72rem;
    }
}


/* ===== SOURCE: qa/users/index.php ===== */
/* ── Stats cards ─────────────────────────────────────── */
.um-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.um-stat-card {
    background: rgba(13, 13, 36, .9);
    border: 1px solid rgba(99, 102, 241, .12);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .4), 0 0 0 1px rgba(99, 102, 241, .05);
    backdrop-filter: blur(16px);
}

.um-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.um-stat-label {
    font-size: .7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 3px;
}

.um-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #e2e8f0;
    line-height: 1;
}

/* ── Role badges ─────────────────────────────────────── */
.rb-admin {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .65rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(99, 102, 241, .15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, .25);
}

.rb-user {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .85rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(100, 116, 139, .1);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, .2);
}

.rb-review {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .85rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(245, 158, 11, .12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, .25);
}

/* ── Action buttons ──────────────────────────────────── */
.ua-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, .15);
    background: rgba(7, 7, 30, .5);
    color: #64748b;
    cursor: pointer;
    font-size: .9rem;
    transition: all .15s ease;
    position: relative;
}

.ua-btn::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(7, 7, 26, .97);
    border: 1px solid rgba(99, 102, 241, .18);
    color: #cbd5e1;
    font-size: .65rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s, transform .15s;
    z-index: 9999;
}

.ua-btn:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.ua-btn.promote:hover {
    border-color: rgba(99, 102, 241, .4);
    color: #a5b4fc;
    background: rgba(99, 102, 241, .08);
}

.ua-btn.demote:hover {
    border-color: rgba(245, 158, 11, .4);
    color: #fbbf24;
    background: rgba(245, 158, 11, .06);
}

.ua-btn.edit:hover {
    border-color: rgba(20, 184, 166, .4);
    color: #2dd4bf;
    background: rgba(20, 184, 166, .07);
}

.ua-btn.del:hover {
    border-color: rgba(239, 68, 68, .4);
    color: #f87171;
    background: rgba(239, 68, 68, .07);
}

.ua-btn.billing:hover {
    border-color: rgba(245, 158, 11, .4);
    color: #fbbf24;
    background: rgba(245, 158, 11, .06);
}

/* ── Avatar ──────────────────────────────────────────── */
.u-avatar {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

/* ── Status pills (used in billing modal) ────────────── */
.s-success {
    background: rgba(34, 197, 94, .1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, .2);
}

.s-pending {
    background: rgba(245, 158, 11, .1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, .2);
}

.s-failed {
    background: rgba(239, 68, 68, .1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, .2);
}

.s-refunded {
    background: rgba(99, 102, 241, .1);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, .2);
}

/* ── DataTable tweaks ────────────────────────────────── */
div.dataTables_wrapper div.dataTables_paginate ul.pagination li {
    margin: 0 3px !important;
}

div.dataTables_length select {
    min-width: 60px;
}

/* ── Delete / confirm card ───────────────────────────── */
.del-card {
    width: 400px;
    background: linear-gradient(145deg, rgba(10, 10, 28, .99), rgba(7, 7, 22, .99));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(239, 68, 68, .35);
    border-radius: 20px;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, .12), 0 32px 80px rgba(0, 0, 0, .7), 0 0 60px rgba(239, 68, 68, .08);
    overflow: hidden;
    font-family: inherit;
}

.del-card-top {
    padding: 32px 28px 20px;
    text-align: center;
}

.del-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: rgba(239, 68, 68, .12);
    border: 1px solid rgba(239, 68, 68, .25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    color: #ef4444;
    margin: 0 auto 18px;
    box-shadow: 0 0 24px rgba(239, 68, 68, .15);
}

.del-card-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: -.01em;
    margin-bottom: 8px;
}

.del-card-sub {
    font-size: .8rem;
    color: #64748b;
    line-height: 1.55;
}

.del-card-sub strong {
    color: #f87171;
}

.del-card-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, .2), transparent);
}

.del-card-footer {
    padding: 18px 24px 24px;
    display: flex;
    gap: 10px;
}

.del-btn {
    flex: 1;
    padding: 11px 0;
    border: none;
    border-radius: 12px;
    font-size: .84rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.del-btn-confirm {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 4px 20px rgba(239, 68, 68, .35);
}

.del-btn-confirm:hover {
    background: linear-gradient(135deg, #f87171, #ef4444);
    transform: translateY(-1px);
}

.del-btn-cancel {
    background: rgba(51, 65, 85, .6);
    color: #94a3b8;
    border: 1px solid rgba(51, 65, 85, .8);
}

.del-btn-cancel:hover {
    background: rgba(71, 85, 105, .7);
    color: #cbd5e1;
}

/* ── Review limits section ───────────────────────────── */
.review-limits-box {
    background: rgba(245, 158, 11, .05);
    border: 1px solid rgba(245, 158, 11, .2);
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 10px;
    overflow: hidden;
    transition: max-height .3s ease, opacity .3s ease;
}

.review-limits-box .rl-title {
    font-size: .7rem;
    font-weight: 700;
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.role-access-box {
    background: rgba(99, 102, 241, .05);
    border: 1px solid rgba(99, 102, 241, .18);
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 10px;
}

.role-access-title {
    font-size: .7rem;
    font-weight: 700;
    color: #a5b4fc;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.role-access-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.access-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(99, 102, 241, .14);
    background: rgba(7, 7, 26, .45);
    color: #cbd5e1;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.access-chip:hover {
    border-color: rgba(99, 102, 241, .32);
    background: rgba(99, 102, 241, .08);
    transform: translateY(-1px);
}

.access-chip input {
    accent-color: #6366f1;
    width: 14px;
    height: 14px;
    margin: 0;
}

.access-chip span {
    font-size: .75rem;
    font-weight: 700;
}

.review-limits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.ai-limit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.rl-field label {
    display: block;
    font-size: .66rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 4px;
}

.rl-field input {
    width: 100%;
    background: rgba(0, 0, 0, .3);
    border: 1px solid rgba(245, 158, 11, .2);
    border-radius: 7px;
    color: #e2e8f0;
    font-size: .8rem;
    padding: 6px 10px;
    outline: none;
    transition: border-color .15s;
}

.rl-field input:focus {
    border-color: rgba(245, 158, 11, .5);
}

.rl-hint {
    font-size: .64rem;
    color: #475569;
    margin-top: 7px;
}

@media (max-width: 560px) {

    .role-access-grid,
    .ai-limit-grid,
    .review-limits-grid {
        grid-template-columns: 1fr;
    }
}


/* ===== SOURCE: qa/plans/index.php ===== */
.plan-card {
    background: rgba(13, 13, 36, .7);
    border: 1px solid rgba(99, 102, 241, .18);
    border-radius: 16px;
    padding: 22px;
    position: relative;
    transition: all .2s;
}

.plan-card:hover {
    border-color: rgba(99, 102, 241, .4);
    box-shadow: 0 4px 24px rgba(99, 102, 241, .12);
}

.plan-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: capitalize;
    color: #fff;
    margin-bottom: 10px;
}

.plan-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: #e2e8f0;
    line-height: 1;
}

.plan-price sup {
    font-size: 1.5rem;
    font-weight: 600;
    color: #94a3b8;
    vertical-align: -webkit-baseline-middle;
    margin-top: 0;
}

.plan-price small {
    font-size: .75rem;
    font-weight: 500;
    color: #64748b;
}

.plan-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .88rem;
    color: #94a3b8;
    padding: 5px 0;
    border-bottom: 1px solid rgba(99, 102, 241, .07);
}

.plan-feature:last-child {
    border-bottom: none;
}

.plan-feature i {
    color: #22c55e;
    font-size: .85rem;
    flex-shrink: 0;
}

.sub-row {
    background: rgba(13, 13, 36, .5);
    border: 1px solid rgba(99, 102, 241, .1);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
    transition: all .15s;
}

.sub-row:hover {
    border-color: rgba(99, 102, 241, .25);
}

.limit-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(99, 102, 241, .1);
    border: 1px solid rgba(99, 102, 241, .2);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: .78rem;
    color: #a5b4fc;
    font-weight: 600;
}

.limit-chip.limit-chip-storage {
    background: rgba(34, 197, 94, .1);
    border-color: rgba(34, 197, 94, .2);
    color: #86efac;
}

.plan-module-grid {
    display: flex;
    grid-template-columns: 1fr;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: space-evenly;
}

.plan-module-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 110px;
    gap: 10px;
    align-items: center;
    background: rgba(99, 102, 241, .08);
    border: 1px solid rgba(99, 102, 241, .15);
    border-radius: 9px;
    padding: 10px 12px;
}

.plan-module-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .76rem;
    color: #e2e8f0;
    font-weight: 600;
}

.plan-module-credit {
    width: 100%;
    background: #07071a;
    border: 1px solid rgba(99, 102, 241, .25);
    border-radius: 8px;
    color: #e2e8f0;
    padding: 8px 10px;
    font-size: .78rem;
    box-sizing: border-box;
}

.plan-module-credit:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.plan-input {
    width: 100%;
    background: #07071a;
    border: 1px solid rgba(99, 102, 241, .25);
    border-radius: 8px;
    color: #e2e8f0;
    padding: 9px 11px;
    font-size: .82rem;
    box-sizing: border-box;
}

@media (max-width:720px) {
    .plan-module-row {
        grid-template-columns: 1fr;
    }
}


/* ===== SOURCE: qa/plans/pricing.php ===== */
/* ── Shell ── */
/* .pricing-shell {
	max-width: 1340px;
	margin: 0 auto;
	padding: 8px 0 24px;
} */

/* ── Outer card ── */
.pricing-card {
    border-radius: 20px;
    background: #0d0f1e;
    border: 1px solid rgba(99, 102, 241, .22);
    overflow: hidden;
}

/* ── Header ── */
.pricing-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    gap: 14px;
}

.pricing-head-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.pricing-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.pricing-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.pricing-copy {
    font-size: .82rem;
    color: #64748b;
    margin-top: 4px;
}

.pricing-close {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-decoration: none;
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: .15s;
}

.pricing-close:hover {
    background: rgba(255, 255, 255, .08);
    color: #94a3b8;
}

/* ── Two-column layout ── */
.pricing-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 74vh;
}

.pricing-left {
    padding: 20px;
    overflow: hidden;
}

.pricing-right {
    position: fixed;
    inset: 0;
    z-index: 1055;
    padding: 28px;
    background: rgba(2, 6, 23, .74);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
}

.pricing-right.open {
    display: flex;
}

.pricing-right-inner {
    width: min(100%, 635px);
    max-height: calc(100vh - 30px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, .42) rgba(255, 255, 255, .03);
}

.pricing-right-inner::-webkit-scrollbar {
    width: 8px;
}

.pricing-right-inner::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, .03);
    border-radius: 999px;
}

.pricing-right-inner::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(99, 102, 241, .55), rgba(124, 58, 237, .5));
    border-radius: 999px;
    border: 2px solid rgba(8, 10, 24, .82);
}

.pricing-right-inner::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(129, 140, 248, .72), rgba(168, 85, 247, .66));
}

/* ── Hero features ── */
.pricing-hero {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    background: rgba(255, 255, 255, .02);
    border: 1px solid rgba(255, 255, 255, .05);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
}

.pricing-hero-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}

.pricing-hero-item:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, .05);
}

.pricing-hero-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .98rem;
    color: #fff;
    flex-shrink: 0;
}

.phi-purple {
    background: rgba(91, 33, 182, .25);
}

.phi-blue {
    background: rgba(30, 64, 175, .25);
}

.phi-green {
    background: rgba(6, 95, 70, .25);
}

.phi-amber {
    background: rgba(146, 64, 14, .25);
}

.pricing-hero-title {
    font-size: .82rem;
    font-weight: 800;
    color: #e2e8f0;
}

.pricing-hero-copy {
    font-size: .7rem;
    color: #475569;
    margin-top: 2px;
    line-height: 1.4;
}

/* ── Plans header row ── */
.pricing-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.pricing-section-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}

.pricing-section-copy {
    font-size: .76rem;
    color: #475569;
    margin-top: 4px;
}

.pricing-count {
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(99, 102, 241, .08);
    border: 1px solid rgba(99, 102, 241, .18);
    color: #a5b4fc;
    font-size: .68rem;
    font-weight: 800;
    white-space: nowrap;
    flex-shrink: 0;
}

.pricing-tabs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 6px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .06);
}

.pricing-tab {
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: #94a3b8;
    font-size: .78rem;
    font-weight: 800;
    cursor: pointer;
    transition: .18s ease;
}

.pricing-tab:hover {
    color: #e2e8f0;
    border-color: rgba(99, 102, 241, .16);
    background: rgba(99, 102, 241, .06);
}

.pricing-tab.active {
    color: #fff;
    border-color: rgba(124, 58, 237, .34);
    background: linear-gradient(135deg, rgba(79, 70, 229, .22), rgba(124, 58, 237, .18));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

/* ── Plan cards — horizontal scroll ── */
.pricing-grid {
    display: flex;
    gap: 43px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    flex-wrap: wrap;
}

.pricing-grid::-webkit-scrollbar {
    height: 4px;
}

.pricing-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, .02);
    border-radius: 2px;
}

.pricing-grid::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, .25);
    border-radius: 2px;
}

/* ── Single plan card ── */
.pricing-plan {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    border: 1.5px solid rgba(255, 255, 255, .09);
    background: rgba(255, 255, 255, .025);
    cursor: pointer;
    transition: .18s ease;
    overflow: hidden;
    min-height: 440px;
    height: 100%;
}

.pricing-plan:hover {
    border-color: rgba(99, 102, 241, .4);
    transform: translateY(-2px);
}

.pricing-plan.active {
    border-color: #7c3aed;
    background: linear-gradient(160deg, rgba(76, 29, 149, .12), rgba(30, 27, 75, .1));
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .12);
}

.pricing-plan.disabled {
    cursor: not-allowed;
    opacity: .62;
}

.pricing-plan-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* card top row: icon + badge */
.pricing-plan-top-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.pricing-plan-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.pricing-plan-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: .62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* plan name, price, description */
.pricing-plan-name {
    font-size: 1.18rem;
    font-weight: 800;
    color: #fff;
}

.pricing-plan-price {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    margin-top: 6px;
    line-height: 1;
}

.pricing-plan-price-main {
    font-size: 2.1rem;
    font-weight: 900;
    color: #fff;
}

.pricing-plan-price-period {
    font-size: .72rem;
    color: #475569;
    margin-bottom: 5px;
    margin-left: 3px;
}

.pricing-plan-desc {
    font-size: .76rem;
    color: #475569;
    margin-top: 8px;
    line-height: 1.5;
}

/* features */
.pricing-plan-features {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.pricing-plan-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .77rem;
    color: #cbd5e1;
}

.pricing-plan-feature .pf-check {
    color: #4ade80;
    flex-shrink: 0;
    font-size: .9rem;
}

/* module credits section */
.pricing-plan-credits-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, .06);
    margin-bottom: 8px;
}

.pricing-plan-credits-hd span {
    font-size: .6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #475569;
}

.pricing-plan-credit-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 0;
}

.pricing-plan-credit-left {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    flex: 1;
}

.pricing-plan-credit-dot {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: rgba(99, 102, 241, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pricing-plan-credit-dot i {
    font-size: .65rem;
    color: #a5b4fc;
}

.pricing-plan-credit-name {
    font-size: .74rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pricing-plan-credit-val {
    font-size: .74rem;
    font-weight: 700;
    color: #c7d2fe;
    white-space: nowrap;
}

.pricing-plan-more {
    font-size: .7rem;
    color: #6366f1;
    padding: 6px 0 2px;
    cursor: default;
}

/* plan action button row */
.pricing-plan-btn-row {
    padding: 12px 18px 16px;
}

.pricing-plan-btn {
    display: block;
    width: 100%;
    padding: 11px;
    border-radius: 12px;
    font-size: .82rem;
    font-weight: 800;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: .15s;
}

.pricing-plan-btn.ppb-active {
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff;
    cursor: default;
}

.pricing-plan-btn.ppb-select {
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    color: #fff;
    box-shadow: 0 6px 18px rgba(99, 102, 241, .22);
}

.pricing-plan-btn.ppb-select:hover {
    opacity: .9;
}

/* ══════════════════════════════════════
   CHECKOUT RIGHT PANEL
══════════════════════════════════════ */
.checkout-card {
    background: rgba(255, 255, 255, .02);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .07);
    overflow: hidden;
    position: relative;
    box-shadow: 0 26px 70px rgba(2, 6, 23, .45);
}

/* checkout header */
.checkout-hd {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.checkout-cart-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(99, 102, 241, .14);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a5b4fc;
    font-size: .95rem;
}

.checkout-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
}

.checkout-close {
    margin-left: auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .04);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.05rem;
}

.checkout-close:hover {
    background: rgba(255, 255, 255, .08);
    color: #e2e8f0;
}

/* checkout body */
.checkout-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* blocks */
.checkout-block {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.checkout-lbl {
    font-size: .6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #475569;
}

/* selected plan box */
.checkout-sel-box {
    border-radius: 14px;
    border: 1px solid rgba(99, 102, 241, .22);
    background: rgba(99, 102, 241, .06);
    padding: 13px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.checkout-sel-info strong {
    display: block;
    font-size: .92rem;
    font-weight: 800;
    color: #fff;
}

.checkout-sel-price {
    display: block;
    margin-top: 4px;
    font-size: .8rem;
    color: #a5b4fc;
    font-weight: 700;
}

.checkout-sel-meta {
    display: block;
    margin-top: 4px;
    font-size: .7rem;
    color: #475569;
}

.checkout-change-btn {
    padding: 6px 11px;
    border-radius: 8px;
    background: rgba(139, 92, 246, .14);
    border: 1px solid rgba(139, 92, 246, .28);
    color: #a78bfa;
    font-size: .7rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.checkout-change-btn:hover {
    background: rgba(139, 92, 246, .22);
}

.checkout-empty-state {
    color: #475569;
    font-size: .78rem;
    text-align: center;
    padding: 14px;
    background: rgba(255, 255, 255, .02);
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, .06);
}

/* billing cycle */
.checkout-cycle {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.checkout-cyc-card {
    padding: 11px 12px;
    border-radius: 13px;
    border: 1.5px solid rgba(255, 255, 255, .07);
    background: rgba(255, 255, 255, .02);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: .15s;
    position: relative;
    overflow: hidden;
}

.checkout-cyc-card.active {
    border-color: #4f46e5;
    background: rgba(79, 70, 229, .09);
}

.checkout-cyc-info strong {
    display: block;
    font-size: .82rem;
    color: #fff;
    font-weight: 700;
}

.checkout-cyc-info span {
    display: block;
    margin-top: 3px;
    font-size: .68rem;
    color: #475569;
}

.checkout-cyc-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .65rem;
    margin-left: auto;
    flex-shrink: 0;
}

.checkout-cyc-badge {
    padding: 2px 7px;
    border-radius: 5px;
    background: rgba(59, 130, 246, .14);
    border: 1px solid rgba(59, 130, 246, .22);
    color: #93c5fd;
    font-size: .59rem;
    font-weight: 800;
    white-space: nowrap;
    margin-left: auto;
    flex-shrink: 0;
}

/* billing form */
.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkout-field label {
    display: block;
    font-size: .68rem;
    color: #64748b;
    margin-bottom: 6px;
    font-weight: 600;
}

.checkout-input {
    width: 100%;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 11px;
    color: #e2e8f0;
    padding: 10px 13px;
    font-size: .8rem;
    box-sizing: border-box;
    outline: none;
    transition: .15s;
}

.checkout-input:focus {
    border-color: rgba(99, 102, 241, .4);
}

.checkout-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.checkout-phone-wrap {
    display: flex;
    gap: 7px;
}

.checkout-phone-code {
    flex-shrink: 0;
    width: 100px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 11px;
    color: #e2e8f0;
    padding: 10px 8px;
    font-size: .78rem;
    outline: none;
}

.checkout-phone-code option {
    background: #1e1b4b;
}

/* payment method tabs */
.checkout-gateway-tabs {
    display: flex;
    gap: 8px;
}

.checkout-gateway-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 8px;
    border-radius: 12px;
    border: 1.5px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .02);
    cursor: pointer;
    transition: .15s;
    min-width: 0;
}

.checkout-gateway-tab:hover {
    border-color: rgba(99, 102, 241, .3);
}

.checkout-gateway-tab.active {
    border-color: #7c3aed;
    background: rgba(124, 58, 237, .1);
}

.checkout-gateway-tab.disabled {
    opacity: .5;
    cursor: not-allowed;
}

.checkout-gateway-tab i {
    font-size: 1.05rem;
    color: #64748b;
}

.checkout-gateway-tab.active i {
    color: #a78bfa;
}

.checkout-gateway-tab span {
    font-size: .68rem;
    color: #64748b;
    font-weight: 600;
    text-align: center;
}

.checkout-gateway-tab.active span {
    color: #c4b5fd;
}

/* security note */
.checkout-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #374151;
    font-size: .7rem;
    padding: 2px 0;
}

/* message */
.checkout-message {
    display: none;
    font-size: .75rem;
    border-radius: 10px;
    padding: 10px 12px;
}

/* CTA button */
.checkout-btn-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    border-radius: 14px;
    font-size: .88rem;
    font-weight: 800;
    border: none;
    cursor: pointer;
    background: linear-gradient(90deg, #7c3aed, #4f46e5);
    color: #fff;
    box-shadow: 0 8px 24px rgba(99, 102, 241, .28);
    transition: .15s;
}

.checkout-btn-cta:disabled {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
}

.checkout-btn-cta:not(:disabled):hover {
    opacity: .92;
}

/* footer security badges */
.checkout-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid rgba(255, 255, 255, .05);
}

.checkout-footer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
}

.checkout-footer-item:first-child {
    border-right: 1px solid rgba(255, 255, 255, .05);
}

.checkout-footer-item>i {
    font-size: 1.15rem;
    color: #374151;
    flex-shrink: 0;
}

.checkout-footer-item strong {
    display: block;
    font-size: .7rem;
    color: #64748b;
    font-weight: 700;
}

.checkout-footer-item span {
    display: block;
    font-size: .62rem;
    color: #374151;
    margin-top: 2px;
    line-height: 1.35;
}

/* PayPal button container */
#paypalButtonContainer {
    display: none;
    border-radius: 14px;
    overflow: hidden;
}

#paypalButtonContainer.visible {
    display: block;
}

/* ── Checkout step wizard ── */
.co-steps {
    display: flex;
    align-items: center;
    padding: 14px 18px 0;
}

.co-step {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.co-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
    border: 1.5px solid rgba(255, 255, 255, .11);
    color: #475569;
    font-size: .7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .18s;
}

.co-step-label {
    font-size: .67rem;
    color: #475569;
    font-weight: 600;
}

.co-step.active .co-step-num {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
}

.co-step.active .co-step-label {
    color: #a5b4fc;
}

.co-step.done .co-step-num {
    background: rgba(16, 185, 129, .15);
    border-color: #10b981;
    color: #4ade80;
}

.co-step.done .co-step-label {
    color: #4ade80;
}

.co-step-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, .07);
    margin: 0 8px;
}

.checkout-btn-back {
    flex-shrink: 0;
    padding: 13px 16px;
    border-radius: 14px;
    font-size: .82rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .04);
    color: #94a3b8;
    cursor: pointer;
    transition: .15s;
}

.checkout-btn-back:hover {
    background: rgba(255, 255, 255, .09);
    color: #e2e8f0;
}

.co-nav-row {
    display: flex;
    gap: 8px;
}

.co-nav-row .checkout-btn-cta {
    flex: 1;
}

.co-step-msg {
    display: none;
    font-size: .75rem;
    border-radius: 10px;
    padding: 9px 12px;
    color: #fbbf24;
    background: rgba(120, 53, 15, .18);
    border: 1px solid rgba(245, 158, 11, .22);
}

/* ── Responsive ── */
@media(max-width:1060px) {
    .pricing-layout {
        grid-template-columns: 1fr;
    }
}

@media(max-width:860px) {
    .pricing-layout {
        grid-template-columns: 1fr;
    }

    .pricing-left {
        border-bottom: 1px solid rgba(255, 255, 255, .06);
    }

    .pricing-right {
        padding: 18px;
        align-items: flex-start;
    }

    .pricing-right-inner {
        width: 100%;
        max-height: none;
    }
}

@media(max-width:640px) {
    .pricing-hero {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-hero-item:nth-child(2) {
        border-right: none;
    }

    .pricing-hero-item:nth-child(2n) {
        border-right: none;
    }

    .pricing-hero-item:nth-child(odd):not(:last-child) {
        border-right: 1px solid rgba(255, 255, 255, .05);
    }

    .checkout-cycle {
        grid-template-columns: 1fr;
    }

    .checkout-row2 {
        grid-template-columns: 1fr;
    }

    .checkout-footer {
        grid-template-columns: 1fr;
    }

    .checkout-footer-item:first-child {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, .05);
    }
}


/* ===== SOURCE: qa/plans/success.php ===== */
.purchase-shell {
    max-width: 980px;
    margin: 0 auto;
}

.purchase-card {
    border-radius: 28px;
    padding: 28px;
    background: linear-gradient(180deg, rgba(99, 102, 241, .12), rgba(13, 13, 36, .9));
    border: 1px solid rgba(99, 102, 241, .18);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .28);
}

.purchase-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.purchase-check {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.8rem;
    box-shadow: 0 18px 40px rgba(34, 197, 94, .28);
}

.purchase-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
}

.purchase-subtitle {
    font-size: .86rem;
    color: #9fb0d1;
    margin-top: 8px;
    max-width: 560px;
}

.purchase-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.purchase-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 14px;
    text-decoration: none;
    font-size: .82rem;
    font-weight: 800;
}

.purchase-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
}

.purchase-btn-secondary {
    background: rgba(255, 255, 255, .04);
    color: #dbe4ff;
    border: 1px solid rgba(99, 102, 241, .18);
}

.purchase-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 18px;
}

.purchase-panel {
    border-radius: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(99, 102, 241, .1);
}

.purchase-panel-title {
    font-size: .95rem;
    font-weight: 800;
    color: #eef2ff;
    margin-bottom: 14px;
}

.purchase-kv {
    display: grid;
    gap: 10px;
}

.purchase-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(8, 12, 28, .45);
    border: 1px solid rgba(99, 102, 241, .08);
}

.purchase-row-label {
    font-size: .72rem;
    color: #8ea0bf;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.purchase-row-value {
    font-size: .84rem;
    color: #fff;
    font-weight: 700;
    text-align: right;
}

.purchase-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800;
    color: #fff;
}

.purchase-list {
    display: grid;
    gap: 8px;
}

.purchase-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(99, 102, 241, .08);
    color: #dbe4ff;
    font-size: .8rem;
}

.purchase-note {
    margin-top: 16px;
    font-size: .78rem;
    color: #94a3b8;
    line-height: 1.65;
}

@media(max-width:900px) {
    .purchase-grid {
        grid-template-columns: 1fr;
    }
}


/* ===== SOURCE: qa/payment_gateway/index.php ===== */
.gw-card {
    background: rgba(13, 13, 36, .7);
    border: 2px solid rgba(99, 102, 241, .15);
    border-radius: 18px;
    padding: 22px;
    transition: all .2s;
    position: relative;
}

.gw-card.enabled {
    border-color: rgba(34, 197, 94, .3);
    box-shadow: 0 0 0 1px rgba(34, 197, 94, .1);
}

.gw-card:hover {
    border-color: rgba(99, 102, 241, .35);
}

.gw-logo {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    flex-shrink: 0;
}

.toggle-sw {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle-sw input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-track {
    position: absolute;
    inset: 0;
    background: rgba(99, 102, 241, .15);
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, .25);
    transition: .2s;
}

.toggle-track::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    top: 2px;
    background: #94a3b8;
    border-radius: 50%;
    transition: .2s;
}

input:checked+.toggle-track {
    background: rgba(34, 197, 94, .25);
    border-color: rgba(34, 197, 94, .4);
}

input:checked+.toggle-track::before {
    transform: translateX(20px);
    background: #22c55e;
}

.tx-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(99, 102, 241, .08);
}

.tx-row:last-child {
    border: none;
}

.status-pill {
    padding: 2px 10px;
    border-radius: 20px;
    font-size: .62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.status-pill.success {
    background: rgba(34, 197, 94, .15);
    color: #22c55e;
}

.status-pill.pending {
    background: rgba(245, 158, 11, .15);
    color: #f59e0b;
}

.status-pill.failed {
    background: rgba(239, 68, 68, .15);
    color: #ef4444;
}

.cred-field {
    margin-bottom: 12px;
}

.cred-field label {
    font-size: .7rem;
    color: #94a3b8;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
    letter-spacing: .05em;
}

.cred-input-wrap {
    position: relative;
}

.cred-input {
    width: 100%;
    background: #07071a;
    border: 1px solid rgba(99, 102, 241, .25);
    border-radius: 8px;
    color: #e2e8f0;
    padding: 9px 40px 9px 11px;
    font-size: .8rem;
    box-sizing: border-box;
    font-family: monospace;
}

.cred-input:focus {
    outline: none;
    border-color: rgba(99, 102, 241, .5);
}

.toggle-vis {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: .95rem;
    padding: 2px;
}

.currency-chip {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(99, 102, 241, .1);
    border: 1px solid rgba(99, 102, 241, .15);
    border-radius: 6px;
    font-size: .62rem;
    color: #a5b4fc;
    font-weight: 600;
    margin: 2px;
}


/* ===== SOURCE: qa/payment_webhooks/index.php ===== */
.wh-card {
    background: rgba(13, 13, 36, .72);
    border: 1px solid rgba(99, 102, 241, .14);
    border-radius: 18px;
}

.wh-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 24px;
}

.wh-stat-card {
    padding: 18px;
    border-radius: 16px;
    background: rgba(13, 13, 36, .72);
    border: 1px solid rgba(99, 102, 241, .14);
}

.wh-stat-label {
    font-size: .68rem;
    color: #8ea0bf;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.wh-stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    margin-top: 8px;
}

.wh-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.wh-endpoint-box {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(99, 102, 241, .08);
    border: 1px solid rgba(99, 102, 241, .16);
}

.wh-endpoint-url {
    font-size: .82rem;
    color: #fff;
    font-family: Consolas, monospace;
    word-break: break-all;
    margin-top: 6px;
}

.wh-table-wrap {
    overflow: auto;
    border-radius: 18px;
    border: 1px solid rgba(99, 102, 241, .12);
}

.wh-table {
    width: 100%;
    min-width: 1080px;
    border-collapse: collapse;
    background: rgba(255, 255, 255, .02);
}

.wh-table th,
.wh-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(99, 102, 241, .08);
    font-size: .78rem;
    vertical-align: top;
}

.wh-table th {
    font-size: .66rem;
    color: #8ea0bf;
    text-transform: uppercase;
    letter-spacing: .08em;
    background: rgba(99, 102, 241, .04);
}

.wh-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .64rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.wh-chip.success {
    background: rgba(34, 197, 94, .14);
    color: #4ade80;
}

.wh-chip.failed {
    background: rgba(239, 68, 68, .14);
    color: #f87171;
}

.wh-chip.ignored,
.wh-chip.skipped,
.wh-chip.received,
.wh-chip.pending {
    background: rgba(245, 158, 11, .14);
    color: #fbbf24;
}

.wh-chip.verified {
    background: rgba(59, 130, 246, .14);
    color: #93c5fd;
}

.wh-chip.stripe {
    background: rgba(99, 91, 255, .16);
    color: #c7d2fe;
}

.wh-chip.paypal {
    background: rgba(0, 48, 135, .18);
    color: #93c5fd;
}

.wh-cell-title {
    font-size: .86rem;
    font-weight: 700;
    color: #fff;
}

.wh-cell-subtitle {
    font-size: .78rem;
    color: #8ea0bf;
    margin-top: 5px;
    word-break: break-all;
}

.wh-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(99, 102, 241, .2);
    background: rgba(99, 102, 241, .1);
    color: #dbe4ff;
    font-size: .74rem;
    font-weight: 700;
    cursor: pointer;
}

.wh-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(2, 6, 23, .72);
    backdrop-filter: blur(8px);
}

.wh-modal.is-open {
    display: flex;
}

.wh-modal-dialog {
    width: min(1120px, 100%);
    max-height: min(88vh, 920px);
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(9, 12, 32, .98), rgba(10, 14, 30, .98));
    border: 1px solid rgba(99, 102, 241, .16);
    box-shadow: 0 30px 80px rgba(2, 6, 23, .45);
    overflow: hidden;
}

.wh-modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(99, 102, 241, .12);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.wh-modal-title {
    font-size: 1.08rem;
    font-weight: 800;
    color: #fff;
}

.wh-modal-subtitle {
    font-size: .78rem;
    color: #8ea0bf;
    margin-top: 6px;
}

.wh-modal-close {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(99, 102, 241, .16);
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    color: #dbe4ff;
    font-size: 1.2rem;
    cursor: pointer;
}

.wh-modal-body {
    padding: 22px;
    overflow: auto;
    display: grid;
    gap: 18px;
}

.wh-modal-body::-webkit-scrollbar {
    width: 8px;
}

.wh-modal-body::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, .35);
    border-radius: 999px;
}

.wh-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.wh-detail-card {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(99, 102, 241, .12);
}

.wh-detail-label {
    font-size: .66rem;
    color: #8ea0bf;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.wh-detail-value {
    font-size: .84rem;
    font-weight: 700;
    color: #fff;
    margin-top: 6px;
    word-break: break-word;
}

.wh-json-card {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(99, 102, 241, .12);
}

.wh-json-title {
    font-size: .82rem;
    font-weight: 800;
    color: #eef2ff;
    margin-bottom: 12px;
}

.wh-json-pre {
    margin: 0;
    padding: 16px;
    border-radius: 14px;
    background: rgba(2, 6, 23, .72);
    border: 1px solid rgba(148, 163, 184, .12);
    color: #cbd5e1;
    font-size: .75rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: Consolas, monospace;
    max-height: 320px;
    overflow: auto;
}

@media (max-width: 980px) {

    .wh-stat-grid,
    .wh-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {

    .wh-stat-grid,
    .wh-detail-grid {
        grid-template-columns: 1fr;
    }

    .wh-modal {
        padding: 12px;
    }

    .wh-modal-body,
    .wh-modal-header {
        padding: 16px;
    }
}


/* ===== SOURCE: qa/credit_management/logs.php ===== */
.cl-wrap {
    display: grid;
    gap: 18px;
}

.cl-card,
.cl-hero {
    background: linear-gradient(145deg, rgba(13, 13, 36, .96), rgba(7, 7, 26, .96));
    border: 1px solid rgba(99, 102, 241, .16);
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, .22);
}

.cl-hero {
    padding: 26px 28px;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, .16), transparent 34%),
        radial-gradient(circle at left center, rgba(99, 102, 241, .15), transparent 28%),
        linear-gradient(145deg, rgba(13, 13, 36, .96), rgba(7, 7, 26, .96));
}

.cl-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #eef2ff;
    margin: 0 0 8px;
}

.cl-copy {
    margin: 0;
    color: #94a3b8;
    font-size: .88rem;
    line-height: 1.65;
    max-width: 760px;
}

.cl-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.cl-stat {
    padding: 16px;
    border-radius: 16px;
    background: rgba(7, 7, 26, .74);
    border: 1px solid rgba(99, 102, 241, .14);
}

.cl-stat-label {
    font-size: .65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #93c5fd;
    margin-bottom: 7px;
}

.cl-stat-value {
    font-size: 1.22rem;
    font-weight: 900;
    color: #f8fafc;
}

.cl-card-head {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(99, 102, 241, .1);
}

.cl-card-title {
    font-size: .94rem;
    font-weight: 800;
    color: #e2e8f0;
}

.cl-card-sub {
    font-size: .74rem;
    color: #64748b;
    margin-top: 3px;
}

.cl-card-body {
    padding: 18px 20px 20px;
}

.cl-filters {
    display: grid;
    grid-template-columns: 2fr repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.cl-input,
.cl-select {
    width: 100%;
    background: rgba(7, 7, 26, .82);
    border: 1px solid rgba(99, 102, 241, .18);
    border-radius: 11px;
    color: #e2e8f0;
    padding: 10px 12px;
    font-size: .82rem;
    outline: none;
}

.cl-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.cl-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 11px;
    border: 1px solid rgba(99, 102, 241, .24);
    background: rgba(99, 102, 241, .12);
    color: #c7d2fe;
    font-size: .78rem;
    font-weight: 800;
    text-decoration: none;
}

.cl-btn.primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    color: #fff;
}

.cl-btn.sm {
    padding: 8px 11px;
    font-size: .72rem;
    border-radius: 10px;
}

.cl-table-wrap {
    overflow: auto;
}

.cl-table {
    width: 100%;
    border-collapse: collapse;
}

.cl-table th {
    padding: 10px 12px;
    font-size: .62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #93c5fd;
    border-bottom: 1px solid rgba(99, 102, 241, .12);
    text-align: left;
    white-space: nowrap;
}

.cl-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(99, 102, 241, .08);
    font-size: .78rem;
    color: #cbd5e1;
    vertical-align: top;
}

.cl-breakdown {
    display: grid;
    gap: 6px;
    min-width: 280px;
}

.cl-break-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(99, 102, 241, .12);
}

.cl-break-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cl-break-label {
    color: #94a3b8;
    font-size: .72rem;
}

.cl-break-value {
    color: #f8fafc;
    font-size: .74rem;
    font-weight: 700;
    text-align: right;
}

.cl-break-note {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, .6);
    border: 1px solid rgba(99, 102, 241, .12);
    color: #94a3b8;
    font-size: .72rem;
}

.cl-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
}

.cl-badge.success {
    background: rgba(34, 197, 94, .12);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, .18);
}

.cl-badge.blocked {
    background: rgba(239, 68, 68, .12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, .18);
}

.cl-badge.free {
    background: rgba(56, 189, 248, .12);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, .18);
}

.cl-badge.unlimited {
    background: rgba(250, 204, 21, .12);
    color: #fde68a;
    border: 1px solid rgba(250, 204, 21, .18);
}

.cl-badge.failed {
    background: rgba(148, 163, 184, .12);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, .16);
}

.cl-empty {
    text-align: center;
    padding: 34px 16px;
    color: #64748b;
}

.cl-reason-preview {
    display: block;
    margin-top: 8px;
    color: #fda4af;
    font-size: .7rem;
    line-height: 1.5;
    max-width: 220px;
}

.cl-modal {
    position: fixed;
    inset: 0;
    z-index: 2050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(2, 6, 23, .74);
    backdrop-filter: blur(8px);
}

.cl-modal.is-open {
    display: flex;
}

.cl-modal-dialog {
    width: min(680px, 100%);
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(9, 12, 32, .98), rgba(10, 14, 30, .98));
    border: 1px solid rgba(99, 102, 241, .16);
    box-shadow: 0 24px 70px rgba(2, 6, 23, .45);
}

.cl-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(99, 102, 241, .12);
}

.cl-modal-title {
    font-size: 1rem;
    font-weight: 800;
    color: #eef2ff;
}

.cl-modal-sub {
    font-size: .74rem;
    color: #8ea0bf;
    margin-top: 4px;
}

.cl-modal-close {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, .18);
    background: rgba(255, 255, 255, .04);
    color: #dbe4ff;
    font-size: 1rem;
}

.cl-modal-body {
    padding: 20px;
    display: grid;
    gap: 14px;
}

.cl-modal-card {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(99, 102, 241, .12);
}

.cl-modal-label {
    font-size: .68rem;
    color: #8ea0bf;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.cl-modal-value {
    font-size: .82rem;
    color: #eef2ff;
    line-height: 1.65;
    margin-top: 8px;
    word-break: break-word;
}

@media (max-width:1100px) {
    .cl-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cl-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width:680px) {

    .cl-filters,
    .cl-stats {
        grid-template-columns: 1fr;
    }

    .cl-hero,
    .cl-card-head,
    .cl-card-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .cl-modal {
        padding: 12px;
    }

    .cl-modal-head,
    .cl-modal-body {
        padding: 16px;
    }
}


/* ===== SOURCE: qa/credit_management/module_rules.php ===== */
.cm-wrap {
    display: grid;
    gap: 18px;
}

.cm-hero,
.cm-card {
    background: linear-gradient(145deg, rgba(13, 13, 36, .96), rgba(7, 7, 26, .96));
    border: 1px solid rgba(99, 102, 241, .16);
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, .22);
}

.cm-hero {
    padding: 28px 30px;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, .18), transparent 30%),
        radial-gradient(circle at left center, rgba(99, 102, 241, .16), transparent 26%),
        linear-gradient(145deg, rgba(13, 13, 36, .96), rgba(7, 7, 26, .96));
}

.cm-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #93c5fd;
    margin-bottom: 10px;
}

.cm-kicker:before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #22d3ee;
    box-shadow: 0 0 12px rgba(34, 211, 238, .7);
}

.cm-title {
    font-size: 1.7rem;
    font-weight: 800;
    color: #eef2ff;
    margin: 0 0 8px;
}

.cm-copy {
    font-size: .88rem;
    color: #94a3b8;
    line-height: 1.65;
    max-width: 760px;
    margin: 0;
}

.cm-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.cm-stat {
    padding: 16px;
    border-radius: 16px;
    background: rgba(7, 7, 26, .72);
    border: 1px solid rgba(99, 102, 241, .15);
}

.cm-stat-label {
    font-size: .65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #93c5fd;
    margin-bottom: 7px;
}

.cm-stat-value {
    font-size: 1.25rem;
    font-weight: 900;
    color: #f8fafc;
}

.cm-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(99, 102, 241, .1);
}

.cm-card-title {
    font-size: .95rem;
    font-weight: 800;
    color: #e2e8f0;
}

.cm-card-sub {
    font-size: .74rem;
    color: #64748b;
    margin-top: 3px;
}

.cm-card-body {
    padding: 18px 20px 20px;
}

.cm-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.cm-input,
.cm-select,
.cm-textarea {
    width: 100%;
    background: rgba(7, 7, 26, .82);
    border: 1px solid rgba(99, 102, 241, .18);
    border-radius: 11px;
    color: #e2e8f0;
    padding: 10px 12px;
    font-size: .82rem;
    outline: none;
}

.cm-input:focus,
.cm-select:focus,
.cm-textarea:focus {
    border-color: rgba(99, 102, 241, .45);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .12);
}

.cm-textarea {
    min-height: 110px;
    resize: vertical;
}

.cm-search {
    max-width: 260px;
}

.cm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 11px;
    border: 1px solid rgba(99, 102, 241, .24);
    background: rgba(99, 102, 241, .12);
    color: #c7d2fe;
    font-size: .78rem;
    font-weight: 800;
    cursor: pointer;
}

.cm-btn.primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    box-shadow: 0 10px 22px rgba(99, 102, 241, .24);
}

.cm-btn.danger {
    background: rgba(239, 68, 68, .1);
    border-color: rgba(239, 68, 68, .2);
    color: #fca5a5;
}

.cm-table-wrap {
    overflow: auto;
}

.cm-table {
    width: 100%;
    border-collapse: collapse;
}

.cm-table--module-rules .cm-col-actions,
.cm-table--request-types .cm-col-actions {
    width: 1%;
    white-space: nowrap;
}

.cm-table--request-types .cm-col-keywords {
    width: 44%;
}

.cm-table th {
    padding: 10px 12px;
    font-size: .62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #93c5fd;
    border-bottom: 1px solid rgba(99, 102, 241, .12);
    text-align: left;
    white-space: nowrap;
}

.cm-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(99, 102, 241, .08);
    font-size: .78rem;
    color: #cbd5e1;
    vertical-align: top;
}

.cm-table tr:last-child td {
    border-bottom: none;
}

.cm-table tbody tr:hover td {
    background: rgba(99, 102, 241, .03);
}

.cm-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
}

.cm-chip.on {
    background: rgba(34, 197, 94, .12);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, .18);
}

.cm-chip.off {
    background: rgba(148, 163, 184, .12);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, .16);
}

.cm-actions {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
}

.cm-actions .cm-btn {
    padding: 9px 12px;
    white-space: nowrap;
}

.cm-td-actions {
    padding-right: 6px;
}

.cm-switch {
    position: relative;
    width: 42px;
    height: 24px;
    display: inline-block;
}

.cm-switch input {
    display: none;
}

.cm-slider {
    position: absolute;
    inset: 0;
    background: rgba(148, 163, 184, .28);
    border-radius: 999px;
    cursor: pointer;
    transition: .2s;
}

.cm-slider:before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .2s;
}

.cm-switch input:checked+.cm-slider {
    background: linear-gradient(135deg, #22c55e, #14b8a6);
}

.cm-switch input:checked+.cm-slider:before {
    transform: translateX(18px);
}

.cm-empty {
    text-align: center;
    padding: 30px 16px;
    color: #64748b;
}

.cm-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.cm-field {
    display: grid;
    gap: 7px;
}

.cm-field.full {
    grid-column: 1/-1;
}

.cm-label {
    font-size: .72rem;
    font-weight: 800;
    color: #cbd5e1;
}

.cm-keyword-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    max-width: 540px;
}

.cm-keyword-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(99, 102, 241, .1);
    border: 1px solid rgba(99, 102, 241, .16);
    color: #c7d2fe;
    font-size: .67rem;
    font-weight: 700;
    line-height: 1.2;
}

.cm-keyword-empty {
    font-size: .72rem;
    color: #64748b;
    font-style: italic;
}

@media (max-width:900px) {

    .cm-stats,
    .cm-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width:980px) {
    .cm-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .cm-keyword-stack {
        max-width: none;
    }
}

@media (max-width:680px) {

    .cm-stats,
    .cm-grid {
        grid-template-columns: 1fr;
    }

    .cm-hero,
    .cm-card-head,
    .cm-card-body {
        padding-left: 16px;
        padding-right: 16px;
    }
}


/* ===== SOURCE: qa/credit_management/settings.php ===== */
.gs-wrap {
    display: grid;
    gap: 18px;
}

.gs-hero,
.gs-card {
    background: linear-gradient(145deg, rgba(13, 13, 36, .96), rgba(7, 7, 26, .96));
    border: 1px solid rgba(99, 102, 241, .16);
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, .22);
}

.gs-hero {
    padding: 28px 30px;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, .14), transparent 30%),
        radial-gradient(circle at left center, rgba(99, 102, 241, .16), transparent 26%),
        linear-gradient(145deg, rgba(13, 13, 36, .96), rgba(7, 7, 26, .96));
}

.gs-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #eef2ff;
    margin: 0 0 8px;
}

.gs-copy {
    margin: 0;
    color: #94a3b8;
    font-size: .88rem;
    line-height: 1.65;
    max-width: 760px;
}

.gs-card-head {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(99, 102, 241, .1);
}

.gs-card-title {
    font-size: .95rem;
    font-weight: 800;
    color: #e2e8f0;
}

.gs-card-sub {
    font-size: .74rem;
    color: #64748b;
    margin-top: 3px;
}

.gs-card-body {
    padding: 20px;
}

.gs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.gs-field {
    display: grid;
    gap: 8px;
}

.gs-label {
    font-size: .74rem;
    font-weight: 800;
    color: #cbd5e1;
}

.gs-input,
.gs-select {
    width: 100%;
    background: rgba(7, 7, 26, .82);
    border: 1px solid rgba(99, 102, 241, .18);
    border-radius: 11px;
    color: #e2e8f0;
    padding: 10px 12px;
    font-size: .82rem;
    outline: none;
}

.gs-notice {
    padding: 14px 16px;
    border-radius: 14px;
    font-size: .84rem;
    font-weight: 700;
}

.gs-notice.success {
    background: rgba(34, 197, 94, .12);
    border: 1px solid rgba(34, 197, 94, .18);
    color: #86efac;
}

.gs-actions {
    display: flex;
    justify-content: flex-end;
    padding: 0 20px 20px;
}

.gs-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: .82rem;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(99, 102, 241, .28);
}

@media (max-width:768px) {
    .gs-grid {
        grid-template-columns: 1fr;
    }

    .gs-hero,
    .gs-card-head,
    .gs-card-body,
    .gs-actions {
        padding-left: 16px;
        padding-right: 16px;
    }
}


/* ===== SOURCE: qa/agency/index.php ===== */
.ag-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.ag-stat-card {
    background: rgba(13, 13, 36, .9);
    border: 1px solid rgba(99, 102, 241, .12);
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ag-stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.ag-stat-label {
    font-size: .68rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 2px;
}

.ag-stat-val {
    font-size: 1.4rem;
    font-weight: 800;
    color: #e2e8f0;
    line-height: 1;
}

.ag-credits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 22px;
}

.ag-credit-card {
    background: rgba(7, 7, 26, .7);
    border: 1px solid rgba(99, 102, 241, .12);
    border-radius: 12px;
    padding: 14px 16px;
}

.ag-credit-name {
    font-size: .68rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 6px;
}

.ag-credit-val {
    font-size: 1.2rem;
    font-weight: 800;
    color: #e2e8f0;
}

.ag-credit-label {
    font-size: .65rem;
    color: #475569;
    margin-top: 2px;
}

.ag-table-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px 8px;
}

.ag-table-card-title {
    font-size: .78rem;
    font-weight: 700;
    color: #94a3b8;
}

.ag-table-card-count {
    color: #64748b;
    font-weight: 400;
}

.ag-table-card .dataTables_wrapper {
    padding: 0 16px 16px;
}

.ag-table-card .dt-top-bar,
.ag-table-card .dt-bottom-bar {
    padding-left: 4px;
    padding-right: 4px;
}

.ag-table-card .dataTables_filter {
    margin-left: auto;
}

.ag-table-card .dataTables_filter label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: .78rem;
    color: #94a3b8;
    white-space: nowrap;
}

.ag-table-card .dataTables_filter input[type="search"] {
    width: 180px;
}

.ag-table-card .dataTables_info {
    color: #94a3b8;
}

@media (max-width: 640px) {
    .ag-table-card-head {
        padding: 14px 16px 8px;
    }

    .ag-table-card .dataTables_wrapper {
        padding: 0 12px 12px;
    }
}

.ua-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, .15);
    background: rgba(7, 7, 30, .5);
    color: #64748b;
    cursor: pointer;
    font-size: .9rem;
    transition: all .15s;
    position: relative;
}

.ua-btn::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(7, 7, 26, .97);
    border: 1px solid rgba(99, 102, 241, .18);
    color: #cbd5e1;
    font-size: .65rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s, transform .15s;
    z-index: 9999;
}

.ua-btn:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.ua-btn.edit:hover {
    border-color: rgba(20, 184, 166, .4);
    color: #2dd4bf;
    background: rgba(20, 184, 166, .07);
}

.ua-btn.del:hover {
    border-color: rgba(239, 68, 68, .4);
    color: #f87171;
    background: rgba(239, 68, 68, .07);
}

.u-avatar {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.ag-limits-box {
    background: rgba(99, 102, 241, .05);
    border: 1px solid rgba(99, 102, 241, .18);
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 10px;
}

.ag-limits-title {
    font-size: .7rem;
    font-weight: 700;
    color: #a5b4fc;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ag-limit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.rl-field label {
    display: block;
    font-size: .66rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 4px;
}

.rl-field input {
    width: 100%;
    background: rgba(0, 0, 0, .3);
    border: 1px solid rgba(99, 102, 241, .2);
    border-radius: 7px;
    color: #e2e8f0;
    font-size: .8rem;
    padding: 6px 10px;
    outline: none;
    transition: border-color .15s;
}

.rl-field input:focus {
    border-color: rgba(99, 102, 241, .5);
}

.rl-field .avail-hint {
    font-size: .6rem;
    color: #475569;
    margin-top: 3px;
}

.del-card {
    width: 400px;
    background: linear-gradient(145deg, rgba(10, 10, 28, .99), rgba(7, 7, 22, .99));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(239, 68, 68, .35);
    border-radius: 20px;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, .12), 0 32px 80px rgba(0, 0, 0, .7);
    overflow: hidden;
}

.del-card-top {
    padding: 32px 28px 20px;
    text-align: center;
}

.del-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: rgba(239, 68, 68, .12);
    border: 1px solid rgba(239, 68, 68, .25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    color: #ef4444;
    margin: 0 auto 18px;
}

.del-card-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #f1f5f9;
    margin-bottom: 8px;
}

.del-card-sub {
    font-size: .8rem;
    color: #64748b;
    line-height: 1.55;
}

.del-card-sub strong {
    color: #f87171;
}

.del-card-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, .2), transparent);
}

.del-card-footer {
    padding: 18px 24px 24px;
    display: flex;
    gap: 10px;
}

.del-btn {
    flex: 1;
    padding: 11px 0;
    border: none;
    border-radius: 12px;
    font-size: .84rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.del-btn-confirm {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

.del-btn-cancel {
    background: rgba(51, 65, 85, .6);
    color: #94a3b8;
    border: 1px solid rgba(51, 65, 85, .8);
}

div.dataTables_wrapper div.dataTables_paginate ul.pagination li {
    margin: 0 3px !important;
}


/* ===== SOURCE: qa/transactions/index.php ===== */
.tr-stats {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    margin-bottom: 22px;
}

.tr-stat {
    background: rgba(13, 13, 36, .8);
    border: 1px solid rgba(99, 102, 241, .15);
    border-radius: 14px;
    padding: 16px;
}

.tr-stat-lbl {
    font-size: .58rem;
    font-weight: 700;
    color: rgba(140, 120, 240, .8);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 7px;
}

.tr-stat-val {
    font-size: 1.3rem;
    font-weight: 900;
    color: #e2e8f0;
    line-height: 1;
}

.tr-stat-sub {
    font-size: .65rem;
    color: #64748b;
    margin-top: 4px;
}

.tr-card {
    background: rgba(13, 13, 36, .8);
    border: 1px solid rgba(99, 102, 241, .18);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 18px;
}

.tr-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tr-card-kicker {
    font-size: .65rem;
    font-weight: 700;
    color: rgba(140, 120, 240, .85);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.tr-search-input {
    width: min(100%, 230px);
    background: rgba(7, 7, 26, .8);
    border: 1px solid rgba(99, 102, 241, .2);
    border-radius: 8px;
    color: #e2e8f0;
    padding: 7px 12px;
    font-size: .75rem;
    outline: none;
}

.tr-search-input:focus {
    border-color: rgba(99, 102, 241, .38);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .08);
}

.tr-table-scroll {
    width: 100%;
    overflow-x: auto;
}

.tr-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.tr-table .tx-table-row,
.tr-table tbody tr {
    display: table-row;
}

.tr-table th {
    font-size: .6rem;
    font-weight: 700;
    color: rgba(140, 120, 240, .85);
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(99, 102, 241, .12);
    text-align: left;
    white-space: nowrap;
}

.tr-table td {
    padding: 11px 12px;
    border-bottom: 1px solid rgba(99, 102, 241, .06);
    font-size: .78rem;
    color: #94a3b8;
    vertical-align: middle;
}

.tr-table tr:last-child td {
    border: none;
}

.tr-table tr:hover td {
    background: rgba(99, 102, 241, .025);
}

.tx-col-index {
    width: 44px;
}

.tx-id-cell {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tr-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: .62rem;
    font-weight: 700;
}

.s-success {
    background: rgba(34, 197, 94, .1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, .2);
}

.s-pending {
    background: rgba(245, 158, 11, .1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, .2);
}

.s-failed {
    background: rgba(239, 68, 68, .1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, .2);
}

.s-refunded {
    background: rgba(99, 102, 241, .1);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, .2);
}

.s-cancelled {
    background: rgba(148, 163, 184, .08);
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, .15);
}

.s-paused {
    background: rgba(251, 191, 36, .08);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, .15);
}

.s-active {
    background: rgba(34, 197, 94, .1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, .2);
}

.act-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 11px;
    border-radius: 8px;
    font-size: .65rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all .15s;
}

.btn-refund {
    background: rgba(99, 102, 241, .1);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, .2);
}

.btn-refund:hover {
    background: rgba(99, 102, 241, .22);
}

.btn-cancel {
    background: rgba(239, 68, 68, .08);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, .18);
}

.btn-cancel:hover {
    background: rgba(239, 68, 68, .18);
}

.btn-pause {
    background: rgba(245, 158, 11, .08);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, .18);
}

.btn-pause:hover {
    background: rgba(245, 158, 11, .18);
}

.btn-activate {
    background: rgba(34, 197, 94, .08);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, .18);
}

.btn-activate:hover {
    background: rgba(34, 197, 94, .18);
}

.btn-delete {
    background: rgba(239, 68, 68, .08);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, .18);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, .22);
}

.plan-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    color: #fff;
}

.sec-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
}

.sec-tab {
    padding: 9px 20px;
    border-radius: 10px;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid rgba(99, 102, 241, .15);
    color: #64748b;
    background: transparent;
    transition: all .15s;
}

.sec-tab.active {
    background: rgba(99, 102, 241, .12);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, .3);
}

.tr-section {
    display: none;
}

.tr-section.active {
    display: block;
}

.tr-card.qa-tcard {
    padding: 0;
    overflow: hidden;
}

.tr-card.qa-tcard>div:first-child {
    padding: 20px 20px 0;
}

.tr-card.qa-tcard .dataTables_wrapper {
    padding: 0 16px 16px;
}

.tr-card.qa-tcard .dataTables_top,
.tr-card.qa-tcard .dataTables_bottom,
.tr-card.qa-tcard .tr-dt-top,
.tr-card.qa-tcard .tr-dt-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.tr-card.qa-tcard .tr-dt-top {
    padding: 0 4px 14px;
}

.tr-card.qa-tcard .tr-dt-bottom {
    padding: 14px 4px 0;
    border-top: 1px solid rgba(99, 102, 241, .1);
    margin-top: 2px;
}

.tr-card.qa-tcard .dataTables_length,
.tr-card.qa-tcard .dataTables_info,
.tr-card.qa-tcard .dataTables_paginate {
    margin: 0;
    padding: 0;
}

.tr-card.qa-tcard .dataTables_length label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: .78rem;
    color: #94a3b8;
    white-space: nowrap;
}

.tr-card.qa-tcard .dataTables_length select {
    min-width: 72px;
    height: 38px;
    padding: 0 34px 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, .22);
    background: rgba(255, 255, 255, .06);
    color: #e2e8f0;
    font-size: .78rem;
    font-weight: 700;
    box-shadow: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #a5b4fc 50%),
        linear-gradient(135deg, #a5b4fc 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.tr-card.qa-tcard .dataTables_length select:focus {
    border-color: rgba(99, 102, 241, .38);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .08);
}

.tr-card.qa-tcard .dataTables_info {
    font-size: .76rem;
    color: #94a3b8;
}

.tr-card.qa-tcard .dataTables_paginate {
    display: flex;
    justify-content: flex-end;
    margin-left: auto;
}

.tr-card.qa-tcard .dataTables_paginate .pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.tr-card.qa-tcard .dataTables_paginate .page-item {
    margin: 0;
}

.tr-card.qa-tcard .dataTables_paginate .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 13px;
    border-radius: 12px !important;
    border: 1px solid rgba(99, 102, 241, .18) !important;
    background: rgba(255, 255, 255, .04) !important;
    color: #c7d2fe !important;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: none !important;
    transition: all .18s ease;
}

.tr-card.qa-tcard .dataTables_paginate .page-item:hover .page-link {
    background: rgba(99, 102, 241, .14) !important;
    border-color: rgba(99, 102, 241, .28) !important;
    color: #fff !important;
}

.tr-card.qa-tcard .dataTables_paginate .page-item.active .page-link {
    background: linear-gradient(135deg, #4f46e5, #6366f1) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(79, 70, 229, .28) !important;
}

.tr-card.qa-tcard .dataTables_paginate .page-item.disabled .page-link {
    opacity: .45;
    pointer-events: none;
}

@media(max-width:768px) {
    .tr-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .tr-search-input {
        width: 100%;
    }

    .tr-card.qa-tcard .dataTables_wrapper {
        padding: 0 12px 14px;
    }

    .tr-card.qa-tcard .dataTables_paginate {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .tr-card.qa-tcard .dataTables_bottom,
    .tr-card.qa-tcard .tr-dt-bottom {
        align-items: flex-start;
    }
}

.refund-confirm-popup {
    width: 440px !important;
    max-width: 95vw !important;
    border-radius: 20px !important;
    border: 1px solid rgba(239, 68, 68, .2) !important;
    padding: 28px 24px 20px !important;
}

.refund-confirm-popup .swal2-html-container {
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

.refund-confirm-popup .swal2-actions {
    margin-top: 20px !important;
    gap: 10px !important;
}

.refund-confirm-popup .swal2-confirm,
.refund-confirm-popup .swal2-cancel {
    border-radius: 10px !important;
    font-size: .8rem !important;
    font-weight: 700 !important;
    padding: 10px 20px !important;
}


/* ===== SOURCE: ai_module_settings/index.php ===== */
/* ── Layout ─────────────────────────────── */
.ams-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    align-items: start;
}

.ams-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.ams-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 4px;
}

.ams-right {
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, .3) transparent;
}

.ams-right::-webkit-scrollbar {
    width: 3px;
}

.ams-right::-webkit-scrollbar-track {
    background: transparent;
}

.ams-right::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, .3);
    border-radius: 4px;
}

.ams-right::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, .42);
}

.ams-designer-head {
    position: sticky;
    top: 0;
    z-index: 7;
    background: rgba(14, 14, 40, .96);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .24);
}

/* Module Selector Cards */
.ams-mod-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid rgba(99, 102, 241, .12);
    background: var(--surface-2);
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
}

.ams-mod-card:hover {
    border-color: rgba(99, 102, 241, .3);
    background: rgba(99, 102, 241, .08);
}

.ams-mod-card.active {
    border-color: rgba(99, 102, 241, .5);
    background: linear-gradient(135deg, rgba(99, 102, 241, .18), rgba(139, 92, 246, .1));
    box-shadow: 0 4px 18px rgba(99, 102, 241, .2);
}

.ams-mod-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
}

.ams-mod-name {
    font-size: .82rem;
    font-weight: 800;
    color: #eef2ff;
}

.ams-mod-tag {
    font-size: .6rem;
    color: var(--muted);
    margin-top: 2px;
}

.ams-mod-chev {
    margin-left: auto;
    color: var(--muted);
    font-size: .8rem;
}

/* Flowchart Canvas */
.flow-canvas {
    position: relative;
}

.fn-locked {
    opacity: .82;
    cursor: default;
}

.fn-locked:hover {
    border-color: rgba(251, 191, 36, .18) !important;
}

.flow-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.flow-toolbar-title {
    font-size: .95rem;
    font-weight: 800;
    color: #eef2ff;
    flex: 1;
}

.flow-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 9px;
    font-size: .73rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all .18s;
}

.flow-btn-save {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
}

.flow-btn-save:hover {
    opacity: .88;
}

.flow-btn-reset {
    background: rgba(239, 68, 68, .08);
    border: 1px solid rgba(239, 68, 68, .2);
    color: #fca5a5;
}

.flow-btn-reset:hover {
    background: rgba(239, 68, 68, .18);
}

.flow-btn-add {
    background: rgba(16, 185, 129, .1);
    border: 1px solid rgba(16, 185, 129, .25);
    color: #6ee7b7;
}

.flow-btn-add:hover {
    background: rgba(16, 185, 129, .2);
}

/* Nodes */
.flow-nodes-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.flow-node-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.flow-node {
    width: 100%;
    max-width: 540px;
    border-radius: 14px;
    border: 1.5px solid rgba(99, 102, 241, .18);
    background: var(--surface);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all .2s;
    position: relative;
}

.flow-node:hover {
    border-color: rgba(99, 102, 241, .35);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}

.flow-node.editing {
    border-color: rgba(99, 102, 241, .5);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}

/* Node type icons */
.fn-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
}

.fn-input {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.fn-think {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.fn-process {
    background: linear-gradient(135deg, #059669, #10b981);
}

.fn-search {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
}

.fn-validate {
    background: linear-gradient(135deg, #d97706, #f59e0b);
}

.fn-filter {
    background: linear-gradient(135deg, #c2410c, #f97316);
}

.fn-generate {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
}

.fn-output {
    background: linear-gradient(135deg, #be185d, #ec4899);
}

.fn-body {
    flex: 1;
    min-width: 0;
}

.fn-type-tag {
    display: inline-block;
    font-size: .56rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(99, 102, 241, .12);
    color: #a5b4fc;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.fn-label {
    font-size: .88rem;
    font-weight: 800;
    color: #eef2ff;
    margin-bottom: 2px;
}

.fn-desc {
    font-size: .7rem;
    color: var(--muted);
    line-height: 1.4;
}

.fn-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.fn-btn {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    color: var(--muted);
    transition: all .15s;
}

.fn-btn:hover {
    background: rgba(99, 102, 241, .12);
    color: #a5b4fc;
}

.fn-btn.del:hover {
    background: rgba(239, 68, 68, .12);
    color: #fca5a5;
}

.fn-btn:disabled {
    opacity: .3;
    cursor: not-allowed;
}

/* Node connector line */
.flow-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 2px 0;
}

.flow-line {
    width: 2px;
    height: 28px;
    background: linear-gradient(to bottom, rgba(99, 102, 241, .35), rgba(99, 102, 241, .15));
}

.flow-arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid rgba(99, 102, 241, .45);
}

.flow-add-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px dashed rgba(99, 102, 241, .35);
    background: rgba(99, 102, 241, .06);
    color: #a5b4fc;
    font-size: .8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .18s;
    margin: 2px 0;
}

.flow-add-btn:hover {
    background: rgba(99, 102, 241, .18);
    border-color: rgba(99, 102, 241, .6);
    transform: scale(1.1);
}

/* Inline Edit Form */
.fn-edit-form {
    width: 100%;
    max-width: 540px;
    border: 1.5px solid rgba(99, 102, 241, .4);
    border-radius: 14px;
    background: rgba(13, 13, 36, .9);
    padding: 16px;
    margin: 0;
}

.fn-ef-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.fn-ef-label {
    font-size: .65rem;
    font-weight: 700;
    color: #8899b4;
    text-transform: uppercase;
    letter-spacing: .05em;
    display: block;
    margin-bottom: 5px;
}

.fn-ef-input {
    width: 100%;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(99, 102, 241, .18);
    border-radius: 7px;
    color: #e2e8f0;
    font-size: .78rem;
    padding: 7px 10px;
    outline: none;
    font-family: inherit;
    transition: border-color .15s;
}

.fn-ef-input:focus {
    border-color: rgba(99, 102, 241, .45);
}

.fn-ef-select {
    appearance: none;
    -webkit-appearance: none;
}

.fn-ef-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 6px;
}

.fn-ef-save {
    padding: 6px 16px;
    border-radius: 7px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    font-size: .73rem;
    font-weight: 700;
    cursor: pointer;
}

.fn-ef-cancel {
    padding: 6px 12px;
    border-radius: 7px;
    background: transparent;
    border: 1px solid rgba(99, 102, 241, .2);
    color: #94a3b8;
    font-size: .73rem;
    cursor: pointer;
}

/* Node type selector */
.fn-type-picker {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.fn-type-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, .18);
    background: rgba(99, 102, 241, .07);
    color: var(--muted);
    font-size: .63rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
}

.fn-type-chip:hover,
.fn-type-chip.selected {
    background: rgba(99, 102, 241, .2);
    border-color: rgba(99, 102, 241, .4);
    color: #e0e7ff;
}

.fn-type-chip .tc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Prompt preview */
.prompt-preview {
    background: rgba(7, 7, 26, .7);
    border: 1px solid rgba(99, 102, 241, .15);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: .72rem;
    color: #94a3b8;
    line-height: 1.65;
    white-space: pre-wrap;
    font-family: monospace;
    max-height: 180px;
    overflow-y: auto;
}

.prompt-preview-title {
    font-size: .75rem;
    font-weight: 800;
    color: #a5b4fc;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Placeholder */
.ams-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--muted);
    text-align: center;
    gap: 10px;
}

.ams-placeholder i {
    font-size: 2.5rem;
    color: rgba(99, 102, 241, .3);
}

@media(max-width:900px) {
    .ams-shell {
        grid-template-columns: 1fr;
    }

    .fn-ef-row {
        grid-template-columns: 1fr;
    }
}


/* ===== SOURCE: ai/render_task_detail.php ===== */
.svm-task-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 22px 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.svm-task-hero,
.svm-task-card {
    background: rgba(11, 18, 33, 0.86);
    border: 1px solid rgba(120, 144, 180, 0.18);
    border-radius: 24px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
}

.svm-task-hero {
    padding: 26px 28px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.svm-task-kicker {
    display: inline-block;
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #5eead4;
    font-weight: 700;
    margin-bottom: 10px;
}

.svm-task-hero h1 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 30px;
}

.svm-task-hero p {
    margin: 0;
    color: rgba(226, 232, 240, 0.74);
    max-width: 680px;
    line-height: 1.7;
}

.svm-task-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.svm-task-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    font-weight: 600;
}

.svm-task-btn-primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    border-color: transparent;
    color: #fff;
}

.svm-task-btn-disabled {
    opacity: .56;
    cursor: not-allowed;
    pointer-events: none;
}

.svm-task-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr);
    gap: 20px;
}

.svm-task-card {
    padding: 24px;
}

.svm-task-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.svm-task-card h2 {
    margin: 0 0 18px;
    color: #fff;
    font-size: 24px;
}

.svm-task-muted {
    color: rgba(226, 232, 240, 0.52);
    font-size: 13px;
}

.svm-task-progress {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.svm-task-progress-bar {
    width: 100%;
    height: 14px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    overflow: hidden;
}

.svm-task-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #22d3ee 0%, #3b82f6 100%);
    transition: width .25s ease;
}

.svm-task-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    color: rgba(226, 232, 240, 0.74);
}

.svm-task-progress-meta strong {
    color: #fff;
    font-size: 22px;
}

.svm-task-progress-meta span {
    white-space: pre-line;
    text-align: right;
    line-height: 1.35;
}

.svm-task-note {
    margin: 16px 0 0;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.22);
}

.svm-task-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.svm-task-meta-item {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.svm-task-meta-item span {
    display: block;
    font-size: 12px;
    color: rgba(226, 232, 240, 0.56);
    margin-bottom: 6px;
}

.svm-task-meta-item strong {
    color: #fff;
    font-size: 15px;
    white-space: pre-line;
    line-height: 1.4;
}

.svm-task-video-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.svm-task-video {
    width: 100%;
    border-radius: 18px;
    background: #020617;
}

.svm-task-video-card--pending {
    min-height: 420px;
}

.svm-task-output-placeholder {
    flex: 1;
    min-height: 340px;
    border-radius: 22px;
    border: 1px dashed rgba(148, 163, 184, 0.24);
    background: linear-gradient(180deg, rgba(9, 14, 28, 0.88), rgba(15, 23, 42, 0.82));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
    padding: 32px;
    color: rgba(226, 232, 240, 0.72);
}

.svm-task-output-placeholder strong {
    color: #fff;
    font-size: 20px;
    max-width: 620px;
}

.svm-task-output-placeholder span {
    max-width: 620px;
    line-height: 1.7;
}

.svm-task-output-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: #7dd3fc;
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(125, 211, 252, 0.14);
}

.svm-task-output-icon svg {
    width: 28px;
    height: 28px;
}

@media (max-width: 960px) {

    .svm-task-hero,
    .svm-task-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

    .svm-task-hero {
        gap: 16px;
    }

    .dash-main-grid {
        grid-template-columns: 1fr;
    }
}


/* ===== SOURCE: ai/create_video_screen.php ===== */
/* ── Voice Preview Player Card ─────────────────────── */
.svm-vp-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    padding: 12px 14px 16px;
    margin-top: 0;
    overflow: hidden;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.svm-vp-card.svm-vp-active {
    border-color: rgba(109, 96, 255, 0.55);
    background: rgba(109, 96, 255, 0.06);
}

/* Left: play button + meta */
.svm-vp-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.svm-vp-playbtn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #6d60ff 0%, #4f46e5 100%);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(109, 96, 255, 0.45);
    transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
    flex-shrink: 0;
}

.svm-vp-playbtn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(109, 96, 255, 0.6);
}

.svm-vp-playbtn.svm-vp-loading {
    background: rgba(255, 255, 255, 0.12);
    cursor: wait;
    box-shadow: none;
}

#svmVpLoadIco {
    animation: svmVpSpin 0.75s linear infinite;
}

@keyframes svmVpSpin {
    to {
        transform: rotate(360deg);
    }
}

.svm-vp-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.svm-vp-tag {
    font-size: 10px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
    font-weight: 500;
}

.svm-vp-name {
    font-size: 13px;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.01em;
}

/* Waveform bars */
.svm-vp-waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 28px;
}

.svm-vp-waveform span {
    display: block;
    width: 4px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.15);
    transition: background 0.25s;
}

.svm-vp-waveform span:nth-child(1) {
    height: 10px;
}

.svm-vp-waveform span:nth-child(2) {
    height: 24px;
}

.svm-vp-waveform span:nth-child(3) {
    height: 16px;
}

.svm-vp-waveform span:nth-child(4) {
    height: 30px;
}

.svm-vp-waveform span:nth-child(5) {
    height: 14px;
}

/* Animated state */
.svm-vp-waveform.svm-vp-playing span {
    background: #7c6fff;
    animation: svmVpBar 0.8s ease-in-out infinite alternate;
}

.svm-vp-waveform.svm-vp-playing span:nth-child(1) {
    animation-duration: 0.70s;
    animation-delay: 0.00s;
}

.svm-vp-waveform.svm-vp-playing span:nth-child(2) {
    animation-duration: 0.90s;
    animation-delay: 0.10s;
}

.svm-vp-waveform.svm-vp-playing span:nth-child(3) {
    animation-duration: 0.65s;
    animation-delay: 0.20s;
}

.svm-vp-waveform.svm-vp-playing span:nth-child(4) {
    animation-duration: 0.85s;
    animation-delay: 0.05s;
}

.svm-vp-waveform.svm-vp-playing span:nth-child(5) {
    animation-duration: 0.75s;
    animation-delay: 0.15s;
}

@keyframes svmVpBar {
    0% {
        height: 4px;
    }

    100% {
        height: 32px;
    }
}

/* Progress bar pinned to card bottom */
.svm-vp-pbar-wrap {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 0 0 14px 14px;
    overflow: hidden;
}

.svm-vp-pbar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6d60ff, #a78bfa);
    transition: width 0.25s linear;
    border-radius: 0 0 14px 14px;
}

.svm-modal-shell-project {
    max-width: min(1220px, calc(100vw - 40px));
    width: 100%;
}

.svm-modal-panel-project {
    padding: 24px 26px;
    max-height: min(88vh, 940px);
    overflow: auto;
    border-radius: 30px;
    border: 1px solid rgba(125, 211, 252, 0.16);
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.14), transparent 30%),
        radial-gradient(circle at top left, rgba(129, 74, 255, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(8, 14, 30, 0.985) 0%, rgba(11, 19, 37, 0.985) 100%);
    box-shadow: 0 28px 70px rgba(2, 8, 23, 0.52);
}

.svm-storage-tag {
    display: none !important;
}

.svm-storage-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.svm-storage-detail-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.svm-storage-head-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.svm-storage-clean-btn {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid rgba(34, 211, 238, 0.34);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.18) 0%, rgba(59, 130, 246, 0.2) 100%);
    color: #e0f2fe;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.svm-storage-clean-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(125, 211, 252, 0.6);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.24) 0%, rgba(59, 130, 246, 0.28) 100%);
}

.svm-project-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 0 68px 6px 2px;
}

.svm-project-modal-head h3 {
    margin: 8px 0 8px;
    color: #f8fafc;
    font-size: clamp(24px, 2.4vw, 42px);
    line-height: 1.08;
}

.svm-project-modal-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.svm-project-modal-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94) 0%, rgba(30, 41, 59, 0.92) 100%);
    border: 1px solid rgba(125, 211, 252, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    color: #f8fafc;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
}

.svm-project-modal-head p {
    margin: 0;
    max-width: 760px;
    color: rgba(226, 232, 240, 0.72);
    font-size: 15px;
    line-height: 1.65;
}

.svm-project-modal-stat {
    min-width: 180px;
    margin-right: 6px;
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94) 0%, rgba(30, 41, 59, 0.92) 100%);
    border: 1px solid rgba(125, 211, 252, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.svm-project-modal-stat strong {
    font-size: 28px;
    line-height: 1;
    color: #f8fafc;
    letter-spacing: -0.03em;
}

.svm-project-modal-stat span {
    font-size: 12px;
    color: rgba(191, 219, 254, 0.72);
}

.svm-storage-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.svm-storage-explain {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 16px;
    align-items: stretch;
}

.svm-storage-note,
.svm-storage-highlight {
    border-radius: 20px;
    border: 1px solid rgba(125, 211, 252, 0.14);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(26, 36, 58, 0.9) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.svm-storage-note {
    padding: 18px 20px;
}

.svm-storage-note strong {
    display: block;
    color: #f8fafc;
    font-size: 15px;
    margin-bottom: 8px;
}

.svm-storage-note p {
    margin: 0;
    color: rgba(226, 232, 240, 0.7);
    line-height: 1.65;
    font-size: 14px;
}

.svm-storage-highlight-grid {
    display: grid;
    gap: 14px;
}

.svm-storage-highlight {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.svm-storage-highlight span {
    color: rgba(191, 219, 254, 0.72);
    font-size: 12px;
}

.svm-storage-highlight strong {
    color: #f8fafc;
    font-size: 24px;
    line-height: 1.08;
}

.svm-storage-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.svm-storage-breakdown-card {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(125, 211, 252, 0.12);
    background: linear-gradient(180deg, rgba(11, 18, 33, 0.94) 0%, rgba(20, 31, 50, 0.94) 100%);
}

.svm-storage-breakdown-card.is-clickable {
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.svm-storage-breakdown-card.is-clickable:hover,
.svm-storage-breakdown-card.is-clickable:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(125, 211, 252, 0.34);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.2);
    outline: none;
}

.svm-storage-breakdown-card.is-empty {
    opacity: .78;
}

.svm-storage-breakdown-label {
    display: block;
    color: rgba(191, 219, 254, 0.72);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.svm-storage-breakdown-card strong {
    display: block;
    color: #7dd3fc;
    font-size: 22px;
    line-height: 1.05;
}

.svm-storage-breakdown-count {
    display: block;
    color: rgba(226, 232, 240, 0.82);
    font-size: 12px;
    margin-top: 6px;
}

.svm-storage-breakdown-card p {
    margin: 10px 0 0;
    color: rgba(226, 232, 240, 0.66);
    font-size: 13px;
    line-height: 1.55;
}

.svm-storage-summary {
    min-width: 210px;
    margin-right: 56px;
}

.svm-storage-summary strong {
    font-size: 30px;
}

.svm-storage-summary span {
    font-size: 12px;
}

.svm-storage-clean-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 2px;
}

.svm-storage-clean-head {
    padding: 0 2px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.svm-storage-back-btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid rgba(125, 211, 252, 0.24);
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.svm-storage-back-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(125, 211, 252, 0.42);
    background: rgba(30, 41, 59, 0.9);
}

.svm-storage-back-btn span[aria-hidden="true"] {
    font-size: 16px;
    line-height: 1;
}

.svm-storage-clean-copy {
    display: flex;
    flex-direction: column;
}

.svm-storage-clean-head h4 {
    margin: 8px 0 8px;
    color: #f8fafc;
    font-size: 22px;
    line-height: 1.15;
}

.svm-storage-clean-head p {
    margin: 0;
    color: rgba(226, 232, 240, 0.7);
    font-size: 14px;
    line-height: 1.6;
}

.svm-storage-table-wrap {
    border-radius: 24px;
    border: 1px solid rgba(125, 211, 252, 0.14);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(24, 35, 58, 0.96) 100%);
    overflow: auto;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.svm-storage-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.svm-storage-table th,
.svm-storage-table td {
    padding: 15px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    vertical-align: middle;
}

.svm-storage-table th {
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(191, 219, 254, 0.74);
    background: rgba(255, 255, 255, 0.02);
}

.svm-storage-table td {
    color: rgba(241, 245, 249, 0.9);
}

.svm-storage-table tbody tr:hover {
    background: rgba(34, 211, 238, 0.06);
}

.svm-storage-file-size {
    font-weight: 700;
    color: #7dd3fc;
}

.svm-storage-item-title {
    display: block;
    color: #f8fafc;
    font-weight: 700;
    line-height: 1.35;
}

.svm-storage-item-subtitle {
    display: block;
    margin-top: 4px;
    color: rgba(191, 219, 254, 0.68);
    font-size: 12px;
    line-height: 1.4;
}

.svm-storage-location {
    color: rgba(241, 245, 249, 0.84);
    font-weight: 600;
}

.svm-storage-table-empty {
    padding: 28px 10px;
    text-align: center;
    color: rgba(226, 232, 240, 0.76);
    font-size: 14px;
    line-height: 1.6;
}

.svm-storage-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 860px) {
    .svm-storage-head {
        flex-direction: column;
    }

    .svm-storage-head-actions {
        width: 100%;
        align-items: stretch;
    }

    .svm-storage-clean-btn {
        width: 100%;
    }

    .svm-storage-explain,
    .svm-storage-breakdown-grid {
        grid-template-columns: 1fr;
    }

    .svm-storage-summary {
        min-width: 0;
        width: 100%;
        text-align: left;
    }
}

.svm-project-videos-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

#svmProjectVideosModal .svm-project-modal-head {
    align-items: flex-start;
    gap: 24px;
    padding: 4px 62px 6px 2px;
}

#svmProjectVideosModal .svm-project-modal-copy {
    flex: 1 1 auto;
    min-width: 0;
}

#svmProjectVideosModal .svm-modal-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    color: #5fa2ff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

#svmProjectVideosModal .svm-modal-kicker::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: linear-gradient(135deg, #7c3aed 0%, #38bdf8 100%);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.14);
}

#svmProjectVideosModal .svm-project-modal-title-row {
    gap: 12px;
    align-items: flex-start;
}

#svmProjectVideosModal .svm-project-modal-head h3 {
    margin: 12px 0 10px;
    max-width: 720px;
    font-size: clamp(30px, 3vw, 54px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

#svmProjectVideosModal .svm-project-modal-head h3 span {
    background: linear-gradient(90deg, #7c3aed 0%, #60a5fa 65%, #7dd3fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#svmProjectVideosModal .svm-project-modal-title-chip {
    display: inline-flex;
    align-items: center;
    max-width: min(100%, 620px);
    margin-bottom: 14px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.46);
    background: linear-gradient(90deg, rgba(76, 29, 149, 0.28) 0%, rgba(8, 145, 178, 0.24) 100%);
    color: #7dd3fc;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    box-shadow: 0 14px 32px rgba(2, 8, 23, 0.18);
}

#svmProjectVideosModal .svm-project-modal-head p {
    max-width: 720px;
    color: rgba(226, 232, 240, 0.74);
    font-size: 15px;
    line-height: 1.6;
}

.svm-preview-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #f8fafc;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    backdrop-filter: blur(10px);
}

.svm-video-card[data-project-open-surface] {
    cursor: pointer;
}

.svm-project-version-grid-modal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 20px;
    align-items: stretch;
    justify-content: flex-start;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.svm-version-card-modal {
    min-width: 0;
    height: 100%;
    width: 100%;
    max-width: 270px;
    border-radius: 18px;
    border: 1px solid rgba(84, 115, 196, 0.22);
    background: linear-gradient(180deg, rgba(10, 18, 36, 0.98) 0%, rgba(11, 18, 33, 0.98) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 22px 42px rgba(2, 8, 23, 0.28);
    overflow: hidden;
}

.svm-version-card-modal .svm-video-preview {
    min-height: 178px;
    aspect-ratio: 16 / 10;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.svm-version-card-modal .svm-video-preview-action {
    width: 100%;
    padding: 0;
    cursor: pointer;
    border: 0;
    background: transparent;
    text-align: left;
    transition: transform 0.2s ease;
}

.svm-version-card-modal .svm-video-preview-action:hover .svm-preview-play-indicator,
.svm-version-card-modal .svm-video-preview-action:focus-visible .svm-preview-play-indicator {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 22px 40px rgba(13, 24, 52, 0.42);
}

.svm-version-card-modal .svm-video-preview-action:focus-visible {
    outline: none;
}

.svm-thumb-img-shared,
.svm-slide-thumb-shared {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.svm-thumb-play-indicator,
.svm-preview-play-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.26), rgba(69, 41, 160, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #ffffff;
    box-shadow: 0 18px 28px rgba(16, 24, 40, 0.35);
    backdrop-filter: blur(10px);
}

.svm-thumb-play-indicator {
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.svm-thumb:hover .svm-thumb-play-indicator:not(.svm-thumb-play-indicator-disabled),
.svm-thumb-play-indicator:focus-visible {
    transform: translate(-50%, -50%) scale(1.06);
    box-shadow: 0 22px 34px rgba(16, 24, 40, 0.42);
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.34), rgba(35, 211, 238, 0.9));
    outline: none;
}

.svm-thumb-play-indicator-disabled {
    opacity: 0.58;
    cursor: default;
    pointer-events: none;
}

.svm-thumb-play-indicator svg,
.svm-preview-play-indicator svg {
    width: 22px;
    height: 22px;
    margin-left: 2px;
}

.svm-preview-duration {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.svm-version-card-modal .svm-video-preview::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    background: linear-gradient(180deg, rgba(5, 11, 24, 0) 0%, rgba(5, 11, 24, 0.36) 100%);
    pointer-events: none;
}

.svm-version-card-modal .svm-video-body {
    padding: 14px 16px 10px;
}

.svm-version-card-modal .svm-video-heading h3 {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.svm-version-card-modal .svm-video-id,
.svm-version-card-modal .svm-meta-row,
.svm-version-card-modal .svm-meta-row-muted {
    font-size: 12px;
}

.svm-version-card-modal .svm-video-id {
    flex-shrink: 0;
}

.svm-version-card-modal .svm-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-top: 10px;
    color: rgba(226, 232, 240, 0.9);
}

.svm-version-card-modal .svm-meta-row-muted {
    margin-top: 10px;
    color: rgba(203, 213, 225, 0.76);
}

.svm-version-card-modal .svm-card-actions {
    padding: 14px 16px 14px;
    gap: 8px;
}

.svm-version-card-modal .svm-act-btn {
    width: 40px;
    height: 36px;
}

#svmProjectVideosModal .svm-project-modal-count {
    min-width: 122px;
    min-height: 34px;
    padding: 2px 18px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94) 0%, rgba(24, 34, 58, 0.96) 100%);
    border-color: rgba(116, 187, 255, 0.22);
    color: #f8fafc;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}

#svmProjectVideosModal .svm-project-modal-count svg {
    width: 22px;
    height: 22px;
    color: #8b5cf6;
    flex-shrink: 0;
}

#svmProjectVideosModal .svm-project-modal-count strong {
    display: block;
    color: #d8b4fe;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

#svmProjectVideosModal .svm-project-modal-count span {
    display: block;
    margin-top: 4px;
    color: rgba(241, 245, 249, 0.9);
    font-size: 14px;
    font-weight: 700;
}

#svmProjectVideosModal .svm-modal-close {
    top: 18px;
    right: 18px;
}

#svmProjectVideosModal .svm-version-card-modal:hover {
    transform: translateY(-4px);
    border-color: rgba(117, 204, 255, 0.3);
}

.svm-project-videos-empty {
    margin: 4px 0 0;
}

@media (max-width: 860px) {
    .svm-modal-shell-project {
        max-width: calc(100vw - 20px);
    }

    .svm-modal-panel-project {
        padding: 20px 16px;
    }

    .svm-project-modal-head {
        flex-direction: column;
        padding-right: 0;
    }

    #svmProjectVideosModal .svm-project-modal-head h3 {
        font-size: clamp(24px, 8vw, 32px);
    }

    .svm-project-modal-stat,
    .svm-storage-summary {
        min-width: 0;
        width: 100%;
        text-align: left;
        margin-right: 0;
    }

    .svm-project-version-grid-modal {
        grid-template-columns: minmax(0, 1fr);
    }

    .svm-version-card-modal {
        width: 100%;
    }
}


/* ===== SOURCE: ai/video_builder.php ===== */
/* AI Slide Voice Preview Player */
.asvp-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 10px;
    padding: 10px 14px;
    margin-top: 0;
    height: 100%;
    box-sizing: border-box;
    color: #e2e8f0;
}

.asvp-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.asvp-playbtn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #6366f1;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}

.asvp-playbtn:hover {
    background: #4f46e5;
}

.asvp-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.asvp-tag {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.asvp-name {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
}

/* waveform */
.asvp-waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 32px;
    margin-left: auto;
}

.asvp-waveform span {
    display: inline-block;
    width: 3px;
    border-radius: 2px;
    background: rgba(99, 102, 241, 0.35);
    transition: background 0.2s;
}

.asvp-waveform span:nth-child(1) {
    height: 10px;
}

.asvp-waveform span:nth-child(2) {
    height: 22px;
}

.asvp-waveform span:nth-child(3) {
    height: 16px;
}

.asvp-waveform span:nth-child(4) {
    height: 28px;
}

.asvp-waveform span:nth-child(5) {
    height: 14px;
}

.asvp-waveform.asvp-playing span {
    background: #6366f1;
    animation: asvpBar 0.9s ease-in-out infinite alternate;
}

.asvp-waveform.asvp-playing span:nth-child(2) {
    animation-delay: 0.15s;
}

.asvp-waveform.asvp-playing span:nth-child(3) {
    animation-delay: 0.3s;
}

.asvp-waveform.asvp-playing span:nth-child(4) {
    animation-delay: 0.45s;
}

.asvp-waveform.asvp-playing span:nth-child(5) {
    animation-delay: 0.6s;
}

@keyframes asvpBar {
    from {
        transform: scaleY(0.4);
    }

    to {
        transform: scaleY(1);
    }
}

/* progress bar */
.asvp-pbar-wrap {
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.asvp-pbar-fill {
    height: 100%;
    width: 0%;
    background: #6366f1;
    border-radius: 2px;
    transition: width 0.1s linear;
}

/* spinner */
#asvpLoadIco {
    animation: asvpSpin 0.75s linear infinite;
}

@keyframes asvpSpin {
    to {
        transform: rotate(360deg);
    }
}

thead {
    position: sticky;
    top: 0;
    background: #0d0d24;
}

/* ===== SOURCE: errors/html/error_400.php ===== */
/* div.logo {
            height: 200px;
            width: 155px;
            display: inline-block;
            opacity: 0.08;
            position: absolute;
            top: 2rem;
            left: 50%;
            margin-left: -73px;
        }
        body {
            height: 100%;
            background: #fafafa;
            font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
            color: #777;
            font-weight: 300;
        }
        h1 {
            font-weight: lighter;
            letter-spacing: normal;
            font-size: 3rem;
            margin-top: 0;
            margin-bottom: 0;
            color: #222;
        }
        .wrap {
            max-width: 1024px;
            margin: 5rem auto;
            padding: 2rem;
            background: #fff;
            text-align: center;
            border: 1px solid #efefef;
            border-radius: 0.5rem;
            position: relative;
        }
        pre {
            white-space: normal;
            margin-top: 1.5rem;
        }
        code {
            background: #fafafa;
            border: 1px solid #efefef;
            padding: 0.5rem 1rem;
            border-radius: 5px;
            display: block;
        }
        p {
            margin-top: 1.5rem;
        }
        .footer {
            margin-top: 2rem;
            border-top: 1px solid #efefef;
            padding: 1em 2em 0 2em;
            font-size: 85%;
            color: #999;
        }
        a:active,
        a:link,
        a:visited {
            color: #dd4814;
        } */


/* ===== SOURCE: errors/html/error_404.php ===== */
/* div.logo {
            height: 200px;
            width: 155px;
            display: inline-block;
            opacity: 0.08;
            position: absolute;
            top: 2rem;
            left: 50%;
            margin-left: -73px;
        }
        body {
            height: 100%;
            background: #fafafa;
            font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
            color: #777;
            font-weight: 300;
        }
        h1 {
            font-weight: lighter;
            letter-spacing: normal;
            font-size: 3rem;
            margin-top: 0;
            margin-bottom: 0;
            color: #222;
        }
        .wrap {
            max-width: 1024px;
            margin: 5rem auto;
            padding: 2rem;
            background: #fff;
            text-align: center;
            border: 1px solid #efefef;
            border-radius: 0.5rem;
            position: relative;
        }
        pre {
            white-space: normal;
            margin-top: 1.5rem;
        }
        code {
            background: #fafafa;
            border: 1px solid #efefef;
            padding: 0.5rem 1rem;
            border-radius: 5px;
            display: block;
        }
        p {
            margin-top: 1.5rem;
        }
        .footer {
            margin-top: 2rem;
            border-top: 1px solid #efefef;
            padding: 1em 2em 0 2em;
            font-size: 85%;
            color: #999;
        }
        a:active,
        a:link,
        a:visited {
            color: #dd4814;
        } */

@media (min-width:1440px) {
    .sidebar-toggle-btn {
        display: none;
    }
}

 .svm-modal-close {
    position: absolute;
    top: 26px;
    right: 26px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border-color: rgba(255, 255, 255, 0.04);
    background: linear-gradient(180deg, rgba(36, 35, 72, 0.95), rgba(25, 24, 52, 0.95));
    color: rgba(243, 246, 255, 0.96);
    font-size: 32px;
    font-weight: 300;
    line-height: 1;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    z-index: 2;
    display: flex;
    align-items: baseline;
    justify-content: center;
 }
 #ecwFormModal .svm-modal-close{
    position:unset;
 }