/* =========================================================
   User panel shell — clean white layout, yellow accent.
   Loaded after style.css (head.php) so it overrides the
   old blue template. Page-specific tweaks go here, not in
   style.css / bootstrap.min.css.
   ========================================================= */
:root {
    --ac-accent: #E84545;
    --ac-on-accent: #FFFFFF;
    --ac-accent-hover: #D63939;
    --ac-accent-soft: #FDECEC;
    --ac-banner: #FDF1F1;
    --ac-ink: #141D22;
    --ac-ink-2: #3C4449;
    --ac-muted: #6D7478;
    --ac-line: #E6E8EA;
    --ac-line-2: #EFF1F2;
    --ac-surface: #FFFFFF;
    --ac-hover: #F3F5F6;
    --ac-link: #2F6FEB;
    --ac-success: #0F9D58;
    --ac-danger: #D93025;
    --ac-warn: #B26A00;
    --ac-topbar-h: 70px;
    --ac-sidebar-w: 300px;
    --ac-sidebar-mini: 76px;
    --ac-radius: 6px;
}

body {
    font-family: "Inter", "Heebo", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--ac-ink);
    background: var(--ac-surface);
    -webkit-font-smoothing: antialiased;
}

/* Scoped to .content so login.php keeps its own look */
.content a { color: var(--ac-link); }
.content a:hover { color: var(--ac-ink); }

/* ---------- Page frame ---------- */
.container-xxl {
    max-width: none;
    background: var(--ac-surface) !important;
}

