/* ==================== RESET & BASE ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #4682DC;
    --primary-light: #e8f0fc;
    --purple: #A885FF;
    --purple-light: #EEE8FF;
    --green: #22C55E;
    --green-light: #e8faf0;
    --yellow: #FACC15;
    --yellow-light: #fef9e7;
    --orange: #FFB42D;
    --red: #EF4444;
    --red-light: #fdeaea;
    --dark: #1E1E32;
    --text: #323246;
    --text-secondary: #64648C;
    --text-muted: #9696AA;
    --border: #DCDCEB;
    --border-light: #EBEBF5;
    --bg: #F5F5FA;
    --white: #FFFFFF;
    --card-shadow: 0 2px 12px rgba(30, 30, 50, 0.06);
    --tab-height: 70px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    color: var(--text);
    background: var(--bg);
    height: 100%;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); cursor: pointer; text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

input, textarea, select {
    font-family: inherit;
    font-size: 15px;
    outline: none;
}

h1 { font-size: 1.65rem; font-weight: 800; color: var(--dark); }
h2 { font-size: 1.35rem; font-weight: 700; color: var(--dark); }
h3 { font-size: 1.1rem; font-weight: 700; color: var(--dark); }
h4 { font-size: 0.95rem; font-weight: 600; color: var(--text); }
p { color: var(--text-secondary); line-height: 1.5; }

.hidden { display: none !important; }

/* ==================== SCREENS ==================== */
.screen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    display: none;
    flex-direction: column;
    background: var(--bg);
    z-index: 1;
}
.screen.active { display: flex; }

#app-shell {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    display: none;
    flex-direction: column;
}
#app-shell.active { display: flex; }

/* ==================== WELCOME SCREEN ==================== */
.welcome-bg {
    flex: 1;
    background: linear-gradient(135deg, #192344 0%, #1a2a5e 50%, #2a3a6e 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}
.welcome-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 30%, rgba(70, 130, 220, 0.2) 0%, transparent 70%);
}
.welcome-content {
    position: relative;
    text-align: center;
    padding: 40px 24px;
    max-width: 440px;
    width: 100%;
}
.welcome-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 40px;
}
.welcome-title { color: #fff; font-size: 1.6rem; margin-bottom: 4px; }
.welcome-subtitle { color: var(--purple); font-weight: 600; font-size: 0.9rem; margin-bottom: 12px; }
.welcome-tagline { color: rgba(255,255,255,0.7); font-size: 0.85rem; margin-bottom: 20px; max-width: 320px; margin-left: auto; margin-right: auto; }
.welcome-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 24px;
}
.welcome-feature {
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px 8px;
    color: rgba(255,255,255,0.85);
    font-size: 0.78rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}
.welcome-content .btn { width: 100%; margin-bottom: 10px; }

.switch-app-link {
    display: inline-block;
    margin-top: 16px;
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}
.switch-app-link:hover {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
}

.switch-app-link-inline {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}
.switch-app-link-inline:hover {
    text-decoration: underline;
}

/* Small phones */
@media (max-height: 600px) {
    .welcome-content { padding: 20px 16px; }
    .welcome-logo { width: 60px; height: 60px; font-size: 32px; margin-bottom: 10px; border-radius: 16px; }
    .welcome-title { font-size: 1.3rem; }
    .welcome-subtitle { font-size: 0.8rem; margin-bottom: 8px; }
    .welcome-tagline { font-size: 0.78rem; margin-bottom: 14px; }
    .welcome-features { gap: 6px; margin-bottom: 16px; }
    .welcome-feature { padding: 8px 6px; font-size: 0.72rem; }
    .welcome-content .btn { margin-bottom: 8px; padding: 12px; font-size: 0.85rem; }
}

/* Tablets & medium screens */
@media (min-width: 600px) and (min-height: 700px) {
    .welcome-logo { width: 100px; height: 100px; font-size: 48px; border-radius: 24px; margin-bottom: 20px; }
    .welcome-title { font-size: 2rem; }
    .welcome-subtitle { font-size: 1rem; margin-bottom: 16px; }
    .welcome-tagline { font-size: 0.9rem; margin-bottom: 28px; }
    .welcome-features { gap: 10px; margin-bottom: 32px; }
    .welcome-feature { padding: 12px; font-size: 0.82rem; }
}

/* Large desktop — welcome & auth screens expand */
@media (min-width: 900px) {
    #screen-welcome,
    #screen-login,
    #screen-signup,
    #screen-forgot-password,
    #screen-reset-sent,
    #screen-pending {
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
        width: 100%;
    }
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    border-radius: 14px;
    padding: 12px 24px;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.btn-lg { padding: 16px 32px; font-size: 1rem; border-radius: 16px; }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; border-radius: 10px; }
