/* ============================================================
   RDM Hosting - App stylesheet
   Palette: dark blue, light blue, white
   ============================================================ */
:root {
    --navy: #0b2545;
    --navy-2: #103a6b;
    --navy-3: #164a86;
    --blue: #1d6fd6;
    --blue-600: #1559b0;
    --blue-light: #7fb3ff;
    --blue-soft: #e8f1ff;
    --white: #ffffff;
    --bg: #f4f8fd;
    --text: #16273d;
    --muted: #66788f;
    --border: #d9e4f2;
    --success: #1f9d55;
    --success-soft: #e4f7ec;
    --warning: #c47f17;
    --warning-soft: #fdf3e2;
    --danger: #cf3d3d;
    --danger-soft: #fdeaea;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 10px 30px rgba(11, 37, 69, .08);
    --shadow-sm: 0 2px 10px rgba(11, 37, 69, .06);
    --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.55;
    font-size: 15px;
}

/* Sticky footer: layouts are full-height flex columns. */
body.theme-public,
body.theme-client { display: flex; flex-direction: column; min-height: 100vh; }

h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; color: var(--navy); }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
hr.divider { border: none; border-top: 1px solid var(--border); margin: 1.2rem 0; }

.container { width: min(1180px, 92%); margin: 0 auto; }
.section { padding: 2.5rem 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
.right { text-align: right; }
.link { color: var(--blue); font-weight: 600; }
.hint { color: var(--muted); font-size: .82rem; display: block; margin-top: .25rem; }
.inline { display: inline-block; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .62rem 1.1rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--blue-soft);
    color: var(--navy);
    font-weight: 600;
    font-size: .92rem;
    cursor: pointer;
    transition: transform .05s ease, background .15s ease, box-shadow .15s ease;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-600); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--navy); }