/* ---------- Top bar ---------- */
.ac-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--ac-topbar-h);
    background: var(--ac-surface);
    border-bottom: 1px solid var(--ac-line);
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 1030;
}
.ac-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ac-ink);
    text-decoration: none;
    font-weight: 700;
    font-size: 26px;
    letter-spacing: -0.5px;
    line-height: 1;
}
.ac-brand:hover { color: var(--ac-ink); }
.ac-brand-mark {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--ac-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    color: var(--ac-on-accent);
}
.ac-brand small {
    font-weight: 500;
    font-size: 26px;
    color: var(--ac-ink-2);
}
.ac-burger {
    display: none;
    border: 0;
    background: transparent;
    font-size: 24px;
    margin-right: 10px;
    color: var(--ac-ink);
    padding: 4px 6px;
}
.ac-topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ac-balance {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--ac-radius);
    color: var(--ac-ink);
    font-weight: 600;
    font-size: 17px;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
}
.ac-balance i { font-size: 20px; }
.ac-balance:hover { background: var(--ac-hover); color: var(--ac-ink); }
.ac-icon-btn {
    width: 42px; height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--ac-ink);
    font-size: 20px;
    text-decoration: none;
    border: 0;
    background: transparent;
}
.ac-icon-btn:hover { background: var(--ac-hover); color: var(--ac-ink); }
.ac-icon-btn::after { display: none !important; }
.ac-user-menu {
    min-width: 250px;
    border: 1px solid var(--ac-line);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(20, 29, 34, .12);
    padding: 8px;
}
.ac-user-menu .ac-user-head {
    padding: 10px 12px 12px;
    border-bottom: 1px solid var(--ac-line);
    margin-bottom: 6px;
}
.ac-user-menu .ac-user-head strong { display: block; font-size: 15px; }
.ac-user-menu .ac-user-head span { color: var(--ac-muted); font-size: 13px; word-break: break-all; }
.ac-user-menu .dropdown-item {
    border-radius: var(--ac-radius);
    padding: 9px 12px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ac-user-menu .dropdown-item:hover { background: var(--ac-hover); }

/* ---------- Sidebar ---------- */
.sidebar.ac-sidebar {
    position: fixed;
    top: var(--ac-topbar-h);
    left: 0;
    bottom: 0;
    width: var(--ac-sidebar-w);
    height: auto;
    margin-left: 0;
    padding: 0 !important;
    background: var(--ac-surface);
    border-right: 1px solid var(--ac-line);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width .2s ease, transform .25s ease;
    z-index: 1020;
}
.ac-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px 10px 10px;
}
.ac-group + .ac-group { margin-top: 6px; }
.ac-group-head {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border: 0;
    background: transparent;
    color: var(--ac-ink);
    font-size: 17px;
    font-weight: 500;
    text-align: left;
    border-radius: var(--ac-radius);
}
.ac-group-head:hover { background: var(--ac-hover); }
.ac-group-head > i:first-child { font-size: 20px; width: 22px; text-align: center; color: var(--ac-ink-2); }
.ac-group-head .ac-chevron {
    margin-left: auto;
    font-size: 14px;
    color: var(--ac-ink-2);
    transition: transform .2s ease;
}
.ac-group.is-closed .ac-chevron { transform: rotate(180deg); }
.ac-group.is-closed .ac-group-items { display: none; }
.ac-group-items { padding: 4px 0 8px 36px; }
.ac-link {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    margin-bottom: 2px;
    border-radius: var(--ac-radius);
    color: var(--ac-ink);
    font-size: 16px;
    text-decoration: none;
}
.ac-link:hover { background: var(--ac-hover); color: var(--ac-ink); }
.ac-link.active { background: var(--ac-hover); font-weight: 500; }
.ac-link .ac-link-icon { display: none; }
.ac-link .ac-ext { margin-left: auto; color: var(--ac-muted); font-size: 14px; }
.ac-badge {
    margin-left: auto;
    font-size: 12px;
    font-weight: 500;
    color: var(--ac-link);
    background: #EAF1FE;
    padding: 2px 8px;
    border-radius: 20px;
}
.ac-refer {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 10px;
    padding: 14px 16px;
    background: #F4EEFF;
    border: 1px solid #E4D9FB;
    border-radius: 8px;
    color: var(--ac-ink);
    font-weight: 600;
    font-size: 16px;
    line-height: 1.35;
    text-decoration: none;
}
.ac-refer:hover { color: var(--ac-ink); background: #EEE5FF; }
.ac-refer i { font-size: 22px; }
.ac-collapse {
    border: 0;
    border-top: 1px solid var(--ac-line);
    background: transparent;
    padding: 14px;
    color: var(--ac-ink-2);
    font-size: 18px;
}
.ac-collapse:hover { background: var(--ac-hover); }

/* Collapsed (desktop mini) sidebar */
body.ac-mini .sidebar.ac-sidebar { width: var(--ac-sidebar-mini); }
body.ac-mini .ac-group-head span,
body.ac-mini .ac-group-head .ac-chevron,
body.ac-mini .ac-group-items,
body.ac-mini .ac-refer span { display: none !important; }
body.ac-mini .ac-group-head,
body.ac-mini .ac-refer { justify-content: center; padding-left: 0; padding-right: 0; }
body.ac-mini .ac-collapse i { transform: rotate(180deg); display: inline-block; }
body.ac-mini .content { margin-left: var(--ac-sidebar-mini); width: calc(100% - var(--ac-sidebar-mini)); }

/* ---------- Content area ---------- */
.content {
    margin-left: var(--ac-sidebar-w) !important;
    width: calc(100% - var(--ac-sidebar-w)) !important;
    padding-top: var(--ac-topbar-h);
    min-height: 100vh;
    background: var(--ac-surface);
    display: flex;
    flex-direction: column;
    transition: margin-left .2s ease, width .2s ease;
}
body.ac-mini .content {
    margin-left: var(--ac-sidebar-mini) !important;
    width: calc(100% - var(--ac-sidebar-mini)) !important;
}
.content > .container-fluid { padding-left: 50px; padding-right: 50px; }

/* Existing inner pages (investments, profile, …) pick up the new look */
.content .bg-light {
    background: var(--ac-surface) !important;
    border: 1px solid var(--ac-line);
    border-radius: 8px !important;
}
.content .table { color: var(--ac-ink); }
.content .table > :not(caption) > * > * { padding: 14px 12px; }
.content .table thead th {
    color: var(--ac-muted);
    font-weight: 500;
    font-size: 14px;
    background: #FAFBFB;
}
.content .table-bordered > :not(caption) > * > * { border-width: 0; border-bottom: 1px solid var(--ac-line); }
.content .table-bordered > :not(caption) > * { border-width: 0; }
.content .table-hover > tbody > tr:hover > * { --bs-table-accent-bg: #FAFBFB; }
.content .form-control,
.content .form-select {
    border: 1px solid var(--ac-line);
    border-radius: var(--ac-radius);
    padding: 10px 12px;
}
.content .form-control:focus,
.content .form-select:focus {
    border-color: #C9CDD0;
    box-shadow: 0 0 0 3px rgba(232, 69, 69, .25);
}
.content .btn-company,
.content .btn-primary {
    background: var(--ac-accent) !important;
    border-color: var(--ac-accent) !important;
    color: var(--ac-on-accent) !important;
    font-weight: 500;
}
.content .btn-company:hover,
.content .btn-primary:hover { background: var(--ac-accent-hover) !important; border-color: var(--ac-accent-hover) !important; }
.content .text-company { color: var(--ac-ink) !important; }
.spinner-border.text-company { color: var(--ac-accent) !important; }

/* ---------- Dashboard components ---------- */
.ac-banner {
    background: var(--ac-banner);
    border-bottom: 1px solid #F6D5D5;
    padding: 18px 50px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.ac-banner-ring {
    width: 58px; height: 58px;
    border-radius: 50%;
    border: 4px solid #E3E5E7;
    border-top-color: #7C8A93;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex: 0 0 auto;
}
.ac-banner p { margin: 0; font-size: 19px; color: var(--ac-ink); }
.ac-banner-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

.ac-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 22px;
    border-radius: var(--ac-radius);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.5;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease;
}
.ac-btn i { font-size: 18px; }
.content a.ac-btn,
.ac-topbar a,
.ac-topbar a:hover { color: var(--ac-ink); }
.back-to-top.btn-primary {
    background: var(--ac-accent);
    border-color: var(--ac-accent);
    color: var(--ac-on-accent);
}
.ac-btn-accent,
.content a.ac-btn-accent { background: var(--ac-accent); color: var(--ac-on-accent); }
.ac-btn-accent:hover,
.content a.ac-btn-accent:hover { background: var(--ac-accent-hover); color: var(--ac-on-accent); }
.ac-btn-soft { background: #EFF1F2; color: var(--ac-ink); }
.ac-btn-soft:hover { background: #E4E7E9; color: var(--ac-ink); }
.ac-btn-square { padding: 11px 16px; }

.ac-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 56px 0 26px;
    flex-wrap: wrap;
}
.ac-page-head h1 {
    font-size: 44px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin: 0;
    color: var(--ac-ink);
}

.ac-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.ac-seg {
    display: inline-flex;
    padding: 4px;
    border: 1px solid var(--ac-line);
    border-radius: var(--ac-radius);
    background: var(--ac-surface);
}
.ac-seg button {
    border: 0;
    background: transparent;
    padding: 9px 22px;
    border-radius: 4px;
    font-size: 17px;
    color: var(--ac-muted);
}
.ac-seg button.active { background: var(--ac-hover); color: var(--ac-ink); }

.ac-account {
    border: 1px solid var(--ac-line);
    border-radius: 8px;
    padding: 26px 30px;
    background: var(--ac-surface);
}
.ac-account-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ac-chip {
    font-size: 15px;
    background: #F1F3F4;
    padding: 3px 8px;
    border-radius: 4px;
    color: var(--ac-ink-2);
}
.ac-account-id { font-size: 18px; margin-left: 12px; }
.ac-account-id b { font-weight: 600; }
.ac-account-toggle {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--ac-ink-2);
    font-size: 16px;
}
.ac-account-body {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.ac-amount { line-height: 1; color: var(--ac-ink); white-space: nowrap; }
.ac-amount .int { font-size: 44px; font-weight: 500; letter-spacing: -1px; }
.ac-amount .dec { font-size: 20px; }
.ac-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ac-account-details {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--ac-line);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.ac-account-details[hidden] { display: none; }
.ac-stat-label { color: var(--ac-muted); font-size: 14px; margin-bottom: 4px; }
.ac-stat-value { font-size: 20px; font-weight: 500; }

.ac-section-title {
    font-size: 24px;
    font-weight: 600;
    margin: 46px 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ac-section-title a { font-size: 15px; font-weight: 400; }

.ac-plan {
    border: 1px solid var(--ac-line);
    border-radius: 8px;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--ac-surface);
}
.ac-plan-head { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.ac-plan-head h3 { font-size: 20px; font-weight: 600; margin: 0; }
.ac-plan-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--ac-line-2);
    font-size: 15px;
}
.ac-plan-row span:first-child { color: var(--ac-muted); }
.ac-plan-row span:last-child { font-weight: 500; }
.ac-plan form { margin-top: auto; padding-top: 18px; }
.ac-input-group { position: relative; margin-bottom: 12px; }
.ac-input-group span {
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--ac-muted);
}
.ac-input-group .form-control { padding-left: 28px; }

.ac-table-wrap {
    border: 1px solid var(--ac-line);
    border-radius: 8px;
    overflow: hidden;
}
.ac-table-wrap .table { margin: 0; }
.ac-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
}
.ac-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ac-status-pending { background: #FFF4DB; color: var(--ac-warn); }
.ac-status-completed { background: #E6F4EC; color: var(--ac-success); }
.ac-status-cancelled { background: #FDECEA; color: var(--ac-danger); }
.ac-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--ac-muted);
}
.ac-empty i { font-size: 32px; display: block; margin-bottom: 8px; }

.ac-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 8px;
    border: 1px solid var(--ac-line);
    background: #F7F8F9;
    margin-top: 24px;
    font-size: 15px;
}
.ac-alert .btn-close { margin-left: auto; font-size: 12px; }