.btn-full { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #3a72c8; }
.btn-primary:disabled { background: #a8c4e8; }
.btn-outline { background: transparent; border: 2px solid rgba(255,255,255,0.4); color: #fff; }
.btn-outline:hover { border-color: #fff; }
.btn-outline-blue { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline-blue:hover { background: var(--primary-light); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #1ea94e; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #d93636; }
.btn-social {
    flex: 1;
    background: var(--white);
    border: 2px solid var(--border);
    color: var(--text);
    padding: 12px;
    border-radius: 14px;
    font-weight: 600;
}
.btn-social:hover { border-color: var(--primary); }
.btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    position: relative;
}
.btn-icon:hover { background: rgba(0,0,0,0.05); }
.btn-back {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    position: absolute;
    left: 0;
    top: 0;
}
.btn-back:hover { background: rgba(0,0,0,0.05); }

/* ==================== BADGES ==================== */
.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--red);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
.tab-badge {
    position: absolute;
    top: 4px;
    right: 50%;
    transform: translateX(16px);
    background: var(--red);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* ==================== AUTH SCREENS ==================== */
.auth-screen {
    flex: 1;
    padding: 24px;
    padding-top: calc(16px + var(--safe-top));
    overflow-y: auto;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}
.auth-screen.centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.auth-header {
    position: relative;
    padding-top: 48px;
    margin-bottom: 32px;
}
.auth-header h1 { margin-bottom: 8px; }
.auth-icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.auth-icon-circle .material-icons-round { font-size: 36px; color: var(--primary); }
.success-icon-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--green-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}
.success-icon-circle .material-icons-round { font-size: 48px; color: var(--green); }
.success-text { margin-bottom: 32px; max-width: 300px; }

/* Pending approval */
.pending-icon-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 180, 45, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    animation: pendingPulse 2s ease-in-out infinite;
}
.pending-icon-circle .material-icons-round { font-size: 48px; color: #FFB42D; }

@keyframes pendingPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.85; }
}

.pending-text {
    margin-bottom: 24px;
    max-width: 320px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.pending-info {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 32px;
    width: 100%;
    max-width: 340px;
    text-align: left;
}

.pending-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.pending-info-item:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.pending-info-item .material-icons-round {
    font-size: 20px;
    color: var(--primary);
    flex-shrink: 0;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* ==================== FORMS ==================== */
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.form-group input, .form-group textarea, .form-group select {
    padding: 14px 16px;
    border: 2px solid var(--border-light);
    border-radius: 14px;
    background: var(--white);
    color: var(--text);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--primary);
    background: var(--white);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.input-password { position: relative; display: flex; }
.input-password input { flex: 1; padding-right: 48px; }
.btn-eye {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    padding: 4px;
}
.forgot-link { font-size: 0.85rem; text-align: right; margin-top: -8px; }
.auth-error { color: var(--red); font-size: 0.82rem; min-height: 0; transition: all 0.2s; }
.auth-divider {
    text-align: center;
    position: relative;
    margin: 8px 0;
}
.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}
.auth-divider span {
    background: var(--bg);
    padding: 0 16px;
    position: relative;
    color: var(--text-muted);
    font-size: 0.82rem;
}
.social-login { display: flex; gap: 12px; }
.auth-footer { text-align: center; font-size: 0.85rem; color: var(--text-secondary); }
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 1px;
    accent-color: var(--primary);
    flex-shrink: 0;
}
.consent-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}
.checkbox-label a {
    color: var(--primary);
    text-decoration: underline;
}

/* ==================== TAB BAR ==================== */
.tab-bar {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    background: var(--white);
    border-top: 1px solid var(--border-light);
    padding: 8px 4px;
    padding-bottom: calc(8px + var(--safe-bottom));
    height: calc(var(--tab-height) + var(--safe-bottom));
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}
.tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    position: relative;
    transition: color 0.2s;
    min-width: 56px;
}
.tab-btn .material-icons-round { font-size: 24px; }
.tab-btn.active { color: var(--primary); }
.tab-btn.active .tab-label { font-weight: 700; }
.tab-center { margin-top: -20px; }
.tab-center-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(70, 130, 220, 0.35);
}
.tab-center-icon .material-icons-round { color: #fff; font-size: 26px; }
.tab-label { font-size: 0.65rem; }

/* ==================== TAB CONTENT ==================== */
.tab-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}
.tab-panel {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: none;
    flex-direction: column;
}
.tab-panel.active { display: flex; }
.screen-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 20px;
    padding-top: calc(16px + var(--safe-top));
}
.bottom-spacer { height: 24px; }
.screen-header { margin-bottom: 20px; }
.screen-header h1 { margin-bottom: 4px; }
.screen-subtitle { font-size: 0.9rem; }

/* ==================== DASHBOARD ==================== */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.dashboard-greeting h1 { font-size: 1.1rem; color: var(--text-secondary); font-weight: 500; }
.dashboard-greeting h2 { font-size: 1.5rem; }
.dashboard-header-actions { display: flex; align-items: center; gap: 8px; }

/* Avatars */
.avatar {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    background: var(--purple);
    cursor: pointer;
    flex-shrink: 0;
}
.avatar-sm { width: 40px; height: 40px; font-size: 0.85rem; }
.avatar-md { width: 52px; height: 52px; font-size: 1.1rem; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.5rem; }

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.stat-card {
    background: var(--white);
    border-radius: 16px;
    padding: 16px 12px;
    text-align: center;
    box-shadow: var(--card-shadow);
    border-bottom: 3px solid transparent;
}
.stat-blue { border-bottom-color: var(--primary); }
.stat-green { border-bottom-color: var(--green); }
.stat-yellow { border-bottom-color: var(--yellow); }
.stat-icon { font-size: 22px; margin-bottom: 6px; display: block; }
.stat-blue .stat-icon { color: var(--primary); }
.stat-green .stat-icon { color: var(--green); }
.stat-yellow .stat-icon { color: var(--yellow); }
.stat-value { font-size: 1.35rem; font-weight: 800; color: var(--dark); }
.stat-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; margin-top: 2px; }

.action-btns-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.action-btns-row .btn { flex: 1; }

/* ==================== CARDS ==================== */
.card {
    background: var(--white);
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--card-shadow);
    margin-bottom: 16px;
    cursor: pointer;
    transition: transform 0.15s;
}
.card:active { transform: scale(0.98); }
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.card-arrow { color: var(--text-muted); }

/* Reservation Counters */
.reservation-counters { display: flex; gap: 16px; }
.res-counter { display: flex; flex-direction: column; align-items: center; flex: 1; }
.res-count {
    font-size: 1.5rem;
    font-weight: 800;
    border-radius: 12px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}
