/* ============================================================
   HukumKu - Marketplace Jasa Hukum
   Global Stylesheet - Modern Light & Green Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ============================================================
   CSS VARIABLES (WHITE & LIGHT GREEN THEME)
   ============================================================ */
:root {
  --primary: #059669;          /* Emerald / Green 600 */
  --primary-dark: #047857;     /* Emerald 700 */
  --primary-light: #10b981;    /* Emerald 500 */
  --primary-subtle: #ecfdf5;   /* Emerald 50 (light green background) */
  --primary-border: #a7f3d0;   /* Emerald 200 */
  
  --secondary: #0284c7;        /* Sky 600 */
  --accent: #f59e0b;           /* Amber 500 */
  --success: #10b981;          /* Emerald 500 */
  --danger: #ef4444;           /* Red 500 */
  --warning: #f59e0b;          /* Amber 500 */
  --info: #06b6d4;             /* Cyan 500 */

  --bg-dark: #f8fafc;          /* Light Slate background */
  --bg-card: #ffffff;          /* Pure White cards */
  --bg-card2: #f1f5f9;         /* Off-white secondary card */
  --border: #e2e8f0;           /* Soft border */
  --border-strong: #cbd5e1;    /* Stronger border */

  --text-primary: #0f172a;     /* Deep Slate text */
  --text-secondary: #475569;   /* Slate secondary text */
  --text-muted: #64748b;       /* Slate muted text */

  --gradient-primary: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
  --gradient-card: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
  --gradient-hero: linear-gradient(180deg, #ecfdf5 0%, #f8fafc 100%);
  --gradient-accent: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 16px -2px rgba(5, 150, 105, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 32px -4px rgba(5, 150, 105, 0.12), 0 4px 12px -2px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 8px 30px rgba(16, 185, 129, 0.2);

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 260px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font-family: inherit; }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.25; color: var(--text-primary); }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.35rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.35rem, 2vw, 1.75rem); }
h4 { font-size: 1.25rem; }

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

/* ============================================================
   CONTAINER
   ============================================================ */
.container { max-width: 1240px; margin: 0 auto; padding: 0 1.5rem; }

/* ============================================================
   NAVBAR (PUBLIC)
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
}

.navbar-brand .brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.navbar-nav a {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--primary);
}

.navbar-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Hamburger Button */
.hamburger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.hamburger:hover {
  background: var(--primary-subtle);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
  margin: 0 auto;
}

/* Hamburger active 'X' animation */
.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Navbar Drawer */
.navbar-actions-mobile {
  max-height: 0;
  overflow: hidden;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

.navbar-actions-mobile.open {
  max-height: 400px;
}

.mobile-menu-inner {
  padding: 1.25rem 1.5rem 1.5rem;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-list a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.mobile-nav-list a i {
  font-size: 1.1rem;
  width: 22px;
  color: var(--text-muted);
}

.mobile-nav-list a:hover,
.mobile-nav-list a.active {
  background: var(--primary-subtle);
  color: var(--primary);
}

.mobile-nav-list a:hover i,
.mobile-nav-list a.active i {
  color: var(--primary);
}

.mobile-nav-divider {
  height: 1px;
  background: var(--border);
  margin: 1rem 0;
}

.mobile-nav-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-md);
  font-size: 0.925rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.35);
  color: #ffffff;
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-primary);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-card2);
  border-color: var(--border-strong);
  color: var(--primary);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary-border);
}

