
/* Admin Layout Variables & Overrides */
body.admin-body {
  display: flex;
  background: var(--paper);
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
}

/* Sidebar */
.admin-sidebar {
  width: 280px;
  background: var(--paper-dim);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  top: 0; left: 0;
  z-index: 100;
}
.sidebar-logo {
  padding: 24px 32px;
  border-bottom: 1px solid var(--line);
  height: 72px;
  display: flex;
  align-items: center;
}
.sidebar-logo img {
  height: 32px;
}
.admin-nav {
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.admin-nav a {
  padding: 14px 32px;
  color: rgba(27,20,15,0.7);
  text-decoration: none;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
  border-right: 3px solid transparent;
}
.admin-nav a svg { opacity: 0.6; }
.admin-nav a:hover, .admin-nav a.active {
  color: var(--ink);
  background: rgba(27,20,15,0.03);
  border-right-color: var(--brass);
}
.admin-nav a.active svg { opacity: 1; color: var(--brass); }
.sidebar-footer {
  padding: 24px 32px;
  border-top: 1px solid var(--line);
}
.back-link {
  color: var(--oak);
  text-decoration: none;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Main Area */
.admin-main {
  flex: 1;
  margin-left: 280px;
  display: flex;
  flex-direction: column;
}
.admin-topbar {
  height: 72px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  position: sticky;
  top: 0;
  z-index: 90;
}
.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.search-bar {
  background: var(--paper-dim);
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: 2px;
  width: 300px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.9rem;
}
.search-bar:focus { outline: 1px solid var(--brass); }
.admin-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brass);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
}
.admin-name {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
}

/* Content Area */
.admin-content {
  padding: 40px;
  max-width: 1200px;
}
.page-header {
  margin-bottom: 40px;
}
.page-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
}
.page-title {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  margin-bottom: 8px;
}
.page-subtitle {
  color: rgba(27,20,15,0.7);
}

/* Dashboard Widgets */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}
.stat-card {
  background: var(--paper-dim);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px;
  background: var(--brass); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease;
}
.stat-card:hover::after { transform: scaleX(1); }
.stat-card .eyebrow { margin-bottom: 8px; color: var(--brass); }
.stat-card .value { font-family: 'Fraunces', serif; font-size: 2.5rem; color: var(--ink); line-height: 1; margin-bottom: 8px; }
.stat-card .trend { font-size: 0.85rem; color: #16a34a; font-weight: 500; }
.trend.neutral { color: var(--ink) !important; }

.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}
.chart-title {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  margin-bottom: 24px;
}
.chart-wrapper {
  position: relative;
  height: 300px;
  width: 100%;
}
.chart-wrapper.flex-center {
  display: flex;
  justify-content: center;
}

/* Tables */
.table-container {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow-x: auto;
}
.table-header {
  padding: 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--paper-dim);
}
.table-header h3 { font-family: 'Fraunces', serif; font-size: 1.4rem; margin: 0; }
.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.data-table th {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brass);
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.data-table td {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  color: rgba(27,20,15,0.85);
  vertical-align: middle;
}
.data-table tr:hover { background: rgba(27,20,15,0.01); }
.col-id { width: 50px; }
.fw-500 { font-weight: 500; }
.text-right { text-align: right; }
.mr-12 { margin-right: 12px; }
.text-danger { color: #ef4444; }

/* Status Pills */
.status-pill {
  padding: 6px 12px;
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
}
.status-new { background: rgba(212, 175, 55, 0.15); color: var(--brass); border: 1px solid rgba(212, 175, 55, 0.3); }
.status-progress { background: rgba(2, 132, 199, 0.1); color: #0284c7; border: 1px solid rgba(2, 132, 199, 0.2); }
.status-done { background: rgba(22, 163, 74, 0.1); color: #16a34a; border: 1px solid rgba(22, 163, 74, 0.2); }

/* Links */
.action-link { color: var(--oak); font-weight: 500; text-decoration: none; transition: color 0.2s; }
.action-link:hover { color: var(--brass); text-decoration: underline; }

/* Forms */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.breadcrumb-separator { color: var(--line); }
.breadcrumb-current { color: rgba(27,20,15,0.7); font-weight: 500; }
.form-card {
  background: var(--paper-dim);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 40px;
  /* max-width: 800px; */
}
.form-group { margin-bottom: 24px; }
.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
}
.form-control {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1rem;
}
textarea.form-control { resize: vertical; }
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.btn-paper { background: var(--paper); }

/* Mobile */
.mobile-admin-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--ink); }