.res-count.yellow { background: var(--yellow-light); color: #b8960f; }
.res-count.green { background: var(--green-light); color: #16833d; }
.res-count.gray { background: var(--bg); color: var(--text-secondary); }
.res-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }

/* Section Title */
.section-title { margin-bottom: 12px; margin-top: 4px; }
.section-title h3 { font-size: 1.05rem; }

/* Next Session Card */
.next-session-card { cursor: default; }
.next-session-info { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.next-session-details h4 { margin-bottom: 6px; }
.next-session-details p {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 3px;
}
.next-session-details .material-icons-round { font-size: 16px; color: var(--text-muted); }

/* Status Badge */
.status-badge {
    display: inline-flex;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.status-confirmed { background: var(--green-light); color: #16833d; }
.status-pending { background: var(--yellow-light); color: #b8960f; }
.status-completed { background: var(--bg); color: var(--text-secondary); }
.status-cancelled { background: var(--red-light); color: var(--red); }

/* Empty Card */
.empty-card {
    text-align: center;
    padding: 32px;
    cursor: default;
    color: var(--text-muted);
}
.empty-card:active { transform: none; }
.empty-icon { font-size: 48px; color: var(--border); display: block; margin-bottom: 8px; }

/* ===== Pending Alert (dashboard) ===== */
.pending-alert {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #FFF4D1 0%, #FFE08A 100%);
    border: 1.5px solid #F2B705;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(242, 183, 5, 0.18);
    animation: pending-pulse 2.2s ease-in-out infinite;
    transition: transform 0.15s ease;
}
.pending-alert:active { transform: scale(0.98); }
.pending-alert-icon {
    font-size: 32px;
    flex-shrink: 0;
    line-height: 1;
}
.pending-alert-body { flex: 1; min-width: 0; }
.pending-alert-body h3 {
    margin: 0 0 2px 0;
    font-size: 1rem;
    font-weight: 700;
    color: #6B4A00;
}
.pending-alert-body p {
    margin: 0;
    font-size: 0.82rem;
    color: #8A6A1A;
}
.pending-alert-arrow { color: #6B4A00; font-size: 28px; flex-shrink: 0; }
@keyframes pending-pulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(242, 183, 5, 0.18); }
    50% { box-shadow: 0 6px 22px rgba(242, 183, 5, 0.42); }
}

/* ===== Today's Sessions list ===== */
.section-title { display: flex; align-items: center; justify-content: space-between; }
.section-count {
    font-size: 0.82rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 2px 10px;
    border-radius: 12px;
}
#today-sessions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}
.today-session-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.today-session-card:active { transform: scale(0.99); }
.today-session-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.today-session-time {
    flex-shrink: 0;
    text-align: center;
    min-width: 54px;
    padding: 8px 6px;
    border-radius: 10px;
    background: var(--bg-secondary);
}
.today-session-time .hour {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
}
.today-session-time .end {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.today-session-body { flex: 1; min-width: 0; }
.today-session-body h4 {
    margin: 0 0 3px 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.today-session-body p {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}
.today-session-body p .material-icons-round { font-size: 14px; }
.today-session-card.pending { border-left: 3px solid #F2B705; }
.today-session-card.confirmed { border-left: 3px solid #50B450; }
.today-session-card.in_progress { border-left: 3px solid #4682DC; }

/* ===== Inline pending info banner (reservation detail) ===== */
.pending-banner-inline {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #FFF8E1;
    border: 1px solid #F2B705;
    border-radius: 12px;
    padding: 12px 14px;
    margin: 16px 0 12px 0;
}
.pending-banner-inline .material-icons-round { color: #B38600; flex-shrink: 0; margin-top: 1px; }
.pending-banner-inline strong { display: block; color: #6B4A00; font-size: 0.92rem; }
.pending-banner-inline p { margin: 4px 0 0 0; color: #8A6A1A; font-size: 0.82rem; line-height: 1.4; }

/* ===== Generic in-app modal (replaces native confirm/prompt) ===== */
.app-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: app-modal-in 0.18s ease;
}
.app-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
}
.app-modal-card {
    position: relative;
    background: var(--white);
    border-radius: 18px;
    padding: 22px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.app-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.app-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}
.app-modal-body {
    margin: 0 0 14px 0;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
}
.app-modal-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 6px 0 6px 0;
}
.app-modal-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    box-sizing: border-box;
    background: var(--bg-secondary);
    color: var(--text-primary);
}
.app-modal-textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
}
.app-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.app-modal-actions .btn { flex: 1; }
.btn-outline-gray {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline-gray:hover { background: var(--bg-secondary); }
@keyframes app-modal-in {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* Activity List */
.activity-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 16px; }
.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}
.activity-item:last-child { border: none; }
.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.activity-icon .material-icons-round { font-size: 20px; color: #fff; }
.bg-blue { background: var(--primary); }
.bg-purple { background: var(--purple); }
.bg-green { background: var(--green); }
.bg-yellow { background: var(--orange); }
.activity-info { flex: 1; min-width: 0; }
.activity-info h4 { font-size: 0.85rem; margin-bottom: 2px; }
.activity-info p { font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-time { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }

/* ==================== PLANNING ==================== */
.view-selector {
    display: flex;
    background: var(--white);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
    box-shadow: var(--card-shadow);
}
.view-btn {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
}
.view-btn.active { background: var(--primary); color: #fff; }

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.calendar-title { font-weight: 700; font-size: 1.05rem; }

.calendar-grid {
    background: var(--white);
    border-radius: 18px;
    padding: 16px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
}
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 8px;
}
.calendar-weekdays span { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); }
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    position: relative;
}
.cal-day:hover { background: var(--primary-light); }
.cal-day.other-month { color: var(--text-muted); opacity: 0.4; }
.cal-day.today { background: var(--primary); color: #fff; font-weight: 700; }
.cal-day.has-session::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary);
}
.cal-day.today.has-session::after { background: #fff; }

/* Session Cards */
.sessions-list { display: flex; flex-direction: column; gap: 10px; }
.session-card {
    background: var(--white);
    border-radius: 14px;
    padding: 14px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid var(--primary);
    cursor: pointer;
}
.session-card:active { transform: scale(0.98); }
.session-card .session-time {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 50px;
}
.session-card .session-info { flex: 1; }
.session-card .session-info h4 { font-size: 0.88rem; }
.session-card .session-info p { font-size: 0.78rem; }

/* Calendar: Off days & selected */
.cal-day.day-off {
    background: repeating-linear-gradient(
        45deg, transparent, transparent 3px, rgba(200,200,210,0.3) 3px, rgba(200,200,210,0.3) 5px
    );
    color: var(--text-muted);
    opacity: 0.55;
}
.cal-day.day-off.has-session { opacity: 0.8; }
.cal-day.selected:not(.today) {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

/* ===== WEEK VIEW ===== */
.week-view {
    background: var(--white);
    border-radius: 18px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
    overflow: hidden;
}
.week-header {
    display: grid;
    grid-template-columns: 48px repeat(7, 1fr);
    border-bottom: 1px solid var(--border-light);
}
.week-hour-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 500;
    padding: 4px;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: center;
}
.week-day-header {
    text-align: center;
    padding: 10px 2px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.4;
}
.week-day-header span { font-size: 1rem; font-weight: 800; color: var(--dark); }
.week-day-header.today { color: var(--primary); }
.week-day-header.today span { color: var(--primary); }
.week-day-header.day-off { background: rgba(200,200,210,0.12); }
.week-day-header.day-off span { color: var(--text-muted); }
.week-body {
    max-height: 320px;
    overflow-y: auto;
}
.week-row {
    display: grid;
    grid-template-columns: 48px repeat(7, 1fr);
    min-height: 36px;
    border-bottom: 1px solid var(--border-light);
}
.week-row:last-child { border: none; }
.week-cell {
    border-left: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    min-height: 36px;
}
.week-cell:hover { background: var(--primary-light); }
.week-cell.day-off { background: rgba(200,200,210,0.08); }
.week-cell.has-session { background: rgba(70,130,220,0.08); }
.week-session-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* ===== DAY VIEW ===== */
.day-view {
    margin-bottom: 20px;
}
.day-off-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--yellow-light);
    color: #b8960f;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}
.day-off-banner .material-icons-round { font-size: 20px; }
.day-timeline {
    background: var(--white);
    border-radius: 18px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}
.day-slot {
    display: flex;
    gap: 12px;
    padding: 0;
    min-height: 52px;
    border-bottom: 1px solid var(--border-light);
}
.day-slot:last-child { border: none; }
.day-slot.day-off { background: rgba(200,200,210,0.06); }
.day-slot-hour {
    width: 52px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--border-light);
    flex-shrink: 0;
}
.day-slot-content {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 6px 8px;
}
.day-slot-session {
    flex: 1;
    background: var(--primary-light);
    border-radius: 10px;
    padding: 8px 12px;
    border-left: 4px solid var(--primary);
    cursor: pointer;
    transition: transform 0.15s;
}
.day-slot-session:active { transform: scale(0.98); }
.day-slot-session strong { font-size: 0.85rem; display: block; color: var(--dark); margin-bottom: 2px; }
.day-slot-session span { font-size: 0.75rem; color: var(--text-secondary); }

/* ===== DAY DETAIL (when clicking a day) ===== */
.day-detail-card {
    cursor: pointer;
    margin-bottom: 12px;
}
.day-detail-card:active { transform: scale(0.98); }
.day-detail-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.day-detail-info-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
}
.day-detail-info-item .material-icons-round {
    font-size: 18px;
    color: var(--text-muted);
    margin-top: 1px;
}
.day-detail-info-item label {
    font-size: 0.68rem;
    color: var(--text-muted);
    display: block;
}
.day-detail-info-item span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

@media (max-width: 400px) {
    .day-detail-info-grid { grid-template-columns: 1fr; }
}

/* ==================== MANAGEMENT CARDS ==================== */
.management-cards { display: flex; flex-direction: column; gap: 12px; }
.mgmt-card {
    background: var(--white);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: transform 0.15s;
}
.mgmt-card:active { transform: scale(0.98); }
.mgmt-icon { font-size: 2rem; }
.mgmt-info { flex: 1; }
.mgmt-info h3 { margin-bottom: 4px; }
.mgmt-info p { font-size: 0.82rem; }
.mgmt-card > .material-icons-round { color: var(--text-muted); }

/* ==================== MESSAGES / CHAT ==================== */
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    border: 2px solid var(--border-light);
    border-radius: 14px;
    padding: 10px 16px;
    margin-bottom: 16px;
}
.search-bar .material-icons-round { color: var(--text-muted); font-size: 22px; }
.search-bar input { border: none; flex: 1; background: transparent; font-size: 0.9rem; }

.conversations-list { display: flex; flex-direction: column; }
.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
}
.conversation-item:hover { background: var(--bg); margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.conversation-item .avatar { background: var(--primary); }
.conversation-content { flex: 1; min-width: 0; }
.conversation-name { font-weight: 600; font-size: 0.92rem; margin-bottom: 2px; }
.conversation-preview { font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversation-meta { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.conversation-time { font-size: 0.72rem; color: var(--text-muted); }
.unread-badge {
    background: var(--primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* Chat View (detail screen) */
.chat-view { display: flex; flex-direction: column; height: 100%; }
.chat-header-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    background: var(--white);
}
.chat-header-info { flex: 1; }
.chat-header-info h4 { font-size: 0.95rem; }
.chat-header-info p { font-size: 0.75rem; }
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.message-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.45;
    position: relative;
}
.message-sent {
    background: var(--primary);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 6px;
}
.message-received {
    background: var(--white);
    color: var(--text);
    align-self: flex-start;
    border-bottom-left-radius: 6px;
    box-shadow: var(--card-shadow);
}
.message-time {
    font-size: 0.65rem;
    margin-top: 4px;
    opacity: 0.7;
}
.message-sent .message-time { text-align: right; }
.chat-input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-light);
    background: var(--white);
    padding-bottom: calc(12px + var(--safe-bottom));
}
.chat-input-bar input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: 24px;
    font-size: 0.9rem;
    background: var(--bg);
}
.chat-input-bar input:focus { border-color: var(--primary); background: var(--white); }
.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.chat-send-btn .material-icons-round { color: #fff; font-size: 22px; }

/* Quick Replies */
.quick-replies {
    display: flex;
    gap: 8px;
    padding: 8px 16px;
    overflow-x: auto;
    border-top: 1px solid var(--border-light);
}
.quick-reply {
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
.quick-reply:hover { background: var(--primary); color: #fff; }

/* ==================== PROFILE ==================== */
.profile-banner {
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, #3a5fc8 0%, #4682DC 50%, #5a92e8 100%);
    background-size: cover;
    background-position: center;
    border-radius: 0 0 16px 16px;
    margin-bottom: -50px;
    position: relative;
}
.profile-banner .profile-top-actions {
    position: absolute;
    top: 12px;
    right: 12px;
}
.profile-header-section {
    text-align: center;
    padding: 20px 0;
    position: relative;
}
.profile-avatar-big img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-top-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}
.profile-top-actions .btn-icon {
    background: rgba(0,0,0,0.45);
    color: #fff;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.profile-avatar-big {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    overflow: hidden;
    position: relative;
    z-index: 1;
}
.profile-specialty { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 8px; }
.profile-rating { display: flex; align-items: center; justify-content: center; gap: 6px; }
.stars { color: var(--yellow); font-size: 1rem; }
.rating-count { font-size: 0.82rem; color: var(--text-muted); }

.profile-stats-banner {
    display: flex;
    background: var(--white);
    border-radius: 18px;
    padding: 16px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
}
.profile-stat { flex: 1; text-align: center; }
.profile-stat-value { font-size: 1.05rem; font-weight: 800; color: var(--dark); display: block; }
.profile-stat-label { font-size: 0.68rem; color: var(--text-muted); font-weight: 500; }
.profile-stat-divider { width: 1px; background: var(--border-light); }

.section-block { margin-bottom: 24px; }
.section-block h3 { margin-bottom: 10px; }
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.section-link { font-size: 0.85rem; font-weight: 600; }
.bio-text { font-size: 0.9rem; margin-bottom: 10px; }
.language-tags { display: flex; gap: 8px; }
.tag {
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Pack Cards */
.packs-list { display: flex; flex-direction: column; gap: 10px; }
.pack-card {
    background: var(--white);
    border-radius: 14px;
    padding: 14px;
    box-shadow: var(--card-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--primary);
}
.pack-card.premium { border-left-color: var(--purple); }
.pack-card.discovery { border-left-color: var(--green); }
.pack-info h4 { margin-bottom: 4px; }
.pack-info p { font-size: 0.78rem; }
.pack-price { font-size: 1.2rem; font-weight: 800; color: var(--primary); }

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.portfolio-item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #ddd, #eee);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
}
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; }

/* Reviews */
.reviews-list { display: flex; flex-direction: column; gap: 10px; }
.review-card {
    background: var(--white);
    border-radius: 14px;
    padding: 14px;
    box-shadow: var(--card-shadow);
}
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.review-author { display: flex; align-items: center; gap: 10px; }
.review-author .avatar { width: 32px; height: 32px; font-size: 0.7rem; }
.review-stars { color: var(--yellow); font-size: 0.85rem; }
.review-text { font-size: 0.85rem; line-height: 1.45; }

.profile-actions { margin-top: 8px; }

/* ==================== DETAIL OVERLAY ==================== */
.detail-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 50;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    animation: slideIn 0.25s ease;
}
.detail-overlay.hidden { display: none; }
@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}
.detail-screen-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Detail Header */
.detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    padding-top: calc(12px + var(--safe-top));
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}
.detail-header h2 { flex: 1; font-size: 1.1rem; }
.detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* ==================== RESERVATIONS SCREEN ==================== */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.filter-tab {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--white);
    white-space: nowrap;
    border: 2px solid var(--border-light);
    transition: all 0.2s;
}
.filter-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.reservation-list { display: flex; flex-direction: column; gap: 10px; }
.reservation-card-item {
    background: var(--white);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--card-shadow);
    cursor: pointer;
}
.reservation-card-item:active { transform: scale(0.98); }
.reservation-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.reservation-client { display: flex; align-items: center; gap: 10px; }
.reservation-client .avatar { width: 36px; height: 36px; font-size: 0.75rem; }
.reservation-client h4 { font-size: 0.9rem; }
.reservation-details { display: flex; flex-wrap: wrap; gap: 12px; }
.reservation-detail-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}
.reservation-detail-item .material-icons-round { font-size: 16px; color: var(--text-muted); }

