:root {
    --primary: #1a4d8c;
    --primary-dark: #153d6e;
    --primary-light: #2563a8;
    --accent: #f57c00;
    --accent-dark: #e65100;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    --radius: 12px;
    --radius-lg: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Tajawal', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.75rem 1.25rem;
}

.header-row {
    display: contents;
}

.header-menu {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
    min-width: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    font-size: 1.35rem;
}

.logo-brand {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    line-height: 0;
}
.logo-img {
    height: 40px;
    max-height: 40px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    display: block;
}
.logo-img-footer {
    height: 36px;
    max-height: 36px;
    max-width: 100px;
    filter: brightness(1.1);
}

.auth-card-wide { max-width: 560px !important; margin: 0 auto; width: 100%; }

.main-nav { display: flex; gap: 1.5rem; flex: 1; }
.main-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--primary); }

.region-filter-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.region-filter-header i { color: var(--primary); }
.region-filter-header select {
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.9rem;
    min-width: 140px;
    cursor: pointer;
    color: var(--text);
}

.lang-switcher {
    display: flex;
    gap: 0.25rem;
    background: var(--bg);
    padding: 0.2rem;
    border-radius: 50px;
    border: 1px solid var(--border);
}
.lang-btn {
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.2s;
}
.lang-btn.active,
.lang-btn:hover {
    background: var(--primary);
    color: #fff;
}
.lang-picker-btns {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.lang-pick-btn { width: 100%; }
.lang-picker-modal { max-width: 400px; }

body.lang-en { font-family: 'Tajawal', system-ui, sans-serif; }
body.lang-en .main-nav a.active { padding-left: 0.75rem; padding-right: 0.25rem; }
body.lang-en .multi-select-group-title { border-right: none; border-left: 3px solid var(--accent); }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.user-greeting { font-size: 0.9rem; color: var(--text-muted); }
.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--primary);
    font-size: 1.15rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
}
.mobile-menu-btn:hover { background: #fff; border-color: var(--primary); }
.mobile-menu-btn .icon-close { display: none; }
.header-inner.menu-open .mobile-menu-btn {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.header-inner.menu-open .mobile-menu-btn .icon-menu { display: none; }
.header-inner.menu-open .mobile-menu-btn .icon-close { display: block; }

.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 990;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}
body.menu-open { overflow: hidden; }
body.menu-open .nav-backdrop { display: block !important; }

#headerMenu.is-open {
    display: flex !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-accent { background: var(--accent); color: white; }
.btn-lg { padding: 0.85rem 1.75rem; font-size: 1.05rem; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 45%, var(--accent) 100%);
    color: white;
    padding: 4rem 0 5rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; text-align: center; max-width: 720px; margin: 0 auto; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; margin-bottom: 1rem; line-height: 1.3; }
.hero p { font-size: 1.15rem; opacity: 0.95; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero .btn-outline { border-color: rgba(255,255,255,0.6); color: white; }
.hero .btn-outline:hover { background: rgba(255,255,255,0.15); border-color: white; }

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 2rem; font-weight: 800; }
.hero-stat span { font-size: 0.9rem; opacity: 0.9; }

/* Region banner */
.region-banner {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin: -2rem auto 2rem;
    max-width: 900px;
    position: relative;
    z-index: 10;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.region-banner label { font-weight: 700; white-space: nowrap; }
.region-banner select {
    flex: 1;
    min-width: 200px;
    padding: 0.65rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
}

/* Sections */
.section { padding: 4rem 0; }
.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-title h2 { font-size: 1.85rem; font-weight: 800; margin-bottom: 0.5rem; }
.section-title p { color: var(--text-muted); }

/* Categories grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.category-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.25s;
    display: block;
}
.category-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}
.category-card .icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, rgba(13,148,136,0.15), rgba(20,184,166,0.1));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 1rem;
}
.category-card h3 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.category-card p { font-size: 0.85rem; color: var(--text-muted); }

/* Services list */
.services-page { padding: 2rem 0 4rem; }
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 1.85rem; font-weight: 800; }
.filters-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}
.filter-group { flex: 1; min-width: 180px; }
.filter-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--text-muted); }
.filter-group select, .filter-group input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
}

.category-section { margin-bottom: 2.5rem; }
.category-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}
.services-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.service-tag {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.45rem 0.9rem;
    border-radius: 50px;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}
