/* ═══════════════════════════════════════
   CABINET — Personal Dashboard
   ═══════════════════════════════════════ */

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

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

/* ─── Header ─── */
.cab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: rgba(10, 14, 39, 0.9);
    border-bottom: 1px solid rgba(123, 47, 255, 0.12);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.cab-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.cab-logo .logo-icon {
    font-size: 24px;
    filter: drop-shadow(0 0 6px rgba(123, 47, 255, 0.5));
}

.cab-logo .logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #7B2FFF, #00F0FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

.cab-user-name {
    font-size: 14px;
    color: #B4B7D4;
}

/* ─── Buttons ─── */
.cab-btn-ghost {
    background: none;
    border: 1px solid rgba(123, 47, 255, 0.25);
    border-radius: 8px;
    padding: 8px 16px;
    color: #B4B7D4;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.cab-btn-ghost:hover {
    border-color: #7B2FFF;
    color: #fff;
    background: rgba(123, 47, 255, 0.1);
}

.cab-btn-primary {
    background: linear-gradient(135deg, #7B2FFF, #5B1FCC);
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
}

.cab-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 24px rgba(123, 47, 255, 0.4);
}

.cab-btn-sm {
    background: rgba(123, 47, 255, 0.15);
    border: 1px solid rgba(123, 47, 255, 0.3);
    border-radius: 8px;
    padding: 8px 16px;
    color: #B8B5FF;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.cab-btn-sm:hover {
    background: rgba(123, 47, 255, 0.25);
    border-color: #7B2FFF;
    color: #fff;
}

/* ─── Layout ─── */
.cab-main {
    display: flex;
    min-height: calc(100vh - 65px);
}

.cab-sidebar {
    width: 220px;
    padding: 24px 16px;
    border-right: 1px solid rgba(123, 47, 255, 0.08);
    background: rgba(10, 14, 39, 0.5);
    flex-shrink: 0;
}

.cab-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: #6E7299;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.cab-nav-item:hover {
    color: #B4B7D4;
    background: rgba(123, 47, 255, 0.08);
}

.cab-nav-item.active {
    color: #fff;
    background: rgba(123, 47, 255, 0.15);
    border: 1px solid rgba(123, 47, 255, 0.2);
}

.nav-icon {
    font-size: 18px;
}

.cab-content {
    flex: 1;
    padding: 32px 40px;
    max-width: 960px;
    margin: 0 auto;
}

/* ─── Section ─── */
.cab-section {
    display: none;
}

.cab-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.sec-header {
    margin-bottom: 28px;
}

.sec-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

.sec-subtitle {
    color: #6E7299;
    font-size: 14px;
    margin-top: 6px;
}

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

.stat-card {
    background: rgba(19, 27, 63, 0.6);
    border: 1px solid rgba(123, 47, 255, 0.12);
    border-radius: 14px;
    padding: 20px 24px;
    text-align: center;
}

.stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #00F0FF;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.stat-label {
    font-size: 12px;
    color: #6E7299;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ─── Card Block ─── */