/* ==================== MANAGE PACKS SCREEN ==================== */
.pack-list-view { display: flex; flex-direction: column; gap: 12px; }
.pack-edit-card {
    background: var(--white);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--card-shadow);
}
.pack-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.pack-edit-actions { display: flex; gap: 8px; }
.pack-form { display: flex; flex-direction: column; gap: 14px; }
.pack-form textarea {
    width: 100%;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    resize: vertical;
    background: var(--white);
}
.pack-form textarea:focus { border-color: var(--primary); }

.emoji-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.emoji-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--white);
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}
.emoji-btn:hover { border-color: var(--primary); }
.emoji-btn.active {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: scale(1.1);
}
.form-inline { display: flex; gap: 12px; }
.form-inline .form-group { flex: 1; }

/* Cancellation Policy Selector */
.cancellation-policy-selector { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.policy-btn {
    display: flex; flex-direction: column; gap: 2px;
    padding: 12px 16px; border-radius: 10px;
    border: 2px solid var(--border); background: var(--card-bg);
    text-align: left; cursor: pointer; transition: all 0.2s;
}
.policy-btn strong { font-size: 0.9rem; color: var(--text-primary); }
.policy-btn span { font-size: 0.75rem; color: var(--text-secondary); }
.policy-btn:hover { border-color: var(--primary); }
.policy-btn.active {
    border-color: var(--primary); background: var(--primary-light);
}

/* Color Selector */
.color-selector { display: flex; gap: 8px; flex-wrap: wrap; }
.color-option {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.2s;
}
.color-option.selected { border-color: var(--dark); }

/* ==================== PORTFOLIO MANAGEMENT ==================== */
.portfolio-manage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.portfolio-manage-item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #ddd, #eee);
    display: flex;
    align-items: center;
    justify-content: center;
}
.portfolio-manage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.portfolio-add-btn {
    border: 2px dashed var(--border);
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.portfolio-add-btn .material-icons-round { font-size: 28px; }
.portfolio-delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.portfolio-delete-btn .material-icons-round { font-size: 16px; }
.tips-card {
    background: var(--primary-light);
    border-radius: 14px;
    padding: 16px;
    margin-top: 16px;
}
.tips-card h4 { color: var(--primary); margin-bottom: 8px; }
.tips-card ul { padding-left: 20px; font-size: 0.82rem; color: var(--text-secondary); }
.tips-card li { margin-bottom: 4px; }

/* ==================== AVAILABILITY ==================== */
.day-list { display: flex; flex-direction: column; gap: 2px; }
.day-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}
.day-item:last-child { border: none; }
.day-name { font-weight: 600; font-size: 0.92rem; }
.day-hours { font-size: 0.82rem; color: var(--text-muted); }