.btn-outline:hover { background: var(--blue-soft); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-light { background: #fff; color: var(--navy); }
.btn-sm { padding: .38rem .7rem; font-size: .82rem; }
.btn-xs { padding: .2rem .45rem; font-size: .72rem; }
.btn-lg { padding: .8rem 1.4rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Forms ---------- */
.field { margin-bottom: 1rem; }
.field > label { display: block; font-weight: 600; font-size: .86rem; margin-bottom: .35rem; color: var(--navy); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="url"], select, textarea {
    width: 100%;
    padding: .65rem .8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    font-size: .95rem;
    font-family: inherit;
    transition: border .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(29, 111, 214, .15);
}
input[disabled], textarea[disabled] { background: #f1f5fb; color: var(--muted); }
textarea { resize: vertical; }
.input-group { display: flex; }
.input-group input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-addon {
    border: 1px solid var(--border);
    border-left: none;
    background: var(--blue-soft);
    color: var(--navy);
    padding: 0 .9rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    cursor: pointer;
    font-weight: 600;
    font-size: .82rem;
}
.checkbox { display: flex; align-items: center; gap: .5rem; margin: .5rem 0 1rem; font-weight: 500; }
.checkbox input { width: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 1.1rem; }
.form-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .5rem; }

/* ---------- Cards ---------- */
.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.3rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.2rem;
}
.card-title { font-size: 1.05rem; margin-bottom: .9rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 0 0 .9rem; padding-bottom: .7rem; border-bottom: 1px solid var(--border); }
.card-head .card-title { margin: 0; }
.empty-state { padding: 1.5rem; text-align: center; color: var(--muted); }

/* ---------- Alerts ---------- */
.alert {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .85rem 1rem;
    border-radius: var(--radius-sm);
    margin: 0 0 1.2rem;
    border: 1px solid transparent;
    font-size: .92rem;
    line-height: 1.5;
}
.alert-success { background: var(--success-soft); color: #14663a; border-color: #b9e7cc; }
.alert-error { background: var(--danger-soft); color: #8f2626; border-color: #f3c4c4; }
.alert-warning { background: var(--warning-soft); color: #8a5a10; border-color: #f0d8ab; }
.alert-info { background: var(--blue-soft); color: var(--navy-2); border-color: #c3dbff; }
.alert-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: inherit; line-height: 1; }

/* ---------- Badges ---------- */
.badge {
    display: inline-block;
    padding: .22rem .6rem;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .02em;
    background: #eef2f7;
    color: var(--muted);
}
.badge-success { background: var(--success-soft); color: #14663a; }
.badge-warning { background: var(--warning-soft); color: #8a5a10; }
.badge-danger { background: var(--danger-soft); color: #8f2626; }
.badge-info { background: var(--blue-soft); color: var(--blue-600); }
.badge-muted { background: #eef2f7; color: var(--muted); }

/* ---------- Tables (clean, Cloudflare-inspired) ---------- */
.table-wrap {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: auto;
    background: #fff;
}
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { padding: .7rem 1rem; text-align: left; vertical-align: middle; }
.table thead th {
    background: #f7faff;
    color: #5b6b82;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}
.table tbody td { border-bottom: 1px solid #eef3fa; color: var(--text); }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .12s ease; }
.table tbody tr:hover { background: #f6faff; }
.table a { color: var(--navy-2); font-weight: 600; }
.table a:hover { color: var(--blue); text-decoration: none; }
.table small { color: var(--muted); }
.table td.right, .table th.right { text-align: right; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: 1rem; align-items: center; }
.pagination a, .pagination span {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 .5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--navy);
    font-size: .85rem;
}
.pagination a:hover { background: var(--blue-soft); text-decoration: none; }
.pagination .current { background: var(--blue); color: #fff; border-color: var(--blue); }
.pagination .ellipsis { border: none; background: none; }

/* ---------- Public header ---------- */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark {
    display: inline-block;
    height: 36px; width: auto; max-width: 100%;
    object-fit: contain;
}
.brand-text { font-size: 1.02rem; }
.site-nav { display: flex; align-items: center; gap: 1.1rem; }
.site-nav a { color: #d7e6ff; font-weight: 600; font-size: .92rem; }
.site-nav a:hover { color: #fff; text-decoration: none; }
.site-nav a.active { color: #fff; border-bottom: 2px solid var(--blue-light); }
.site-nav .btn { color: #fff; }
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: .35rem .6rem;
    border-radius: var(--radius-sm);
    position: relative;
    z-index: 70;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(127, 179, 255, .35);
}
.nav-toggle:hover { background: rgba(127, 179, 255, .15); }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(140deg, var(--navy) 0%, var(--navy-2) 55%, var(--blue-600) 100%); color: #fff; padding: 3.5rem 0; }
.hero-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center; }
.hero h1 { color: #fff; font-size: 2.1rem; margin-bottom: 1rem; }
.hero p { color: #cfe0f7; font-size: 1.05rem; }
.pill { display: inline-block; background: rgba(127,179,255,.18); color: var(--blue-light); border: 1px solid rgba(127,179,255,.4); padding: .3rem .8rem; border-radius: 999px; font-size: .8rem; font-weight: 700; margin-bottom: 1rem; }
.hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.2rem; }
.hero-card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); padding: 1.4rem; backdrop-filter: blur(4px); }
.hero-card h3 { color: #fff; }

/* ---------- Lists ---------- */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 1.6rem; margin-bottom: .5rem; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--blue-light); font-weight: 800; }
.hero-card .check-list li::before { color: #9fe6b8; }

/* ---------- Pricing ---------- */
.section-head { text-align: center; margin-bottom: 2rem; }
.section-head h2 { font-size: 1.7rem; }
.section-head p { color: var(--muted); }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.price-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.price-card h3 { color: var(--navy); }
.price { font-size: 1.9rem; font-weight: 800; color: var(--blue); margin: .4rem 0 1rem; }
.price span { font-size: .9rem; font-weight: 500; color: var(--muted); }
.price-card .check-list { flex: 1; margin-bottom: 1rem; }
.price-card .check-list li::before { color: var(--success); }

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.news-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow-sm); }
.news-card time { color: var(--muted); font-size: .8rem; }
.news-card h3 { margin: .4rem 0; }
.news-card p { color: var(--muted); font-size: .9rem; }
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.news-list li:last-child { border-bottom: none; }
.news-list time { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.article-body { line-height: 1.8; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--navy), var(--blue-600)); color: #fff; padding: 2.5rem 0; margin-top: 1rem; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.cta-inner h2 { color: #fff; margin: 0; }
.cta-inner p { color: #cfe0f7; margin: 0; }

/* ---------- Footer ---------- */
.site-main { flex: 1 0 auto; }
.site-footer { background: var(--navy); color: #b9cdea; padding: 2.5rem 0 1rem; margin-top: 2rem; flex-shrink: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 1.5rem; }
.footer-brand { display: flex; align-items: center; gap: .6rem; margin-bottom: .7rem; }
.footer-logo { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; }
.site-footer h4 { color: #fff; font-size: .95rem; margin: 0; }
.footer-title { margin-bottom: 1rem; }
.footer-address { font-size: .82rem; color: #8fa9cf; margin-top: .5rem; }
.site-footer a { display: block; color: #b9cdea; font-size: .9rem; padding: .15rem 0; }
.site-footer a:hover { color: #fff; }
.footer-social { display: flex; gap: .8rem; margin-top: 1rem; }
.footer-social a { display: inline-flex; padding: .4rem; color: #b9cdea; transition: color .15s ease; }
.footer-social a:hover { color: #fff; }
.copyright { border-top: 1px solid rgba(255,255,255,.12); margin-top: 1.5rem; padding-top: 1rem; font-size: .82rem; color: #8fa9cf; }

/* ---------- Auth ---------- */
.auth-page {
    display: flex;
    justify-content: center;
    padding: 2rem 0 3rem;
}
.auth-card { width: min(420px, 100%); background: #fff; border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.auth-card-wide { width: min(760px, 100%); }
.auth-brand { text-align: center; margin-bottom: 1.2rem; }
.auth-brand h1 { font-size: 1.15rem; margin: 0; }
.auth-form h2 { font-size: 1.2rem; margin-bottom: .2rem; }
.auth-links { display: flex; justify-content: space-between; margin-top: 1rem; font-size: .88rem; }

/* ---------- App (client) ---------- */
.app-header { background: var(--navy); position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow-sm); }
.app-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.app-nav { display: flex; align-items: center; gap: 1rem; }
.app-nav a { color: #d7e6ff; font-weight: 600; font-size: .9rem; }
.app-nav a:hover { color: #fff; text-decoration: none; }
.app-nav a.active { color: #fff; border-bottom: 2px solid var(--blue-light); }
.app-nav .btn { color: #fff; }
.app-main { padding: 1.8rem 0 3rem; flex: 1 0 auto; }
.app-footer { background: #fff; border-top: 1px solid var(--border); padding: 1.2rem 0; color: var(--muted); font-size: .85rem; flex-shrink: 0; }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.3rem; flex-wrap: wrap; }
.page-head h1 { margin-bottom: .15rem; }
.page-head .muted { margin: 0; }
.page-head-actions { display: flex; gap: .5rem; align-items: center; flex-shrink: 0; }
.page-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.page-actions-inline { display: flex; gap: .5rem; flex-wrap: wrap; }
.filter-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.filter-form input[type="text"] { width: 240px; }
.filter-form select { width: auto; min-width: 150px; }

/* ---------- Dashboard widgets ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.4rem; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); }
.stat-card.stat-primary { background: linear-gradient(135deg, var(--navy), var(--blue-600)); border: none; }
.stat-card.stat-primary .stat-label { color: #cfe0f7; }
.stat-card.stat-primary .stat-value { color: #fff; }
.stat-label { display: block; font-size: .8rem; color: var(--muted); font-weight: 600; margin-bottom: .3rem; }
.stat-value { display: block; font-size: 1.5rem; font-weight: 800; color: var(--navy); }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-bottom: 1.2rem; }

.status-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.status-tabs .tab { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: .35rem .9rem; font-size: .84rem; color: var(--muted); }
.status-tabs .tab b { color: var(--navy); margin-left: .3rem; }

/* ---------- Detail list ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.detail-list { display: grid; grid-template-columns: minmax(130px, 42%) 1fr; gap: 0; margin: 0; }
.detail-list dt {
    margin: 0;
    padding: .6rem .5rem .6rem 0;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 500;
    border-bottom: 1px solid #eef3fa;
}
.detail-list dd {
    margin: 0;
    padding: .6rem 0;
    font-weight: 600;
    color: var(--navy);
    word-break: break-word;
    overflow-wrap: anywhere;
    border-bottom: 1px solid #eef3fa;
}
.detail-list dt:last-of-type,
.detail-list dd:last-of-type { border-bottom: none; }
.detail-list dd.amount { color: var(--blue); font-size: 1rem; }
.detail-list dd.secret, .secret { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; letter-spacing: .02em; }
.detail-list.compact dt { font-size: .8rem; padding: .45rem .5rem .45rem 0; }
.detail-list.compact dd { font-size: .85rem; padding: .45rem 0; }
.detail-list.compact dd.amount { font-size: .95rem; }
.small { font-size: .84rem; }
.bank-box { background: var(--blue-soft); border: 1px solid #c3dbff; border-radius: var(--radius-sm); padding: 1rem; margin-bottom: 1rem; display: grid; gap: .5rem; }
.bank-box > div { display: flex; justify-content: space-between; gap: 1rem; }
.bank-box .muted { font-size: .82rem; }
.bank-box.compact { padding: .7rem .85rem; gap: .3rem; font-size: .88rem; }

/* ---------- Order page ---------- */
.order-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.2rem; align-items: start; }
.order-layout .card { margin-bottom: 0; }
.order-col { display: flex; flex-direction: column; gap: 1.2rem; }
.order-col .card .field:last-child { margin-bottom: 0; }

.package-picker { display: grid; gap: .8rem; }
.package-option {
    display: grid;
    grid-template-columns: auto 76px 1fr auto;
    gap: 1rem;
    align-items: center;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 1rem 1.15rem;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.package-option:hover { border-color: var(--blue-light); box-shadow: var(--shadow-sm); }
.package-option.selected { border-color: var(--blue); background: var(--blue-soft); }
.package-option > input[type="radio"] { width: auto; accent-color: var(--blue); }
.package-thumb {
    width: 76px; height: 76px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--navy);
    border: 1px solid var(--border);
}
.package-info { display: flex; flex-direction: column; gap: .18rem; min-width: 0; }
.package-name { font-weight: 700; color: var(--navy); }
.package-desc { font-size: .84rem; color: var(--muted); margin: 0; line-height: 1.4; }
.package-meta { font-size: .79rem; color: var(--muted); }
.package-option .package-price { font-size: 1.05rem; font-weight: 800; color: var(--blue); white-space: nowrap; }
.package-option .package-price span { font-size: .75rem; font-weight: 500; color: var(--muted); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(11,37,69,.55); }
.modal-dialog { position: relative; width: min(460px, 100%); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--muted); line-height: 1; }
.modal-body { padding: 1.2rem; }

/* ---------- Admin ---------- */
.theme-admin { background: #eef3fa; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 250px; background: var(--navy); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand-light { padding: 1.2rem 1.2rem 1rem; }
.admin-nav { display: flex; flex-direction: column; padding: .5rem .7rem; flex: 1; overflow-y: auto; }
.admin-nav a { color: #c3d6f0; padding: .6rem .8rem; border-radius: var(--radius-sm); font-weight: 600; font-size: .92rem; margin-bottom: .15rem; }
.admin-nav a:hover { background: rgba(127,179,255,.12); color: #fff; text-decoration: none; }
.admin-nav a.active { background: var(--blue); color: #fff; }
.admin-sidebar-foot { padding: 1rem; border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .85rem; }
.admin-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--border); padding: .8rem 1.4rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 40; }
.admin-topbar .nav-toggle { display: none; color: var(--navy); }
.admin-page-title { font-size: 1.15rem; margin: 0; }
.admin-content { padding: 1.5rem; }
.danger-zone { border: 1px solid #f3c4c4; background: var(--danger-soft); border-radius: var(--radius); padding: 1rem; margin-bottom: 1.2rem; }

/* ---------- Error pages ---------- */
.error-page { text-align: center; padding: 4rem 0; }
.error-code { font-size: 4rem; font-weight: 900; color: var(--blue-light); line-height: 1; }

/* ---------- Horizontal pricing ---------- */
.pricing-horizontal {
    display: grid;
    grid-template-columns: 320px 1fr 240px;
    max-width: 1040px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 22px 55px rgba(11, 37, 69, .13);
    overflow: hidden;
}
.ph-plan {
    position: relative;
    padding: 2.3rem 2rem;
    background: linear-gradient(160deg, var(--navy) 0%, var(--blue-600) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.ph-badge {
    align-self: flex-start;
    background: rgba(127, 179, 255, .2);
    border: 1px solid rgba(127, 179, 255, .5);
    color: var(--blue-light);
    font-size: .7rem; font-weight: 800; letter-spacing: .07em;
    padding: .3rem .8rem; border-radius: 999px; margin-bottom: 1.1rem;
    text-transform: uppercase;
}
.ph-plan h3 { color: #fff; font-size: 1.35rem; margin-bottom: .5rem; }
.ph-price { font-size: 2.5rem; font-weight: 800; line-height: 1.1; color: #fff; }
.ph-price span { font-size: .95rem; font-weight: 500; color: #bcd4f5; }
.ph-note { color: #bcd4f5; font-size: .85rem; margin: .7rem 0 0; }
.ph-features { padding: 2.3rem 2rem; display: flex; flex-direction: column; justify-content: center; }
.ph-features h4 {
    font-size: .78rem; text-transform: uppercase; letter-spacing: .07em;
    color: var(--muted); margin: 0 0 1rem; font-weight: 800;
}
.pricing-horizontal .feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; margin: 0; }
.pricing-horizontal .feature-list li { padding: .55rem 0; font-size: .92rem; border-bottom: 1px solid var(--border); }
.ph-cta {
    padding: 2.3rem 1.8rem;
    display: flex; flex-direction: column; justify-content: center; gap: .8rem;
    background: #f8fbff;
    border-left: 1px solid var(--border);
}
.ph-cta .btn { white-space: nowrap; }

.feature-list { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.feature-list li { display: flex; align-items: center; gap: .6rem; padding: .6rem 0; border-bottom: 1px dashed var(--border); font-size: .94rem; }
.feature-list li:last-child { border-bottom: none; }
.feature-list li.spec { justify-content: space-between; }
.feature-list li.spec strong { color: var(--navy); }
.feature-list li.spec span { font-weight: 700; color: var(--blue); }
.feature-list li.feature { justify-content: flex-start; }
.feature-list li.feature .tick {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; flex: 0 0 22px;
    background: var(--success-soft); color: var(--success);
    border-radius: 50%; font-weight: 800; font-size: .8rem;
}

/* ---------- Subdomain input ---------- */
.subdomain-input { display: flex; align-items: stretch; }
.subdomain-input input { flex: 1; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.subdomain-suffix {
    display: inline-flex; align-items: center;
    padding: 0 1rem; background: var(--navy); color: #fff;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-weight: 700; font-size: .9rem; white-space: nowrap;
}
.subdomain-status { min-height: 0; margin-top: .4rem; font-size: .85rem; font-weight: 600; }
.subdomain-status:empty { display: none; }
.subdomain-status.is-loading { color: var(--muted); }
.subdomain-status.is-ok { color: var(--success); }
.subdomain-status.is-error { color: var(--danger); }
.subdomain-status.is-ok::before { content: "✓ "; }
.subdomain-status.is-error::before { content: "✕ "; }
.subdomain-status.is-loading::before { content: "⋯ "; }

/* ---------- Payment step ---------- */
.payment-layout { display: grid; grid-template-columns: 1fr 1.15fr; gap: 1.2rem; align-items: start; }
.order-summary .detail-list { grid-template-columns: 42% 58%; }
.summary-total {
    display: flex; justify-content: space-between; align-items: center;
    margin: 1.1rem 0; padding: .9rem 1rem;
    background: var(--blue-soft); border-radius: var(--radius-sm);
}
.summary-total strong { font-size: 1.35rem; color: var(--blue); }
.tabs { display: flex; gap: .3rem; background: var(--blue-soft); padding: .3rem; border-radius: var(--radius-sm); margin-bottom: 1.2rem; }
.tab-btn { flex: 1; border: none; background: transparent; padding: .6rem; border-radius: calc(var(--radius-sm) - 3px); font-weight: 700; color: var(--navy); cursor: pointer; font-size: .9rem; }
.tab-btn.active { background: #fff; box-shadow: var(--shadow-sm); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .hero-inner { grid-template-columns: 1fr; }
    .pricing-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-grid, .detail-grid, .order-layout, .payment-layout { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }

    /* Horizontal pricing stacks */
    .pricing-horizontal { grid-template-columns: 1fr; }
    .pricing-horizontal .feature-list { grid-template-columns: 1fr; }
    .ph-cta { border-left: none; border-top: 1px solid var(--border); }

    /* Mobile navigation */
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .header-inner, .app-header-inner { position: relative; }
    .site-nav, .app-nav {
        display: none;
        position: absolute;
        top: calc(100% + 2px);
        right: 0;
        left: 0;
        background: var(--navy);
        flex-direction: column;
        align-items: stretch;
        gap: .5rem;
        padding: 1rem 1.2rem;
        box-shadow: var(--shadow);
        border-top: 1px solid rgba(255, 255, 255, .1);
        z-index: 60;
    }
    .site-nav.open, .app-nav.open { display: flex; }
    .site-nav a.active, .app-nav a.active { border-bottom: none; color: var(--blue-light); }
    .site-nav a:not(.btn)::after, .app-nav a:not(.btn)::after { display: none; }
    .site-nav .btn, .app-nav .btn { width: 100%; }

    /* Admin sidebar */
    .admin-sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s ease; z-index: 90; }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-topbar .nav-toggle { display: inline-flex; color: var(--navy); }
}

@media (max-width: 720px) {
    body { font-size: 14.5px; }
    .hero h1 { font-size: 1.6rem; }
    .hero { padding: 2.2rem 0; }
    .pricing-grid, .news-grid, .stat-grid, .footer-grid { grid-template-columns: 1fr; }
    .filter-form { width: 100%; }
    .filter-form input[type="text"], .filter-form select { width: 100%; }
    .detail-list { grid-template-columns: 1fr; }
    .detail-list dt { border-bottom: none; padding: .5rem 0 0; }
    .detail-list dd { padding: .1rem 0 .6rem; }
    .order-summary .detail-list { grid-template-columns: 1fr; }

    /* Compact package option on small screens */
    .package-option { grid-template-columns: 48px 1fr; gap: .5rem .7rem; padding: .85rem 1rem; }
    .package-option > input[type="radio"] { grid-row: 1 / 3; align-self: start; margin-top: .2rem; }
    .package-thumb { grid-row: 1 / 3; align-self: center; width: 48px; height: 48px; }
    .package-info { grid-column: 2; grid-row: 1; }
    .package-option .package-price { grid-column: 2; grid-row: 2; justify-self: end; align-self: end; }

    /* Card-style responsive tables */
    .table-wrap { border: none; border-radius: 0; background: transparent; }
    .card.card-table { padding: .75rem; }
    .card.card-table > .card-head { padding: 0 0 .7rem; margin: 0 0 .75rem; }
    .card.card-table > .pagination { padding: 0; margin-top: .75rem; }
    .table.responsive thead { display: none; }
    .table.responsive tbody { display: block; }
    .table.responsive tr {
        display: block;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 12px;
        margin: 0 0 .7rem;
        padding: .7rem .9rem;
        box-shadow: var(--shadow-sm);
    }
    .table.responsive tr:last-child { margin-bottom: 0; }
    .table.responsive td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        border: none;
        padding: .38rem 0;
        text-align: right;
        border-bottom: 1px dashed #eef3fa;
    }
    .table.responsive td:last-child { border-bottom: none; padding-bottom: 0; }
    .table.responsive td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        font-weight: 600;
        color: var(--muted);
        text-align: left;
    }
    .table.responsive td:first-child { font-weight: 700; }
    .table.responsive td:first-child::before { color: var(--navy); }
    .table.responsive td.right { justify-content: flex-end; padding-top: .55rem; }
    .table.responsive td.right::before { content: none; }
}

/* ============================================================
   Elegant polish (tasteful overrides)
   ============================================================ */
body {
    background:
        radial-gradient(1100px 560px at 100% -8%, rgba(29, 111, 214, .07), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(127, 179, 255, .10), transparent 55%),
        var(--bg);
}

.card {
    border-radius: 16px;
    border-color: #e3ecf8;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card:hover { box-shadow: 0 14px 34px rgba(11, 37, 69, .09); }

.btn { border-radius: 10px; }
.btn-primary {
    background: linear-gradient(135deg, var(--blue), var(--blue-600));
    box-shadow: 0 6px 16px rgba(29, 111, 214, .26);
}
.btn-primary:hover { box-shadow: 0 10px 24px rgba(29, 111, 214, .34); }
.btn-outline { background: #fff; }
.btn-outline:hover { border-color: var(--blue-light); }

.site-nav a:not(.btn),
.app-nav a:not(.btn) { position: relative; }
.site-nav a:not(.btn)::after,
.app-nav a:not(.btn)::after {
    content: "";
    position: absolute;
    left: 0; right: 100%; bottom: -5px;
    height: 2px; border-radius: 2px;
    background: var(--blue-light);
    transition: right .22s ease;
}
.site-nav a:not(.btn):hover::after,
.app-nav a:not(.btn):hover::after,
.site-nav a:not(.btn).active::after,
.app-nav a:not(.btn).active::after { right: 0; }
.site-nav a.active, .app-nav a.active { border-bottom: none; }

.stat-card { border-radius: 16px; transition: transform .18s ease, box-shadow .18s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(11, 37, 69, .10); }

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus,
input[type="number"]:focus, input[type="date"]:focus, input[type="url"]:focus,
select:focus, textarea:focus { box-shadow: 0 0 0 4px rgba(29, 111, 214, .13); }

.alert { border-radius: 12px; }
.badge { letter-spacing: .03em; }
.table th { font-weight: 800; }
.section-head h2 { letter-spacing: -.01em; }

/* ============================================================
   Premium compact dashboards (client & admin)
   ============================================================ */
/* Headers */
.theme-client .app-header { background: linear-gradient(120deg, var(--navy), var(--navy-2)); }
.theme-admin .admin-sidebar { width: 232px; background: linear-gradient(180deg, var(--navy), #0a1f3a); }
.theme-admin .brand-light { padding: 1rem 1rem .8rem; }
.theme-admin .brand-mark { height: 40px; }
.theme-admin .admin-nav a { padding: .5rem .7rem; font-size: .88rem; margin-bottom: .1rem; }
.theme-admin .admin-sidebar-foot { padding: .8rem 1rem; font-size: .82rem; }
.theme-admin .admin-topbar { padding: .6rem 1.2rem; }
.theme-admin .admin-page-title { font-size: 1.05rem; }
.theme-admin .admin-content { padding: 1.1rem 1.2rem; }
.theme-client .app-main { padding: 1.3rem 0 2.2rem; }

/* Cards */
.theme-client .card,
.theme-admin .card { padding: 1.1rem 1.15rem; border-radius: 14px; margin-bottom: 1rem; }
.theme-client .card-title,
.theme-admin .card-title { font-size: 1rem; margin-bottom: .7rem; }
.theme-client .card-head,
.theme-admin .card-head { margin-bottom: .7rem; }

/* Page headings */
.theme-client .page-head,
.theme-admin .page-head { margin-bottom: 1rem; }
.theme-client .page-head h1,
.theme-admin .page-head h1 { font-size: 1.35rem; }
.theme-client .page-head .muted,
.theme-admin .page-head .muted { font-size: .85rem; }

/* Stat cards */
.theme-client .stat-grid,
.theme-admin .stat-grid { gap: .8rem; margin-bottom: 1.1rem; }
.theme-client .stat-card,
.theme-admin .stat-card {
    position: relative;
    overflow: hidden;
    padding: .85rem 1rem;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
}
.theme-client .stat-card::before,
.theme-admin .stat-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(var(--blue), var(--blue-light));
}
.theme-client .stat-card.stat-primary::before,
.theme-admin .stat-card.stat-primary::before { background: rgba(255, 255, 255, .55); }
.theme-client .stat-label,
.theme-admin .stat-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .25rem; }
.theme-client .stat-value,
.theme-admin .stat-value { font-size: 1.3rem; }

/* Dashboard grid */
.theme-client .dash-grid,
.theme-admin .dash-grid { gap: 1rem; margin-bottom: 1rem; }

/* Tables */
/* Tables inherit the clean base styles (see Tables section). */

/* Badges, alerts, tabs */
.theme-client .badge,
.theme-admin .badge { font-size: .7rem; padding: .2rem .55rem; }
.theme-client .alert,
.theme-admin .alert { padding: .75rem .9rem; font-size: .88rem; margin-bottom: 1rem; }
.theme-client .status-tabs .tab,
.theme-admin .status-tabs .tab { padding: .3rem .8rem; font-size: .8rem; }

/* Buttons */
.theme-client .btn,
.theme-admin .btn { padding: .52rem .95rem; font-size: .87rem; }
.theme-client .btn-sm,
.theme-admin .btn-sm { padding: .32rem .6rem; font-size: .77rem; }
.theme-client .btn-xs,
.theme-admin .btn-xs { padding: .18rem .45rem; font-size: .72rem; }
.theme-client .btn-lg,
.theme-admin .btn-lg { padding: .68rem 1.2rem; font-size: .95rem; }

/* Misc */
.theme-client .empty-state,
.theme-admin .empty-state { padding: 1.1rem; font-size: .9rem; }
.theme-client .detail-list dt,
.theme-admin .detail-list dt { font-size: .82rem; }
.theme-client .detail-list dd,
.theme-admin .detail-list dd { font-size: .88rem; }

/* Login option inside the order form */
.login-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    background: var(--blue-soft);
    border: 1px solid #c3dbff;
    border-radius: 10px;
    padding: .5rem .8rem;
    margin-bottom: .9rem;
    font-size: .86rem;
}
.login-note a { font-weight: 600; }

/* Full-bleed table cards (cleaner, Cloudflare-like) */
.card.card-table { padding: 0; overflow: hidden; }
.card.card-table > .card-head {
    padding: 1rem 1.15rem .8rem;
    margin: 0;
    border-bottom: 1px solid var(--border);
}
.card.card-table > .table-wrap { border: none; border-radius: 0; }
.card.card-table > .pagination { padding: 0 1.15rem 1rem; margin-top: .9rem; }
.card.card-table > .empty-state { padding: 1.5rem 1.15rem; }
.card.card-table .table thead th:first-child,
.card.card-table .table tbody td:first-child { padding-left: 1.15rem; }
.card.card-table .table thead th:last-child,
.card.card-table .table tbody td:last-child { padding-right: 1.15rem; }

/* ---------- Tutorial videos ---------- */
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.video-card {
    display: flex;
    flex-direction: column;
    text-align: left;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.video-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--blue-light); }
.video-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; background: linear-gradient(160deg, var(--navy), var(--blue-600)); overflow: hidden; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 54px; height: 54px;
    border-radius: 50%;
    background: rgba(11, 37, 69, .55);
    border: 2px solid rgba(255, 255, 255, .9);
    display: flex; align-items: center; justify-content: center;
    transition: background .16s ease, transform .16s ease;
}
.video-play::after {
    content: "";
    margin-left: 4px;
    border-style: solid;
    border-width: 9px 0 9px 15px;
    border-color: transparent transparent transparent #fff;
}
.video-card:hover .video-play { background: var(--blue); transform: translate(-50%, -50%) scale(1.06); }
.video-duration {
    position: absolute; right: 8px; bottom: 8px;
    background: rgba(11, 37, 69, .85);
    color: #fff;
    font-size: .72rem; font-weight: 600;
    padding: .15rem .45rem; border-radius: 6px;
}
.video-body { display: block; padding: .85rem .95rem 1rem; }
.video-title {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; font-size: .95rem; font-weight: 700; color: var(--navy);
    margin-bottom: .3rem; line-height: 1.35;
}
.video-desc {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; font-size: .82rem; color: var(--muted); line-height: 1.4;
}

/* Video modal player */
.modal-video .modal-dialog { width: min(920px, 100%); }
.modal-video .modal-body { padding: 0; }
.player-box { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #04101f; }
.player-box iframe, .player-box video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

/* Admin tutorial thumbnail */
.thumb-mini { display: inline-block; width: 84px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--navy); }
.thumb-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 980px) {
    .video-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
    .video-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Popup Toast Notifications (elegant, top-right)
   ============================================================ */
.popup-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 420px;
    width: calc(100% - 40px);
}

.popup-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(11, 37, 69, .14), 0 2px 8px rgba(11, 37, 69, .06);
    border: 1px solid #e3ecf8;
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: transform .4s cubic-bezier(.22, 1, .36, 1), opacity .35s ease;
    position: relative;
    overflow: hidden;
}

.popup-item.show {
    transform: translateX(0);
    opacity: 1;
}

.popup-item.hide {
    transform: translateX(120%);
    opacity: 0;
    transition: transform .35s cubic-bezier(.55, 0, 1, .45), opacity .25s ease;
}

.popup-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 14px 0 0 14px;
}

.popup-item[data-type="success"]::before { background: linear-gradient(180deg, #1f9d55, #2cc06a); }
.popup-item[data-type="error"]::before { background: linear-gradient(180deg, #cf3d3d, #e85656); }
.popup-item[data-type="warning"]::before { background: linear-gradient(180deg, #c47f17, #e0a030); }
.popup-item[data-type="info"]::before { background: linear-gradient(180deg, #1d6fd6, #4d94f0); }

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

.popup-item[data-type="success"] .popup-icon { background: #e4f7ec; color: #1f9d55; }
.popup-item[data-type="error"] .popup-icon { background: #fdeaea; color: #cf3d3d; }
.popup-item[data-type="warning"] .popup-icon { background: #fdf3e2; color: #c47f17; }
.popup-item[data-type="info"] .popup-icon { background: #e8f1ff; color: #1d6fd6; }

.popup-body {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}

.popup-title {
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 2px;
    line-height: 1.3;
}

.popup-item[data-type="success"] .popup-title { color: #14663a; }
.popup-item[data-type="error"] .popup-title { color: #8f2626; }
.popup-item[data-type="warning"] .popup-title { color: #8a5a10; }
.popup-item[data-type="info"] .popup-title { color: #103a6b; }

.popup-message {
    font-size: .88rem;
    color: #16273d;
    line-height: 1.45;
    word-break: break-word;
}

.popup-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a8c0;
    font-size: 18px;
    line-height: 1;
    padding: 2px;
    border-radius: 6px;
    transition: color .15s ease, background .15s ease;
    margin-top: -2px;
}

.popup-close:hover { color: #16273d; background: #f0f4f9; }

.popup-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 14px 14px;
    animation: popup-progress-shrink linear forwards;
}

.popup-item[data-type="success"] .popup-progress { background: rgba(31, 157, 85, .35); }
.popup-item[data-type="error"] .popup-progress { background: rgba(207, 61, 61, .35); }
.popup-item[data-type="warning"] .popup-progress { background: rgba(196, 127, 23, .35); }
.popup-item[data-type="info"] .popup-progress { background: rgba(29, 111, 214, .35); }

@keyframes popup-progress-shrink {
    from { width: 100%; }
    to { width: 0%; }
}

@media (max-width: 480px) {
    .popup-container {
        top: 12px;
        right: 12px;
        left: 12px;
        max-width: none;
        width: auto;
    }
}

/* Hide the hidden flash data elements */
.popup-toast { display: none; }

/* Remove old inline alert styles — replaced by popups */
.alert { display: none; }

/* ── Referral ─────────────────────────────────────────────────── */
.referral-code-box {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.referral-code-display {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.referral-code {
    display: inline-block;
    background: var(--blue-soft);
    color: var(--navy);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 4px;
    padding: .5rem 1.2rem;
    border-radius: var(--radius-sm);
    font-family: "Courier New", Courier, monospace;
}

.referral-link {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.referral-link-url {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.referral-link-url .input-sm {
    flex: 1;
    padding: .4rem .7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .85rem;
    background: var(--bg);
    color: var(--text);
}

.referral-status {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.tab-nav {
    display: flex;
    gap: .25rem;
    margin: 1.25rem 0 .75rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}

.tab-link {
    padding: .5rem 1rem;
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    font-size: .9rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color .15s, border-color .15s;
}

.tab-link:hover { color: var(--blue); }
.tab-link.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 640px) {
    .form-grid-2 { grid-template-columns: 1fr; }
    .referral-code { font-size: 1.3rem; letter-spacing: 2px; }
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table th,
.detail-table td {
    padding: .5rem .75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.detail-table th {
    width: 180px;
    font-weight: 600;
    color: var(--muted);
    background: var(--bg);
}

.pagination {
    display: flex;
    gap: .25rem;
    padding: .75rem 1rem;
    justify-content: center;
}

.pagination .page-link {
    display: inline-block;
    padding: .3rem .65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    font-size: .85rem;
}

.pagination .page-link.active {
    background: var(--blue);
    color: var(--white);
    border-color: var(--blue);
}

/* ── Package Preview ──────────────────────────────────────────── */
.package-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-top: .5rem;
}

.package-preview-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.package-preview-header h3 {
    font-size: 1rem;
    margin: 0 0 .35rem;
}

.package-preview-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--blue);
}

.package-preview-price small {
    font-size: .75rem;
    font-weight: 400;
    color: var(--muted);
}

.package-preview-specs {
    display: flex;
    gap: 1rem;
    font-size: .85rem;
    color: var(--muted);
}

.package-preview-desc {
    font-size: .85rem;
    color: var(--muted);
    margin: 0;
}

.package-preview-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.package-preview-features li {
    font-size: .85rem;
    padding-left: 1.2em;
    position: relative;
}

.package-preview-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}
