/* ==========================================
   STHUTHI FASHION STORE ADMIN DASHBOARD STYLES (admin.css)
   ========================================== */

:root {
  --primary-color: #d11243; /* Sthuthi Pink Accent */
  --primary-hover: #b00f35;
  --dark-sidebar: #690150; /* Dark Navy Slate */
  --dark-text: #2b303a;
  --muted-text: #8b92a0;
  --bg-light: #f3f5f9;
  --bg-white: #ffffff;
  --border-light: #e5e8ed;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(16, 22, 38, 0.06);
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

body {
  font-family: var(--font-body);
  color: var(--dark-text);
  background-color: var(--bg-light);
  line-height: 1.5;
  overflow-x: hidden;
}

/* 1. ADMIN CONTAINER GRID */
.admin-container {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 100vh;
}

/* Sidebar Branding & Sticky scroll */
.admin-sidebar {
  background-color: var(--dark-sidebar);
  color: #cdd1da;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  border-right: 1px solid rgba(255,255,255,0.05);
}

.admin-sidebar::-webkit-scrollbar {
  width: 5px;
}
.admin-sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
.admin-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* Logo Box */
.admin-logo-box {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.crown-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #f1c40f, #e67e22);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 20px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 6px rgba(230, 126, 34, 0.4);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-main {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 19px;
  color: var(--bg-white);
  letter-spacing: 1px;
  line-height: 1.1;
}

.logo-sub {
  font-size: 9px;
  font-weight: 600;
  color: #f1c40f;
  letter-spacing: 1.5px;
}

/* Sidebar Menu navigation */
.sidebar-menu {
  list-style: none;
  padding: 15px 0;
}

.menu-section-header {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff; opacity: 0.9; font-weight: 800;
  letter-spacing: 1px;
  padding: 15px 24px 8px 24px;
  text-transform: uppercase;
}

.sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  color: #ffd1dc;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-smooth);
  border-left: 3px solid transparent;
}

.sidebar-menu li a i {
  font-size: 15px;
  width: 18px;
}

.sidebar-menu li.active a {
  background-color: #ffffff;
  color: #690150 !important;
  border-left-color: #690150;
  font-weight: 700;
}

.sidebar-menu li a:hover:not(.active a) {
  color: #690150 !important;
  background-color: #ffd1dc;
}

/* 2. ADMIN HEADER */
.admin-main {
  display: flex;
  flex-direction: column;
}

.admin-header {
  background-color: var(--bg-white);
  height: 70px;
  padding: 0 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-grow: 0.5;
}

.menu-toggle-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--muted-text);
  display: none;
}

.search-input-box {
  position: relative;
  width: 100%;
  max-width: 450px;
}

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

.search-input-box input {
  width: 100%;
  padding: 9px 15px 9px 40px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 13.5px;
  outline: none;
  background-color: #fafbfc;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.action-icon-badge {
  position: relative;
  font-size: 18px;
  color: var(--muted-text);
  cursor: pointer;
}

.badge-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background-color: var(--primary-color);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-profile-dropdown {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border-left: 1px solid var(--border-light);
  padding-left: 20px;
}

.admin-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-light);
}

.profile-details-info {
  display: flex;
  flex-direction: column;
}

.prof-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--dark-text);
}

.prof-role {
  font-size: 10px;
  color: var(--muted-text);
}

/* 3. PANELS ENGINE */
.admin-panels {
  padding: 30px;
  flex-grow: 1;
}

.panel {
  display: none;
}

.panel.active {
  display: block !important;
  animation: fadeIn 0.2s ease;
}

/* Breadcrumbs bar */
.panel-breadcrumbs {
  font-size: 12px;
  color: var(--muted-text);
  margin-bottom: 12px;
  font-weight: 500;
}

.bread-root {
  color: var(--primary-color);
  text-decoration: none;
}

.bread-active {
  color: var(--dark-text);
}

.panel-breadcrumbs i {
  font-size: 9px;
  margin: 0 5px;
}

/* Section Title layout */
.section-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.section-title-bar h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 24px;
  color: var(--dark-text);
}

