/* =====================================================================
   Cat Spinner — License Admin console
   Design system v2 (2026-09-05). Written as one coherent system:
   tokens -> shell (sidebar + topbar) -> page furniture -> components.
   The Inter webfont is loaded via <link> in layout.php's <head>, not an
   @import here (an @import placed after any style rule is invalid CSS
   and gets dropped silently -- which is exactly what happened to the
   first attempt at this).
   ===================================================================== */

:root {
    /* Brand */
    --p: #4f46e5;
    --p-dark: #4338ca;
    --p-darker: #3730a3;
    --p-light: #eef2ff;
    --p-300: #a5b4fc;
    --ring: rgba(79, 70, 229, .16);

    /* Surfaces */
    --canvas: #f5f6fa;
    --surface: #ffffff;
    --surface-2: #fafbfd;
    --surface-3: #f2f4f9;
    --sidebar-top: #0e1120;
    --sidebar-bottom: #141830;

    /* Ink */
    --text: #0f1222;
    --text-2: #3f4557;
    --muted: #6c7387;
    --faint: #98a0b3;

    /* Lines */
    --border: #e5e8f0;
    --border-soft: #eef0f6;

    /* Semantic */
    --green: #15a34a;
    --green-bg: #e7f8ee;
    --green-ink: #12693a;
    --red: #dc2626;
    --red-bg: #fdecec;
    --red-ink: #96201f;
    --amber: #d97706;
    --amber-bg: #fdf3e2;
    --amber-ink: #8a5108;
    --blue: #2563eb;
    --blue-bg: #e9f0fe;
    --blue-ink: #1c4bb0;

    /* Shape + depth */
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xs: 8px;
    --shadow-xs: 0 1px 2px rgba(15, 18, 34, .05);
    --shadow: 0 1px 2px rgba(15, 18, 34, .04), 0 2px 8px rgba(15, 18, 34, .05);
    --shadow-lg: 0 12px 32px rgba(15, 18, 34, .12), 0 2px 8px rgba(15, 18, 34, .06);

    /* Legacy aliases kept so any inline var() left in a view still resolves */
    --bg: var(--canvas);
    --p-light-alias: var(--p-light);
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--canvas);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Numbers line up in columns everywhere -- stats, tables, quota counters. */
.num, table td, .ais-trend-value, .ais-quota-line { font-variant-numeric: tabular-nums; }

a { color: var(--p); }
a:hover { color: var(--p-dark); }

::selection { background: var(--p-light); color: var(--p-darker); }

/* =====================================================================
   Shell
   ===================================================================== */
.ais-shell { display: flex; align-items: stretch; min-height: 100vh; }

/* ---- Sidebar ---- */
.ais-sidebar {
    width: 254px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--sidebar-top), var(--sidebar-bottom));
    border-right: 1px solid rgba(255, 255, 255, .06);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    transition: width .18s ease;
    z-index: 30;
}

.ais-sidebar .brand {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: #fff;
    padding: 18px 18px 16px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(140deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, .4);
}
.brand-logo svg { width: 18px; height: 18px; color: #fff; display: block; }
.ais-sidebar .brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.ais-sidebar .brand-text strong { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.ais-sidebar .brand-text small { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .42); }

.ais-sidenav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 12px 12px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .16) transparent;
}
.ais-sidenav::-webkit-scrollbar { width: 6px; }
.ais-sidenav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 99px; }

/* Section label above each cluster of links -- replaces the old
   click-to-expand <details> groups, so every destination is visible
   at a glance instead of hidden behind an accordion. */
.ais-nav-group-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .34);
    padding: 16px 10px 6px;
    white-space: nowrap;
}
.ais-sidenav > .ais-nav-group-label:first-child { padding-top: 6px; }

.ais-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    color: rgba(255, 255, 255, .68);
    font-size: 13.5px;
    font-weight: 550;
    padding: 9px 11px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
    white-space: nowrap;
}
.ais-nav-link:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.ais-nav-link.active {
    color: #fff;
    background: rgba(99, 102, 241, .18);
    font-weight: 650;
}
.ais-nav-link.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    border-radius: 0 3px 3px 0;
    background: var(--p-300);
}
.ais-nav-icon { width: 17px; height: 17px; flex-shrink: 0; opacity: .75; }
.ais-nav-link.active .ais-nav-icon { opacity: 1; color: var(--p-300); }
.ais-nav-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.ais-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 99px;
    background: var(--red);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    flex-shrink: 0;
}

.ais-sidebar-footer {
    padding: 10px 12px 14px;
    border-top: 1px solid rgba(255, 255, 255, .07);
}
.ais-sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .04);
    min-width: 0;
}
.ais-sidebar-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(140deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
}
.ais-sidebar-user-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; flex: 1; }
.ais-sidebar-user-text strong { font-size: 12.5px; font-weight: 650; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ais-sidebar-user-text small { font-size: 10.5px; color: rgba(255, 255, 255, .4); }
.ais-sidebar-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    color: rgba(255, 255, 255, .5);
    flex-shrink: 0;
    transition: color .15s ease, background .15s ease;
}
.ais-sidebar-logout:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.ais-sidebar-logout svg { width: 15px; height: 15px; }

