/* ============================================================
   account.css — Account dashboard (single-page scroll layout)
   Depends on: index.css (variables, reset, form-field, btn-auth)
============================================================ */

/* -------------------------------------------------------
   1. BASE
------------------------------------------------------- */
.ac-body {
    background: #f4f5f7;
    min-height: 100vh;
}

/* -------------------------------------------------------
   2. TOPBAR
------------------------------------------------------- */
.ac-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 60px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    z-index: 500;
}

.ac-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    gap: 16px;
}

/* Left group: logo + breadcrumb */
.ac-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.ac-logo {
    display: flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: var(--text-main);
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.ac-logo svg {
    width: 20px;
    height: 20px;
    color: var(--accent-blue);
    flex-shrink: 0;
}

.ac-topbar-sep {
    color: #d4d4d4;
    font-size: 16px;
    font-weight: 300;
    line-height: 1;
    user-select: none;
}

.ac-topbar-page {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Right group: user + logout */
.ac-topbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.ac-user-info {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 12px 5px 5px;
    border-radius: 100px;
    background: var(--surface-gray);
    border: 1px solid var(--border-light);
}

.ac-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: #fff;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
}

.ac-email-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ac-topbar-divider {
    width: 1px;
    height: 20px;
    background: var(--border-light);
    margin: 0 8px;
}

.ac-logout-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 100px;
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}

.ac-logout-btn:hover {
    border-color: #111;
    background: #111;
    color: #fff;
}

/* -------------------------------------------------------
   3. LAYOUT
------------------------------------------------------- */
.ac-layout {
    display: flex;
    padding-top: 60px;
    min-height: 100vh;
    max-width: 1280px;
    margin: 0 auto;
}

/* -------------------------------------------------------
   4. SIDEBAR
------------------------------------------------------- */
.ac-sidebar {
    width: 200px;
    flex-shrink: 0;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    padding: 28px 0 28px;
    overflow-y: auto;
}

.ac-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 12px;
    flex: 1;
}

.ac-nav-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border-radius: 9px;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: background 0.15s, color 0.15s;
    scroll-behavior: smooth;
}

.ac-nav-link svg {
    flex-shrink: 0;
    opacity: 0.5;
    transition: opacity 0.15s;
}

.ac-nav-link:hover {
    background: rgba(0,0,0,0.04);
    color: var(--text-main);
}

.ac-nav-link:hover svg { opacity: 0.8; }

.ac-nav-link.active {
    background: #fff;
    color: var(--accent-blue);
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.ac-nav-link.active svg { opacity: 1; }

.ac-sidebar-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 16px 12px 0;
    padding: 10px 0;
    border-radius: 10px;
    background: var(--text-main);
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.2px;
    transition: background 0.18s, transform 0.18s;
}

.ac-sidebar-cta:hover {
    background: #000;
    transform: translateY(-1px);
}

/* -------------------------------------------------------
   5. MAIN
------------------------------------------------------- */
.ac-main {
    flex: 1;
    padding: 40px 40px 0 32px;
    min-width: 0;
}

/* -------------------------------------------------------
   6. SECTIONS
------------------------------------------------------- */
.ac-section {
    margin-bottom: 64px;
    scroll-margin-top: 84px; /* topbar height + spacing */
}

.ac-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
}

.ac-section-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.ac-section-sub {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* -------------------------------------------------------
   7. HERO BANNER
------------------------------------------------------- */
.ac-hero {
    position: relative;
    background: #0a0a0a;
    border-radius: 20px;
    padding: 40px 48px;
    margin-bottom: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 160px;
}

.ac-hero-glow {
    position: absolute;
    top: -60px; left: -40px;
    width: 400px; height: 300px;
    background: radial-gradient(ellipse at center, rgba(66,133,244,0.25) 0%, transparent 65%);
    filter: blur(40px);
    pointer-events: none;
}

.ac-hero-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

.ac-hero-content {
    position: relative;
    z-index: 1;
}

.ac-hero-eyebrow {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.ac-hero-email {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.8px;
    margin-bottom: 12px;
    word-break: break-all;
}

.ac-hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ac-plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: 100px;
    background: rgba(66,133,244,0.2);
    border: 1px solid rgba(66,133,244,0.35);
    color: #93c5fd;
    font-size: 12px;
    font-weight: 600;
}

.ac-plan-badge.no-plan {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.4);
}

.ac-hero-sep {
    color: rgba(255,255,255,0.2);
}

.ac-hero-meta > span:last-child {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
}

