/* CleanPro App - Main Stylesheet */
/* Mobile-first design optimized for 6" phones */

:root {
    --primary: #4A90E2;
    --primary-dark: #357ABD;
    --primary-light: #E8F4FD;
    --secondary: #27AE60;
    --secondary-dark: #1E8449;
    --accent: #F39C12;
    --accent-dark: #D68910;
    --danger: #E74C3C;
    --warning: #F39C12;
    --info: #3498DB;
    --success: #27AE60;
    --dark: #2C3E50;
    --gray: #95A5A6;
    --gray-light: #ECF0F1;
    --gray-lighter: #F8F9FA;
    --white: #FFFFFF;
    --text: #2C3E50;
    --text-muted: #7F8C8D;
    --border: #DEE2E6;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --nav-height: 60px;
    --bottom-nav-height: 65px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--gray-lighter);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
}

body.admin-body {
    max-width: 100%;
    background: #F0F2F5;
}

/* ===== TYPOGRAPHY ===== */
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.3rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p { margin-bottom: 0.5rem; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ===== LAYOUT ===== */
.page-wrapper {
    min-height: 100vh;
    padding-bottom: var(--bottom-nav-height);
    padding-top: var(--nav-height);
}

.page-wrapper.no-top-nav { padding-top: 0; }
.page-wrapper.no-bottom-nav { padding-bottom: 0; }

.container { padding: 0 16px; }
.container-fluid { padding: 0 16px; }

.section { padding: 16px 0; }

/* ===== TOP NAV ===== */
.top-nav {
    position: fixed;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 100%; max-width: 480px;
    height: var(--nav-height);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

body.admin-body .top-nav { max-width: 100%; left: 0; transform: none; }

.top-nav .nav-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
}

.top-nav .nav-back {
    display: flex; align-items: center; gap: 6px;
    color: var(--primary); font-size: 0.9rem; font-weight: 500;
    background: none; border: none; cursor: pointer;
    padding: 8px 0;
}

.top-nav .nav-actions {
    display: flex; align-items: center; gap: 12px;
}

.icon-btn {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--gray-lighter);
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; position: relative;
    transition: background 0.2s;
}
.icon-btn:hover { background: var(--border); }

.badge-dot {
    position: absolute;
    top: 4px; right: 4px;
    width: 8px; height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--white);
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 100%; max-width: 480px;
    height: var(--bottom-nav-height);
    background: var(--white);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}

.bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 0;
    color: var(--gray);
    font-size: 0.65rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
}

.bottom-nav a .nav-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.bottom-nav a.active {
    color: var(--primary);
}

.bottom-nav a.active .nav-icon-wrap {
    background: var(--primary-light);
    border-radius: 12px;
    padding: 4px 12px;
}

.bottom-nav .badge-count {
    position: absolute;
    top: 4px;
    right: calc(50% - 18px);
    background: var(--danger);
    color: white;
    font-size: 0.55rem;
    font-weight: 700;
    min-width: 16px; height: 16px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
}

/* ===== CARDS ===== */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
}

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

.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
}

.card-compact { padding: 12px; }

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 20px 16px 80px;
    margin-bottom: -60px;
}

.hero h2 {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.9;
}

.hero h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font);
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

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

.btn-secondary { background: var(--secondary); color: white; }
.btn-secondary:hover { background: var(--secondary-dark); color: white; }

.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-dark); color: white; }

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

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

.btn-ghost {
    background: var(--gray-lighter);
    color: var(--text);
}
.btn-ghost:hover { background: var(--gray-light); }

.btn-sm { padding: 8px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 24px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-round { border-radius: 50px; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74,144,226,0.15);
}

.form-control::placeholder { color: var(--gray); }

textarea.form-control { resize: vertical; min-height: 80px; }

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2395A5A6' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group .form-control { padding-left: 42px; }
.input-group .input-icon {
    position: absolute;
    left: 14px;
    font-size: 1rem;
    color: var(--gray);
    pointer-events: none;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-error {
    font-size: 0.75rem;
    color: var(--danger);
    margin-top: 4px;
}

/* ===== JOB CARDS ===== */
.job-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    display: flex;
    transition: transform 0.2s, box-shadow 0.2s;
}

.job-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.job-card-image {
    width: 90px;
    min-height: 90px;
    object-fit: cover;
    flex-shrink: 0;
}

