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

:root {
  --primary: #0f766e;
  --primary-hover: #115e59;
  --primary-light: #f0fdfa;
  --primary-glow: rgba(15, 118, 110, 0.15);

  --accent-gold: #d97706;
  --accent-gold-bg: #fffbeb;

  --success: #16a34a;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;

  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fef3c7;

  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;

  --info: #2563eb;
  --info-bg: #eff6ff;
  --info-border: #bfdbfe;

  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --border-focus: #14b8a6;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 20px rgba(15, 118, 110, 0.2);

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* Header & Navigation */
.topbar {
  background: linear-gradient(135deg, #042f2e 0%, #115e59 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(4, 47, 46, 0.25);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  display: block;
}

.brand-tag {
  font-size: 0.75rem;
  color: #99f6e4;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: block;
}

.nav-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.navbtn {
  background: transparent;
  color: #ccfbf1;
  border: 0;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.navbtn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.navbtn.active {
  background: #ffffff;
  color: #042f2e;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.user-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-greeting {
  font-size: 0.88rem;
  color: #e6fffa;
}

/* Layout container */
.container {
  max-width: 1240px;
  margin: 28px auto;
  padding: 0 20px;
}

/* Card base */
.card {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

h1, h2, h3 {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 6px;
}

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

/* Auth view */
.narrow {
  max-width: 460px;
  margin: 40px auto;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  background: var(--primary-light);
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 16px;
  font-size: 30px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-glow);
}

.auth-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius-md);
}

.tab {
  flex: 1;
  padding: 10px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
}

.tab.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Forms and inputs */
label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 600;
  font-size: 0.88rem;
  color: #334155;
}

input, select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  background-color: #ffffff;
  color: var(--text-main);
  transition: var(--transition);
}

input:focus, select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

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

/* Hero search */
.hero-search-card {
  background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%);
  border-color: #99f6e4;
  box-shadow: var(--shadow-lg);
  padding: 28px;
}

.search-header {
  margin-bottom: 18px;
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  align-items: flex-end;
}

.btn-search {
  height: 46px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  background: var(--primary);
  color: #ffffff;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  transition: var(--transition);
  text-decoration: none;
}

.btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
  transform: translateY(-1px);
}

.btn.full {
  width: 100%;
}

.btn.secondary {
  background: #64748b;
}

.btn.secondary:hover {
  background: #475569;
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.25);
}

.btn.danger {
  background: var(--danger);
}

.btn.danger:hover {
  background: #b91c1c;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.btn.ok {
  background: var(--success);
}

.btn.ok:hover {
  background: #15803d;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

.btn.small {
  margin: 0;
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: 6px;
}

/* Demo logins */
.demo-creds-container {
  margin-top: 24px;
}

.demo-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0 14px;
  color: var(--text-subtle);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.demo-divider::before, .demo-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.demo-divider span {
  padding: 0 10px;
}

.demo-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-demo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: var(--transition);
}

.btn-demo:hover {
  background: #f0fdfa;
  border-color: var(--primary);
  transform: translateY(-1px);
}

.role-pill {
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.role-pill.admin {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.role-pill.user {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.demo-details {
  display: flex;
  flex-direction: column;
}

.demo-details strong {
  font-size: 0.85rem;
  color: var(--text-main);
}

.demo-details code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.auth-footer {
  margin-top: 20px;
  font-size: 0.88rem;
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert.error {
  background: var(--danger-bg);
  color: #991b1b;
  border: 1px solid var(--danger-border);
}

.alert.success {
  background: var(--success-bg);
  color: #166534;
  border: 1px solid var(--success-border);
}

/* Room Cards Grid */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.room-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

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

.room-card-head {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafaf9;
}

.room-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.room-number-title {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.room-type-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.room-type-tag.single { background: #cffafe; color: #0891b2; }
.room-type-tag.double { background: #e0e7ff; color: #4338ca; }
.room-type-tag.deluxe { background: #f3e8ff; color: #7e22ce; }
.room-type-tag.suite { background: #fef3c7; color: #b45309; }

.room-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.amenities-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.amenity-chip {
  background: #f1f5f9;
  color: #334155;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.room-card-footer {
  margin-top: auto;
  border-top: 1px solid #f1f5f9;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-box {
  display: flex;
  flex-direction: column;
}

.price-main {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
}

.price-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.results-header {
  margin: 12px 0 18px;
}

.summary {
  font-size: 1rem;
  font-weight: 600;
  color: #334155;
}

/* Table styling */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th, td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

th {
  background: #f8fafc;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

td {
  font-size: 0.9rem;
}

tr:hover td {
  background-color: #f8fafc;
}

td.num, th.num {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
}

.scroll {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge.pending { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.badge.approved { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.badge.rejected { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.badge.cancelled { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }
.badge.completed { background: var(--info-bg); color: var(--info); border: 1px solid var(--info-border); }
.badge.active { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.badge.disabled { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }

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

.note-input {
  min-width: 140px;
  padding: 6px 10px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.empty {
  color: var(--text-muted);
  font-style: italic;
  padding: 30px;
  text-align: center;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-box {
  width: 100%;
  max-width: 480px;
  margin: 0;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.8);
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-close-btn {
  background: transparent;
  border: 0;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.info {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #115e59;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Responsiveness */
@media (max-width: 768px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .user-control {
    width: 100%;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 8px;
  }
  .search-grid {
    grid-template-columns: 1fr;
  }
  .cards {
    grid-template-columns: 1fr;
  }
}