.ac-hero-actions {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* -------------------------------------------------------
   8. STAT CARDS GRID
------------------------------------------------------- */
.ac-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

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

.ac-stat-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.ac-stat-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.ac-stat-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.ac-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ac-stat-icon--blue   { background: #eff6ff; color: #3b82f6; }
.ac-stat-icon--green  { background: #f0fdf4; color: #22c55e; }
.ac-stat-icon--purple { background: #faf5ff; color: #a855f7; }
.ac-stat-icon--amber  { background: #fffbeb; color: #f59e0b; }

.ac-stat-body { flex: 1; min-width: 0; }

.ac-stat-label {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.ac-stat-val {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
    line-height: 1;
}

.ac-stat-val--sm { font-size: 18px; }

/* -------------------------------------------------------
   9. TRAFFIC CARD
------------------------------------------------------- */
.ac-traffic-card { margin-bottom: 20px; }

.ac-traffic-pct {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -1px;
    flex-shrink: 0;
}

.ac-bar-track {
    height: 8px;
    background: #edf0f3;
    border-radius: 100px;
    overflow: hidden;
    margin: 16px 0 10px;
}

.ac-bar-fill {
    height: 100%;
    border-radius: 100px;
    background: linear-gradient(90deg, var(--accent-blue) 0%, #60a5fa 100%);
    transition: width 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.ac-bar-fill.warn   { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.ac-bar-fill.danger { background: linear-gradient(90deg, #ef4444, #f87171); }

.ac-traffic-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
}

/* -------------------------------------------------------
   10. GENERIC CARD
------------------------------------------------------- */
.ac-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
}

.ac-card--flush {
    padding: 0;
    overflow: hidden;
}

.ac-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}

.ac-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.2px;
}

.ac-card-sub {
    font-size: 12.5px;
    color: var(--text-tertiary);
}

/* -------------------------------------------------------
   11. KEY–VALUE LIST
------------------------------------------------------- */
.ac-kv-list { display: flex; flex-direction: column; }

.ac-kv-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f4f5f7;
    gap: 16px;
}

.ac-kv-row:last-child { border-bottom: none; padding-bottom: 0; }
.ac-kv-row:first-child { padding-top: 0; }

.ac-kv-k {
    width: 100px;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-tertiary);
}

.ac-kv-v {
    font-size: 14px;
    color: var(--text-main);
    word-break: break-all;
}

/* -------------------------------------------------------
   12. TABLE
------------------------------------------------------- */
.ac-table-wrap { overflow-x: auto; }

.ac-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.ac-table th {
    padding: 12px 20px;
    background: #f8f9fa;
    color: var(--text-tertiary);
    font-size: 11.5px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-light);
    letter-spacing: 0.3px;
}

.ac-table td {
    padding: 14px 20px;
    color: var(--text-main);
    border-bottom: 1px solid #f4f5f7;
    vertical-align: middle;
    white-space: nowrap;
}

.ac-table tr:last-child td { border-bottom: none; }

.ac-loading, .ac-empty {
    text-align: center;
    color: var(--text-tertiary);
    padding: 40px 20px !important;
    font-size: 13px;
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11.5px;
    font-weight: 600;
}

.badge-pending  { background: #fef9c3; color: #713f12; }
.badge-paid     { background: #dcfce7; color: #14532d; }
.badge-cancel   { background: #f3f4f6; color: #6b7280; }
.badge-open     { background: #dbeafe; color: #1e3a8a; }
.badge-closed   { background: #f3f4f6; color: #6b7280; }

/* -------------------------------------------------------
   13. INVITE CODES
------------------------------------------------------- */
.ac-code-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 12px;
}

.ac-invite-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ac-invite-row-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.ac-invite-row-label {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.ac-code-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    background: #f8f9fa;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    font-family: monospace;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 1px;
}

.ac-code-chip--link {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0;
    max-width: 480px;
}

.ac-invite-link-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 400px;
}

.ac-copy-btn {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-tertiary);
    padding: 2px;
    display: flex;
    align-items: center;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.ac-copy-btn:hover { color: var(--accent-blue); }
.ac-copy-btn.copied { color: var(--accent-blue); }

.ac-invite-hint {
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.6;
    margin-top: 8px;
}

/* -------------------------------------------------------
   14. TICKET DETAIL
------------------------------------------------------- */
.ac-messages {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
    max-height: 480px;
    overflow-y: auto;
    padding: 4px 2px;
}

.ac-msg {
    display: flex;
    gap: 12px;
    width: 100%;
}

.ac-msg.is-me > div { margin-left: auto; }

.ac-msg-bubble {
    max-width: 480px;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.ac-msg:not(.is-me) .ac-msg-bubble {
    background: #f4f5f7;
    border-radius: 4px 16px 16px 16px;
    color: var(--text-main);
}

.ac-msg.is-me .ac-msg-bubble {
    background: #111;
    border-radius: 16px 4px 16px 16px;
    color: #fff;
}

.ac-msg-time {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 5px;
}

.ac-msg:not(.is-me) .ac-msg-time { text-align: left; }
.ac-msg.is-me .ac-msg-time { text-align: right; }

/* Ticket detail: messages area scrolls, reply form stays pinned at bottom */
#modal-ticket-detail-view .ac-modal-body {
    display: flex;
    flex-direction: column;
    height: 62vh;
    overflow: hidden;
    padding-bottom: 20px;
}

#modal-ticket-detail-view .ac-messages {
    flex: 1;
    overflow-y: auto;
    max-height: none;
}

#ticket-reply-area {
    flex-shrink: 0;
    padding-top: 4px;
}

.ac-reply-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-light);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-main);
    resize: vertical;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
    background: #fff;
    margin-bottom: 12px;
}

.ac-reply-form textarea:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(66,133,244,0.1);
}

.ac-reply-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* -------------------------------------------------------
   15. BUTTONS
------------------------------------------------------- */
.ac-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 100px;
    border: 1.5px solid var(--text-main);
    background: transparent;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    white-space: nowrap;
}