@media (max-width: 980px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
  .admin-sidebar.open { transform: translateX(0); box-shadow: 10px 0 30px rgba(0,0,0,0.1); }
  .admin-main { margin-left: 0; }
  .mobile-admin-toggle { display: block; }
  .admin-topbar { padding: 0 24px; }
  .admin-content { padding: 24px; }
  .charts-grid { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
}


/* ========== PLUGIN THEME OVERRIDES ========== */

/* File Upload UI */
.file-upload-ui {
  border: 2px dashed var(--line);
  border-radius: 2px;
  background: var(--paper);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.file-upload-ui:hover, .file-upload-ui.dragover {
  border-color: var(--brass);
  background: rgba(212, 175, 55, 0.03);
}

/* Choices.js Override (Searchable Select) */
.choices[data-type*="select-one"] .choices__inner {
  padding-bottom: 2px;
}
.choices__inner {
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1rem;
  display: flex;
  align-items: center;
}
.choices.is-open .choices__inner { border-radius: 2px; border-color: var(--brass); }
.choices.is-focused .choices__inner { outline: 1px solid var(--brass); }
.choices__list--dropdown { border: 1px solid var(--line); border-radius: 2px; box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.choices__list--dropdown .choices__item--selectable.is-highlighted { background: rgba(212, 175, 55, 0.1); color: var(--ink); }

/* Flatpickr Override (Date Picker) */
.flatpickr-calendar {
  font-family: 'IBM Plex Sans', sans-serif;
  border: 1px solid var(--line);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  border-radius: 2px;
}
.flatpickr-day.selected { background: var(--brass); border-color: var(--brass); }
.flatpickr-day:hover { background: rgba(212, 175, 55, 0.1); }

/* Quill.js Override (Rich Text) */
.ql-toolbar.ql-snow {
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 2px 2px 0 0;
  background: var(--paper-dim);
  font-family: 'IBM Plex Sans', sans-serif;
}
.ql-container.ql-snow {
  border: 1px solid var(--line);
  border-radius: 0 0 2px 2px;
  background: var(--paper);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1rem;
}
.ql-editor { min-height: 250px; }
.ql-snow.ql-toolbar button:hover, .ql-snow .ql-toolbar button:hover, .ql-snow.ql-toolbar button.ql-active, .ql-snow .ql-toolbar button.ql-active, .ql-snow.ql-toolbar .ql-picker-label:hover, .ql-snow .ql-toolbar .ql-picker-label:hover, .ql-snow.ql-toolbar .ql-picker-label.ql-active, .ql-snow .ql-toolbar .ql-picker-label.ql-active {
  color: var(--brass);
}
.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(--brass); }
.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(--brass); }

/* Upload UI Classes */
.upload-icon { color: var(--brass); margin-bottom: 12px; }
.upload-title { font-size: 1rem; color: var(--ink); }
.upload-subtitle { font-size: 0.85rem; color: rgba(27,20,15,0.6); margin-top: 4px; }
.upload-link { color: var(--oak); text-decoration: underline; font-weight: 500; }
.upload-filename { margin-top: 12px; font-weight: 500; color: var(--brass); }
.form-group-large { margin-bottom: 32px; }
.editor-container { height: 350px; }

/* ========== LOGIN PAGE & DROPDOWN ========== */
.login-body {
  justify-content: center;
  align-items: center;
  background: var(--paper-dim);
}
.login-wrapper {
  width: 100%;
  max-width: 440px;
  padding: 24px;
}
.login-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 48px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.03);
}
.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
}
.login-logo {
  height: 48px;
}
.badge{
  padding: 4px 6px;
  text-transform: uppercase;
  font-size:.7rem;
}

