/* === Hello Dubai Guide — Admin === */
:root {
  --navy: #16253f;
  --navy-deep: #0e1a2e;
  --gold: #c9a96e;
  --gold-deep: #b08d4e;
  --cream: #faf1dc;
  --ink: #1a2233;
  --muted: #6a7488;
  --border: #e6e1d5;
  --bg: #f6f3eb;
  --bg-alt: #fffaf0;
  --white: #ffffff;
  --danger: #c04a4a;
  --success: #3a8f5e;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 6px 22px rgba(22, 37, 63, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--navy); }

/* === Sidebar === */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 260px;
  height: 100vh;
  background: var(--navy);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  padding: 28px 20px 20px;
  z-index: 50;
}
.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--cream);
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 18px;
}
.sidebar__brand img {
  width: 44px; height: 44px; border-radius: 10px;
  object-fit: cover;
}
.sidebar__brand span {
  font-weight: 700; line-height: 1.2;
}
.sidebar__brand small {
  font-size: 0.7rem;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.sidebar__nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  color: rgba(250, 241, 220, 0.8);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  transition: all .15s ease;
}
.sidebar__nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--cream);
}
.sidebar__nav a.is-active {
  background: var(--gold);
  color: var(--navy-deep);
  font-weight: 600;
}
.sidebar__footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.sidebar__preview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(201, 169, 110, 0.15);
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  border-radius: 10px;
  font-size: 0.88rem;
  transition: all .15s;
}
.sidebar__preview:hover { background: rgba(201, 169, 110, 0.25); }
.sidebar__logout {
  display: block;
  padding: 8px 14px;
  color: rgba(250, 241, 220, 0.55);
  text-decoration: none;
  font-size: 0.82rem;
  text-align: center;
}
.sidebar__logout:hover { color: var(--cream); }

.sidebar__toggle {
  display: none;
  position: fixed;
  top: 14px; left: 14px;
  width: 44px; height: 44px;
  background: var(--navy);
  color: var(--cream);
  border: none;
  border-radius: 10px;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 60;
  box-shadow: var(--shadow);
}

/* === Main === */
.main {
  margin-left: 260px;
  min-height: 100vh;
  padding: 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 38px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.topbar h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
}
.topbar__user {
  color: var(--muted);
  font-size: 0.9rem;
}
.content {
  padding: 32px 38px 60px;
  max-width: 980px;
}

/* === Flash === */
.flash {
  margin: 20px 38px 0;
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 500;
  border: 1px solid;
  display: flex;
  align-items: center;
  gap: 10px;
}
.flash--success { background: #eafaf0; color: var(--success); border-color: #c8ebd4; }
.flash--error { background: #fbe9e9; color: var(--danger); border-color: #ebc5c5; }
.flash--info { background: #eaf2fb; color: #2c5d92; border-color: #c5d8eb; }
.flash::before {
  content: ''; display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* === Cards (dashboard) === */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  transition: all .2s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--gold);
}
.card__icon {
  width: 42px; height: 42px;
  background: var(--cream);
  color: var(--navy);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.card h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--navy);
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* === Forms === */
.section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
}
.section > h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  color: var(--navy);
  font-weight: 700;
}
.section > .section__desc {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.88rem;
}
.field {
  margin-bottom: 18px;
}
.field:last-child { margin-bottom: 0; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--navy);
  margin-bottom: 6px;
}
.field__hint {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 5px;
  margin-bottom: 0;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="url"],
.field input[type="password"],
.field textarea,
.field select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.18);
}
.field textarea {
  resize: vertical;
  min-height: 84px;
  line-height: 1.5;
}
.field--row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field--row > .field { margin-bottom: 0; }

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.checkbox input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--gold);
}

/* === Image/file upload === */
.uploader {
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  padding: 16px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  gap: 14px;
}
.uploader__preview {
  width: 70px; height: 70px;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.uploader__preview img {
  width: 100%; height: 100%; object-fit: cover;
}
.uploader__preview.is-pdf {
  color: var(--gold-deep);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.uploader__info { flex: 1; min-width: 0; }
.uploader__name {
  font-size: 0.85rem;
  color: var(--ink);
  word-break: break-all;
  margin-bottom: 6px;
}
.uploader__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.uploader input[type="file"] { display: none; }

/* === Lists répétables (témoignages, FAQ, pack items) === */
.repeater { display: flex; flex-direction: column; gap: 14px; }
.repeater__item {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  position: relative;
}
.repeater__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.repeater__title {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--navy);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.repeater__actions {
  display: flex;
  gap: 6px;
}
.repeater__btn {
  background: transparent;
  border: 1px solid var(--border);
  padding: 5px 10px;
  font-size: 0.78rem;
  border-radius: 6px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
}
.repeater__btn:hover { background: var(--white); color: var(--navy); border-color: var(--navy); }
.repeater__btn--delete:hover { color: var(--danger); border-color: var(--danger); }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s ease;
}
.btn:hover { background: var(--navy-deep); transform: translateY(-1px); }
.btn--gold { background: var(--gold); color: var(--navy-deep); }
.btn--gold:hover { background: var(--gold-deep); color: var(--white); }
.btn--ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--border); }
.btn--ghost:hover { background: var(--white); border-color: var(--navy); }
.btn--small { padding: 7px 12px; font-size: 0.82rem; }
.btn--block { width: 100%; }
.btn--danger { background: var(--danger); }
.btn--danger:hover { background: #9a3a3a; }

.save-bar {
  position: sticky;
  bottom: 0;
  background: var(--white);
  margin: 30px -38px -60px;
  padding: 18px 38px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  box-shadow: 0 -4px 20px rgba(22, 37, 63, 0.06);
  z-index: 10;
}

/* === Login === */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  padding: 20px;
}
.login-card {
  background: var(--white);
  padding: 40px 36px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 400px;
}
.login-card__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.login-card__logo img {
  width: 48px; height: 48px;
  border-radius: 12px;
  object-fit: cover;
}
.login-card__logo-text {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  line-height: 1.2;
}
.login-card__logo-text small {
  display: block;
  font-size: 0.7rem;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.login-card h1 {
  font-size: 1.4rem;
  margin: 0 0 6px;
  color: var(--navy);
}
.login-card p {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 0.88rem;
}
.login-error {
  background: #fbe9e9;
  border: 1px solid #ebc5c5;
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}

/* === Mobile === */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .3s ease;
    box-shadow: 0 0 40px rgba(0,0,0,0.3);
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar__toggle { display: flex; align-items: center; justify-content: center; }
  .main { margin-left: 0; }
  .topbar { padding: 20px 20px 20px 70px; }
  .topbar h1 { font-size: 1.2rem; }
  .topbar__user { display: none; }
  .content { padding: 22px 18px 40px; }
  .flash { margin: 14px 18px 0; }
  .section { padding: 20px; }
  .field--row { grid-template-columns: 1fr; }
  .save-bar { margin: 24px -18px -40px; padding: 14px 18px; flex-direction: column; }
  .save-bar .btn { width: 100%; }
}