.btn-action-primary-main {
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn-action-primary-main:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-back {
  background-color: var(--bg-white);
  color: var(--dark-text);
  border: 1px solid var(--border-light);
  padding: 8px 15px;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 4. FILTER CONTROLS BAR */
.filter-controls-bar {
  background-color: var(--bg-white);
  padding: 15px 20px;
  border-radius: 8px 8px 0 0;
  border: 1px solid var(--border-light);
  border-bottom: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.filter-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bulk-dropdown,
.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  background-color: #fafbfc;
  cursor: pointer;
}

.btn-filter-action {
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  padding: 8px 15px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-search-box {
  position: relative;
  width: 250px;
}

.filter-search-box input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}

.filter-search-box i {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: var(--muted-text);
  font-size: 13px;
}

/* 5. DYNAMIC HIGH FIDELITY STH-TABLES */
.table-container {
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.sth-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.sth-table th {
  background-color: #fafbfc;
  color: #4a505c;
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-light);
  text-transform: uppercase;
  font-size: 11.5px;
  letter-spacing: 0.5px;
}

.sth-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.sth-table tbody tr:hover {
  background-color: #f7fafc;
}

/* Checkbox alignment */
.sth-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Image Thumbnails */
.sth-img-cell {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 2px;
  background-color: #fff;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-active, .status-delivered {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.status-inactive, .status-pending {
  background-color: #ffebee;
  color: #c62828;
}

/* Action icons */
.action-icon-btn-edit {
  background: none;
  border: 1px solid var(--border-light);
  width: 32px;
  height: 32px;
  border-radius: 4px;
  color: var(--primary-color);
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-right: 6px;
  transition: var(--transition-smooth);
}

.action-icon-btn-edit:hover {
  background-color: rgba(209, 18, 67, 0.05);
}

.action-icon-btn-delete {
  background: none;
  border: 1px solid var(--border-light);
  width: 32px;
  height: 32px;
  border-radius: 4px;
  color: #e74c3c;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition-smooth);
}

.action-icon-btn-delete:hover {
  background-color: #fde8e8;
}

/* Table Footer Controls */
.table-footer-controls {
  padding: 15px 20px;
  background-color: var(--bg-white);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted-text);
  font-weight: 500;
}

.table-pagination {
  display: flex;
  gap: 5px;
}

.table-pagination button {
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  color: var(--dark-text);
  width: 32px;
  height: 32px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.table-pagination button.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.table-pagination button:hover:not(.active) {
  background-color: #fafbfc;
}

/* 6. FORM CARD LAYOUT (Screen 1 & 3) */
.form-container-card {
  background-color: var(--bg-white);
  padding: 30px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.form-container-card h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 25px;
  border-bottom: 1.5px solid var(--border-light);
  padding-bottom: 10px;
}

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

.form-group-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.form-group-field label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--dark-text);
}

.form-group-field .required {
  color: var(--primary-color);
}

.form-group-field input,
.form-group-field select,
.form-group-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  outline: none;
  font-family: var(--font-body);
  font-size: 13.5px;
  background-color: #fff;
  transition: var(--transition-smooth);
}

.form-group-field input:focus,
.form-group-field select:focus,
.form-group-field textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(209, 18, 67, 0.08);
}

.form-group-field textarea {
  height: 100px;
  resize: vertical;
}

.form-actions-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
  margin-top: 30px;
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
}

.btn-form-reset {
  background-color: var(--bg-white);
  color: var(--dark-text);
  border: 1px solid var(--border-light);
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-form-reset:hover {
  background-color: #f7fafc;
}

.btn-form-submit-secondary {
  background-color: #fafbfc;
  color: var(--dark-text);
  border: 1px solid var(--border-light);
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-form-submit-secondary:hover {
  background-color: #eef1f6;
}

.btn-form-submit-main {
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 700;
  font-family: var(--font-heading);
  font-size: 13.5px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(209, 18, 67, 0.2);
  transition: var(--transition-smooth);
}

.btn-form-submit-main:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

/* 7. DASHBOARD STATS STYLES */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background-color: var(--bg-white);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid var(--border-light);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  color: #fff;
}

.bg-green { background-color: #2ecc71; box-shadow: 0 4px 10px rgba(46, 204, 113, 0.2); }
.bg-blue { background-color: var(--primary-color); box-shadow: 0 4px 10px rgba(209, 18, 67, 0.2); }
.bg-orange { background-color: #e67e22; box-shadow: 0 4px 10px rgba(230, 126, 34, 0.2); }
.bg-purple { background-color: #9b59b6; box-shadow: 0 4px 10px rgba(155, 89, 182, 0.2); }

.stat-details .label {
  font-size: 11px;
  color: var(--muted-text);
  font-weight: 600;
  text-transform: uppercase;
}

.stat-details h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--dark-text);
  margin-top: 2px;
}

.dashboard-details {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 30px;
}

.details-card {
  background-color: var(--bg-white);
  padding: 25px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.details-card h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--dark-text);
  margin-bottom: 5px;
}

.details-card p {
  font-size: 12.5px;
  color: var(--muted-text);
  margin-bottom: 25px;
}

/* Custom CSS Chart */
.chart-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 220px;
  padding-top: 20px;
  border-bottom: 2px solid var(--border-light);
}

