/* ===================================================================
   SHADI KE RISHTAY - PREMIUM MODERN DESIGN SYSTEM
   Modern, Ultra-Clean, Glassmorphism & High Aesthetic Matrimonial UI
   =================================================================== */

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

:root {
  /* Brand Palette */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --primary-soft: rgba(99, 102, 241, 0.08);
  --primary-glow: rgba(99, 102, 241, 0.25);
  
  --accent: #ec4899;
  --accent-light: #f472b6;
  --accent-soft: rgba(236, 72, 153, 0.1);
  --accent-glow: rgba(236, 72, 153, 0.25);

  --rose-gold: #f59e0b;
  --rose-soft: rgba(245, 158, 11, 0.1);

  --whatsapp: #10b981;
  --whatsapp-dark: #059669;
  --whatsapp-glow: rgba(16, 185, 129, 0.35);

  --call-blue: #3b82f6;
  --call-dark: #2563eb;
  --call-glow: rgba(59, 130, 246, 0.35);

  --danger: #f43f5e;
  --danger-dark: #e11d48;

  /* Neutrals & Surfaces */
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #31103f 100%);
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --card-hover-bg: #ffffff;
  --border-light: rgba(226, 232, 240, 0.8);
  --border-focus: #6366f1;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-on-dark: #ffffff;

  /* Elevation Shadows */
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.07), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 35px -8px rgba(99, 102, 241, 0.12), 0 10px 18px -4px rgba(15, 23, 42, 0.05);
  --shadow-hover: 0 25px 45px -10px rgba(99, 102, 241, 0.22), 0 12px 22px -6px rgba(15, 23, 42, 0.08);

  /* Geometry & Radius */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Font stacks */
  --font-urdu: 'Noto Naskh Arabic', 'Noto Nastaliq Urdu', -apple-system, BlinkMacSystemFont, 'Segoe UI', serif;
  --font-en: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===================================================================
   Reset & Base Styles
   =================================================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-urdu);
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(248, 250, 252, 1) 0%, rgba(241, 245, 249, 1) 100%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===================================================================
   Navbar (Glassmorphism & High-tech feel)
   =================================================================== */
.navbar {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s ease;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-on-dark);
  transition: transform 0.2s ease;
}

.logo:hover {
  transform: scale(1.02);
}

.logo-badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px var(--accent-glow);
  color: #fff;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.logo-badge img {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
}

.logo-info {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.logo-tagline {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Search Bar */
.search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  padding: 5px 6px 5px 18px;
  flex: 1;
  max-width: 460px;
  min-width: 240px;
  transition: all 0.25s ease;
  position: relative;
}

.search-box:focus-within {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25);
}

.search-box input {
  border: none;
  outline: none;
  flex: 1;
  font-family: inherit;
  font-size: 1rem;
  padding: 8px 6px;
  background: transparent;
  color: #ffffff;
  direction: rtl;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.btn-search {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  width: 38px;
  height: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-search:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px var(--accent-glow);
}

.btn-search svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Nav Actions */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-admin {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 9px 18px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-admin:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

/* ===================================================================
   Hero Section (Premium Matrimonial Vibes)
   =================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg-gradient);
  padding: 70px 24px 85px;
  text-align: center;
  color: #fff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(236, 72, 153, 0.18) 0%, transparent 65%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  color: #fce7f3;
  margin-bottom: 20px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 30%, #fbcfe8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero p {
  font-size: 1.25rem;
  line-height: 1.8;
  color: rgba(241, 245, 249, 0.9);
  max-width: 640px;
  margin: 0 auto 28px;
}

.hero-features {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-feat-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: #ffffff;
  transition: all 0.2s ease;
}

.hero-feat-tag:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.hero-feat-tag svg {
  width: 18px;
  height: 18px;
  color: #f472b6;
}

/* Ambient Blobs */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(65px);
  opacity: 0.35;
  z-index: 1;
  pointer-events: none;
  animation: floatBlobs 12s ease-in-out infinite alternate;
}

.blob-1 {
  width: 360px;
  height: 360px;
  background: #ec4899;
  top: -120px;
  left: -80px;
}

.blob-2 {
  width: 420px;
  height: 420px;
  background: #6366f1;
  bottom: -150px;
  right: -100px;
  animation-delay: -6s;
}

@keyframes floatBlobs {
  0% { transform: translateY(0px) scale(1); }
  100% { transform: translateY(30px) scale(1.1); }
}

/* ===================================================================
   Main Content Area
   =================================================================== */
main {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 24px 70px;
}

/* Controls Bar (Total count & quick filters) */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 30px;
  padding: 16px 22px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.result-info {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
  text-align: center;
}

.result-count-badge {
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.quick-filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  background: #f1f5f9;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill:hover,
.filter-pill.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* ===================================================================
   Grid & Profile Cards (State-of-the-Art Aesthetic)
   =================================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  direction: rtl;
  border: 1px solid var(--border-light);
  position: relative;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(99, 102, 241, 0.3);
}

/* Photo Wrapper & Aspect Ratio */
.card-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(135deg, #e0e7ff 0%, #fae8ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover .profile-photo {
  transform: scale(1.08);
}

.card-photo-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.45) 0%, transparent 50%);
  pointer-events: none;
}