.ac-pill-btn:hover {
    background: var(--text-main);
    color: #fff;
}

.ac-icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.ac-icon-btn:hover { background: #f4f5f7; color: var(--text-main); }

.ac-text-btn {
    border: none;
    background: none;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}

.ac-text-btn:hover { color: var(--text-main); }

.ac-ghost-btn {
    padding: 9px 16px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.ac-ghost-btn:hover { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }

/* -------------------------------------------------------
   16. FORM (dashboard variant)
------------------------------------------------------- */
.ac-form select,
.ac-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-light);
    border-radius: 10px;
    background: #fff;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 14.5px;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
    appearance: none;
    -webkit-appearance: none;
    resize: vertical;
}

.ac-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
    resize: none;
}

.ac-form select:focus,
.ac-form textarea:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(66,133,244,0.1);
}

/* Custom select (fixes native dropdown misposition inside position:fixed modals) */
.ac-fake-select {
    width: 100%;
    padding: 10px 38px 10px 14px;
    border: 1.5px solid var(--border-light);
    border-radius: 10px;
    background: #fff;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 14.5px;
    outline: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    transition: border-color 0.18s, box-shadow 0.18s;
    user-select: none;
    box-sizing: border-box;
}

.ac-fake-select:focus,
.ac-fake-select.is-open {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(66,133,244,0.1);
}

.ac-fake-select__label { flex: 1; }

.ac-fake-select__arrow {
    flex-shrink: 0;
    transition: transform 0.18s;
}

.ac-fake-select.is-open .ac-fake-select__arrow {
    transform: rotate(180deg);
}

.ac-fake-select__panel {
    position: fixed;
    z-index: 9999;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14);
    overflow: hidden;
    min-width: 160px;
}

.ac-fake-select__option {
    padding: 11px 16px;
    font-size: 14.5px;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ac-fake-select__option:hover {
    background: #f5f8ff;
}

.ac-fake-select__option.is-selected {
    background: var(--accent-blue);
    color: #fff;
}

.ac-fake-select__option.is-selected::before {
    content: "✓";
    font-size: 13px;
}

.ac-form-row { display: flex; gap: 16px; }
.ac-form-row--2 > * { flex: 1; min-width: 0; }

.ac-new-ticket-card { margin-bottom: 16px; }

/* -------------------------------------------------------
   17. TWO-COLUMN LAYOUT (security)
------------------------------------------------------- */
.ac-two-col {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
    max-width: 900px;
}

/* Constrain password form width for readability */
.ac-two-col .ac-card .ac-form {
    max-width: 420px;
}

/* Submit button row inside security form */
.ac-two-col .ac-card .btn-auth {
    max-width: 160px;
    height: 42px;
    font-size: 14px;
    border-radius: 10px;
}

/* -------------------------------------------------------
   18. DANGER CARD
------------------------------------------------------- */
.ac-danger-card {
    background: #fff;
    border: 1px solid #fecaca;
    border-radius: 16px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.ac-danger-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fee2e2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ac-danger-title {
    font-size: 15px;
    font-weight: 600;
    color: #111;
    margin: 0;
}

.ac-danger-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.ac-danger-btn {
    padding: 9px 20px;
    border-radius: 100px;
    border: 1.5px solid #fca5a5;
    background: transparent;
    color: #dc2626;
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    margin-top: 4px;
}

.ac-danger-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

/* form-alert styles come from auth.css (loaded before account.css) */

/* -------------------------------------------------------
   19. HERO ORDERS ENTRY BUTTON
------------------------------------------------------- */
.ac-hero-buy-btn {
    border-radius: 100px;
    font-size: 14px;
    padding: 10px 22px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    cursor: pointer;
    background: #fff;
    color: #111;
    border: none;
    font-family: var(--font-body);
    font-weight: 600;
    transition: opacity 0.18s;
}
.ac-hero-buy-btn:hover { opacity: 0.88; }

.ac-orders-entry-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.65);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}
.ac-orders-entry-btn:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
    border-color: rgba(255,255,255,0.35);
}