/* ---- Collapsed rail (state class lives on <html>, set pre-paint) ---- */
.ais-nav-collapsed .ais-sidebar { width: 72px; }
.ais-nav-collapsed .ais-sidebar .brand { justify-content: center; padding: 18px 0 16px; }
.ais-nav-collapsed .brand-text,
.ais-nav-collapsed .ais-nav-text,
.ais-nav-collapsed .ais-nav-badge,
.ais-nav-collapsed .ais-sidebar-user-text { display: none; }
.ais-nav-collapsed .ais-nav-group-label {
    padding: 14px 0 6px;
    text-align: center;
    font-size: 0;
}
.ais-nav-collapsed .ais-nav-group-label::after {
    content: '';
    display: block;
    width: 20px;
    height: 1px;
    margin: 0 auto;
    background: rgba(255, 255, 255, .14);
}
.ais-nav-collapsed .ais-nav-link { justify-content: center; padding: 11px; }
.ais-nav-collapsed .ais-nav-link.active::before { left: -12px; }
.ais-nav-collapsed .ais-sidebar-user { justify-content: center; padding: 8px; }
.ais-nav-collapsed .ais-sidebar-logout { display: none; }

/* =====================================================================
   Main column: sticky topbar + content
   ===================================================================== */
.ais-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.ais-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 58px;
    padding: 0 22px;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.ais-topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ais-topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.ais-sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.ais-sidebar-toggle:hover { color: var(--p); border-color: var(--p); background: var(--p-light); }
.ais-sidebar-toggle svg { width: 15px; height: 15px; transition: transform .18s ease; }
.ais-nav-collapsed .ais-sidebar-toggle svg { transform: rotate(180deg); }

.ais-crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.ais-crumbs span { color: var(--faint); white-space: nowrap; }
.ais-crumbs strong { color: var(--text); font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ais-crumbs svg { width: 13px; height: 13px; color: #c8cde0; flex-shrink: 0; }

.ais-topbar-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s ease;
    white-space: nowrap;
}
.ais-topbar-link:hover { color: var(--p-dark); border-color: var(--p); background: var(--p-light); }
.ais-topbar-link svg { width: 14px; height: 14px; }

.ais-env-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 10px;
    border-radius: 99px;
    background: var(--green-bg);
    color: var(--green-ink);
    font-size: 11.5px;
    font-weight: 700;
}
.ais-env-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* =====================================================================
   Content area
   ===================================================================== */
.ais-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 26px 22px 64px; }

h1 { font-size: 22px; font-weight: 750; letter-spacing: -.02em; margin: 0; color: var(--text); }
h2 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
h3 { font-size: 14.5px; font-weight: 680; letter-spacing: -.01em; margin-top: 0; color: var(--text); }
p { margin: 0 0 12px; }

/* ---- Page header (icon + title + one-line description) ---- */
.ais-page-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 24px;
}
.ais-page-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(140deg, #6366f1, #8b5cf6);
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(99, 102, 241, .28);
}
.ais-page-icon svg { width: 20px; height: 20px; }
.ais-page-header-text { min-width: 0; }
.ais-page-header-text p { margin: 3px 0 0; color: var(--muted); font-size: 13px; max-width: 660px; }

.ais-page-desc { color: var(--muted); margin: -10px 0 20px; max-width: 780px; font-size: 13px; }

/* ---- Cards ---- */
.ais-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    padding: 20px 22px;
    margin-bottom: 18px;
}
.ais-card > h3 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-soft);
}
.ais-card > h3 svg { width: 16px; height: 16px; color: var(--p); flex-shrink: 0; }
.ais-card > h3 .btn { margin-left: auto; }
.ais-card > p:last-child { margin-bottom: 0; }
.ais-card-alert {
    border-color: #f6dfb8;
    background: linear-gradient(180deg, #fffdf8, var(--surface) 60px);
}
.ais-card-alert > h3 { color: var(--amber-ink); border-bottom-color: #f6e6c9; }

/* ---- Stat tiles ---- */
.ais-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}
.ais-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    padding: 18px;
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.ais-stat:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #dcdfeb; }
.ais-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--p-light);
    color: var(--p);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ais-stat-icon svg { width: 20px; height: 20px; }
.ais-stat .num { font-size: 27px; font-weight: 780; line-height: 1.1; letter-spacing: -.02em; color: var(--text); }
.ais-stat .label { color: var(--muted); font-size: 12px; margin-top: 4px; font-weight: 500; }

/* ---- Tables ----
   Markup is a bare <table> with no <thead>/<tbody>, so the header row is
   the :first-child row. Tables live inside .ais-card and are pulled out to
   the card's edges so the header band reads as part of the card frame. */
