/* ══════════════════════════════════════════════════
   VNCMobile — Bright crimson / rose gradient theme
   ══════════════════════════════════════════════════ */

:root {
    --c-primary: #dc2626;
    --c-primary-dark: #b91c1c;
    --c-primary-light: #fecaca;
    --c-primary-50: #fef2f2;
    --c-accent: #e11d48;
    --c-accent-light: #ffe4e6;
    --c-surface: #ffffff;
    --c-bg: #fff5f5;
    --c-bg-alt: #fafafa;
    --c-text: #0f172a;
    --c-text-muted: #64748b;
    --c-border: #e4e4e7;
    --c-border-light: #f4f4f5;
    --c-danger: #ef4444;
    --c-danger-dark: #b91c1c;
    --c-success: #10b981;
    --c-warning: #f59e0b;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --shadow-sm: 0 1px 3px rgba(185, 28, 28, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 14px rgba(185, 28, 28, 0.08), 0 2px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 12px 28px -8px rgba(185, 28, 28, 0.12), 0 8px 14px -6px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 22px 44px -12px rgba(185, 28, 28, 0.14);
}

/* ── Base ── */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-variant-numeric: tabular-nums;
}

/* ── Bright red-rose gradient page background ── */
.bg-fintech {
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(254, 205, 211, 0.55) 0%, transparent 55%),
        radial-gradient(90% 70% at 0% 20%, rgba(254, 226, 226, 0.75) 0%, transparent 50%),
        linear-gradient(168deg, #ffffff 0%, #fff1f2 32%, #ffe4e6 58%, #fafafa 100%);
    position: relative;
    min-height: 100vh;
}

/* ── Card surfaces (crisp borders) ── */
.glass {
    background: var(--c-surface);
    border: 1px solid rgba(225, 29, 72, 0.14);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.glass-md {
    background: var(--c-surface);
    border: 1px solid rgba(225, 29, 72, 0.14);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}
.glass-lg {
    background: var(--c-surface);
    border: 1px solid rgba(225, 29, 72, 0.14);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

/* ── Input fields ── */
.input-glass {
    background: var(--c-surface);
    border: 1.5px solid var(--c-border);
    border-radius: var(--radius-sm);
    color: var(--c-text);
    font-weight: 500;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input-glass::placeholder {
    color: #94a3b8;
    font-weight: 400;
}
select.input-glass {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 5.646a.5.5 0 0 1 .708 0L8 8.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}
select.input-glass option {
    background: var(--c-surface);
    color: var(--c-text);
}
.input-glass:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14);
}

/* ── Buttons ── */
.btn-primary {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 45%, #b91c1c 100%);
    color: #ffffff;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.35);
}
.btn-primary:hover {
    box-shadow: 0 6px 22px rgba(185, 28, 28, 0.45);
    opacity: 0.98;
}
.btn-primary:active {
    transform: scale(0.97);
}

.btn-ghost {
    background: var(--c-surface);
    border: 1.5px solid var(--c-border);
    border-radius: var(--radius-sm);
    color: var(--c-text);
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.btn-ghost:hover {
    background: var(--c-primary-50);
    border-color: rgba(220, 38, 38, 0.35);
    box-shadow: var(--shadow-sm);
}

.btn-danger {
    background: linear-gradient(135deg, var(--c-danger) 0%, var(--c-danger-dark) 100%);
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn-line {
    background: linear-gradient(135deg, #06c755 0%, #05a648 100%);
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 14px rgba(6, 199, 85, 0.3);
    transition: transform 0.12s ease, box-shadow 0.2s ease;
}
.btn-line:hover {
    box-shadow: 0 6px 20px rgba(6, 199, 85, 0.4);
}
.btn-line:active {
    transform: scale(0.97);
}

/* ── Badge / status ── */
.badge-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
    font-weight: 600;
    border-radius: 8px;
}
.badge-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    font-weight: 600;
    border-radius: 8px;
}
.badge-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    font-weight: 600;
    border-radius: 8px;
}
.badge-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
    font-weight: 600;
    border-radius: 8px;
}
.badge-neutral {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-weight: 600;
    border-radius: 8px;
}

/* ── Hover glow (brand) ── */
.glow-cyan:hover {
    box-shadow: 0 4px 18px rgba(220, 38, 38, 0.18);
    border-color: rgba(225, 29, 72, 0.22);
}
.glow-violet:hover {
    box-shadow: 0 4px 18px rgba(225, 29, 72, 0.14);
    border-color: rgba(225, 29, 72, 0.18);
}

/* ── Blobs hidden ── */
.blob {
    display: none;
}

/* ── Safe area for iOS ── */
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* ── Sidebar animations ── */
#sidebar-panel.show {
    transform: translateX(0) !important;
}
#sidebar-overlay.show {
    display: block !important;
}

/* ── Toast ── */
.toast {
    animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* ── Spinner ── */
.spinner {
    border: 3px solid rgba(220, 38, 38, 0.2);
    border-top-color: var(--c-primary);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── HTMX loading indicator ── */
.htmx-indicator {
    display: none;
}
.htmx-request .htmx-indicator {
    display: inline-block;
}
.htmx-request.htmx-indicator {
    display: inline-block;
}

/* ── Skeleton shimmer ── */
.skeleton {
    background: linear-gradient(90deg, #fff1f2 25%, #ffe4e6 50%, #fff1f2 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #fca5a5;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #f87171;
}

/* ── Input focus ── */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ── Active nav item ── */
.nav-active {
    color: var(--c-primary);
}

/* ── Tab system ── */
.tab-btn {
    transition: color 0.15s, border-color 0.15s;
}
.tab-btn.active {
    color: var(--c-primary) !important;
    border-color: var(--c-primary) !important;
}

/* ── Micro press ── */
.press:active {
    transform: scale(0.97);
}

/* ── Logo image helper ── */
.logo-img {
    object-fit: contain;
}
