/* =========================================================================
   PRIVATE TOUR - ADMIN CONTROL PANEL (LIGHT THEME)
   Improved UI - Animasi & Skeleton Loading
   ========================================================================= */

:root {
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Color Palette - Light & Sophisticated */
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-sidebar: #ffffff;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;

  --success: #059669;
  --success-light: #ecfdf5;
  --success-border: #a7f3d0;

  --warning: #d97706;
  --warning-light: #fffbeb;
  --warning-border: #fde68a;

  --danger: #dc2626;
  --danger-light: #fef2f2;
  --danger-border: #fecaca;

  --purple: #7c3aed;
  --purple-light: #f5f3ff;
  --purple-border: #ddd6fe;

  /* Elevation */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 260px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none !important;
  color: inherit;
}

/* Helper Utilities */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.font-bold { font-weight: 700; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.85rem; }
.gap-4 { gap: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.p-0 { padding: 0 !important; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-outline {
  background-color: #ffffff;
  color: var(--text-main);
  border-color: var(--border-color);
}
.btn-outline:hover {
  background-color: var(--bg-app);
  border-color: var(--text-light);
}

.btn-danger-outline {
  background-color: transparent;
  color: var(--danger);
  border-color: var(--danger-border);
}
.btn-danger-outline:hover {
  background-color: var(--danger-light);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.btn-icon:hover {
  background: var(--bg-app);
  color: var(--text-main);
}

/* Form Controls */
.form-group {
  margin-bottom: 1.125rem;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.375rem;
}

.form-control {
  width: 100%;
  font-family: inherit;
  font-size: 0.875rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  color: var(--text-main);
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea.form-control {
  resize: vertical;
}

/* Quill WYSIWYG Rich Text Editor */
.rich-text-wrapper {
  margin-top: 0.25rem;
}

.ql-toolbar.ql-snow {
  border: 1px solid var(--border-color) !important;
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  background: #f8fafc;
  padding: 0.5rem 0.6rem !important;
}

.ql-container.ql-snow {
  border: 1px solid var(--border-color) !important;
  border-top: none !important;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  background: #ffffff;
  font-family: inherit !important;
  font-size: 0.875rem !important;
}

.ql-editor {
  min-height: 140px;
  max-height: 280px;
  overflow-y: auto;
  font-family: inherit !important;
  font-size: 0.875rem !important;
  line-height: 1.6 !important;
  color: var(--text-main);
}

.ql-editor.ql-blank::before {
  color: var(--text-light);
  font-style: normal;
  font-family: inherit;
  font-size: 0.875rem;
}

.ql-snow.ql-toolbar button:hover,
.ql-snow .ql-toolbar button:hover,
.ql-snow.ql-toolbar button:focus,
.ql-snow .ql-toolbar button:focus,
.ql-snow.ql-toolbar button.ql-active,
.ql-snow .ql-toolbar button.ql-active {
  color: var(--primary) !important;
}

.ql-snow.ql-toolbar button:hover .ql-stroke,
.ql-snow .ql-toolbar button:hover .ql-stroke,
.ql-snow.ql-toolbar button.ql-active .ql-stroke,
.ql-snow .ql-toolbar button.ql-active .ql-stroke {
  stroke: var(--primary) !important;
}

.ql-snow.ql-toolbar button:hover .ql-fill,
.ql-snow .ql-toolbar button:hover .ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-fill,
.ql-snow .ql-toolbar button.ql-active .ql-fill {
  fill: var(--primary) !important;
}

/* =========================================================================
   LOGIN VIEW
   ========================================================================= */
.login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(circle at 50% 20%, #eff6ff 0%, #f8fafc 80%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.25rem;
  animation: fadeIn 0.3s ease-out;
}

.login-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.25rem;
}

.login-logo-img {
  max-height: 58px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
}

.brand-logo-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
  color: #ffffff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.25);
}

.login-title {
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-main);
}

.login-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon input {
  width: 100%;
  font-family: inherit;
  font-size: 0.875rem;
  padding: 0.6875rem 2.5rem 0.6875rem 2.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}
.input-with-icon input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.input-icon {
  position: absolute;
  left: 0.875rem;
  color: var(--text-light);
  pointer-events: none;
}

.icon-button-inside {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
}
.icon-button-inside:hover {
  color: var(--text-main);
}

.login-version-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: 0.02em;
}

.version-dot {
  color: var(--border-color);
  font-size: 0.875rem;
}

.sidebar-version-tag {
  margin-top: 0.65rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-light);
  text-align: center;
  letter-spacing: 0.03em;
}