.ais-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ais-table-scroll::-webkit-scrollbar { height: 8px; }
.ais-table-scroll::-webkit-scrollbar-thumb { background: #d7dbe7; border-radius: 99px; }

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

/* Bleed to the card's edges. Crucially this is applied to the SCROLL WRAPPER
   (or to a bare table when there isn't one) -- never to a table *inside* a
   wrapper. Widening the inner table instead makes it permanently wider than
   its own scroll box, so the table shows a horizontal scrollbar at every
   window size even when the columns would have fit fine. */
.ais-card > table,
.ais-card > .ais-table-scroll {
    width: calc(100% + 44px);
    margin: 0 -22px;
}
.ais-card > table:last-child,
.ais-card > .ais-table-scroll:last-child { margin-bottom: -20px; }
.ais-card > .ais-table-scroll > table { width: 100%; margin: 0; }

th, td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
}
table tr:first-child th,
table tr:first-child td {
    color: var(--faint);
    font-weight: 700;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .07em;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    padding-top: 10px;
    padding-bottom: 10px;
    white-space: nowrap;
}
table tr:last-child td { border-bottom: none; }
/* "Belum ada data" rows are always a single colspan cell -- give them room
   and centre them so an empty table reads as an empty state, not a stray row. */
td[colspan] { color: var(--muted); text-align: center; padding: 30px 16px; }
table tr:not(:first-child) { transition: background .12s ease; }
table tr:not(:first-child):hover td { background: #fafaff; }
td strong { font-weight: 650; }

/* A table nested deeper in a card (quota-bonus wraps its list in a <form>)
   can't bleed to the card's edges, so give it a self-contained panel frame
   instead of leaving it looking like a half-applied version of the above. */
.ais-card form .ais-table-scroll {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    overflow-x: auto;
}
.ais-card form .ais-table-scroll table tr:last-child td { border-bottom: none; }

/* ---- Notification target picker (admin/notifications.php) ---- */
.ais-target-picker { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ais-target-picker .ais-lang-chip { margin-bottom: 0; }
.ais-target-picker input[type="radio"] { width: 15px; height: 15px; margin: 0; flex-shrink: 0; }

/* ---- Inbox (admin/inbox.php) ---- */
tr.ais-msg-row { cursor: pointer; }
tr.ais-msg-row:hover .ais-msg-phone {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    font-size: 12.5px;
    color: var(--muted);
}
.ais-msg-phone svg { width: 12px; height: 12px; flex-shrink: 0; }
.ais-msg-phone a { color: var(--muted); text-decoration: none; }
.ais-msg-phone a:hover { color: var(--green); text-decoration: underline; }

.ais-msg-preview { color: var(--text); }
tr.ais-row-unread td { background: #fbfaff; }
tr.ais-row-unread .ais-msg-preview { color: var(--text); font-weight: 550; }
tr.ais-row-unread td:first-child { box-shadow: inset 3px 0 0 var(--p); }
.ais-msg-preview {
    max-width: 340px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-2);
}
.ais-msg-full {
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-xs);
    padding: 14px;
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--text-2);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 320px;
    overflow-y: auto;
}

/* ---- Quota mini bar (inside table cells) ---- */
.ais-quota-line { font-size: 12.5px; font-weight: 650; margin-bottom: 5px; white-space: nowrap; color: var(--text); }
.ais-mini-progress { background: var(--surface-3); border-radius: 99px; height: 6px; width: 78px; overflow: hidden; }
.ais-mini-progress-bar { height: 100%; border-radius: 99px; }

