/* ==========================================================================
   Vibe Mobile — Active Number Checker
   Design tokens from vibemobile.com.my-design.md ("Vibe Mobile Dark")
   ========================================================================== */

:root {
    --primary: #08F6B2;
    --secondary: #FFFFFF;
    --tertiary: #374151;
    --neutral: #000000;
    --surface: #000000;
    --on-surface: #FFFFFF;
    --error: #FF5A5F;

    --font-display: 'Baumans', system-ui, sans-serif;
    --font-body: 'Cabinet Grotesk', system-ui, -apple-system, sans-serif;

    --r-none: 0px;
    --r-sm: 4px;
    --r-md: 8px;
    --r-lg: 16px;
    --r-xl: 30px;
    --r-full: 9999px;

    --sp-xs: 8px;
    --sp-sm: 20px;
    --sp-md: 40px;
    --sp-lg: 50px;
    --sp-xl: 84px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--neutral);
    color: var(--on-surface);
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { filter: brightness(1.15); }

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.85em;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--r-sm);
    padding: 1px 6px;
}

/* ---------------------------------------------------------------- header */

.site-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-sm);
}

.brand img { display: block; height: 60px; width: auto; }

/* ---------------------------------------------------------------- layout */

.wrap {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: var(--sp-sm) var(--sp-sm) var(--sp-md);
    flex: 1;
}

.wrap-narrow { max-width: 440px; }
.wrap-wide { max-width: 1080px; }

/* ------------------------------------------------------------------ hero */

.hero { text-align: center; margin: 0 0 var(--sp-sm); }
.hero-sm { margin: var(--sp-sm) 0; }

.hero-title {
    font-family: 'Baumans', system-ui, sans-serif;
    font-size: 40px;
    font-weight: 400;
    line-height: 1.15;
    margin: 0 0 var(--sp-xs);
}

.hero-sub {
    font-size: 16px;
    line-height: 24px;
    color: rgba(255, 255, 255, 0.82);
    margin: 0 auto;
    max-width: 420px;
}

.hero-sub strong { color: var(--primary); font-weight: 500; }

@media (min-width: 640px) {
    .hero-title { font-size: 46px; }
}

/* ----------------------------------------------------------------- cards */

.card {
    background: var(--surface);
    color: var(--on-surface);
    border: 1px solid var(--tertiary);
    border-radius: var(--r-sm);
    padding: var(--sp-sm);
}

.tool-card { padding: var(--sp-sm); }

@media (min-width: 640px) {
    .tool-card { padding: var(--sp-md); }
}

/* ----------------------------------------------------------------- forms */

.label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    margin-bottom: var(--sp-xs);
    color: rgba(255, 255, 255, 0.85);
}

.input {
    width: 100%;
    background: var(--surface);
    color: var(--on-surface);
    border: 1px solid var(--tertiary);
    border-radius: var(--r-full);
    padding: 12px 25px;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.02em;
    outline: none;
    transition: border-color 0.15s ease;
}

.input::placeholder { color: rgba(255, 255, 255, 0.35); }
.input:focus { border-color: var(--primary); }
.input.input-error { border-color: var(--error); }

.field-error {
    color: var(--error);
    font-size: 14px;
    line-height: 20px;
    margin: var(--sp-xs) 4px 0;
}

/* --------------------------------------------------------------- buttons */

.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    line-height: 22px;
    border-radius: var(--r-full);
    padding: 10px 25px;
    min-height: 37px;
    cursor: pointer;
    text-align: center;
    border: 1px solid transparent;
    transition: filter 0.15s ease, background-color 0.15s ease, color 0.15s ease;
    background: transparent;
}

.btn:hover { filter: brightness(1.15); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; filter: none; }

/* Signature outlined pill (brand "primary"). */
.btn-ghost {
    color: var(--primary);
    border-color: rgba(255, 255, 255, 0.55);
}

/* Filled CTA for the main action. */
.btn-filled {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    font-weight: 700;
}

.btn-block { display: block; width: 100%; margin-top: var(--sp-sm); }

/* ---------------------------------------------------------------- states */

.state { text-align: center; }

.state-title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    line-height: 31px;
    margin: var(--sp-sm) 0 var(--sp-xs);
}

.state-text {
    font-size: 16px;
    line-height: 24px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 var(--sp-xs);
}