.chart-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-grow: 1;
}

.chart-bar {
  width: 32px;
  background-color: var(--primary-color);
  border-radius: 4px 4px 0 0;
  transition: height 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 2px 5px rgba(209, 18, 67, 0.3);
}

#current-month-bar {
  background-color: #2ecc71;
  box-shadow: 0 2px 5px rgba(46, 204, 113, 0.3);
}

.chart-bar-item span {
  font-size: 11px;
  color: var(--muted-text);
  margin-top: 10px;
}

/* Category Bars */
.category-bars {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.cat-bar-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cat-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
}

.progress-track {
  width: 100%;
  height: 8px;
  background-color: var(--bg-light);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.fill-pink { background-color: #d11243; }
.fill-teal { background-color: #00a8b5; }
.fill-blue { background-color: #0056b3; }
.fill-brown { background-color: #6d554a; }
.fill-lightblue { background-color: #00abeb; }

/* 8. ORDER DETAIL OVERLAY MODAL */
.modal-admin {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 10000;
  display: none;
  width: 90%;
  max-width: 600px;
  background-color: var(--bg-white);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  overflow: hidden;
  transition: all 0.3s ease;
  opacity: 0;
}

.modal-admin.open {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.modal-admin-content {
  padding: 30px;
  overflow-y: auto;
  max-height: 90vh;
}

.close-admin-modal {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted-text);
}

.modal-admin-content h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  margin-bottom: 15px;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 15px;
  font-size: 13.5px;
}

.order-detail-grid h4 {
  font-family: var(--font-heading);
  font-size: 14px;
  margin-bottom: 8px;
}

.order-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  font-size: 13px;
}

.order-items-table th {
  padding: 8px 10px;
  background-color: var(--bg-light);
  font-family: var(--font-heading);
  text-align: left;
}

.order-items-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-light);
}

.order-detail-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  margin-top: 15px;
  font-size: 14px;
}

.modal-overlay-admin {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 9999;
  display: none;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* TOAST STYLES FOR ADMIN */
#toast-container-admin {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast-admin {
  color: #fff;
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 250px;
  animation: slideIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  transition: opacity 0.4s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(30px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* SUB-MENU NAVIGATION STYLES */
.sidebar-menu li.has-sub-menu {
  position: relative;
}
.sidebar-menu li .sub-menu {
  list-style: none;
  padding: 5px 0 5px 15px;
  background-color: rgba(0, 0, 0, 0.12);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-menu li.has-sub-menu.expanded .sub-menu {
  max-height: 500px;
}
.sidebar-menu li .sub-menu li a {
  padding: 8px 24px;
  font-size: 12.5px;
  font-weight: 500;
  color: #fbcfe8;
  border-left: 2px solid transparent;
}
.sidebar-menu li .sub-menu li a i {
  font-size: 11px;
  width: 14px;
}
.sidebar-menu li .sub-menu li.active a {
  background-color: #ffffff;
  color: #690150 !important;
  font-weight: 700;
  border-left-color: #690150;
}
.sidebar-menu li .sub-menu li a:hover:not(.active a) {
  color: #690150 !important;
  background-color: #ffd1dc;
}
.sidebar-menu li.has-sub-menu.expanded .sub-menu-chevron {
  transform: rotate(180deg);
}

/* SWITCH TOGGLE STYLES */
.sth-switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}
.pricing-form-add-disc-checkbox {
  opacity: 0;
  width: 0;
  height: 0;
}
.sth-switch-label input:checked + .sth-switch-slider {
  background-color: var(--primary-color);
}
@media (max-width: 768px) {
  .admin-container {
    grid-template-columns: 1fr !important;
  }
  
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: -270px;
    width: 270px;
    height: 100vh;
    z-index: 9999;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .admin-sidebar.mobile-open {
    left: 0 !important;
  }
  
  .menu-toggle-btn {
    display: block !important;
    margin-right: 15px;
  }
}

/* TIMELINE STYLES FOR PRICE HISTORY */
.timeline-item {
  position: relative;
  margin-bottom: 5px;
}
.timeline-dot {
  position: absolute;
  left: -19px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(209, 18, 67, 0.15);
}
.timeline-date {
  font-size: 11px;
  color: var(--muted-text);
  font-weight: 600;
  display: block;
}
.timeline-content {
  font-size: 12.5px;
  margin-top: 3px;
  color: var(--dark-text);
}
.timeline-content strong {
  font-weight: 600;
  color: var(--dark-text);
}

/* ==========================================================================
   2-COLUMN FORM, PREVIEW, UPLOAD & WIDGET STYLES
   ========================================================================== */

.form-two-columns {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 25px;
  align-items: start;
  margin-top: 15px;
}

.form-left-col, .form-right-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-card {
  background-color: var(--bg-white);
  padding: 22px 25px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.form-card h3 {
  font-family: var(--font-heading);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 20px;
  border-bottom: 1.5px solid var(--border-light);
  padding-bottom: 8px;
  margin-top: 0;
}

.form-group-field.full-width {
  grid-column: span 2;
}

/* Switch toggle slider round */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-toggle .slider-round {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.switch-toggle .slider-round:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: .4s;
}

.switch-toggle input:checked + .slider-round {
  background-color: #2ecc71; /* Green when checked */
}

.switch-toggle input:checked + .slider-round:before {
  transform: translateX(22px);
}

/* Drag & Drop */
.drag-drop-zone {
  border: 2px dashed var(--border-light);
  border-radius: 8px;
  padding: 25px;
  text-align: center;
  background: #fafbfc;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.drag-drop-zone:hover, .drag-drop-zone.dragover {
  border-color: var(--primary-color);
  background-color: rgba(209, 18, 67, 0.02);
}

.file-thumb-img {
  width: 45px;
  height: 35px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border-light);
}

.uploaded-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: #fff;
  margin-top: 10px;
}

.file-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.file-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--dark-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  font-size: 11px;
  color: var(--muted-text);
}

.file-delete-btn {
  background: none;
  border: none;
  color: #ff5b5b;
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
  transition: var(--transition-smooth);
}

.file-delete-btn:hover {
  color: #d11243;
}

/* Live preview overlays */
.banner-preview-box {
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  background: #fafbfc;
  padding: 10px;
  display: flex;
  justify-content: center;
}

.banner-preview-element {
  position: relative;
  width: 100%;
  aspect-ratio: 1920/600;
  border-radius: 6px;
  overflow: hidden;
  background: #e0e0e0;
  display: flex;
  align-items: center;
}

.preview-overlay-content {
  position: absolute;
  left: 8%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  color: #fff;
  max-width: 55%;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.preview-overlay-content h4 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #f1f5f9;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.preview-overlay-content h2 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
  color: #fff;
}

.preview-cta-btn {
  background: #101626;
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition-smooth);
}

