/* ==========================================================================
   🌿 FARMORA OFFICIAL — Backend Admin CSS (admin.css)
   ==========================================================================
   ดีไซน์ทันสมัย เรียบหรู ใช้งานง่าย ครอบคลุมทุกอุปกรณ์ (Responsive)
   ธีมสี: Farmora Forest Green (#006837, #004524) & Bright Lime (#8dc63f)
   ========================================================================== */

/* ── Fonts & Base Reset ── */
:root {
  /* 7 แม่สีอัตลักษณ์องค์กรของบริษัท Farmora (Official Brand CI Palette) */
  --primary-green:  #00A64C; /* เขียวสดใสหลัก */
  --dark-green:     #0C7B3B; /* เขียวเข้มหลัก */
  --accent-green:   #8EC64F; /* เขียวตองอ่อน */
  --brand-orange:   #FF6F22; /* ส้มผลผลิต */
  --brand-yellow:   #FFE327; /* เหลืองรวงข้าว */
  --brand-blue:     #009CFF; /* ฟ้าสายน้ำ */
  --brand-soil:     #371000; /* น้ำตาลดินเข้ม */

  --deep-sidebar:   #092615;
  --pale-green:     #e5f7eb;
  --light-bg:       #f4f7f4;
  --card-bg:        #ffffff;
  --text-main:      #212529;
  --text-muted:     #6c757d;
  --border-color:   #e0e6e1;
  --danger:         #dc3545;
  --danger-bg:      #ffeef0;
  --warning:        #FF6F22;
  --warning-bg:     #fff5e6;
  --info:           #009CFF;
  --info-bg:        #e6f5ff;
  --sidebar-w:      270px;
  --header-h:       68px;
  --radius-sm:      6px;
  --radius-md:      12px;
  --radius-lg:      18px;
  --shadow-sm:      0 2px 8px rgba(0, 45, 20, 0.05);
  --shadow-md:      0 8px 24px rgba(0, 104, 55, 0.12);
  --shadow-lg:      0 16px 36px rgba(0, 104, 55, 0.18);
  --transition:     0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Kanit', sans-serif;
  background-color: var(--light-bg);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ══════════════════════════════════════════════════════════════════
   1. SIDEBAR NAVIGATION
   ══════════════════════════════════════════════════════════════════ */
.admin-sidebar {
  width: var(--sidebar-w);
  background-color: var(--deep-sidebar);
  color: #ffffff;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 1100;
  transition: transform var(--transition);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
}

.sidebar-brand {
  height: var(--header-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
  background: white;
  padding: 4px;
}

.sidebar-brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.sidebar-brand-badge {
  font-size: 11px;
  background: var(--accent-green);
  color: #0b2b14;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.sidebar-menu {
  list-style: none;
  padding: 16px 12px;
  flex: 1;
  overflow-y: auto;
}

.sidebar-heading {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8fa895;
  padding: 14px 14px 6px;
  font-weight: 600;
}

.sidebar-menu li {
  margin-bottom: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 10px;
  color: #cfded2;
  font-size: 14.5px;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
}

.sidebar-link i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  color: #8fa895;
  transition: color var(--transition);
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sidebar-link:hover i {
  color: var(--accent-green);
}

.sidebar-link.active {
  background: linear-gradient(135deg, var(--primary-green), #00884c);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 104, 55, 0.35);
}

.sidebar-link.active i {
  color: #ffffff;
}

.sidebar-badge {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.18);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}

.sidebar-footer {
  padding: 16px 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.15);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.sidebar-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-green), var(--primary-green));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.sidebar-user-info {
  flex: 1;
  overflow: hidden;
}

.sidebar-user-name {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 12px;
  color: #8fa895;
}

.btn-view-site {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--transition);
}

.btn-view-site:hover {
  background: var(--accent-green);
  color: #0b2b14;
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════════
   2. MAIN CONTENT AREA
   ══════════════════════════════════════════════════════════════════ */
.admin-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: calc(100% - var(--sidebar-w));
}

.admin-header {
  height: var(--header-h);
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-mobile-sidebar {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--primary-green);
  cursor: pointer;
}

.header-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark-green);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-body {
  padding: 32px;
  flex: 1;
}

/* ══════════════════════════════════════════════════════════════════
   3. TAB PANES & CARDS
   ══════════════════════════════════════════════════════════════════ */
.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

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

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

