/*──────────────────────────────────────────────────────────
  OPUS Design System
  Loaded AFTER Bootstrap 5 — overrides Bootstrap defaults
  to keep our brand identity.

  TABLE OF CONTENTS
  ─────────────────
  1.  Design Tokens / CSS Variables .............. :root
  2.  Bootstrap Overrides ....................... ~L 39
  3.  Sidebar ................................... ~L 66
  4.  Dashboard Layout .......................... ~L 145
  5.  Stat Cards ................................ ~L 200
  6.  Site Footer ............................... ~L 263
  7.  Hero / Features / How It Works ............ ~L 1034
  8.  Auth Pages ................................ ~L 1231
  9.  Listing Grid / Cards ...................... ~L 1372
  10. Pagination ................................ ~L 1416
  11. Data Table ................................ ~L 1463
  12. Status Badges ............................. ~L 1543
  13. Review Cards .............................. ~L 1592
  14. Profile Pages ............................. ~L 1610
  15. Dashboard Forms / Inventory ............... ~L 1712
  16. Detail Pages .............................. ~L 1812
  17. Animations & Micro-interactions ........... ~L 1849
  18. Light-mode Overrides ...................... ~L 2018
  19. Dark-mode Overrides ....................... ~L 2200+
  20. Responsive / Media Queries ................ ~L 2800+

  BUILD: python build_css.py         → style.min.css
         python build_css.py --stats → section breakdown
──────────────────────────────────────────────────────────*/
:root{
    /* Design tokens */
    --color-bg: #f5f7fb;
    --color-surface: #ffffff;
    --color-primary: #ff7a00;
    --color-primary-strong: #ff9a1c;
    --color-muted: #666666;
    --color-text: #0b2e4a;
    --radius-lg: 12px;
    --radius-md: 8px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --shadow-soft: 0 6px 20px rgba(15,23,42,0.06);
    --max-width: 1200px;
    --font-sans: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Global box-sizing — prevent width + padding overflow */
*, *::before, *::after{ box-sizing: border-box; }

/* Prevent horizontal scroll on body */
html, body{ overflow-x: hidden; max-width: 100vw; }

:root{
    /* Typographic scale */
    --type-h1: 34px;
    --type-h2: 28px;
    --type-h3: 20px;
    --type-base: 15px;
    --leading-tight: 1.18;
    --leading-relaxed: 1.6;

    /* Override Bootstrap's primary color with our orange */
    --bs-primary-rgb: 255, 122, 0;
    --bs-primary: #ff7a00;
    --bs-link-color: var(--color-primary);
    --bs-body-font-family: var(--font-sans);
    --bs-body-color: var(--color-text);
    --bs-body-bg: var(--color-bg);
}

/* ── Bootstrap overrides ──────────────────────────────── */
body{
    font-family: var(--font-sans);
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
    overflow-x: hidden;
}
html{ overflow-x: hidden; }

/* Keep our card style instead of Bootstrap's */
.card{ border: none; }

/* Tame Bootstrap's .container so it doesn't conflict with ours */
.container{ max-width: var(--max-width); }

/* Make Bootstrap tables inherit our font */
.table{ color: var(--color-text); font-size: var(--type-base); }

/*──────────────────────────────────────────────────────────
  DASHBOARD LAYOUT  —  sidebar + main area
──────────────────────────────────────────────────────────*/
.dashboard-wrapper{
    display: flex;
    min-height: calc(100vh - 80px);        /* below the navbar */
}

/* ── Sidebar ──────────────────────────────────────────── */
.sidebar{
    width: 240px;
    min-width: 240px;
    background: var(--color-surface);
    border-right: 1px solid rgba(0,0,0,0.06);
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 80px;                              /* navbar height */
    height: calc(100vh - 80px);
    overflow-y: auto;
    z-index: 50;
    transition: transform .25s ease;
}
.sidebar-close{
    display: none;                          /* only visible on mobile */
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-muted);
}
.sidebar-nav ul{
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar-nav li + li{ margin-top: 2px; }
.sidebar-nav a{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background .15s, border-color .15s, color .15s;
}
.sidebar-nav a:hover{
    background: rgba(255,122,0,0.06);
    color: var(--color-primary);
}
.sidebar-nav a.active{
    background: rgba(255,122,0,0.10);
    border-left-color: var(--color-primary);
    color: var(--color-primary);
    font-weight: 700;
}
.sidebar-divider{
    padding: 12px 16px 6px;
    margin-top: 8px;
}
.sidebar-divider span{
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-muted);
    opacity: 0.7;
}
.sidebar-icon{
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.sidebar-overlay{
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 49;
}
.sidebar-toggle{
    display: none;                          /* shown on mobile */
    background: var(--color-surface);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    margin-bottom: 12px;
}

/* ── Dashboard main panel ─────────────────────────────── */
.dashboard-main{
    flex: 1;
    min-width: 0;                           /* prevents flex blowout */
    padding: 24px 32px;
}

/* ── Page header ──────────────────────────────────────── */
.page-header{
    margin-bottom: 28px;
}
.breadcrumbs ol{
    list-style: none;
    display: flex;
    gap: 6px;
    padding: 0;
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--color-muted);
}
.breadcrumbs li + li::before{
    content: "/";
    margin-right: 6px;
    color: #ccc;
}
.breadcrumbs a{
    color: var(--color-muted);
    text-decoration: none;
}
.breadcrumbs a:hover{ text-decoration: underline; color: var(--color-primary); }
.breadcrumbs .active{ font-weight: 600; color: var(--color-text); }

