/* ===============================
   GLOBAL RESET
=============================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background: #f7f7f7;
  color: #222;
}

/* ===============================
   CONTAINERS
=============================== */
.mobile-container,
.owner-container,
.student-bookings,
.show-container {
  padding: 16px;
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
}

.mobile-container {
  padding: 14px;
  padding-bottom: calc(90px + env(safe-area-inset-bottom));
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow: visible !important;
}

/* ===============================
   STICKY HEADER
=============================== */
.search-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  padding: 12px 16px 6px;
  margin-bottom: 12px;
}

.categories {
  position: static;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 12px 6px;
  background: #fff;
  margin: 16px 0;
}

/* ===============================
   LOGO
=============================== */
.header-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-link {
  display: flex;
  align-items: center;
}

/* ===============================
   SEARCH BAR
=============================== */
.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  background: #f3f3f3;
  border-radius: 999px;
  padding: 12px 16px;
  margin: 0 0 10px;
}

.search-bar input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 14px;
}

.search-btn,
.search-icon-btn {
  background: none;
  border: none;
  font-size: 16px;
  margin-right: 10px;
  cursor: pointer;
  color: #555;
}

/* ===============================
   FILTER / CATEGORY BUTTONS
=============================== */
.category {
  padding: 8px 16px;
  border-radius: 22px;
  border: none;
  background: #f1f1f1;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  color: #333;
  transition: 0.2s;
}

.category:hover,
.category.active {
  background: #ff5a5f;
  color: #fff;
}

.category select,
select.category {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  outline: none;
}

/* ===============================
   LISTING GRID
=============================== */
.listing-grid,
.card-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 10px;
}

.card-row {
  padding-bottom: 20px;
}

/* ===============================
   LISTING CARD
=============================== */
.listing-card {
  position: relative;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}

@media (hover: hover) {
  .listing-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.15);
  }
}

.card-overlay-link {
  position: absolute;
  inset: 0;
  z-index: 5;
}

/* ===============================
   LISTING IMAGE
=============================== */
.listing-image,
.listing-img {
  width: 100%;
  height: 160px;
  overflow: hidden;
}

.listing-image img,
.listing-img img,
.listing-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===============================
   CARD BODY
=============================== */
.card-body,
.listing-body {
  padding: 10px 12px;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.card-top h4,
.listing-body h4 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  max-width: 75%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 4px;
}

.location {
  font-size: 12px;
  color: #777;
  margin-bottom: 6px;
}

.price {
  font-size: 14px;
  font-weight: 700;
  color: #ff5a5f;
  margin-bottom: 6px;
}

.price span {
  font-size: 12px;
  font-weight: 400;
  color: #777;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-top: 6px;
}

.rating {
  font-size: 12px;
  font-weight: 600;
  color: #ffb400;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===============================
   BADGE
=============================== */
.badge {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 12px;
  text-transform: capitalize;
}

.badge.available {
  background: #ffecec;
  color: #ff5a5f;
}

.badge.few {
  background: #fff4e5;
  color: #b26a00;
}

/* ===============================
   BUTTONS
=============================== */
.book-btn,
.dashboard-btn {
  width: 100%;
  padding: 14px;
  margin-top: 14px;
  border-radius: 999px;
  border: none;
  background: #ff5a5f;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  display: block;
  text-decoration: none;
}

.book-btn:hover,
.dashboard-btn:hover {
  background: #2ecc71 !important;
  color: #fff !important;
}

.book-btn:active {
  transform: scale(0.97);
}

.dashboard-btn.outline {
  background: #fff;
  color: #ff5a5f;
  border: 1px solid #ff5a5f;
}

.dashboard-btn.danger {
  background: #ff3b3b;
}

.primary-btn {
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: none;
  background: #6c63ff;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.primary-btn:hover {
  opacity: 0.9;
}

.logout-btn {
  display: block;
  margin-top: 20px;
  text-align: center;
  color: #ff4d4f;
  text-decoration: none;
}

.login-book {
  display: block;
  text-align: center;
  text-decoration: none;
}

@media (hover: hover) {
  *:hover {
    transition: all 0.2s ease;
  }
}

/* ===============================
   ROLE SELECTION
=============================== */
.role-container {
  padding: 20px;
  text-align: center;
}

.role-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.role-card {
  display: block;
  padding: 18px;
  border-radius: 18px;
  text-decoration: none;
  color: #000;
  background: #fff;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.role-card i {
  font-size: 34px;
  margin-bottom: 10px;
  display: block;
}

.role-card h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.role-card p {
  font-size: 13px;
  color: #777;
}

@media (hover: hover) {
  .role-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
  }
}