.preview-cta-btn:hover {
  background: var(--primary-color);
  transform: scale(1.05);
}

/* Flash sale widgets */
.flash-sale-widgets-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.3fr 1fr;
  gap: 20px;
  margin-top: 25px;
}

@media (max-width: 1024px) {
  .form-two-columns {
    grid-template-columns: 1fr;
  }
  
  .flash-sale-widgets-grid {
    grid-template-columns: 1fr;
  }
}

/* Split dashboard layouts (2-column grids/flex) */
.split-page-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 25px;
}

.main-content-col {
  flex: 2.2;
  min-width: 0;
}

.side-content-col {
  flex: 1;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 1200px) {
  .split-page-layout {
    flex-direction: column;
  }
  .side-content-col {
    width: 100%;
  }
}

/* Donut chart svg styling */
.chart-flex-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 10px 0;
}

.donut-svg-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
}

.donut-chart-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.donut-center-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.donut-center-title {
  font-size: 11px;
  color: var(--muted-text);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.donut-center-num {
  font-size: 17px;
  font-weight: 800;
  color: var(--dark-text);
  margin-top: 2px;
}

.chart-legend-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #555;
  font-weight: 500;
}

.legend-color {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  display: inline-block;
}

.legend-qty {
  margin-left: auto;
  color: var(--muted-text);
  font-family: monospace;
}

/* Summary items lists */
.summary-details-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sum-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 8px;
  color: #555;
}

