@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg: #05070c;
  --bg-alt: #0a0d13;
  --panel: #0f121a;
  --panel-strong: #131722;
  --border: #1e2633;
  --text: #e7ebf3;
  --text-dim: #9aa7b8;
  --accent: #22c55e;
  --accent-strong: #2ddb73;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --spacing-lg: 24px;
  --spacing-md: 16px;
  --spacing-sm: 10px;
  --card-padding: 24px;
  --input-bg: #0c1118;
  --input-border: #1b2431;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #22c55e;
  --info: #38bdf8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.08), transparent 35%),
    radial-gradient(circle at 80% 0%, rgba(56, 189, 248, 0.08), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-strong);
}

.page-shell {
  width: min(1200px, 100% - 48px);
  margin: 32px auto 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (max-width: 768px) {
  .page-shell {
    width: calc(100% - 24px);
    margin: 16px auto 24px;
    gap: 16px;
  }
}

.layout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

@media (max-width: 768px) {
  .layout-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.layout-3col {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.9fr;
  gap: 20px;
}

@media (max-width: 1024px) {
  .layout-3col {
    grid-template-columns: 1fr;
  }
}

.card {
  background: linear-gradient(145deg, var(--panel), var(--panel-strong));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--card-padding);
  box-shadow: var(--shadow);
  color: var(--text);
  display: flex;
  flex-direction: column;
  height: 100%;
}

@media (max-width: 768px) {
  .card {
    padding: 16px;
    border-radius: var(--radius-md);
  }
}

@media (max-width: 768px) {
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.card-title {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-description {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(34, 197, 94, 0.08);
  color: var(--accent);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(34, 197, 94, 0.2);
  font-weight: 600;
  font-size: 0.9rem;
}

.chip-no {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
background: rgba(239, 68, 68, 0.08);
color: rgba(239, 68, 68, 1);
  border-radius: var(--radius-pill);
border: 1px solid rgba(239, 68, 68, 0.2);
  font-weight: 600;
  font-size: 0.9rem;
}

.chip-mid {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(245, 158, 11, 0.08);
border: 1px solid rgba(245, 158, 11, 0.2);
color: rgba(245, 158, 11, 1);

  font-weight: 600;
  font-size: 0.9rem;
}


.btn,
.btn-primary,
.btn-outline,
.btn-secondary,
.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  padding: 12px 18px;
  border: 1px solid transparent;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  color: var(--text);
  background: transparent;
}

.btn-primary,
.btn.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #041006;
}

.btn-primary:hover,
.btn.btn-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.btn-outline,
.btn.btn-outline-light {
  border-color: var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.btn-outline:hover,
.btn.btn-outline-light:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-secondary {
  background: #111826;
  border-color: #1f2937;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

.input,
input,
select,
textarea,
.form-control,
.form-select {
  background: var(--input-bg) !important;
  color: var(--text) !important;
  border: 1px solid var(--input-border) !important;
  border-radius: var(--radius-md) !important;
  padding: 12px 14px !important;
  min-height: 44px;
  box-shadow: none !important;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-dim);
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus {
  outline: 1px solid rgba(34, 197, 94, 0.4) !important;
  border-color: rgba(34, 197, 94, 0.7) !important;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12) !important;
}

label,
.form-label {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

table th,
table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

table tr:last-child td {
  border-bottom: none;
}

.badge,
.text-bg-info {
  background: rgba(56, 189, 248, 0.12) !important;
  color: #7dd3fc !important;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
  border-radius: var(--radius-pill) !important;
  padding: 6px 10px !important;
  font-weight: 600;
}

.navbar,
.app-navbar {
  background: rgba(13, 17, 25, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.navbar .container,
.app-navbar .container,
.nav-shell {
  width: min(1200px, 100% - 48px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  flex-wrap: nowrap;
  gap: 10px;
}

@media (max-width: 768px) {
  .navbar .container,
  .app-navbar .container,
  .nav-shell {
    width: calc(100% - 24px);
    padding: 10px 0;
    flex-wrap: wrap;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(56, 189, 248, 0.15));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 768px) {
  .nav-actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
  
  .nav-actions .btn {
    width: 100%;
    font-size: 0.85rem;
    padding: 10px 14px;
    white-space: normal;
    text-align: center;
  }
}


@media (max-width: 768px) {
  .footer-inner {
    width: calc(100% - 24px);
    flex-direction: column;
    text-align: center;
    padding: 16px 0;
  }
}
.footer {
  margin-top: auto;
  background: rgba(10, 14, 22, 0.9);
  border-top: 1px solid var(--border);
  color: var(--text-dim);
}

.footer-inner {
  width: min(1200px, 100% - 48px);
  margin: 0 auto;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 12px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.18);
}

.surface-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chip-ladies {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(236, 72, 153, 0.08);
  color: #ec4899;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(236, 72, 153, 0.2);
  font-weight: 600;
  font-size: 0.9rem;
}

.chip-blue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(56, 189, 248, 0.08);
  color: #38bdf8;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(56, 189, 248, 0.2);
  font-weight: 600;
  font-size: 0.9rem;
}



.list-row {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1f2937;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  margin-left: -10px;
}

.avatar:first-child {
  margin-left: 0;
}

.pill-muted {
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  padding: 8px 12px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
}

.section-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.breadcrumb,
.bg-light,
.alert,
.table-striped > tbody > tr:nth-of-type(odd) {
  background: transparent !important;
  color: var(--text) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) td {
  background: rgba(255, 255, 255, 0.02);
}

.img-fluid,
img {
  border-radius: var(--radius-md);
}

.hero {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, rgba(34, 197, 94, 0.08), rgba(56, 189, 248, 0.06));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.grid-responsive {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.small-card-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.arrow-link:hover {
  color: var(--accent);
}

.table td,
.table th {
  background: transparent;
}

.pill-success {
  color: var(--accent);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-pill);
  padding: 6px 10px;
  font-weight: 600;
}

.muted-small {
  color: var(--text-dim);
  font-size: 0.95rem;
}

.table-subtle {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-lg);
  padding: 12px;
}

/* Search Bar Styling */
.search-bar-container {
  width: 100%;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .search-bar-container {
    margin-bottom: 16px;
  }
}

.search-bar-wrapper {
  position: relative;
  max-width: 100%;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 1.1rem;
  pointer-events: none;
  z-index: 1;
}

@media (max-width: 768px) {
  .search-icon {
    left: 12px;
    font-size: 1rem;
  }
}

.search-input {
  width: 100%;
  padding: 14px 16px 14px 48px !important;
  background: var(--input-bg) !important;
  color: var(--text) !important;
  border: 1px solid var(--input-border) !important;
  border-radius: var(--radius-md) !important;
  font-size: 1rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
  .search-input {
    padding: 12px 12px 12px 40px !important;
    font-size: 0.95rem;
  }
}

.search-input:focus {
  outline: 1px solid rgba(34, 197, 94, 0.4) !important;
  border-color: rgba(34, 197, 94, 0.7) !important;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12), 0 4px 16px rgba(0, 0, 0, 0.2) !important;
}

.search-input::placeholder {
  color: var(--text-dim);
}

/* Layout with Sidebar */
.layout-with-sidebar {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 968px) {
  .layout-with-sidebar {
    grid-template-columns: 1fr;
  }
  
  .filter-sidebar {
    order: 2;
    position: static;
    max-height: none;
  }
  
  .main-content {
    order: 1;
  }
}

@media (max-width: 768px) {
  .layout-with-sidebar {
    gap: 16px;
  }
}

/* Filter Sidebar */
.filter-sidebar {
  background: linear-gradient(145deg, var(--panel), var(--panel-strong));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  box-shadow: var(--shadow);
}

@media (max-width: 968px) {
  .filter-sidebar {
    padding: 16px;
  }
}

@media (max-width: 768px) {
  .filter-sidebar {
    border-radius: var(--radius-md);
  }
}

.filter-sidebar::-webkit-scrollbar {
  width: 6px;
}

.filter-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.filter-sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}


@media (max-width: 768px) {
  .sidebar-header {
    flex-wrap: wrap;
    gap: 10px;
  }
}
.filter-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 197, 94, 0.3);
}

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

