/* ============================================
 * BlueGym Shared CSS
 * Shared styles between member-dashboard.php
 * and account-settings.php
 * ============================================ */

/* Design Tokens */
:root {
    --bg-dark: #08080f;
    --bg-card: #111119;
    --bg-elevated: #18182a;
    --surface3: #1f1f35;
    --primary: #6366F1;
    --primary-light: #818CF8;
    --accent: #22D3EE;
    --accent-pink: #F472B6;
    --text: #E8ECF4;
    --text2: #C0C6D4;
    --text-muted: #7E86A0;
    --border: rgba(255,255,255,0.06);
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --gradient: linear-gradient(135deg, #6366F1 0%, #22D3EE 50%, #F472B6 100%);
    --r: 14px;
}

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

/* Base Body */
body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
    font-size: 15px;
}

/* ============================================
 * BUTTON STYLES
 * ============================================ */
.btn {
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    border-radius: 12px;
    font-size: 0.85rem;
    transition: all 0.25s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text2);
    border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--text);
}

.btn-cancel {
    background: var(--bg-elevated);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-confirm {
    background: var(--gradient);
    color: white;
}

.btn-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.btn-outline:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-danger {
    background: #ef4444; color: #fff; border: none; padding: 0.6rem 1.25rem;
    border-radius: 10px; font-weight: 600; cursor: pointer; font-family: inherit;
    font-size: 0.9rem; transition: background 0.2s;
}
.btn-danger:hover { background: #dc2626; }
.btn-danger:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-danger-outline {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger-outline:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--danger);
}

/* ============================================
 * DASHBOARD CARD STYLES
 * ============================================ */
.dash-stack {
    display: flex;
    flex-direction: column;
    max-width: 720px;
    margin: 0 auto;
}
.dash-card {
    background: var(--bg-card);
    border-radius: var(--r);
    padding: 1.1rem 1.25rem;
    margin-bottom: 0.7rem;
}
.card-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.7rem;
}

/* Warning banners */
.dash-warning-banner {
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 0.7rem;
}

/* ============================================
 * PROFILE CARD STYLES
 * ============================================ */
.dash-profile-inner {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}
.profile-top-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.profile-identity {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.profile-identity .profile-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-photo-wrap {
    position: relative;
    flex-shrink: 0;
    width: fit-content;
}
.profile-photo-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
    width: 160px;
}
.profile-photo-lg {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: var(--surface3);
    border: 3px solid transparent;
    background-clip: padding-box;
}
.profile-photo-lg::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 22px;
    background: var(--gradient);
    z-index: -1;
    opacity: 0.6;
}
.profile-photo-lg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.profile-photo-lg .placeholder-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 2.5rem;
    font-weight: 700;
}
.photo-cam-btn {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 2px solid var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    z-index: 2;
}
.photo-cam-btn:hover {
    background: var(--surface3);
    transform: scale(1.1);
}
.photo-cam-btn svg {
    width: 16px;
    height: 16px;
}
.photo-status {
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.photo-status.ok { color: var(--success); }
.photo-status.no { color: var(--warning); }
.photo-btn {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text2);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    justify-content: center;
}
.photo-btn:hover {
    border-color: rgba(34,211,238,0.3);
    color: var(--text);
    background: var(--surface3);
}
.photo-btn svg { width: 15px; height: 15px; }
.photo-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}
.profile-info-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.profile-name {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}
.profile-sub {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin-top: 4px;
}
.profile-id {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-family: monospace;
}
.badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.5rem;
    border-radius: 5px;
}

/* ============================================
 * STATS GRID
 * ============================================ */
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-top: 1rem;
    background: var(--bg-elevated);
    border-radius: 12px;
    overflow: hidden;
}
.profile-stat-item {
    text-align: center;
    padding: 0.7rem 0.5rem;
}
.profile-stat-item:not(:last-child) {
    border-right: 1px solid var(--border);
}
.profile-stat-item .stat-val {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--text);
}
.profile-stat-item .stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 600;
}
.profile-stats-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* ============================================
 * OUTLET CHIPS
 * ============================================ */