.stat-card {
  background: var(--card-bg);
  padding: 22px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 18px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-icon-wrap.green  { background: #e8f5e9; color: #2e7d32; }
.stat-icon-wrap.blue   { background: #e3f2fd; color: #1565c0; }
.stat-icon-wrap.purple { background: #f3e5f5; color: #7b1fa2; }
.stat-icon-wrap.orange { background: #fff3e0; color: #e65100; }
.stat-icon-wrap.lime   { background: #f0fcd6; color: #5a7d08; }

.stat-info .label {
  font-size: 13.5px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.stat-info .value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
  overflow: hidden;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark-green);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-body {
  padding: 24px;
}

/* ══════════════════════════════════════════════════════════════════
   4. BUTTONS & CONTROLS
   ══════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-green), #00884c);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(0, 104, 55, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #007a3f, #009d57);
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(0, 104, 55, 0.35);
  color: white;
}

.btn-secondary {
  background: #f1f3f1;
  color: #333;
  border-color: #ddd;
}

.btn-secondary:hover {
  background: #e4e7e4;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: #f8faf8;
  border-color: var(--primary-green);
  color: var(--primary-green);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 6px;
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
}

/* ══════════════════════════════════════════════════════════════════
   5. FILTER & SEARCH TOOLBAR
   ══════════════════════════════════════════════════════════════════ */
.toolbar-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.toolbar-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1;
}

.search-input-wrap {
  position: relative;
  min-width: 240px;
}

.search-input-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  background: white;
  outline: none;
  transition: border-color var(--transition);
}

.search-input:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(0, 104, 55, 0.12);
}

.filter-select {
  padding: 9px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  background: white;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}

.filter-select:focus {
  border-color: var(--primary-green);
}

/* ══════════════════════════════════════════════════════════════════
   6. DATA TABLES
   ══════════════════════════════════════════════════════════════════ */
.table-responsive {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
  background: white;
}

.admin-table th {
  background: #f8faf8;
  padding: 14px 18px;
  font-weight: 600;
  color: var(--dark-green);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.admin-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background-color: #fafdfa;
}

.tbl-thumb {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  display: block;
}

.tbl-thumb-wide {
  width: 80px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  display: block;
}

.tbl-title-main {
  font-weight: 600;
  color: var(--text-main);
  display: block;
  margin-bottom: 2px;
}

.tbl-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-green  { background: #e8f5e9; color: #1b5e20; }
.badge-blue   { background: #e3f2fd; color: #0d47a1; }
.badge-orange { background: #fff3e0; color: #e65100; }
.badge-purple { background: #f3e5f5; color: #4a148c; }
.badge-red    { background: #ffebee; color: #b71c1c; }
.badge-gray   { background: #f0f0f0; color: #555555; }

.tbl-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ══════════════════════════════════════════════════════════════════
   7. HERO SLIDES MANAGEMENT (SPECIAL)
   ══════════════════════════════════════════════════════════════════ */
.slides-card-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.slide-item-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  gap: 24px;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.slide-item-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #b2dfb2;
}

.slide-dual-preview {
  position: relative;
  width: 220px;
  height: 130px;
  border-radius: 12px;
  overflow: hidden;
  background: #eef2ee;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-dual-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(10px);
  transform: scale(1.15);
  opacity: 0.65;
}

.slide-dual-fg {
  position: relative;
  z-index: 2;
  width: 130px;
  height: 95px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  border: 2px solid white;
}

.slide-item-content {
  flex: 1;
}

.slide-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.slide-item-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark-green);
  margin-bottom: 6px;
}

.slide-item-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.slide-item-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════════
   8. MEDIA GALLERY GRID
   ══════════════════════════════════════════════════════════════════ */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}

.media-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.media-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #b2dfb2;
}

.media-thumb-wrap {
  width: 100%;
  height: 140px;
  background: #f8faf8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.media-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.media-card:hover .media-thumb-wrap img {
  transform: scale(1.05);
}

.media-details {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.media-filename {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  word-break: break-all;
  margin-bottom: 4px;
}

.media-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.media-actions {
  display: flex;
  gap: 6px;
}

.dropzone {
  border: 2px dashed #a5d6a7;
  background: #f4faf4;
  border-radius: var(--radius-md);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 24px;
}

.dropzone:hover, .dropzone.dragover {
  background: #e8f5e9;
  border-color: var(--primary-green);
}

.dropzone i {
  font-size: 36px;
  color: var(--primary-green);
  margin-bottom: 10px;
}

/* ══════════════════════════════════════════════════════════════════
   9. MODALS & FORMS
   ══════════════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

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

.modal-card {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-card.modal-lg {
  max-width: 820px;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 20px 26px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--dark-green);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--danger);
}

.modal-body {
  padding: 24px 26px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 26px;
  border-top: 1px solid var(--border-color);
  background: #fbfcfb;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--dark-green);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  background: white;
  outline: none;
  transition: all var(--transition);
}

.form-control:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(0, 104, 55, 0.12);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.img-preview-box {
  width: 100%;
  height: 140px;
  background: #f8faf8;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 8px;
}

.img-preview-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ══════════════════════════════════════════════════════════════════
   10. AUTH OVERLAY
   ══════════════════════════════════════════════════════════════════ */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(9, 33, 18, 0.95), rgba(0, 104, 55, 0.95)),
              url('../frontend/images/hero1.jpg') center/cover;
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  padding: 40px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  text-align: center;
  animation: modalPop 0.3s ease;
}

.auth-logo {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  background: #e8f5e9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 6px 18px rgba(0, 104, 55, 0.15);
}

.auth-logo img {
  width: 52px;
  height: auto;
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark-green);
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.auth-quick-btn {
  width: 100%;
  padding: 13px;
  font-size: 15px;
  border-radius: 10px;
  margin-bottom: 18px;
}

.auth-back-link {
  font-size: 13.5px;
  color: var(--primary-green);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition);
}

.auth-back-link:hover {
  text-decoration: underline;
}

/* ══════════════════════════════════════════════════════════════════
   11. TOAST NOTIFICATION
   ══════════════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2500;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: white;
  border-left: 5px solid var(--primary-green);
  border-radius: 8px;
  padding: 14px 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.3s ease;
  min-width: 280px;
}

.toast.error {
  border-left-color: var(--danger);
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════════
   12. RESPONSIVE DESIGN
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0;
    width: 100%;
  }
  .btn-mobile-sidebar {
    display: block;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .slide-item-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .slide-dual-preview {
    width: 100%;
    height: 180px;
  }
}

@media (max-width: 600px) {
  .admin-body {
    padding: 20px 16px;
  }
  .admin-header {
    padding: 0 16px;
  }
  .header-title {
    font-size: 18px;
  }
}

/* ══════════════════════════════════════════════════════════════════
   13. THEME & CI COLORS CUSTOMIZATION (UX/UI THEME)
   ══════════════════════════════════════════════════════════════════ */
.ci-palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.ci-swatch-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  cursor: pointer;
  text-align: center;
}

.ci-swatch-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-green);
}