.sidebar-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.btn-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reset:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-dim);
}

.filter-group {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.filter-label {
  margin: 0 0 12px 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-dim);
  transform: translateY(-1px);
}

.filter-chip.active {
  background: var(--accent);
  color: #041006;
  border-color: var(--accent);
}

.filter-chip.active:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

/* Main Content Area */
.main-content {
  min-width: 0;
}

/* Hostel List Grid */
#hostelList {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
  width: 100%;
}

@media (max-width: 1024px) {
  #hostelList {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 768px) {
  #hostelList {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Responsive Tables */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  
  .table-subtle {
    overflow-x: auto;
    display: block;
  }
  
  table th,
  table td {
    padding: 10px 8px;
    font-size: 0.85rem;
  }
}

/* Mobile Typography */
@media (max-width: 768px) {
  body {
    font-size: 0.95rem;
  }
  
  .card-title {
    font-size: 1.1rem;
  }
  
  .card-description {
    font-size: 0.875rem;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  h4 {
    font-size: 1.1rem;
  }
}

/* Chips Responsive */
@media (max-width: 768px) {
  .chip,
  .chip-no,
  .chip-mid,
  .chip-ladies,
  .chip-blue {
    font-size: 0.8rem;
    padding: 5px 10px;
  }
}

/* Button Responsive */
@media (max-width: 768px) {
  .btn,
  .btn-primary,
  .btn-outline,
  .btn-secondary,
  .btn-dark {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
}

/* Hero Section Responsive */
@media (max-width: 768px) {
  .hero {
    padding: 20px;
  }
}

/* Grid Responsive */
@media (max-width: 768px) {
  .grid-responsive {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* SweetAlert Responsive */
@media (max-width: 768px) {
  .responsive-swal {
    width: calc(100% - 32px) !important;
    max-width: none !important;
  }
  
  .swal2-image {
    max-width: 100% !important;
    height: auto !important;
  }
}

/* Additional Mobile Optimizations */
@media (max-width: 768px) {
  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden;
  }
  
  /* Make inline actions stack */
  .inline-actions {
    flex-direction: column;
  }
  
  .inline-actions .btn {
    width: 100%;
  }
  
  /* Adjust brand icon */
  .brand {
    font-size: 0.95rem;
  }
  
  .brand-icon {
    width: 32px;
    height: 32px;
  }
  
  /* Better touch targets */
  .filter-chip {
    min-height: 44px;
    padding: 10px 16px;
  }
  
  /* Adjust input heights for mobile */
  input,
  select,
  textarea,
  .form-control,
  .form-select {
    min-height: 48px !important;
  }
  
  /* Stack flex containers better */
  .card-header > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* Landscape phone orientation */
@media (max-width: 768px) and (orientation: landscape) {
  .filter-sidebar {
    max-height: none;
  }
}

/* Small phones (< 400px) */
@media (max-width: 400px) {
  .page-shell {
    width: calc(100% - 16px);
  }
  
  .card {
    padding: 12px;
  }
  
  .btn {
    font-size: 0.85rem;
    padding: 8px 12px;
  }
  
  .chip,
  .chip-no,
  .chip-mid,
  .chip-ladies,
  .chip-blue {
    font-size: 0.75rem;
    padding: 4px 8px;
  }
}

/* Tablet specific styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .page-shell {
    width: calc(100% - 32px);
  }
  
  .layout-with-sidebar {
    grid-template-columns: 240px 1fr;
  }
}