.service-tag:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* Providers */
.providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}
.provider-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: box-shadow 0.2s;
    position: relative;
}
.provider-card:hover { box-shadow: var(--shadow); }

/* قائمة الثلاث نقاط على البطاقة */
.card-menu-wrap {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 5;
}
body.lang-en .card-menu-wrap { left: auto; right: 0.75rem; }

.card-menu-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.card-menu-btn:hover,
.card-menu-btn[aria-expanded="true"] {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.card-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
    padding: 0.35rem;
    z-index: 20;
}
body.lang-en .card-dropdown { left: auto; right: 0; }

.card-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.9rem;
    text-align: right;
    cursor: pointer;
    border-radius: 8px;
    color: var(--text);
    transition: background 0.15s;
}
body.lang-en .card-dropdown-item { text-align: left; }
.card-dropdown-item i { width: 18px; color: var(--primary); }
.card-dropdown-item:hover { background: rgba(26, 77, 140, 0.08); }
.card-dropdown-item-danger i { color: #dc2626; }
.card-dropdown-item-danger:hover { background: #fef2f2; }

/* نوافذ التقييم والبلاغ */
.feedback-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(3px);
}
.feedback-modal-overlay[hidden] { display: none !important; }

.feedback-modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    max-width: 440px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
}
.feedback-modal-close {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg);
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
}
body.lang-en .feedback-modal-close { left: auto; right: 0.75rem; }
.feedback-modal h2 { margin-bottom: 0.35rem; font-size: 1.25rem; }
.feedback-modal-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.25rem; }
.feedback-modal-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.feedback-modal-actions .btn { flex: 1; min-width: 120px; }

