/**
 * Snappylo UI — light classic theme (fallback when Vite build is not present).
 */
:root {
    --np-bg: #f4f0e8;
    --np-surface: #fffcf7;
    --np-surface-2: #faf6ef;
    --np-border: rgb(30 58 95 / 0.1);
    --np-text: #1a2332;
    --np-muted: #5c6778;
    --np-ink: #1e3a5f;
    --np-accent: #c9a227;
    --np-accent-strong: #a88616;
    --np-accent-dim: rgb(201 162 39 / 0.14);
    --np-radius: 16px;
    --np-radius-sm: 12px;
    --np-safe-bottom: env(safe-area-inset-bottom, 0px);
    --np-shadow: 0 1px 2px rgb(30 58 95 / 0.04), 0 8px 24px rgb(30 58 95 / 0.06);
    --np-shadow-sm: 0 1px 3px rgb(30 58 95 / 0.06);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-tap-highlight-color: transparent;
}

.np-body {
    margin: 0;
    min-height: 100dvh;
    font-family: 'DM Sans', system-ui, sans-serif;
    color: var(--np-text);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    background: var(--np-bg);
}

/* Layered classic background: soft vignettes + geometric pattern */
.np-bg-graphics {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.np-bg-graphics::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 120% 70% at 50% -15%, rgb(201 162 39 / 0.14), transparent 52%),
        radial-gradient(ellipse 55% 50% at 0% 102%, rgb(30 58 95 / 0.07), transparent 48%),
        radial-gradient(ellipse 55% 50% at 100% 102%, rgb(30 58 95 / 0.07), transparent 48%),
        linear-gradient(180deg, #faf6ef 0%, var(--np-bg) 35%, #ede8df 100%);
}

.np-bg-graphics::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../images/novapay-classic-pattern.svg');
    background-size: 120px 120px;
    opacity: 0.9;
    mix-blend-mode: multiply;
}

/* Ornamental corner frame (subtle) */
.np-body::before,
.np-body::after {
    content: '';
    position: fixed;
    width: min(200px, 45vw);
    height: min(200px, 45vw);
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
    background: no-repeat center;
    background-size: contain;
}

.np-body::before {
    top: 0;
    left: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='none' stroke='%231e3a5f' stroke-width='0.6' d='M4 36V4h32M4 64v32h32M64 4h32v32M64 96h32V64'/%3E%3C/svg%3E");
}

.np-body::after {
    bottom: 0;
    right: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='none' stroke='%231e3a5f' stroke-width='0.6' d='M96 36V4H64M96 64v32H64M36 4H4v32M36 96H4V64'/%3E%3C/svg%3E");
}

.np-app {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100dvh;
    padding: 1rem 1rem calc(5.5rem + var(--np-safe-bottom));
}

@media (min-width: 600px) {
    .np-app {
        max-width: 560px;
        padding-bottom: 2rem;
    }
}

.np-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-top: 0.25rem;
}

.np-brand {
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
    color: var(--np-ink);
}

.np-brand-accent {
    color: var(--np-accent-strong);
}

.np-pill {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--np-muted);
    background: var(--np-surface);
    border: 1px solid var(--np-border);
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    box-shadow: var(--np-shadow-sm);
}

.np-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--np-muted);
    margin: 0 0 0.75rem;
}

.np-bank-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 600px) {
    .np-bank-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.np-bank-tile {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    border: 1px solid var(--np-border);
    border-radius: var(--np-radius);
    background: linear-gradient(165deg, var(--np-surface) 0%, var(--np-surface-2) 100%);
    box-shadow: var(--np-shadow-sm);
    overflow: hidden;
    transition:
        transform 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
    text-align: left;
    color: inherit;
    font: inherit;
    text-decoration: none;
}

.np-bank-tile:active {
    transform: scale(0.98);
}

.np-bank-tile:hover,
.np-bank-tile:focus-visible {
    border-color: rgb(201 162 39 / 0.45);
    box-shadow: var(--np-shadow);
    outline: none;
}

.np-bank-tile__media {
    aspect-ratio: 16 / 10;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
}

.np-bank-tile__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.np-bank-tile__label {
    padding: 0.65rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--np-ink);
    border-top: 1px solid var(--np-border);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* iPay logo is light on transparent — dark tile background for contrast */
.np-bank-tile--ipp .np-bank-tile__media {
    background: linear-gradient(165deg, #2a2450 0%, #1e1a33 45%, #15122a 100%);
}

.np-bank-tile--ipp .np-bank-tile__img {
    filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.35));
}

.np-bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0.5rem calc(0.65rem + var(--np-safe-bottom));
    background: rgb(255 252 247 / 0.88);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--np-border);
    box-shadow: 0 -4px 24px rgb(30 58 95 / 0.06);
}

