/* ============================================================
   CLEANICHE USER DASHBOARD — COMPLETE STYLE SYSTEM
   (Matches admin-styles.css design patterns exactly)
   ============================================================ */

:root {
    --sidebar-bg: #0f1623;
    --sidebar-border: rgba(255,255,255,0.06);
    --sidebar-hover: rgba(255,255,255,0.06);
    --sidebar-active-bg: rgba(4,137,159,0.18);
    --sidebar-active-text: #7dd9e8;
    --sidebar-active-border: #04899f;
    --sidebar-width: 252px;
    --header-h: 64px;

    --teal: #024751;
    --teal-mid: #036a7c;
    --teal-light: #04899f;
    --teal-bg: #e6f4f6;
    --teal-soft: rgba(2,71,81,0.08);

    --orange: #ff5416;
    --orange-bg: #fff3ee;
    --green: #10b981;
    --green-bg: #ecfdf5;
    --amber: #f59e0b;
    --amber-bg: #fffbeb;
    --red: #ef4444;
    --red-bg: #fef2f2;
    --purple: #8b5cf6;
    --purple-bg: #f5f3ff;
    --blue: #3b82f6;
    --blue-bg: #eff6ff;
    --pink: #ec4899;
    --pink-bg: #fdf2f8;

    --bg: #f1f5f9;
    --card: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    --text-1: #0f172a;
    --text-2: #475569;
    --text-3: #94a3b8;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;

    --primary-color: #024751;
    --text-light: #94a3b8;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; overflow-x: hidden; overscroll-behavior: none; }

/* ============================================================
   LAYOUT
   ============================================================ */
.user-page {
    display: flex;
    min-height: 100vh;
    background: var(--bg);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.user-sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; top: 0;
    height: 100vh;
    z-index: 200;
    border-right: 1px solid var(--sidebar-border);
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.user-sidebar::-webkit-scrollbar { width: 4px; }
.user-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* Sidebar header */
.sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-logo img { height: 26px; filter: brightness(0) invert(1); opacity: 0.9; }

.user-badge {
    background: linear-gradient(135deg, var(--teal-light), var(--teal));
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 100px;
}

/* Nav groups */
.sidebar-nav {
    flex: 1;
    padding: 8px 0 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.nav-group-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.25);
    padding: 16px 20px 6px;
    margin-top: 4px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.18s ease;
    cursor: pointer;
    position: relative;
}
.nav-item i {
    width: 18px;
    font-size: 15px;
    text-align: center;
    flex-shrink: 0;
}
.nav-item:hover {
    background: var(--sidebar-hover);
    color: rgba(255,255,255,0.85);
}
.nav-item.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    border-left-color: var(--sidebar-active-border);
}
.nav-badge {
    margin-left: auto;
    background: var(--orange);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 100px;
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), var(--teal-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}
.user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.user-info { min-width: 0; }
.user-name { font-size: 0.8rem; font-weight: 600; color: rgba(255,255,255,0.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 0.7rem; color: rgba(255,255,255,0.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 9px;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: var(--radius-sm);
    color: #fca5a5;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: inherit;
}
.btn-logout:hover {
    background: rgba(239,68,68,0.2);
    border-color: rgba(239,68,68,0.4);
    color: #f87171;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.user-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Header ── */
.user-header {
    height: var(--header-h);
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}
.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.btn-hamburger {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
    font-size: 16px;
}
.breadcrumb-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-1);
}
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.18s;
    font-family: inherit;
    text-decoration: none;
}
.btn-header:hover { border-color: var(--teal-light); color: var(--teal); }
.btn-header-primary {
    background: var(--teal);
    color: #fff;
    border-color: var(--teal);
}
.btn-header-primary:hover { background: var(--teal-mid); border-color: var(--teal-mid); color: #fff; }

/* ── Page content area ── */
.user-content {
    flex: 1;
    padding: 28px;
}

/* ── Page header ── */
.page-header {
    margin-bottom: 24px;
}
.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 4px;
}
.page-header p {
    font-size: 0.88rem;
    color: var(--text-3);
}