/* =========================================================================
   ADMIN MAIN LAYOUT
   ========================================================================= */
.admin-view {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  transition: transform 0.25s ease-in-out;
}

.sidebar-brand {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  width: 100%;
}

.sidebar-logo-img {
  max-height: 44px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
}

.sidebar-brand-fallback {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-badge-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
  color: #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-brand-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.brand-name {
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--text-main);
}
.brand-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sidebar-menu {
  flex: 1;
  padding: 1rem 0.875rem;
  overflow-y: auto;
}

.menu-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  padding: 0.75rem 0.75rem 0.375rem;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6875rem 0.875rem;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  margin-bottom: 0.25rem;
  text-decoration: none !important;
}
.nav-item:hover,
.nav-item:focus,
.nav-item:active {
  background: var(--bg-app);
  color: var(--text-main);
  text-decoration: none !important;
}
.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  text-decoration: none !important;
}
.nav-item span {
  text-decoration: none !important;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-light);
  background: #ffffff;
}

.user-profile-widget {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.user-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--purple-light);
  color: var(--purple);
  border: 1px solid var(--purple-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

.user-meta {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--purple);
}

.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-logout:hover {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger-border);
}

/* Main Wrapper */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top Navbar */
.top-navbar {
  height: 68px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  position: sticky;
  top: 0;
  z-index: 30;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-menu-btn {
  display: none;
}

.page-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.page-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.api-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  background: var(--success-light);
  color: var(--success);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--success);
}

/* Content Body */
.content-body {
  padding: 1.75rem;
  flex: 1;
}

.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

/* =========================================================================
   CARDS & GRIDS
   ========================================================================= */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}
.card-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.card-body {
  padding: 1.5rem;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.flex-wrap {
  flex-wrap: wrap;
}

/* Filter & Search Bar */
.filter-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 240px;
  max-width: 360px;
  flex: 1;
  height: 40px;
}

.search-box input {
  width: 100%;
  height: 40px;
  font-family: inherit;
  font-size: 0.875rem;
  padding: 0 2rem 0 2.4rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  color: var(--text-main);
  transition: var(--transition);
  outline: none;
  box-sizing: border-box;
}
.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.search-box .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.clear-search-btn {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.15rem;
  cursor: pointer;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: var(--transition);
}
.clear-search-btn:hover {
  background-color: #f1f5f9;
  color: var(--text-main);
}

.filter-select {
  font-family: inherit;
  font-size: 0.875rem;
  height: 40px;
  padding: 0 2.2rem 0 0.875rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  appearance: none;
  -webkit-appearance: none;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
  min-width: 145px;
  box-sizing: border-box;
}
.filter-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.table-info-badge {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-app);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

/* Pagination Bar */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  background: #ffffff;
  flex-wrap: wrap;
  gap: 1rem;
}

.pagination-info {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
  background: var(--bg-app);
  border-color: var(--text-light);
}

.page-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.limit-select-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.limit-select-wrap select {
  font-family: inherit;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #ffffff;
  font-size: 0.8125rem;
  color: var(--text-main);
  outline: none;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon-blue { background: var(--primary-light); color: var(--primary); }
.stat-icon-green { background: var(--success-light); color: var(--success); }
.stat-icon-amber { background: var(--warning-light); color: var(--warning); }
.stat-icon-purple { background: var(--purple-light); color: var(--purple); }

.stat-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}
.stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
  margin: 0.2rem 0;
}
.stat-desc {
  font-size: 0.75rem;
  color: var(--text-light);
}

.grid-2-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.25rem;
}

/* Trend Bars Visualizer */
.trend-bars-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 180px;
  padding-top: 1.5rem;
  gap: 0.75rem;
}

.trend-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.trend-bar-track {
  width: 100%;
  max-width: 36px;
  background: var(--bg-app);
  border-radius: 6px 6px 0 0;
  height: 100%;
  display: flex;
  align-items: flex-end;
  position: relative;
}

.trend-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--primary) 0%, #3b82f6 100%);
  border-radius: 6px 6px 0 0;
  transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 4px;
}

.trend-bar-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.5rem;
}
.trend-bar-value {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

/* Status Breakdown Summary */
.status-summary-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.status-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0.875rem;
  background: var(--bg-app);
  border-radius: var(--radius-md);
}

.status-count {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: capitalize;
}