.outlets-row {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}
.outlet-chip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
}
.outlet-chip .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
}
.outlet-chip .name {
    font-weight: 600;
    color: var(--text2);
}
.outlet-chip .home-tag {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(34,211,238,0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
}

/* ============================================
 * PLAN CARD STYLES
 * ============================================ */
.plan-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}
.plan-title {
    font-weight: 700;
    font-size: 1.05rem;
}
.plan-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.plan-price-display {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent);
}
.plan-price-display span {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}
.plan-bar {
    height: 4px;
    border-radius: 4px;
    background: var(--surface3);
    max-width: 140px;
    margin-top: 6px;
}
.plan-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--gradient);
}
.plan-renew-notice {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.85rem;
    margin: 0.75rem 0;
    border-radius: 10px;
    font-size: 0.88rem;
    background: rgba(99,102,241,0.06);
    border: 1px solid rgba(99,102,241,0.12);
    color: var(--text2);
}
.plan-renew-notice svg {
    flex-shrink: 0;
    color: var(--primary);
}
.plan-actions-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.pbtn {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text2);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: inherit;
}
.pbtn:hover {
    border-color: rgba(99,102,241,0.3);
    color: var(--text);
    background: var(--surface3);
}
.pbtn svg { width: 16px; height: 16px; flex-shrink: 0; }
.pbtn.danger {
    color: var(--danger);
    border-color: rgba(239,68,68,0.2);
}
.pbtn.danger:hover {
    background: rgba(239,68,68,0.08);
}

/* ============================================
 * PAUSE / CANCEL REQUEST STATUS
 * ============================================ */
.pause-request-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}
.pause-request-status.pending {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--warning);
}
.pause-request-status.approved {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}
.pause-request-status.rejected {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}
.pause-request-status svg { width: 14px; height: 14px; flex-shrink: 0; }

.cancel-request-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}
.cancel-request-status.pending {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--warning);
}
.cancel-request-status.approved {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}
.cancel-request-status.rejected {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

/* Inline expandable forms */
.inline-form-section {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}
.inline-form-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ============================================
 * ACTIVITY STYLES
 * ============================================ */
.act-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}
.act-count {
    font-size: 0.82rem;
    color: var(--text-muted);
}
.activity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    flex-shrink: 0;
}
.activity-info { flex: 1; min-width: 0; }
.act-date {
    font-size: 0.92rem;
    font-weight: 600;
}
.act-outlet {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: 0.4rem;
}
.activity-duration {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.btn-show-all {
    width: 100%;
    padding: 0.6rem;
    margin-top: 0.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text2);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.btn-show-all:hover {
    background: var(--surface3);
    color: var(--text);
}

/* ============================================
 * MODAL STYLES
 * ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-wide {
    max-width: 900px;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.25rem;
}

.modal-close:hover {
    color: var(--text);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1rem;
}

.modal-footer .btn {
    flex: 1;
    text-align: center;
}

/* ============================================
 * PLAN MODAL STYLES
 * ============================================ */
.plans-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}

.modal-plan-card {
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
}

.modal-plan-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.modal-plan-card.popular {
    border-color: transparent;
    background: linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box,
                var(--gradient) border-box;
}

