:root {
    /* Black + Beige premium theme */
    --bg: #F5F0E8;
    --bg-secondary: #EDE7DD;
    --text: #1A1A1A;
    --text-secondary: #5C5C5C;
    --hint: #8C8C8C;
    --accent: #1A1A1A;
    --accent-light: rgba(26,26,26,0.06);
    --accent-hover: #333333;
    --button: #2C2C2C;
    --button-text: #FFFFFF;
    --card-bg: #FFFFFF;
    --card-border: #DDD6CC;
    --card-hover: #F8F4ED;
    --success: #2D8C5A;
    --success-light: rgba(45,140,90,0.1);
    --warning: #B8860B;
    --warning-light: rgba(184,134,11,0.1);
    --danger: #CC3333;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

#app {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
    padding-bottom: 100px;
}

/* ─── Loading ─── */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60vh;
    gap: 16px;
    color: var(--hint);
}

.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--card-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ─── Profile Header ─── */
.profile-header {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--card-border);
}

.profile-header .profile-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.profile-header .name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}

.profile-header .restaurant {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.profile-header .logo {
    font-size: 11px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ─── Tariff Badge ─── */
.tariff-badge {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tariff-badge .tariff-name {
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text);
}

.tariff-badge .tariff-price {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 1px;
}

.tariff-badge .change-btn {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    text-decoration: none;
    padding: 6px 12px;
    background: var(--accent-light);
    border-radius: 8px;
    transition: background var(--transition);
}

.tariff-badge .change-btn:hover {
    background: #FDE68A;
}

/* ─── Usage Bar ─── */
.usage-bar {
    margin-top: 10px;
}

.usage-bar .bar-bg {
    height: 6px;
    background: var(--card-border);
    border-radius: 3px;
    overflow: hidden;
}

.usage-bar .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #1A1A1A, #555555);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.usage-bar .bar-text {
    font-size: 11px;
    color: var(--hint);
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
}

/* ─── Section Headers ─── */
.section-header {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--hint);
    margin: 28px 0 12px;
}

/* ─── Feature Cards Grid ─── */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 18px 16px;
    cursor: pointer;
    position: relative;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.feature-card:active {
    transform: scale(0.97);
}

.feature-card.accessible:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.feature-card.locked {
    opacity: 0.45;
    cursor: default;
}

.feature-card .card-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.feature-card .card-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
}

.feature-card .card-lock {
    font-size: 10px;
    font-weight: 600;
    color: var(--accent);
    margin-top: 10px;
    background: var(--accent-light);
    padding: 4px 8px;
    border-radius: 6px;
    text-align: center;
}

.feature-card .card-fav {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.2;
    transition: opacity var(--transition);
}

.feature-card .card-fav:hover,
.feature-card .card-fav.active {
    opacity: 0.8;
}

/* ─── Chat Card ─── */
.chat-card {
    background: linear-gradient(135deg, #1A1A1A 0%, #333333 100%);
    border-radius: var(--radius);
    padding: 22px 20px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.chat-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.12);
    border-radius: 50%;
}

.chat-card:active {
    transform: scale(0.98);
}

.chat-card .chat-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    position: relative;
}

.chat-card .chat-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #1A1A1A;
    background: rgba(255,255,255,0.92);
    padding: 8px 16px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ─── Registration ─── */
.reg-container {
    display: flex;
    flex-direction: column;
    min-height: 80vh;
}

.reg-header {
    text-align: center;
    padding: 24px 0 8px;
}

.reg-header h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text);
}

.reg-header .subtitle {
    font-size: 13px;
    color: var(--hint);
    margin-top: 4px;
}

.reg-steps {
    display: flex;
    gap: 4px;
    margin: 24px 0;
}

.reg-steps .step {
    flex: 1;
    height: 4px;
    background: var(--card-border);
    border-radius: 2px;
    transition: background var(--transition);
}

.reg-steps .step.active {
    background: var(--accent);
}

.reg-steps .step.done {
    background: var(--success);
}

.reg-step-label {
    text-align: center;
    font-size: 12px;
    color: var(--hint);
    margin-bottom: 4px;
}

.reg-question {
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.5px;
    color: var(--text);
    margin: 28px 0 20px;
}

.reg-input {
    width: 100%;
    padding: 16px 18px;
    background: var(--card-bg);
    border: 1.5px solid var(--card-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 16px;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.reg-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.reg-input::placeholder {
    color: var(--hint);
}

/* ─── Buttons ─── */
.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

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

.btn-secondary {
    background: var(--card-bg);
    color: var(--text);
    border: 1.5px solid var(--card-border);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 28px;
}

/* ─── Tariff Selection ─── */
.tariff-option {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

.tariff-option:hover {
    border-color: #D4C9BD;
}

.tariff-option.selected {
    border-color: var(--accent);
    background: #F8F4ED;
    box-shadow: 0 0 0 3px rgba(26,26,26,0.1);
}

.tariff-option .tariff-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.tariff-option .tariff-top .name {
    font-weight: 800;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tariff-option .tariff-top .price {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.tariff-option .tariff-features {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.tariff-option .tariff-features .feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tariff-option .tariff-features .check {
    color: var(--success);
    font-weight: 700;
}

/* ─── Support Card ─── */
.support-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

.support-card:hover {
    border-color: #D4C9BD;
    box-shadow: var(--shadow-md);
}

.support-card .icon {
    font-size: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.support-card .text {
    font-size: 13px;
}

.support-card .text .title {
    font-weight: 700;
    color: var(--text);
}

.support-card .text .subtitle {
    color: var(--hint);
    font-size: 12px;
    margin-top: 1px;
}

/* ─── Responsive ─── */
@media (max-width: 360px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
}