.badge-pending { background: var(--warning-light); color: var(--warning); border: 1px solid var(--warning-border); }
.badge-confirmed { background: var(--primary-light); color: var(--primary); border: 1px solid var(--primary-border); }
.badge-completed { background: var(--success-light); color: var(--success); border: 1px solid var(--success-border); }
.badge-cancelled { background: var(--danger-light); color: var(--danger); border: 1px solid var(--danger-border); }
.badge-active { background: var(--success-light); color: var(--success); border: 1px solid var(--success-border); }
.badge-inactive { background: #f1f5f9; color: var(--text-muted); border: 1px solid var(--border-color); }

.badge-role-admin { background: var(--purple-light); color: var(--purple); border: 1px solid var(--purple-border); }
.badge-role-karyawan { background: var(--primary-light); color: var(--primary); border: 1px solid var(--primary-border); }
.badge-role-user { background: #f8fafc; color: var(--text-muted); border: 1px solid var(--border-color); }

/* Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: var(--bg-app);
  padding: 0.875rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tr:hover td {
  background-color: #fafbfc;
}

/* Tour Packages Grid (Portrait Aspect Ratio) */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.package-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.package-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.package-card-img-wrap {
  width: 100%;
  aspect-ratio: 3 / 4;
  min-height: 280px;
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.package-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.3s ease;
}

.package-card:hover .package-card-img {
  transform: scale(1.03);
}

.package-card-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Skeleton Shimmer Loading */
.skeleton-card {
  pointer-events: none;
}
.skeleton-shimmer {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-line {
  height: 14px;
  border-radius: var(--radius-sm);
}
.w-50 { width: 50%; }
.w-75 { width: 75%; }
.w-100 { width: 100%; }

.package-card-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.package-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.package-card-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.package-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

.package-price {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary);
}

.package-duration {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.package-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* Setting Image Cell & Logo Preview */
.setting-img-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.setting-thumb {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-color);
  background: #f8fafc;
  flex-shrink: 0;
}

.setting-url-text {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

.logo-preview-box {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-md);
  border: 2px dashed var(--border-color);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6px;
  transition: var(--transition);
}
.logo-preview-box:hover {
  border-color: var(--primary);
}

.logo-preview-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 1rem;
}

.modal-card {
  width: 100%;
  max-width: 620px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalScale 0.2s ease-out;
}

.modal-card form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.modal-header {
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: #ffffff;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-light);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.modal-close-btn:hover {
  color: var(--text-main);
  background: #f1f5f9;
}

.modal-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* Quill Editor bounds inside modal */
.quill-editor-container .ql-editor {
  min-height: 130px;
  max-height: 220px;
  overflow-y: auto;
  font-family: inherit;
  font-size: 0.875rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: #f8fafc;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.info-card-gray {
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.order-items-list {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border-light);
}
.order-item-row:last-child {
  border-bottom: none;
}

.order-item-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.order-item-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.order-item-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.order-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.order-item-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.order-calc-box {
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.order-calc-box .calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.order-calc-box .calc-row.grand-total {
  border-top: 1px solid #cbd5e1;
  padding-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-main);
}

.info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
}
.info-label {
  color: var(--text-muted);
}
.info-val {
  color: var(--text-main);
}

.receipt-preview-box {
  width: 100%;
  max-height: 200px;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-app);
}

.receipt-preview-img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
}

.file-preview-wrap {
  width: 140px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #f8fafc;
}
.file-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Toast Container */
.toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 400px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  animation: toastSlide 0.3s ease-out;
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-info { border-left: 4px solid var(--primary); }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes toastSlide {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Spin animation for refresh icon */
.spin {
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* =========================================================================
   RESPONSIVE DESIGN
   ========================================================================= */
@media (max-width: 900px) {
  .grid-2-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: inline-flex;
  }

  .admin-sidebar {
    transform: translateX(-100%);
  }
  .admin-sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.2);
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    z-index: 35;
  }
  .sidebar-backdrop.active {
    display: block;
  }

  .main-wrapper {
    margin-left: 0;
  }

  .content-body {
    padding: 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   ENHANCED TRANSACTIONS TABLE & ADVANCED FILTERS
   ========================================================================= */
.whitespace-nowrap {
  white-space: nowrap !important;
}

.text-dark {
  color: #0f172a;
}

/* Status Tabs Nav */
.status-tabs-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem 0.5rem 1.25rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-light);
  background: #ffffff;
}

.status-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.status-tab-btn:hover {
  background: #f1f5f9;
  color: var(--text-main);
  border-color: #cbd5e1;
}

.status-tab-btn.active {
  background: #ffffff;
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
  font-weight: 700;
}