.modal-plan-card .plan-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.modal-plan-card .plan-price {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.modal-plan-card .plan-price span {
    font-size: 0.875rem;
    font-weight: 500;
}

.modal-plan-card .plan-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.modal-plan-card .plan-features {
    list-style: none;
    text-align: left;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.modal-plan-card .plan-features li {
    padding: 0.3rem 0;
}

.modal-plan-card .plan-features li::before {
    content: "\2713 ";
    color: var(--success);
}

.modal-plan-card .btn {
    width: 100%;
}

.current-plan-badge {
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    margin-bottom: 0.5rem;
    display: inline-block;
}
.modal-plan-card.current {
    border-color: var(--accent);
    opacity: 0.85;
}

.plans-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* Outlet Selection Cards */
.outlet-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}

.outlet-select-card {
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.outlet-select-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.outlet-select-card .outlet-card-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.outlet-select-card .outlet-card-address {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.plans-step-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.25rem 0;
    margin-bottom: 1rem;
    transition: color 0.2s;
}

.plans-step-back:hover {
    color: var(--text);
}

/* Payment Toggle */
.payment-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.payment-toggle .toggle-btn {
    flex: 1;
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: transparent;
    color: var(--text-muted);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}
.payment-toggle .toggle-btn.active {
    background: var(--primary);
    color: white;
}
.payment-toggle .toggle-btn:hover:not(.active) {
    background: rgba(99,102,241,0.15);
}

/* Plan fee note */
.plan-fee-note {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    line-height: 1.3;
}
.plan-fee-note .fee-highlight {
    color: var(--accent);
}
.plan-discount-badge {
    background: rgba(16,185,129,0.15);
    color: var(--success);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin-top: 0.25rem;
}

/* Appointment button */
.appointment-btn {
    background: rgba(34,211,238,0.15);
    color: var(--accent);
    border: 1px solid rgba(34,211,238,0.3);
    width: 100%;
    padding: 0.6rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: block;
    text-align: center;
    font-size: 0.85rem;
}
.appointment-btn:hover {
    background: rgba(34,211,238,0.25);
}

/* Checkout confirmation modal */
.checkout-confirm-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 10001;
    display: flex; align-items: center; justify-content: center;
}
.checkout-confirm-box {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
    padding: 2rem; max-width: 420px; width: 90%; text-align: center;
}
.checkout-confirm-box h3 { margin-bottom: 1rem; }
.checkout-breakdown {
    text-align: left; background: var(--bg-elevated); border-radius: 8px;
    padding: 1rem; margin: 1rem 0; font-size: 0.85rem;
}
.checkout-breakdown .fee-row {
    display: flex; justify-content: space-between; padding: 0.3rem 0;
}
.checkout-breakdown .fee-row.total {
    border-top: 1px solid var(--border); margin-top: 0.5rem;
    padding-top: 0.5rem; font-weight: 700; font-size: 0.95rem;
}
.checkout-breakdown .recurring-note {
    color: var(--text-muted); font-size: 0.75rem; margin-top: 0.5rem;
    padding-top: 0.5rem; border-top: 1px dashed var(--border);
}

/* ============================================
 * CANCEL SUBSCRIPTION MODAL
 * ============================================ */
.cancel-warning-icon {
    width: 56px; height: 56px; border-radius: 50%;
    background: rgba(239,68,68,0.15); display: flex; align-items: center;
    justify-content: center; margin: 0 auto 1rem;
}
.cancel-warning-icon svg { color: #ef4444; }
.cancel-info-box {
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: 10px; padding: 1rem; margin: 1rem 0; font-size: 0.85rem;
}
.cancel-info-row {
    display: flex; justify-content: space-between; padding: 0.3rem 0;
}
.cancel-info-row.deposit {
    color: #ef4444; font-weight: 600;
}
.cancel-verify-section {
    background: rgba(239,68,68,0.06); border: 1px solid rgba(239,68,68,0.2);
    border-radius: 10px; padding: 1rem; margin: 1rem 0; text-align: center;
}
.cancel-verify-code {
    font-size: 2rem; font-weight: 800; letter-spacing: 0.5rem;
    color: #ef4444; font-family: monospace; margin: 0.5rem 0;
}
.cancel-verify-input {
    width: 160px; text-align: center; font-size: 1.5rem; font-weight: 700;
    letter-spacing: 0.4rem; font-family: monospace; padding: 0.5rem;
    background: var(--bg-elevated); border: 2px solid var(--border);
    border-radius: 8px; color: var(--text); outline: none; margin-top: 0.5rem;
}
.cancel-verify-input:focus { border-color: #ef4444; }
.cancel-verify-input.matched { border-color: var(--success); }
.cancel-feedback-textarea {
    width: 100%; min-height: 70px; resize: vertical; padding: 0.75rem;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: 8px; color: var(--text); font-family: inherit;
    font-size: 0.85rem; outline: none;
}
.cancel-feedback-textarea:focus { border-color: var(--primary); }

/* Plan card disabled state */
.modal-plan-card.plan-disabled {
    opacity: 0.5; pointer-events: none; position: relative;
}
.modal-plan-card.plan-disabled::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    background: rgba(0,0,0,0.1);
}
.plan-disabled-badge {
    font-size: 0.7rem; color: var(--text-muted); background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: 6px; padding: 0.2rem 0.5rem;
    display: inline-block; margin-bottom: 0.5rem;
}

/* ============================================
 * PAUSE MODAL STYLES
 * ============================================ */
.pause-form-group {
    margin-bottom: 1rem;
}
.pause-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.35rem;
}
.pause-form-group input,
.pause-form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
}
.pause-form-group textarea { min-height: 80px; resize: vertical; }
.pause-duration-display {
    text-align: center;
    padding: 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
}
.pause-evidence-preview {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 8px;
    margin-top: 0.5rem;
    display: none;
}
.pause-evidence-drop {
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
}
.pause-evidence-drop:hover { border-color: var(--primary); }
.pause-evidence-drop svg { color: var(--text-muted); margin-bottom: 0.5rem; }
.pause-evidence-drop p { color: var(--text-muted); font-size: 0.85rem; }