.card-block {
    background: rgba(10, 14, 39, 0.6);
    border: 1px solid rgba(123, 47, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.block-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #B8B5FF;
}

/* ─── Profiles Grid ─── */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.profile-card {
    background: rgba(19, 27, 63, 0.5);
    border: 1px solid rgba(123, 47, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.profile-card:hover {
    border-color: rgba(123, 47, 255, 0.35);
    box-shadow: 0 0 24px rgba(123, 47, 255, 0.1);
    transform: translateY(-2px);
}

.profile-card .pc-name {
    font-weight: 600;
    font-size: 16px;
    color: #fff;
    margin-bottom: 4px;
}

.profile-card .pc-niche {
    font-size: 13px;
    color: #6E7299;
    margin-bottom: 12px;
}

.profile-card .pc-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #B4B7D4;
}

.profile-card .pc-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* New profile card */
.profile-card-new {
    background: rgba(19, 27, 63, 0.25);
    border: 2px dashed rgba(123, 47, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    color: #6E7299;
    font-size: 14px;
    gap: 8px;
}

.profile-card-new:hover {
    border-color: rgba(123, 47, 255, 0.4);
    color: #B8B5FF;
    background: rgba(19, 27, 63, 0.4);
}

/* ─── Reports List ─── */
.reports-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.report-row {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(19, 27, 63, 0.4);
    border: 1px solid rgba(123, 47, 255, 0.08);
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.report-row:hover {
    border-color: rgba(123, 47, 255, 0.25);
    background: rgba(19, 27, 63, 0.6);
}

.report-row .rr-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(123, 47, 255, 0.1);
    flex-shrink: 0;
}

.report-row .rr-info {
    flex: 1;
}

.report-row .rr-title {
    font-weight: 600;
    font-size: 14px;
    color: #fff;
}

.report-row .rr-meta {
    font-size: 12px;
    color: #6E7299;
    margin-top: 2px;
}

.report-row .rr-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    flex-shrink: 0;
}

.rr-status.completed {
    background: rgba(0, 240, 100, 0.1);
    color: #00F064;
    border: 1px solid rgba(0, 240, 100, 0.2);
}

.rr-status.processing {
    background: rgba(0, 240, 255, 0.1);
    color: #00F0FF;
    border: 1px solid rgba(0, 240, 255, 0.2);
    animation: pulse-status 2s infinite;
}

.rr-status.error {
    background: rgba(255, 50, 50, 0.1);
    color: #ff6b6b;
    border: 1px solid rgba(255, 50, 50, 0.2);
}

.rr-status.pending {
    background: rgba(255, 200, 0, 0.1);
    color: #ffc800;
    border: 1px solid rgba(255, 200, 0, 0.2);
}

@keyframes pulse-status {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ─── Report row action buttons ─── */
.rr-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.rr-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all 0.2s;
}

.rr-btn-open {
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.2);
    color: #00F0FF;
}

.rr-btn-open:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: #00F0FF;
}

.rr-btn-download {
    background: rgba(123, 47, 255, 0.08);
    border: 1px solid rgba(123, 47, 255, 0.25);
    color: #B8B5FF;
}

.rr-btn-download:hover {
    background: rgba(123, 47, 255, 0.18);
    border-color: #7B2FFF;
    color: #fff;
}


/* ─── Promos ─── */
.promos-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.promo-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(0, 240, 255, 0.04);
    border: 1px solid rgba(0, 240, 255, 0.12);
    border-radius: 10px;
    font-size: 14px;
}

.promo-row .promo-code {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    color: #00F0FF;
    letter-spacing: 1px;
}

.promo-row .promo-discount {
    color: #B8B5FF;
    font-weight: 600;
}

.promo-row .promo-expires {
    color: #6E7299;
    font-size: 12px;
    margin-left: auto;
}

/* ─── Payments ─── */
.payments-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    font-size: 14px;
    color: #B4B7D4;
}

.payment-row .pay-amount {
    font-weight: 600;
    color: #fff;
    min-width: 100px;
}

.payment-row .pay-type {
    color: #B8B5FF;
    min-width: 120px;
}

.payment-row .pay-date {
    color: #6E7299;
    font-size: 12px;
}

.payment-row .pay-status {
    margin-left: auto;
    font-size: 12px;
}

/* ─── Report Content ─── */
.report-content {
    background: rgba(10, 14, 39, 0.5);
    border: 1px solid rgba(123, 47, 255, 0.1);
    border-radius: 16px;
    padding: 32px;
    line-height: 1.7;
    font-size: 15px;
    color: #B4B7D4;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 70vh;
    overflow-y: auto;
}

.report-content h1, .report-content h2, .report-content h3 {
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    margin-top: 24px;
    margin-bottom: 12px;
}

/* ─── Empty State ─── */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #6E7299;
}

.empty-state p {
    margin-bottom: 16px;
    font-size: 15px;
}

/* ─── Forms ─── */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: #B4B7D4;
}

.form-group label .required {
    color: #7B2FFF;
}

.form-group input {
    background: rgba(5, 7, 20, 0.7);
    border: 1px solid rgba(123, 47, 255, 0.2);
    border-radius: 10px;
    padding: 12px 16px;
    color: #fff;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
    outline: none;
}

.form-group input::placeholder {
    color: #3D4166;
}