/* -------------------------------------------------------
   20. MODAL
------------------------------------------------------- */
.ac-modal {
    position: fixed;
    inset: 0;
    z-index: 800;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 72px 16px 40px;
    overflow: hidden;
}

.ac-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}

.ac-modal-box {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 820px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.22);
    overflow-y: auto;
    max-height: calc(100dvh - 112px);
    flex-shrink: 0;
}

.ac-modal-box--sm { max-width: 460px; }

.ac-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px;
    border-bottom: 1px solid var(--border-light);
    gap: 12px;
}

.ac-modal-title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.3px;
    margin: 0;
}

.ac-modal-sub {
    font-size: 12.5px;
    color: var(--text-tertiary);
    display: block;
    margin-top: 2px;
}

.ac-modal-body {
    padding: 24px 28px;
}

.ac-modal-body--flush {
    padding: 0;
    max-height: 58vh;
    overflow-y: auto;
}

/* -------------------------------------------------------
   21. PLANS SECTION
------------------------------------------------------- */
.ac-balance-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 100px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.ac-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.ac-plan-card {
    background: #fff;
    border: 2px solid var(--border-light);
    border-radius: 18px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.ac-plan-card:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 4px 20px rgba(66,133,244,0.1);
    transform: translateY(-2px);
}

.ac-plan-name {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.3px;
}

.ac-plan-traffic {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.ac-period-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ac-period-opt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1.5px solid var(--border-light);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
}

.ac-period-opt:hover { border-color: #93c5fd; background: #eff6ff; }

.ac-period-opt.is-active {
    border-color: var(--accent-blue);
    background: #eff6ff;
}

.ac-period-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
}

.ac-period-price {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-blue);
}

.ac-buy-btn {
    width: 100%;
    padding: 11px 0;
    border-radius: 12px;
    border: none;
    background: var(--text-main);
    color: #fff;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, transform 0.15s;
    margin-top: auto;
}

.ac-buy-btn:hover { background: #111; transform: translateY(-1px); }

.ac-plans-note {
    font-size: 12.5px;
    color: var(--text-tertiary);
    line-height: 1.6;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid var(--border-light);
}

/* Purchase confirm KV */
.ac-purchase-kv { display: flex; flex-direction: column; }

.ac-purchase-warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
    background: #fef9c3;
    border: 1px solid #fde047;
    border-radius: 10px;
    font-size: 12.5px;
    color: #713f12;
    line-height: 1.55;
    margin-top: 16px;
}

/* Payment method selector */
.ac-payment-methods {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ac-payment-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1.5px solid var(--border-light);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-main);
    background: var(--bg-card);
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
}

.ac-payment-opt:hover {
    border-color: var(--accent-blue);
}

.ac-payment-opt.is-selected {
    border-color: var(--accent-blue);
    background: rgba(99, 102, 241, 0.05);
}

.ac-payment-opt input[type=radio] {
    accent-color: var(--accent-blue);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.ac-payment-opt-name { flex: 1; }

.ac-payment-opt-fee {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* -------------------------------------------------------
   22. CLIENT DOWNLOAD SECTION
------------------------------------------------------- */
.ac-text-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-blue);
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.15s;
}
.ac-text-link:hover { opacity: 0.75; }

.ac-dl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.ac-dl-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.ac-dl-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.ac-dl-card--disabled {
    opacity: 0.55;
    pointer-events: none;
}

.ac-dl-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ac-dl-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.ac-dl-icon svg { width: 20px; height: 20px; }

