/* ═══════════════════════════════════════════════════════════════
   AiSignal.in — Premium SaaS Design System (dark / glassmorphism)
   ═══════════════════════════════════════════════════════════════ */
:root {
    --bg: #070a12;
    --bg-2: #0b0f1a;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-2: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.09);
    --border-hi: rgba(255, 255, 255, 0.18);
    --text: #e8edf7;
    --text-2: #9aa5bd;
    --text-3: #5d6880;
    --brand: #3b82f6;
    --brand-2: #06b6d4;
    --brand-grad: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --green: #22c55e;
    --red: #ef4444;
    --yellow: #f59e0b;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Ambient glow background */
body::before {
    content: '';
    position: fixed; inset: 0; z-index: -1;
    background:
        radial-gradient(600px 400px at 15% -5%, rgba(59, 130, 246, 0.14), transparent 60%),
        radial-gradient(700px 500px at 90% 10%, rgba(6, 182, 212, 0.10), transparent 60%),
        radial-gradient(800px 600px at 50% 110%, rgba(99, 102, 241, 0.08), transparent 60%);
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout helpers ── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.center-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.grid { display: grid; gap: 18px; }
@media (min-width: 760px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ── Glass card ── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    padding: 26px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}
.card.hoverable:hover { transform: translateY(-4px); border-color: var(--border-hi); }

/* ── Navbar ── */
.nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(7, 10, 18, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.nav-inner { max-width: 1160px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.logo { font-size: 20px; font-weight: 800; letter-spacing: -0.4px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.logo .bolt { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-links a { color: var(--text-2); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 22px; border-radius: var(--radius-sm);
    font-family: var(--font); font-size: 14px; font-weight: 600;
    border: 1px solid transparent; cursor: pointer; text-decoration: none !important;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s;
    position: relative; overflow: hidden; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: 0 6px 22px rgba(59, 130, 246, 0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(59, 130, 246, 0.5); }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--border-hi); background: rgba(255,255,255,0.1); }
.btn-danger { background: rgba(239,68,68,0.14); color: #fca5a5; border-color: rgba(239,68,68,0.3); }
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 15px 34px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none !important; }

/* Button shine animation */
.btn-primary::after {
    content: ''; position: absolute; top: 0; left: -80%;
    width: 50%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: skewX(-20deg); transition: left 0.5s ease;
}
.btn-primary:hover::after { left: 130%; }

/* ── Forms ── */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.input, select.input, textarea.input {
    width: 100%; padding: 12px 14px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text); font-family: var(--font); font-size: 14.5px;
    outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18); }
.input::placeholder { color: var(--text-3); }
select.input option { background: var(--bg-2); }
.hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }

/* OTP boxes */
.otp-row { display: flex; gap: 10px; justify-content: center; }
.otp-box {
    width: 50px; height: 58px; text-align: center; font-size: 24px; font-weight: 700;
    background: rgba(0,0,0,0.4); border: 1px solid var(--border); border-radius: 12px;
    color: var(--text); outline: none; transition: border-color 0.2s, transform 0.1s;
}
.otp-box:focus { border-color: var(--brand); transform: scale(1.05); }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.3px; }
.badge-green { background: rgba(34,197,94,0.14); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.badge-red { background: rgba(239,68,68,0.14); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.badge-yellow { background: rgba(245,158,11,0.14); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.badge-blue { background: rgba(59,130,246,0.14); color: #93c5fd; border: 1px solid rgba(59,130,246,0.3); }
.badge-gray { background: rgba(255,255,255,0.07); color: var(--text-2); border: 1px solid var(--border); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.tbl th { text-align: left; padding: 12px 14px; color: var(--text-3); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.8px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02); }
.tbl td { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.05); color: var(--text-2); }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: rgba(255,255,255,0.025); }
.tbl td:first-child, .tbl th:first-child { padding-left: 18px; }

/* ── Toasts ── */
#toast-root { position: fixed; top: 18px; right: 18px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; max-width: 92vw; }
.toast {
    background: rgba(15, 20, 34, 0.95); border: 1px solid var(--border-hi);
    border-left: 3px solid var(--brand); border-radius: 12px;
    padding: 13px 18px; font-size: 14px; color: var(--text);
    box-shadow: var(--shadow); backdrop-filter: blur(12px);
    animation: toast-in 0.3s cubic-bezier(0.21, 1.02, 0.73, 1);
    max-width: 380px;
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--yellow); }
@keyframes toast-in { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
.toast.hide { animation: toast-out 0.25s forwards; }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }

/* ── Skeletons ── */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.11) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%; animation: shimmer 1.4s infinite;
    border-radius: 8px; color: transparent !important; min-height: 14px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Modal ── */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center; padding: 18px;
    animation: fade-in 0.2s;
}
.modal {
    background: #0e1424; border: 1px solid var(--border-hi); border-radius: 18px;
    padding: 28px; width: 100%; max-width: 460px; max-height: 88vh; overflow-y: auto;
    box-shadow: var(--shadow); animation: pop-in 0.25s cubic-bezier(0.21, 1.02, 0.73, 1);
}
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.93) translateY(12px); } }

