/* =============================================
   OTEL YÖNETİM SİSTEMİ v2 - Light Theme
   ============================================= */

:root {
  --bg: #f0f2f5;
  --surface: #ffffff;
  --surface2: #f7f8fa;
  --border: #e2e6ea;
  --accent: #2c5282;
  --accent-light: #ebf0fa;
  --text: #1a202c;
  --text-dim: #4a5568;
  --text-muted: #a0aec0;
  --green: #276749;
  --green-bg: #f0fff4;
  --green-border: #9ae6b4;
  --red: #c53030;
  --red-bg: #fff5f5;
  --red-border: #feb2b2;
  --blue: #2b6cb0;
  --blue-bg: #ebf8ff;
  --blue-border: #90cdf4;
  --orange: #c05621;
  --orange-bg: #fffaf0;
  --orange-border: #fbd38d;
  --gold: #b7791f;
  --gold-bg: #fffff0;
  --gold-border: #f6e05e;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--bg); color: var(--text); font-family: 'DM Sans', sans-serif; min-height: 100vh; font-size: 14px; }

/* ---- NAVBAR ---- */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.nav-brand {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  color: var(--accent);
  text-decoration: none;
  margin-right: 16px;
  white-space: nowrap;
  font-weight: 600;
}
.nav-links { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.nav-link {
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
}
.nav-link:hover { background: var(--surface2); color: var(--text); }
.nav-link.active { background: var(--accent-light); color: var(--accent); }
.nav-user { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-username { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.btn-logout {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-logout:hover { border-color: var(--red); color: var(--red); }

/* ---- MAIN ---- */
.main-content { padding: 24px; max-width: 1440px; margin: 0 auto; }

/* ---- LOGIN ---- */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.login-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-md);
}
.login-logo { font-family: 'Playfair Display', serif; font-size: 26px; color: var(--accent); text-align: center; margin-bottom: 6px; }
.login-sub { text-align: center; color: var(--text-muted); font-size: 13px; margin-bottom: 32px; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 5px;
  letter-spacing: 0.2px;
}
.form-control {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(44,82,130,0.1); }
.form-control select, select.form-control { background: var(--surface); }
textarea.form-control { resize: vertical; min-height: 70px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-section { margin-bottom: 20px; }
.form-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent-light);
}
.checkbox-row { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.checkbox-row input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); }
.checkbox-row label { cursor: pointer; font-size: 13px; font-weight: 500; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 7px;
  font-size: 13px; font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer; border: none; text-decoration: none;
  transition: all 0.15s; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #2a4a7f; }
.btn-secondary { background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.btn-danger { background: var(--red-bg); border: 1px solid var(--red-border); color: var(--red); }
.btn-danger:hover { background: #fed7d7; }
.btn-success { background: var(--green-bg); border: 1px solid var(--green-border); color: var(--green); }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1da851; }
.btn-full { width: 100%; justify-content: center; padding: 11px; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 5px; }

/* ---- ALERTS ---- */
.alert { padding: 11px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; border: 1px solid; }
.alert-error { background: var(--red-bg); border-color: var(--red-border); color: var(--red); }
.alert-success { background: var(--green-bg); border-color: var(--green-border); color: var(--green); }
.alert-info { background: var(--blue-bg); border-color: var(--blue-border); color: var(--blue); }

/* ---- PAGE HEADER ---- */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.page-title { font-family: 'Playfair Display', serif; font-size: 22px; color: var(--text); }
.page-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---- STATS BAR ---- */
.stats-bar {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 12px; margin-bottom: 20px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--border);
}
.stat-card.red { border-left-color: var(--red); }
.stat-card.green { border-left-color: var(--green); }
.stat-card.blue { border-left-color: var(--blue); }
.stat-card.orange { border-left-color: var(--orange); }
.stat-card.gold { border-left-color: var(--gold); }
.stat-value { font-family: 'Playfair Display', serif; font-size: 26px; color: var(--text); line-height: 1; }
.stat-label { font-size: 11px; color: var(--text-muted); letter-spacing: 0.5px; text-transform: uppercase; margin-top: 4px; }

/* ---- PROPERTY COLOR DOT ---- */
.prop-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; flex-shrink: 0; }
.prop-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }

/* ---- ROOM GRID ---- */
.properties-section { margin-bottom: 24px; }
.property-group { margin-bottom: 20px; }
.property-group-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px; padding: 8px 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: var(--shadow);
  border-left: 4px solid #ccc;
}
.property-group-name { font-weight: 600; font-size: 14px; }
.property-group-meta { font-size: 12px; color: var(--text-muted); margin-left: auto; }
.room-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.room-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 90px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  box-shadow: var(--shadow);
  position: relative;
}
.room-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.room-number { font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 600; color: var(--text); }
.room-capacity-bar {
  display: flex; gap: 3px; justify-content: center; margin: 2px 0;
}
.cap-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.cap-dot.filled { background: currentColor; }
.room-guest { font-size: 10px; color: var(--text-muted); max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-status-label { font-size: 9px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }

/* ---- TODAY PANELS ---- */
.panels-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.panel-header { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.panel-icon { width: 30px; height: 30px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.icon-checkin { background: var(--blue-bg); }
.icon-checkout { background: var(--orange-bg); }
.icon-staying { background: var(--green-bg); }
.icon-upcoming { background: var(--gold-bg); }
.panel-title { font-size: 11px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; }
.checkin-title { color: var(--blue); }
.checkout-title { color: var(--orange); }
.staying-title { color: var(--green); }
.upcoming-title { color: var(--gold); }
.panel-count { margin-left: auto; font-family: 'Playfair Display', serif; font-size: 20px; color: var(--text); }
.panel-body { max-height: 260px; overflow-y: auto; }
.guest-row { padding: 9px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.1s; }
.guest-row:last-child { border-bottom: none; }
.guest-row:hover { background: var(--surface2); }
.guest-row-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.guest-name { font-size: 13px; font-weight: 600; }
.guest-room { font-family: 'Playfair Display', serif; font-size: 14px; font-weight: 600; }
.guest-meta { font-size: 11px; color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; align-items: center; }
.flight-info { font-size: 11px; color: var(--blue); font-weight: 500; }
.empty-state { padding: 20px; text-align: center; color: var(--text-muted); font-size: 12px; }

/* ---- BADGES ---- */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; border: 1px solid; }
.badge-green { background: var(--green-bg); border-color: var(--green-border); color: var(--green); }
.badge-red { background: var(--red-bg); border-color: var(--red-border); color: var(--red); }
.badge-blue { background: var(--blue-bg); border-color: var(--blue-border); color: var(--blue); }
.badge-orange { background: var(--orange-bg); border-color: var(--orange-border); color: var(--orange); }
.badge-gold { background: var(--gold-bg); border-color: var(--gold-border); color: var(--gold); }
.badge-gray { background: var(--surface2); border-color: var(--border); color: var(--text-muted); }

/* ---- TABLE ---- */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table-toolbar { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filter-input {
  background: var(--surface2); border: 1px solid var(--border); color: var(--text);
  padding: 7px 12px; border-radius: 7px; font-size: 13px;
  font-family: 'DM Sans', sans-serif; outline: none; transition: border-color 0.15s;
}
.filter-input:focus { border-color: var(--accent); }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 10px 14px; text-align: left;
  font-size: 11px; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase; color: var(--text-muted);
  background: var(--surface2); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface2); }
td { padding: 10px 14px; font-size: 13px; vertical-align: middle; }
.td-name { font-weight: 600; }
.td-actions { display: flex; gap: 5px; flex-wrap: wrap; }

/* ---- MODAL ---- */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.4); z-index: 200;
  align-items: flex-start; justify-content: center;
  padding: 20px; overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; width: 100%; max-width: 640px;
  padding: 24px; margin: auto; box-shadow: var(--shadow-md);
  animation: modalIn 0.2s ease;
}
.modal-lg { max-width: 800px; }
@keyframes modalIn { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:translateY(0); } }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-title { font-family: 'Playfair Display', serif; font-size: 18px; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.modal-close:hover { background: var(--surface2); color: var(--text); }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ---- CALENDAR / GANTT ---- */
.gantt-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.gantt-table { border-collapse: collapse; min-width: 100%; }
.gantt-table th, .gantt-table td { border: 1px solid var(--border); }
.gantt-room-col { min-width: 120px; padding: 8px 12px; background: var(--surface2); font-weight: 600; font-size: 12px; white-space: nowrap; position: sticky; left: 0; z-index: 2; }
.gantt-date-header { min-width: 36px; padding: 6px 4px; text-align: center; font-size: 10px; font-weight: 600; color: var(--text-muted); background: var(--surface2); white-space: nowrap; }
.gantt-date-header.today { background: var(--accent-light); color: var(--accent); }
.gantt-date-header.weekend { background: #fef9e7; }
.gantt-cell { min-width: 36px; height: 36px; padding: 0; position: relative; }
.gantt-cell.today-col { background: rgba(44,82,130,0.04); }
.gantt-block {
  position: absolute; top: 4px; bottom: 4px; left: 1px; right: 1px;
  border-radius: 4px; display: flex; align-items: center; padding: 0 6px;
  font-size: 10px; font-weight: 600; color: #fff; cursor: pointer;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  z-index: 1; transition: opacity 0.15s;
}
.gantt-block:hover { opacity: 0.85; }
.gantt-block.start { border-radius: 4px 0 0 4px; left: 2px; }
.gantt-block.end { border-radius: 0 4px 4px 0; right: 2px; }
.gantt-block.start.end { border-radius: 4px; }
.gantt-block.middle { border-radius: 0; left: 0; right: 0; }

/* ---- PROPERTY CARDS ---- */
.property-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 14px; margin-bottom: 24px; }
.property-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); border-top: 4px solid #ccc; }
.property-card-name { font-family: 'Playfair Display', serif; font-size: 17px; margin-bottom: 4px; }
.property-card-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.property-card-actions { display: flex; gap: 6px; }