.ac-footer {
    margin-top: auto;
    padding: 80px 50px 40px;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 60px;
    color: var(--ac-muted);
    font-size: 14px;
    line-height: 1.45;
}
.ac-footer p { margin-bottom: 12px; }
.ac-footer ul { list-style: none; padding: 0; margin: 0 0 18px; }
.ac-footer li { margin-bottom: 8px; }
.ac-footer li a { color: var(--ac-link); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Responsive ---------- */
.ac-backdrop {
    display: none;
    position: fixed;
    inset: var(--ac-topbar-h) 0 0 0;
    background: rgba(20, 29, 34, .35);
    z-index: 1015;
}

@media (max-width: 1199.98px) {
    .ac-account-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ac-footer { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 991.98px) {
    .ac-burger { display: inline-flex; }
    .sidebar.ac-sidebar { transform: translateX(-100%); width: var(--ac-sidebar-w) !important; }
    body.ac-open .sidebar.ac-sidebar { transform: translateX(0); }
    body.ac-open .ac-backdrop { display: block; }
    .ac-collapse { display: none; }
    body.ac-mini .ac-group-head span,
    body.ac-mini .ac-group-head .ac-chevron,
    body.ac-mini .ac-refer span { display: inline !important; }
    .content,
    body.ac-mini .content { margin-left: 0 !important; width: 100% !important; }
    .content > .container-fluid,
    .ac-banner,
    .ac-footer { padding-left: 16px; padding-right: 16px; }
    .ac-page-head { margin-top: 32px; }
    .ac-page-head h1 { font-size: 32px; }
}

@media (max-width: 767.98px) {
    :root { --ac-topbar-h: 60px; }
    .ac-brand { font-size: 21px; }
    .ac-brand small { font-size: 21px; }
    .ac-topbar { padding: 0 10px; }
    .ac-hide-sm { display: none !important; }
    .ac-balance { font-size: 15px; padding: 6px 8px; }
    .ac-banner { flex-wrap: wrap; }
    .ac-banner p { font-size: 16px; flex: 1 1 200px; }
    .ac-banner-actions { margin-left: 0; width: 100%; }
    .ac-banner-actions .ac-btn { flex: 1 1 auto; }
    .ac-account { padding: 20px 16px; }
    .ac-account-id { margin-left: 0; width: 100%; order: 3; }
    .ac-actions { width: 100%; }
    .ac-actions .ac-btn { flex: 1 1 calc(50% - 10px); padding: 10px 12px; font-size: 16px; }
    .ac-actions .ac-btn-square { flex: 0 0 auto; }
    .ac-account-details { grid-template-columns: 1fr 1fr; }
}

/* ---------- Sign in page (login.php) ---------- */
body.ac-auth { background: var(--ac-surface); }
.ac-auth-main {
    padding: calc(var(--ac-topbar-h) + 30px) 16px 60px;
    display: flex;
    justify-content: center;
}
.ac-auth-box { width: 100%; max-width: 490px; }
.ac-auth-box h1 {
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.3px;
    color: var(--ac-ink);
    margin: 0 0 36px;
}
.ac-auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--ac-line);
    margin-bottom: 36px;
}
.ac-auth-tabs a {
    flex: 1 1 50%;
    text-align: center;
    padding: 14px 8px 16px;
    font-size: 19px;
    color: var(--ac-muted);
    text-decoration: none;
    border-bottom: 4px solid transparent;
    margin-bottom: -1px;
}
.ac-auth-tabs a:hover { color: var(--ac-ink); }
.ac-auth-tabs a.active { color: var(--ac-ink); border-bottom-color: var(--ac-ink); }
.ac-field { margin-bottom: 24px; }
.ac-field label {
    display: block;
    font-size: 15px;
    color: var(--ac-ink);
    margin-bottom: 8px;
}
.ac-auth .form-control {
    height: 50px;
    border: 1px solid #DDE0E2;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 16px;
    color: var(--ac-ink);
}
.ac-auth .form-control:focus {
    border-color: #9AA2A7;
    box-shadow: 0 0 0 3px rgba(232, 69, 69, .25);
}
.ac-pass { position: relative; }
.ac-pass .form-control { padding-right: 48px; }
.ac-eye {
    position: absolute;
    right: 6px; top: 50%;
    transform: translateY(-50%);
    width: 38px; height: 38px;
    border: 0;
    background: transparent;
    color: var(--ac-ink-2);
    font-size: 17px;
    border-radius: 4px;
}
.ac-eye:hover { background: var(--ac-hover); }
.ac-auth-submit { margin-top: 36px; height: 50px; }
.ac-auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0 18px;
    font-size: 17px;
    color: var(--ac-ink);
}
.ac-auth-divider::before,
.ac-auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--ac-line); }
.ac-auth .ac-btn-soft { height: 50px; color: var(--ac-ink); }
.ac-auth-forgot { text-align: center; margin: 40px 0 0; }
.ac-auth-forgot a { color: var(--ac-link); font-size: 17px; text-decoration: none; }
.ac-auth-forgot a:hover { text-decoration: underline; }
.ac-auth-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 24px;
    border-radius: 4px;
    background: #FDECEA;
    color: var(--ac-danger);
    font-size: 15px;
}
@media (max-width: 575.98px) {
    .ac-auth-box h1 { font-size: 24px; margin-bottom: 24px; }
    .ac-auth-tabs a { font-size: 17px; }
}
.ac-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: var(--ac-ink);
}
.ac-check .form-check-input { width: 18px; height: 18px; margin: 0; }
.ac-check .form-check-input:checked { background-color: var(--ac-ink); border-color: var(--ac-ink); }
.ac-check label { margin: 0; }
.ac-check + .ac-auth-submit { margin-top: 30px; }

