/* ==========================================================================
   SWAN GROUP | سوان قروب - Admin Dashboard Styles
   Clean, Elegant, Luxury Dark Management Interface
   ========================================================================== */

.admin-layout {
  display: flex;
  min-height: 100vh;
  background: #0d0a08;
}

/* Sidebar */
.admin-sidebar {
  width: 270px;
  background: #14100d;
  border-left: 1px solid rgba(197, 160, 89, 0.2);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 100;
  transition: all 0.3s ease;
}

.admin-brand {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(197, 160, 89, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-brand h2 {
  font-size: 1.15rem;
  color: #f5f2ed;
  font-weight: 700;
}

.admin-brand span {
  font-size: 0.72rem;
  color: #c5a059;
  display: block;
}

.admin-menu {
  padding: 20px 12px;
  flex-grow: 1;
  overflow-y: auto;
}

.admin-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #b8aba0;
  border-radius: 8px;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.admin-menu-item i {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.admin-menu-item:hover,
.admin-menu-item.active {
  background: rgba(197, 160, 89, 0.14);
  color: #e6c887;
  border-right: 3px solid #c5a059;
}

.admin-sidebar-footer {
  padding: 18px 16px;
  border-top: 1px solid rgba(197, 160, 89, 0.15);
}

/* Main Content Area */
.admin-main {
  flex-grow: 1;
  margin-right: 270px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar */
.admin-topbar {
  background: #14100d;
  border-bottom: 1px solid rgba(197, 160, 89, 0.2);
  padding: 14px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.admin-topbar-title h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f5f2ed;
}

.admin-user-badge {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-user-info {
  text-align: left;
}

.admin-user-info span {
  display: block;
  font-size: 0.85rem;
  color: #e6c887;
  font-weight: 600;
}

.admin-user-info small {
  font-size: 0.75rem;
  color: #b8aba0;
}

/* Page View Sections */
.admin-body {
  padding: 30px;
  flex-grow: 1;
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: #171310;
  border: 1px solid rgba(197, 160, 89, 0.2);
  border-radius: 12px;
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-info h3 {
  font-size: 2.1rem;
  font-weight: 800;
  color: #e6c887;
  margin-bottom: 4px;
}

.stat-info span {
  font-size: 0.88rem;
  color: #b8aba0;
}

.stat-icon {
  width: 52px;
  height: 52px;
  background: rgba(197, 160, 89, 0.12);
  border: 1px solid rgba(197, 160, 89, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #c5a059;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  background: #171310;
  border: 1px solid rgba(197, 160, 89, 0.2);
  border-radius: 12px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.92rem;
}

.admin-table th {
  background: #221c17;
  color: #e6c887;
  padding: 14px 18px;
  font-weight: 600;
  border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

.admin-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #f5f2ed;
}

.admin-table tr:hover {
  background: rgba(197, 160, 89, 0.04);
}

.badge-status {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-active { background: rgba(40, 167, 69, 0.2); color: #28a745; border: 1px solid #28a745; }
.badge-inactive { background: rgba(220, 53, 69, 0.2); color: #dc3545; border: 1px solid #dc3545; }
.badge-coming-soon { background: rgba(245, 158, 11, 0.2); color: #f59e0b; border: 1px solid #f59e0b; }
.badge-new { background: rgba(23, 162, 184, 0.2); color: #17a2b8; border: 1px solid #17a2b8; }


/* Action Buttons */
.btn-action {
  background: #221c17;
  border: 1px solid rgba(197, 160, 89, 0.2);
  color: #f5f2ed;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action:hover {
  background: #c5a059;
  color: #100d0b;
}

.btn-action.delete:hover {
  background: #dc3545;
  color: #fff;
  border-color: #dc3545;
}

/* Modals */
.admin-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 15px;
  overflow-y: auto;
}

.admin-modal.open {
  display: flex;
}

.modal-card {
  background: #171310;
  border: 1px solid rgba(197, 160, 89, 0.35);
  border-radius: 14px;
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
  position: relative;
  overflow: hidden;
}

.modal-card form {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 0;
  overflow: hidden;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(197, 160, 89, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: #1c1713;
}

.modal-header h3 {
  font-size: 1.25rem;
  color: #e6c887;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #b8aba0;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  color: #fff;
  transform: scale(1.1);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex-grow: 1;
  min-height: 0;
  max-height: calc(88vh - 140px);
}

/* Modal Custom Scrollbar */
.modal-body::-webkit-scrollbar {
  width: 8px;
}
.modal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.modal-body::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: 4px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(197, 160, 89, 0.18);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
  background: #1c1713;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
}

/* Image Picker Input Field Component */
.image-picker-field {
  display: flex;
  gap: 10px;
  align-items: center;
}

.image-picker-field .form-control {
  flex-grow: 1;
}

.btn-open-gallery-picker {
  background: #221c17;
  border: 1px solid rgba(197, 160, 89, 0.3);
  color: #e6c887;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.88rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-open-gallery-picker:hover {
  background: #c5a059;
  color: #100d0b;
}

/* ==================== SWAN GALLERY & PICTURE/ STYLING ==================== */
.gallery-management-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(197, 160, 89, 0.15);
}

.gallery-header-info h2 {
  font-size: 1.45rem;
  color: #fff;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
}

.gallery-header-info p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.gallery-sub-nav {
  display: flex;
  gap: 8px;
  background: #14100d;
  padding: 5px;
  border-radius: 10px;
  border: 1px solid rgba(197, 160, 89, 0.2);
}

.gallery-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.gallery-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.gallery-tab-btn.active {
  background: var(--gold-color);
  color: #0c0a09;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(197, 160, 89, 0.25);
}

.gallery-tab-btn .badge-count {
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  padding: 1px 7px;
  border-radius: 12px;
  font-size: 0.75rem;
}

.gallery-tab-btn.active .badge-count {
  background: #0c0a09;
  color: var(--gold-light);
}

/* Gallery Toolbar */
.gallery-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.gallery-toolbar-title h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #fff;
}

.gallery-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gallery-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #14100d;
  border: 1px solid rgba(197, 160, 89, 0.25);
  border-radius: 8px;
  padding: 4px 12px;
  transition: all 0.2s;
}

.gallery-search-box:focus-within {
  border-color: var(--gold-color);
  box-shadow: 0 0 0 2px rgba(197, 160, 89, 0.15);
}

.gallery-search-box i {
  color: var(--gold-light);
  font-size: 0.85rem;
}

.gallery-search-box input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
  width: 170px;
}

/* Picture Gallery Grid */
.picture-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.picture-figure {
  margin: 0;
  background: #171310;
  border: 1px solid rgba(197, 160, 89, 0.2);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
}

.picture-figure:hover {
  border-color: var(--gold-color);
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.figure-thumb {
  height: 160px;
  background: #0f0c0a;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}

.figure-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.picture-figure:hover .figure-thumb img {
  transform: scale(1.06);
}

.figure-caption {
  padding: 10px 12px;
  background: #14100d;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.figure-name {
  font-size: 0.78rem;
  color: #f5f2ed;
  direction: ltr;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: monospace;
}

.figure-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.figure-actions {
  padding: 8px 12px;
  background: #100d0a;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.figure-actions button {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(197, 160, 89, 0.25);
  color: var(--gold-light);
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 0.76rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.figure-actions button:hover {
  background: var(--gold-color);
  color: #0c0a09;
}

.figure-actions button.btn-del-fig {
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.figure-actions button.btn-del-fig:hover {
  background: #ef4444;
  color: #fff;
}

/* Swan Upload Box (Matching index.php with Swan style) */
.gallery-upload-card {
  max-width: 800px;
  margin: 0 auto;
}

.swan-upload-box {
  border: 2px dashed var(--gold-color);
  background: rgba(197, 160, 89, 0.04);
  border-radius: 14px;
  padding: 45px 25px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
}

.swan-upload-box.drag-over {
  background: rgba(197, 160, 89, 0.12);
  border-color: var(--gold-light);
  transform: scale(1.01);
}

.upload-box-icon {
  font-size: 3.2rem;
  color: var(--gold-light);
  margin-bottom: 16px;
  display: block;
}

.choose-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gold-color);
  color: #0c0a09;
  border-radius: 10px;
  padding: 13px 28px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(197, 160, 89, 0.25);
}

.choose-btn:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(197, 160, 89, 0.35);
}

.files-summary-text {
  color: var(--gold-light);
  margin: 16px 0;
  min-height: 24px;
  font-size: 0.9rem;
  word-break: break-all;
}

.selected-previews-grid {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 18px 0;
  max-height: 180px;
  overflow-y: auto;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
}

.selected-preview-item {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--gold-color);
  position: relative;
}

.selected-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.submit-upload-btn {
  border: 0;
  background: #16a34a;
  color: #fff;
  border-radius: 10px;
  padding: 13px 32px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.98rem;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);
}

.submit-upload-btn:hover {
  background: #15803d;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4);
}

/* Notices */
.notice {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  line-height: 1.7;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.notice.success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
}

.notice.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

/* Guide section */
.gallery-guide-card {
  max-width: 900px;
  margin: 0 auto;
}

.guide-hero {
  text-align: center;
  padding: 25px 15px 35px;
  border-bottom: 1px solid rgba(197, 160, 89, 0.15);
  margin-bottom: 30px;
}

.guide-hero-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(197, 160, 89, 0.15);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 15px;
}

.guide-hero h2 {
  font-size: 1.6rem;
  color: var(--gold-light);
  margin: 0 0 10px;
}

.guide-hero p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  max-width: 650px;
  margin: 0 auto 20px;
}

.guide-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.guide-step-card {
  background: #14100d;
  border: 1px solid rgba(197, 160, 89, 0.2);
  border-radius: 12px;
  padding: 22px;
  position: relative;
}

.guide-step-card .step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold-color);
  color: #0c0a09;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.guide-step-card h4 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1.05rem;
}

.guide-step-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

/* ==================== GALLERY-ONLY SELECTOR COMPONENT (FOR OFFERS & COMPANIES) ==================== */
.gallery-selected-box {
  background: #14100d;
  border: 1px dashed rgba(197, 160, 89, 0.35);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.25s ease;
  min-height: 80px;
}

.gallery-selected-box:hover {
  border-color: var(--gold-color);
  background: rgba(197, 160, 89, 0.03);
}

.gallery-selected-empty {
  padding: 22px 15px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--gold-light);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.gallery-selected-empty:hover {
  color: #fff;
  transform: translateY(-1px);
}

.gallery-selected-empty i {
  font-size: 1.6rem;
  color: var(--gold-color);
}

.gallery-selected-content {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
}

.gallery-selected-thumb {
  width: 70px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--gold-color);
  background: #000;
  flex-shrink: 0;
}

.gallery-selected-meta {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.gallery-selected-name {
  font-size: 0.8rem;
  color: #f5f2ed;
  direction: ltr;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: monospace;
}

.gallery-selected-btns {
  display: flex;
  gap: 8px;
}

.gallery-selected-btns button {
  padding: 4px 10px;
  font-size: 0.8rem;
}

/* Gallery Picker Modal Grid */
.gallery-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  max-height: 55vh;
  overflow-y: auto;
  padding: 8px 4px;
}

.picker-item-card {
  background: #171310;
  border: 1px solid rgba(197, 160, 89, 0.25);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.picker-item-card:hover {
  transform: scale(1.03);
  border-color: var(--gold-color);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.picker-item-thumb {
  height: 105px;
  background: #0a0807;
  overflow: hidden;
  position: relative;
}

.picker-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.picker-item-title {
  padding: 6px 8px;
  font-size: 0.72rem;
  color: #e5e0d8;
  direction: ltr;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #14100d;
}

/* Ensure picker modal and preview modal are always on top of offer/company modals */
.admin-modal.modal-above {
  z-index: 100005 !important;
}

#modal-image-preview {
  z-index: 100010 !important;
}

.picker-upload-banner {
  background: linear-gradient(135deg, rgba(197, 160, 89, 0.12) 0%, rgba(20, 16, 13, 0.8) 100%);
  border: 1px dashed var(--gold-color);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 12px;
}

/* ==================== MOBILE RESPONSIVENESS ==================== */
.mobile-menu-btn {
  display: none;
  background: #1c1713;
  border: 1px solid rgba(197, 160, 89, 0.3);
  color: var(--gold-light);
  width: 42px;
  height: 42px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.mobile-menu-btn:hover {
  background: var(--gold-color);
  color: #0c0a09;
}

.sidebar-close-btn {
  display: none;
  background: transparent;
  border: 1px solid rgba(197, 160, 89, 0.3);
  color: var(--gold-light);
  width: 34px;
  height: 34px;
  border-radius: 6px;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.sidebar-close-btn:hover {
  background: #dc3545;
  color: #fff;
  border-color: #dc3545;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 999;
}

.sidebar-backdrop.active {
  display: block;
}

@media (max-width: 992px) {
  .mobile-menu-btn {
    display: inline-flex;
  }
  
  .sidebar-close-btn {
    display: inline-flex;
  }

  .admin-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    right: -290px;
    width: 280px;
    z-index: 1001;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.85);
  }

  .admin-sidebar.open {
    right: 0 !important;
  }

  .admin-main {
    margin-right: 0 !important;
    width: 100% !important;
  }

  .admin-topbar {
    padding: 12px 16px;
    gap: 10px;
  }

  .admin-topbar-title h1 {
    font-size: 1.15rem;
  }

  .admin-user-badge {
    gap: 8px;
  }

  .admin-user-info span {
    font-size: 0.8rem;
  }

  .admin-body {
    padding: 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-info h3 {
    font-size: 1.4rem;
  }

  .gallery-management-header {
    flex-direction: column;
    align-items: stretch;
  }

  .gallery-sub-nav {
    overflow-x: auto;
  }

  .gallery-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .gallery-search-box input {
    width: 100%;
  }

  .picture-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  .figure-thumb {
    height: 120px;
  }

  .figure-actions {
    flex-wrap: wrap;
  }

  .figure-actions button {
    flex: 1;
    justify-content: center;
  }

  .modal-card {
    max-height: 94vh;
  }
}

@media (max-width: 576px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .admin-topbar {
    flex-wrap: wrap;
  }

  .gallery-selected-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .gallery-selected-thumb {
    width: 100%;
    height: 120px;
  }
}

/* ==================== SWAN LUXURY DATEPICKER MODAL (ADMIN) ==================== */
.swan-datepicker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 6, 5, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.swan-datepicker-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.swan-datepicker-modal {
  background: linear-gradient(145deg, #191410 0%, #110d0a 100%);
  border: 1px solid rgba(197, 160, 89, 0.4);
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(197, 160, 89, 0.15);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  direction: rtl;
}

.swan-datepicker-overlay.open .swan-datepicker-modal {
  transform: scale(1) translateY(0);
}

.swan-datepicker-header {
  padding: 20px 24px 16px;
  background: rgba(197, 160, 89, 0.08);
  border-bottom: 1px solid rgba(197, 160, 89, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.swan-datepicker-header h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.swan-datepicker-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.swan-datepicker-close:hover {
  background: rgba(220, 53, 69, 0.2);
  color: #ff6b6b;
}

.swan-datepicker-body {
  padding: 22px 24px;
}

.swan-datepicker-selectors {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.swan-datepicker-selectors select {
  background: #0d0a08;
  border: 1px solid rgba(197, 160, 89, 0.3);
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
}

.swan-datepicker-selectors select:focus {
  border-color: var(--gold-color);
  box-shadow: 0 0 0 2px rgba(197, 160, 89, 0.2);
}

.swan-datepicker-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 10px;
  font-size: 0.8rem;
  color: var(--gold-light);
  font-weight: 700;
}

.swan-datepicker-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.swan-dp-day-btn {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  color: #ddd;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-family: inherit;
}

.swan-dp-day-btn:hover:not(.disabled) {
  background: rgba(197, 160, 89, 0.2);
  border-color: var(--gold-light);
  color: #fff;
  transform: scale(1.08);
}

.swan-dp-day-btn.selected {
  background: var(--gold-gradient) !important;
  color: #100d0b !important;
  font-weight: 800;
  border-color: transparent;
  box-shadow: 0 0 14px rgba(197, 160, 89, 0.5);
}

.swan-dp-day-btn.today {
  border-color: var(--gold-color);
  font-weight: 700;
}

.swan-dp-day-btn.empty {
  opacity: 0;
  pointer-events: none;
  cursor: default;
}

.swan-datepicker-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid rgba(197, 160, 89, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.swan-dp-selected-display {
  font-size: 0.88rem;
  color: var(--gold-light);
  font-weight: 600;
}

.swan-date-input-trigger {
  cursor: pointer !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23c5a059' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: left 14px center !important;
  padding-left: 42px !important;
}