/* ---- COLOR PICKER ---- */
.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.color-swatch { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; transition: all 0.15s; }
.color-swatch.selected, .color-swatch:hover { border-color: var(--text); transform: scale(1.15); }

/* ---- TRANSFER GROUPS ---- */
.transfer-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; box-shadow: var(--shadow); }
.transfer-group-header { padding: 12px 16px; background: var(--surface2); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; font-weight: 600; }
.transfer-row { padding: 10px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.transfer-row:last-child { border-bottom: none; }

/* ---- SECTION DIVIDER ---- */
hr.section-divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ---- UTILS ---- */
.d-flex { display: flex; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.align-center { align-items: center; } .justify-between { justify-content: space-between; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); font-size: 12px; }
.text-right { text-align: right; }
.fw-600 { font-weight: 600; }
.w-100 { width: 100%; }

/* ---- LEGEND ---- */
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--text-dim); }
.legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: middle; margin-right: 3px; }

/* ---- BURGER MENU ---- */
.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
  border-radius: 6px;
  margin-left: auto;
}
.burger-btn span {
  display: block; width: 22px; height: 2px;
  background: var(--text-dim); border-radius: 2px;
  transition: all 0.25s;
  transform-origin: center;
}
.burger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.open span:nth-child(2) { opacity: 0; }
.burger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 99;
}
.nav-overlay.open { display: block; }

.nav-user-mobile { display: none; }
.nav-user-desktop { display: flex; }

@media (max-width: 768px) {
  .navbar { padding: 0 16px; }
  .nav-brand { font-size: 15px; }
  .burger-btn { display: flex; }
  .nav-user-desktop { display: none; }

  .nav-links {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 56px; left: 0;
    width: 260px; height: calc(100vh - 56px);
    background: var(--surface);
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    z-index: 100;
    padding: 12px 0;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .nav-links.open { transform: translateX(0); }

  .nav-links .nav-link {
    padding: 12px 20px;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
  }
  .nav-links .nav-link:last-of-type { border-bottom: none; }

  .nav-user-mobile {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 20px;
    border-top: 2px solid var(--border);
    margin-top: auto;
  }

  .main-content { padding: 16px; }

  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .panels-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }
  .room-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 480px) {
  .room-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
}

/* ---- FORM CARD (standalone form pages) ---- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

/* ---- FOOTER ---- */
.footer { text-align: center; padding: 16px; font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--border); margin-top: 32px; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