.card-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(10px);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Card Body */
.card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  background: #ffffff;
}

.card-description {
  font-size: 1.06rem;
  line-height: 1.85;
  text-align: right;
  color: var(--text-main);
  word-break: break-word;
  white-space: pre-line;
  flex: 1;
}

/* Contact Link Buttons */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--border-light);
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  padding: 13px 20px;
  border-radius: var(--radius-md);
  font-size: 1.02rem;
  font-weight: 700;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.contact-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.contact-link:hover::before {
  opacity: 1;
}

.contact-link:hover {
  transform: translateY(-2px);
}

.contact-whatsapp {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 6px 18px var(--whatsapp-glow);
}

.contact-whatsapp:hover {
  box-shadow: 0 10px 24px var(--whatsapp-glow);
}

.contact-call {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  box-shadow: 0 6px 18px var(--primary-glow);
}

.contact-call:hover {
  box-shadow: 0 10px 24px var(--primary-glow);
}

.contact-link .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.contact-link .icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* ===================================================================
   Pagination
   =================================================================== */
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 45px;
  direction: rtl;
}

.page-btn {
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-light);
  background: #ffffff;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover:not(:disabled):not(.active) {
  background: var(--primary-soft);
  border-color: var(--primary-light);
  color: var(--primary);
  transform: translateY(-2px);
}

.page-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 18px var(--primary-glow);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
}

.page-info {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0 8px;
}

/* ===================================================================
   Empty State
   =================================================================== */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 70px 24px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border-light);
  box-shadow: var(--shadow-sm);
}

.empty-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.empty-icon svg {
  width: 36px;
  height: 36px;
  fill: currentColor;
}

.empty h3 {
  color: var(--text-main);
  margin-bottom: 8px;
  font-size: 1.6rem;
  font-weight: 800;
}

.empty p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 420px;
  margin: 0 auto;
}

/* ===================================================================
   Footer
   =================================================================== */
footer {
  text-align: center;
  padding: 30px 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
  border-top: 1px solid var(--border-light);
  background: #ffffff;
  margin-top: auto;
}

footer .footer-heart {
  color: var(--accent);
  display: inline-block;
  animation: pulseHeart 1.5s ease infinite;
}