.form-group input:focus {
    border-color: #7B2FFF;
    box-shadow: 0 0 0 3px rgba(123, 47, 255, 0.15);
}

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

/* ─── Modal ─── */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(5, 7, 20, 0.85);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-card {
    background: rgba(10, 14, 39, 0.95);
    border: 1px solid rgba(123, 47, 255, 0.2);
    border-radius: 20px;
    padding: 36px;
    width: 100%;
    max-width: 440px;
    position: relative;
    box-shadow: 0 0 60px rgba(123, 47, 255, 0.1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #6E7299;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: #fff;
}

.modal-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.modal-sub {
    color: #6E7299;
    font-size: 14px;
    margin-bottom: 24px;
}

/* ─── Success / Error ─── */
.auth-success {
    background: rgba(0, 240, 100, 0.08);
    border: 1px solid rgba(0, 240, 100, 0.2);
    border-radius: 10px;
    padding: 12px 16px;
    color: #00F064;
    font-size: 14px;
}

.auth-error {
    background: rgba(255, 50, 50, 0.1);
    border: 1px solid rgba(255, 50, 50, 0.3);
    border-radius: 10px;
    padding: 12px 16px;
    color: #ff6b6b;
    font-size: 14px;
}



/* ─── Admin Nav Divider ─── */
.admin-nav-divider {
    padding: 12px 20px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #f39c12;
    text-transform: uppercase;
    border-top: 1px solid rgba(243, 156, 18, 0.2);
    margin-top: 8px;
}

.cab-nav-item.admin-only {
    border-left: 2px solid rgba(243, 156, 18, 0.3);
}

.cab-nav-item.admin-only:hover,
.cab-nav-item.admin-only.active {
    border-left-color: #f39c12;
    background: rgba(243, 156, 18, 0.08);
    color: #f39c12;
}

/* ─── Admin Textarea ─── */
.ap-textarea {
    width: 100%;
    background: rgba(123, 47, 255, 0.04);
    border: 1px solid rgba(123, 47, 255, 0.2);
    border-radius: 10px;
    padding: 12px 16px;
    color: #E0E0F0;
    font-size: 13px;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.ap-textarea:focus {
    border-color: rgba(123, 47, 255, 0.5);
}

/* ─── Prompt Tabs ─── */
.prompts-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.ptab {
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid rgba(123,47,255,0.3);
    background: transparent;
    color: #B4B7D4;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}
.ptab:hover { background: rgba(123,47,255,0.12); color: #fff; }
.ptab.active {
    background: rgba(123,47,255,0.25);
    border-color: rgba(123,47,255,0.6);
    color: #fff;
    font-weight: 600;
}
.ptab-content { display: none; }
.ptab-content.active { display: block; }

/* ─── Segment Map Block (in profile view) ─── */
.segment-map-block {
    margin-bottom: 8px;
}
.segment-map-card {
    background: rgba(123,47,255,0.06);
    border: 1px solid rgba(123,47,255,0.2);
    border-radius: 20px;
    overflow: hidden;
}
.segment-map-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(123,47,255,0.12);
}
.segment-map-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
}
.segment-map-sub {
    font-size: 13px;
    color: #6E7299;
    margin: 0;
}
.segment-list { padding: 8px 0; }
.segment-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s;
}
.segment-item:last-child { border-bottom: none; }
.segment-item:hover { background: rgba(255,255,255,0.02); }
.segment-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}
.segment-num.unlocked { background: rgba(0,240,100,0.15); color: #00F064; }
.segment-num.next { background: rgba(255,165,0,0.15); color: #FFA500; }
.segment-num.locked { background: rgba(255,255,255,0.06); color: #6E7299; }
.segment-info { flex: 1; min-width: 0; }
.segment-name {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px;
}
.segment-name.locked { color: #6E7299; }
.segment-pain {
    font-size: 13px;
    color: #B4B7D4;
    margin: 0 0 10px;
    line-height: 1.5;
}
.segment-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.segment-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}
.segment-badge.done { background: rgba(0,240,100,0.12); color: #00F064; }
.segment-badge.next-badge { background: rgba(255,165,0,0.12); color: #FFA500; }
.segment-badge.locked-badge { background: rgba(255,255,255,0.05); color: #6E7299; }

/* Free CTA block (when no map) */
.free-analysis-cta {
    background: linear-gradient(135deg, rgba(123,47,255,0.15), rgba(0,240,100,0.08));
    border: 1px solid rgba(123,47,255,0.3);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
}
.free-analysis-cta h2 {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px;
}
.free-analysis-cta p {
    color: #B4B7D4;
    font-size: 15px;
    margin: 0 0 24px;
    line-height: 1.6;
}

/* ─── Brief card (free + mini forms) ─── */
.brief-card label {
    font-size: 14px;
    color: #B4B7D4;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
    line-height: 1.5;
}
.brief-card textarea {
    width: 100%;
    background: rgba(123,47,255,0.05);
    border: 1px solid rgba(123,47,255,0.2);
    border-radius: 10px;
    padding: 12px 16px;
    color: #E0E0F0;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.brief-card textarea:focus {
    border-color: rgba(123,47,255,0.5);
}
.prefilled-field {
    background: rgba(0,240,100,0.04);
    border: 1px solid rgba(0,240,100,0.15);
    border-radius: 10px;
    padding: 12px 16px;
    color: #B4B7D4;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 8px;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 80px;
    overflow-y: auto;
}
.prefilled-field:empty::before {
    content: 'Из предыдущего брифа';
    color: #6E7299;
}

/* ─── Admin segment map list ─── */
.seg-map-row {
    background: rgba(123,47,255,0.05);
    border: 1px solid rgba(123,47,255,0.15);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: all 0.2s;
}
.seg-map-row:hover {
    border-color: rgba(123,47,255,0.4);
    background: rgba(123,47,255,0.1);
}
.seg-map-info { flex: 1; min-width: 0; }
.seg-map-business { font-size: 15px; font-weight: 600; color: #fff; }
.seg-map-meta { font-size: 13px; color: #6E7299; margin-top: 3px; }
.seg-map-progress {
    font-size: 13px;
    color: #00F064;
    font-weight: 600;
    white-space: nowrap;
}
.seg-map-arrow { color: #6E7299; font-size: 18px; }

/* Admin segment detail table */
.seg-detail-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.seg-detail-table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 12px;
    color: #6E7299;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.seg-detail-table td {
    padding: 14px;
    font-size: 13px;
    color: #B4B7D4;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: top;
}
.seg-detail-table tr:last-child td { border-bottom: none; }
.seg-detail-status {
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}
.seg-detail-status.unlocked { background: rgba(0,240,100,0.12); color: #00F064; }
.seg-detail-status.teaser { background: rgba(255,165,0,0.12); color: #FFA500; }
.seg-detail-status.locked { background: rgba(255,255,255,0.06); color: #6E7299; }

/* ════════════════════════════════════════
   BURGER BUTTON (hidden on desktop)
════════════════════════════════════════ */
.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    flex-shrink: 0;
}
.burger-btn span {
    display: block;
    height: 2px;
    background: #B4B7D4;
    border-radius: 2px;
    transition: all 0.28s ease;
    transform-origin: center;
}
.burger-btn.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger-btn.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ════════════════════════════════════════
   MOBILE OVERLAY
════════════════════════════════════════ */
.mob-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 299;
    opacity: 0;
    transition: opacity 0.28s;
}
.mob-overlay.show { display: block; opacity: 1; }

/* ════════════════════════════════════════
   MOBILE DRAWER
════════════════════════════════════════ */
.mob-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(290px, 80vw);
    background: linear-gradient(180deg, #0A0E27 0%, #070B1E 100%);
    border-right: 1px solid rgba(123, 47, 255, 0.18);
    box-shadow: 4px 0 32px rgba(0,0,0,0.5);
    z-index: 300;
    display: flex;
    flex-direction: column;
    transform: translateX(-110%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}
.mob-drawer.open { transform: translateX(0); }

.mob-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(123, 47, 255, 0.12);
    flex-shrink: 0;
}
.mob-drawer-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #7B2FFF, #00F0FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.mob-drawer-close {
    background: none;
    border: none;
    color: #6E7299;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 6px;
    transition: all 0.2s;
}
.mob-drawer-close:hover { color: #fff; background: rgba(255,255,255,0.05); }

.mob-drawer-nav {
    padding: 12px 10px 20px;
    flex: 1;
    overflow-y: auto;
}

/* Nav items in drawer */
.mob-drawer-nav a.cab-nav-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: #6E7299;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 2px;
    border: 1px solid transparent;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
}
.mob-drawer-nav a.cab-nav-item:hover {
    color: #B4B7D4;
    background: rgba(123, 47, 255, 0.08);
}
.mob-drawer-nav a.cab-nav-item.active {
    color: #fff;
    background: rgba(123, 47, 255, 0.15);
    border-color: rgba(123, 47, 255, 0.2);
}
.mob-drawer-nav a.cab-nav-item.admin-only {
    border-left: 3px solid rgba(243, 156, 18, 0.3);
}
.mob-drawer-nav a.cab-nav-item.admin-only.active,
.mob-drawer-nav a.cab-nav-item.admin-only:hover {
    border-left-color: #f39c12;
    background: rgba(243, 156, 18, 0.08);
    color: #f39c12;
}
.mob-drawer-nav .admin-nav-divider {
    padding: 14px 14px 6px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #f39c12;
    text-transform: uppercase;
    border-top: 1px solid rgba(243, 156, 18, 0.2);
    margin-top: 8px;
    display: block;
}
.mob-drawer-nav .nav-icon { font-size: 18px; flex-shrink: 0; }

/* Promo modal responsive styles */
.btn-mini-promo-apply-class {
    padding: 10px 20px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}
.btn-mini-promo-apply-class .mobile-text {
    display: none;
}
.btn-mini-promo-apply-class .desktop-text {
    display: inline;
}

/* ════════════════════════════════════════
   MOBILE BREAKPOINT (max-width: 768px)
════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Show burger button */
    .burger-btn { display: flex; }

    /* Hide desktop sidebar */
    .cab-sidebar { display: none !important; }

    /* Stack layout */
    .cab-main { flex-direction: column; }

    /* ─── Header mobile ─── */
    .cab-header { padding: 10px 14px; }

    /* Hide logo text and user name on mobile — save space */
    .cab-logo .logo-text { display: none; }
    .cab-user-name { display: none; }

    /* Shrink logout button on mobile */
    .cab-header-right .cab-btn-ghost {
        padding: 7px 12px;
        font-size: 12px;
    }

    /* Left side gap tight */
    .cab-header-left { gap: 8px; }

    /* Full-width content */
    .cab-content {
        padding: 20px 16px 32px;
        max-width: 100%;
    }

    /* Stats: 2 columns */
    .stats-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    .stat-card { padding: 14px 10px; }
    .stat-value { font-size: 26px; }
    .stat-label { font-size: 10px; }

    /* Profiles */
    .profiles-grid { grid-template-columns: 1fr; }

    /* Section title */
    .sec-title { font-size: 20px; }

    /* Card blocks */
    .card-block { padding: 16px; }

    /* Tables scroll */
    #admin-promos-table { overflow-x: auto; }

    /* Promo form: 1 column on mobile */
    #sec-admin-promos .card-block > div[style*="grid"] {
        display: flex !important;
        flex-direction: column !important;
    }

    /* User detail header */
    #sec-admin-user-detail .sec-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    /* Report row buttons */
    .rr-actions { flex-wrap: wrap; }

    /* Promo button overrides on mobile */
    .btn-mini-promo-apply-class {
        padding: 10px 14px !important;
        min-width: 44px;
    }
    .btn-mini-promo-apply-class .desktop-text {
        display: none !important;
    }
    .btn-mini-promo-apply-class .mobile-text {
        display: inline !important;
        font-weight: bold;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .cab-content { padding: 14px 12px 24px; }
    .report-content { padding: 16px; font-size: 13px; }
    .sec-title { font-size: 18px; }
}

/* ─── Promo form grid alignment (desktop) ─── */
#sec-admin-promos .card-block > div[style*="grid"] {
    align-items: start;
}
/* Remove double margin inside grid */
#sec-admin-promos .card-block > div[style*="grid"] > .form-group {
    margin-bottom: 0;
}