/* ---- Chart header: title + summary on the left, range filter on the right ---- */
.ais-chart-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-soft);
}
.ais-chart-title h3 { margin: 0; padding: 0; border: 0; }
.ais-chart-title p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.ais-chart-title p strong { color: var(--text); font-weight: 700; }
.ais-chart-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.ais-chart-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: 99px;
    background: var(--surface);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
    transition: all .15s ease;
    white-space: nowrap;
}
.ais-chart-pill:hover { border-color: var(--p); color: var(--p-dark); background: var(--p-light); }
.ais-chart-pill.is-active { background: var(--p); border-color: var(--p); color: #fff; box-shadow: 0 1px 2px rgba(79, 70, 229, .25); }
.ais-chart-pill.is-active:hover { background: var(--p-dark); color: #fff; }
.ais-chart-empty { color: var(--muted); text-align: center; padding: 42px 0; margin: 0; font-size: 13.5px; }

/* ---- Log page ---- */
.ais-log-filters { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 14px; }
.ais-log-pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding-top: 16px; }

/* ---- Trend chart (dependency-free bars) ---- */
.ais-trend-chart {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    height: 148px;
    padding-top: 12px;
}
.ais-trend-bar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    height: 100%;
}
.ais-trend-value { font-size: 11.5px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.ais-trend-bar {
    width: 100%;
    max-width: 46px;
    background: linear-gradient(180deg, #818cf8, var(--p));
    border-radius: 8px 8px 3px 3px;
    transition: height .3s ease, filter .15s ease;
}
.ais-trend-bar-wrap:hover .ais-trend-bar { filter: brightness(1.08); }
.ais-trend-bar.is-empty { background: var(--surface-3); }
.ais-trend-label { font-size: 11px; color: var(--faint); margin-top: 8px; font-weight: 550; white-space: nowrap; }

/* Many buckets (30 days, 13 weeks): thinner bars, tighter gaps, and the
   per-bar number is dropped -- the exact value lives in the hover title. */
.ais-trend-chart.is-dense { gap: 4px; height: 170px; }
.ais-trend-chart.is-dense .ais-trend-bar { max-width: none; border-radius: 4px 4px 2px 2px; }
.ais-trend-chart.is-dense .ais-trend-label { font-size: 10px; }

/* =====================================================================
   Forms
   ===================================================================== */
form label {
    display: block;
    margin-bottom: 6px;
    font-size: 12.5px;
    color: var(--text-2);
    font-weight: 650;
}
form input, form select, form textarea,
input[type="text"], input[type="password"], input[type="date"], input[type="number"], select, textarea {
    width: 100%;
    padding: 9px 12px;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 13.5px;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
form input::placeholder, form textarea::placeholder { color: #b3b9c9; }
form input:hover, form select:hover, form textarea:hover { border-color: #d3d8e6; }
form input:focus, form select:focus, form textarea:focus,
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--p);
    box-shadow: 0 0 0 3px var(--ring);
}
textarea { min-height: 84px; resize: vertical; line-height: 1.6; }

/* Two form fields side by side (e.g. "Minimal WordPress" + "Minimal PHP" on
   releases.php); one column once there isn't room for both. */
.ais-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 640px) { .ais-field-row { grid-template-columns: 1fr; } }

/* Native select chrome off, own chevron on -- otherwise the browser
   silently overrides padding/height on <select> only, and dropdowns end
   up visibly out of sync with every neighbouring input. */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 34px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' stroke='%236c7387' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}
select:disabled, input:disabled, textarea:disabled { background: var(--surface-3); color: var(--muted); cursor: not-allowed; }

/* Compact inline controls for table cells */
.ais-select-compact, .ais-input-compact {
    width: auto;
    margin: 0;
    padding: 6px 26px 6px 9px;
    font-size: 12.5px;
    border-radius: var(--radius-xs);
}
.ais-input-compact { padding: 6px 10px; }

input[type="checkbox"], input[type="radio"] { accent-color: var(--p); cursor: pointer; }

.ais-field-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 650;
    color: var(--text-2);
    margin-bottom: 6px;
}
.ais-field-heading .flag { font-size: 14px; }
.ais-field-optional { font-weight: 500; color: var(--faint); text-transform: none; letter-spacing: 0; }

.ais-grant-row {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-soft);
}
.ais-grant-row .ais-grant-field { max-width: 220px; }
.ais-grant-row .ais-grant-field input { margin-bottom: 0; }
.ais-grant-hint { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }

/* =====================================================================
   Buttons
   ===================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: var(--p);
    color: #fff;
    border: 1px solid var(--p);
    padding: 9px 16px;
    border-radius: var(--radius-xs);
    font-size: 13px;
    font-weight: 650;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(79, 70, 229, .22);
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .1s ease, color .15s ease;
}
.btn:hover { background: var(--p-dark); border-color: var(--p-dark); color: #fff; box-shadow: 0 4px 14px rgba(79, 70, 229, .3); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(79, 70, 229, .22); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn.secondary {
    background: var(--surface);
    color: var(--text-2);
    border-color: var(--border);
    box-shadow: var(--shadow-xs);
}
.btn.secondary:hover { color: var(--p-dark); border-color: var(--p); background: var(--p-light); box-shadow: var(--shadow-xs); }

.btn.danger { background: var(--red); border-color: var(--red); box-shadow: 0 1px 2px rgba(220, 38, 38, .22); }
.btn.danger:hover { background: #b91c1c; border-color: #b91c1c; box-shadow: 0 4px 14px rgba(220, 38, 38, .28); }

.ais-btn-lg { padding: 12px 24px; font-size: 14px; border-radius: var(--radius-sm); }

/* Row-level action buttons inside tables stay compact automatically */
td .btn { padding: 6px 12px; font-size: 12.5px; }
td form { display: inline-block; margin: 0; }

.ais-reorder-btns { display: flex; flex-direction: column; gap: 3px; }
.ais-reorder-btns form { margin: 0; }
.ais-reorder-btn {
    width: 26px;
    height: 21px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 6px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: all .15s ease;
}
.ais-reorder-btn:hover:not(:disabled) { border-color: var(--p); color: var(--p-dark); background: var(--p-light); }
.ais-reorder-btn:disabled { opacity: .3; cursor: default; }