.star-rating {
    display: flex;
    gap: 0.35rem;
    justify-content: center;
    padding: 0.75rem 0;
    direction: ltr;
}
.star-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #d1d5db;
    cursor: pointer;
    padding: 0.15rem;
    transition: transform 0.15s, color 0.15s;
}
.star-btn:hover,
.star-btn.active { transform: scale(1.1); }
.star-btn.active,
.star-btn:hover i.fa-solid { color: #f59e0b; }

.feedback-msg {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
}
.feedback-msg.success { background: #dcfce7; color: #166534; }
.feedback-msg.error { background: #fef2f2; color: #b91c1c; }
.provider-header { display: flex; gap: 1rem; margin-bottom: 1rem; padding-left: 2.75rem; }
body.lang-en .provider-header { padding-left: 0; padding-right: 2.75rem; }
.provider-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}
.provider-info h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.provider-meta { font-size: 0.85rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 0.75rem; }
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 50px; font-size: 0.75rem; font-weight: 600; }
.badge-verified {
  background: #dbeafe;
  color: #1d4ed8;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.badge-verified i { color: #2563eb; }

.admin-alert {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}
.admin-alert.success { background: #dcfce7; color: #166534; }
.admin-alert.error { background: #fee2e2; color: #991b1b; }
.rating { color: var(--accent); }
.provider-bio { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; }
.provider-services { font-size: 0.85rem; margin-bottom: 1rem; }
.provider-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.provider-actions a,
.provider-actions .btn-book-site { flex: 1 1 calc(33.333% - 0.35rem); min-width: 6.5rem; text-align: center; justify-content: center; }
.btn-book-site {
  background: linear-gradient(135deg, #0d9488, #0891b2);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}
.btn-book-site:hover { filter: brightness(1.05); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-google-block { margin-bottom: 0.5rem; }
.google-signin-shell {
  position: relative;
  width: 100%;
  min-height: 44px;
  margin: 0 auto;
}
.btn-google-official {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  background: #fff;
  border: 1px solid #747775;
  border-radius: 4px;
  color: #1f1f1f;
  font-family: 'Roboto', 'Tajawal', sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
  transition: background 0.15s, box-shadow 0.15s;
}
.btn-google-official:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.15);
}
.btn-google-official:active {
  background: #f1f3f4;
}
.btn-google-icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}
.btn-google-text { white-space: nowrap; }
.google-signin-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: stretch;
  justify-content: center;
  opacity: 0.011;
  overflow: hidden;
  border-radius: 4px;
}
.google-signin-overlay > div,
.google-signin-overlay iframe {
  width: 100% !important;
  min-height: 44px !important;
  margin: 0 !important;
}
.auth-google-hint,
.auth-google-setup {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
  line-height: 1.5;
}
.auth-google-setup {
  color: #b45309;
  background: #fffbeb;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid #fde68a;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  margin-inline-start: 0.25rem;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  vertical-align: middle;
}

.bookings-page { padding: 2rem 0 3rem; }
.bookings-list { display: grid; gap: 1rem; max-width: 720px; margin: 0 auto; }
.booking-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.booking-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 0.75rem; }
.booking-card-head h3 { margin: 0; font-size: 1.1rem; }
.booking-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}
.booking-status-pending .booking-badge { background: #fef3c7; color: #92400e; }
.booking-status-accepted .booking-badge { background: #dcfce7; color: #166534; }
.booking-status-rejected .booking-badge { background: #fee2e2; color: #991b1b; }
.booking-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.booking-message { margin-bottom: 0.75rem; line-height: 1.6; }
.booking-notice { font-size: 0.9rem; display: flex; align-items: center; gap: 0.5rem; }
.booking-notice.success { color: #166534; }
.booking-notice.pending { color: #92400e; }
.booking-notice.muted { color: var(--text-muted); }
.booking-pending-alert { color: #b45309; font-weight: 600; margin-top: 0.5rem; }
.booking-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.booking-action-form { flex: 1; min-width: 8rem; }
.booking-action-form .btn { width: 100%; }
.booking-client-contact { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.booking-phone-label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.booking-phone-value { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.75rem; letter-spacing: 0.02em; }
.feedback-msg.success { background: #f0fdf4; color: #166534; padding: 0.75rem; border-radius: var(--radius); }
.feedback-msg.error { background: #fef2f2; color: #b91c1c; padding: 0.75rem; border-radius: var(--radius); }

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 1rem; color: var(--border); }

/* Onboarding (tardak style) */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    z-index: 200;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.onboarding-modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    max-width: 520px;
    width: 100%;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}
.onboarding-modal h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.onboarding-modal p { color: var(--text-muted); margin-bottom: 1.5rem; }
.onboarding-steps { display: none; }
.onboarding-steps.active { display: block; }
.step-dots { display: flex; justify-content: center; gap: 0.5rem; margin: 1.5rem 0; }
.step-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.step-dot.active { background: var(--primary); width: 24px; border-radius: 4px; }

.role-cards { display: grid; gap: 1rem; margin-top: 1.5rem; }
.role-card {
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-decoration: none;
    color: var(--text);
    text-align: right;
    transition: all 0.2s;
}
.role-card:hover { border-color: var(--primary); background: rgba(13,148,136,0.04); }
.role-card i { font-size: 1.5rem; color: var(--primary); margin-bottom: 0.5rem; }
.role-card h3 { margin-bottom: 0.25rem; }
.role-card p { font-size: 0.85rem; color: var(--text-muted); }

/* How it works */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}
.step-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    text-align: center;
    border: 1px solid var(--border);
}
.step-num {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    margin: 0 auto 1rem;
}

/* Forms */
.auth-page { min-height: calc(100vh - 200px); display: flex; align-items: center; padding: 2rem 0; }
.auth-card {
    max-width: 440px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    width: 100%;
}
.auth-card h1 { text-align: center; margin-bottom: 0.5rem; }
.auth-card .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
}
.form-group textarea { min-height: 100px; resize: vertical; }
.form-error { background: #fef2f2; color: #b91c1c; padding: 0.75rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.9rem; }
.form-success { background: #f0fdf4; color: #166534; padding: 0.75rem; border-radius: var(--radius); margin-bottom: 1rem; }
.auth-footer { text-align: center; margin-top: 1rem; font-size: 0.9rem; color: var(--text-muted); }
.auth-footer a { color: var(--primary); font-weight: 600; }

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.checkbox-item { display: flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; }

/* Multi-select dropdown */
.multi-select {
    position: relative;
    width: 100%;
}
.multi-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-muted);
    cursor: pointer;
    text-align: right;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.multi-select-trigger:hover,
.multi-select.open .multi-select-trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 77, 140, 0.12);
}
.multi-select-label.has-value { color: var(--primary); font-weight: 600; }
.multi-select-trigger i {
    transition: transform 0.25s;
    color: var(--accent);
    font-size: 0.85rem;
}
.multi-select.open .multi-select-trigger i { transform: rotate(180deg); }
.multi-select-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 50;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.15);
    overflow: hidden;
}
.multi-select.open .multi-select-panel { display: block; }
.multi-select-search {
    width: 100%;
    padding: 0.65rem 1rem;
    border: none;
    border-bottom: 1px solid var(--border);
    font-family: inherit;
    font-size: 0.9rem;
    background: var(--bg);
}
.multi-select-search:focus { outline: none; background: #fff; }
.multi-select-options {
    max-height: 280px;
    overflow-y: auto;
    padding: 0.5rem 0;
}
.multi-select-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: none;
    padding: 0.5rem 1rem 0.35rem;
    margin: 0;
    background: linear-gradient(90deg, rgba(245, 124, 0, 0.08), transparent);
    border-right: 3px solid var(--accent);
}
.multi-select-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.15s;
}
.multi-select-option:hover { background: rgba(26, 77, 140, 0.06); }
.multi-select-option.selected {
    background: rgba(26, 77, 140, 0.1);
    color: var(--primary);
    font-weight: 600;
}
.multi-select-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    flex-shrink: 0;
}
.multi-select-option span { flex: 1; }
.multi-select-option span i { color: var(--accent); margin-left: 0.35rem; }
.multi-select-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
    min-height: 0;
}
.multi-chip {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: linear-gradient(135deg, rgba(26, 77, 140, 0.12), rgba(245, 124, 0, 0.1));
    border: 1px solid rgba(26, 77, 140, 0.2);
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--primary-dark);
}
.multi-chip-more { background: var(--accent); color: #fff; border-color: var(--accent); }

.multi-select-group.collapsible .multi-select-group-title {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: right;
    transition: background 0.15s;
}
.multi-select-group.collapsible .multi-select-group-title:hover {
    background: rgba(26, 77, 140, 0.06);
}
.multi-select-group-title .cat-icon {
    color: var(--primary);
    width: 1.1rem;
    text-align: center;
}
.multi-select-group-title .group-chevron {
    margin-right: auto;
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}
.multi-select-group.expanded .group-chevron { transform: rotate(180deg); }
.multi-select-group.collapsed .multi-select-group-body { display: none; }
.multi-select-group.expanded .multi-select-group-body { display: block; }
.multi-select-filter .multi-select-panel { z-index: 60; }
.filters-bar .multi-select { min-width: 200px; }

/* شريط العدّ التنازلي (نمط Temu) */
.sub-countdown-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1101;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    padding: 0 1rem;
    background: linear-gradient(90deg, #c62828 0%, #e65100 45%, #f57c00 100%);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 2px 12px rgba(198, 40, 40, 0.35);
    overflow: hidden;
}
.sub-countdown-bar--demo {
    background: linear-gradient(90deg, #6a1b9a 0%, #c62828 50%, #e65100 100%);
}
.sub-countdown-bar--demo .sub-countdown-bar__text::after {
    content: ' (معاينة)';
    font-weight: 500;
    opacity: 0.9;
}
body.lang-en .sub-countdown-bar--demo .sub-countdown-bar__text::after {
    content: ' (preview)';
}
.sub-countdown-bar__text {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}
.sub-countdown-bar__text i { font-size: 0.9rem; }
.sub-countdown-units {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    direction: ltr;
}
.sub-countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 2.35rem;
    padding: 0.1rem 0.35rem 0.15rem;
    background: rgba(0, 0, 0, 0.22);
    border-radius: 5px;
    line-height: 1.05;
}
.sub-countdown-unit strong {
    font-size: 1rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}
.sub-countdown-unit small {
    font-size: 0.55rem;
    font-weight: 600;
    opacity: 0.92;
    text-transform: uppercase;
}
.sub-countdown-sep {
    font-weight: 800;
    font-size: 0.95rem;
    opacity: 0.85;
    margin: 0 0.05rem;
    padding-bottom: 0.5rem;
}
.sub-countdown-bar__cta {
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.95;
    white-space: nowrap;
}
.sub-countdown-bar__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    transition: width 1s linear;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}
.sub-countdown-bar--ended {
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 0.35s, transform 0.35s;
}
body.has-sub-countdown-bar { padding-top: 40px; }
body.has-sub-countdown-bar .site-header {
    top: 40px;
}
body.subscription-modal-open { overflow: hidden; }