/* ── Banners ── */
.banner { padding: 13px 18px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.banner-yellow { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.35); color: #fcd34d; }
.banner-red { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.35); color: #fca5a5; }
.banner-blue { background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.35); color: #93c5fd; }

/* ── Typography ── */
h1.hero { font-size: clamp(34px, 6vw, 58px); font-weight: 800; letter-spacing: -1.5px; line-height: 1.08; }
.grad-text { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { color: var(--text-2); font-size: 16px; line-height: 1.65; }
.section-title { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 8px; }
.muted { color: var(--text-3); font-size: 13px; }

/* ── Animations ── */
.fade-up { animation: fadeUp 0.6s cubic-bezier(0.21, 1.02, 0.73, 1) both; }
.fade-up.d1 { animation-delay: 0.08s; } .fade-up.d2 { animation-delay: 0.16s; } .fade-up.d3 { animation-delay: 0.24s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); } 55% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } }
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,0.25); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Pricing cards ── */
.price-card { position: relative; text-align: left; display: flex; flex-direction: column; }
.price-card .ribbon {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: var(--brand-grad); color: #fff; font-size: 11.5px; font-weight: 800;
    padding: 5px 16px; border-radius: 999px; letter-spacing: 0.6px; white-space: nowrap;
    box-shadow: 0 4px 16px rgba(59,130,246,0.5);
}
.price-card.featured { border-color: rgba(59,130,246,0.55); background: rgba(59,130,246,0.06); }
.price-amount { font-size: 40px; font-weight: 800; letter-spacing: -1px; }
.price-amount .cur { font-size: 20px; vertical-align: 14px; color: var(--text-2); font-weight: 600; }
.feat-list { list-style: none; margin: 18px 0 22px; flex: 1; }
.feat-list li { padding: 7px 0; color: var(--text-2); font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.feat-list li::before { content: '✓'; color: var(--green); font-weight: 800; }

/* ── Auth card ── */
.auth-card { width: 100%; max-width: 430px; }
.auth-card .logo { justify-content: center; margin-bottom: 6px; font-size: 24px; }
.auth-card h2 { text-align: center; font-size: 22px; margin-bottom: 4px; }
.auth-card .sub { text-align: center; font-size: 14px; margin-bottom: 24px; }

/* ── Dashboard shell ── */
.dash-layout { display: flex; min-height: calc(100vh - 61px); }
.sidebar {
    width: 232px; flex-shrink: 0; padding: 22px 14px;
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 4px;
    background: rgba(255,255,255,0.015);
}
.side-link {
    display: flex; align-items: center; gap: 11px; padding: 11px 14px;
    border-radius: 10px; color: var(--text-2); font-size: 14px; font-weight: 500;
    cursor: pointer; transition: background 0.15s, color 0.15s; border: none; background: none; text-align: left; font-family: var(--font);
    text-decoration: none !important;
}
.side-link:hover { background: var(--surface-2); color: var(--text); }
.side-link.active { background: rgba(59,130,246,0.14); color: #93c5fd; font-weight: 600; }
.dash-main { flex: 1; padding: 26px; min-width: 0; }
@media (max-width: 860px) {
    .sidebar { position: fixed; left: 0; top: 61px; bottom: 0; z-index: 200; background: #0b0f1a; transform: translateX(-100%); transition: transform 0.25s ease; }
    .sidebar.open { transform: none; box-shadow: var(--shadow); }
    .dash-main { padding: 18px 14px; }
}

/* Stat widgets */
.stat-card { padding: 20px 22px; }
.stat-card .k { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 700; }
.stat-card .v { font-size: 27px; font-weight: 800; margin-top: 6px; letter-spacing: -0.5px; }
.stat-card .s { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }

/* Notification bell */
.bell-wrap { position: relative; }
.bell-btn { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 16px; transition: border-color 0.2s; }
.bell-btn:hover { border-color: var(--border-hi); }
.bell-count {
    position: absolute; top: -6px; right: -6px; background: var(--red); color: #fff;
    font-size: 10.5px; font-weight: 800; min-width: 18px; height: 18px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center; padding: 0 4px;
    border: 2px solid var(--bg);
}
.notif-panel {
    position: absolute; right: 0; top: 48px; width: 360px; max-width: 92vw; max-height: 460px; overflow-y: auto;
    background: #0e1424; border: 1px solid var(--border-hi); border-radius: 14px; box-shadow: var(--shadow);
    z-index: 300; animation: pop-in 0.2s;
}
.notif-item { padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; gap: 10px; align-items: flex-start; }
.notif-item.unread { background: rgba(59,130,246,0.06); }
.notif-item .t { font-size: 13.5px; font-weight: 600; }
.notif-item .b { font-size: 12.5px; color: var(--text-2); margin-top: 3px; line-height: 1.5; }
.notif-item .d { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* Renewal overlay (expired lock) */
.lock-overlay {
    position: absolute; inset: 0; z-index: 50;
    background: rgba(7, 10, 18, 0.88); backdrop-filter: blur(14px);
    display: flex; align-items: center; justify-content: center; border-radius: var(--radius);
}

/* Trading iframe */
.trading-frame-wrap { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: #000; height: calc(100vh - 210px); min-height: 420px; }
.trading-frame-wrap iframe { width: 100%; height: 100%; border: none; display: block; }

/* Tabs / segmented control */
.seg { display: inline-flex; background: rgba(0,0,0,0.35); border: 1px solid var(--border); border-radius: 10px; padding: 4px; gap: 4px; }
.seg button { border: none; background: none; color: var(--text-2); font-family: var(--font); font-size: 13px; font-weight: 600; padding: 7px 16px; border-radius: 7px; cursor: pointer; transition: all 0.15s; }
.seg button.active { background: var(--brand-grad); color: #fff; }

/* Utility */
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.tc { text-align: center; }
.hidden { display: none !important; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-grad); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; color: #fff; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.divider { height: 1px; background: var(--border); margin: 18px 0; }

/* Mini bar chart (admin) */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.bars .bar { flex: 1; background: var(--brand-grad); border-radius: 3px 3px 0 0; min-height: 2px; opacity: 0.85; transition: opacity 0.15s; position: relative; }
.bars .bar:hover { opacity: 1; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }
