:root {
    --bg-1: #07111f;
    --bg-2: #0b1730;
    --bg-3: #120d25;
    --white: #ffffff;
    --muted: #b9c5d9;
    --card: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.12);
    --blue: #4f8cff;
    --purple: #8f5cff;
    --pink: #ff5ec7;
    --orange: #ff9a3d;
    --danger: #ff4d67;
    --success: #25d38a;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: Inter, Arial, sans-serif;
    color: var(--white);
}

.app-bg {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(79, 140, 255, 0.20), transparent 28%),
        radial-gradient(circle at top right, rgba(143, 92, 255, 0.18), transparent 30%),
        radial-gradient(circle at bottom center, rgba(255, 94, 199, 0.10), transparent 25%),
        linear-gradient(160deg, var(--bg-1), var(--bg-2), var(--bg-3));
}

a {
    color: inherit;
    text-decoration: none;
}

.glass-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.auth-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-wrap {
    width: 100%;
    max-width: 460px;
}

.auth-brand {
    text-align: center;
    margin-bottom: 18px;
}

.brand-badge {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(79, 140, 255, 0.15);
    border: 1px solid rgba(79, 140, 255, 0.35);
    color: #dce8ff;
    font-size: 13px;
    margin-bottom: 12px;
}

.auth-brand h1 {
    font-size: 30px;
    line-height: 1.15;
    margin-bottom: 8px;
}

.auth-brand p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.auth-card {
    padding: 22px;
}

.auth-head {
    margin-bottom: 18px;
}

.auth-head h2 {
    font-size: 24px;
    margin-bottom: 6px;
}

.auth-head p {
    color: var(--muted);
    font-size: 14px;
}

.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #dfe7f5;
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0.9;
}

.input-wrap input,
.input-wrap select,
.input-wrap textarea {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.09);
    color: var(--white);
    border-radius: 16px;
    outline: none;
    padding: 15px 46px 15px 42px;
    font-size: 15px;
    transition: 0.25s ease;
}

.input-wrap input::placeholder,
.input-wrap textarea::placeholder {
    color: #9eb0ca;
}

.input-wrap input:focus,
.input-wrap select:focus,
.input-wrap textarea:focus {
    border-color: rgba(79, 140, 255, 0.5);
    box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.12);
}

.eye-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(255,255,255,0.10);
    color: #dce5f7;
    border-radius: 12px;
    padding: 7px 11px;
    font-size: 12px;
    cursor: pointer;
}

.btn {
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-weight: 700;
    transition: 0.25s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-block {
    width: 100%;
    padding: 15px 18px;
    font-size: 15px;
}

.btn-sm {
    padding: 10px 14px;
    font-size: 13px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue), var(--purple));
    color: var(--white);
    box-shadow: 0 10px 24px rgba(79, 140, 255, 0.25);
}

.btn-dark {
    background: rgba(255,255,255,0.09);
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 14px 18px;
}

.btn-danger {
    background: linear-gradient(135deg, #ff5b6d, #d63557);
    color: var(--white);
}

.alert-box {
    padding: 14px 16px;
    border-radius: 16px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-box.danger {
    background: rgba(255, 77, 103, 0.12);
    border: 1px solid rgba(255, 77, 103, 0.30);
    color: #ffd3dc;
}

.demo-login {
    margin-top: 18px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
}

.demo-login h4 {
    margin-bottom: 8px;
    font-size: 15px;
}

.demo-login p {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 4px;
}

.app-body {
    padding: 16px 16px 90px;
}

.mobile-shell {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
}

.top-header {
    padding: 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.small-label {
    color: #b8c9e8;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.top-header h1 {
    font-size: 24px;
    line-height: 1.2;
    margin-bottom: 6px;
}

.top-header p {
    color: var(--muted);
    font-size: 13px;
}

.hero-card {
    padding: 20px;
    margin-bottom: 14px;
    overflow: hidden;
    position: relative;
}

.hero-card::before {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    right: -30px;
    top: -40px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 140, 255, 0.22), transparent 70%);
}

.hero-text h2 {
    font-size: 24px;
    line-height: 1.25;
    margin-bottom: 10px;
}

.hero-text p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-actions .btn {
    padding: 14px 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.stat-card {
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: auto -10px -35px auto;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    opacity: 0.20;
    filter: blur(10px);
}

.glow-blue::after { background: var(--blue); }
.glow-purple::after { background: var(--purple); }
.glow-pink::after { background: var(--pink); }
.glow-orange::after { background: var(--orange); }

.stat-icon {
    font-size: 22px;
    margin-bottom: 10px;
}

.stat-text span {
    display: block;
    color: #c7d6eb;
    font-size: 13px;
    margin-bottom: 6px;
}

.stat-text h3 {
    font-size: 28px;
}

.quick-actions,
.block-card {
    padding: 18px;
}

.section-head {
    margin-bottom: 14px;
}

.section-head h3 {
    font-size: 18px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.action-btn {
    min-height: 92px;
    border-radius: 18px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 24px;
    text-align: center;
    padding: 14px 8px;
}

.action-btn span {
    font-size: 13px;
    color: #d7e2f2;
}

.active-scan {
    background: linear-gradient(135deg, rgba(79,140,255,0.25), rgba(143,92,255,0.25));
    border-color: rgba(125, 143, 255, 0.4);
}

.stack-section {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.list-cards,
.activity-list {
    display: grid;
    gap: 12px;
}

.mini-list-item,
.activity-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 14px;
}

.mini-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mini-list-item h4 {
    font-size: 15px;
    margin-bottom: 4px;
}

.mini-list-item p,
.activity-item p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.mini-list-item strong {
    font-size: 22px;
}

.activity-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.activity-top strong {
    font-size: 14px;
}

.activity-top span {
    font-size: 12px;
    color: #d6e2ff;
    background: rgba(79,140,255,0.12);
    border: 1px solid rgba(79,140,255,0.20);
    padding: 5px 8px;
    border-radius: 999px;
}

.activity-item small {
    color: #9db0cc;
    display: block;
    margin-top: 8px;
    font-size: 12px;
}

.empty-box {
    padding: 18px;
    border-radius: 16px;
    text-align: center;
    color: var(--muted);
    background: rgba(255,255,255,0.04);
    border: 1px dashed rgba(255,255,255,0.10);
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    width: calc(100% - 20px);
    max-width: 820px;
    background: rgba(8, 15, 30, 0.88);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    box-shadow: 0 18px 42px rgba(0,0,0,0.36);
    padding: 10px 8px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 999;
}

.bottom-nav a {
    color: #c5d3ea;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 18px;
    min-width: 56px;
}

.bottom-nav a span {
    font-size: 11px;
}

.bottom-nav a.active {
    color: var(--white);
}

.scan-center {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    color: var(--white) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 22px !important;
    box-shadow: 0 10px 26px rgba(79, 140, 255, 0.32);
    margin-top: -22px;
}

@media (min-width: 768px) {
    .auth-wrap {
        max-width: 500px;
    }

    .auth-card {
        padding: 28px;
    }

    .top-header,
    .hero-card,
    .quick-actions,
    .block-card {
        padding: 22px;
    }

    .top-header h1 {
        font-size: 30px;
    }

    .hero-text h2 {
        font-size: 30px;
    }

    .stats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .action-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .stack-section {
        grid-template-columns: 1fr 1fr;
    }
}