:root {
    --bg: #f4f8fb;
    --card: #ffffff;
    --text: #152238;
    --muted: #6c7890;
    --primary: #58a6ff;
    --primary-dark: #2878d8;
    --success: #22b573;
    --warning: #f5a524;
    --danger: #e5484d;
    --line: #e6edf5;
    --shadow: 0 18px 45px rgba(36, 70, 115, .10);
    --radius: 22px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(88, 166, 255, .18), transparent 35%),
        linear-gradient(180deg, #f7fbff 0%, var(--bg) 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
    line-height: 1.7;
}

a { color: inherit; text-decoration: none; }

.app-shell {
    width: min(1120px, 100%);
    margin: auto;
    padding: 16px;
}

.topbar {
    position: sticky;
    top: 10px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 18px;
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(230, 237, 245, .9);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 900;
    font-size: 17px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #eaf5ff, #ffffff);
    border: 1px solid var(--line);
}

.menu-btn {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #eef6ff;
    color: var(--primary-dark);
    font-size: 22px;
    cursor: pointer;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.main-nav a {
    padding: 9px 12px;
    color: var(--muted);
    border-radius: 999px;
    font-weight: 800;
    font-size: 14px;
}

.main-nav a.active,
.main-nav a:hover,
.main-nav .nav-cta {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.hero {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 18px;
    align-items: center;
    min-height: 560px;
}

.hero-card,
.card {
    background: rgba(255, 255, 255, .9);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-card { padding: 32px; }
.card { padding: 20px; margin-bottom: 16px; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--primary-dark);
    background: #eaf5ff;
    border: 1px solid #d6eaff;
    font-size: 13px;
    font-weight: 900;
}

h1, h2, h3 { margin: 0 0 12px; line-height: 1.35; }
h1 { font-size: clamp(31px, 5vw, 54px); letter-spacing: -1px; }
h2 { font-size: clamp(24px, 4vw, 34px); }
h3 { font-size: 18px; }
p { color: var(--muted); margin: 0 0 14px; }

.hero-actions,
.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 11px 17px;
    border: 0;
    border-radius: 16px;
    background: #eef4fb;
    color: var(--text);
    font-weight: 900;
    cursor: pointer;
    transition: .15s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.btn-success { color: #fff; background: var(--success); }
.btn-danger { color: #fff; background: var(--danger); }
.btn-outline { background: transparent; border: 1px solid var(--line); color: var(--primary-dark); }
.btn-block { width: 100%; }

.visual-card {
    padding: 22px;
    min-height: 360px;
    display: grid;
    align-content: center;
    gap: 12px;
}

.phone-mock {
    width: min(315px, 100%);
    margin: auto;
    padding: 14px;
    border-radius: 34px;
    background: #172033;
    box-shadow: 0 25px 70px rgba(23, 32, 51, .18);
}
.phone-inner {
    min-height: 430px;
    background: #f9fbff;
    border-radius: 24px;
    padding: 16px;
}
.mock-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
}
.mock-dot { width: 44px; height: 44px; border-radius: 15px; background: #eaf5ff; display: grid; place-items: center; }

.features-grid,
.stats-grid,
.sim-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.feature,
.stat {
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
}

.stat strong {
    display: block;
    font-size: clamp(22px, 4vw, 34px);
    margin-bottom: 3px;
}
.stat span { color: var(--muted); font-weight: 800; font-size: 14px; }

.auth-wrap {
    width: min(460px, 100%);
    margin: 32px auto;
}

.form-group { margin-bottom: 14px; }
label { display: block; margin-bottom: 7px; font-weight: 900; color: #27334a; }
input, select, textarea {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff;
    color: var(--text);
    font: inherit;
    outline: none;
}
textarea { min-height: 94px; resize: vertical; }
input:focus, select:focus, textarea:focus {
    border-color: #add7ff;
    box-shadow: 0 0 0 4px rgba(88, 166, 255, .12);
}

.helper { color: var(--muted); font-size: 13px; margin-top: 5px; }
.divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--muted); }
.divider:before, .divider:after { content: ''; height: 1px; flex: 1; background: var(--line); }

.alert {
    padding: 12px 14px;
    border-radius: 16px;
    margin: 0 0 14px;
    border: 1px solid transparent;
    font-weight: 800;
}
.alert-success { background: #eafaf3; color: #157347; border-color: #c7f0de; }
.alert-danger { background: #fff0f0; color: #b4232a; border-color: #ffd6d8; }
.alert-warning { background: #fff8e8; color: #8a5a00; border-color: #ffedbd; }

.page-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 10px 0 16px;
}

.sim-grid { grid-template-columns: repeat(2, 1fr); }
.sim-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(36, 70, 115, .07);
}
.sim-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 13px;
}
.sim-number { direction: ltr; color: var(--muted); font-weight: 800; }
.type-pill {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef6ff;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}
.balance {
    font-size: 25px;
    font-weight: 950;
    margin-bottom: 12px;
}
.progress-item { margin: 10px 0; }
.progress-label {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #526077;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 6px;
}
.progress {
    height: 10px;
    background: #edf3f8;
    border-radius: 999px;
    overflow: hidden;
}
.progress-bar { height: 100%; border-radius: 999px; }
.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }
.progress-bar.danger { background: var(--danger); }

.table-card { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}
th, td {
    padding: 13px 10px;
    text-align: right;
    border-bottom: 1px solid var(--line);
}
th { color: #4d5b72; font-size: 13px; }
td { color: #1e2a40; }
tr:last-child td { border-bottom: 0; }
.kind {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 9px;
    font-weight: 900;
    font-size: 12px;
}
.kind.deposit { background: #eafaf3; color: #157347; }
.kind.withdraw { background: #fff0f0; color: #b4232a; }

.empty {
    text-align: center;
    padding: 38px 16px;
    color: var(--muted);
}
.footer {
    margin: 24px 0 5px;
    text-align: center;
    font-size: 13px;
}

@media (max-width: 820px) {
    .hero { grid-template-columns: 1fr; min-height: auto; }
    .features-grid, .stats-grid, .sim-grid { grid-template-columns: 1fr; }
    .hero-card { padding: 24px 18px; }
    .visual-card { display: none; }
}

@media (max-width: 680px) {
    .app-shell { padding: 10px; }
    .topbar { border-radius: 18px; top: 6px; }
    .menu-btn { display: grid; place-items: center; }
    .main-nav {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        padding: 10px;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 18px;
        box-shadow: var(--shadow);
    }
    .nav-open .main-nav { display: grid; }
    .main-nav a { width: 100%; text-align: center; border-radius: 13px; }
    .card { padding: 16px; border-radius: 18px; }
    .btn { width: 100%; }
    .hero-actions .btn { width: 100%; }
    .page-title .btn { width: auto; }
    table { min-width: 650px; }
}