@media (max-width: 640px) {
    .sub-countdown-bar {
        height: auto;
        min-height: 40px;
        padding: 0.35rem 0.5rem;
    }
    .sub-countdown-bar__cta { display: none; }
    body.has-sub-countdown-bar { padding-top: 48px; }
    body.has-sub-countdown-bar .site-header { top: 48px; }
}

.subscription-trial-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, rgba(26, 77, 140, 0.1), rgba(245, 124, 0, 0.08));
    border: 1px solid rgba(26, 77, 140, 0.2);
    border-radius: var(--radius);
}
.subscription-trial-banner i { color: var(--accent); font-size: 1.25rem; margin-top: 0.15rem; }
.subscription-trial-banner.expired {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.25);
}
.subscription-trial-banner.expired i { color: #dc2626; }
.profile-expired-banner { margin-top: 0.5rem; }

.subscription-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.subscription-modal-overlay.open { display: flex; }
.subscription-modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
}
.subscription-modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #dc2626;
}
.subscription-modal h2 { font-size: 1.25rem; margin-bottom: 0.75rem; color: var(--text); }
.subscription-modal-desc { color: var(--text-muted); margin-bottom: 0.5rem; line-height: 1.7; }
.subscription-modal-note { font-size: 0.9rem; color: var(--accent-dark); margin-bottom: 1.25rem; }
.subscription-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.subscription-modal-actions .btn { justify-content: center; }
.subscription-modal-no-phone { color: var(--text-muted); font-size: 0.9rem; }