@media (min-width: 600px) {
    .np-bottom-bar {
        max-width: 560px;
        border-radius: var(--np-radius) var(--np-radius) 0 0;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 100%;
    }
}

.np-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.4rem;
    background: none;
    border: none;
    color: var(--np-muted);
    font-size: 0.65rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border-radius: 10px;
    text-decoration: none;
    transition: color 0.15s ease;
}

.np-nav-btn[data-active='true'] {
    color: var(--np-ink);
}

.np-nav-icon {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.np-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0.75rem;
    background: var(--np-surface);
    border: 1px solid var(--np-border);
    color: var(--np-text);
    border-radius: var(--np-radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--np-shadow-sm);
}

.np-back:hover {
    border-color: rgb(201 162 39 / 0.35);
}

.np-detail-hero {
    border-radius: var(--np-radius);
    border: 1px solid var(--np-border);
    background: var(--np-surface);
    padding: 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--np-shadow-sm);
}

.np-detail-logo {
    width: 72px;
    height: 48px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    padding: 6px;
    flex-shrink: 0;
    border: 1px solid var(--np-border);
}

.np-notice-banner {
    font-size: 0.7rem;
    color: var(--np-ink);
    background: var(--np-accent-dim);
    border: 1px solid rgb(201 162 39 / 0.28);
    padding: 0.5rem 0.75rem;
    border-radius: var(--np-radius-sm);
    margin-bottom: 1rem;
}

.np-card-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.np-card-mini {
    flex: 1;
    min-height: 100px;
    border-radius: var(--np-radius-sm);
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: var(--np-shadow-sm);
}

.np-card-mini--visa {
    background: linear-gradient(135deg, #1a1f71 0%, #2b3a8f 100%);
}

.np-card-mini--mc {
    background: linear-gradient(135deg, #eb001b 0%, #f79e1b 100%);
}

.np-card-mini__name {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.9;
    color: #fff;
}

.np-form-block {
    background: var(--np-surface);
    border: 1px solid var(--np-border);
    border-radius: var(--np-radius);
    padding: 1rem;
    box-shadow: var(--np-shadow-sm);
}

.np-form-heading {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--np-ink);
    letter-spacing: -0.02em;
}

.np-field {
    margin-bottom: 1rem;
}

.np-card-form > .np-grid-2 {
    margin-bottom: 1rem;
}

.np-field-error {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #b91c1c;
}

.np-input--error {
    border-color: rgb(220 38 38 / 0.45) !important;
    box-shadow: 0 0 0 3px rgb(220 38 38 / 0.08);
}

.np-field-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--np-muted);
    margin-bottom: 0.35rem;
}

.np-input {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--np-border);
    background: #fff;
    color: var(--np-text);
    font-size: 0.95rem;
    font-family: ui-monospace, monospace;
    box-shadow: inset 0 1px 2px rgb(30 58 95 / 0.04);
}

.np-input::placeholder {
    color: #8b95a8;
}

.np-input:focus {
    outline: none;
    border-color: rgb(30 58 95 / 0.35);
    box-shadow:
        inset 0 1px 2px rgb(30 58 95 / 0.04),
        0 0 0 3px rgb(201 162 39 / 0.15);
}

.np-input--masked {
    -webkit-text-security: disc;
    text-security: disc;
}

.np-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.mb-3 {
    margin-bottom: 0.85rem;
}

.mb-3-5 {
    margin-bottom: 0.85rem;
}

.mb-0 {
    margin-bottom: 0;
}

.np-btn-primary {
    width: 100%;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: var(--np-radius-sm);
    background: linear-gradient(180deg, #d4b44a 0%, #c9a227 55%, #b8921f 100%);
    color: #1a2332;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition:
        filter 0.15s ease,
        box-shadow 0.15s ease;
    box-shadow: 0 1px 0 rgb(255 255 255 / 0.35) inset, 0 4px 12px rgb(201 162 39 / 0.25);
}

.np-btn-primary:hover {
    filter: brightness(1.03);
}

.np-btn-primary:active {
    filter: brightness(0.97);
    box-shadow: 0 1px 0 rgb(255 255 255 / 0.2) inset, 0 2px 6px rgb(201 162 39 / 0.2);
}

.np-hint {
    font-size: 0.7rem;
    color: var(--np-muted);
    margin-top: 0.75rem;
    line-height: 1.5;
}

.text-lg {
    font-size: 1.125rem;
}

.font-bold {
    font-weight: 700;
}

.tracking-tight {
    letter-spacing: -0.025em;
}

.text-sm {
    font-size: 0.875rem;
}

.text-np-muted {
    color: var(--np-muted);
}

.text-base {
    font-size: 1rem;
}

.font-semibold {
    font-weight: 600;
}

.text-np-text {
    color: var(--np-text);
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.np-prose {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--np-muted);
    margin: 0;
}