.sum-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.sum-label i {
  font-size: 13px;
  width: 16px;
  text-align: center;
}

.sum-value {
  font-weight: 700;
  color: var(--dark-text);
}

/* Top list items */
.top-list-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.top-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  border-bottom: 1px solid #f9f9f9;
  padding-bottom: 8px;
}

.top-list-row:last-child {
  border: none;
  padding: 0;
}

.top-list-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-light);
}

.top-list-name {
  font-weight: 700;
  color: var(--dark-text);
}

.top-list-meta {
  font-size: 10.5px;
  color: var(--muted-text);
  margin-top: 2px;
}

.top-list-value {
  margin-left: auto;
  font-weight: 800;
  color: var(--dark-text);
}

/* Timeline Activity */
.profile-timeline-box {
  display: flex;
  flex-direction: column;
}

.timeline-node {
  padding-bottom: 15px;
}

.timeline-node:last-child {
  padding-bottom: 0;
}

/* Quick action widgets */
.widgets-three-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.quick-action-widget-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: var(--transition-smooth);
}

.quick-action-widget-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border-color: var(--primary-color);
}

.widget-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.widget-info h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--dark-text);
}

.widget-info p {
  margin: 2px 0 0 0;
  font-size: 11px;
  color: var(--muted-text);
}

/* Subtabs for profiles */
.profile-tab-item {
  position: relative;
  transition: var(--transition-smooth);
}

.profile-tab-item:hover {
  color: var(--primary-color) !important;
}

.profile-tab-item i {
  margin-right: 5px;
}

/* Notification status badges */
.status-badge.status-sent {
  background-color: #e8f8f5;
  color: #2ecc71;
}
.status-badge.status-scheduled {
  background-color: #fef9e7;
  color: #f39c12;
}
.status-badge.status-draft {
  background-color: #f2f3f4;
  color: #7f8c8d;
}
.status-badge.status-failed {
  background-color: #fdedec;
  color: #e74c3c;
}

/* Notification priority badges */
.priority-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.priority-badge.priority-high {
  background-color: #fdedec;
  color: #e74c3c;
}
.priority-badge.priority-medium {
  background-color: #fef9e7;
  color: #f39c12;
}
.priority-badge.priority-low {
  background-color: #e8f8f5;
  color: #27ae60;
}

/* ==========================================
   SUPPORT TICKETS STYLES
   ========================================== */

.tkt-priority-badge,
.tkt-status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

/* Priority Badges */
.tkt-priority-high {
  background-color: #fef2f2;
  color: #ef4444;
  border: 1px solid #fecaca;
}
.tkt-priority-medium {
  background-color: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}
.tkt-priority-low {
  background-color: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

/* Status Badges */
.tkt-status-open {
  background-color: #fff1f2;
  color: #f43f5e;
  border: 1px solid #ffe4e6;
}
.tkt-status-progress {
  background-color: #eff6ff;
  color: #3b82f6;
  border: 1px solid #dbeafe;
}
.tkt-status-resolved {
  background-color: #ecfdf5;
  color: #10b981;
  border: 1px solid #d1fae5;
}
.tkt-status-closed {
  background-color: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

/* Hover effects */
.tkt-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 22, 38, 0.08);
}
.tkt-quick-actions > div:hover {
  border-color: var(--primary-color) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(16, 22, 38, 0.04);
}

/* Channel labels */
.tkt-channel-badge {
  font-size: 12.5px;
  color: #4b5563;
}

/* Chat bubble styling for ticket conversation stream */
.chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.4;
}
.chat-bubble-customer {
  align-self: flex-start;
  background-color: #fff;
  border: 1px solid var(--border-light);
  color: var(--dark-text);
  border-bottom-left-radius: 1px;
}
.chat-bubble-agent {
  align-self: flex-end;
  background-color: #fff0f3;
  color: var(--primary-color);
  border: 1px solid #ffd1dc;
  border-bottom-right-radius: 1px;
}