/* ── SECTIONS ── */
.user-section { display: none; }
.user-section.active { display: block; }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.stat-card .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 14px;
}
.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1;
    margin-bottom: 4px;
}
.stat-card .stat-label {
    font-size: 0.78rem;
    color: var(--text-3);
    font-weight: 500;
}

/* Stat card color variants */
.stat-card.teal .stat-icon { background: var(--teal-bg); color: var(--teal); }
.stat-card.green .stat-icon { background: var(--green-bg); color: var(--green); }
.stat-card.amber .stat-icon { background: var(--amber-bg); color: var(--amber); }
.stat-card.blue .stat-icon { background: var(--blue-bg); color: var(--blue); }

/* Featured stat */
.stat-featured {
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-mid) 100%);
    padding: 24px;
    color: #fff;
    box-shadow: var(--shadow-md);
    border: none;
}
.stat-featured .stat-value { font-size: 2rem; color: #fff; }
.stat-featured .stat-label { color: rgba(255,255,255,0.7); }
.stat-featured .stat-icon { background: rgba(255,255,255,0.15); color: #fff; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 20px;
}
.card-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-1);
}
.card-body { padding: 20px; }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.data-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-2);
    vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #f8fafc; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.badge.pending { background: var(--amber-bg); color: #92400e; }
