﻿:root {
    --bg: #f4f2ec;
    --bg-2: #fefbf4;
    --text: #1f2a33;
    --muted: #5d6a74;
    --primary: #155a7a;
    --primary-dark: #0f4259;
    --accent: #e2a44c;
    --card: #ffffff;
    --border: #e2dcd0;
    --success: #1b7f5f;
    --warning: #c27b2f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    background: radial-gradient(circle at top, var(--bg-2) 0%, var(--bg) 45%, #ebe6db 100%);
    color: var(--text);
}

.hidden {
    display: none !important;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(254, 251, 244, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.profile-trigger {
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    cursor: pointer;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: #f0ebe0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--primary);
}

.profile-text {
    display: none;
    text-align: left;
}

.profile-title {
    font-weight: 600;
    display: block;
}

.profile-subtitle {
    font-size: 12px;
    color: var(--muted);
}

.brand {
    border: none;
    background: transparent;
    text-align: center;
    cursor: pointer;
}

.brand-mark {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand-subtitle {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

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

.wallet-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}

.hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.hero h1 {
    font-size: 34px;
    margin: 12px 0 12px;
}

.hero p {
    color: var(--muted);
    line-height: 1.5;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(21, 90, 122, 0.12);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
}

.hero-actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-card {
    background: var(--card);
    border-radius: 20px;
    padding: 22px;
    border: 1px solid var(--border);
    box-shadow: 0 18px 32px rgba(20, 30, 40, 0.08);
}

.hero-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--muted);
}

.pill {
    background: #f3e6d1;
    color: var(--primary-dark);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
}

.wallet-alias {
    font-size: 20px;
    font-weight: 600;
    margin: 18px 0 12px;
    letter-spacing: 0.15em;
}

.wallet-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: var(--muted);
}

.wallet-balance strong {
    font-size: 18px;
    color: var(--primary);
}

.wallet-owner {
    margin-top: 12px;
    font-size: 13px;
    color: var(--muted);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
    background: var(--card);
    border-radius: 18px;
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 16px 28px rgba(25, 30, 40, 0.05);
}

.card h3 {
    margin-top: 0;
}

.card-muted {
    background: rgba(255, 255, 255, 0.7);
}

.list {
    padding-left: 18px;
    color: var(--muted);
}

.list li {
    margin-bottom: 6px;
}

.status-list {
    display: grid;
    gap: 12px;
    margin: 16px 0;
}

.status-list div {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.status-ok {
    color: var(--success);
}

.status-warning {
    color: var(--warning);
}

.activity {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    color: var(--muted);
}

.btn {
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px rgba(21, 90, 122, 0.25);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-ghost {
    background: rgba(21, 90, 122, 0.1);
    color: var(--primary);
}

.btn-success {
    background: rgba(27, 127, 95, 0.16);
    color: var(--success);
}

.view {
    display: none;
}

.view-active {
    display: block;
}

.panel {
    background: var(--card);
    border-radius: 20px;
    padding: 28px;
    border: 1px solid var(--border);
    box-shadow: 0 18px 32px rgba(20, 30, 40, 0.06);
}

.panel-header h2 {
    margin: 0 0 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.form-grid label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

.form-grid input,
.form-grid select,
.payment-flow input,
.payment-flow textarea {
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
}

.panel-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.stepper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #f0ebe0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}

.step-line {
    flex: 1;
    height: 3px;
    min-width: 32px;
    background: var(--border);
    border-radius: 999px;
}

.step.active .step-icon {
    background: var(--primary);
    color: white;
}

.step.completed .step-icon {
    background: var(--success);
    color: white;
}

.step.completed + .step-line,
.step.active + .step-line {
    background: var(--primary);
}

.payment-flow {
    min-height: 320px;
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.option-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    background: #fdf9f1;
}

.option-card:hover {
    border-color: var(--primary);
}

.payment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.app-footer {
    border-top: 1px solid var(--border);
    background: #111f2b;
    color: #f1ece3;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    align-items: center;
}

.footer-brand h2 {
    margin: 0 0 6px;
}

.footer-links {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.footer-links a {
    color: #f1ece3;
    font-size: 18px;
}

.footer-copy {
    font-size: 12px;
    color: #c6c1b6;
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (min-width: 768px) {
    .profile-text {
        display: block;
    }
}

@media (max-width: 720px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .brand {
        order: -1;
        text-align: left;
    }

    .wallet-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .panel-actions {
        flex-direction: column;
    }
}
