/* ============================================================
   HotelOps – Main Stylesheet
   CI-konform: HDQ Dunkelrot / GS English Green
   ============================================================ */

/* === GOOGLE FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Roboto:wght@300;400;500;700&display=swap');

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

:root {
  /* HDQ CI-Farben (Pantone 202U) */
  --hdq-primary:   #7A1A2E;
  --hdq-dark:      #5C1020;
  --hdq-light:     #F5EDE8;
  --hdq-beige:     #EDE8E0;
  --hdq-accent:    #9B2335;

  /* GS CI-Farben (Pantone 560C – English Green) */
  --gs-primary:    #1A3C34;
  --gs-dark:       #122B25;
  --gs-light:      #F5F3F1;
  --gs-accent:     #2A5C50;

  /* Neutrale Farben */
  --gray-900:   #111827;
  --gray-800:   #1F2937;
  --gray-700:   #374151;
  --gray-600:   #4B5563;
  --gray-500:   #6B7280;
  --gray-400:   #9CA3AF;
  --gray-300:   #D1D5DB;
  --gray-200:   #E5E7EB;
  --gray-100:   #F3F4F6;
  --gray-50:    #F9FAFB;

  --green-700:  #047857;
  --green-600:  #059669;
  --green-100:  #D1FAE5;
  --orange-600: #D97706;
  --orange-100: #FEF3C7;
  --red-700:    #B91C1C;
  --red-600:    #DC2626;
  --red-100:    #FEE2E2;
  --yellow-100: #FEF9C3;
  --blue-700:   #1D4ED8;
  --blue-100:   #DBEAFE;

  /* Default: HDQ */
  --prop-primary: var(--hdq-primary);
  --prop-dark:    var(--hdq-dark);
  --prop-light:   var(--hdq-light);
  --prop-beige:   var(--hdq-beige);

  --sidebar-w:  240px;
  --topbar-h:   56px;
  --radius:     8px;
  --radius-sm:  5px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 12px rgba(0,0,0,.12);

  --font-body:    'Roboto', system-ui, sans-serif;
  --font-display: 'Cinzel', Georgia, serif;
}

/* Property-spezifische Variablen */
.prop-hdq {
  --prop-primary: #7A1A2E;
  --prop-dark:    #5C1020;
  --prop-light:   #F5EDE8;
  --prop-beige:   #EDE8E0;
  --prop-sidebar-bg: #2D1018;
}

.prop-gs {
  --prop-primary: #1A3C34;
  --prop-dark:    #122B25;
  --prop-light:   #F5F3F1;
  --prop-beige:   #EAE8E4;
  --prop-sidebar-bg: #0F2420;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.5;
}

a { color: var(--prop-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* === LAYOUT === */
.main-wrap {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left .25s;
}

.content { padding: 24px; flex: 1; }

/* === SIDEBAR === */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--prop-sidebar-bg, #2D1018);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  transition: transform .25s;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: white;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .5px;
  text-decoration: none;
}

.sidebar-brand svg rect { fill: var(--prop-primary); }

.sidebar-close {
  display: none;
  background: none;
  border: none;
  color: rgba(255,255,255,.55);
  cursor: pointer;
  font-size: 18px;
  padding: 4px 6px;
}

/* Property Switcher */
.prop-switcher {
  display: flex;
  gap: 3px;
  padding: 10px 12px 6px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.prop-tab {
  flex: 1;
  text-align: center;
  padding: 5px 0;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.55);
  letter-spacing: 1px;
  text-decoration: none;
  transition: background .15s, color .15s;
  font-family: var(--font-display);
}

.prop-tab:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.8); text-decoration: none; }
.prop-tab.active { background: var(--prop-primary); color: white; }

.sidebar-prop-name {
  font-size: 10.5px;
  color: rgba(255,255,255,.50);
  padding: 5px 16px 8px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  letter-spacing: .3px;
}

/* Nav */
.nav-list { padding: 8px 0; flex: 1; }

.nav-section {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.40);
  padding: 12px 16px 4px;
  font-family: var(--font-display);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  color: rgba(255,255,255,.78);
  font-size: 13px;
  transition: background .15s, color .15s;
  text-decoration: none;
  border-left: 3px solid transparent;
}

.nav-link:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.9); text-decoration: none; }
.nav-link.active { background: rgba(255,255,255,.08); color: white; border-left-color: var(--prop-primary); }
.nav-icon { width: 15px; height: 15px; flex-shrink: 0; }