/* Toggle Switch */
.toggle {
    width: 48px;
    height: 28px;
    border-radius: 14px;
    background: var(--border);
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}
.toggle.active { background: var(--green); }
.toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle.active::after { transform: translateX(20px); }

/* ==================== STATS SCREEN ==================== */
.period-selector {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
}
.period-btn {
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--white);
    border: 2px solid var(--border-light);
    flex: 1;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.period-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.stat-summary-row { display: flex; gap: 10px; margin-bottom: 20px; }
.stat-summary-card {
    flex: 1;
    background: var(--white);
    border-radius: 14px;
    padding: 14px;
    box-shadow: var(--card-shadow);
    text-align: center;
}
.stat-summary-value { font-size: 1.3rem; font-weight: 800; color: var(--dark); }
.stat-summary-label { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 4px; }
.stat-trend { font-size: 0.75rem; font-weight: 600; }
.stat-trend.up { color: var(--green); }
.stat-trend.down { color: var(--red); }

/* Bar Chart */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 150px;
    padding: 10px 0;
    margin-bottom: 8px;
}
.bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
    justify-content: flex-end;
}
.bar {
    width: 100%;
    max-width: 32px;
    border-radius: 6px 6px 0 0;
    background: var(--primary);
    transition: height 0.5s ease;
}
.bar-label { font-size: 0.6rem; color: var(--text-muted); }

