/* ============================================================
   Cocotours - CSS Backoffice Admin
   ============================================================ */

.admin-body {
  display: flex;
  min-height: 100vh;
  background: #F4F6F8;
  color: #1C1A17;
}

/* SIDEBAR */
.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #0B8FAC;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.sidebar-logo a {
  color: white;
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-logo span { color: #FFD88A; }

.sidebar-nav {
  padding: 16px 0;
  flex: 1;
  overflow-y: auto;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  color: rgba(255,255,255,.8);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  transition: all .15s;
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: white;
  background: rgba(255,255,255,.12);
  border-left-color: #FFD88A;
  text-decoration: none;
}

.sidebar-nav .nav-icon { width: 18px; text-align: center; font-size: 16px; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.15);
}

.sidebar-footer a {
  color: rgba(255,255,255,.7);
  font-size: 13px;
  text-decoration: none;
}
.sidebar-footer a:hover { color: white; }

/* MAIN CONTENT */
.admin-main {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-topbar {
  background: white;
  border-bottom: 1px solid #E8EAF0;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-topbar h1 {
  font-size: 20px;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
}

.admin-content {
  padding: 28px;
  flex: 1;
}

/* STAT CARDS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}

.stat-card .stat-icon { font-size: 24px; }
.stat-card .stat-label { font-size: 12px; color: #888; font-weight: 500; text-transform: uppercase; letter-spacing: .4px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: #0B8FAC; font-family: 'Playfair Display', serif; }
.stat-card .stat-sub   { font-size: 12px; color: #aaa; }

/* TABLE */
.admin-table-wrap {
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  overflow: hidden;
  margin-bottom: 24px;
}

.admin-table-head {
  padding: 16px 20px;
  border-bottom: 1px solid #F0F0F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-table-head h2 { font-size: 16px; font-weight: 600; }

table.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.admin-table th {
  background: #F8F9FA;
  padding: 11px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: .4px;
  border-bottom: 1px solid #F0F0F0;
}

table.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #F7F7F7;
  vertical-align: middle;
}

table.admin-table tr:last-child td { border-bottom: none; }
table.admin-table tr:hover td { background: #FAFBFC; }

/* PLANNING */
.planning-wrap {
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  overflow: hidden;
  margin-bottom: 24px;
}

.planning-controls {
  padding: 16px 20px;
  border-bottom: 1px solid #F0F0F0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.planning-table-scroll { overflow-x: auto; }

table.planning-table {
  border-collapse: collapse;
  min-width: 100%;
  font-size: 13px;
}

table.planning-table th {
  padding: 8px 6px;
  text-align: center;
  border: 1px solid #E8EAF0;
  white-space: nowrap;
  background: #F8F9FA;
  font-size: 11px;
  font-weight: 600;
  color: #666;
}

table.planning-table th.bungalow-col {
  text-align: left;
  padding-left: 14px;
  min-width: 130px;
  background: #0B8FAC;
  color: white;
}

table.planning-table td {
  padding: 0;
  border: 1px solid #E8EAF0;
  height: 38px;
  min-width: 36px;
}

table.planning-table td.bungalow-name {
  padding: 0 14px;
  font-weight: 500;
  background: #F8F9FA;
  white-space: nowrap;
}

.planning-cell { width: 100%; height: 38px; display: block; }
.planning-cell.free     { background: #EAF9F1; }
.planning-cell.occupied { background: #0B8FAC; border-radius: 2px; }
.planning-cell.pending  { background: #FEF3C7; }
.planning-cell.disabled { background: #F0F0F0; }
.planning-cell.today    { background: #FFD88A; }

/* TARIF EDITOR */
.tarif-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.tarif-table th {
  background: #0B8FAC;
  color: white;
  padding: 10px 14px;
  text-align: left;
  font-weight: 500;
}
.tarif-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #F0F0F0;
  vertical-align: middle;
}
.tarif-table tr:hover td { background: #FAFBFC; }
.tarif-table input[type="number"] {
  width: 90px;
  padding: 6px 10px;
  border: 1.5px solid #DDE0E8;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}
.tarif-table input[type="number"]:focus {
  outline: none;
  border-color: #0B8FAC;
  box-shadow: 0 0 0 3px rgba(11,143,172,.15);
}

/* FORMS ADMIN */
.admin-form { max-width: 700px; }
.admin-form .form-group { margin-bottom: 18px; }
.admin-form label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  margin-bottom: 6px;
}
.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  border: 1.5px solid #DDE0E8;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  background: white;
  transition: border-color .2s;
}
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  outline: none;
  border-color: #0B8FAC;
  box-shadow: 0 0 0 3px rgba(11,143,172,.12);
}

/* CARD */
.admin-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  padding: 24px;
  margin-bottom: 24px;
}
.admin-card h2 { font-size: 17px; margin-bottom: 20px; }

/* ACTIONS ROW */
.actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* MODAL REFUS */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: white;
  border-radius: 12px;
  padding: 28px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0,0,0,.2);
}
.modal-box h3 { margin-bottom: 16px; font-size: 18px; }