.note {
    font-size: 14px;
    line-height: 20px;
    color: rgba(255, 255, 255, 0.55);
    margin: var(--sp-sm) 0 0;
}

#state-form, #state-mismatch { text-align: left; }
#state-form .note, #state-mismatch .note { text-align: center; }

/* --------------------------------------------------------------- spinner */

.spinner {
    width: 44px;
    height: 44px;
    margin: var(--sp-sm) auto 0;
    border-radius: 50%;
    border: 3px solid rgba(8, 246, 178, 0.2);
    border-top-color: var(--primary);
    animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ----------------------------------------------------------- number list */

.number-list {
    list-style: none;
    margin: var(--sp-sm) 0 0;
    padding: 0;
    text-align: left;
}

.number-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-xs);
    border: 1px solid var(--tertiary);
    border-radius: var(--r-sm);
    padding: 12px 16px;
    margin-bottom: var(--sp-xs);
}

.number-list .num {
    font-size: 19px;
    font-weight: 500;
    line-height: 29px;
    color: var(--primary);
    letter-spacing: 0.02em;
}

.number-list .plan {
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    color: rgba(255, 255, 255, 0.6);
    max-width: 45%;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.misuse-box {
    margin-top: var(--sp-sm);
    border-top: 1px solid var(--tertiary);
    padding-top: var(--sp-sm);
}

.misuse-box p {
    font-size: 15px;
    line-height: 22px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 var(--sp-xs);
}

.misuse-box .btn { margin: 4px 4px 0; }

/* ----------------------------------------------------------------- steps */

.steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-xs);
    margin-top: var(--sp-md);
}

@media (min-width: 640px) {
    .steps { grid-template-columns: repeat(3, 1fr); gap: var(--sp-sm); }
}

.step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-align: left;
}

.step p {
    margin: 0;
    font-size: 14px;
    line-height: 20px;
    color: rgba(255, 255, 255, 0.7);
}

.step strong { color: var(--on-surface); }

.step-num {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
}

/* -------------------------------------------------------------- callback */

.callback-body { justify-content: center; }

.callback-card { text-align: center; margin-top: var(--sp-lg); }

.callback-mark {
    width: 56px;
    height: 56px;
    margin: var(--sp-xs) auto 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
}

.mark-ok { border: 2px solid var(--primary); color: var(--primary); }
.mark-err { border: 2px solid var(--error); color: var(--error); }

/* ---------------------------------------------------------------- usage */

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-xs);
    margin-bottom: var(--sp-sm);
}

@media (min-width: 900px) {
    .summary-grid { grid-template-columns: repeat(6, 1fr); }
}

.summary-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
}

.summary-num {
    font-family: var(--font-display);
    font-size: 30px;
    line-height: 1.1;
}

.summary-num.accent { color: var(--primary); }

.summary-label {
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    color: rgba(255, 255, 255, 0.6);
}

.table-card { padding: 16px; }

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--sp-xs);
    margin-bottom: var(--sp-xs);
}

.table-title {
    font-family: var(--font-display);
    font-size: 22px;
    margin: 0;
}

.table-actions { display: flex; align-items: center; gap: var(--sp-xs); }

.chip {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--tertiary);
    border-radius: var(--r-full);
    padding: 4px 14px;
    color: rgba(255, 255, 255, 0.75);
}

.chip-active { border-color: var(--primary); color: var(--primary); }

.table-scroll { overflow-x: auto; }

.usage-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 20px;
    white-space: nowrap;
}

.usage-table th,
.usage-table td {
    text-align: right;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(55, 65, 81, 0.5);
}

.usage-table th {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    line-height: 16px;
}

.usage-table th:first-child,
.usage-table td.td-day { text-align: left; }

.th-billable, .td-billable { color: var(--primary); font-weight: 700; }

/* ---------------------------------------------------------------- footer */

.site-footer {
    margin-top: auto;
    padding: var(--sp-sm);
    text-align: center;
}

.site-footer p {
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
    color: rgba(255, 255, 255, 0.45);
    max-width: 560px;
    margin: 0 auto var(--sp-xs);
}

.footer-links .sep { margin: 0 8px; color: rgba(255, 255, 255, 0.3); }

/* ------------------------------------------------------------- utilities */

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
    .spinner { animation-duration: 1.8s; }
    * { transition: none !important; }
}