.job-card-image-placeholder {
    width: 90px;
    min-height: 90px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.job-card-body {
    padding: 12px;
    flex: 1;
}

.job-card-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.job-card-service {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex; align-items: center; gap: 4px;
    margin-bottom: 4px;
}

.job-card-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex; align-items: center; gap: 4px;
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-primary { background: #D6E8FA; color: var(--primary-dark); }
.badge-secondary { background: var(--gray-light); color: var(--text-muted); }
.badge-success { background: #D5F5E3; color: var(--secondary-dark); }
.badge-warning { background: #FEF9E7; color: #D68910; }
.badge-danger { background: #FDEDEC; color: #C0392B; }
.badge-info { background: #EBF5FB; color: #1A5276; }

/* ===== MESSAGES / CHAT ===== */
.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-lighter);
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    color: inherit;
}

.conversation-item:hover { background: var(--gray-lighter); }
.conversation-item.unread { background: #EBF5FB; }

.avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.avatar-sm { width: 36px; height: 36px; font-size: 0.85rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.4rem; }

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

.conv-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conv-preview {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conv-meta {
    text-align: right;
    flex-shrink: 0;
}

.conv-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.conv-unread-count {
    background: var(--primary);
    color: white;
    border-radius: 50%;
    width: 18px; height: 18px;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    margin-left: auto;
    margin-top: 4px;
}

/* Chat messages */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--nav-height) - 70px);
    overflow-y: auto;
    padding: 16px;
    gap: 8px;
}

.msg-bubble {
    max-width: 78%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 0.88rem;
    line-height: 1.4;
    position: relative;
}

.msg-sent {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.msg-received {
    background: var(--white);
    color: var(--text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.msg-time {
    font-size: 0.65rem;
    opacity: 0.7;
    margin-top: 3px;
    text-align: right;
}

.msg-date-divider {
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin: 8px 0;
    background: var(--gray-lighter);
    padding: 4px 12px;
    border-radius: 20px;
    align-self: center;
}

.chat-input-bar {
    position: fixed;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 100%; max-width: 480px;
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 50;
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 24px;
    font-size: 0.9rem;
    font-family: var(--font);
    outline: none;
}

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

.chat-send-btn {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

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

/* ===== STATS / SUMMARY ===== */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
}

.stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
    margin-top: 2px;
}

.stat-change {
    font-size: 0.72rem;
    margin-top: 2px;
}

.stat-up { color: var(--success); }
.stat-down { color: var(--danger); }

/* ===== SERVICE GRID ===== */
.service-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.service-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    text-decoration: none;
    color: inherit;
    display: block;
}

.service-card:hover, .service-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
}

.service-icon { font-size: 2rem; margin-bottom: 8px; }
.service-name { font-size: 0.85rem; font-weight: 600; color: var(--dark); }
.service-price { font-size: 0.8rem; color: var(--primary); font-weight: 700; }

/* ===== PROFILE ===== */
.profile-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 30px 16px 20px;
    text-align: center;
    color: white;
}

.profile-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.5);
    margin: 0 auto 12px;
    object-fit: cover;
    background: rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    font-weight: 700;
}

.profile-name { font-size: 1.2rem; font-weight: 700; }
.profile-role { font-size: 0.85rem; opacity: 0.8; }

.menu-list { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-lighter);
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s;
}

.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: var(--gray-lighter); }

.menu-item-icon {
    width: 38px; height: 38px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.menu-item-text { flex: 1; font-size: 0.9rem; font-weight: 500; }
.menu-item-arrow { color: var(--gray); font-size: 0.9rem; }

/* ===== ALERTS ===== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-success { background: #D5F5E3; color: #1E8449; border-left: 4px solid var(--success); }
.alert-danger { background: #FDEDEC; color: #C0392B; border-left: 4px solid var(--danger); }
.alert-warning { background: #FEF9E7; color: #9A7D0A; border-left: 4px solid var(--warning); }
.alert-info { background: #EBF5FB; color: #1A5276; border-left: 4px solid var(--info); }

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 60%, #1A3A5C 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 24px;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo img {
    width: 90px; height: 90px;
    border-radius: 22px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.login-logo h1 {
    font-size: 1.6rem;
    color: var(--dark);
    margin-top: 10px;
    font-weight: 800;
}

.login-logo p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.tab-switcher {
    display: flex;
    background: var(--gray-lighter);
    border-radius: var(--radius-sm);
    padding: 3px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 9px;
    border: none;
    background: transparent;
    border-radius: calc(var(--radius-sm) - 2px);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
}

.tab-btn.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: 0 1px 6px rgba(0,0,0,0.1);
}

.role-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.role-btn {
    padding: 10px 8px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-family: var(--font);
}

.role-btn.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.role-btn .role-icon { font-size: 1.5rem; }
.role-btn .role-name { font-size: 0.78rem; font-weight: 600; margin-top: 4px; }

/* ===== DIVIDER ===== */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ===== TOGGLE ===== */
.toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
}