.badge.in-progress { background: var(--blue-bg); color: #1d4ed8; }
.badge.en-route { background: #dbeafe; color: #1e40af; }
.badge.completed { background: var(--green-bg); color: #065f46; }
.badge.confirmed { background: var(--green-bg); color: #065f46; }
.badge.awaiting-confirmation { background: #fef3c7; color: #92400e; }
.badge.cancelled { background: #f1f5f9; color: #64748b; }
.badge.active { background: var(--green-bg); color: #065f46; }
.badge.paused { background: var(--amber-bg); color: #92400e; }
.badge.paid { background: var(--green-bg); color: #065f46; }
.badge.gift { background: var(--pink-bg); color: #9d174d; }
.badge.default-addr { background: var(--teal-bg); color: var(--teal); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    white-space: nowrap;
    text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--teal-mid); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover:not(:disabled) { background: #059669; }
.btn-warning { background: var(--amber); color: #fff; }
.btn-warning:hover:not(:disabled) { background: #d97706; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }
.btn-ghost { background: transparent; color: var(--text-2); border: 1px solid var(--border); }
.btn-ghost:hover { background: #f8fafc; }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-view { background: var(--teal-soft); color: var(--teal); }
.btn-view:hover { background: var(--teal-bg); }

/* ============================================================
   FILTER PILLS
   ============================================================ */
.filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.filter-pill {
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}
.filter-pill:hover { border-color: var(--teal-light); color: var(--teal); }
.filter-pill.active { background: var(--teal); color: #fff; border-color: var(--teal); }

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}
.empty-state i { font-size: 2.5rem; color: var(--text-3); opacity: 0.5; margin-bottom: 16px; }
.empty-state h4 { font-size: 1rem; color: var(--text-2); margin-bottom: 6px; }
.empty-state p { font-size: 0.85rem; color: var(--text-3); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,22,35,0.55);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal {
    background: var(--card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.2s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header h3 { font-size: 1.05rem; font-weight: 700; color: var(--text-1); }
.modal-close {
    width: 32px; height: 32px; border-radius: 8px; border: none;
    background: #f1f5f9; color: var(--text-2); font-size: 1.1rem;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.modal-close:hover { background: #e2e8f0; }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Modal detail rows */
.detail-group { margin-bottom: 20px; }
.detail-group:last-child { margin-bottom: 0; }
.detail-group h4 {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 10px;
}
.detail-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px;
    background: #f8fafc; padding: 14px; border-radius: var(--radius-sm);
}
.detail-item label { display: block; font-size: 0.72rem; color: var(--text-3); margin-bottom: 2px; font-weight: 500; }
.detail-item span { font-size: 0.85rem; color: var(--text-1); font-weight: 500; }
.detail-item.full { grid-column: 1 / -1; }

/* Modal form fields */
.modal-body .field { margin-bottom: 16px; }
.modal-body .field label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.modal-body .field input,
.modal-body .field select,
.modal-body .field textarea {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-family: inherit; font-size: 0.85rem; color: var(--text-1); background: var(--card); transition: border-color 0.2s;
}
.modal-body .field input:focus,
.modal-body .field select:focus,
.modal-body .field textarea:focus { outline: none; border-color: var(--teal-light); }

/* ============================================================
   PROFILE GRID
   ============================================================ */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.profile-card {
    background: var(--card); border-radius: var(--radius); border: 1px solid var(--border);
    box-shadow: var(--shadow-sm); overflow: hidden;
}
.profile-card .card-title {
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    font-size: 0.85rem; font-weight: 700; color: var(--text-1);
    display: flex; align-items: center; gap: 8px;
}
.profile-card .card-title i { color: var(--teal-light); }
.profile-card .card-content { padding: 20px; }
.profile-row {
    display: flex; justify-content: space-between; padding: 10px 0;
    border-bottom: 1px solid #f1f5f9; font-size: 0.85rem;
}
.profile-row:last-child { border-bottom: none; }
.profile-row .label { color: var(--text-3); font-weight: 500; }
.profile-row .value { color: var(--text-1); font-weight: 600; text-align: right; }

/* Toggle switch */
.toggle-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid #f1f5f9;
}
.toggle-row:last-child { border-bottom: none; }
.toggle-row .toggle-label { font-size: 0.85rem; color: var(--text-2); }
.toggle {
    position: relative; width: 44px; height: 24px; cursor: pointer;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider {
    position: absolute; inset: 0; background: var(--border);
    border-radius: 12px; transition: background 0.2s;
}
.toggle .slider::before {
    content: ''; position: absolute; width: 18px; height: 18px;
    left: 3px; top: 3px; background: #fff; border-radius: 50%;
    transition: transform 0.2s;
}
.toggle input:checked + .slider { background: var(--teal); }
.toggle input:checked + .slider::before { transform: translateX(20px); }

/* ============================================================
   TRACKING MAP
   ============================================================ */
.map-container {
    border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
    box-shadow: var(--shadow-sm); margin-bottom: 20px; position: relative; background: var(--bg);
}
.map-container .map-el { width: 100%; height: 400px; }
.map-container .map-placeholder {
    width: 100%; height: 400px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; color: var(--text-3); gap: 12px;
}
.map-container .map-placeholder i { font-size: 3rem; opacity: 0.4; }
.map-container .map-placeholder p { font-size: 0.88rem; }

.map-cc-card {
    position: absolute; top: 16px; left: 16px; background: var(--card);
    border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow-lg);
    z-index: 10; display: flex; align-items: center; gap: 12px; min-width: 220px;
}

/* Tracking progress */
.tracking-progress {
    background: var(--card); border-radius: var(--radius); border: 1px solid var(--border);
    padding: 20px 24px; margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.tracking-steps {
    display: flex; align-items: center; justify-content: space-between; position: relative;
}
.tracking-steps::before {
    content: ''; position: absolute; top: 18px; left: 24px; right: 24px;
    height: 3px; background: var(--border); z-index: 0;
}
.tracking-step { display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; z-index: 1; }
.tracking-step .step-dot {
    width: 36px; height: 36px; border-radius: 50%; background: var(--card);
    border: 3px solid var(--border); display: flex; align-items: center;
    justify-content: center; font-size: 0.75rem; color: var(--text-3); transition: all 0.3s ease;
}
.tracking-step.active .step-dot { background: var(--teal); border-color: var(--teal); color: #fff; }
.tracking-step.done .step-dot { background: var(--green); border-color: var(--green); color: #fff; }
.tracking-step .step-label { font-size: 0.7rem; font-weight: 600; color: var(--text-3); text-align: center; max-width: 80px; }
.tracking-step.active .step-label, .tracking-step.done .step-label { color: var(--text-1); }

/* ============================================================
   SUBSCRIPTION CARD
   ============================================================ */
.sub-card {
    background: var(--card); border-radius: var(--radius); border: 1px solid var(--border);
    padding: 24px; box-shadow: var(--shadow-sm); margin-bottom: 20px;
}
.sub-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.sub-header h3 { font-size: 1.05rem; font-weight: 700; color: var(--text-1); }
.sub-progress { margin-bottom: 16px; }
.sub-progress-bar { width: 100%; height: 10px; background: var(--bg); border-radius: 5px; overflow: hidden; margin-bottom: 6px; }
.sub-progress-bar .fill { height: 100%; background: linear-gradient(90deg, var(--teal), var(--teal-light)); border-radius: 5px; transition: width 0.4s ease; }
.sub-progress-text { font-size: 0.78rem; color: var(--text-3); display: flex; justify-content: space-between; }
.sub-details { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; background: #f8fafc; border-radius: var(--radius-sm); margin-bottom: 16px; }
.sub-detail-item label { display: block; font-size: 0.72rem; color: var(--text-3); margin-bottom: 2px; font-weight: 500; }
.sub-detail-item span { font-size: 0.85rem; color: var(--text-1); font-weight: 600; }
.sub-actions { display: flex; gap: 10px; }

/* ============================================================
   STAR RATING & REVIEWS
   ============================================================ */
.star-input { display: flex; gap: 4px; margin-bottom: 12px; }
.star-input .star {
    font-size: 1.8rem; color: var(--border); cursor: pointer;
    transition: color 0.15s, transform 0.15s;
}
.star-input .star:hover, .star-input .star.active { color: var(--amber); transform: scale(1.1); }
.star-input .star.hovered { color: var(--amber); }

.review-card {
    background: var(--card); border-radius: var(--radius); border: 1px solid var(--border);
    padding: 18px 20px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.review-card .review-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.review-card .review-service { font-weight: 600; font-size: 0.88rem; color: var(--text-1); }
.review-card .review-date { font-size: 0.75rem; color: var(--text-3); }
.review-card .review-stars { color: var(--amber); font-size: 0.82rem; margin-bottom: 8px; }
.review-card .review-comment { font-size: 0.85rem; color: var(--text-2); line-height: 1.5; }

.pending-review { background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.pending-review .pr-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.pending-review .pr-service { font-weight: 700; font-size: 0.92rem; color: var(--text-1); }
.pending-review .pr-date { font-size: 0.78rem; color: var(--text-3); }
.pending-review .pr-cc { font-size: 0.82rem; color: var(--text-2); margin-bottom: 12px; }

/* ============================================================
   ADDRESS CARDS
   ============================================================ */
.address-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 16px; }
.address-card {
    background: var(--card); border-radius: var(--radius); border: 1px solid var(--border);
    padding: 18px; box-shadow: var(--shadow-sm); position: relative; transition: box-shadow 0.15s;
}
.address-card:hover { box-shadow: var(--shadow-md); }
.address-card .addr-label { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.92rem; color: var(--text-1); margin-bottom: 8px; }
.address-card .addr-label i { color: var(--teal-light); }
.address-card .addr-text { font-size: 0.82rem; color: var(--text-2); line-height: 1.5; margin-bottom: 12px; }
.address-card .addr-details { font-size: 0.75rem; color: var(--text-3); margin-bottom: 12px; }
.address-card .addr-actions { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item { background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-sm); }
.faq-question {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; cursor: pointer; font-size: 0.88rem; font-weight: 600;
    color: var(--text-1); transition: background 0.15s;
}
.faq-question:hover { background: #f8fafc; }
.faq-question i { color: var(--text-3); font-size: 0.8rem; transition: transform 0.2s; }
.faq-item.open .faq-question i { transform: rotate(180deg); }
.faq-answer {
    padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease;
    font-size: 0.85rem; color: var(--text-2); line-height: 1.6;
}
.faq-item.open .faq-answer { padding: 0 20px 16px; max-height: 300px; }

.whatsapp-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 24px; background: #25d366; color: #fff; border: none;
    border-radius: var(--radius); font-size: 0.88rem; font-weight: 700;
    cursor: pointer; transition: all 0.15s; font-family: inherit; text-decoration: none; margin-top: 20px;
}
.whatsapp-btn:hover { background: #1da851; transform: translateY(-2px); box-shadow: 0 4px 16px rgba(37,211,102,0.3); }

/* ============================================================
   NEXT CLEANING CARD
   ============================================================ */
.next-cleaning {
    background: var(--card); border-radius: var(--radius); border: 1px solid var(--border);
    padding: 20px; box-shadow: var(--shadow-sm); margin-bottom: 20px; border-left: 4px solid var(--teal);
}
.next-cleaning .next-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 12px; }
.next-cleaning .next-details { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.next-cleaning .next-item { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-2); }
.next-cleaning .next-item i { color: var(--teal-light); width: 16px; text-align: center; }
.next-cleaning .next-item strong { color: var(--text-1); }

/* ============================================================
   NOTIFICATION FEED
   ============================================================ */
.notif-list { display: flex; flex-direction: column; gap: 8px; }
.notif-item {
    display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
    background: var(--card); border-radius: var(--radius-sm); border: 1px solid var(--border);
    transition: background 0.15s;
}
.notif-item.unread { background: var(--teal-bg); border-color: rgba(4,137,159,0.2); }
.notif-item .notif-icon {
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; flex-shrink: 0;
}
.notif-item .notif-icon.booking { background: var(--teal-bg); color: var(--teal); }
.notif-item .notif-icon.cc { background: var(--blue-bg); color: var(--blue); }
.notif-item .notif-icon.complete { background: var(--green-bg); color: var(--green); }
.notif-item .notif-icon.reminder { background: var(--amber-bg); color: var(--amber); }

/* ============================================================
   MOBILE OVERLAY
   ============================================================ */
.sidebar-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    z-index: 199; display: none;
}
.sidebar-overlay.show { display: block; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* ============================================================
   RESPONSIVE — TABLET (≤768px)
   ============================================================ */
@media (max-width: 768px) {
    .btn-hamburger { display: flex; }
    .user-sidebar { transform: translateX(-100%); }
    .user-sidebar.open { transform: translateX(0); }
    .user-main { margin-left: 0; }
    .user-header { padding: 0 12px; height: 56px; }
    .user-content { padding: 16px 14px; }
    .breadcrumb-title { font-size: 0.9rem; }

    /* Header actions stack */
    .header-right { gap: 6px; }
    .btn-header { padding: 6px 10px; font-size: 0.72rem; }
    .btn-header i { font-size: 0.7rem; }

    /* Stats */
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
    .stat-card { padding: 14px; }
    .stat-card .stat-value { font-size: 1.3rem; }
    .stat-card .stat-icon { width: 34px; height: 34px; margin-bottom: 10px; font-size: 0.85rem; }
    .stat-featured { padding: 18px; }
    .stat-featured .stat-value { font-size: 1.6rem; }

    /* Cards */
    .card { margin-bottom: 14px; }
    .card-header { padding: 14px 16px; }
    .card-body { padding: 14px 16px; }

    /* Grids → single column */
    .profile-grid { grid-template-columns: 1fr; }
    .address-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .next-cleaning .next-details { grid-template-columns: 1fr; }
    .sub-details { grid-template-columns: 1fr; }

    /* Tables — horizontal scroll */
    .data-table { font-size: 0.78rem; }
    .data-table thead th { padding: 10px 12px; font-size: 0.68rem; }
    .data-table tbody td { padding: 10px 12px; }

    /* Modals — full width on mobile */
    .modal { max-width: 100%; border-radius: var(--radius) var(--radius) 0 0; max-height: 85vh; }
    .modal-overlay { align-items: flex-end; padding: 0; }
    .modal-header { padding: 16px 18px; }
    .modal-body { padding: 18px; }
    .modal-footer { padding: 14px 18px; flex-wrap: wrap; }
    .modal-footer .btn { flex: 1; justify-content: center; min-width: 0; }

    /* Filter pills — scroll horizontal */
    .filters { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
    .filter-pill { flex-shrink: 0; }

    /* Tracking */
    .tracking-step .step-label { font-size: 0.58rem; max-width: 56px; }
    .tracking-step .step-dot { width: 28px; height: 28px; font-size: 0.6rem; }
    .tracking-steps::before { top: 14px; }
    .map-container .map-el, .map-container .map-placeholder { height: 300px; }
    .map-cc-card { top: 8px; left: 8px; right: 8px; min-width: 0; padding: 10px 14px; }

    /* Profile */
    .profile-card .card-content { padding: 14px; }
    .profile-row { flex-direction: column; gap: 2px; padding: 8px 0; }
    .profile-row .value { text-align: left; }

    /* Toggle rows */
    .toggle-row { padding: 10px 0; }

    /* Empty states */
    .empty-state { padding: 40px 16px; }
    .empty-state i { font-size: 2rem; }

    /* FAQ */
    .faq-question { padding: 14px 16px; font-size: 0.82rem; }
    .faq-item.open .faq-answer { padding: 0 16px 14px; }

    /* Subscription */
    .sub-card { padding: 18px; }
    .sub-actions { flex-wrap: wrap; }
    .sub-actions .btn { flex: 1; justify-content: center; }

    /* Page header with action button */
    .page-header h1 { font-size: 1.25rem; }

    /* WhatsApp button full width */
    .whatsapp-btn { width: 100%; justify-content: center; }

    /* Notifications */
    .notif-item { padding: 10px 12px; }
}

/* ============================================================
   RESPONSIVE — SMALL PHONE (≤480px)
   ============================================================ */
@media (max-width: 480px) {
    .user-header { height: 50px; }
    .breadcrumb-title { font-size: 0.82rem; }
    .header-right .btn-header span { display: none; }
    .btn-header { padding: 8px; border-radius: 8px; }

    .user-content { padding: 12px 10px; }

    .stats-grid { grid-template-columns: 1fr; gap: 8px; }
    .stat-card { padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
    .stat-card .stat-icon { margin-bottom: 0; width: 38px; height: 38px; flex-shrink: 0; }
    .stat-card .stat-value { font-size: 1.2rem; }
    .stat-card .stat-label { font-size: 0.72rem; }
    .stat-featured { flex-direction: row; align-items: center; gap: 14px; padding: 16px; }
    .stat-featured .stat-value { font-size: 1.4rem; }

    .page-header h1 { font-size: 1.1rem; }
    .page-header p { font-size: 0.78rem; }

    /* Full-width buttons */
    .page-header + .btn, [style*="display:flex"] > .btn-primary { width: 100%; justify-content: center; }

    .card-header h3 { font-size: 0.85rem; }

    .data-table { font-size: 0.72rem; }
    .data-table thead th { padding: 8px 8px; font-size: 0.62rem; }
    .data-table tbody td { padding: 8px 8px; }

    .tracking-step .step-label { font-size: 0.5rem; max-width: 48px; }
    .tracking-step .step-dot { width: 24px; height: 24px; font-size: 0.5rem; }
    .tracking-steps::before { top: 12px; left: 12px; right: 12px; }
    .map-container .map-el, .map-container .map-placeholder { height: 250px; }

    .address-card { padding: 14px; }
    .address-card .addr-actions { flex-wrap: wrap; }
    .address-card .addr-actions .btn { flex: 1; justify-content: center; }

    .review-card { padding: 14px; }
    .star-input .star { font-size: 1.5rem; }

    .modal-body .field label { font-size: 0.72rem; }
    .modal-body .field input, .modal-body .field select, .modal-body .field textarea { padding: 9px 12px; font-size: 0.8rem; }

    .badge { padding: 3px 8px; font-size: 0.65rem; }
}

/* ============================================================
   RESPONSIVE — TOUCH ENHANCEMENTS
   ============================================================ */
@media (hover: none) and (pointer: coarse) {
    /* Larger tap targets */
    .nav-item { padding: 13px 20px; }
    .btn { min-height: 42px; }
    .filter-pill { min-height: 38px; padding: 8px 18px; }
    .btn-logout { min-height: 44px; }
    .toggle { width: 48px; height: 26px; }
    .toggle .slider::before { width: 20px; height: 20px; }
    .toggle input:checked + .slider::before { transform: translateX(22px); }
    .faq-question { min-height: 48px; }
    .data-table tbody td { padding: 14px 12px; }
}