/* =====================================================================
   Badges, pills, flashes
   ===================================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .01em;
    text-transform: uppercase;
    border: 1px solid transparent;
    white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge.active, .badge.approved { background: var(--green-bg); color: var(--green-ink); border-color: #c9ecd8; }
.badge.inactive { background: var(--surface-3); color: var(--muted); border-color: var(--border); }
.badge.suspended, .badge.rejected { background: var(--red-bg); color: var(--red-ink); border-color: #f7d4d4; }
.badge.pending { background: var(--amber-bg); color: var(--amber-ink); border-color: #f5e2bf; }

.ais-expiry-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 99px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}
.ais-expiry-badge.warn { background: var(--amber-bg); color: var(--amber-ink); }
.ais-expiry-badge.expired { background: var(--red-bg); color: var(--red-ink); }

/* ---- "Paling Populer" star toggle (admin/packages.php) ---- */
.ais-star-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: var(--surface);
    color: #c3c9d8;
    cursor: pointer;
    transition: all .15s ease;
}
.ais-star-btn svg { width: 16px; height: 16px; fill: none; }
.ais-star-btn:hover { color: var(--amber); border-color: #eecfa0; background: var(--amber-bg); }
.ais-star-btn.is-on { color: #e0a11a; border-color: #f0d49a; background: var(--amber-bg); }
.ais-star-btn.is-on svg { fill: currentColor; }
.ais-star-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }

/* ---- Package chips ----
   Every package gets a fixed colour derived from its id (see
   ais_package_chip() in admin/includes/layout.php), so a tier is recognisable
   at a glance in any table without reading the label. */
.ais-pkg-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 11.5px;
    font-weight: 700;
    border: 1px solid transparent;
    white-space: nowrap;
}
.ais-pkg-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.ais-pkg-c1 { background: #f1f3f8; color: #4b5468; border-color: #e2e6ef; }
.ais-pkg-c2 { background: #e9f0fe; color: #1c4bb0; border-color: #d3e0fc; }
.ais-pkg-c3 { background: #eef2ff; color: #4338ca; border-color: #dcdcfb; }
.ais-pkg-c4 { background: #fdf3e2; color: #8a5108; border-color: #f6e6c9; }
.ais-pkg-c5 { background: #e7f8ee; color: #12693a; border-color: #c9ecd8; }
.ais-pkg-c6 { background: #fdeaf3; color: #9d1f5f; border-color: #f8d5e6; }

.ais-bonus-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    background: var(--green-bg);
    color: var(--green-ink);
}

.flash {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 13.5px;
    font-weight: 550;
    border: 1px solid transparent;
    box-shadow: var(--shadow-xs);
}
.flash::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
    margin-top: 6px;
}
.flash.success { background: var(--green-bg); color: var(--green-ink); border-color: #c9ecd8; }
.flash.error { background: var(--red-bg); color: var(--red-ink); border-color: #f7d4d4; }

code.key, code {
    display: inline-block;
    background: var(--surface-3);
    border: 1px solid var(--border);
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 11.5px;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    color: var(--text-2);
    white-space: nowrap;
}

/* Single-column forms (add domain, edit package, account, ...) read badly
   when their inputs stretch the full width of a 1200px card -- cap them.
   Forms that wrap a table (quota-bonus's bulk-grant form) keep full width. */
.ais-card > form:not(:has(table)) { max-width: 620px; }

/* =====================================================================
   Row action menu (kebab) + modal dialog
   Row actions used to sit inline in the cell, which made the widest column
   in the table out of a handful of buttons. They now collapse into a single
   32px trigger; the menu itself is position:fixed and placed by JS, because
   a menu rendered inside .ais-table-scroll would otherwise be clipped by
   that container's own overflow.
   ===================================================================== */
.ais-menu { position: relative; display: inline-flex; }
.ais-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    transition: all .15s ease;
}
.ais-menu-btn svg { width: 16px; height: 16px; }
.ais-menu-btn:hover,
.ais-menu-btn[aria-expanded="true"] { color: var(--p); border-color: var(--p); background: var(--p-light); }
.ais-menu-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }

.ais-menu-list {
    position: fixed;
    z-index: 200;
    display: none;
    min-width: 196px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
}
.ais-menu-list.is-open { display: block; animation: ais-menu-in .13s ease; }
@keyframes ais-menu-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.ais-menu-list form { margin: 0; }
.ais-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    background: none;
    border-radius: var(--radius-xs);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background .12s ease, color .12s ease;
}
.ais-menu-item svg { width: 15px; height: 15px; color: var(--faint); flex-shrink: 0; transition: color .12s ease; }
.ais-menu-item:hover { background: var(--surface-3); color: var(--text); }
.ais-menu-item:hover svg { color: var(--p); }
.ais-menu-item.danger { color: var(--red); }
.ais-menu-item.danger svg { color: var(--red); opacity: .75; }
.ais-menu-item.danger:hover { background: var(--red-bg); color: var(--red-ink); }
.ais-menu-item.danger:hover svg { color: var(--red-ink); opacity: 1; }
.ais-menu-sep { height: 1px; background: var(--border-soft); margin: 5px 4px; }

/* ---- Modal ---- */
.ais-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 18, 34, .5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}
.ais-modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.ais-modal {
    width: 100%;
    max-width: 430px;
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(15, 18, 34, .3);
    transform: translateY(10px) scale(.98);
    transition: transform .18s ease;
    overflow: hidden;
}
.ais-modal-overlay.is-open .ais-modal { transform: none; }
.ais-modal-head { display: flex; align-items: flex-start; gap: 13px; padding: 22px 22px 0; }
.ais-modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(140deg, #6366f1, #8b5cf6);
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(99, 102, 241, .28);
}
.ais-modal-icon svg { width: 19px; height: 19px; }
.ais-modal-title { min-width: 0; flex: 1; }
.ais-modal-title h3 { margin: 0; font-size: 16px; }
.ais-modal-title p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ais-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border: 0;
    border-radius: var(--radius-xs);
    background: none;
    color: var(--faint);
    cursor: pointer;
    transition: all .15s ease;
}
.ais-modal-close svg { width: 15px; height: 15px; }
.ais-modal-close:hover { background: var(--surface-3); color: var(--text-2); }
.ais-modal-body { padding: 20px 22px 2px; }
.ais-modal-body label { font-size: 12.5px; }
.ais-modal-body input { margin-bottom: 0; }
.ais-modal-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); line-height: 1.55; }
.ais-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 22px 22px;
}