.role-card:active {
  transform: scale(0.97);
}

.role-card.student { border: 2px solid #ff5a5f; }
.role-card.hostel  { border: 2px solid #1a73e8; }
.role-card.mess    { border: 2px solid #34a853; }

/* ===============================
   OWNER / BOOKING / ERROR CARDS
=============================== */
.owner-card,
.booking-card,
.sb-card,
.error-card {
  background: #fff;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 14px;
}

.sb-card {
  display: flex;
  gap: 12px;
}

.sb-card img {
  width: 90px;
  height: 90px;
  border-radius: 12px;
  object-fit: cover;
}

.status {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 10px;
}

.status.confirmed { background: #e6f9f0; color: #1a7f5a; }
.status.pending   { background: #fff4e5; color: #b26a00; }
.status.cancelled { background: #fdeaea; color: #a61b1b; }

/* ===============================
   BOTTOM NAV
=============================== */
.bottom-nav,
.action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  background: #fff;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 16px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 999;
}

.nav-item {
  font-size: 12px;
  color: #777;
  text-align: center;
  text-decoration: none;
}

.nav-item span {
  display: block;
  font-size: 20px;
  margin-bottom: 2px;
}

.nav-item.active,
.nav-item:hover {
  color: #ff5a5f;
}

/* ===============================
   OWNER FORM
=============================== */
.owner-form {
  margin-top: 20px;
  background: #fff;
  padding: 18px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.owner-form label {
  font-size: 12px;
  font-weight: 600;
  color: #444;
  margin-top: 8px;
}

.owner-form input,
.owner-form select {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 1.5px solid #ddd;
  background: #fff;
  font-size: 15px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.owner-form select {
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='8' viewBox='0 0 14 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23999' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 14px;
}

.owner-form input:focus,
.owner-form select:focus {
  outline: none;
  border-color: #ff5a5f;
  box-shadow: 0 0 0 2px rgba(255, 90, 95, 0.15);
}

.owner-form input[type="file"] {
  padding: 10px;
}

.owner-form > * {
  margin-bottom: 14px;
}

.owner-form button {
  margin-top: 10px;
  padding: 14px;
  border-radius: 28px;
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(135deg, #ff5a5f, #ff7a7f);
  color: #fff;
  border: none;
  letter-spacing: 0.3px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.owner-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(255, 90, 95, 0.35);
}

.owner-form button:active {
  transform: scale(0.97);
}

/* ===============================
   MOBILE CONTAINER HEADINGS
=============================== */
.mobile-container h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.mobile-container p {
  font-size: 13px;
  color: #666;
}

/* ===============================
   SHOW PAGE
=============================== */
.show-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: calc(90px + env(safe-area-inset-bottom));
  background: rgba(255, 90, 95, 0.08);
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

@media (hover: hover) {
  .show-container:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(255, 90, 95, 0.25);
  }
}

.show-container:active {
  transform: scale(0.98);
  box-shadow: 0 12px 26px rgba(255, 90, 95, 0.3);
}

.show-images {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 12px;
  margin-bottom: 18px;
}

.show-img {
  width: 100%;
  max-width: 320px;
  height: 220px;
  object-fit: cover;
  border-radius: 16px;
  flex-shrink: 0;
}

.show-content {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.show-content h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #111;
}

.show-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.show-rating  { font-size: 14px; margin-bottom: 6px; }
.show-location { font-size: 13px; color: #666; }

.show-price {
  font-size: 20px;
  font-weight: bold;
  margin: 10px 0;
}

.show-price span {
  font-size: 14px;
  color: #777;
}

.show-badge {
  display: inline-block;
  background: #ff5a5f;
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.show-desc {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

.show-action {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #fff;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid #eee;
}

.show-action .book-btn {
  width: 100%;
  padding: 14px;
  border-radius: 28px;
  font-size: 15px;
}

.availability {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #1a7f5a;
}

/* ===============================
   LISTING FEATURES
=============================== */
.listing-features {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.listing-features span {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f7f7f7;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: #333;
}

/* ===============================
   OWNER BOX (SHOW PAGE)
=============================== */
.owner-box {
  border-top: 1px solid #eee;
  padding-top: 14px;
  margin-top: 14px;
}

.owner-box h4 {
  font-size: 16px;
  margin-bottom: 10px;
}

.owner-box p {
  font-size: 14px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===============================
   PROFILE CARD
=============================== */
.profile-card {
  max-width: 900px;
  margin: 40px auto;
  padding: 32px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.profile-card h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

.profile-card form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.profile-card input,
.profile-card select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #e5e5e5;
  font-size: 15px;
  background: #fafafa;
}

.profile-card input:focus,
.profile-card select:focus {
  outline: none;
  border-color: #ff5a5f;
  background: #fff;
}

.profile-card .checkbox {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  margin-top: 6px;
}

.profile-card .dashboard-btn {
  grid-column: 1 / -1;
  margin-top: 18px;
  padding: 16px;
  border-radius: 30px;
}

.profile-header {
  text-align: center;
}

.profile-avatar {
  font-size: 64px;
  color: #6b5cff;
}

.role-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #f1f1ff;
  color: #6b5cff;
  font-size: 12px;
}

.profile-info p {
  margin: 10px 0;
  font-size: 14px;
}

.profile-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
}

.profile-stats div {
  text-align: center;
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-text {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

/* ===============================
   LISTING FORM
=============================== */
.listing-form {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.form-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
}

.form input,
.form select {
  width: 100%;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 14px;
  border: 1px solid #e5e5e5;
  font-size: 14px;
  outline: none;
}

.form input:focus,
.form select:focus {
  border-color: #6c63ff;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  margin-bottom: 18px;
}

/* ===============================
   BOOK FORM
=============================== */
.book-form {
  margin-top: 15px;
}

/* ===============================
   REVIEWS SECTION
=============================== */
.reviews-section {
  padding: 14px;
  margin-top: 28px;
  margin-bottom: 80px;
}

.reviews-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.reviews-section p {
  font-size: 13px;
  color: #666;
}

.reviews-section textarea,
.reviews-section select {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #ddd;
  font-size: 14px;
  margin-top: 10px;
}

/* ===============================
   REVIEW FORM
=============================== */
.review-form {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  margin-bottom: 18px;
}

.review-form label {
  font-size: 14px;
  font-weight: 500;
  display: block;
  margin-bottom: 6px;
}

.review-form select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  margin-bottom: 10px;
  font-size: 14px;
  background: #f9f9f9;
}

.review-form textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  resize: none;
  font-size: 14px;
  margin-bottom: 12px;
}

/* ===============================
   REVIEW CARD
=============================== */
.review-card {
  background: #fafafa;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.review-card strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.review-card p {
  font-size: 13px;
  color: #333;
  line-height: 1.4;
  margin-bottom: 6px;
}

/* ===============================
   SUBSCRIPTION BOX
=============================== */
.subscription-box {
  margin-top: 20px;
  padding: 16px;
  border-radius: 14px;
  background: #fafafa;
}

.subscription-box h4 {
  margin-bottom: 8px;
}

.sub-active  { color: #16a34a; font-weight: 500; }
.sub-expired { color: #dc2626; font-weight: 500; }

/* ===============================
   TOAST NOTIFICATION
=============================== */
.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  min-width: 90%;
  max-width: 420px;
  background: #fff;
  color: #222;
  padding: 14px 16px;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
  opacity: 0;
  z-index: 9999;
  transition: all 0.35s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-success { border-left: 5px solid #00a699; }
.toast-error   { border-left: 5px solid #ff385c; }

.toast-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #555;
  padding-left: 10px;
}

.toast-close:hover {
  color: #000;
}

@media (min-width: 768px) {
  .toast {
    min-width: 360px;
  }
}

/* ===============================
   AUTH LOGO
=============================== */
.auth-logo,
.center-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-bottom: 16px;
}

.auth-logo img,
.center-logo img {
  display: block;
  height: 64px;
  width: auto;
  margin: 0 auto;
}

.app-header {
  text-align: center;
  padding: 12px 0;
  background: #fff;
}

.app-header img {
  height: 48px;
}

/* ===============================
   DESKTOP RESPONSIVE
=============================== */
@media (max-width: 768px) {
  .profile-card {
    margin: 20px 14px;
    padding: 22px;
  }

  .profile-card form {
    grid-template-columns: 1fr;
  }

  .profile-card h2 {
    font-size: 22px;
  }
}

@media (min-width: 768px) {
  .listing-grid,
  .card-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .listing-image,
  .listing-img {
    height: 190px;
  }
}

@media (min-width: 1024px) {
  .listing-grid,
  .card-row {
    grid-template-columns: repeat(4, 1fr);
  }

  .mobile-container {
    padding-left: 32px;
    padding-right: 32px;
  }
}