.ac-dl-icon--windows { background: #eff6ff; color: #3b82f6; }
.ac-dl-icon--macos   { background: #f5f3ff; color: #8b5cf6; }
.ac-dl-icon--linux   { background: #fefce8; color: #ca8a04; }
.ac-dl-icon--android { background: #f0fdf4; color: #22c55e; }
.ac-dl-icon--ios     { background: #eff6ff; color: #007aff; }

.ac-dl-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.ac-dl-compat {
    font-size: 11.5px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.ac-dl-btns {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: auto;
}

.ac-dl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 9px;
    border: 1.5px solid var(--border-light);
    background: transparent;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.ac-dl-btn:hover {
    border-color: var(--text-main);
    background: #f8f9fa;
}

.ac-dl-btn--primary {
    background: var(--text-main);
    border-color: var(--text-main);
    color: #fff;
}

.ac-dl-btn--primary:hover {
    background: #111;
    border-color: #111;
    color: #fff;
}

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

/* -------------------------------------------------------
   23. TICKETS — compact support card + commission entry
------------------------------------------------------- */
.ac-pill-btn--ghost {
    border-color: var(--border-light);
    color: var(--text-secondary);
    background: transparent;
}

.ac-pill-btn--ghost:hover {
    border-color: var(--text-main);
    background: transparent;
    color: var(--text-main);
}

.ac-support-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.ac-support-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.ac-support-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #eff6ff;
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ac-support-text { min-width: 0; }

.ac-support-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.ac-support-desc {
    font-size: 13px;
    color: var(--text-tertiary);
    line-height: 1.5;
}

.ac-support-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Commission entry row */
.ac-commission-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #f8f9fa;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    gap: 12px;
}

.ac-commission-entry-label {
    font-size: 13px;
    color: var(--text-secondary);
    flex: 1;
    min-width: 0;
    line-height: 1.5;
}

.ac-commission-entry-label svg {
    vertical-align: middle;
    margin-right: 6px;
    flex-shrink: 0;
}

.ac-commission-entry-label strong {
    color: var(--text-main);
    font-weight: 600;
}

.ac-text-link-btn {
    border: none;
    background: none;
    font-family: var(--font-body);
    font-size: 13px;
    flex-shrink: 0;
    white-space: nowrap;
    font-weight: 600;
    color: var(--accent-blue);
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
    transition: opacity 0.15s;
}

.ac-text-link-btn:hover { opacity: 0.75; }

/* -------------------------------------------------------
   24. RESPONSIVE
------------------------------------------------------- */
@media (max-width: 1024px) {
    .ac-stat-grid { grid-template-columns: repeat(2, 1fr); }
    .ac-two-col { grid-template-columns: 1fr; }
    .ac-danger-card { order: -1; }
}

@media (max-width: 768px) {
    .ac-sidebar {
        display: none; /* Mobile: sidebar hidden, use scroll */
    }

    .ac-main {
        padding: 24px 20px 0;
    }

    .ac-layout {
        padding-top: 60px;
    }

    .ac-hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 28px 24px;
        min-height: auto;
        gap: 20px;
    }

    .ac-hero-email { font-size: 20px; }

    .ac-stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .ac-stat-grid--3 { grid-template-columns: 1fr 1fr; }

    .ac-email-text { display: none; }
    .ac-topbar-sep, .ac-topbar-page { display: none; }

    .ac-topbar-inner { padding: 0 20px; }

    .ac-form-row { flex-direction: column; }

    .ac-two-col { grid-template-columns: 1fr; }

    .ac-support-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 20px;
    }

    .ac-support-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .ac-support-actions .ac-pill-btn {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .ac-stat-grid { grid-template-columns: 1fr 1fr; }
    .ac-stat-val  { font-size: 20px; }
    .ac-section-head { flex-direction: column; align-items: flex-start; }
}

/* -------------------------------------------------------
   CONFIRM MODAL (xs)
------------------------------------------------------- */
.ac-modal-box--xs { max-width: 380px; }

.ac-confirm-msg {
    margin: 0 0 22px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.ac-confirm-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.ac-ghost-btn--neutral:hover {
    background: #f4f5f7;
    border-color: #d1d5db;
    color: var(--text-main);
}

.ac-confirm-ok-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 22px;
    border-radius: 10px;
    border: none;
    background: var(--accent-blue);
    color: #fff;
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.ac-confirm-ok-btn:hover { opacity: 0.88; }
.ac-confirm-ok-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* -------------------------------------------------------
   TOAST
------------------------------------------------------- */
.ac-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: #1a1a2e;
    color: #fff;
    font-size: 13.5px;
    font-weight: 500;
    padding: 11px 22px;
    border-radius: 100px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s, transform 0.22s;
    white-space: nowrap;
    z-index: 1200;
    max-width: calc(100vw - 40px);
    text-align: center;
}

.ac-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.ac-toast.is-error { background: #dc2626; }
.ac-toast.is-success { background: var(--accent-blue); }