/* ============================================
 * PROMO PRICING STYLES
 * ============================================ */
.price-original { text-decoration: line-through; color: var(--text-muted); font-size: 0.9em; margin-right: 0.25rem; }
.price-discounted { color: #10B981; font-weight: 700; }
.promo-badge { display: inline-block; background: linear-gradient(135deg, #F59E0B, #EF4444); color: white; padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.7rem; font-weight: 600; margin-bottom: 0.5rem; }
.countdown-timer { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); border-radius: 8px; padding: 0.4rem 0.75rem; text-align: center; font-size: 0.75rem; color: #EF4444; margin-top: 0.5rem; }

/* ============================================
 * CURRENT PLAN VIEW
 * ============================================ */
.current-plan-view {
    text-align: center;
    padding: 1rem 0;
}

.current-plan-view .plan-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(34, 211, 238, 0.15));
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 1rem;
}

.current-plan-view .plan-badge .plan-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.current-plan-view .plan-badge .plan-price {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.current-plan-view .plan-badge .plan-price span {
    font-size: 0.875rem;
    font-weight: 500;
}

.current-plan-view .plan-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.current-plan-view .plan-detail-row:last-child {
    border-bottom: none;
}

.current-plan-view .plan-detail-label {
    color: var(--text-muted);
}

.current-plan-view .plan-detail-value {
    font-weight: 600;
}

.current-plan-view .plan-note {
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: var(--accent);
}

/* ============================================
 * TOGGLE SWITCH
 * ============================================ */
.toggle-track {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease;
    flex-shrink: 0;
}

.toggle-track.active {
    background: var(--primary);
    border-color: var(--primary);
}

.toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.toggle-track.active .toggle-knob {
    transform: translateX(20px);
}

/* ============================================
 * TOAST
 * ============================================ */
.toast {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    background: var(--bg-elevated);
    color: var(--text);
    padding: 0.875rem 1.25rem;
    border-radius: 14px;
    font-size: 0.85rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    z-index: 9999;
    max-width: 340px;
    line-height: 1.5;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border);
}

.toast.show {
    transform: translateX(0);
}

.toast.toast-success {
    border-color: rgba(16, 185, 129, 0.3);
}

.toast.toast-error {
    border-color: rgba(239, 68, 68, 0.3);
}

/* ============================================
 * LOADING SKELETON
 * ============================================ */
.skeleton {
    background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--surface3) 50%, var(--bg-elevated) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
 * SETTINGS CARD STYLES
 * ============================================ */
.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
}