/* Horizontal Bars */
.h-bar-chart { display: flex; flex-direction: column; gap: 10px; }
.h-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.h-bar-label { width: 80px; font-size: 0.78rem; font-weight: 500; color: var(--text-secondary); }
.h-bar-track { flex: 1; height: 12px; border-radius: 6px; background: var(--bg); overflow: hidden; }
.h-bar-fill { height: 100%; border-radius: 6px; transition: width 0.5s ease; }
.h-bar-value { width: 40px; font-size: 0.78rem; font-weight: 600; text-align: right; }

/* Star Distribution */
.star-dist { display: flex; flex-direction: column; gap: 6px; }
.star-row { display: flex; align-items: center; gap: 8px; }
.star-label { font-size: 0.78rem; width: 20px; }
.star-bar-track { flex: 1; height: 8px; border-radius: 4px; background: var(--bg); overflow: hidden; }
.star-bar-fill { height: 100%; border-radius: 4px; background: var(--yellow); }
.star-count { font-size: 0.72rem; color: var(--text-muted); width: 24px; text-align: right; }

/* ==================== EARNINGS ==================== */
.balance-card {
    background: linear-gradient(135deg, var(--purple), #7C5CFC);
    border-radius: 20px;
    padding: 28px 24px;
    color: #fff;
    text-align: center;
    margin-bottom: 16px;
}
.balance-label { font-size: 0.85rem; opacity: 0.8; margin-bottom: 4px; }
.balance-amount { font-size: 2.2rem; font-weight: 800; margin-bottom: 16px; }
.balance-card .btn { background: rgba(255,255,255,0.2); color: #fff; border: 2px solid rgba(255,255,255,0.3); }
.balance-card .btn:hover { background: rgba(255,255,255,0.3); }

.balance-info { display: flex; gap: 10px; margin-bottom: 20px; }
.balance-info-card {
    flex: 1;
    background: var(--white);
    border-radius: 14px;
    padding: 14px;
    box-shadow: var(--card-shadow);
    text-align: center;
}
.balance-info-value { font-size: 1.1rem; font-weight: 700; color: var(--dark); }
.balance-info-label { font-size: 0.72rem; color: var(--text-muted); }

/* Commission */
.commission-card {
    background: var(--white);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
}
.commission-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 0;
    flex-wrap: wrap;
}
.commission-step {
    text-align: center;
    background: var(--bg);
    border-radius: 12px;
    padding: 12px 16px;
}
.commission-value { font-size: 1.1rem; font-weight: 700; }
.commission-label { font-size: 0.68rem; color: var(--text-muted); }
.commission-arrow { color: var(--text-muted); font-size: 20px; }

/* Transaction List */
.transaction-list { display: flex; flex-direction: column; }
.transaction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}
.transaction-item:last-child { border: none; }
.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.transaction-info { flex: 1; }
.transaction-info h4 { font-size: 0.85rem; }
.transaction-info p { font-size: 0.75rem; }
.transaction-amount { font-weight: 700; font-size: 0.95rem; }
.transaction-amount.positive { color: var(--green); }
.transaction-amount.negative { color: var(--red); }

/* ==================== SETTINGS ==================== */
.settings-section { margin-bottom: 24px; }
.settings-section h3 { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.settings-list {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}
.settings-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
}
.settings-item:last-child { border: none; }
.settings-item:hover { background: var(--bg); }
.settings-item .material-icons-round { color: var(--text-muted); font-size: 22px; }
.settings-item-info { flex: 1; }
.settings-item-info h4 { font-size: 0.9rem; }
.settings-item-info p { font-size: 0.78rem; }
.settings-item-right { display: flex; align-items: center; gap: 8px; }
.settings-value { font-size: 0.82rem; color: var(--text-muted); }
.settings-danger h4 { color: var(--red); }
.settings-danger .material-icons-round { color: var(--red); }
.app-version {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 16px;
}

/* ==================== NOTIFICATIONS ==================== */
.notification-list { display: flex; flex-direction: column; }
.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
}
.notification-item.unread { background: var(--primary-light); margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.notification-body { flex: 1; }
.notification-body h4 { font-size: 0.88rem; margin-bottom: 2px; }
.notification-body p { font-size: 0.78rem; }
.notification-time { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }
.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    margin-top: 16px;
}

