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

:root {
  --blue: #1e7fe0;
  --blue-dark: #0b5fc7;
  --navy: #0b2540;
  --navy-dark: #071a30;
  --yellow: #f5b400;
  --green: #25d366;
  --green-dark: #1fb855;
  --red: #e8443f;
  --text-dark: #1a2333;
  --text-muted: #6b7686;
  --bg-soft: #f4f8fc;
  --border: #e6ebf1;
  --radius: 10px;
}

body {
  font-family: 'Poppins', Arial, sans-serif;
  background: var(--bg-soft);
  color: var(--text-dark);
}

a { text-decoration: none; color: inherit; }

/* ===== LOGIN PAGE ===== */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue-dark) 100%);
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  text-align: center;
}
.login-card .brand {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}
.login-card .brand span { color: var(--blue); }
.login-card .sub {
  color: var(--text-muted);
  font-size: 13.5px;
  margin-bottom: 26px;
}
.login-card label {
  display: block;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  margin: 14px 0 6px;
}
.login-card input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
.login-card input:focus { outline: none; border-color: var(--blue); }
.login-card .btn-login {
  width: 100%;
  margin-top: 22px;
  padding: 12px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}
.login-card .btn-login:hover { background: var(--blue-dark); }
.login-error {
  color: var(--red);
  font-size: 13px;
  margin-top: 12px;
  display: none;
}
.login-hint {
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-soft);
  padding: 10px;
  border-radius: 8px;
}

/* ===== ADMIN SHELL LAYOUT ===== */
#admin-shell {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  background: var(--navy-dark);
  color: #cfd8e3;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  flex-shrink: 0;
}
.admin-logo {
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 30px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-logo small {
  display: block;
  width: 100%;
  font-weight: 400;
  font-size: 11px;
  color: #7f8fa4;
  margin-top: 2px;
}
.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.admin-nav a {
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #b7c2d0;
}
.admin-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.admin-nav a.active { background: var(--blue); color: #fff; }
.admin-view-site {
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: #b7c2d0;
  border: 1px solid rgba(255,255,255,0.12);
  text-align: center;
}
.admin-view-site:hover { color: #fff; }

.admin-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.admin-topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-page-title { font-size: 19px; font-weight: 700; }
.admin-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
}
.admin-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
}
.btn-logout {
  border: 1.5px solid var(--border);
  background: #fff;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-dark);
}
.btn-logout:hover { border-color: var(--red); color: var(--red); }

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

/* ===== DASHBOARD ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 30px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: var(--bg-soft);
}
.stat-num { font-size: 26px; font-weight: 700; }
.stat-label { font-size: 13px; color: var(--text-muted); }
.dash-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.dash-card h3 { margin-bottom: 14px; font-size: 16px; }
.quick-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.quick-actions a {
  background: var(--blue);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}
.quick-actions a.secondary { background: var(--navy); }
.quick-actions a:hover { opacity: 0.9; }

/* ===== TABLE / LIST PAGES ===== */
.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--blue-dark); }

.data-table-wrap {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  overflow-x: auto;
}
table.data-table { width: 100%; border-collapse: collapse; min-width: 600px; }
table.data-table th {
  text-align: left;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  background: var(--bg-soft);
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
table.data-table td {
  padding: 14px 18px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.data-table tr:last-child td { border-bottom: none; }
.thumb {
  width: 56px; height: 42px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg-soft);
}
.badge {
  display: inline-block;
  background: var(--bg-soft);
  color: var(--blue);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.row-actions { display: flex; gap: 8px; }
.icon-btn {
  border: 1px solid var(--border);
  background: #fff;
  width: 32px; height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover { border-color: var(--blue); }
.icon-btn.danger:hover { border-color: var(--red); }
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .em-icon { font-size: 40px; margin-bottom: 10px; }

/* ===== FORM PAGES ===== */
.form-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  align-items: start;
}
.form-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.form-card h3 { font-size: 15px; margin-bottom: 18px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.field .hint { font-size: 12px; color: var(--text-muted); font-weight: 400; margin-top: 4px; }
.field input[type=text],
.field input[type=number],
.field input[type=url],
.field textarea,
.field select {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--blue);
}
.field textarea { resize: vertical; min-height: 80px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.upload-box {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--bg-soft);
}
.upload-box:hover { border-color: var(--blue); color: var(--blue); }
.upload-preview {
  margin-top: 12px;
  border-radius: 8px;
  overflow: hidden;
  display: none;
}
.upload-preview img { width: 100%; display: block; }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--border);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  background: #fff;
}
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip-add {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.chip-add input {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}
.chip-add button {
  border: none;
  background: var(--navy);
  color: #fff;
  padding: 0 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}
.btn-save {
  background: var(--green);
  color: #fff;
  border: none;
  padding: 12px 26px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.btn-save:hover { background: var(--green-dark); }
.btn-cancel {
  background: #fff;
  border: 1.5px solid var(--border);
  padding: 12px 26px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-dark);
}

/* ---- Live preview panels ---- */
.preview-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 24px;
}
.preview-card h3 {
  padding: 16px 20px 0;
  font-size: 14px;
}
.preview-card .preview-label {
  padding: 4px 20px 14px;
  font-size: 12px;
  color: var(--text-muted);
}

/* location banner preview */
.banner-preview {
  position: relative;
  height: 200px;
  background: linear-gradient(135deg, #2b4f77, #17324f);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  color: #fff;
}
.banner-preview::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.55));
}
.banner-preview .bp-text { position: relative; z-index: 1; }
.banner-preview .bp-crumb { font-size: 12px; opacity: 0.85; margin-bottom: 6px; }
.banner-preview .bp-title { font-size: 24px; font-weight: 700; }

/* homepage destination-card preview (square image + name overlay) */
.dest-card-preview {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 20px 20px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #2b4f77, #17324f);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}
.dest-card-preview::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.65));
}
.dest-card-preview .dcp-name {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px;
}

.seo-preview { padding: 16px 20px 22px; }
.seo-url { color: #1a0dab; font-size: 12px; margin-bottom: 2px; }
.seo-title { color: #1558d6; font-size: 16px; margin-bottom: 3px; line-height: 1.3; }
.seo-desc { color: #4d5156; font-size: 13px; line-height: 1.4; }

/* package card preview reused from main site look */
.pkg-preview-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin: 0 20px 20px;
}
.pkg-preview-img {
  height: 150px;
  background: var(--bg-soft);
  background-size: cover;
  background-position: center;
  position: relative;
}
.pkg-preview-body { padding: 14px; }
.pkg-preview-body h4 { font-size: 15px; margin-bottom: 6px; }
.pkg-preview-meta { font-size: 12.5px; color: var(--text-muted); margin-bottom: 4px; }
.pkg-preview-price { font-size: 17px; font-weight: 700; color: var(--red); margin-top: 8px; }
.pkg-preview-price .old { font-size: 12px; color: var(--text-muted); text-decoration: line-through; font-weight: 400; margin-left: 6px; }
.pkg-preview-includes { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); margin-top: 6px; }

@media (max-width: 900px) {
  .form-layout { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .admin-sidebar { width: 76px; }
  .admin-logo small, .admin-nav a, .admin-view-site { display: none; }
  .admin-nav a { text-align: center; }
}