.status-tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.dot-all { background: #94a3b8; }
.dot-pending { background: #f59e0b; }
.dot-confirmed { background: #2563eb; }
.dot-completed { background: #10b981; }
.dot-cancelled { background: #ef4444; }

/* Filter Toolbar */
.filter-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: #ffffff;
}

.filter-inputs-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  flex: 1;
}

.filter-date-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #ffffff;
}

.filter-date-input {
  height: 40px;
  padding: 0 0.65rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  font-family: inherit;
  font-size: 0.8125rem;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
  box-sizing: border-box;
}

.filter-date-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.btn-reset-filters {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 40px;
  padding: 0 0.85rem;
  border-radius: var(--radius-md);
  border: 1px dashed var(--danger-border);
  background: var(--danger-light);
  color: var(--danger);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-reset-filters:hover {
  background: #fee2e2;
  border-color: var(--danger);
}

/* Table Cells Formatting */
.data-table th {
  white-space: nowrap;
}

.data-table td {
  white-space: normal;
}

.customer-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 170px;
}

.customer-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.customer-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.customer-phone-link:hover {
  color: #16a34a;
  text-decoration: underline;
}

.package-cell {
  min-width: 220px;
  max-width: 320px;
}

.pax-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.25rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.device-badge-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: flex-start;
}

.device-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
}

.device-pill:hover {
  background: #dbeafe;
}

.device-pill.web {
  background: #f8fafc;
  color: #475569;
  border-color: #cbd5e1;
  cursor: default;
}

.device-sub-id {
  font-size: 0.68rem;
  color: var(--text-light);
  font-family: monospace;
  letter-spacing: -0.02em;
  cursor: pointer;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.device-sub-id:hover {
  color: var(--primary);
  text-decoration: underline;
}

.action-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.action-btn-group .btn {
  white-space: nowrap;
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  height: 32px;
}

/* =========================================================================
   SKELETON LOADING ANIMATION
   ========================================================================= */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.skeleton-loader {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.skeleton-row {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
}

.skeleton-cell {
  height: 20px;
  flex: 1;
}

.skeleton-cell:first-child { flex: 2; }
.skeleton-cell:last-child { flex: 0.5; }

.skeleton-stat {
  height: 100px;
  border-radius: var(--radius-md);
}

/* Page Transition Animation */
.fade-enter-active {
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.fade-enter-from {
  opacity: 0;
  transform: translateY(8px);
}

/* Table Row Hover Enhanced */
.data-table tbody tr {
  transition: background-color 0.15s ease;
}
.data-table tbody tr:hover {
  background-color: #f8fafc;
}

/* Export & Action Button Styles */
.btn-export {
  background: #ffffff;
  color: #059669;
  border: 1px solid #a7f3d0;
}
.btn-export:hover {
  background: #ecfdf5;
  border-color: #6ee7b7;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.15);
}

/* Enhanced Modal */
.modal-content {
  animation: modalSlideIn 0.2s ease-out;
}
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Toast Animation */
.toast {
  animation: toastSlideIn 0.3s ease-out;
}
@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Badge status pulse untuk pending */
.badge-pending {
  animation: pulse-pending 2s ease-in-out infinite;
}
@keyframes pulse-pending {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Card hover elevation */
.stat-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}


/* =========================================================================
   LOGIN VIEW ENHANCED
   ========================================================================= */
.login-view {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8ecf8 50%, #f8fafc 100%);
  overflow: hidden;
  padding: 2rem;
}

.login-bg-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(at 20% 50%, rgba(37, 99, 235, 0.08) 0px, transparent 50%),
    radial-gradient(at 80% 20%, rgba(217, 119, 6, 0.06) 0px, transparent 50%),
    radial-gradient(at 40% 80%, rgba(37, 99, 235, 0.05) 0px, transparent 50%);
  z-index: 1;
}

.login-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08), 0 1px 4px rgba(15, 23, 42, 0.04);
  animation: loginCardIn 0.4s ease-out;
}

@keyframes loginCardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-error-banner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  color: #b91c1c;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  animation: shakeX 0.4s ease-in-out;
}

@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.spinner-ring {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.login-btn {
  min-height: 46px;
}

.login-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.login-forgot-wrap {
  text-align: center;
  margin-top: 1.25rem;
}

.login-forgot-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
}

.login-forgot-link:hover {
  color: var(--primary);
}

.login-version-footer {
  text-align: center;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.75rem;
  color: var(--text-light);
}

@media (max-width: 480px) {
  .login-view { padding: 1rem; }
  .login-card { padding: 1.75rem 1.25rem; }
}