.btn-outline:hover {
  background: var(--primary-subtle);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.btn-success {
  background: var(--success);
  color: #ffffff;
}
.btn-success:hover { background: #059669; }

.btn-warning {
  background: var(--warning);
  color: #ffffff;
}
.btn-warning:hover { background: #d97706; }

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}
.btn-danger:hover { background: #dc2626; }

.btn-info {
  background: var(--info);
  color: #ffffff;
}
.btn-info:hover { background: #0891b2; }

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.825rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 0.85rem 1.85rem; font-size: 1rem; border-radius: var(--radius-md); }
.btn-block { width: 100%; justify-content: center; }

/* ============================================================
   CARDS & CONTAINERS
   ============================================================ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-border);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  padding: 8rem 0 5rem;
  background: var(--gradient-hero);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: -150px;
  right: -150px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 540px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.hero-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
}

.hero-stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.float-card {
  position: absolute;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  animation: float 4s ease-in-out infinite;
  z-index: 2;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ============================================================
   SECTIONS & GRID
   ============================================================ */
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.grid { display: grid; gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ============================================================
   CATEGORY CARDS
   ============================================================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
  text-decoration: none;
  display: block;
}

.category-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  background: var(--primary-subtle);
}

.category-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
  transition: var(--transition);
}

.category-card:hover .category-icon {
  background: var(--gradient-primary);
  color: #ffffff;
  transform: scale(1.08);
}

.category-name {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.category-count {
  font-size: 0.825rem;
  color: var(--text-muted);
}

/* ============================================================
   SERVICES CARDS
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.service-card-image {
  height: 160px;
  background: var(--gradient-card);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  font-size: 3rem;
  border-bottom: 1px solid var(--border);
}

.service-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.service-card-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;

  /* Line clamp 2 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.service-card-provider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.provider-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.service-card-meta {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.service-price-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.service-price {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--primary-dark);
}

.star-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}

/* ============================================================
   PROVIDER CARDS
   ============================================================ */
.provider-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
}

.provider-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.provider-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 2rem;
  margin: 0 auto 1.25rem;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.25);
}

.verified-badge {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

/* ============================================================
   STEPS / HOW IT WORKS
   ============================================================ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  position: relative;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  transition: var(--transition);
}

.step-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
}

.testimonial-quote {
  font-size: 3rem;
  color: var(--primary-border);
  line-height: 1;
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-family: Georgia, serif;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  background: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-xl);
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  color: var(--text-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.footer-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--primary);
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.social-link:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

/* ============================================================
   PANEL LAYOUT (ADMIN / PROVIDER / CUSTOMER)
   ============================================================ */
.panel-layout {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-dark);
}

.sidebar {
  width: var(--sidebar-width);
  background: #ffffff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 900;
  transition: var(--transition);
}

.sidebar-logo {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.25rem;
  font-weight: 800;
}

.sidebar-logo .brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1rem;
}

.sidebar-user {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.875rem;
  background: var(--primary-subtle);
}

.sidebar-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.sidebar-user-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.sidebar-user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sidebar-nav {
  padding: 1.25rem 1rem;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-nav-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.75rem 0.75rem 0.25rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.sidebar-nav a i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  color: var(--text-muted);
  transition: var(--transition);
}

.sidebar-nav a:hover {
  background: var(--primary-subtle);
  color: var(--primary);
}

.sidebar-nav a:hover i {
  color: var(--primary);
}