.ci-swatch-color {
  height: 70px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.ci-swatch-info {
  padding: 10px 8px;
}

.ci-swatch-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ci-swatch-hex {
  font-size: 11.5px;
  color: var(--text-muted);
  font-family: monospace;
}

/* Preset Cards */
.theme-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.theme-preset-card {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  background: #ffffff;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.theme-preset-card:hover {
  border-color: var(--primary-green);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.theme-preset-card.active {
  border-color: var(--primary-green);
  background: #f0faf2;
  box-shadow: 0 0 0 3px rgba(0, 166, 76, 0.18);
}

.preset-stripes {
  display: flex;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.preset-stripe {
  flex: 1;
}

.preset-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
}

.preset-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Color Controls */
.color-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.color-input-item {
  background: #fbfdfb;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.color-native-input {
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.color-native-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-native-input::-webkit-color-swatch {
  border: 2px solid #ffffff;
  border-radius: 10px;
}

.color-input-details {
  flex: 1;
}

.color-input-details label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--dark-green);
  display: block;
  margin-bottom: 4px;
}

.color-hex-text {
  font-family: monospace;
  font-size: 13px;
  padding: 4px 8px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #ffffff;
  width: 90px;
  text-transform: uppercase;
}

/* Option Pill Buttons */
.option-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.option-pill {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: #ffffff;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.option-pill:hover {
  border-color: var(--primary-green);
  color: var(--primary-green);
}

.option-pill.active {
  background: var(--primary-green);
  border-color: var(--primary-green);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(0, 166, 76, 0.25);
}

/* Live Preview Widget */
.theme-preview-box {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.theme-preview-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theme-preview-body {
  padding: 24px;
  background: var(--light-bg);
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════════════
   14. IMAGE UPLOAD & MEDIA PICKER CONTROLS
   ══════════════════════════════════════════════════════════════════ */
.upload-action-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.upload-btn-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  margin: 0;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--primary-green);
  color: var(--primary-green);
  background: #f0faf3;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.upload-btn-label:hover {
  background: var(--primary-green);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 166, 76, 0.2);
}

.btn-media-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  background: #ffffff;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.btn-media-picker:hover {
  border-color: var(--primary-green);
  color: var(--primary-green);
  background: #f8faf8;
}

/* Media Picker Modal */
.media-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px;
}

.media-picker-item {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  background: #ffffff;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.media-picker-item:hover {
  border-color: var(--primary-green);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 104, 55, 0.15);
}

.media-picker-thumb {
  width: 100%;
  height: 100px;
  background: #f4f6f4;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.media-picker-item:hover .media-picker-thumb img {
  transform: scale(1.05);
}

.media-picker-info {
  padding: 8px 10px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.media-picker-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-picker-size {
  font-size: 10.5px;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════════
   13. ORDERS MANAGEMENT & INVOICE PRINTING
   ══════════════════════════════════════════════════════════════════ */
.order-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
}

.order-status-badge.pending {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.order-status-badge.paid {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.order-status-badge.shipping {
  background-color: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

.order-status-badge.completed {
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.order-status-badge.cancelled {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.order-items-preview {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  max-width: 280px;
}

.order-items-preview span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.invoice-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 20px;
}

.invoice-logo img {
  height: 50px;
  object-fit: contain;
}

.invoice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.invoice-info-group h4 {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.invoice-info-group p {
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
  color: var(--text-main);
}

@media print {
  body * {
    visibility: hidden;
  }
  #orderDetailModal, #orderDetailModal * {
    visibility: visible;
  }
  #orderDetailModal {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: white !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    overflow: visible !important;
  }
  .modal-card {
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 20px !important;
  }
  .modal-header, .modal-footer, .no-print {
    display: none !important;
  }
}


