:root {
    --bg-dark: #070B14;
    --bg-card: rgba(15, 23, 42, 0.75);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-bright: rgba(255, 255, 255, 0.18);
    --border-active: #10B981;
    
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    --primary: #10B981;
    --primary-glow: rgba(16, 185, 129, 0.3);
    --primary-hover: #059669;
    
    --accent-blue: #3B82F6;
    --accent-indigo: #6366F1;
    --accent-amber: #F59E0B;
    --accent-purple: #A855F7;
    
    --danger: #EF4444;
    --success: #10B981;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow-glass: 0 10px 30px -5px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-glass);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.5;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Ambient glow background effects */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
}
.glow-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #10B981, transparent);
    top: -100px;
    left: -100px;
}
.glow-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #6366F1, transparent);
    bottom: -150px;
    right: -150px;
}

.app-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
    position: relative;
    z-index: 1;
}

/* Glassmorphism panel core */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* App Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    margin-bottom: 24px;
    border-radius: var(--radius-md);
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #10B981, #0284C7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 20px;
    color: #FFFFFF;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #FFFFFF, #E2E8F0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tenant-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 10px #10B981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

/* State cards (loading / error) */
.state-card {
    padding: 60px 24px;
    margin: 40px auto;
    max-width: 540px;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

.spinner-small {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.icon-warning {
    font-size: 48px;
    margin-bottom: 16px;
}

/* Website sign-in */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px auto 0;
    max-width: 360px;
}

.login-form input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: #FFF;
    font-size: 15px;
}

.login-form .btn {
    padding: 13px;
    font-size: 15px;
}

.login-error {
    color: #F87171;
    font-size: 13px;
}

.login-hint {
    margin-top: 16px;
    font-size: 12px;
}

/* Toast banner */
.toast-banner {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-banner.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34D399;
}

.toast-banner.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #F87171;
}

/* Connected Mobile App Account Ribbon */
.connected-account-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(15, 23, 42, 0.7));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    flex-wrap: wrap;
    gap: 16px;
}

.account-bar-info {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.account-bar-col {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.account-bar-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.account-bar-val {
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-bar-icon {
    font-size: 16px;
}

.account-bar-val strong {
    font-size: 15px;
    font-weight: 800;
    color: #FFFFFF;
}

.account-bar-badge {
    font-size: 11px;
    font-weight: 600;
    color: #6EE7B7;
    background: rgba(16, 185, 129, 0.15);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.account-bar-badge-sub {
    font-size: 11px;
    color: #94A3B8;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.account-bar-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #34D399;
    background: rgba(16, 185, 129, 0.12);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 8px #10B981;
    animation: pulse 2s infinite;
}

/* Checkout Card Component */
.checkout-card {
    padding: 32px 28px;
    margin-bottom: 30px;
}

.checkout-header {
    margin-bottom: 24px;
}

.checkout-header h2 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: #FFFFFF;
}

/* Cycle Switcher Tabs */
.cycle-switcher-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.cycle-tab {
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.cycle-tab input {
    display: none;
}

.cycle-tab:hover {
    background: rgba(255, 255, 255, 0.08);
}

.cycle-tab.active {
    background: rgba(16, 185, 129, 0.12);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.tab-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tab-title {
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
}

.tab-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
}

.discount-badge {
    background: #10B981;
    color: #064E3B;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

/* Core Package Card */
.core-package-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(15, 23, 42, 0.6));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.core-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #2563EB;
    color: #FFF;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.core-info h3 {
    font-size: 17px;
    font-weight: 700;
    color: #FFFFFF;
}

.core-price {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 900;
    color: #FFFFFF;
    text-align: right;
    white-space: nowrap;
    padding-left: 16px;
}

.core-price span {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.addon-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

/* Addon Tiles */
.addons-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 28px;
}

.addon-tile {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.addon-tile:hover {
    background: rgba(255, 255, 255, 0.06);
}

.addon-tile.selected {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.15);
}

.addon-checkbox-col input {
    display: none;
}

.custom-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.addon-tile input:checked + .custom-checkbox {
    background: var(--primary);
    border-color: var(--primary);
}

.addon-tile input:checked + .custom-checkbox::after {
    content: '✓';
    color: #070B14;
    font-weight: 900;
    font-size: 15px;
}

.addon-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.washing-icon { background: rgba(2, 132, 199, 0.15); border: 1px solid rgba(2, 132, 199, 0.3); }
.transport-icon { background: rgba(234, 88, 12, 0.15); border: 1px solid rgba(234, 88, 12, 0.3); }
.operator-icon { background: rgba(168, 85, 247, 0.15); border: 1px solid rgba(168, 85, 247, 0.3); }

.addon-details {
    flex: 1;
}

.addon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.addon-name {
    font-size: 15px;
    font-weight: 700;
    color: #FFFFFF;
}

.addon-rate {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
}

.addon-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Price Summary Box */
.price-summary-box {
    padding: 20px 24px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    margin-bottom: 24px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.discount-line {
    color: #34D399;
}

.summary-divider {
    height: 1px;
    background: var(--border-glass);
    margin: 14px 0;
}

.summary-total-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.total-label {
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
}

.cycle-note {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
}

.total-amount {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 900;
    color: var(--primary);
}

/* Submit Action Button */
.submit-action-row {
    margin-top: 12px;
}

.btn {
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #10B981, #059669);
    color: #FFFFFF;
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.5);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-submit-payment {
    width: 100%;
    padding: 18px;
    font-size: 17px;
    font-family: var(--font-heading);
    border-radius: 16px;
}

.payment-trust-note {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 14px;
}

/* Utilities */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

/* Responsive Mobile Phone Layout & Styles */
@media (max-width: 768px) {
    .app-container {
        padding: 12px 12px 32px 12px;
    }

    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px 16px;
    }

    .header-right {
        width: 100%;
    }

    .tenant-badge {
        width: 100%;
        justify-content: center;
    }

    .connected-account-bar {
        padding: 14px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .account-bar-info {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .checkout-card {
        padding: 18px 16px;
    }

    .cycle-switcher-wrapper {
        gap: 8px;
    }

    .cycle-tab {
        padding: 12px 10px;
    }

    .tab-title {
        font-size: 14px;
    }

    .tab-sub {
        font-size: 11px;
    }

    .core-package-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .core-price {
        padding-left: 0;
        text-align: left;
        font-size: 24px;
    }

    .addon-tile {
        padding: 14px 12px;
        gap: 12px;
    }

    .addon-name {
        font-size: 14px;
    }

    .addon-rate {
        font-size: 14px;
    }

    .addon-desc {
        font-size: 11px;
    }

    .price-summary-box {
        padding: 16px;
    }

    .total-amount {
        font-size: 26px;
    }

    .btn-submit-payment {
        padding: 16px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .brand-title {
        font-size: 19px;
    }

    .brand-subtitle {
        font-size: 11px;
    }

    .checkout-header h2 {
        font-size: 20px;
    }

    .summary-total-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .total-amount {
        font-size: 28px;
        align-self: flex-end;
    }
}