/* Image logo (images/logo.png) in the top bar */
.ac-brand-logo { height: 50px; width: auto; display: block; }
@media (max-width: 767.98px) {
  .ac-brand-logo { height: 40px; }
}

/* ---------- Referral program (referral.php) + invite note (signup.php) ---------- */
.ac-ref-card { padding: 28px 30px; }
.ac-ref-intro { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 22px; }
.ac-ref-icon {
    width: 52px; height: 52px; flex: 0 0 auto;
    border-radius: 12px;
    background: var(--ac-accent-soft);
    color: var(--ac-accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
}
.ac-ref-title { font-size: 21px; font-weight: 600; margin: 2px 0 6px; color: var(--ac-ink); }
.ac-ref-text { margin: 0; color: var(--ac-ink-2); font-size: 15px; }
.ac-ref-label { display: block; font-size: 14px; color: var(--ac-muted); margin-bottom: 8px; }
.ac-ref-link { display: flex; gap: 10px; }
.ac-ref-link input {
    flex: 1 1 auto; min-width: 0;
    height: 48px;
    padding: 10px 14px;
    border: 1px solid var(--ac-line);
    border-radius: var(--ac-radius);
    background: #FAFBFB;
    font-family: Consolas, "SFMono-Regular", monospace;
    font-size: 15px;
    color: var(--ac-ink);
}
.ac-ref-link input:focus { outline: none; border-color: #C9CDD0; box-shadow: 0 0 0 3px rgba(232, 69, 69, .2); }
.ac-ref-share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; color: var(--ac-muted); font-size: 14px; }
.ac-ref-share .ac-btn { font-size: 14px; padding: 7px 12px; }
.ac-ref-share .bi-whatsapp { color: #25D366; }
.ac-ref-share .bi-telegram { color: #229ED9; }
.ac-ref-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.ac-ref-stat { border: 1px solid var(--ac-line); border-radius: 8px; padding: 18px 20px; }
.ac-ref-levels { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 15px; font-weight: 400; }
.ac-auth-invite { background: var(--ac-accent-soft); color: var(--ac-ink); }
.ac-auth-invite i { color: var(--ac-accent); }

/* Dashboard "refer & earn" strip (index.php) */
.ac-ref-strip {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    margin-top: 16px;
    padding: 16px 20px;
    border: 1px dashed #F1B7B7;
    border-radius: 8px;
    background: #FFF8F8;
}
.ac-ref-strip .ac-ref-icon { width: 42px; height: 42px; font-size: 20px; }
.ac-ref-strip-text { flex: 1 1 260px; min-width: 0; }
.ac-ref-strip-text b { display: block; font-size: 16px; }
.ac-ref-strip-text code { color: var(--ac-ink-2); font-size: 13px; word-break: break-all; }

@media (max-width: 1199.98px) { .ac-ref-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767.98px) {
    .ac-ref-card { padding: 20px 16px; }
    .ac-ref-link { flex-direction: column; }
    .ac-ref-link .ac-btn { width: 100%; }
}