.insta-social { min-width: 2.5rem; padding-left: 0.65rem; padding-right: 0.65rem; }
.insta-social .fa-instagram { color: #e1306c; }
.insta-social .fa-facebook { color: #1877f2; }

/* صفحات قانونية */
.legal-page { padding: 2rem 0 3rem; max-width: 820px; }
.legal-page .page-header { margin-bottom: 1.5rem; }
.legal-page .page-header h1 { font-size: 1.75rem; margin-bottom: 0.35rem; }
.legal-updated { color: var(--text-muted); font-size: 0.9rem; }
.legal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    line-height: 1.85;
    font-size: 1rem;
}
.legal-content p { margin-bottom: 1.15rem; }
.legal-content p:last-child { margin-bottom: 0; }
.legal-back { margin-top: 1.5rem; }

/* Footer */
.site-footer {
    background: var(--text);
    color: #94a3b8;
    padding: 3rem 0 0;
    margin-top: 4rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
}
.footer-brand .logo { color: white; margin-bottom: 0.75rem; }
.site-footer h4 { color: white; margin-bottom: 0.75rem; font-size: 1rem; }
.site-footer ul { list-style: none; }
.site-footer a { color: #94a3b8; text-decoration: none; }
.site-footer a:hover { color: white; }
.footer-bottom { border-top: 1px solid #334155; padding: 1rem 0; text-align: center; font-size: 0.85rem; }

/* Responsive — قائمة الجوال */
@media (max-width: 900px) {
    .header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.65rem 1rem;
    }

    .header-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 0.75rem;
    }

    .mobile-menu-btn { display: flex; }

    .header-menu {
        display: none !important;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
        padding: 0.5rem 0 1rem;
        border-top: 1px solid var(--border);
        margin-top: 0.65rem;
        background: var(--surface);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .header-inner.menu-open .header-menu,
    .header-menu.is-open {
        display: flex !important;
    }

    .main-nav {
        flex-direction: column;
        flex: none;
        width: 100%;
        gap: 0;
        padding: 0.25rem 0;
    }

    .main-nav a {
        display: block;
        padding: 0.85rem 0.25rem;
        font-size: 1rem;
        border-bottom: 1px solid var(--border);
    }

    .main-nav a:last-child { border-bottom: none; }

    .main-nav a.active {
        color: var(--primary);
        font-weight: 700;
        background: rgba(26, 77, 140, 0.06);
        padding-right: 0.75rem;
        border-radius: 8px;
    }

    .region-filter-header {
        width: 100%;
        margin: 0.75rem 0;
        padding: 0.65rem 1rem;
    }

    .region-filter-header select {
        flex: 1;
        width: 100%;
        min-width: 0;
    }

    .header-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--border);
    }

    .header-actions .btn {
        width: 100%;
        padding: 0.75rem 1rem;
    }

    .user-greeting {
        text-align: center;
        width: 100%;
        padding: 0.35rem 0;
    }

    .lang-switcher {
        width: 100%;
        justify-content: center;
        margin: 0.5rem 0;
    }

    .footer-grid { grid-template-columns: 1fr; }
}