@keyframes pulseHeart {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* ===================================================================
   Toast Notification
   =================================================================== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===================================================================
   Admin Panel Styles (English / Modern Dashboard)
   =================================================================== */
.admin-mode {
  font-family: var(--font-en);
  direction: ltr;
  text-align: left;
}

.admin-mode .navbar {
  direction: ltr;
}

.admin-shell {
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}

.card-admin {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 34px;
  margin-top: 24px;
  border: 1px solid var(--border-light);
}

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

.card-admin h2 {
  color: var(--text-main);
  font-size: 1.5rem;
  font-weight: 800;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.field label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.field input,
.field textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 13px 16px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  outline: none;
  background: #f8fafc;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.6;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
  background: #ffffff;
}

.field input[type="file"] {
  padding: 12px;
  background: #f1f5f9;
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.field input[type="file"]:hover {
  border-color: var(--primary-light);
  background: var(--primary-soft);
}

.hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

.photo-preview-wrap {
  margin-top: 10px;
  position: relative;
  display: inline-block;
}

.photo-preview {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: var(--shadow-md);
  background: #e2e8f0;
  display: block;
}

/* General Buttons */
.btn {
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  box-shadow: 0 6px 18px var(--primary-glow);
}

.btn-primary:hover {
  box-shadow: 0 10px 24px var(--primary-glow);
}

.btn-ghost {
  background: #f1f5f9;
  color: var(--text-main);
}

.btn-ghost:hover {
  background: #e2e8f0;
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), var(--danger-dark));
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
  box-shadow: 0 10px 24px rgba(244, 63, 94, 0.4);
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* Admin Item List */
.admin-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.admin-item:hover {
  border-color: var(--primary-light);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.admin-item img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: #e2e8f0;
  flex-shrink: 0;
}

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

.admin-item-info .hint {
  display: block;
  margin-bottom: 4px;
  font-size: 0.8rem;
  color: var(--text-light);
}

.admin-item-info .desc {
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-item-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.admin-item-actions .btn {
  padding: 8px 16px;
  font-size: 0.88rem;
}

/* Login Card */
.login-box {
  max-width: 420px;
  margin: 60px auto;
  text-align: center;
}

.login-box h2 {
  margin-bottom: 10px;
}

.login-sub {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 24px;
}

.error-msg {
  color: var(--danger);
  font-size: 0.92rem;
  min-height: 1.4em;
  margin-top: 8px;
  font-weight: 600;
}

/* ===================================================================
   Responsive Breakpoints
   =================================================================== */
@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 12px 18px;
    flex-wrap: wrap;
  }
  .navbar .search-box {
    order: 3;
    max-width: 100%;
    width: 100%;
    margin-top: 4px;
  }
  .hero {
    padding: 50px 20px 65px;
  }
  .hero h1 {
    font-size: 2.1rem;
  }
  .hero p {
    font-size: 1.1rem;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .controls-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .quick-filter-pills {
    justify-content: center;
  }
  .admin-item {
    flex-direction: column;
    text-align: center;
  }
  .admin-item-info {
    width: 100%;
  }
  .admin-item-actions {
    width: 100%;
    justify-content: center;
  }
}


/* ================================================================
   FINAL MOBILE HEADER FIX
   Search button stays INSIDE the search field; no extra whitespace.
   ================================================================ */
@media (max-width: 600px) {
  .navbar {
    display: flex !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 9px 10px 10px !important;
    gap: 8px !important;
    overflow: hidden !important;
  }

  .logo {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 48px) !important;
  }

  .navbar-actions {
    flex: 0 0 auto !important;
    margin-left: 0 !important;
  }

  .search-box {
    order: 10 !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 3px 4px 3px 12px !important;
    display: flex !important;
    align-items: center !important;
    overflow: hidden !important;
    border-radius: 12px !important;
  }

  .search-box input {
    flex: 1 1 auto !important;
    width: 1% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 100% !important;
    box-sizing: border-box !important;
    padding: 0 7px !important;
    margin: 0 !important;
    border: 0 !important;
    outline: 0 !important;
  }

  .search-box .btn-search,
  .search-box button,
  .btn-search {
    flex: 0 0 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: static !important;
  }

  .search-box svg,
  .search-box .btn-search svg {
    width: 17px !important;
    height: 17px !important;
    margin: 0 !important;
  }

  /* Prevent any hidden/absolute search elements creating blank space */
  .search-box::before,
  .search-box::after {
    box-sizing: border-box !important;
  }

  .hero {
    padding-top: 25px !important;
  }
}

@media (max-width: 380px) {
  .navbar {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .search-box {
    height: 42px !important;
    min-height: 42px !important;
  }

  .search-box .btn-search,
  .search-box button,
  .btn-search {
    flex-basis: 34px !important;
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
  }
}