.nav-badge {
  margin-left: auto;
  background: var(--prop-primary);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.nav-soon { opacity: .45; cursor: default; pointer-events: none; }
.nav-soon-tag {
  margin-left: auto;
  font-size: 9.5px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.3);
  padding: 1px 6px;
  border-radius: 10px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.07);
  margin-top: auto;
}

.sidebar-user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--prop-primary);
}

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-info strong {
  display: block;
  font-size: 12px;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-info span { font-size: 10.5px; color: rgba(255,255,255,.35); text-transform: capitalize; }

.logout-btn { color: rgba(255,255,255,.3); display: flex; align-items: center; padding: 4px; border-radius: 4px; }
.logout-btn:hover { color: var(--red-600); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 99;
}

/* === TOPBAR === */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  background: white;
  border-bottom: 2px solid var(--prop-primary);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.topbar-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-600);
  padding: 4px;
}

.topbar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
  flex: 1;
  font-family: var(--font-display);
  letter-spacing: .3px;
}

.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-date { font-size: 11.5px; color: var(--gray-400); }

/* Property Badge Topbar */
.topbar-prop-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 4px;
  letter-spacing: 1px;
  color: white;
  font-family: var(--font-display);
}
.prop-hdq .topbar-prop-badge { background: var(--hdq-primary); }
.prop-gs  .topbar-prop-badge { background: var(--gs-primary); }

/* === CARDS === */
.card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-100);
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
  font-family: var(--font-display);
  letter-spacing: .2px;
}

.card-body { padding: 20px; }

/* === STATS GRID === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--prop-primary);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}

.stat-label { font-size: 11px; color: var(--gray-500); font-weight: 500; text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--gray-900); line-height: 1.1; }
.stat-sub   { font-size: 11px; color: var(--gray-400); }

/* === TABLES === */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }

th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--gray-500);
  padding: 10px 16px;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
  font-family: var(--font-display);
}

td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13.5px;
  color: var(--gray-700);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--prop-light); }

/* === FORMS === */
.field-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }

label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-700);
  letter-spacing: .2px;
}

input[type=text], input[type=email], input[type=password],
input[type=tel], input[type=number], input[type=date],
select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--gray-900);
  background: white;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--prop-primary);
  box-shadow: 0 0 0 3px rgba(var(--prop-primary), .1);
}

textarea { resize: vertical; min-height: 80px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* === BUTTONS === */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--prop-primary);
  color: white;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s, opacity .15s;
  text-decoration: none;
  font-family: var(--font-body);
}
.btn-primary:hover { background: var(--prop-dark); color: white; text-decoration: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  color: var(--gray-700);
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s, border-color .15s;
  text-decoration: none;
  font-family: var(--font-body);
}
.btn-secondary:hover { background: var(--prop-light); border-color: var(--prop-primary); color: var(--prop-primary); text-decoration: none; }

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red-600);
  color: white;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity .15s;
  text-decoration: none;
}
.btn-danger:hover { opacity: .85; color: white; text-decoration: none; }
.btn-full { width: 100%; }

/* === BADGES === */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

/* === ALERTS === */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 16px;
  border-left: 3px solid transparent;
}
.alert-success { background: var(--green-100); color: #065F46; border-left-color: var(--green-600); }
.alert-warning { background: var(--yellow-100); color: #92400E; border-left-color: var(--orange-600); }
.alert-danger  { background: var(--red-100);    color: #991B1B; border-left-color: var(--red-600); }
.alert-info    { background: var(--prop-light);  color: var(--prop-dark); border-left-color: var(--prop-primary); }
.alert-dismissible { justify-content: space-between; }
.alert-dismissible button { background: none; border: none; cursor: pointer; font-size: 16px; opacity: .6; }

/* === AVATAR === */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--prop-primary);
}

/* === PAGE HEADER === */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  font-family: var(--font-display);
  letter-spacing: .3px;
}
.page-header p { font-size: 13px; color: var(--gray-500); margin-top: 2px; }

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-400);
}
.empty-state svg { width: 48px; height: 48px; opacity: .25; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* === DASHBOARD GRID === */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* === STATUS TABS === */
.status-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--gray-200);
  overflow-x: auto;
}

.status-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--gray-500);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  text-decoration: none;
  transition: color .15s, border-color .15s;
}