@media (min-width: 901px) {
    .header-inner.menu-open .header-menu { display: flex; }
    .nav-backdrop { display: none !important; }
}

@media (max-width: 600px) {
    .hero { padding: 2.5rem 0 3.5rem; }
    .hero-stats { gap: 1.5rem; }
    .providers-grid { grid-template-columns: 1fr; }
}

/* Profile page */
.profile-page { padding: 2rem 0 3rem; }
.profile-hero {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 2rem;
}
.profile-hero-bg {
    height: 120px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
}
.profile-hero-content {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 0 1.75rem 1.75rem;
    margin-top: -3rem;
    align-items: flex-start;
}
.profile-avatar-wrap {
    flex-shrink: 0;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 4px solid var(--surface);
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.profile-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-letter { font-size: 2.5rem; font-weight: 800; color: #fff; }
.profile-hero-info { flex: 1; min-width: 220px; padding-top: 3.5rem; }
.profile-hero-info h1 { font-size: 1.65rem; margin-bottom: 0.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.profile-stats { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.75rem; }
.profile-stat-price { color: var(--accent-dark); font-weight: 600; }
.profile-bio { margin: 0.75rem 0; line-height: 1.7; }
.profile-services, .profile-regions { font-size: 0.95rem; color: var(--text-muted); margin: 0.35rem 0; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.profile-section { margin-bottom: 2.5rem; }
.profile-section h2 { font-size: 1.25rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.profile-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.profile-gallery-item {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 0;
}
.profile-gallery-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.profile-gallery-item figcaption { padding: 0.65rem 0.85rem; font-size: 0.85rem; color: var(--text-muted); }
.profile-reviews { display: flex; flex-direction: column; gap: 0.75rem; }
.profile-review {
    background: var(--surface);
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.profile-review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-bottom: 0.35rem; }
.profile-review-stars { color: #f59e0b; }
.profile-review time { font-size: 0.8rem; color: var(--text-muted); margin-inline-start: auto; }
.profile-empty { color: var(--text-muted); padding: 1rem; background: var(--surface); border-radius: var(--radius); }

/* Settings */
.settings-page { padding: 2rem 0 3rem; }
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    align-items: start;
}
.settings-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.settings-card-wide { grid-column: 1 / -1; }
@media (min-width: 900px) {
    .settings-card-wide { grid-column: span 2; }
    .settings-grid { grid-template-columns: repeat(2, 1fr); }
}
.settings-card h2 { font-size: 1.1rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.settings-hint { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.75rem; }
.settings-avatar-preview {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    overflow: hidden;
    margin-bottom: 1rem;
}
.settings-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.settings-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}
.settings-post-item { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; }
.settings-post-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.settings-post-item figcaption { font-size: 0.75rem; padding: 0.35rem; }
.settings-post-delete { position: absolute; top: 0.35rem; inset-inline-end: 0.35rem; }
.label-optional { font-weight: 400; color: var(--text-muted); font-size: 0.85em; }
.form-success { background: #ecfdf5; color: #047857; padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
.feedback-login-hint { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.5rem; }

/* Provider card enhancements */
.provider-avatar-img-wrap { padding: 0; overflow: hidden; }
.provider-avatar-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.provider-name-link { color: inherit; text-decoration: none; }
.provider-name-link:hover { color: var(--primary); }
.card-dropdown-item-disabled { opacity: 0.45; cursor: not-allowed; }

.profile-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.profile-section-head h2 { margin-bottom: 0; }
.profile-avatar-btn {
    border: none;
    padding: 0;
    background: none;
    cursor: zoom-in;
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
}
.profile-gallery-zoom {
    border: none;
    padding: 0;
    background: none;
    cursor: zoom-in;
    display: block;
    width: 100%;
    line-height: 0;
}
.profile-gallery-zoom img { transition: transform 0.2s; }
.profile-gallery-zoom:hover img { transform: scale(1.03); }

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 23, 42, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.image-lightbox[hidden] { display: none !important; }
.image-lightbox-inner { max-width: min(95vw, 900px); max-height: 90vh; margin: 0; text-align: center; }
.image-lightbox-inner img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}
.image-lightbox-inner figcaption {
    color: #e2e8f0;
    margin-top: 0.75rem;
    font-size: 0.95rem;
}
.image-lightbox-close {
    position: absolute;
    top: 1rem;
    inset-inline-end: 1rem;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}
.image-lightbox-close:hover { background: rgba(255,255,255,0.25); }
.publish-work-modal { max-width: 420px; }
.publish-preview-wrap {
    margin-bottom: 1rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}
.publish-preview-wrap img { width: 100%; max-height: 220px; object-fit: cover; display: block; }

/* Instagram-style profile */
.insta-profile-wrap { padding: 1.5rem 0 3rem; max-width: 600px; margin: 0 auto; }
.insta-profile { background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow); }
.insta-header { padding: 1.25rem 1.25rem 0.75rem; }
.insta-header-row { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 1rem; }
.insta-avatar-ring {
    width: 86px; height: 86px; flex-shrink: 0; border-radius: 50%;
    padding: 2px;
    background: #dbdbdb;
    box-sizing: border-box;
}
.insta-avatar-btn, .insta-avatar-fallback {
    width: 100%; height: 100%; border-radius: 50%; border: 2px solid var(--surface);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    background: #efefef; color: #262626; font-size: 2rem; font-weight: 600;
}
.insta-avatar-btn { padding: 0; cursor: zoom-in; }
.insta-avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.insta-stats { list-style: none; display: flex; flex: 1; justify-content: space-around; text-align: center; margin: 0; padding: 0; }
.insta-stats strong { display: block; font-size: 1.15rem; }
.insta-stats span { font-size: 0.75rem; color: var(--text-muted); }
.insta-name { font-size: 1.1rem; margin-bottom: 0.35rem; display: flex; align-items: center; gap: 0.35rem; }
.insta-verified { color: #1d9bf0; font-size: 0.95rem; }
.insta-bio { font-size: 0.9rem; margin-bottom: 0.5rem; white-space: pre-wrap; }
.insta-meta-line { font-size: 0.85rem; color: var(--text-muted); margin: 0.2rem 0; }
.insta-meta-line i { width: 1.1rem; color: var(--primary); }
.insta-price { color: var(--accent-dark); font-weight: 600; }
.insta-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.insta-btn { flex: 1; min-width: 0; justify-content: center; }
.insta-tabs {
    display: flex; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.insta-tab {
    flex: 1; padding: 0.75rem; border: none; background: none; cursor: pointer;
    color: var(--text-muted); font-size: 1rem; border-bottom: 2px solid transparent;
}
.insta-tab.active { color: var(--text); border-bottom-color: var(--text); }
.insta-panel { min-height: 200px; }
.insta-panel[hidden] { display: none !important; }
.insta-empty { text-align: center; padding: 3rem 1.5rem; color: var(--text-muted); }
.insta-empty i { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.4; }
.insta-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px;
    background: var(--border);
}
.insta-grid-item {
    position: relative; aspect-ratio: 1; padding: 0; border: none; cursor: pointer;
    background: #000; overflow: hidden;
}
.insta-grid-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity 0.15s; }
.insta-grid-item:hover img { opacity: 0.85; }
.insta-grid-overlay {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    gap: 0.35rem; color: #fff; font-weight: 600; font-size: 0.9rem;
    background: rgba(0,0,0,0.35); opacity: 0; transition: opacity 0.15s;
}
.insta-grid-item:hover .insta-grid-overlay { opacity: 1; }
.insta-reviews { padding: 0.75rem; }
.insta-review { padding: 0.85rem; border-bottom: 1px solid var(--border); }
.insta-review time { font-size: 0.75rem; color: var(--text-muted); }
.insta-review-stars { color: #f59e0b; margin-inline-start: 0.5rem; }

.category-count { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; }
.category-count-zero { color: var(--text-muted); opacity: 0.85; font-size: 0.8rem; }

.post-modal-overlay {
    position: fixed; inset: 0; z-index: 2100; background: rgba(0,0,0,0.85);
    display: flex; align-items: center; justify-content: center; padding: 0;
}
.post-modal-overlay[hidden] { display: none !important; }
.post-modal {
    background: var(--surface); width: 100%; max-width: 480px;
    height: 100%; max-height: 100dvh; overflow: hidden; position: relative;
    display: flex; flex-direction: column; border-radius: 0;
}
@media (min-width: 768px) {
    .post-modal { max-height: 92vh; height: auto; border-radius: var(--radius-lg); max-width: 420px; }
}
.post-modal-close {
    position: absolute; top: 0.5rem; inset-inline-start: 0.5rem; z-index: 5;
    width: 36px; height: 36px; border: none; border-radius: 50%; background: rgba(0,0,0,0.55);
    color: #fff; font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.post-modal-body {
    display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden;
}
.post-modal-media {
    flex: 0 0 auto; width: 100%; height: min(42vh, 360px); max-height: 42vh;
    background: #000; display: flex; align-items: center; justify-content: center;
    overflow: hidden; position: relative;
}
.post-modal-media img {
    width: 100%; height: 100%; max-width: 100%; max-height: 100%;
    object-fit: contain; display: block;
}
.post-modal-side {
    flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column;
    overflow: hidden; border-top: 1px solid var(--border);
}
.post-modal-header {
    flex-shrink: 0; padding: 0.65rem 1rem; border-bottom: 1px solid var(--border);
    font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.post-modal-comments-scroll {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
.post-modal-caption-wrap {
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
}
.post-modal-caption-wrap p { margin: 0; line-height: 1.45; word-break: break-word; }
.post-modal-date { display: block; font-size: 0.68rem; color: var(--text-muted); margin-top: 0.25rem; }
.post-modal-comments {
    padding: 0;
    background: var(--surface);
    min-height: 0;
}
.post-comments-list {
    margin: 0;
    padding: 0;
}
.post-comment {
    position: relative;
    margin: 0;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.post-comment:last-child {
    border-bottom: none;
}
.post-comment-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding-inline-end: 1.75rem;
}
.post-comment-avatar {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #efefef;
    color: #262626;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    border: 1px solid #dbdbdb;
    box-sizing: border-box;
}
.post-comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.post-comment-body {
    flex: 1;
    min-width: 0;
}
.post-comment-line {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.4;
    word-break: break-word;
    white-space: pre-wrap;
}
.post-comment-user {
    font-weight: 700;
    font-size: inherit;
    color: var(--text);
}
.post-comment-text {
    font-weight: 400;
    color: var(--text);
}
.post-comment-meta {
    margin-top: 0.2rem;
}
.post-comment-meta time {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: lowercase;
}
.post-comment-report {
    position: absolute;
    top: 0.5rem;
    inset-inline-end: 0.65rem;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.2rem 0.35rem;
    font-size: 0.85rem;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.post-comment-report:hover {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
}
.post-comment-report.is-reported {
    color: #94a3b8;
    cursor: default;
    opacity: 0.6;
}
.post-no-comments, .post-loading {
    color: var(--text-muted);
    font-size: 0.82rem;
    padding: 1rem;
    margin: 0;
    text-align: center;
}
.report-comment-modal { max-width: 380px; }
.post-modal-footer {
    flex-shrink: 0; border-top: 1px solid var(--border); background: var(--surface);
    padding: 0.5rem 0.65rem calc(0.5rem + env(safe-area-inset-bottom));
}
.post-comment-form {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
}
.post-comment-form input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.3;
    height: auto;
    min-height: 0;
}
.post-comment-form .btn {
    flex-shrink: 0;
    padding: 0.4rem 0.8rem;
    font-size: 0.82rem;
}
.post-modal-footer .feedback-msg { margin: 0.35rem 0 0; font-size: 0.8rem; }
.post-action-btn-inline {
    border: none; background: none; cursor: pointer; color: var(--text);
    padding: 0.35rem; font-size: 1.1rem; line-height: 1;
}
.post-action-btn-inline:hover { color: var(--primary); }
.post-modal-media.is-error::after {
    content: attr(data-error);
    color: #94a3b8; font-size: 0.85rem; padding: 1rem; text-align: center;
}