/* The scroll container's overlay scrollbar sits on top of the last row, so
   leave it a little room rather than letting it clip a control. */
.ais-card > .ais-table-scroll { padding-bottom: 6px; }

/* =====================================================================
   Toggles, chips, bulk-select
   ===================================================================== */
.ais-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 4px 0 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-soft);
}
.ais-toggle-row-main { display: flex; align-items: center; gap: 13px; }
.ais-toggle-row-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--amber-bg);
    color: var(--amber);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ais-toggle-row-icon svg { width: 19px; height: 19px; }
.ais-toggle-row-text strong { display: block; font-size: 14px; font-weight: 680; color: var(--text); }
.ais-toggle-row-text span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ais-toggle-row-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.ais-switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; flex-shrink: 0; }
.ais-switch input { position: absolute; opacity: 0; width: 46px; height: 26px; margin: 0; cursor: pointer; }
.ais-switch .track {
    width: 46px;
    height: 26px;
    background: #cfd4e2;
    border-radius: 99px;
    position: relative;
    transition: background .2s ease;
}
.ais-switch .track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(15, 18, 34, .3);
    transition: transform .2s ease;
}
.ais-switch input:checked + .track { background: var(--green); }
.ais-switch input:checked + .track::after { transform: translateX(20px); }
.ais-switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--ring); }

.ais-bulk-toolbar, .ais-lang-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.ais-bulk-toolbar button, .ais-lang-toolbar button {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 5px 14px;
    color: var(--text-2);
    font-size: 12px;
    font-weight: 650;
    font-family: inherit;
    cursor: pointer;
    transition: all .15s ease;
}
.ais-bulk-toolbar button:hover, .ais-lang-toolbar button:hover { border-color: var(--p); color: var(--p-dark); background: var(--p-light); }
.ais-bulk-toolbar button:focus-visible, .ais-lang-toolbar button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.ais-bulk-count { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-left: 2px; }

table th.ais-check-col, table td.ais-check-col { width: 40px; text-align: center; }
table td.ais-check-col input, table th.ais-check-col input { width: auto; margin: 0; }