.settings-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    border-radius: 20px 20px 0 0;
}

.settings-card.danger::before {
    background: var(--danger);
}

.settings-card.danger {
    border-color: rgba(239, 68, 68, 0.12);
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.03) 0%, var(--bg-card) 40%);
}

.settings-card .card-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.settings-card .card-label.danger-label {
    color: var(--danger);
}

/* ============================================
 * PROFILE FIELDS (Settings)
 * ============================================ */
.profile-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}

.profile-avatar::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--gradient);
    z-index: 0;
}

.profile-avatar img,
.profile-avatar .avatar-initials {
    position: relative;
    z-index: 1;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    color: var(--primary-light);
    font-weight: 700;
    font-size: 1.5rem;
}

.profile-header-info {
    flex: 1;
    min-width: 0;
}

.profile-header-name {
    font-size: 1.25rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-header-id {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
}

.profile-header-edit {
    background: var(--bg-elevated);
    color: var(--text2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}

.profile-header-edit:hover {
    border-color: var(--primary);
    color: var(--primary-light);
}

.profile-fields {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.profile-field {
    display: flex;
    align-items: center;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border);
}

.profile-field:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-field:first-child {
    padding-top: 0;
}

.field-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 1rem;
}

.field-icon svg {
    width: 18px;
    height: 18px;
}

.field-icon.fi-name { background: rgba(99, 102, 241, 0.1); color: var(--primary-light); }
.field-icon.fi-email { background: rgba(34, 211, 238, 0.1); color: var(--accent); }
.field-icon.fi-phone { background: rgba(244, 114, 182, 0.1); color: var(--accent-pink); }

.field-content {
    flex: 1;
    min-width: 0;
}

.field-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.125rem;
}

.field-value {
    font-size: 0.95rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.field-value.empty {
    color: var(--text-muted);
    font-style: italic;
}

.field-lock {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-top: 0.2rem;
}

.field-lock svg {
    width: 12px;
    height: 12px;
}

/* ============================================
 * EDIT MODE
 * ============================================ */
.profile-edit-area {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.profile-edit-area.open {
    max-height: 400px;
    opacity: 1;
}

.edit-fields {
    padding-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.edit-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text2);
    margin-bottom: 0.4rem;
}

.edit-field input {
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
    outline: none;
}

.edit-field input:focus {
    border-color: var(--primary);
}

.edit-field input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.edit-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.edit-msg {
    padding: 0.65rem 0.875rem;
    border-radius: 10px;
    font-size: 0.85rem;
    display: none;
    margin-bottom: 0.75rem;
}

.edit-msg.success {
    display: block;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--success);
}

.edit-msg.error {
    display: block;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: var(--danger);
}

/* ============================================
 * SECURITY SECTION
 * ============================================ */
.security-row {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.security-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.security-row:first-child {
    padding-top: 0;
}

.security-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 1rem;
}

.security-icon svg {
    width: 18px;
    height: 18px;
}

.security-icon.si-password { background: rgba(99, 102, 241, 0.1); color: var(--primary-light); }
.security-icon.si-2fa { background: rgba(34, 211, 238, 0.1); color: var(--accent); }

.security-info {
    flex: 1;
    min-width: 0;
}

.security-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.security-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.security-action {
    flex-shrink: 0;
    margin-left: 0.75rem;
}