.page-header-row{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.page-header-text h1{
    font-size: var(--type-h2);
    margin: 0 0 4px;
    line-height: var(--leading-tight);
}
.page-header-text p{
    margin: 0;
    color: var(--color-muted);
    font-size: 14px;
}
.page-header-actions{
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Stat cards row ───────────────────────────────────── */
.stat-cards{
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.stat-card{
    flex: 1 1 0;
    min-width: 140px;
    background: var(--color-surface);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    text-decoration: none;
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: transform .15s, box-shadow .15s;
}
.stat-card:hover{
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(15,23,42,0.10);
}
.stat-label{
    font-size: 13px;
    color: var(--color-muted);
    font-weight: 500;
}
.stat-value{
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
}
.stat-value-sm{ font-size: 20px; }
.stat-icon{
    font-size: 22px;
    margin-bottom: 4px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}
.stat-icon-blue{   background: rgba(37,99,235,.10); }
.stat-icon-green{  background: rgba(22,163,74,.10); }
.stat-icon-amber{  background: rgba(245,158,11,.10); }
.stat-icon-purple{ background: rgba(139,92,246,.10); }
.stat-icon-teal{   background: rgba(20,184,166,.10); }

/* (Quick actions moved to Step 5 section) */

/* ── Dash section spacing ─────────────────────────────── */
.dash-section{
    margin-bottom: 28px;
    max-width: 100%;
    overflow-x: auto;
}
.dash-section h3{
    font-size: var(--type-h3);
    margin: 0 0 14px;
}

/* ── Site Footer ──────────────────────────────────────── */
.site-footer{
    background: #0b2e4a;
    color: rgba(255,255,255,0.75);
    padding: 40px 0 24px;
    font-size: 14px;
}
.footer-inner{
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}
.footer-brand{
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}
.footer-logo{
    height: 40px;
    width: auto;
    border-radius: 8px;
}
.footer-tagline{
    font-size: 14px;
    line-height: 1.4;
    color: rgba(255,255,255,0.5);
}
.footer-links{
    display: flex;
    gap: 48px;
    margin-bottom: 28px;
}
.footer-col{
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.footer-col h6{
    margin: 0 0 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.45);
}
.footer-col a{
    color: rgba(255,255,255,0.75);
    text-decoration: none;
}
.footer-col a:hover{
    color: #fff;
    text-decoration: underline;
}
.footer-bottom{
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 16px;
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}

/* (Responsive rules consolidated in Step 4 section below) */

/* Flash-message container */
.flash-container{
    max-width: var(--max-width);
    margin: 16px auto 0;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.flash-container .alert{
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-soft);
}
.flash-container .alert-icon{
    font-size: 16px;
    flex-shrink: 0;
}

/* Global typography adjustments for client pages */
.opus-container h1{ font-size: var(--type-h1); line-height: var(--leading-tight); margin: 8px 0 14px; color: var(--color-text) }
.opus-container h2{ font-size: var(--type-h2); line-height: 1.2; margin: 6px 0 12px }
.opus-container h3{ font-size: var(--type-h3); margin:0 0 8px }
.opus-container p{ font-size: var(--type-base); line-height: var(--leading-relaxed); color: #444 }

/* Welcome section refinement */
.welcome-section{ background: var(--color-surface); padding: 22px; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); display:flex; align-items:center; justify-content:space-between; gap:16px }
.welcome-text h2{ font-size:26px; margin:0 }
.welcome-text p{ margin:0; color:var(--color-muted); font-size:14px }

/* Job list / card spacing */
.job-list{ display:grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap:18px }
.job-list .card{ padding:16px }
.job-list .job-title{ font-size:16px }
.job-list .job-description{ max-height:90px }

/* (Empty state moved to Step 5 section) */

.topbar{
    background: #ffffff;
    color: #111;
    padding: 20px;
}
.logo{
    margin: 0px;
    font-size: 24px;
}

.container{
    padding: 20px;
}

.primary-btn{
    padding: 12px 18px;
    border: none;
    background-color: orange;
    color: white;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
}
.job-card{
    background: white;
    padding: 15px;
    margin-top: 12px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0,0,0.1);

}
/* post-job css*/
.form-card{
    background: white;
    padding: 24px;
    border-radius: 12px;
    margin-top: 20px;
    max-width: 640px;
    box-shadow: 0 8px 24px rgba(15,23,42,0.06);
}

/* Inputs: full width, consistent spacing */
input, textarea, select {
    width: 100%;
    padding: 12px 14px;
    margin: 8px 0 14px;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
    box-sizing: border-box;
    font-size: 14px;
    background: #fff;
}
textarea{ min-height: 120px }

/* Password toggle inside input wrapper */
.password-wrapper{ position: relative; display: flex; align-items: stretch; }
.password-wrapper input[type="password"],
.password-wrapper input[type="text"]{
    padding-right: 90px; /* room for toggle */
    margin: 0 !important;   /* kill global input margin so toggle stays centered */
    flex: 1;
}
.password-toggle{
    position: absolute;
    right: 10px;
    top: 0;
    bottom: 0;
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 4px;
    color: #888;
    font-size: 11px;
    line-height: 1;
}
.password-toggle svg{ flex-shrink: 0; width: 15px; height: 15px; }
.password-toggle:focus{ outline: none; }

/* Navbar and logo */
.navbar{
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    padding: 12px 28px;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 60;
    overflow: visible;
}
.nav-toggle{ display:none; background:transparent; border:none; padding:8px; border-radius:8px; cursor:pointer }
.nav-toggle svg{ display:block }
.nav-left{ display:flex; align-items:center; gap:12px; overflow:visible; flex-shrink:0; }
.logo-container{ display:inline-flex; align-items:center; justify-content:center; overflow:visible; flex-shrink:0; }
.logo-img{ height:52px; width:auto; display:block; object-fit:contain; }
.logo{ display:flex; align-items:center; gap:8px; text-decoration:none; flex-shrink:0; overflow:visible; }
.logo-text{
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight:700;
    font-size:18px;
    margin-left:6px;
    color:var(--color-text);
    letter-spacing:0.2px;
}
.nav-right a{ margin-left:12px; color:#333; text-decoration:none; font-size:14px; }
.nav-right a:hover{ text-decoration:underline; }

/* Background image wrapper for selected pages */
.with-bg{ position: relative }
/* allow the page background to show through the overlay pseudo-element */
body.with-bg{ background: transparent; }
.with-bg::before{
    content: "";
    position: fixed;
    inset: 0;
    /* lighter overlay so background image remains visible but text stays readable */
    background-image: linear-gradient(rgba(0,0,0,0.28), rgba(0,0,0,0.18)), url('/static/img/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: -1;
    filter: saturate(0.98) contrast(0.98) brightness(1.0);
}

/* When a page uses the background, make topbar and nav transparent and text white for contrast */
.with-bg .topbar,
.with-bg .navbar{
    /* keep a clean white header on background pages for branding */
    background: rgba(255,255,255,0.96);
    box-shadow: 0 6px 24px rgba(15,23,42,0.08);
    color: #111;
    backdrop-filter: blur(6px);
}
.with-bg .logo-text{ color: #111 }
.with-bg .nav-right a{ color: #333 }
.with-bg .primary-btn{ box-shadow: 0 2px 12px rgba(0,0,0,0.18); background: rgba(255,165,0,0.95); color: #111 }
.with-bg .primary-btn:hover{ background: #ffb14d }
/* make logo container subtle on background pages */
.with-bg .logo-container{ background: transparent; padding:0; border-radius:0; box-shadow: none; }

/* Make text on background pages highly readable (exclude navbar) */
.with-bg .main-content, .with-bg .opus-container,
.with-bg .main-content h1, .with-bg .main-content h2, .with-bg .main-content h3,
.with-bg .main-content p, .with-bg .main-content a{
    color: #fff !important;
}

/* ── Reset text color for home-page sections with their own backgrounds ── */
/* These sections sit inside .main-content but have light/solid backgrounds,
   so text must NOT be forced white. */
.with-bg .categories-section,
.with-bg .categories-section h2, .with-bg .categories-section h3, .with-bg .categories-section h4,
.with-bg .categories-section p, .with-bg .categories-section a,
.with-bg .categories-section span{
    color: var(--color-text) !important;
}
.with-bg .categories-section .section-sub,
.with-bg .categories-section .category-count{
    color: var(--color-muted) !important;
}

.with-bg .features-section,
.with-bg .features-section h2, .with-bg .features-section h3,
.with-bg .features-section p, .with-bg .features-section a{
    color: var(--color-text) !important;
}
.with-bg .features-section .section-sub{ color: var(--color-muted) !important; }
.with-bg .features-section .feature-card p{ color: #4b5563 !important; }
.with-bg .features-section .feature-link{ color: #ff7a00 !important; }

.with-bg .why-section,
.with-bg .why-section h2, .with-bg .why-section h3, .with-bg .why-section h4,
.with-bg .why-section p, .with-bg .why-section a,
.with-bg .why-section span{
    color: var(--color-text) !important;
}
.with-bg .why-section .section-sub,
.with-bg .why-section .why-item p{
    color: var(--color-muted) !important;
}

.with-bg .featured-products-section,
.with-bg .featured-products-section h2, .with-bg .featured-products-section h3, .with-bg .featured-products-section h4,
.with-bg .featured-products-section p, .with-bg .featured-products-section a{
    color: var(--color-text) !important;
}
.with-bg .featured-products-section .section-sub,
.with-bg .featured-products-section .product-supplier{
    color: var(--color-muted) !important;
}
.with-bg .featured-products-section .product-price{ color: #059669 !important; }

/* Testimonials section has dark bg — keep text white */
.with-bg .testimonials-section,
.with-bg .testimonials-section h2, .with-bg .testimonials-section h3,
.with-bg .testimonials-section p{
    color: #fff !important;
}
/* Keep navbar text dark on white background for .with-bg pages */
.with-bg .navbar .nav-links a{ color: #333 !important; }
.with-bg .navbar .nav-links a:hover{ color: var(--color-primary) !important; }
.with-bg .navbar .nav-right a{ color: #333 !important; }
.with-bg .navbar .user-name{ color: #0b2e4a !important; }
.with-bg .navbar .user-menu a{ color: #111 !important; }
.with-bg .navbar .notif-dropdown a{ color: inherit !important; }

/* Reset text inside cards/forms back to proper dark colors on bg pages */
.with-bg .auth-card,
.with-bg .auth-card h1, .with-bg .auth-card h2, .with-bg .auth-card h3,
.with-bg .auth-card p, .with-bg .auth-card a,
.with-bg .auth-card label, .with-bg .auth-card span{
    color: var(--color-text) !important;
}
.with-bg .auth-card .auth-header p{ color: var(--color-muted) !important; }
.with-bg .auth-card .form-forgot a,
.with-bg .auth-card .form-hint a,
.with-bg .auth-card .auth-alt a,
.with-bg .form-card a{
    color: var(--color-primary) !important;
}
.with-bg .auth-card .auth-alt{ color: var(--color-muted) !important; }

/* Ensure feature links are always orange, even on .with-bg pages */
.with-bg .feature-link,
.with-bg .feature-card .feature-link{
    color: #ff7a00 !important;
}
.with-bg .feature-link:hover,
.with-bg .feature-card .feature-link:hover{
    color: #e56a00 !important;
}

.with-bg .form-card,
.with-bg .form-card h1, .with-bg .form-card h2, .with-bg .form-card h3,
.with-bg .form-card p, .with-bg .form-card a,
.with-bg .form-card label, .with-bg .form-card span{
    color: var(--color-text) !important;
}

.with-bg .listing-card,
.with-bg .listing-card h3, .with-bg .listing-card p,
.with-bg .listing-card a, .with-bg .listing-card span{
    color: inherit !important;
}
.with-bg .listing-card h3{ color: #111 !important; }
.with-bg .listing-card p{ color: #555 !important; }
.with-bg .listing-card .listing-price{ color: orange !important; }
.with-bg .listing-card .btn{ color: #0b2e4a !important; }

/* Ensure form cards remain readable on background pages */
.with-bg .form-card{ background: rgba(255,255,255,0.96); color: #111 }

/* Fix contrast and visibility for interactive elements on background pages */
.with-bg .btn,
.with-bg .btn-primary,
.with-bg .btn-secondary,
.with-bg .btn-danger,
.with-bg .primary-btn,
.with-bg .secondary-btn,
.with-bg .ddanger-btn,
.with-bg .action-card {
    color: #0b2e4a !important;
}

.with-bg .btn-primary,
.with-bg .primary-btn{ 
    background: linear-gradient(180deg,#ff9a1c,#ff7a00) !important; 
    color: #111 !important; 
    box-shadow:0 8px 24px rgba(255,122,0,0.12) !important; 
}

.with-bg .btn-danger,
.with-bg .ddanger-btn{
    background: #fff5f0 !important;
    color: #b93a00 !important;
    border: 1px solid rgba(255,120,40,0.12) !important;
}

/* Ensure user menu links are readable on background pages */
.with-bg .user-menu a{ color: #111 !important }

/* Give header action cards clear text color and spacing on background pages */
.with-bg .header-actions .action-card{ color: #0b2e4a !important }

/* Add small spacing between header action buttons to avoid visual overlap */
.header-actions .action-card{ margin-right:6px }

/* Ensure buttons have some margin to avoid overlap in tight layouts */
.btn{ margin: 4px 6px 4px 0 }

/* Logo text style */
.logo-text{ font-weight:800; font-size:20px; margin-left:10px; }

/* Ensure content reads well on top of background */
.with-bg .main-content, .with-bg .dashboard-container, .with-bg .opus-container{ position: relative }

/* Smaller white boxed logo variant for some pages (if needed) */
.logo-small .logo-img{ height:28px }
/* Main content spacing */
.main-content{ max-width:1200px; margin: 24px auto; padding: 0 16px; }
/* Form polish for auth and home pages */
.form-card{ max-width:640px; margin:36px auto; padding:28px; background: rgba(255,255,255,0.98); border-radius:12px; box-shadow:0 10px 30px rgba(15,23,42,0.06); border: 1px solid rgba(0,0,0,0.04) }
.form-card label{ display:block; margin-bottom:8px; font-weight:600; color:#222 }
.form-card input:focus, .form-card textarea:focus, .form-card select:focus{ outline:none; border-color: #ff8a00; box-shadow: 0 6px 20px rgba(255,138,0,0.08) }

/* Primary button (global) */
.btn{ display:inline-flex; align-items:center; gap:8px; justify-content:center; font-weight:700; text-decoration:none; cursor:pointer; border:none }

/* Primary / Secondary / Danger variants */
.btn-primary{ background: linear-gradient(180deg,var(--color-primary-strong),var(--color-primary)); color:#111; padding:12px 18px; border-radius:10px; box-shadow:0 8px 24px rgba(255,122,0,0.12); transition: transform .12s ease, box-shadow .12s ease }
.btn-primary:hover{ transform:translateY(-2px); box-shadow:0 12px 36px rgba(255,122,0,0.16) }

/* Focus styles for accessibility */
.btn:focus, a:focus, button:focus, input:focus, select:focus, textarea:focus{
    outline: 3px solid rgba(255,122,0,0.18);
    outline-offset: 2px;
}

/* (Responsive rules consolidated in Step 4 section below) */
.btn-secondary{ background:transparent; color:#0b2e4a; padding:10px 14px; border-radius:8px; border:1px solid rgba(16,24,40,0.06) }
.btn-secondary:hover{ background: rgba(16,24,40,0.02) }
.btn-danger{ background:#fff5f0; color:#b93a00; padding:10px 14px; border-radius:8px; border:1px solid rgba(255,120,40,0.12); font-weight:700 }
.btn-danger:hover{ background:#fff0e6 }

/* Icon variant for CTAs that include icons */
.btn-icon{ display:inline-flex; align-items:center; gap:8px; padding:10px 12px }

/* Backwards compatibility with older class names */
/* Mirror new btn-* variants so older templates keep working */
.primary-btn{ background: linear-gradient(180deg,#ff9a1c,#ff7a00); color:#111; padding:12px 18px; border-radius:10px; box-shadow:0 8px 24px rgba(255,122,0,0.12); transition: transform .12s ease, box-shadow .12s ease; display:inline-flex; align-items:center; gap:8px; justify-content:center; border:none }
.primary-btn:hover{ transform:translateY(-2px); box-shadow:0 12px 36px rgba(255,122,0,0.16) }
.secondary-btn{ background:transparent; color:#0b2e4a; padding:10px 14px; border-radius:8px; border:1px solid rgba(16,24,40,0.06); display:inline-flex; align-items:center }
.ddanger-btn{ background:#fff5f0; color:#b93a00; padding:10px 14px; border-radius:8px; border:1px solid rgba(255,120,40,0.12); font-weight:700; display:inline-flex; align-items:center }

/* Unified card base for listings, jobs, orders */
.card{ background:#fff; border-radius:12px; overflow:hidden; box-shadow:0 6px 20px rgba(15,23,42,0.06); transition:transform .25s, box-shadow .25s; padding:0 }
.card:hover{ transform:translateY(-6px); box-shadow:0 18px 48px rgba(15,23,42,0.12) }

/* Secondary action button used in headers */
.secondary-btn{
    display:inline-block;
    padding:10px 14px;
    border-radius:8px;
    background: transparent;
    border: 1px solid rgba(16,24,40,0.06);
    color: #0b2e4a;
    font-weight:600;
    text-decoration:none;
}
.secondary-btn:hover{ background: rgba(16,24,40,0.02) }

/* Danger / logout button */
.ddanger-btn{
    display:inline-block;
    padding:10px 14px;
    border-radius:8px;
    background: #fff5f0;
    border: 1px solid rgba(255,120,40,0.12);
    color: #b93a00;
    font-weight:700;
    text-decoration:none;
}
.ddanger-btn:hover{ background:#fff0e6 }

/* Header action cards for client dashboard */
.header-actions{ display:flex; gap:12px; }
.header-actions .action-card{ background: linear-gradient(180deg,#ffffff,#f7fbff); padding:14px 20px; border-radius:12px; box-shadow:0 8px 22px rgba(15,23,42,0.06); border:1px solid rgba(10,30,60,0.06); color:#0b2e4a; font-weight:700; text-decoration:none; display:inline-flex; align-items:center; gap:10px }
.header-actions .action-card:hover{ transform:translateY(-4px); box-shadow:0 16px 36px rgba(15,23,42,0.08) }
.header-actions .action-card .count-badge{ background: #ffefdb; color:#b85b00; padding:6px 8px; border-radius:8px; font-size:13px; font-weight:800 }

/* Small vertical spacing to avoid header actions hugging the header */
.section-header .header-actions{ margin-top:12px }

/* ensure logout in navbar stands out */
.nav-right .logout-btn{ background:#ff7a00; color:#111; padding:8px 12px; border-radius:8px; font-weight:700; text-decoration:none }
.nav-right .logout-btn:hover{ background:#ff8f2a }
/* Container / hero spacing */
.container{ max-width:900px; margin:28px auto; padding:0 16px }
.opus-container{ max-width:1100px; margin:40px auto; padding:0 16px }
.opus-container h1{ font-size:34px; color:#111; margin-bottom:12px }
.opus-container p{ font-size:16px; color:#444; margin-bottom:18px }

/* Make marketplace controls and buttons consistent */
.market-controls input, .market-controls select{ background:#fff }
.listing-card .primary-btn{ width:100%; margin-top:10px }

/* Slightly stronger overlay for readability on demand */
/* Marketplace listing button uses primary style */
.listing-card .primary-btn{ width:100%; margin-top:10px; display:inline-block; text-align:center }

/* Marketplace-specific styles */
.market-controls{
    display:flex;
    gap:15px;
    margin-bottom:30px;
    flex-wrap:wrap;
}
.market-controls input, .market-controls select{
    padding:10px 15px;
    border:1px solid #ddd;
    border-radius:8px;
    font-size:14px;
    flex:1; min-width:200px;
    background:#fff;
}
.market-controls input:focus, .market-controls select:focus{
    outline:none; border-color:orange; box-shadow:0 0 6px rgba(255,165,0,0.18);
}

#marketplaceContainer{ display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:20px }

/* Location hint below search bar */
.marketplace-location-hint{
    font-size:.9rem; color:#64748b; margin:-18px 0 18px; padding:0 2px;
}
.marketplace-location-hint strong{ color:#334155 }

/* Location tag on listing cards */
.listing-location{ font-size:.85rem; color:#475569 }

/* Rating badge on cards */
.rating-badge{ font-size:.82rem; color:#b45309; background:#fef3c7; padding:4px 10px; border-radius:6px; margin-left:6px; font-weight:600; border: 1px solid #fcd34d; }
.rating-badge.no-rating{ color:#64748b; background:#f1f5f9; border-color: #e2e8f0; }

/* Top-rated badge */
.top-rated-badge{ display:inline-block; font-size:.82rem; color:#7c3aed; background:#ede9fe; padding:4px 10px; border-radius:6px; margin:4px 2px; font-weight:600; border: 1px solid #c4b5fd; }

/* Dark mode for rating badges */
[data-theme="dark"] .rating-badge{ background: rgba(234,179,8,0.2); color: #fcd34d; border-color: rgba(234,179,8,0.4); }
[data-theme="dark"] .rating-badge.no-rating{ background: rgba(100,116,139,0.2); color: #94a3b8; border-color: rgba(100,116,139,0.3); }
[data-theme="dark"] .top-rated-badge{ background: rgba(139,92,246,0.2); color: #c4b5fd; border-color: rgba(139,92,246,0.4); }
[data-theme="dark"] .listing-location{ color: #94a3b8; }

/* Form fieldset for location groups */
.form-fieldset{
    border:1px solid #e2e8f0; border-radius:10px; padding:16px 18px 8px;
    margin:12px 0 16px; background:#fafbfc;
}
.form-fieldset legend{
    font-size:.9rem; font-weight:600; color:#334155; padding:0 8px;
}

/* Checkbox group styling */
.checkbox-group{
    margin: 8px 0;
}
.checkbox-label{
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--color-text);
}
.checkbox-label input[type="checkbox"]{
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    cursor: pointer;
}
.nested-options{
    margin: 12px 0 8px 28px;
    padding-left: 16px;
    border-left: 3px solid var(--color-primary);
}
.nested-options .form-group{
    margin-bottom: 12px;
}
.form-help{
    display: block;
    font-size: 0.8rem;
    color: var(--color-muted);
    margin-top: 4px;
}

.listing-card{ background:#fff; border-radius:12px; overflow:hidden; box-shadow:0 6px 20px rgba(15,23,42,0.06); transition:transform .25s, box-shadow .25s }
.listing-card:hover{ transform:translateY(-6px); box-shadow:0 18px 48px rgba(15,23,42,0.12) }
.listing-card img{ width:100%; height:220px; object-fit:cover; display:block }
/* listing image placeholder styling */
.listing-image{ background: linear-gradient(90deg,#f0f0f0,#fafafa); min-height:140px }
.listing-card-content{ padding:16px }
.listing-card h3{ margin:0 0 8px 0; color:#111; font-size:17px }
.listing-card p{ margin:6px 0; color:#555; font-size:14px }

/* Unavailable listing visual state */
.listing-unavailable{ opacity: 0.5; filter: grayscale(0.25); }
.listing-unavailable .listing-card-content{ position:relative }

/* Per-card success animation when a listing is approved/updated optimistically */
.listing-card.update-success{
    animation: approvedFlash 1.2s ease forwards;
}
.listing-card.update-success .listing-card-content{
    position: relative;
}
.listing-card.update-success::after{
    content: "\2713"; /* check mark */
    position: absolute;
    right: 12px;
    top: 12px;
    background: rgba(11,46,74,0.9);
    color: #fff;
    width:28px;
    height:28px;
    border-radius:50%;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
    transform: scale(0.6);
    opacity: 0;
}

@keyframes approvedFlash{
    0%{ box-shadow:0 6px 20px rgba(15,23,42,0.06); background: #fff; }
    10%{ transform: translateY(-4px) scale(1.01); box-shadow:0 18px 48px rgba(15,23,42,0.12); background: linear-gradient(180deg,#f7fff6,#f0fff0); }
    40%{ transform: translateY(-2px) scale(1.005); }
    70%{ transform: translateY(0) scale(1); }
    100%{ transform: translateY(0) scale(1); }
}

/* make the checkmark appear slightly after the flash */
.listing-card.update-success::after{
    animation: checkIn .9s ease .18s forwards;
}
@keyframes checkIn{
    0%{ opacity:0; transform: scale(0.5); }
    60%{ opacity:1; transform: scale(1.08); }
    100%{ opacity:1; transform: scale(1); }
}

/* Confirm modal */
.confirm-modal-overlay{ position:fixed; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(3,10,18,0.45); z-index:12000 }
.confirm-modal{ background:var(--color-surface); color:var(--color-text); padding:18px; border-radius:10px; box-shadow:var(--shadow-soft); min-width:min(320px, calc(100vw - 32px)); max-width:90%; }
.confirm-modal .confirm-body{ margin-bottom:12px; font-weight:600 }
.confirm-modal .confirm-actions{ display:flex; justify-content:flex-end; gap:8px }
.confirm-modal .btn{ padding:8px 12px }

/* Modal animations and states */
.confirm-modal-overlay{ opacity:0; animation-fill-mode:forwards }
.confirm-modal-overlay.opening{ animation: overlayFadeIn .18s ease forwards }
.confirm-modal-overlay.closing{ animation: overlayFadeOut .18s ease forwards }
.confirm-modal.enter{ transform: translateY(6px) scale(.98); opacity:0; animation: modalIn .22s cubic-bezier(.2,.9,.2,1) forwards }
.confirm-modal.exit{ transform: translateY(0) scale(1); opacity:1; animation: modalOut .18s cubic-bezier(.2,.9,.2,1) forwards }

@keyframes overlayFadeIn{ from{ opacity:0 } to{ opacity:1 } }
@keyframes overlayFadeOut{ from{ opacity:1 } to{ opacity:0 } }
@keyframes modalIn{ from{ transform: translateY(8px) scale(.98); opacity:0 } to{ transform: translateY(0) scale(1); opacity:1 } }
@keyframes modalOut{ from{ transform: translateY(0) scale(1); opacity:1 } to{ transform: translateY(6px) scale(.98); opacity:0 } }

/* Ensure focus outline is visible for keyboard users inside modal */
.confirm-modal :focus{ outline: 3px solid rgba(255,122,0,0.18); outline-offset: 2px }


/* Toasts */
#ui-toast-container{ position:fixed; right:20px; top:20px; z-index:9999; display:flex; flex-direction:column; gap:10px }
.ui-toast{ min-width:min(220px, calc(100vw - 40px)); max-width:calc(100vw - 32px); background:#111; color:#fff; padding:10px 14px; border-radius:8px; box-shadow:0 8px 20px rgba(15,23,42,0.2); transform:translateY(-8px); opacity:0; transition:all .24s ease }
.ui-toast.visible{ transform:none; opacity:1 }
.ui-toast-info{ background:#111 }
.ui-toast-success{ background:#0b8a43 }
.ui-toast-error{ background:#b71c1c }

/* Message Toast - Special styling for chat notifications */
.ui-toast-message{
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  min-width: min(280px, calc(100vw - 40px));
  padding: 12px 16px;
  border-radius: 12px;
  border-left: 4px solid #a78bfa;
}
.toast-message-header{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.toast-message-icon{
  font-size: 18px;
}
.toast-message-sender{
  font-weight: 600;
  font-size: 14px;
}
.toast-message-preview{
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 8px;
  max-height: 40px;
  overflow: hidden;
}
.toast-message-action{
  font-size: 11px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ui-toast-message:hover{
  transform: scale(1.02);
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.3);
}

/* New message animation in chat */
.new-message-anim{
  animation: newMessageSlide 0.3s ease-out;
}
@keyframes newMessageSlide{
  from{ opacity: 0; transform: translateY(10px); }
  to{ opacity: 1; transform: translateY(0); }
}

/* ── Button Loading States ─────────────────────────────────── */
.btn-loading{
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}

.btn-spinner{
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 50%;
  border-top-color: transparent;
  animation: btnSpin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes btnSpin{
  to{ transform: rotate(360deg); }
}

/* ── Skeleton Loading ──────────────────────────────────────── */
.skeleton{
  background: linear-gradient(90deg, var(--color-border) 25%, var(--color-surface) 50%, var(--color-border) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
  border-radius: var(--radius);
}

.skeleton-text{
  height: 14px;
  width: 100%;
  margin-bottom: 8px;
}

.skeleton-text:last-child{
  width: 60%;
}

.skeleton-avatar{
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.skeleton-card{
  height: 120px;
  width: 100%;
}

.skeleton-button{
  height: 40px;
  width: 120px;
}

@keyframes skeletonShimmer{
  0%{ background-position: 200% 0; }
  100%{ background-position: -200% 0; }
}

/* ── Micro-interactions ────────────────────────────────────── */
.btn{
  transition: all 0.2s ease;
}

.btn:not(:disabled):hover{
  transform: translateY(-1px);
}

.btn:not(:disabled):active{
  transform: translateY(0) scale(0.98);
}

/* Card hover effects */
.stat-card,
.inventory-card,
.order-item,
.listing-card{
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover,
.inventory-card:hover,
.order-item:hover,
.listing-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Link underline animation */
.animated-link{
  position: relative;
  text-decoration: none;
}

.animated-link::after{
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.animated-link:hover::after{
  width: 100%;
}

/* Pulse animation for badges */
.pulse{
  animation: pulse 0.6s ease-out;
}

@keyframes pulse{
  0%{ transform: scale(1); }
  50%{ transform: scale(1.2); }
  100%{ transform: scale(1); }
}

/* Fade in animation */
.fade-in{
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn{
  from{ opacity: 0; }
  to{ opacity: 1; }
}

/* Slide up animation */
.slide-up{
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp{
  from{ opacity: 0; transform: translateY(20px); }
  to{ opacity: 1; transform: translateY(0); }
}

/* Success checkmark animation */
.success-checkmark{
  display: inline-block;
  animation: checkmarkPop 0.4s ease-out;
}

@keyframes checkmarkPop{
  0%{ transform: scale(0); opacity: 0; }
  50%{ transform: scale(1.2); }
  100%{ transform: scale(1); opacity: 1; }
}

/* Focus ring for accessibility */
.focus-ring:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.4);
}

/* Undo toast (inventory bulk actions) */
#undoToast{
    display:none;
    position:fixed;
    right:18px;
    bottom:18px;
    z-index:10000;
    background: var(--color-surface);
    color: var(--color-text);
    padding: 10px 14px;
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(10,30,60,0.04);
    display: flex;
}
#undoToast #undoMessage{ font-weight:600; color:var(--color-text); }
#undoToast .btn{ margin:0; padding:8px 10px; border-radius:8px }
#undoToast .btn-secondary{ background:transparent; border:1px solid rgba(16,24,40,0.06); color:var(--color-text) }
#undoToast .btn:hover{ transform:none }

/* Page loader */
#ui-page-loader{ position:fixed; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,0.12); z-index:9998; opacity:0; pointer-events:none; transition:opacity .18s ease }
#ui-page-loader.visible{ opacity:1; pointer-events:auto }
.ui-spinner{ width:48px; height:48px; border-radius:50%; border:5px solid rgba(255,255,255,0.3); border-top-color:#ff8a00; animation:spin 1s linear infinite }
@keyframes spin{ to{ transform:rotate(360deg) } }
.spinner{ width:32px; height:32px; border-radius:50%; border:4px solid rgba(0,0,0,0.1); border-top-color:var(--color-primary,#ff8a00); animation:spin .8s linear infinite }
[data-theme="dark"] .spinner{ border-color:rgba(255,255,255,0.15); border-top-color:var(--color-primary,#ff8a00) }
.listing-price{ color:orange; font-weight:700; font-size:16px; margin-top:8px }
.listing-card .primary-btn{ width:100%; margin-top:10px; display:inline-block; text-align:center }

/* Delivery badges on listing cards */
.listing-delivery-badges{
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}
.delivery-badge{
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 6px;
    background: #e2e8f0;
    color: #334155;
    border: 1px solid #cbd5e1;
}
.delivery-badge.free-delivery{
    background: #bbf7d0;
    color: #14532d;
    border-color: #86efac;
}
.delivery-badge.pickup{
    background: #bae6fd;
    color: #0c4a6e;
    border-color: #7dd3fc;
}
[data-theme="dark"] .delivery-badge{
    background: rgba(255,255,255,0.15);
    color: #e2e8f0;
    border-color: rgba(255,255,255,0.2);
}
[data-theme="dark"] .delivery-badge.free-delivery{
    background: rgba(34,197,94,0.25);
    color: #86efac;
    border-color: rgba(34,197,94,0.4);
}
[data-theme="dark"] .delivery-badge.pickup{
    background: rgba(14,165,233,0.25);
    color: #7dd3fc;
    border-color: rgba(14,165,233,0.4);
}

.empty-message{ grid-column:1 / -1; text-align:center; padding:60px 20px; color:#999 }

/* User dropdown / avatar in header */
.user-dropdown{ position:relative; display:inline-block }
.user-btn{ background:transparent; border:none; cursor:pointer; display:flex; align-items:center; gap:10px; padding:8px; border-radius:8px }
.avatar-circle{ width:36px; height:36px; border-radius:50%; background:#eef2f6; display:inline-flex; align-items:center; justify-content:center; font-weight:800; color:#0b2e4a }
.user-name{ font-weight:700; color:#0b2e4a; margin-right:6px }
.user-menu{ position:absolute; right:0; top:calc(100% + 8px); background:#fff; border-radius:10px; box-shadow:0 12px 36px rgba(15,23,42,0.12); min-width:180px; display:none; flex-direction:column; padding:8px; z-index:90 }
.user-dropdown.open .user-menu{ display:flex }
.user-menu a{ padding:8px 12px; color:#111; text-decoration:none; border-radius:8px }
.user-menu a:hover{ background:#f6f8ff }

/* ensure nav links and actions align neatly */
.nav-right{ display:flex; align-items:center; gap:12px; flex-shrink:1; min-width:0; }
.nav-links{ display:flex; gap:12px; align-items:center }
.nav-links a{ color:#333; text-decoration:none; font-size:14px }
.nav-links a:hover{ text-decoration:underline }

/* (Responsive rules consolidated in Step 4 section below) */

/* (Status badges moved to Step 5 section with extended palette) */

.section-header{

    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;

}

.card-header{
 
    display: flex;
    justify-content: space-between;
    align-items: center;

}

.job-meta{
  display: flex;
  gap: 20px;
  margin-top: 10px;
  font-size: 14px;
  color: #555;


}

.card-actions{
   margin-top: 15px;
}

/* Icon styling for inline SVG sprite */
.icon{
    display:inline-block;
    width:1em;
    height:1em;
    vertical-align:middle;
    vertical-align:-0.125em;
    fill:currentColor;
    stroke:currentColor;
    flex:0 0 auto;
    margin-right:8px;
}
.btn .icon{ width:16px; height:16px }

.rating-badge{
    background-color: #fff3e0;
    color: #ff8800;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
    margin-left: 10px;
}

.no-rating{
    background-color: #eeeeee;
    color: #666;

}

.contactor-header{
    display: flex;
    align-items: center;
    gap: 10px;

}

.supplier-header{
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-header{
    margin-bottom: 30px;
}

.profile-rating{
    font-size: 16px;
    font-weight: 600;
    color: #ff8800;
    margin: 8px 0;

}

.completed-count{
    color: #666;
    font-size: 14px;
}

.review-card{
    background: #ffffff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.review-header{
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;

}

.top-rated-badge{
    background: gold;
    color: black;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    margin-left: 6px;
}

.professional-card{
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.05);

}
.professional-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;

}
.filter-sort-form{
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.delete-review-btn{
    background: red;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
}

/* Screen-reader only utility */
.sr-only{ position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0 }

/* Per-card inline undo button */
.card-undo{
    margin-left:8px; padding:6px 8px; border-radius:8px; background:transparent; border:1px solid rgba(16,24,40,0.06); color:var(--color-text); cursor:pointer; font-size:13px
}
.card-undo:hover{ background: rgba(16,24,40,0.02) }

/*──────────────────────────────────────────────────────────
  STEP 3  —  Public Page Polish
──────────────────────────────────────────────────────────*/

/* ── Hero Section (home page) ────────────────────────── */
.hero{
    text-align: center;
    padding: 80px 24px 64px;
    position: relative;
}
.hero-inner{
    max-width: 720px;
    margin: 0 auto;
}
.hero-title{
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.08;
    margin: 0 0 20px;
    color: #fff !important;
    letter-spacing: -0.5px;
}
.hero-sub{
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.6;
    color: rgba(255,255,255,0.85) !important;
    margin: 0 0 32px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}
.hero-actions{
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-lg{
    padding: 14px 28px !important;
    font-size: 16px !important;
    border-radius: 12px !important;
}
.btn-outline-light{
    background: rgba(255,255,255,0.12) !important;
    color: #fff !important;
    border: 1.5px solid rgba(255,255,255,0.35) !important;
    padding: 12px 20px;
    border-radius: 10px;
    backdrop-filter: blur(4px);
    transition: background .15s, transform .12s;
}
.btn-outline-light:hover{
    background: rgba(255,255,255,0.22) !important;
    transform: translateY(-2px);
}

/* ── Features Section ─────────────────────────────────── */
.features-section{
    background: var(--color-surface);
    padding: 64px 24px;
    position: relative;
    z-index: 1;
}
.features-inner{
    max-width: var(--max-width);
    margin: 0 auto;
}
.section-heading{
    text-align: center;
    font-size: var(--type-h2);
    font-weight: 800;
    margin: 0 0 8px;
    color: var(--color-text) !important;
}
.section-sub{
    text-align: center;
    color: var(--color-muted) !important;
    font-size: 16px;
    margin: 0 0 40px;
}
.features-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.feature-card{
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    text-align: center;
    transition: transform .2s, box-shadow .2s;
    border: 1px solid rgba(0,0,0,0.04);
}
.feature-card:hover{
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(15,23,42,0.10);
}
.feature-card--accent{
    background: linear-gradient(135deg, #fff7ed, #fff1e0);
    border-color: rgba(255,122,0,0.12);
}
.feature-icon{
    font-size: 40px;
    display: block;
    margin-bottom: 16px;
}
.feature-card h3{
    font-size: var(--type-h3);
    font-weight: 700;
    margin: 0 0 10px;
    color: #1f2937 !important;
}
.feature-card p{
    font-size: 15px;
    color: #4b5563 !important;
    line-height: 1.6;
    margin: 0 0 14px;
}
.feature-link{
    font-weight: 700;
    color: #ff7a00 !important;
    text-decoration: none;
    font-size: 14px;
}
.feature-link:hover{ text-decoration: underline; color: #e56a00 !important; }

/* ── How It Works Section ─────────────────────────────── */
.how-section{
    padding: 64px 24px;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #0b2e4a 0%, #1a4a6e 50%, #0b2e4a 100%);
    background-size: 200% 200%;
    animation: gradient-shift 10s ease infinite;
}
.how-inner{
    max-width: var(--max-width);
    margin: 0 auto;
}
.how-section .section-heading{
    color: #fff !important;
}
.how-steps{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
    margin-top: 40px;
}
.how-step{
    text-align: center;
}
.step-num{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--color-primary-strong), var(--color-primary));
    color: #111;
    font-weight: 800;
    font-size: 20px;
    margin-bottom: 16px;
    box-shadow: 0 6px 20px rgba(255,122,0,0.25);
}
.how-step h4{
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #fff !important;
}
.how-step p{
    font-size: 14px;
    color: rgba(255,255,255,0.75) !important;
    line-height: 1.6;
    margin: 0;
}

/* ── CTA Banner ──────────────────────────────────────── */
.cta-banner{
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 56px 24px;
    text-align: center;
    position: relative;
    z-index: 1;
}
.cta-inner{
    max-width: 600px;
    margin: 0 auto;
}
.cta-banner h2{
    font-size: var(--type-h2);
    font-weight: 800;
    margin: 0 0 10px;
    color: #fff !important;
}
.cta-banner p{
    font-size: 16px;
    color: rgba(255,255,255,0.8) !important;
    margin: 0 0 28px;
}

/* ── Auth Pages (login, register, post-job) ───────────── */
.auth-page{
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 48px 16px 64px;
    min-height: calc(100vh - 200px);
}
.auth-card{
    background: rgba(255,255,255,0.97);
    border-radius: 16px;
    padding: 36px 32px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 16px 48px rgba(15,23,42,0.12);
    border: 1px solid rgba(0,0,0,0.04);
    color: var(--color-text) !important;
    backdrop-filter: blur(6px);
}
.auth-card--wide{
    max-width: 600px;
}
.auth-header{
    text-align: center;
    margin-bottom: 28px;
}
.auth-header h1{
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 6px;
    color: var(--color-text) !important;
}
.auth-header p{
    margin: 0;
    font-size: 15px;
    color: var(--color-muted) !important;
}
.auth-error{
    background: #fef2f2;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    border: 1px solid rgba(185,28,28,0.1);
}
.auth-form .form-group{
    margin-bottom: 18px;
}
.auth-form label{
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #222 !important;
}
.auth-form input,
.auth-form select,
.auth-form textarea{
    margin: 0;
    color: var(--color-text) !important;
}
.form-hint{
    margin-top: 6px;
    font-size: 13px;
}
.form-hint a{
    color: var(--color-primary) !important;
    text-decoration: none;
}
.form-hint a:hover{ text-decoration: underline; }
.form-forgot{
    text-align: right;
    margin: -8px 0 18px;
    font-size: 13px;
}
.form-forgot a{
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}
.form-forgot a:hover{
    text-decoration: underline;
}
.btn-success{
    background: #16a34a !important;
    border-color: #16a34a !important;
}
.eye-label{
    font-size: 11px;
    margin-left: 2px;
    vertical-align: middle;
    letter-spacing: 0.02em;
}
.btn-block{
    width: 100%;
    justify-content: center;
}
.btn-sm{
    padding: 8px 14px !important;
    font-size: 13px !important;
}
.auth-alt{
    text-align: center;
    font-size: 14px;
    color: var(--color-muted) !important;
    margin: 20px 0 0;
}
.auth-alt a{
    color: var(--color-primary) !important;
    font-weight: 700;
    text-decoration: none;
}
.auth-alt a:hover{ text-decoration: underline; }

/* Side-by-side form fields */
.form-row{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 500px){
    .form-row{ grid-template-columns: 1fr; }
}

/* ── Public Page Header ──────────────────────────────── */
.public-page-header{
    margin-bottom: 28px;
}
.public-page-header h1{
    font-size: var(--type-h1);
    font-weight: 800;
    margin: 0 0 6px;
}
.public-page-header p{
    font-size: 16px;
    margin: 0;
    opacity: 0.85;
}

/* ── Listing Grid (shared) ───────────────────────────── */
.listing-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.grid-section-title{
    grid-column: 1 / -1;
    font-size: var(--type-h3);
    margin: 8px 0 4px;
}
.listing-card-actions{
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.listing-unit{
    font-size: 13px;
    color: var(--color-muted);
    font-weight: 400;
}
.listing-meta{
    font-size: 14px;
    color: #555 !important;
    margin: 4px 0 !important;
}

/* ── Detail Page Hero Image ──────────────────────────── */
.detail-hero-img{
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin: 16px 0;
}
.detail-meta{
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-items: baseline;
}
.detail-meta p{ margin: 0; }

/* ── Pagination ──────────────────────────────────────── */
.pagination{
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    margin-top: 32px;
    flex-wrap: wrap;
}
.page-number, .page-link{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: var(--color-text) !important;
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(0,0,0,0.06);
    transition: background .15s;
}
.page-number:hover, .page-link:hover{
    background: #fff;
}
.page-number.current{
    background: var(--color-primary);
    color: #111 !important;
    border-color: var(--color-primary);
}

/* ── Responsive adjustments for public pages ──────────── */
@media (max-width: 768px){
    .hero{ padding: 48px 16px 40px; }
    .features-section, .how-section{ padding: 40px 16px; }
    .cta-banner{ padding: 36px 16px; }
    .auth-card{ padding: 28px 20px; }
    .listing-grid{ grid-template-columns: 1fr; }
}

/*──────────────────────────────────────────────────────────
  STEP 5  —  Data Tables, Empty States & List Polish
──────────────────────────────────────────────────────────*/

/* ── Data Table ──────────────────────────────────────── */
.data-table-wrap{
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
}
.data-table{
    width: 100%;
    min-width: 960px;
    border-collapse: collapse;
    font-size: 14px;
}
.data-table thead{
    background: #f8f9fb;
    border-bottom: 2px solid #eef0f4;
}
.data-table th{
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--color-muted);
    white-space: nowrap;
}
.data-table td{
    padding: 12px 16px;
    border-bottom: 1px solid #f0f1f4;
    vertical-align: middle;
}
.data-table tbody tr{
    transition: background .12s ease;
}
.data-table tbody tr:hover{
    background: #fafbfd;
}
.data-table tbody tr:last-child td{
    border-bottom: none;
}
.data-table .table-empty-row td{
    padding: 40px 16px;
    text-align: center;
    color: var(--color-muted);
    font-style: italic;
}
/* Responsive scroll wrapper */
.table-responsive{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Enhanced Empty State ────────────────────────────── */
.empty-state{
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 56px 24px;
    color: var(--color-muted);
}
.empty-state-icon{
    width: 72px;
    height: 72px;
    margin-bottom: 20px;
    color: #d0d5de;
}
.empty-state h4{
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 8px;
}
.empty-state p{
    max-width: 360px;
    margin: 0 0 20px;
    line-height: 1.55;
    font-size: 14px;
}

/* ── Status badges — extended palette ────────────────── */
.status-badge{
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.status-open{ background:#fff3e0; color:#e67e00 }
.status-progress{ background:#e3f2fd; color:#1565c0 }
.status-complete{ background:#e8f5e9; color:#2e7d32 }
.status-pending{ background:#fff8e1; color:#f9a825 }
.status-cancelled{ background:#fce4ec; color:#c62828 }
.status-approved{ background:#e8f5e9; color:#2e7d32 }
.status-rejected{ background:#fce4ec; color:#c62828 }
.status-delivered{ background:#e0f7fa; color:#00838f }

/* ── Order type badges (purchase vs rental) ──────────── */
.order-type-badge{
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}
.purchase-badge{ background:#e8f5e9; color:#2e7d32; border: 1px solid #a5d6a7; }
.rental-badge{ background:#e3f2fd; color:#1565c0; border: 1px solid #90caf9; }

.header-badges{
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Rental period info ──────────────────────────────── */
.rental-period-info{
    margin: 12px 0;
    padding: 10px 14px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 8px;
    font-size: 13px;
    color: #1565c0;
    border-left: 4px solid #1976d2;
}
.rental-status{
    margin-left: 8px;
    font-weight: 600;
}
.rental-status.active{ color: #2e7d32; }
.rental-status.ended{ color: #f57c00; }
.rental-status.upcoming{ color: #7b1fa2; }

/* ── Card header row (title + badge) ─────────────────── */
.card-header{
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}
.card-header h3{ margin: 0; font-size: var(--type-h3); }

/* ── Card meta row ───────────────────────────────────── */
.job-meta{
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: 13px;
    color: var(--color-muted);
    margin: 8px 0;
}

/* ── Card actions row ────────────────────────────────── */
.card-actions{
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

/* ── Review card ─────────────────────────────────────── */
.review-card{
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 12px;
    border-left: 3px solid var(--color-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.review-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.review-card p{ margin: 4px 0 8px; font-size: 14px; color: #444 }
.review-card small{ color: var(--color-muted); font-size: 12px }

/* ── Profile page styles ─────────────────────────────── */
.profile-page{ max-width: 740px; margin: 24px auto; padding: 0 16px }
.profile-header{
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    margin-bottom: 24px;
}
.profile-header h2{ margin: 0 0 8px; font-size: 24px }
.profile-rating{ font-size: 16px; margin-bottom: 4px }
.profile-rating.no-rating{ color: var(--color-muted) }
.completed-count{ color: var(--color-muted); font-size: 14px; margin: 4px 0 0 }
.top-rated-badge{
    display: inline-block;
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    color: #f57f17;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    margin-bottom: 8px;
}
.rating-badge{
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #f57f17;
}
.rating-badge.no-rating{ color: var(--color-muted); font-weight: 400 }
.reviews-section{ margin-top: 8px }
.reviews-section h3{
    font-size: var(--type-h3);
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eef0f4;
}

/* ── Quick actions polish ────────────────────────────── */
.quick-actions{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}
.quick-actions .btn{
    justify-content: center;
    text-align: center;
    padding: 14px 16px;
}

/* ── Dashboard card consistency (no inline style) ────── */
.listing-card.dash-card{
    padding: 18px;
    margin-bottom: 12px;
}
.listing-card .completed-tag{
    display: inline-block;
    color: #2e7d32;
    font-weight: 600;
    font-size: 13px;
    margin-top: 4px;
}
.listing-card .review-submitted{
    color: #2e7d32;
    font-size: 13px;
    margin-top: 8px;
}

/* ── Professional header in bids page ──────────────────── */
.professional-header{
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.professional-header a{
    font-weight: 700;
    font-size: 16px;
    color: var(--color-text);
    text-decoration: none;
}
.professional-header a:hover{ color: var(--color-primary) }

/* ── Order / form inline controls ────────────────────── */
.inline-form{
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 8px;
}
.inline-form select{
    padding: 6px 10px;
    border-radius: var(--radius-md);
    border: 1px solid #ddd;
    font-size: 13px;
}

/* ── Dashboard form card (create/edit listing, post job) ─ */
.dash-form{
    max-width: 680px;
}
.dash-form .form-group{
    margin-bottom: 18px;
}
.dash-form label{
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text);
}
.dash-form input,
.dash-form select,
.dash-form textarea{
    width: 100%;
    padding: 10px 14px;
    margin: 0;
    border-radius: var(--radius-md);
    border: 1px solid #dde1e8;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.dash-form input:focus,
.dash-form select:focus,
.dash-form textarea:focus{
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(255,122,0,0.10);
    outline: none;
}
.dash-form textarea{
    min-height: 110px;
    resize: vertical;
}
.dash-form input[type="file"]{
    padding: 8px;
    border: 1px dashed #ccd0d8;
    background: #fafbfc;
    cursor: pointer;
}
.dash-form input[type="file"]:hover{
    border-color: var(--color-primary);
}
.dash-form .form-actions{
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
    flex-wrap: wrap;
}
.dash-form .required::after{
    content: " *";
    color: #e53935;
    font-weight: 400;
}

/* ── Inventory grid ──────────────────────────────────── */
.inventory-controls{
    margin-bottom: 16px;
}
.inventory-controls form{
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.inventory-controls input,
.inventory-controls select{
    padding: 8px 12px;
    border-radius: var(--radius-md);
    border: 1px solid #dde1e8;
    font-size: 14px;
    min-width: 160px;
    margin: 0;
}
.inventory-controls input[type="text"]{
    min-width: 200px;
}
.inventory-bulk{
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
    flex-wrap: wrap;
}
.inventory-bulk label{
    font-size: 14px;
    cursor: pointer;
}
.inventory-select{
    width: auto;
    margin: 0;
    cursor: pointer;
}


/* ── Detail pages (job_detail, order_detail) ─────────── */
.detail-card{
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    max-width: 720px;
}
.detail-card dl{
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px 16px;
    margin: 0 0 16px;
}
.detail-card dt{
    font-weight: 600;
    font-size: 14px;
    color: var(--color-muted);
}
.detail-card dd{
    margin: 0;
    font-size: 14px;
}
.detail-card hr{
    border: none;
    border-top: 1px solid #eef0f4;
    margin: 16px 0;
}
.detail-card .bid-form h3{
    font-size: 18px;
    margin: 0 0 12px;
}

/*──────────────────────────────────────────────────────────
  STEP 4  —  Responsive Polish & Micro-Interactions
──────────────────────────────────────────────────────────*/

/* ── Smooth defaults ─────────────────────────────────── */
html{ scroll-behavior: smooth; }

/* ── Fade-in on scroll (driven by JS IntersectionObserver) ─ */
.fade-in-up{
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .5s cubic-bezier(.22,1,.36,1),
                transform .5s cubic-bezier(.22,1,.36,1);
}
.fade-in-up.visible{
    opacity: 1;
    transform: translateY(0);
}
/* stagger children */
.fade-in-up:nth-child(2){ transition-delay: .07s; }
.fade-in-up:nth-child(3){ transition-delay: .14s; }
.fade-in-up:nth-child(4){ transition-delay: .21s; }

/* ── Input focus glow ─────────────────────────────────── */
input, textarea, select{
    transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus, textarea:focus, select:focus{
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(255,122,0,0.10) !important;
}

/* ── Button press (active) micro-feedback ─────────────── */
.btn{ transition: transform .12s ease, box-shadow .12s ease, background .15s ease; }
.btn:active{ transform: translateY(0) scale(0.97) !important; }

/* ── Nav link hover underline slide ──────────────────── */
.nav-links a{
    position: relative;
    transition: color .15s ease;
}
.nav-links a::after{
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    border-radius: 1px;
    transition: width .22s ease;
}
.nav-links a:hover::after,
.nav-links a.active-link::after{
    width: 100%;
}
.nav-links a:hover{ text-decoration: none !important; color: var(--color-primary); }

/* ── Avatar hover ring ───────────────────────────────── */
.avatar-circle{
    transition: box-shadow .2s ease, transform .2s ease;
}
.user-btn:hover .avatar-circle{
    box-shadow: 0 0 0 3px rgba(255,122,0,0.18);
    transform: scale(1.08);
}

/* ── Stat card number count-up pop ────────────────────── */
.stat-value{
    transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.stat-card:hover .stat-value{
    transform: scale(1.06);
}

/* ── Skeleton / shimmer placeholder ──────────────────── */
.skeleton{
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease infinite;
    border-radius: var(--radius-md);
    min-height: 16px;
}
@keyframes shimmer{
    0%{ background-position: 200% 0; }
    100%{ background-position: -200% 0; }
}

/* ── Toast entrance improvement ──────────────────────── */
.ui-toast{
    transform: translateX(40px);
    opacity: 0;
    transition: transform .28s cubic-bezier(.22,1,.36,1), opacity .28s ease;
}
.ui-toast.visible{
    transform: translateX(0);
    opacity: 1;
}

/* ── Badge pulse for notification counts ─────────────── */
.count-badge{
    animation: badgePop .4s cubic-bezier(.22,1,.36,1);
}
@keyframes badgePop{
    0%{ transform: scale(0.5); opacity: 0; }
    60%{ transform: scale(1.15); }
    100%{ transform: scale(1); opacity: 1; }
}

/* ── Feature card icon bounce on hover ───────────────── */
.feature-icon{
    transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.feature-card:hover .feature-icon{
    transform: translateY(-6px) scale(1.12);
}

/* ── Step number pulse on hover ──────────────────────── */
.step-num{
    transition: transform .25s ease, box-shadow .25s ease;
}
.how-step:hover .step-num{
    transform: scale(1.12);
    box-shadow: 0 8px 28px rgba(255,122,0,0.35);
}

/* ── Listing card image zoom on hover ────────────────── */
.listing-card img{
    transition: transform .35s cubic-bezier(.22,1,.36,1);
}
.listing-card:hover img{
    transform: scale(1.04);
}

/* ── Password toggle hover ───────────────────────────── */
.password-toggle{
    transition: color .15s ease;
}
.password-toggle:hover{
    color: var(--color-primary);
}

/* ── Sidebar link icon nudge ─────────────────────────── */
.sidebar-icon{
    transition: transform .15s ease;
}
.sidebar-nav a:hover .sidebar-icon{
    transform: translateX(2px);
}

/*──────────────────────────────────────────────────────────
  DARK MODE  —  [data-theme="dark"]
  Flips all design tokens; components that use var() adapt
  automatically. Hard-coded colours overridden below.
──────────────────────────────────────────────────────────*/
[data-theme="dark"]{
    --color-bg:            #0f1117;
    --color-surface:       #1a1d27;
    --color-primary:       #ff8a1e;
    --color-primary-strong:#ffab4c;
    --color-muted:         #9ca3af;
    --color-text:          #e4e6eb;
    --shadow-soft:         0 6px 20px rgba(0,0,0,0.35);

    --bs-body-bg:          #0f1117;
    --bs-body-color:       #e4e6eb;
    --bs-primary:          #ff8a1e;
    --bs-primary-rgb:      255, 138, 30;
    --bs-link-color:       #ff8a1e;

    color-scheme: dark;
}

/* ── Body + overall ──────────────────────────────────── */
[data-theme="dark"] body{
    background: var(--color-bg);
    color: var(--color-text);
}

/* ── Navbar ──────────────────────────────────────────── */
[data-theme="dark"] .navbar{
    background: var(--color-surface);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
[data-theme="dark"] .logo-text{ color: var(--color-text); }
[data-theme="dark"] .nav-right a{ color: #ccc; }
[data-theme="dark"] .nav-links a{ color: #ccc; }
[data-theme="dark"] .nav-links a:hover{ color: var(--color-primary); }
[data-theme="dark"] .nav-toggle svg path{ stroke: #ccc; }

/* ── User dropdown ───────────────────────────────────── */
[data-theme="dark"] .avatar-circle{ background: #2a2d38; color: var(--color-primary); }
[data-theme="dark"] .user-name{ color: var(--color-text); }
[data-theme="dark"] .user-menu{
    background: #22252f;
    box-shadow: 0 12px 36px rgba(0,0,0,0.5);
}
[data-theme="dark"] .user-menu a{ color: #ccc; }
[data-theme="dark"] .user-menu a:hover{ background: rgba(255,255,255,0.06); color: #fff; }
[data-theme="dark"] .user-btn svg path{ stroke: #ccc; }

/* ── Sidebar ─────────────────────────────────────────── */
[data-theme="dark"] .sidebar{
    background: var(--color-surface);
    border-right: 1px solid rgba(255,255,255,0.06);
}
[data-theme="dark"] .sidebar-nav a{ color: #aab0bf; }
[data-theme="dark"] .sidebar-nav a:hover{ background: rgba(255,255,255,0.05); color: #fff; }
[data-theme="dark"] .sidebar-nav a.active{
    background: rgba(255,138,30,0.12);
    color: var(--color-primary);
}

/* ── Cards ───────────────────────────────────────────── */
[data-theme="dark"] .card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .form-card,
[data-theme="dark"] .listing-card,
[data-theme="dark"] .feature-card,
[data-theme="dark"] .professional-card,
[data-theme="dark"] .review-card,
[data-theme="dark"] .detail-card,
[data-theme="dark"] .how-step,
[data-theme="dark"] .auth-card{
    background: var(--color-surface);
    color: var(--color-text);
    border-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .form-fieldset{
    background: var(--color-surface);
    border-color: rgba(255,255,255,0.12);
}
[data-theme="dark"] .form-fieldset legend{
    color: #fff;
}
[data-theme="dark"] .checkbox-label{ color: var(--color-text); }
[data-theme="dark"] .nested-options{ border-left-color: var(--color-primary); }
[data-theme="dark"] .form-help{ color: var(--color-muted); }
[data-theme="dark"] .listing-card h3{ color: var(--color-text); }
[data-theme="dark"] .listing-card p{ color: var(--color-muted); }
[data-theme="dark"] .stat-label{ color: var(--color-muted); }

/* ── Feature cards special ───────────────────────────── */
[data-theme="dark"] .feature-card{
    background: #1a1d27;
    border-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .feature-card--accent{
    background: linear-gradient(135deg, #271e14, #2a2015);
    border-color: rgba(255,138,30,0.15);
}
[data-theme="dark"] .feature-card h3{ color: var(--color-text) !important; }
[data-theme="dark"] .feature-card p{ color: var(--color-muted) !important; }

/* ── Forms / inputs ──────────────────────────────────── */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select{
    background: #22252f;
    border-color: rgba(255,255,255,0.10);
    color: var(--color-text);
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder{
    color: #6b7280;
}
[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus{
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(255,138,30,0.15) !important;
}
[data-theme="dark"] .inventory-controls input,
[data-theme="dark"] .inventory-controls select{
    background: #22252f;
    border-color: rgba(255,255,255,0.10);
    color: var(--color-text);
}

/* ── Tables ──────────────────────────────────────────── */
[data-theme="dark"] .table{
    color: var(--color-text);
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255,255,255,0.03);
    --bs-table-hover-bg: rgba(255,255,255,0.05);
}
[data-theme="dark"] .table th{ color: var(--color-muted); border-bottom-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .table td{ border-bottom-color: rgba(255,255,255,0.05); }
[data-theme="dark"] .table thead{ border-bottom-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .data-table th{ background: #1a1d27; }

/* ── Buttons ─────────────────────────────────────────── */
[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .secondary-btn{
    background: #374151;
    color: #f3f4f6;
    border: 1px solid #4b5563;
}
[data-theme="dark"] .btn-secondary:hover{ background: #4b5563; }
[data-theme="dark"] .listing-card .btn-secondary{
    background: #475569;
    color: #f1f5f9;
    border-color: #64748b;
}
[data-theme="dark"] .listing-card .btn-secondary:hover{
    background: #64748b;
}
[data-theme="dark"] .btn-danger{ background: #7f1d1d; color: #fca5a5; border-color: transparent; }
[data-theme="dark"] .btn-danger:hover{ background: #991b1b; }

/* ── Footer ──────────────────────────────────────────── */
[data-theme="dark"] .footer{
    background: #111318 !important;
    border-top: 1px solid rgba(255,255,255,0.06);
}
[data-theme="dark"] .footer-col a{ color: #9ca3af; }
[data-theme="dark"] .footer-col a:hover{ color: var(--color-primary); }
[data-theme="dark"] .footer-bottom{ border-top-color: rgba(255,255,255,0.06); color: #6b7280; }
[data-theme="dark"] .footer-tagline{ color: #6b7280; }

/* ── Sections (public pages) ─────────────────────────── */
[data-theme="dark"] .features-section{
    background: var(--color-surface);
}
[data-theme="dark"] .section-heading{ color: var(--color-text) !important; }
[data-theme="dark"] .section-sub{ color: var(--color-muted) !important; }

/* ── How-It-Works (still over bg image) ──────────────── */
[data-theme="dark"] .how-step{ background: rgba(26,29,39,0.92); }
[data-theme="dark"] .step-title{ color: #fff; }
[data-theme="dark"] .step-text{ color: #aab0bf; }

/* ── CTA banner ──────────────────────────────────────── */
[data-theme="dark"] .cta-banner{
    background: linear-gradient(135deg, #271e14 0%, #1a1d27 100%);
}

/* ── Auth cards (login/register) ─────────────────────── */
[data-theme="dark"] .auth-card{
    background: rgba(26,29,39,0.96);
    box-shadow: 0 16px 48px rgba(0,0,0,0.45);
}
[data-theme="dark"] .auth-card h2{ color: var(--color-text); }
[data-theme="dark"] .auth-card p{ color: var(--color-muted); }

/* ── Modals / Overlays ───────────────────────────────── */
[data-theme="dark"] .confirm-modal{
    background: #22252f;
    color: var(--color-text);
}
[data-theme="dark"] .confirm-modal-overlay{
    background: rgba(0,0,0,0.65);
}

/* ── Toast ────────────────────────────────────────────── */
[data-theme="dark"] .ui-toast{
    background: #22252f;
    color: var(--color-text);
    border: 1px solid rgba(255,255,255,0.08);
}
[data-theme="dark"] .ui-toast-success{ border-left: 3px solid #22c55e; }
[data-theme="dark"] .ui-toast-error{ border-left: 3px solid #ef4444; }

/* ── Notification dropdown ───────────────────────────── */
[data-theme="dark"] .dropdown-menu{
    background: #22252f;
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 12px 36px rgba(0,0,0,0.5);
}
[data-theme="dark"] .dropdown-menu li{ color: var(--color-text); }
[data-theme="dark"] .dropdown-menu .bg-light{ background: rgba(255,255,255,0.05) !important; }
[data-theme="dark"] .dropdown-menu .text-muted{ color: #6b7280 !important; }

/* ── Empty states ─────────────────────────────────────── */
[data-theme="dark"] .empty-state{ color: var(--color-muted); }
[data-theme="dark"] .empty-state svg{ opacity: 0.5; }

/* ── Status badges (keep readable) ───────────────────── */
[data-theme="dark"] .status-badge{ opacity: 0.92; }

/* ── Page header ──────────────────────────────────────── */
[data-theme="dark"] .page-header{
    background: var(--color-surface);
    border-bottom-color: rgba(255,255,255,0.06);
}

/* ── Dashboard forms ──────────────────────────────────── */
[data-theme="dark"] .dash-form{
    background: var(--color-surface);
}
[data-theme="dark"] .dash-form label{ color: var(--color-text); }

/* ── Form labels and controls (comprehensive) ────────── */
[data-theme="dark"] label,
[data-theme="dark"] .form-label{
    color: var(--color-text) !important;
}
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select{
    background: #22252f !important;
    border-color: rgba(255,255,255,0.15) !important;
    color: var(--color-text) !important;
}
[data-theme="dark"] .form-control::placeholder{
    color: #6b7280 !important;
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus{
    background: #282b36 !important;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(255,138,30,0.15) !important;
    color: var(--color-text) !important;
}
[data-theme="dark"] .form-section{
    background: var(--color-surface);
    border-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .form-section h3,
[data-theme="dark"] .form-section h4{
    color: var(--color-text) !important;
}
[data-theme="dark"] .form-group label{
    color: var(--color-text) !important;
}
[data-theme="dark"] .form-row{
    color: var(--color-text);
}
[data-theme="dark"] .project-form label,
[data-theme="dark"] .project-form h3{
    color: var(--color-text) !important;
}
[data-theme="dark"] .project-form .form-control{
    background: #22252f !important;
    color: #fff !important;
    border-color: rgba(255,255,255,0.15) !important;
}
[data-theme="dark"] .project-form select option{
    background: #22252f;
    color: #fff;
}
[data-theme="dark"] .checkbox-group label,
[data-theme="dark"] .form-check-label{
    color: var(--color-text) !important;
}

/* ── Detail card ──────────────────────────────────────── */
[data-theme="dark"] .detail-card hr{ border-top-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .detail-card dt{ color: var(--color-muted); }

/* ── Skeleton ─────────────────────────────────────────── */
[data-theme="dark"] .skeleton{
    background: linear-gradient(90deg, #22252f 25%, #2a2d38 50%, #22252f 75%);
    background-size: 200% 100%;
}

/* ── Undo toast ───────────────────────────────────────── */
[data-theme="dark"] #undoToast{
    background: #22252f;
    border-color: rgba(255,255,255,0.08);
}

/* ── Page loader spinner ──────────────────────────────── */
[data-theme="dark"] #ui-page-loader{ background: rgba(0,0,0,0.35); }

/* ── Mobile nav dropdown ──────────────────────────────── */
[data-theme="dark"] .nav-links.open{
    background: #22252f;
    box-shadow: 0 12px 36px rgba(0,0,0,0.5);
}

/* ── Scrollbar ────────────────────────────────────────── */
[data-theme="dark"] ::-webkit-scrollbar{ width: 8px; }
[data-theme="dark"] ::-webkit-scrollbar-track{ background: #0f1117; }
[data-theme="dark"] ::-webkit-scrollbar-thumb{ background: #2a2d38; border-radius: 4px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover{ background: #3a3d48; }

/* ── Theme toggle button ──────────────────────────────── */
.theme-toggle{
    background: transparent;
    border: 1.5px solid rgba(0,0,0,0.08);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background .2s, border-color .2s, transform .2s;
    flex-shrink: 0;
}
.theme-toggle:hover{
    background: rgba(0,0,0,0.04);
    transform: scale(1.08);
}
.theme-toggle svg{ width: 18px; height: 18px; transition: transform .3s ease; }
.theme-toggle .icon-sun{ display: none; }
.theme-toggle .icon-moon{ display: block; }

[data-theme="dark"] .theme-toggle{
    border-color: rgba(255,255,255,0.12);
}
[data-theme="dark"] .theme-toggle:hover{
    background: rgba(255,255,255,0.06);
}
[data-theme="dark"] .theme-toggle .icon-sun{ display: block; }
[data-theme="dark"] .theme-toggle .icon-moon{ display: none; }

/* ── Background-page dark overrides ──────────────────── */
[data-theme="dark"] .with-bg .navbar{
    background: rgba(26,29,39,0.96);
    color: var(--color-text);
}
[data-theme="dark"] .with-bg .logo-text{ color: var(--color-text); }
[data-theme="dark"] .with-bg .nav-right a{ color: #ccc; }
[data-theme="dark"] .with-bg .navbar .nav-links a{ color: #ccc !important; }
[data-theme="dark"] .with-bg .navbar .nav-links a:hover{ color: var(--color-primary) !important; }
[data-theme="dark"] .with-bg .navbar .user-name{ color: var(--color-text) !important; }
[data-theme="dark"] .with-bg .navbar .user-menu a{ color: #ccc !important; }
[data-theme="dark"] .with-bg .form-card{
    background: rgba(26,29,39,0.96);
    color: var(--color-text);
}

/* ── Additional dark mode patches ────────────────────── */

/* Auth error banner */
[data-theme="dark"] .auth-error{
    background: rgba(185,28,28,0.15);
    color: #fca5a5;
    border-color: rgba(185,28,28,0.3);
}

/* Auth form labels — override the !important */
[data-theme="dark"] .auth-form label{
    color: var(--color-text) !important;
}

/* Status badges — dark-friendly pastel backgrounds */
[data-theme="dark"] .status-open{ background: rgba(255,152,0,0.18); color: #ffb74d; }
[data-theme="dark"] .status-progress,
[data-theme="dark"] .status-in-progress{ background: rgba(33,150,243,0.18); color: #64b5f6; }
[data-theme="dark"] .status-complete,
[data-theme="dark"] .status-completed{ background: rgba(76,175,80,0.18); color: #81c784; }
[data-theme="dark"] .status-pending{ background: rgba(255,193,7,0.18); color: #ffd54f; }
[data-theme="dark"] .status-cancelled{ background: rgba(244,67,54,0.18); color: #ef9a9a; }
[data-theme="dark"] .status-approved{ background: rgba(76,175,80,0.18); color: #81c784; }
[data-theme="dark"] .status-rejected{ background: rgba(244,67,54,0.18); color: #ef9a9a; }
[data-theme="dark"] .status-delivered{ background: rgba(33,150,243,0.18); color: #64b5f6; }

/* Role badges */
[data-theme="dark"] .role-client{ background: rgba(59,130,246,0.18); color: #93c5fd; }
[data-theme="dark"] .role-professional{ background: rgba(16,185,129,0.18); color: #6ee7b7; }
[data-theme="dark"] .role-supplier{ background: rgba(245,158,11,0.18); color: #fcd34d; }
[data-theme="dark"] .role-admin{ background: rgba(139,92,246,0.18); color: #c4b5fd; }

/* Market controls */
[data-theme="dark"] .market-controls input,
[data-theme="dark"] .market-controls select{
    background: var(--color-surface);
    color: var(--color-text);
    border-color: rgba(255,255,255,0.12);
}

/* Data table refinements */
[data-theme="dark"] .data-table thead{ background: rgba(255,255,255,0.04); }
[data-theme="dark"] .data-table td{ border-bottom-color: rgba(255,255,255,0.06); }

/* Dashboard form inputs */
[data-theme="dark"] .dash-form input,
[data-theme="dark"] .dash-form select,
[data-theme="dark"] .dash-form textarea{
    background: var(--color-surface);
    color: var(--color-text);
    border-color: rgba(255,255,255,0.12);
}
[data-theme="dark"] .dash-form input[type="file"]{
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.15);
}

/* Completed/review tags */
[data-theme="dark"] .listing-card .completed-tag{ color: #81c784; }
[data-theme="dark"] .listing-card .review-submitted{ color: #81c784; }

/* Rating/category badges */
[data-theme="dark"] .category-badge{ background: rgba(255,152,0,0.15); color: #ffb74d; }
[data-theme="dark"] .location-text{ color: var(--color-muted); }
[data-theme="dark"] .marketplace-location-hint strong{ color: var(--color-text); }

/* Pagination */
[data-theme="dark"] .page-number{ background: rgba(255,255,255,0.08); color: var(--color-text); }
[data-theme="dark"] .page-number.current{ background: var(--color-primary); color: #111 !important; }

/* Commission tracker missing variables */
[data-theme="dark"] .commission-tracker{ background: var(--color-surface); }
[data-theme="dark"] .trial-progress-bar{ background: rgba(255,255,255,0.08); }
[data-theme="dark"] .tier-roadmap{ border-top-color: rgba(255,255,255,0.1); }

/* Rate badges */
[data-theme="dark"] .rate-free{ background: rgba(34,197,94,0.18); color: #86efac; }
[data-theme="dark"] .rate-growth{ background: rgba(234,179,8,0.18); color: #fde047; }
[data-theme="dark"] .rate-standard{ background: rgba(139,92,246,0.18); color: #c4b5fd; }

/* Topbar / job-card (legacy) */
[data-theme="dark"] .topbar{ background: var(--color-surface); }
[data-theme="dark"] .job-card{ background: var(--color-surface); }

/* Rental status badges */
[data-theme="dark"] .rental-status.active{ background: rgba(76,175,80,0.18); color: #81c784; }
[data-theme="dark"] .rental-status.ended{ background: rgba(158,158,158,0.18); color: #bdbdbd; }
[data-theme="dark"] .rental-status.upcoming{ background: rgba(33,150,243,0.18); color: #64b5f6; }

/* With-bg page overrides for dark mode */
[data-theme="dark"] .with-bg .listing-card h3{ color: var(--color-text) !important; }
[data-theme="dark"] .with-bg .listing-card p{ color: var(--color-muted) !important; }
[data-theme="dark"] .with-bg .btn-primary,
[data-theme="dark"] .with-bg .btn-secondary{ color: var(--color-text) !important; }
[data-theme="dark"] .with-bg .btn-danger{ background: rgba(185,28,28,0.2) !important; color: #fca5a5 !important; }
[data-theme="dark"] .with-bg .action-card{
    background: var(--color-surface) !important;
    color: var(--color-text) !important;
}

/*──────────────────────────────────────────────────────────
  CONSOLIDATED RESPONSIVE — replaces scattered blocks
──────────────────────────────────────────────────────────*/

/* ── Tablet (≤ 900px) ─────────────────────────────────── */
@media (max-width: 900px){
    :root{ --max-width: 100%; }

    #marketplaceContainer{ grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
    .listing-grid{ grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
    .features-grid{ grid-template-columns: 1fr 1fr; }
    .how-steps{ grid-template-columns: 1fr 1fr; gap: 24px; }

    .page-header-row{ flex-direction: column; align-items: flex-start; }
    .welcome-section{ flex-direction: column; text-align: center; }
}

/* ── Mobile (≤ 768px) ─────────────────────────────────── */
@media (max-width: 768px){
    /* Sidebar drawer */
    .sidebar{
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        z-index: 100;
        box-shadow: 4px 0 24px rgba(0,0,0,0.15);
    }
    .sidebar.open{ transform: translateX(0); }
    .sidebar-close{ display: block; }
    .sidebar-overlay.open{ display: block; z-index: 99; }
    .sidebar-toggle{ display: inline-flex; }

    /* Dashboard */
    .dashboard-main{ padding: 16px; }
    .stat-cards{ flex-direction: column; }

    /* Marketplace */
    #marketplaceContainer{ grid-template-columns: 1fr; }
    .market-controls{ flex-direction: column; }
    .market-controls input, .market-controls select{ min-width: 0; width: 100%; }

    /* Grids that can overflow on phones */
    .job-list{ grid-template-columns: 1fr; }
    .professional-grid{ grid-template-columns: 1fr; }

    /* Tables: ensure horizontal scroll not page overflow */
    .table-responsive, .data-table-wrap{ overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table{ max-width: 100%; }

    /* Prevent form elements from overflowing */
    input, select, textarea, button{ max-width: 100%; }

    /* Cards */
    .header-actions{ flex-wrap: wrap; gap: 12px; }
    .header-actions .action-card{ flex: 1 1 calc(50% - 12px); min-width: 140px; }
    .card, .listing-card, .form-card{ padding: 14px; }
    .listing-card img{ height: 160px; }

    /* Main content */
    .main-content{ margin: 12px auto; padding: 0 12px; }

    /* Hero & public sections */
    .hero{ padding: 48px 16px 40px; }
    .features-section, .how-section{ padding: 40px 16px; }
    .cta-banner{ padding: 36px 16px; }
    .auth-card{ padding: 28px 20px; }
    .listing-grid{ grid-template-columns: 1fr; }
    .features-grid{ grid-template-columns: 1fr; }
    .how-steps{ grid-template-columns: 1fr; }

    /* Footer */
    .footer-links{ flex-direction: column; gap: 20px; }

    /* Nav dropdown */
    .nav-links.open a{ padding: 12px 14px; font-size: 15px; }
    .user-menu{ right: 8px; top: 56px; }

    /* Remove hover underline on touch (no hover state on mobile) */
    .nav-links a::after{ display: none; }

    /* iOS zoom fix: inputs < 16px cause auto-zoom on focus */
    input, textarea, select{ font-size: 16px !important; }

    /* Navbar mobile: adjust for smaller screens */
    .navbar{ padding: 8px 12px; gap: 8px; overflow: visible; }
    .logo-img{ height: 44px; }
    .logo-text{ font-size: 17px; margin-left: 4px; }
    .logo{ gap: 6px; overflow: visible; }
    .nav-left{ gap: 6px; flex-shrink: 0; overflow: visible; }
    .notif-bell-btn{ font-size: 18px; padding: 4px; }

    /* Responsive type scale */
    :root{
        --type-h1: 26px;
        --type-h2: 22px;
        --type-h3: 18px;
        --type-base: 14px;
    }

    /* Quick-actions: wrap on mobile */
    .quick-actions{
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    /* Auth card wide: fit mobile screens */
    .auth-card--wide{
        max-width: 100%;
        margin: 0 8px;
        padding: 24px 16px;
    }

    /* Ensure touch targets are at least 44px */
    .btn-sm, .btn-xs{
        min-height: 44px;
        min-width: 44px;
        padding: 10px 16px;
    }

    /* Prevent images from overflowing */
    img{ max-width: 100%; height: auto; }
}

/* ── Small phones (≤ 480px) ──────────────────────────── */
@media (max-width: 480px){
    .hero-title{ font-size: 30px; }
    .hero-sub{ font-size: 15px; }
    .hero-actions{ flex-direction: column; align-items: stretch; }
    .hero-actions .btn{ width: 100%; }

    .auth-card{ margin: 0 8px; border-radius: 12px; }

    .btn-lg{ padding: 12px 20px !important; font-size: 15px !important; }

    .section-heading{ font-size: 22px; }
    .feature-card{ padding: 24px 20px; }
    .feature-icon{ font-size: 32px; }

    .stat-card{ padding: 16px; }
    .stat-value{ font-size: 24px; }

    .page-header-text h1{ font-size: 22px; }
    .public-page-header h1{ font-size: 26px; }

    .form-row{ grid-template-columns: 1fr; }

    .detail-hero-img{ max-height: 200px; }
}

/* ── Navbar mobile ≤ 600px ───────────────────────────── */
@media (max-width: 600px){
    .nav-right .nav-links{ display: none; }
    .nav-toggle{ display: inline-flex; }
    .nav-right{ position: relative; }
    .nav-links.open{
        display: flex;
        flex-direction: column;
        position: absolute;
        right: 12px;
        top: 64px;
        background: var(--color-surface);
        padding: 12px;
        gap: 8px;
        border-radius: 10px;
        box-shadow: 0 12px 36px rgba(15,23,42,0.12);
        min-width: 180px;
        z-index: 100;
    }
    .nav-links.open a{ padding: 8px 10px; }
    .navbar{ padding: 8px 10px; overflow: visible; }
    .logo-text{ font-size: 16px; }
    .logo-img{ height: 40px; }
    .logo{ overflow: visible; }
    .nav-left{ overflow: visible; flex-shrink: 0; }
    .user-name{ display: none; } /* hide name, show avatar only */
    .user-actions .btn-primary{ display: none; } /* Login btn hidden — it's in hamburger */
}

/* ── Order Tracking ────────────────────────────────────────── */
.order-tracking{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin: 16px 0 8px;
    padding: 16px 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    position: relative;
    gap: 4px;
}

.tracking-step{
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* connector line between dots */
.tracking-step:not(:last-child)::after{
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    width: 100%;
    height: 3px;
    background: var(--color-border);
    z-index: -1;
}

.tracking-step.done:not(:last-child)::after{
    background: var(--accent);
}

.tracking-dot{
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid var(--color-border);
    background: var(--color-surface);
    transition: all .2s ease;
    flex-shrink: 0;
}

.tracking-step.done .tracking-dot{
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.18);
}

.tracking-step.active .tracking-dot{
    border-color: var(--accent);
    background: var(--color-surface);
    box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.25);
    animation: trackingPulse 1.6s ease-in-out infinite;
}

@keyframes trackingPulse{
    0%, 100%{ box-shadow: 0 0 0 3px rgba(255,138,0,0.2); }
    50%{ box-shadow: 0 0 0 6px rgba(255,138,0,0.35); }
}

.tracking-label{
    margin-top: 6px;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--color-muted);
    text-align: center;
    line-height: 1.2;
}

.tracking-step.done .tracking-label{
    color: var(--accent);
    font-weight: 600;
}

.tracking-step.active .tracking-label{
    color: var(--color-text);
    font-weight: 600;
}

@media (max-width: 600px){
    .order-tracking{ padding: 12px 6px; }
    .tracking-dot{ width: 16px; height: 16px; border-width: 2px; }
    .tracking-label{ font-size: 0.62rem; }
    .tracking-step:not(:last-child)::after{ top: 7px; height: 2px; }
}

/* ────────────────────────────────────
   IN-APP MESSAGING — Inbox & Chat
   ──────────────────────────────────── */

/* Inbox conversation list */
.conversation-list{
    display: flex;
    flex-direction: column;
    gap: 2px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-surface);
}

.conversation-item{
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    text-decoration: none;
    color: var(--color-text);
    transition: background .15s;
    border-bottom: 1px solid var(--color-border);
}

.conversation-item:last-child{ border-bottom: none; }
.conversation-item:hover{ background: var(--color-bg); }
.conversation-item.unread{ background: rgba(var(--accent-rgb, 99,102,241), .06); }

.conversation-avatar{
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.conversation-details{
    flex: 1;
    min-width: 0;
}

.conversation-details strong{
    display: block;
    font-size: 0.95rem;
}

.conversation-preview{
    margin: 2px 0 0;
    font-size: 0.85rem;
    color: var(--color-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-meta{
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.conversation-time{
    font-size: 0.75rem;
    color: var(--color-muted);
}

.unread-dot{
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--accent);
}

/* Chat / Conversation */
.chat-box{
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
    padding: 20px 12px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.chat-bubble{
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 16px;
    position: relative;
    word-wrap: break-word;
}

.chat-bubble p{ margin: 0; }

.chat-bubble.sent{
    align-self: flex-end;
    background: var(--accent);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-bubble.received{
    align-self: flex-start;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-bottom-left-radius: 4px;
}

.chat-time{
    display: block;
    font-size: 0.7rem;
    margin-top: 4px;
    opacity: .7;
}

.chat-bubble.sent .chat-time{ text-align: right; }
.chat-bubble.received .chat-time{ color: var(--color-muted); }

.chat-input-form{
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-input-form textarea{
    flex: 1;
    resize: vertical;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
    font-family: inherit;
    font-size: 0.9rem;
}

.chat-input-form textarea:focus{
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 99,102,241), .15);
}

.chat-input-form .btn{ flex-shrink: 0; height: 44px; }

@media (max-width: 600px){
    .chat-bubble{ max-width: 85%; }
    .conversation-item{ padding: 10px 12px; gap: 10px; }
    .conversation-avatar{ width: 36px; height: 36px; font-size: 0.9rem; }
}

/* ── Enhanced Conversation Header ────────────────────────────── */
.conversation-header{
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    flex-wrap: wrap;
}

.conversation-user-info{
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.conversation-avatar{
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent) 0%, #5b21b6 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.conversation-user-details h2{
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.2;
}

.user-status{
    font-size: 0.75rem;
    color: var(--color-muted);
}

.user-status.online::before{
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    margin-right: 6px;
}

/* ── Chat Meta (time + read receipt) ─────────────────────────── */
.chat-meta{
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    justify-content: flex-end;
}

.read-receipt{
    font-size: 0.7rem;
    color: rgba(255,255,255,0.6);
}

.read-receipt.read{
    color: #22c55e;
}

.chat-bubble.received .read-receipt{ display: none; }

/* ── Typing Indicator ────────────────────────────────────────── */
.typing-indicator{
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    opacity: 0.7;
}

.typing-dots{
    display: flex;
    gap: 3px;
}

.typing-dots span{
    width: 6px;
    height: 6px;
    background: var(--color-muted);
    border-radius: 50%;
    animation: typingDot 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(2){ animation-delay: 0.2s; }
.typing-dots span:nth-child(3){ animation-delay: 0.4s; }

@keyframes typingDot{
    0%, 60%, 100%{ transform: translateY(0); }
    30%{ transform: translateY(-4px); }
}

.typing-text{
    font-size: 0.8rem;
    color: var(--color-muted);
    font-style: italic;
}

/* ── Enhanced Chat Input Form ────────────────────────────────── */
.chat-input-wrapper{
    display: flex;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    padding: 6px 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-input-wrapper:focus-within{
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.chat-input-form{
    flex-direction: column;
    gap: 12px;
}

.chat-input-form textarea{
    flex: 1;
    border: none;
    background: transparent;
    resize: none;
    min-height: 24px;
    max-height: 120px;
    padding: 8px 4px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.chat-input-form textarea:focus{
    outline: none;
    box-shadow: none;
}

.emoji-toggle-btn{
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
    transition: background 0.2s, transform 0.2s;
}

.emoji-toggle-btn:hover{
    background: var(--color-bg);
    transform: scale(1.1);
}

.send-btn{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.send-btn svg{
    margin: 0;
}

/* ── Emoji Picker ────────────────────────────────────────────── */
.emoji-picker{
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    margin-top: 8px;
}

.emoji-picker-tabs{
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 8px;
}

.emoji-tab{
    background: none;
    border: none;
    font-size: 1.2rem;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.emoji-tab:hover{
    background: var(--color-bg);
}

.emoji-tab.active{
    background: var(--accent);
    border-radius: 8px;
}

.emoji-grid{
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    max-height: 180px;
    overflow-y: auto;
}

.emoji-btn{
    background: none;
    border: none;
    font-size: 1.4rem;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}

.emoji-btn:hover{
    background: var(--color-bg);
    transform: scale(1.2);
}

/* ── Quick Reactions ─────────────────────────────────────────── */
.quick-reactions{
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 0;
}

.quick-reaction-label{
    font-size: 0.8rem;
    color: var(--color-muted);
}

.quick-reaction{
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    font-size: 1.1rem;
    padding: 6px 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-reaction:hover{
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.1);
}

/* ── Mobile adjustments for enhanced chat ────────────────────── */
@media (max-width: 600px){
    .emoji-grid{
        grid-template-columns: repeat(6, 1fr);
    }
    
    .quick-reactions{
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .conversation-header{
        gap: 10px;
    }
    
    .conversation-avatar{
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

/* ── Trust Score Badges & Meter ─────────────────────────────── */
.trust-score-badge{
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    margin: 4px 2px;
    line-height: 1.5;
    border: 1px solid transparent;
}
.trust-excellent{ background: #dcfce7; color: #15803d; border-color: #86efac; }
.trust-very-good{ background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
.trust-good{ background: #fef3c7; color: #b45309; border-color: #fcd34d; }
.trust-building{ background: #ffedd5; color: #c2410c; border-color: #fdba74; }
.trust-starter{ background: #f3f4f6; color: #4b5563; border-color: #d1d5db; }
.trust-new{ background: #f9fafb; color: #6b7280; border-color: #e5e7eb; }

/* Dark mode trust badges */
[data-theme="dark"] .trust-excellent{ background: rgba(22,163,74,0.25); color: #86efac; border-color: rgba(34,197,94,0.4); }
[data-theme="dark"] .trust-very-good{ background: rgba(37,99,235,0.25); color: #93c5fd; border-color: rgba(59,130,246,0.4); }
[data-theme="dark"] .trust-good{ background: rgba(202,138,4,0.25); color: #fcd34d; border-color: rgba(234,179,8,0.4); }
[data-theme="dark"] .trust-building{ background: rgba(234,88,12,0.25); color: #fdba74; border-color: rgba(249,115,22,0.4); }
[data-theme="dark"] .trust-starter{ background: rgba(107,114,128,0.25); color: #d1d5db; border-color: rgba(156,163,175,0.3); }
[data-theme="dark"] .trust-new{ background: rgba(107,114,128,0.15); color: #9ca3af; border-color: rgba(156,163,175,0.2); }

.trust-score-meter{
    margin: 10px 0 6px;
    text-align: center;
}
.trust-bar-container{
    width: 200px;
    max-width: 100%;
    height: 8px;
    background: var(--color-border, #e5e7eb);
    border-radius: 4px;
    overflow: hidden;
    margin: 6px auto 0;
}
.trust-bar-fill{
    height: 100%;
    border-radius: 4px;
    transition: width .4s ease;
}

/* ── Notification Bell & Dropdown ──────────────────────── */
.nav-notification{
    position: relative;
    display: flex;
    align-items: center;
}
.notif-bell-btn{
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    position: relative;
    padding: 4px 8px;
    line-height: 1;
}
.notif-badge{
    position: absolute;
    top: -2px;
    right: 0;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    line-height: 1;
    animation: notifPulse .3s ease;
}
@keyframes notifPulse{
    0%{ transform: scale(0.5); }
    60%{ transform: scale(1.2); }
    100%{ transform: scale(1); }
}
.notif-dropdown{
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: -40px;
    width: min(340px, calc(100vw - 32px));
    max-height: 420px;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 48px rgba(15,23,42,.18);
    z-index: 1000;
    overflow: hidden;
    border: 1px solid var(--color-border);
}
.notif-dropdown.open{ display: block; }
.notif-dropdown-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
}
.notif-mark-all{
    background: none;
    border: none;
    color: var(--accent);
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
}
.notif-mark-all:hover{ text-decoration: underline; }
.notif-dropdown-body{
    max-height: 320px;
    overflow-y: auto;
}
.notif-item{
    display: block;
    padding: 10px 16px;
    border-bottom: 1px solid var(--color-border);
    text-decoration: none;
    color: var(--color-text);
    transition: background .15s;
}
.notif-item:hover{ background: rgba(var(--accent-rgb,99,102,241),.06); }
.notif-item.unread{ background: rgba(var(--accent-rgb,99,102,241),.04); border-left: 3px solid var(--accent); }
.notif-item-title{
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
}
.notif-item-msg{
    font-size: 12px;
    color: var(--color-muted);
    line-height: 1.4;
}
.notif-item-time{
    font-size: 11px;
    color: var(--color-muted);
    margin-top: 2px;
}
.notif-dropdown-footer{
    display: block;
    text-align: center;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    border-top: 1px solid var(--color-border);
}
.notif-dropdown-footer:hover{ background: rgba(var(--accent-rgb,99,102,241),.06); }

@media (max-width: 600px){
    .notif-dropdown{ width: calc(100vw - 32px); right: -20px; max-width: 340px; }
}
@media (max-width: 480px){
    .notif-dropdown{ width: 290px; right: -20px; }
}

/* ─── Settings Page ───────────────────────────── */
.settings-section{
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 28px 24px;
    margin-bottom: 20px;
}
.settings-section h3{
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}
.settings-form .form-group{
    margin-bottom: 16px;
}
.settings-form label{
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: var(--color-text);
}
.form-row-2{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 600px){
    .form-row-2{ grid-template-columns: 1fr; }
}
.settings-info-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.settings-info-item{
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: var(--color-bg);
    border-radius: 8px;
    border: 1px solid var(--color-border);
}
.settings-info-label{
    font-size: 0.78rem;
    color: var(--color-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.settings-info-value{
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
}
.settings-danger{
    border-color: rgba(239,68,68,.3);
}
.settings-danger h3{
    color: #ef4444;
    border-bottom-color: rgba(239,68,68,.2);
}
.btn-danger{
    background: #ef4444;
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.btn-danger:hover{ background: #dc2626; }

/* ─── Portfolio Gallery ───────────────────────────── */
.portfolio-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.portfolio-item{
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    background: var(--color-card);
}
.portfolio-item img{
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform .2s;
}
.portfolio-item img:hover{ transform: scale(1.03); }
.portfolio-tag{
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tag-before{ background: rgba(245,158,11,.9); color: #fff; }
.tag-after{ background: rgba(16,185,129,.9); color: #fff; }
.portfolio-caption{
    padding: 8px 10px;
    font-size: 13px;
    color: var(--color-muted);
    margin: 0;
}
.portfolio-manage{ position: relative; }
.portfolio-delete-form{
    position: absolute;
    top: 6px;
    right: 6px;
}
.portfolio-delete-form .btn-danger{
    padding: 2px 8px;
    font-size: 13px;
    border-radius: 50%;
    min-width: 28px;
    min-height: 28px;
    line-height: 1;
}
.portfolio-upload-form{
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 16px;
}

/* ─── Lightbox ────────────────────────────────────── */
.lightbox-overlay{
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.88);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    cursor: pointer;
}
.lightbox-overlay.active{ display: flex; }
.lightbox-overlay img{
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
.lightbox-close{
    position: absolute;
    top: 16px; right: 24px;
    font-size: 2rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10000;
}
.lightbox-caption{
    color: #ccc;
    margin-top: 12px;
    font-size: 14px;
    text-align: center;
}

/* ─── Availability Badge ─────────────────────────── */
.availability-badge{
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
}
.avail-available{ background: rgba(16,185,129,.12); color: #059669; }
.avail-busy{ background: rgba(245,158,11,.12); color: #d97706; }
.avail-unavailable{ background: rgba(239,68,68,.12); color: #dc2626; }
.availability-dot{ font-size: 12px; vertical-align: middle; margin-left: 4px; }

/* ─── Price Range Filter ─────────────────────────── */
.price-range-group{
    display: flex;
    align-items: center;
    gap: 6px;
}
.price-input{
    width: 100px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-card);
    color: var(--color-text);
    font-size: 13px;
    box-sizing: border-box;
}
.price-input:focus{ border-color: var(--accent); outline: none; }
.price-sep{ color: var(--color-muted); font-weight: 600; }
@media (max-width: 600px){
    .price-range-group{ width: 100%; }
    .price-input{ flex: 1; width: auto; min-width: 0; max-width: calc(50% - 16px); }
}

/* ── Admin Dashboard ──────────────────────────── */
.stat-sub{
    display: block;
    font-size: 0.78rem;
    color: var(--color-muted);
    margin-top: 2px;
}
.admin-actions-row{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.admin-user-filters{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.admin-actions-cell{
    white-space: normal;
    min-width: 180px;
}
.action-buttons-wrap{
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.trust-adjust{
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}
.trust-form{
    display: inline-flex;
    gap: 4px;
    align-items: center;
}
.trust-input{
    width: 65px;
    padding: 2px 4px;
    font-size: 0.8rem;
}
.btn-delete-user{
    margin-top: 2px;
}
.badge-banned{
    display: inline-block;
    background: #dc2626;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
}
.badge-active{
    display: inline-block;
    background: #16a34a;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
}
.role-badge{
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}
.role-client{ background: #dbeafe; color: #1e40af; }
.role-professional{ background: #dcfce7; color: #166534; }
.role-supplier{ background: #fef3c7; color: #92400e; }
.role-admin{ background: #fce7f3; color: #9d174d; }
.row-banned{ opacity: 0.6; background: #fef2f2; }
[data-theme="dark"] .row-banned{ background: rgba(220,38,38,0.1); }
.btn-xs{
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 4px;
}
.btn-danger{ background: #dc2626; color: #fff; border: none; cursor: pointer; }
.btn-danger:hover{ background: #b91c1c; }
.btn-success{ background: #16a34a; color: #fff; border: none; cursor: pointer; }
.btn-success:hover{ background: #15803d; }

/* ── Favorites ──────────────────────────────── */
.fav-btn{
    background: transparent;
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px 10px;
    border-radius: 6px;
    transition: transform .15s;
}
.fav-btn:hover{ transform: scale(1.15); }
.fav-btn.favorited{ border-color: #e11d48; }

/* ── Review Responses ───────────────────────── */
.review-response{
    background: var(--color-bg, #f5f7fb);
    border-left: 3px solid var(--accent, #6c3ce0);
    padding: 10px 14px;
    margin-top: 10px;
    border-radius: 0 8px 8px 0;
    font-size: 0.92rem;
}
.review-response strong{ color: var(--accent, #6c3ce0); }
.review-response p{ margin: 4px 0; }
.review-response small{ color: var(--color-muted, #888); }
.review-response-form{
    margin-top: 10px;
    border-top: 1px solid var(--border, #e5e7eb);
    padding-top: 10px;
}
.review-response-form textarea{
    font-size: 0.9rem;
    resize: vertical;
}

/* ── Job Category Badges ── */
.category-badge{
    display: inline-block;
    background: var(--primary, #7c3aed);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-right: 4px;
    vertical-align: middle;
}

/* ── Availability Calendar ── */
.avail-calendar{
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    padding: 16px;
    max-width: 420px;
    background: var(--card-bg, #fff);
}
.avail-cal-nav{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.avail-cal-header{
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-muted, #6b7280);
    margin-bottom: 6px;
}
.avail-cal-grid{
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.cal-day{
    text-align: center;
    padding: 8px 0;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: background .15s;
    user-select: none;
    color: var(--color-text, #1f2937);
}
.cal-day:hover{ background: var(--border, #e5e7eb); }
.cal-day-empty{ cursor: default; }
.cal-day-busy{
    background: #fecaca;
    color: #991b1b;
    font-weight: 600;
}
.cal-day-busy:hover{ background: #fca5a5; }
.cal-day-available{
    background: #bbf7d0;
    color: #166534;
    font-weight: 600;
}
.cal-day-available:hover{ background: #86efac; }
.cal-day-today{
    box-shadow: inset 0 0 0 2px var(--primary, #7c3aed);
}
.avail-cal-legend{
    display: flex;
    gap: 16px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--color-muted, #6b7280);
}
.cal-dot{
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}
.cal-dot-busy{ background: #fecaca; border: 1px solid #991b1b; }
.cal-dot-available{ background: #bbf7d0; border: 1px solid #166534; }
.cal-dot-none{ background: var(--border, #e5e7eb); border: 1px solid #9ca3af; }
.cal-day-readonly{ cursor: default; }
.cal-day-readonly:hover{ background: transparent; }
.cal-day-readonly.cal-day-busy:hover{ background: #fecaca; }
.cal-day-readonly.cal-day-available:hover{ background: #bbf7d0; }

/* ── Language Switch ── */
.lang-switch-btn{
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text, #1f2937);
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, #e5e7eb);
    transition: background .15s;
    cursor: pointer;
    white-space: nowrap;
}
.lang-switch-btn:hover{
    background: var(--primary, #7c3aed);
    color: #fff;
    border-color: var(--primary, #7c3aed);
}

/* ── PWA Install Button ── */
.pwa-install-btn{
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background: var(--primary, #7c3aed);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 28px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(124, 58, 237, .35);
    animation: pwa-bounce .5s ease;
}
@keyframes pwa-bounce{
    0%{ transform: translateX(-50%) translateY(20px); opacity:0 }
    100%{ transform: translateX(-50%) translateY(0); opacity:1 }
}
.pwa-install-btn:hover{
    background: #6d28d9;
    box-shadow: 0 6px 20px rgba(124, 58, 237, .5);
}

/* ── Commission Trial Tracker ───────────────────────────────── */
.commission-tracker{
    background: var(--bg-secondary, #fff);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 12px;
    padding: 20px 24px;
}
.commission-tracker-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.commission-rate-badge{
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 700;
}
.rate-free{
    background: #dcfce7;
    color: #16a34a;
}
.rate-growth{
    background: #fef3c7;
    color: #d97706;
}
.rate-standard{
    background: #ede9fe;
    color: #7c3aed;
}
.trial-progress-bar{
    width: 100%;
    height: 10px;
    background: var(--bg-tertiary, #eee);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 6px;
}
.trial-progress-fill{
    height: 100%;
    border-radius: 8px;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    transition: width .5s ease;
}
.rate-growth ~ .trial-progress-bar .trial-progress-fill,
.commission-tracker:has(.rate-growth) .trial-progress-fill{
    background: linear-gradient(90deg, #f59e0b, #d97706);
}
.commission-tracker:has(.rate-standard) .trial-progress-fill{
    background: linear-gradient(90deg, #7c3aed, #6d28d9);
}
.trial-progress-labels{
    display: flex;
    justify-content: space-between;
    font-size: .8rem;
    color: var(--color-muted, #888);
    margin-bottom: 16px;
}
.tier-roadmap{
    display: flex;
    justify-content: space-between;
    gap: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color, #e5e5e5);
}
.tier-step{
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    color: var(--color-muted, #999);
}
.tier-dot{
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color, #ccc);
    flex-shrink: 0;
}
.tier-active .tier-dot{
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .25);
}
.tier-active{
    color: var(--color-text, #222);
    font-weight: 600;
}
.tier-done .tier-dot{
    background: #7c3aed;
}
.tier-done{
    color: var(--color-muted, #999);
}

/* ── Push Notification Opt-in Banner ──────────────────── */
.push-optin-banner{
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 90%;
    max-width: 480px;
    background: var(--color-bg-card, #fff);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    padding: 16px 20px;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.push-optin-banner.visible{ bottom: 24px; }
.push-optin-content{
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.push-optin-icon{ font-size: 28px; }
.push-optin-text{ flex: 1; min-width: 160px; }
.push-optin-text strong{ display: block; margin-bottom: 2px; color: var(--color-text, #1e293b); }
.push-optin-text p{ margin: 0; font-size: 0.85rem; color: var(--color-muted, #64748b); }
.push-optin-actions{ display: flex; gap: 8px; }

/* ── Notification Badge Pulse ─────────────────────────── */
@keyframes badge-pulse{
    0%{ transform: scale(1); }
    50%{ transform: scale(1.3); }
    100%{ transform: scale(1); }
}
.notif-badge.pulse{
    animation: badge-pulse 0.4s ease;
}

/* ── Dark Mode: Availability Calendar ─────────────────── */
[data-theme="dark"] .avail-calendar{
    background: var(--color-surface, #1a1d27);
    border-color: rgba(255,255,255,0.1);
}
[data-theme="dark"] .avail-cal-header{
    color: #9ca3af;
}
[data-theme="dark"] .cal-day{
    color: var(--color-text, #e5e7eb);
}
[data-theme="dark"] .cal-day:hover{
    background: rgba(255,255,255,0.1);
}
[data-theme="dark"] .cal-day-empty{
    color: #4b5563;
}
[data-theme="dark"] .cal-day-busy{
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}
[data-theme="dark"] .cal-day-busy:hover{
    background: rgba(239, 68, 68, 0.35);
}
[data-theme="dark"] .cal-day-available{
    background: rgba(34, 197, 94, 0.25);
    color: #86efac;
}
[data-theme="dark"] .cal-day-available:hover{
    background: rgba(34, 197, 94, 0.35);
}
[data-theme="dark"] .cal-day-today{
    box-shadow: inset 0 0 0 2px var(--color-primary, #a78bfa);
}
[data-theme="dark"] .avail-cal-legend{
    color: #9ca3af;
}
[data-theme="dark"] .cal-dot-busy{
    background: rgba(239, 68, 68, 0.4);
    border-color: #f87171;
}
[data-theme="dark"] .cal-dot-available{
    background: rgba(34, 197, 94, 0.4);
    border-color: #4ade80;
}
[data-theme="dark"] .cal-dot-none{
    background: rgba(255,255,255,0.1);
    border-color: #6b7280;
}
/* Dark mode for date inputs */
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="datetime-local"]{
    color-scheme: dark;
    background: var(--color-surface, #1a1d27);
    color: var(--color-text, #e5e7eb);
    border-color: rgba(255,255,255,0.15);
}
[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator{
    filter: invert(0.8);
}