.status-tab:hover { color: var(--gray-800); text-decoration: none; }
.status-tab.active { color: var(--prop-primary); border-bottom-color: var(--prop-primary); font-weight: 600; }

.tab-count {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--gray-100);
  color: var(--gray-500);
}
.tab-count.tab-orange { background: var(--orange-100); color: var(--orange-600); }
.tab-count.tab-blue   { background: var(--blue-100);   color: var(--blue-700); }
.tab-count.tab-green  { background: var(--green-100);  color: var(--green-600); }

/* === FILTER BAR === */
.filter-bar { margin-bottom: 16px; }
.filter-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filter-form select { width: auto; min-width: 160px; padding: 7px 10px; font-size: 13px; }

/* === BADGE UTILITIES === */
.bg-gray-100    { background: var(--gray-100) !important; }
.text-gray-600  { color: var(--gray-600) !important; }
.text-gray-500  { color: var(--gray-500) !important; }
.bg-green-100   { background: var(--green-100) !important; }
.text-green-600 { color: var(--green-600) !important; }
.bg-orange-100  { background: var(--orange-100) !important; }
.text-orange-700{ color: #C2410C !important; }
.bg-blue-100    { background: var(--blue-100) !important; }
.text-blue-700  { color: #1D4ED8 !important; }
.bg-red-100     { background: var(--red-100) !important; }
.text-red-700   { color: #B91C1C !important; }
.bg-yellow-100  { background: var(--yellow-100) !important; }
.text-yellow-800{ color: #92400E !important; }
.bg-gray-50     { background: var(--gray-50) !important; }

/* === LOGIN PAGE === */
.login-body {
  background: var(--prop-light, #F5EDE8);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-wrap {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  border-top: 4px solid var(--prop-primary, #7A1A2E);
  box-shadow: var(--shadow-md);
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--prop-primary, #7A1A2E);
  letter-spacing: .5px;
}

.login-title { font-size: 21px; font-weight: 700; color: var(--gray-900); font-family: var(--font-display); }
.login-sub   { font-size: 13px; color: var(--gray-500); margin-bottom: 24px; }
.login-hint  { font-size: 12px; color: var(--gray-400); text-align: center; margin-top: 20px; }

/* Login Seite: HDQ-Farben per default */
.login-body { --prop-primary: #7A1A2E; --prop-dark: #5C1020; --prop-light: #F5EDE8; }

/* === MOBILE === */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; }
  .sidebar-overlay.open { display: block; }
  .main-wrap { margin-left: 0; }
  .topbar-menu-btn { display: flex; }
  .content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .login-wrap { padding: 28px 20px; }
}

/* === SIDEBAR HOTEL LOGO === */
.sidebar-logo-area {
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-align: center;
}

.sidebar-logo-area a { text-decoration: none; }

.sidebar-hotel-logo {
  max-width: 160px;
  max-height: 70px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .9;
}

/* Kein Logo vorhanden – Textplatzhalter */
.sidebar-logo-placeholder {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-logo-name {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: white;
  letter-spacing: .8px;
  line-height: 1.3;
  text-transform: uppercase;
}

.sidebar-logo-sub {
  display: block;
  font-size: 9.5px;
  color: rgba(255,255,255,.4);
  letter-spacing: .3px;
}

/* Sidebar-Header kompakter wenn Logo drüber */
.sidebar-header {
  padding: 10px 16px;
}

/* === PROFIL-LINK IN SIDEBAR === */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.07);
  margin-top: auto;
}

.sidebar-user-inner {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  border-radius: 6px;
  padding: 4px 6px;
  margin: -4px -6px;
  transition: background .15s;
}
.sidebar-user-inner:hover {
  background: rgba(255,255,255,.07);
  text-decoration: none;
}

/* === NOTIFICATION BELL === */
.bell-wrap { position: relative; }

.bell-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-500);
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  position: relative;
  transition: background .15s, color .15s;
}
.bell-btn:hover { background: var(--gray-100); color: var(--gray-800); }

.bell-badge {
  position: absolute;
  top: 2px; right: 2px;
  background: var(--red-600);
  color: white;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

.bell-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 200;
  max-height: 400px;
  overflow-y: auto;
}

.bell-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--gray-50);
  text-decoration: none;
  transition: background .15s;
}
.bell-item:hover { background: var(--gray-50); text-decoration: none; }
.bell-item:last-child { border-bottom: none; }