.ais-lang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
    max-height: 320px;
    overflow-y: auto;
    padding: 2px 4px 2px 0;
}
.ais-lang-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 13px;
    font-weight: 550;
    color: var(--text-2);
    cursor: pointer;
    transition: all .15s ease;
    user-select: none;
    margin-bottom: 0;
    background: var(--surface);
}
.ais-lang-chip input[type="checkbox"] { width: 15px; height: 15px; padding: 0; margin: 0; flex-shrink: 0; }
.ais-lang-chip:hover { border-color: #c7cddf; background: var(--surface-2); }
.ais-lang-chip:has(input:checked) { background: var(--p-light); border-color: var(--p); color: var(--p-darker); font-weight: 650; }
.ais-lang-hint { color: var(--muted); font-size: 12.5px; margin: -2px 0 16px; }

/* =====================================================================
   Login screen (admin/login.php -- no shell, own centred layout)
   ===================================================================== */
.ais-login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(900px 460px at 50% -8%, rgba(99, 102, 241, .28), transparent 60%),
        linear-gradient(180deg, #0e1120, #171b2e);
}
.login-box { max-width: 392px; width: 100%; margin: 0 auto; padding: 20px; }
.login-logo { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 24px; text-align: center; }
.login-logo .brand-logo { width: 54px; height: 54px; border-radius: 16px; }
.login-logo .brand-logo svg { width: 28px; height: 28px; }
.login-logo strong { color: #fff; font-size: 19px; font-weight: 750; letter-spacing: -.02em; }
.login-logo small { color: rgba(255, 255, 255, .5); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.login-box .ais-card { box-shadow: 0 24px 64px rgba(0, 0, 0, .42); margin-bottom: 0; padding: 26px; border-color: rgba(255, 255, 255, .1); }
.login-box .ais-card h2 { margin: 0 0 18px; }
.login-box .btn { width: 100%; padding: 11px 18px; }
.login-box p { font-size: 12px; color: var(--faint); margin: 14px 0 0; text-align: center; }

/* =====================================================================
   Standalone public form page (contact.php, renew.php)
   ===================================================================== */
.ais-form-body { background: var(--canvas); }
.ais-form-shell { max-width: 560px; margin: 0 auto; padding: 40px 20px 64px; }
.ais-form-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.ais-form-back:hover { color: var(--p); }
.ais-form-back svg { width: 15px; height: 15px; }
.ais-form-card { padding: 28px; }
.ais-form-head { margin-bottom: 22px; }
.ais-form-head h2 { margin: 0 0 6px; font-size: 21px; font-weight: 750; letter-spacing: -.02em; }
.ais-form-head p { margin: 0; color: var(--muted); font-size: 13.5px; }
.ais-form-note { margin: 12px 0 0; font-size: 12px; color: var(--faint); text-align: center; line-height: 1.55; }

/* Honeypot: off-screen rather than display:none, since some bots skip
   anything that is literally hidden. Never focusable for a real visitor. */
.ais-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.ais-form-success { text-align: center; padding: 8px 0 4px; }
.ais-form-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: var(--green-bg);
    color: var(--green-ink);
}
.ais-form-success-icon svg { width: 26px; height: 26px; }
.ais-form-success h2 { margin: 0 0 8px; font-size: 19px; font-weight: 750; letter-spacing: -.02em; }
.ais-form-success p { color: var(--muted); font-size: 13.5px; margin: 0 0 20px; }

/* =====================================================================
   Public landing page (license-api/index.php)
   ===================================================================== */
.ais-landing-body { background: var(--surface); }

.ais-landing-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border);
}
.ais-landing-header-inner { max-width: 1180px; margin: 0 auto; padding: 13px 24px; display: flex; align-items: center; gap: 24px; }
.ais-landing-header .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.ais-landing-header .brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.ais-landing-header .brand-text strong { font-size: 14.5px; font-weight: 700; }
.ais-landing-header .brand-text small { font-size: 10.5px; color: var(--faint); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.ais-landing-nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.ais-landing-nav a:not(.btn) { color: var(--text-2); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.ais-landing-nav a:not(.btn):hover { color: var(--p); }

.ais-hero {
    background:
        radial-gradient(800px 400px at 50% 0%, rgba(99, 102, 241, .3), transparent 62%),
        linear-gradient(170deg, #0e1120, #1b1f3a 60%, #0e1120);
    color: #fff;
    padding: 84px 24px 70px;
    text-align: center;
}
.ais-hero-inner { max-width: 800px; margin: 0 auto; }
.ais-hero-kicker {
    display: inline-block;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    color: rgba(255, 255, 255, .86);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .04em;
    padding: 6px 15px;
    border-radius: 99px;
    margin-bottom: 22px;
}
.ais-hero h1 { font-size: 44px; line-height: 1.12; font-weight: 800; letter-spacing: -.03em; color: #fff; margin: 0 0 18px; }
.ais-hero-sub { font-size: 16px; line-height: 1.65; color: rgba(255, 255, 255, .68); margin: 0 auto 32px; max-width: 620px; }
.ais-hero-cta { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }
.ais-hero .btn.secondary { background: rgba(255, 255, 255, .07); color: #fff; border-color: rgba(255, 255, 255, .2); box-shadow: none; }
.ais-hero .btn.secondary:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .34); color: #fff; }
.ais-hero-badges { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.ais-hero-badge {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .13);
    color: rgba(255, 255, 255, .78);
    font-size: 12.5px;
    padding: 7px 14px;
    border-radius: 99px;
}
.ais-hero-badge strong { color: #fff; }

.ais-section { max-width: 1180px; margin: 0 auto; padding: 76px 24px; }
.ais-section-alt { background: var(--canvas); max-width: none; }
.ais-section-alt > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
.ais-section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.ais-section-head h2 { font-size: 30px; font-weight: 800; letter-spacing: -.025em; margin: 0; color: var(--text); }
.ais-section-head p { color: var(--muted); margin: 12px 0 0; font-size: 15px; }

.ais-features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ais-feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    transition: box-shadow .18s ease, transform .18s ease;
}
.ais-feature-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.ais-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--p-light);
    color: var(--p);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.ais-feature-icon svg { width: 21px; height: 21px; }
.ais-feature-card h3 { font-size: 15.5px; margin: 0 0 8px; }
.ais-feature-card p { font-size: 13.5px; color: var(--muted); line-height: 1.65; margin: 0; }

.ais-pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 20px; align-items: start; }
.ais-pricing-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
}
.ais-pricing-card.is-popular { border-color: var(--p); box-shadow: 0 14px 36px rgba(79, 70, 229, .16); }
.ais-pricing-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--p);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 99px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, .35);
}
.ais-pricing-card h3 { font-size: 17px; margin: 4px 0 4px; }
.ais-pricing-desc { color: var(--muted); font-size: 13px; margin: 0 0 18px; min-height: 18px; }
.ais-pricing-price { margin-bottom: 22px; }
.ais-pricing-price .amount { font-size: 32px; font-weight: 800; letter-spacing: -.03em; color: var(--text); }
.ais-pricing-price .period { color: var(--muted); font-size: 13.5px; }
.ais-pricing-list { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.ais-pricing-list li { font-size: 13.5px; color: var(--text-2); padding-left: 26px; position: relative; }
.ais-pricing-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: var(--green-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312693a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 9px 9px;
}

/* A feature the package does NOT include: muted text + a red cross instead of
   the green tick, so a locked feature reads as locked at a glance. */
.ais-pricing-list li.is-off { color: var(--faint); }
.ais-pricing-list li.is-off::before {
    background: var(--red-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2396201f' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 8px 8px;
}

.ais-faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.ais-faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px 20px;
}
.ais-faq-item summary { padding: 16px 0; font-size: 14.5px; font-weight: 650; color: var(--text); cursor: pointer; list-style: none; }
.ais-faq-item summary::-webkit-details-marker { display: none; }
.ais-faq-item p { color: var(--muted); font-size: 13.5px; line-height: 1.7; margin: 0 0 16px; }

.ais-cta-band {
    background: linear-gradient(135deg, var(--p), #7c3aed);
    color: #fff;
    text-align: center;
    padding: 66px 24px;
}
.ais-cta-band h2 { font-size: 28px; font-weight: 800; letter-spacing: -.025em; margin: 0 0 12px; color: #fff; }
.ais-cta-band p { color: rgba(255, 255, 255, .86); margin: 0 0 26px; }
.ais-cta-band .btn { background: #fff; color: var(--p-dark); border-color: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
.ais-cta-band .btn:hover { background: rgba(255, 255, 255, .92); color: var(--p-darker); }

.ais-landing-footer { background: #0e1120; color: rgba(255, 255, 255, .58); padding: 34px 24px; }
.ais-landing-footer-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ais-landing-footer-brand { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 700; font-size: 14px; }
.ais-landing-footer-brand .brand-logo { width: 26px; height: 26px; border-radius: 8px; }
.ais-landing-footer-brand .brand-logo svg { width: 14px; height: 14px; }
.ais-landing-footer-links { display: flex; gap: 18px; margin-left: auto; }
.ais-landing-footer-links a { color: rgba(255, 255, 255, .6); font-size: 13px; text-decoration: none; }
.ais-landing-footer-links a:hover { color: #fff; }
.ais-landing-footer-copy { width: 100%; margin: 18px 0 0; font-size: 12px; color: rgba(255, 255, 255, .36); }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1000px) {
    .ais-topbar-link { display: none; }
}

@media (max-width: 880px) {
    /* Sidebar becomes a compact icon rail instead of stacking into a
       wrapped horizontal bar -- the topbar already carries the page
       identity, so the rail only has to stay tappable. */
    .ais-sidebar, .ais-nav-collapsed .ais-sidebar { width: 66px; }
    .ais-sidebar .brand { justify-content: center; padding: 16px 0 14px; }
    .brand-text, .ais-nav-text, .ais-nav-badge, .ais-sidebar-user-text, .ais-sidebar-logout { display: none; }
    .ais-nav-group-label { padding: 12px 0 5px; text-align: center; font-size: 0; }
    .ais-nav-group-label::after { content: ''; display: block; width: 18px; height: 1px; margin: 0 auto; background: rgba(255, 255, 255, .14); }
    .ais-nav-link { justify-content: center; padding: 11px; }
    .ais-sidebar-user { justify-content: center; padding: 8px; }
    .ais-sidebar-toggle { display: none; }
    .ais-wrap { padding: 20px 16px 48px; }
    .ais-topbar { padding: 0 16px; }
}

@media (max-width: 700px) {
    .ais-page-icon { display: none; }
    .ais-card { padding: 16px; }
    .ais-card > table, .ais-card > .ais-table-scroll > table { width: calc(100% + 32px); margin: 0 -16px; }
    .ais-card > table:last-child, .ais-card > .ais-table-scroll:last-child > table { margin-bottom: -16px; }
    .ais-stats { grid-template-columns: 1fr; }
    .ais-hero h1 { font-size: 32px; }
    .ais-features-grid { grid-template-columns: 1fr; }
    .ais-section { padding: 54px 20px; }
    .ais-section-head h2 { font-size: 24px; }
    .ais-landing-nav a:not(.btn) { display: none; }
    .ais-toggle-row { flex-direction: column; align-items: flex-start; gap: 14px; }
}