.toggle {
    position: relative;
    width: 44px; height: 24px;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--gray-light);
    border-radius: 24px;
    cursor: pointer;
    transition: 0.3s;
}

.toggle-slider:before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    left: 3px; bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider:before { transform: translateX(20px); }

/* ===== TABS ===== */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    background: var(--white);
    margin-bottom: 0;
}

.tab {
    flex: 1;
    padding: 12px 8px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    text-decoration: none;
    display: block;
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ===== TIMELINE ===== */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 10px; top: 0; bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-dot {
    position: absolute;
    left: -22px;
    top: 4px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--white);
    box-shadow: 0 0 0 2px var(--primary);
}

.timeline-content {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    box-shadow: var(--shadow);
}

/* ===== RATING STARS ===== */
.stars { color: var(--accent); font-size: 1rem; }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 3.5rem; margin-bottom: 16px; }
.empty-state h3 { color: var(--dark); margin-bottom: 8px; }
.empty-state p { font-size: 0.88rem; }

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.modal-sheet {
    background: var(--white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    width: 100%; max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 16px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-handle {
    width: 40px; height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 16px;
}

/* ===== SCROLL HELPERS ===== */
.scroll-x {
    overflow-x: auto;
    display: flex;
    gap: 10px;
    padding-bottom: 6px;
    scrollbar-width: none;
}
.scroll-x::-webkit-scrollbar { display: none; }

/* ===== UTILITY ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-sm { font-size: 0.8rem; }
.text-xs { font-size: 0.72rem; }
.fw-bold { font-weight: 700; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.p-16 { padding: 16px; }
.hidden { display: none; }

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

/* ===== ADMIN LAYOUT ===== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    background: var(--dark);
    color: white;
    flex-shrink: 0;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s;
}

.sidebar-logo {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo img {
    width: 40px; height: 40px;
    border-radius: 10px;
}

.sidebar-logo span {
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
}

.sidebar-nav { padding: 12px 0; }

.sidebar-section {
    padding: 8px 16px 4px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
    font-weight: 600;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.15s;
    border-radius: 0;
}

.sidebar-link:hover { background: rgba(255,255,255,0.08); color: white; }
.sidebar-link.active { background: var(--primary); color: white; }

.sidebar-link .link-icon { font-size: 1rem; width: 20px; text-align: center; }

.admin-main {
    margin-left: 240px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-topbar {
    background: var(--white);
    height: 60px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.admin-content { padding: 24px; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.admin-table th {
    background: var(--gray-lighter);
    padding: 10px 14px;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 2px solid var(--border);
}

.admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table tr:hover td { background: var(--gray-lighter); }

.admin-stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

/* Responsive admin */
@media (max-width: 768px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
}

/* ===== FLOATING ACTION BUTTON ===== */
.fab {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 16px);
    right: 16px;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(74,144,226,0.4);
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 90;
}

.fab:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(74,144,226,0.5); }

/* ===== SCHEDULE CALENDAR ===== */
.week-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 8px;
    scrollbar-width: none;
}
.week-scroll::-webkit-scrollbar { display: none; }

.day-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    min-width: 52px;
    border: 2px solid transparent;
    background: var(--white);
    box-shadow: var(--shadow);
    transition: all 0.2s;
    font-family: var(--font);
}

.day-pill.active { background: var(--primary); border-color: var(--primary); }
.day-pill .day-name { font-size: 0.65rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); }
.day-pill .day-num { font-size: 1rem; font-weight: 700; color: var(--dark); }
.day-pill.active .day-name, .day-pill.active .day-num { color: white; }
.day-pill .day-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.day-pill.active .day-dot { background: rgba(255,255,255,0.7); }

/* ===== AMOUNT / PRICE DISPLAY ===== */
.price-big {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
}

.price-tag {
    display: inline-flex;
    align-items: center;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

/* ===== ETA INDICATOR ===== */
.eta-bar {
    background: linear-gradient(135deg, #FFF3CD, #FFE69C);
    border-radius: var(--radius);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.eta-icon { font-size: 1.4rem; }
.eta-text h4 { font-size: 0.85rem; color: #856404; font-weight: 700; }
.eta-text p { font-size: 0.78rem; color: #664d03; }

/* Progress bar */
.progress { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.3s;
}

/* ===== NOTIFICATION LIST ===== */
.notif-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-lighter);
}

.notif-item.unread { background: var(--primary-light); }
.notif-icon { font-size: 1.3rem; flex-shrink: 0; }
.notif-content { flex: 1; }
.notif-title { font-size: 0.88rem; font-weight: 600; color: var(--dark); }
.notif-msg { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.notif-time { font-size: 0.7rem; color: var(--gray); margin-top: 4px; }