/* REPORTS DASHBOARD STYLES */
.rep-metric-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.rep-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border-color: #cbd5e1 !important;
}
.rep-metrics-grid {
  margin-top: 10px;
}
@media (max-width: 1400px) {
  .rep-metrics-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
@media (max-width: 768px) {
  .rep-metrics-grid {
    grid-template-columns: 1fr !important;
  }
}
.chart-axis-line {
  stroke: #e2e8f0;
  stroke-width: 1;
}
.chart-grid-line {
  stroke: #f1f5f9;
  stroke-dasharray: 2 2;
  stroke-width: 1;
}
.chart-tooltip {
  position: absolute;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 11px;
  pointer-events: none;
  z-index: 100;
  display: none;
}
.rep-category-progress {
  height: 6px;
  background: #f1f5f9;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.rep-category-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}


/* SETTINGS MODULES STYLING */
.settings-tabs-container {
  display: flex;
  gap: 15px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 25px;
  padding-bottom: 5px;
  overflow-x: auto;
}
.settings-tab-btn {
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted-text);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.settings-tab-btn:hover {
  color: var(--primary-color);
}
.settings-tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}
.settings-grid-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
  align-items: start;
}
@media (min-width: 1024px) {
  .settings-grid-layout.two-col {
    grid-template-columns: 1fr 350px;
  }
  .settings-grid-layout.three-col {
    grid-template-columns: 1fr 1fr 340px;
  }
  .settings-grid-layout.company-col {
    grid-template-columns: 1fr 360px;
  }
}
.settings-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 22px;
  margin-bottom: 22px;
}
.settings-card h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--dark-text);
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
  margin-bottom: 18px;
}
.settings-form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-bottom: 15px;
}
@media (min-width: 768px) {
  .settings-form-row.two-fields {
    grid-template-columns: 1fr 1fr;
  }
  .settings-form-row.three-fields {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.settings-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.settings-input-group label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--dark-text);
}
.settings-input-group label span {
  color: #690150;
}
.settings-control {
  padding: 10px 12px;
  font-size: 13.5px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  outline: none;
  background: #fafbfc;
  color: var(--dark-text);
  font-family: inherit;
  transition: border-color 0.2s ease;
}
.settings-control:focus {
  border-color: var(--primary-color);
}
.settings-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 700;
}
.settings-status-indicator.connected {
  background: #dcfce7;
  color: #15803d;
}
.settings-alert {
  padding: 12px 15px;
  border-radius: 6px;
  font-size: 12.5px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
}
.settings-alert.info {
  background: #eff6ff;
  color: #1e40af;
  border-left: 4px solid #3b82f6;
}
.settings-alert.success {
  background: #ecfdf5;
  color: #065f46;
  border-left: 4px solid #10b981;
}
.settings-alert.warning {
  background: #fffbeb;
  color: #92400e;
  border-left: 4px solid #f59e0b;
}
.settings-qr-box {
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  background: #f8fafc;
}
.settings-pwa-phone {
  width: 210px;
  height: 420px;
  border: 8px solid #1e293b;
  border-radius: 24px;
  background: #fff;
  position: relative;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
  overflow: hidden;
  margin: 0 auto;
}
.settings-pwa-phone .phone-notch {
  width: 100px;
  height: 15px;
  background: #1e293b;
  border-radius: 0 0 10px 10px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}
.settings-pwa-phone .phone-screen {
  padding: 25px 15px 15px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.settings-toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}
.settings-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.settings-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .2s;
  border-radius: 22px;
}
.settings-toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}
input:checked + .settings-toggle-slider {
  background-color: #690150;
}
input:checked + .settings-toggle-slider:before {
  transform: translateX(22px);
}

/* REPORTS PRINT LAYOUT */
@media print {
  body * {
    visibility: hidden;
  }
  #panel-daily-sales-report, #panel-daily-sales-report *,
  #panel-monthly-sales-report, #panel-monthly-sales-report *,
  #panel-product-sales-report, #panel-product-sales-report *,
  #panel-category-sales-report, #panel-category-sales-report *,
  #panel-stock-report, #panel-stock-report *,
  #panel-low-stock-products, #panel-low-stock-products *,
  #panel-out-of-stock-products, #panel-out-of-stock-products *,
  #panel-payment-report, #panel-payment-report * {
    visibility: visible;
  }
  #panel-daily-sales-report,
  #panel-monthly-sales-report,
  #panel-product-sales-report,
  #panel-category-sales-report,
  #panel-stock-report,
  #panel-low-stock-products,
  #panel-out-of-stock-products,
  #panel-payment-report {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
  }
  .section-title-bar, .form-container-card {
    display: none !important;
  }
}

/* STATUS BADGES OVERRIDES */
.badge-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-status.success-status {
  background-color: #dcfce7 !important;
  color: #15803d !important;
}
.badge-status.danger-status {
  background-color: #fee2e2 !important;
  color: #b91c1c !important;
}