.btn-change {
    background: var(--bg-elevated);
    color: var(--text2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-change:hover {
    border-color: var(--primary);
    color: var(--primary-light);
}

/* Password Expand */
.password-expand {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.password-expand.open {
    max-height: 350px;
    opacity: 1;
}

.password-form {
    padding-top: 1rem;
    padding-bottom: 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.pw-field {
    position: relative;
}

.pw-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text2);
    margin-bottom: 0.4rem;
}

.pw-field input {
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 3rem 0.75rem 1rem;
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
    outline: none;
}

.pw-field input:focus {
    border-color: var(--primary);
}

.pw-toggle {
    position: absolute;
    right: 0.75rem;
    bottom: 0.6rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.pw-toggle:hover {
    color: var(--text);
}

.pw-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ============================================
 * PREFERENCES
 * ============================================ */
.pref-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pref-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(244, 114, 182, 0.1);
    color: var(--accent-pink);
}

.pref-icon svg {
    width: 18px;
    height: 18px;
}

.pref-info {
    flex: 1;
    min-width: 0;
}

.pref-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.pref-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

/* ============================================
 * DANGER ZONE
 * ============================================ */
.danger-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.deletion-pending {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    color: var(--text2);
    line-height: 1.6;
}

.deletion-pending strong {
    color: var(--danger);
}

/* ============================================
 * FOOTER STYLES
 * ============================================ */
.dashboard-footer {
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ============================================
 * RESPONSIVE — SHARED
 * ============================================ */
@media (max-width: 768px) {
    .modal {
        margin: 1rem;
        width: calc(100% - 2rem);
        max-width: none;
    }
    .modal-header, .modal-body, .modal-footer {
        padding: 1rem;
    }
    .plans-modal-grid {
        grid-template-columns: 1fr;
    }
    .footer-links {
        gap: 1rem;
    }
    .footer-links a {
        padding: 0.5rem 0;
    }
    .security-row {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .security-action {
        margin-left: auto;
    }
    .dash-card {
        padding: 0.85rem 1rem;
    }
    .profile-top-row {
        gap: 0.75rem;
    }
    .profile-photo-lg {
        width: 100px;
        height: 100px;
        border-radius: 16px;
    }
    .profile-photo-lg::before {
        border-radius: 18px;
    }
    .photo-cam-btn {
        width: 28px;
        height: 28px;
        top: -3px;
        right: -3px;
    }
    .photo-cam-btn svg {
        width: 14px;
        height: 14px;
    }
    .settings-card {
        padding: 1.25rem;
        border-radius: 16px;
    }
    .profile-photo-col {
        width: 120px;
        gap: 0.4rem;
    }
    .profile-photo-lg {
        width: 120px;
        height: 120px;
    }
    .dash-profile-inner {
        gap: 1rem;
    }
    .photo-hint {
        display: none;
    }
    .photo-btn {
        padding: 0.35rem 0.75rem;
        font-size: 0.8rem;
    }
    .profile-avatar,
    .profile-avatar img,
    .profile-avatar .avatar-initials {
        width: 64px;
        height: 64px;
    }
    .avatar-initials {
        font-size: 1.2rem;
    }
    .profile-header-name {
        font-size: 1.1rem;
    }
    .profile-header {
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    .profile-top-row {
        gap: 0.7rem;
    }
    .profile-photo-lg {
        width: 90px;
        height: 90px;
    }
    .photo-cam-btn {
        width: 26px;
        height: 26px;
    }
    .photo-cam-btn svg {
        width: 13px;
        height: 13px;
    }
    .profile-name {
        font-size: 1.05rem;
    }
    .profile-sub {
        justify-content: center;
    }
    .profile-stats-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    .profile-stat-item {
        padding: 0.5rem;
    }
    .outlets-row {
        justify-content: center;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.35rem;
    }
    .plan-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    .plan-actions-row {
        flex-direction: column;
    }
    .pbtn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .profile-header {
        flex-wrap: wrap;
    }
    .profile-header-edit {
        width: 100%;
        text-align: center;
        margin-top: 0.25rem;
    }
    .edit-actions,
    .pw-actions {
        flex-direction: column;
    }
    .edit-actions .btn,
    .pw-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