/* Dropdown */
.profile-dropdown-wrapper {
  position: relative;
  cursor: pointer;
}
.profile-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 2px;
  transition: background 0.2s;
}
.profile-dropdown-trigger:hover {
  background: rgba(27,20,15,0.03);
}
.profile-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  width: 200px;
  z-index: 100;
  flex-direction: column;
}
.profile-dropdown-menu.active {
  display: flex;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  color: var(--ink);
  text-decoration: none;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.dropdown-item:hover {
  background: rgba(27,20,15,0.03);
  color: var(--brass);
}
.dropdown-item.danger {
  border-top: 1px solid var(--line);
  color: #ef4444;
}
.dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.05);
  color: #dc2626;
}

/* ========== MODALS & TOASTS ========== */
.btn-danger {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #fff !important;
}
.btn-danger:hover {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
}

/* Confirm Modal */
.admin-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 10, 7, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.admin-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.admin-modal {
  background: var(--paper);
  width: 100%;
  max-width: 440px;
  border-radius: 4px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.admin-modal-overlay.active .admin-modal {
  transform: translateY(0) scale(1);
}
.admin-modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-modal-title {
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  margin: 0;
  color: var(--ink);
}
.admin-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(27,20,15,0.5);
  padding: 4px;
  display: flex;
  transition: color 0.2s;
}
.admin-modal-close:hover {
  color: var(--ink);
}
.admin-modal-body {
  padding: 24px;
  font-family: 'IBM Plex Sans', sans-serif;
  color: rgba(27,20,15,0.8);
  font-size: 1rem;
  line-height: 1.5;
}
.admin-modal-footer {
  padding: 24px;
  border-top: 1px solid var(--line);
  background: var(--paper-dim);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-radius: 0 0 4px 4px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none; /* Let clicks pass through empty space */
}
.toast {
  background: var(--ink);
  color: var(--paper);
  padding: 16px 24px;
  border-radius: 4px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.show {
  transform: translateX(0);
  opacity: 1;
}
.toast.toast-success { border-left: 4px solid #10b981; }
.toast.toast-error { border-left: 4px solid #ef4444; }
.toast.toast-info { border-left: 4px solid var(--brass); }

/* ========== CUSTOM DATATABLE ========== */
.datatable-wrapper { font-family: 'IBM Plex Sans', sans-serif; }
.datatable-top { padding: 0 0 24px 0; display: flex; justify-content: space-between; align-items: center; }
.datatable-search, .datatable-dropdown, .datatable-info, .datatable-pagination{
  width: 50%;
}
.datatable-input {
  border: 1px solid var(--line) !important;
  background: var(--paper) !important;
  color: var(--ink) !important; 
  border: 1px solid var(--line); 
  border-radius: 2px; 
  padding: 10px 16px; 
  font-family: 'IBM Plex Sans', sans-serif; 
  font-size: 0.95rem;
  outline: none; 
  transition: border-color 0.2s; 
  width: 250px;
  float:inline-end;
}
.datatable-input:focus { border-color: var(--brass); }
.datatable-selector {
  border: 1px solid var(--line) !important;
  background: var(--paper) !important;
  color: var(--ink) !important; 
  border: 1px solid var(--line); 
  border-radius: 2px; 
  padding: 6px 12px; 
  font-family: 'IBM Plex Sans', sans-serif; 
  outline: none; 
}
.datatable-table { border-collapse: collapse; width: 100%; margin-bottom: 24px; }
.datatable-table > thead > tr > th { 
  font-family: 'IBM Plex Mono', monospace !important;
  font-size: 0.75rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  color: var(--brass) !important;
  padding: 16px 24px !important;
  border-bottom: 1px solid var(--line) !important;
  background: var(--paper) !important;
  font-weight: 500 !important;
  text-align: left !important;
}
.datatable-table > tbody > tr > td { 
  padding: 20px 24px !important;
  border-bottom: 1px solid var(--line) !important;
  font-size: 0.95rem !important;
  color: rgba(27,20,15,0.85) !important;
  vertical-align: middle !important;
}
.datatable-table > tbody > tr:hover { background: rgba(212, 175, 55, 0.02); }
.datatable-bottom { 
  padding: 24px 0 0 0; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  border-top: 1px solid var(--line); 
}
.datatable-pagination ul { display: flex; list-style: none; padding: 0; margin: 0; justify-content: end; }
.datatable-pagination a {
  background: var(--paper) !important;
  border: 1px solid var(--line) !important;
  color: var(--ink) !important; 
  padding: 8px 12px; 
  border: 1px solid var(--line); 
  border-radius: 2px; 
  color: var(--ink); 
  text-decoration: none; 
  margin-left: 6px; 
  transition: all 0.2s; 
  cursor: pointer; 
}
.datatable-pagination a:hover { 
  background: rgba(212, 175, 55, 0.05); 
  color: var(--brass); 
  border-color: var(--brass); 
}
.datatable-pagination .active a, .datatable-pagination .active a:hover, .datatable-pagination .active a:focus {
  background: var(--brass) !important;
  color: #fff !important;
  border-color: var(--brass) !important; 
  background: var(--brass); 
  color: #fff; 
  border-color: var(--brass); 
}
.datatable-sorter::before, .datatable-sorter::after { opacity: 0.2; }
.datatable-table > thead > tr > th.asc .datatable-sorter::before { opacity: 0.8; }
.datatable-table > thead > tr > th.desc .datatable-sorter::after { opacity: 0.8; }
.datatable-info { color: rgba(27,20,15,0.6); font-size: 0.9rem; }
.datatable-dropdown { display: flex; align-items: center; gap: 8px; color: rgba(27,20,15,0.6); font-size: 0.9rem; }

.datatable-pagination .datatable-active a,
.datatable-pagination .datatable-active a:focus,
.datatable-pagination .datatable-active a:hover,
.datatable-pagination .datatable-active button,
.datatable-pagination .datatable-active button:focus,
.datatable-pagination .datatable-active button:hover {
  outline: none !important;
  background-color: #9c7233 !important;
  color: #fff !important;
}
.datatable-pagination a:hover, .datatable-pagination button:hover{
  background-color: #e3d9c2 !important;
}
/* ========== ADMIN GALLERY ========== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-auto-rows: auto;
  gap: 24px;
}
.gallery-card {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4/3;
  border: 1px solid var(--line);
  background: var(--paper);
}
.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 10, 7, 0.6);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-card:hover .gallery-overlay {
  opacity: 1;
}
.gallery-card:hover img {
  transform: scale(1.05);
}
.gallery-info {
  color: #fff;
  font-family: 'IBM Plex Sans', sans-serif;
  margin-bottom: 16px;
}
.gallery-title { font-weight: 500; font-size: 1rem; margin-bottom: 6px; }
.gallery-category { font-size: 0.75rem; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 0.1em; }
.gallery-actions { display: flex; gap: 8px; }
.gallery-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 6px 12px;
  border-radius: 2px;
  cursor: pointer;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.85rem;
  transition: all 0.2s;
  display: flex; align-items: center; gap: 6px;
}
.gallery-btn:hover { background: rgba(255,255,255,0.25); }
.gallery-btn.delete:hover { background: #ef4444; border-color: #ef4444; }

.gallery-filters {
  margin-bottom: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.gallery-card.hidden {
  display: none;
}

/* ========== ENQUIRIES TABLE ========== */
.contact-phone { font-size: 0.8rem; color: var(--brass); display: block; margin-top: 4px; font-weight: 500; }
.status-new { background: #3b82f6 !important; color: #fff !important; border: 1px solid #2563eb !important; }
.status-contacted { background: #f59e0b !important; color: #fff !important; border: 1px solid #d97706 !important; }
.status-converted { background: #10b981 !important; color: #fff !important; border: 1px solid #059669 !important; }

/* ========== ENQUIRY DETAILS ========== */
.enquiry-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
.detail-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 32px;
  margin-bottom: 24px;
}
.detail-card-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 24px;
}
.detail-card-title {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  color: var(--ink);
  margin: 0;
}
.client-info-group {
  margin-bottom: 16px;
}
.client-info-label {
  font-size: 0.85rem;
  color: rgba(27,20,15,0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.client-info-value {
  font-size: 1rem;
  color: var(--ink);
  font-weight: 500;
}
.message-body {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(27,20,15,0.85);
}
.message-body p { margin-top: 0; margin-bottom: 16px; }
.message-body p:last-child { margin-bottom: 0; }

@media (max-width: 980px) {
  .enquiry-layout {
    grid-template-columns: 1fr;
  }
}

/* ========== SETTINGS ========== */
.settings-tabs {
  display: flex;
  gap: 32px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}
.settings-tab {
  padding: 12px 0;
  color: rgba(27,20,15,0.6);
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  font-family: 'IBM Plex Sans', sans-serif;
}
.settings-tab:hover {
  color: var(--ink);
}
.settings-tab.active {
  color: var(--brass);
}
.settings-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: var(--brass);
}
.settings-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}
.settings-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Toggle Switch */
.permission-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.switch-label {
  font-size: 0.95rem;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(27,20,15,0.1);
  transition: .4s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
input:checked + .slider {
  background-color: var(--brass);
}
input:checked + .slider:before {
  transform: translateX(20px);
}

/* ========== ROLE CARDS ========== */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.role-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.role-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.role-card-header h4 {
  margin: 0;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1.1rem;
  color: var(--ink);
  font-weight: 600;
}
.role-card-desc {
  font-size: 0.85rem;
  color: rgba(27,20,15,0.6);
  margin-top: 0;
  margin-bottom: 24px;
  line-height: 1.5;
}
.role-permissions-list {
  background: var(--paper-dim);
  border-radius: 4px;
  padding: 16px;
  flex-grow: 1;
}
.permission-switch:last-child {
  margin-bottom: 0;
}

/* ========== PROFILE PAGE ========== */
.profile-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
}
.profile-avatar-large {
  width: 120px;
  height: 120px;
  background: var(--brass);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-family: 'Fraunces', serif;
  margin: 0 auto 16px auto;
  box-shadow: 0 4px 12px rgba(212,175,55,0.3);
}
@media (max-width: 768px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }
}

.profile-avatar-large img, .admin-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* ========== ENQUIRY DETAILS OVERRIDES ========== */
.enquiry-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; align-items: start; }
.enquiry-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 32px; }
@media (max-width: 900px) {
    .enquiry-layout, .enquiry-info-grid { grid-template-columns: 1fr; }
}

/* Laravel Pagination overriding to match Datatables Theme */
.pagination {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  justify-content: flex-end;
  gap: 5px;
}
.pagination .page-item .page-link {
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 12px;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.pagination .page-item .page-link:hover {
  background: rgba(212, 175, 55, 0.05);
  color: var(--brass);
  border-color: var(--brass);
}
.pagination .page-item.active .page-link {
  background-color: var(--brass);
  color: #fff;
  border-color: var(--brass);
}
.pagination .page-item.disabled .page-link {
  color: #aaa;
  pointer-events: none;
  background-color: #f9f9f9;
  border-color: var(--line);
}