/* ==================== EDIT PROFILE ==================== */
.edit-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}
.edit-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    position: relative;
}
.edit-avatar-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--bg);
}
.edit-avatar-btn .material-icons-round { font-size: 16px; color: #fff; }
.edit-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.language-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.lang-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    background: var(--bg);
    border: 2px solid var(--border);
    cursor: pointer;
    font-size: 0.88rem;
    transition: all 0.2s;
}
.lang-checkbox input { display: none; }
.lang-checkbox.checked {
    background: rgba(70, 130, 220, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}
.edit-banner {
    width: 100%;
    height: 120px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3a5fc8 0%, #4682DC 50%, #5a92e8 100%);
    background-size: cover;
    background-position: center;
    position: relative;
    margin-bottom: 16px;
    cursor: pointer;
    overflow: hidden;
}
.edit-banner-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.edit-banner-btn .material-icons-round { font-size: 16px; }

/* ==================== CROPPER MODAL ==================== */
.cropper-modal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.cropper-content {
    background: #fff; border-radius: 16px; padding: 16px;
    max-width: 420px; width: 100%;
}
.cropper-content h3 { margin: 0 0 12px; text-align: center; font-size: 1.1rem; }
.cropper-wrap {
    position: relative; margin: 0 auto 12px;
    touch-action: none; user-select: none;
    background: #000; overflow: hidden; border-radius: 8px;
}
.cropper-wrap img {
    width: 100%; height: 100%; display: block;
    pointer-events: none; user-select: none;
}
.cropper-box {
    position: absolute;
    border: 2px solid #fff;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.55);
    cursor: move;
    box-sizing: border-box;
}
.cropper-handle {
    position: absolute; right: -10px; bottom: -10px;
    width: 22px; height: 22px; border-radius: 50%;
    background: #fff; border: 2px solid var(--primary);
    cursor: se-resize; touch-action: none;
}
.cropper-hint {
    text-align: center; font-size: 0.78rem;
    color: var(--text-muted); margin: 0 0 12px;
}
.cropper-actions { display: flex; gap: 8px; }
.cropper-actions .btn { flex: 1; }

/* ==================== RESERVATION DETAIL ==================== */
.res-detail-status { text-align: center; margin-bottom: 20px; }
.res-detail-section {
    background: var(--white);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--card-shadow);
    margin-bottom: 12px;
}
.res-detail-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}
.res-detail-row:last-child { border: none; }
.res-detail-row .material-icons-round { color: var(--text-muted); font-size: 20px; }
.res-detail-row-info { flex: 1; }
.res-detail-row-info label { font-size: 0.72rem; color: var(--text-muted); display: block; }
.res-detail-row-info span { font-size: 0.92rem; font-weight: 600; }
.res-detail-price {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}
.res-detail-price:last-child { border: none; }
.res-detail-total { font-weight: 700; }
.res-detail-total span { color: var(--primary); }
.res-detail-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}
.res-detail-actions .btn { flex: 1; }

/* ==================== EMPTY STATES ==================== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}
.empty-state .empty-icon { font-size: 56px; }
.empty-state p { margin-top: 8px; }

/* ==================== LOADING ==================== */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== RESPONSIVE: TABLET ==================== */
@media (min-width: 600px) {
    .screen-scroll { padding: 0 32px; padding-top: calc(20px + var(--safe-top)); }
    .stats-row { gap: 14px; }
    .stat-card { padding: 20px 16px; }
    .stat-value { font-size: 1.5rem; }
    .management-cards { gap: 14px; }
    .portfolio-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .portfolio-manage-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ==================== RESPONSIVE: DESKTOP ==================== */
@media (min-width: 900px) {
    body { background: #e8e8f0; }

    .screen, #app-shell {
        max-width: 480px;
        margin: 0 auto;
        box-shadow: 0 0 40px rgba(0,0,0,0.1);
        border-radius: 24px;
        overflow: hidden;
        top: 20px;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        width: 100%;
    }

    .detail-overlay {
        max-width: 480px;
        margin: 0 auto;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 24px;
        overflow: hidden;
        top: 20px;
        bottom: 20px;
        width: 100%;
    }
    @keyframes slideIn {
        from { transform: translateX(-50%) translateY(20px); opacity: 0; }
        to { transform: translateX(-50%) translateY(0); opacity: 1; }
    }
}

/* Wide desktop: side-by-side layout */
@media (min-width: 1200px) {
    #app-shell {
        max-width: 1100px;
        border-radius: 24px;
        flex-direction: row;
    }

    .tab-bar {
        flex-direction: column;
        width: 80px;
        height: auto;
        border-top: none;
        border-right: 1px solid var(--border-light);
        padding: 20px 8px;
        justify-content: flex-start;
        gap: 4px;
        order: -1;
    }
    .tab-btn { padding: 12px 8px; }
    .tab-center { margin-top: 0; }
    .tab-center-icon { width: 48px; height: 48px; }

    .tab-content { flex: 1; }

    .detail-overlay {
        max-width: 1100px;
    }

    .screen-scroll { padding: 0 40px; }
    .stats-row { gap: 16px; }
    .stat-card { padding: 24px 20px; }
    .portfolio-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
}

/* ==================== SCROLLBAR ==================== */
.screen-scroll::-webkit-scrollbar,
.detail-body::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar { width: 4px; }
.screen-scroll::-webkit-scrollbar-track,
.detail-body::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.screen-scroll::-webkit-scrollbar-thumb,
.detail-body::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ==================== PROFILE PREVIEW (client view) ==================== */
.preview-profile {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg);
}
.pp-header {
    background: linear-gradient(135deg, #3a5fc8 0%, #4682DC 50%, #5a92e8 100%);
    padding: 12px 16px 0;
    padding-top: calc(12px + var(--safe-top));
    position: relative;
    min-height: 160px;
    flex-shrink: 0;
}
.pp-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.pp-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), #6C5CE7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    position: absolute;
    bottom: -40px;
    left: 24px;
    border: 4px solid var(--bg);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.pp-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px;
    padding-top: 52px;
}
.pp-name-section { margin-bottom: 20px; }
.pp-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.pp-name-row h1 { font-size: 1.4rem; }
.pp-verified {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
}
.pp-verified .material-icons-round { font-size: 16px; }
.pp-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}
.pp-rating strong { font-size: 1rem; }
.pp-rating-count { font-size: 0.82rem; color: var(--text-muted); }
.pp-languages { display: flex; gap: 8px; flex-wrap: wrap; }