.sidebar-nav a.active {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.sidebar-nav a.active i {
  color: #ffffff;
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

.panel-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.panel-topbar {
  height: 72px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 800;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.panel-topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
}

.panel-topbar-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.panel-content {
  padding: 2rem;
  flex: 1;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 850;
}

/* ============================================================
   STATS CARDS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.stat-card.primary::before { background: var(--primary); }
.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.danger::before  { background: var(--danger); }
.stat-card.info::before    { background: var(--info); }

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.stat-icon.primary { background: var(--primary-subtle); color: var(--primary); }
.stat-icon.success { background: #d1fae5; color: #059669; }
.stat-icon.warning { background: #fef3c7; color: #d97706; }
.stat-icon.danger  { background: #fee2e2; color: #dc2626; }
.stat-icon.info    { background: #cffaff; color: #0891b2; }

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ============================================================
   TABLES
   ============================================================ */
.table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.table-title { font-weight: 700; font-size: 1.05rem; }

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.table th {
  background: var(--bg-card2);
  padding: 0.875rem 1.5rem;
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--primary-subtle); }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-primary   { background: var(--primary-subtle); color: var(--primary-dark); border: 1px solid var(--primary-border); }
.badge-secondary { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.badge-success   { background: #d1fae5; color: #047857; border: 1px solid #6ee7b7; }
.badge-warning   { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.badge-danger    { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.badge-info      { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }

/* Status Badges */
.status-pending     { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.status-confirmed   { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.status-in_progress { background: #ede9fe; color: #6d28d9; border: 1px solid #ddd6fe; }
.status-completed   { background: #d1fae5; color: #047857; border: 1px solid #6ee7b7; }
.status-cancelled   { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.status-rejected    { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }

/* ============================================================
   FORM CONTROLS
   ============================================================ */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--text-primary);
  font-size: 0.925rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.form-control::placeholder { color: #94a3b8; }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%20475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
  padding-right: 2.5rem;
}

.input-group {
  display: flex;
  gap: 0.5rem;
}

.input-group .form-control { flex: 1; }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-dark);
}

.auth-hero-side {
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  position: relative;
  overflow: hidden;
  color: #ffffff;
}

.auth-hero-side::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  top: -200px;
  right: -200px;
}

.auth-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  background: #ffffff;
}

.auth-card {
  width: 100%;
  max-width: 440px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 2rem;
}

.auth-logo .brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.25rem;
}

/* ============================================================
   FILTERS & PAGINATION
   ============================================================ */
.filter-bar {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.75rem;
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
}

.page-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  text-decoration: none;
}

.page-btn:hover,
.page-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* ============================================================
   BREADCRUMB & ALERTS & EMPTY STATES
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { font-size: 0.75rem; color: var(--border-strong); }

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success { background: #d1fae5; color: #047857; border: 1px solid #a7f3d0; }
.alert-error   { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.alert-warning { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.alert-info    { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3.5rem;
  color: var(--primary-border);
  margin-bottom: 1rem;
}

.empty-state h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

/* ============================================================
   DETAIL PAGES
   ============================================================ */
.detail-hero {
  background: var(--primary-subtle);
  border-bottom: 1px solid var(--primary-border);
  padding: 3rem 0 2.5rem;
}

/* ============================================================
   RESPONSIVE DESIGN (MOBILE FRIENDLY)
   ============================================================ */
@media (max-width: 1024px) {
  .hero-visual { display: none !important; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .hamburger { display: flex !important; }
  
  .auth-page { grid-template-columns: 1fr; }
  .auth-hero-side { display: none !important; }

  .panel-main { margin-left: 0; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.active { display: block; }
  .topbar-toggle { display: block; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .hero {
    padding: 5.5rem 0 2.5rem;
    text-align: center;
  }

  .hero-badge {
    margin-bottom: 1rem;
    font-size: 0.78rem;
    padding: 0.35rem 0.85rem;
  }
  
  .hero-title {
    font-size: 1.85rem;
    line-height: 1.25;
    margin-bottom: 1rem;
  }
  
  .hero-subtitle {
    font-size: 0.925rem;
    margin: 0 auto 1.5rem;
    max-width: 100%;
    line-height: 1.6;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
    margin-bottom: 2rem;
    justify-content: center;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-stats {
    justify-content: space-around;
    gap: 0.75rem;
    padding-top: 1.25rem;
  }

  .hero-stat-value {
    font-size: 1.35rem;
  }

  .hero-stat-label {
    font-size: 0.75rem;
  }

  .section { padding: 3rem 0; }
  .panel-content { padding: 1.25rem; }
  .panel-topbar { padding: 0 1.25rem; }
  .card { padding: 1.25rem; }
  .table th, .table td { padding: 0.75rem 1rem; }
  
  .table-wrapper { overflow-x: auto; }
}