.pp-section { margin-bottom: 24px; }
.pp-section h3 { margin-bottom: 12px; }
.pp-bio {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.pp-stats {
    display: flex;
    background: var(--white);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
}
.pp-stat { flex: 1; text-align: center; }
.pp-stat-value { font-size: 1.1rem; font-weight: 800; color: var(--dark); display: block; }
.pp-stat-label { font-size: 0.7rem; color: var(--text-muted); }
.pp-stat-divider { width: 1px; background: var(--border-light); }

/* Preview Packs */
.pp-packs-list { display: flex; flex-direction: column; gap: 10px; }
.pp-pack-card {
    background: var(--white);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--primary);
}
.pp-pack-card:nth-child(2) { border-left-color: var(--purple); }
.pp-pack-card:nth-child(3) { border-left-color: var(--green); }
.pp-pack-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}
.pp-pack-header h4 { font-size: 0.95rem; margin-bottom: 2px; }
.pp-pack-desc { font-size: 0.8rem; color: var(--text-secondary); }
.pp-pack-price { font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.pp-pack-card:nth-child(2) .pp-pack-price { color: var(--purple); }
.pp-pack-card:nth-child(3) .pp-pack-price { color: var(--green); }
.pp-pack-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.pp-pack-details > span {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.pp-pack-details .material-icons-round { font-size: 15px; }

/* Preview Gallery */
.pp-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.pp-gallery-item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #ddd, #eee);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    font-size: 2.2rem;
    transition: transform 0.15s;
}
.pp-gallery-item:active { transform: scale(0.95); }
.pp-gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.pp-gallery-more {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 12px;
}

/* Full Gallery */
.pp-gallery-full-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.pp-gallery-full-item {
    aspect-ratio: 1;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, #ddd, #eee);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}
.pp-gallery-full-item img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 500px) {
    .pp-gallery-full-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Preview Reviews */
.pp-reviews { display: flex; flex-direction: column; gap: 12px; }
.pp-review {
    background: var(--white);
    border-radius: 14px;
    padding: 14px;
    box-shadow: var(--card-shadow);
}
.pp-review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}
.pp-review-author {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pp-review-author strong { font-size: 0.88rem; display: block; }
.pp-review-date { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }
.pp-review-text { font-size: 0.85rem; line-height: 1.5; color: var(--text-secondary); }

/* Bottom CTA bar */
.pp-bottom-bar {
    display: flex;
    gap: 10px;
    padding: 12px 20px;
    padding-bottom: calc(12px + var(--safe-bottom));
    background: var(--white);
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

/* ==================== TOAST ==================== */
.toast {
    position: fixed;
    bottom: calc(var(--tab-height) + 20px + var(--safe-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--dark);
    color: #fff;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 999;
    opacity: 0;
    transition: all 0.3s;
    white-space: nowrap;
    max-width: 90%;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

@media (min-width: 900px) {
    .toast { max-width: 420px; }
}

/* ==================== FEED PUBLISH ==================== */
.feed-publish-form {
    padding: 0 4px;
}

.feed-upload-zone {
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 2px dashed var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s;
    position: relative;
}

.feed-upload-zone:hover {
    border-color: var(--primary);
}

.feed-upload-placeholder {
    text-align: center;
    padding: 24px;
}

.feed-upload-placeholder p {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.feed-upload-preview {
    position: absolute;
    inset: 0;
}

.feed-upload-preview.hidden {
    display: none;
}

/* My feed posts list */
.my-feed-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.my-feed-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.my-feed-thumb {
    width: 72px;
    height: 54px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.my-feed-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.my-feed-caption {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.my-feed-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.my-feed-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ========== PROPOSAL CARDS (CHAT) ========== */
.proposal-bubble { padding: 0 !important; background: transparent !important; max-width: 85% !important; }
.proposal-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    min-width: 220px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.message-sent .proposal-card { border-color: #c7dafc; background: #f1f7ff; }
.proposal-header { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; color: var(--text-secondary); margin-bottom: 6px; text-transform: uppercase; font-weight: 600; letter-spacing: 0.3px; }
.proposal-icon { font-size: 1rem; }
.proposal-title { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); margin-bottom: 4px; }
.proposal-desc { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.4; }
.proposal-details { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; padding: 8px 0; border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
.proposal-row { font-size: 0.78rem; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.proposal-row span { font-size: 0.9rem; }
.proposal-price { font-size: 1.15rem; font-weight: 700; color: var(--primary); text-align: right; margin-top: 6px; }
.proposal-status { margin-top: 8px; padding: 6px 10px; border-radius: 8px; font-size: 0.75rem; font-weight: 600; text-align: center; }
.proposal-status.pending { background: #FFF4E5; color: #B76E00; }
.proposal-status.accepted { background: #E7F7EC; color: #1A7F37; }
.proposal-status.declined { background: #FDEAEA; color: #C0362C; }
.message-system { text-align: center; font-size: 0.72rem; color: var(--text-muted); padding: 6px 12px; margin: 8px auto; background: var(--bg-secondary); border-radius: 12px; display: inline-block; align-self: center; }
.message-system.accepted { color: #1A7F37; background: #E7F7EC; }
.message-system.declined { color: #C0362C; background: #FDEAEA; }

/* Proposal form */
.proposal-form { background: var(--white); border-top: 1px solid var(--border-light); padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; }
.proposal-form.hidden { display: none; }
.proposal-form-header { display: flex; justify-content: space-between; align-items: center; font-size: 0.88rem; }
.prop-input { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.85rem; font-family: inherit; background: var(--white); }
.prop-input:focus { outline: none; border-color: var(--primary); }
.prop-row { display: flex; gap: 8px; }
.prop-row .prop-input { flex: 1; min-width: 0; }
.prop-send-btn { margin-top: 4px; }
.chat-plus-btn { background: var(--bg-secondary) !important; color: var(--text-primary) !important; }
.chat-plus-btn:hover { background: var(--border) !important; }

/* Prominent "propose pack" button in chat */
.propose-pack-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 32px);
    margin: 8px 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary) 0%, #6a9af0 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
    transition: transform 0.15s, box-shadow 0.15s;
}
.propose-pack-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}
.propose-pack-btn:active { transform: translateY(0); }
.propose-pack-btn .material-icons-round { font-size: 1.2rem; }

/* ==================== BLOCKED DATE CALENDAR ==================== */
.bdc-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
}
.bdc-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}
.bdc-day {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--bg, #fafafa);
    cursor: pointer;
    transition: background 0.1s, color 0.1s, transform 0.05s;
}
.bdc-day:not(.bdc-empty):not(.bdc-past):not(.bdc-already):hover {
    background: rgba(70, 130, 220, 0.12);
}
.bdc-empty { background: transparent; cursor: default; }
.bdc-past {
    color: #c8c8c8;
    cursor: not-allowed;
    background: transparent;
}
.bdc-today {
    outline: 2px solid var(--primary, #4682DC);
    outline-offset: -2px;
}
.bdc-already {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    cursor: not-allowed;
    text-decoration: line-through;
}
.bdc-selected {
    background: var(--primary, #4682DC) !important;
    color: #fff !important;
    transform: scale(0.96);
}
.bdc-summary { text-align: center; }
