@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: #f3f6fc; /* Nền xám xanh nhạt dịu mát */
  color: #1f2937;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Base Layout Container */
.admin-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background-color: #ffffff;
  border-right: 1px solid #e5e9f0;
  display: flex;
  flex-direction: column;
  padding: 24px;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
}

.sidebar-header {
  margin-bottom: 32px;
}

/* Shopzy Logo Button style */
.logo-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e5e9f0;
  padding: 10px 16px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  position: relative;
}

.logo-icon {
  font-size: 18px;
}

.logo-text {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  flex: 1;
}

.collapse-icon {
  color: #9ca3af;
  font-size: 12px;
  font-weight: bold;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.menu-item {
  width: 100%;
  background: none;
  border: none;
  color: #5e6b7e;
  padding: 12px 16px;
  border-radius: 12px;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.menu-item:hover {
  background-color: #f8fafc;
  color: #111827;
}

/* Active blue button from reference image */
.menu-item.active {
  background-color: #2563eb; /* Royal Blue */
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.menu-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.btn-logout {
  display: block;
  text-align: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #5e6b7e;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 12px;
  border-radius: 12px;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
}

.btn-logout:hover {
  background-color: #f8fafc;
  color: #111827;
  border-color: #cbd5e1;
}

/* Main Content Area */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (max-width: 992px) {
  .sidebar {
    width: 80px;
    padding: 16px 8px;
  }
  .logo-text, .collapse-icon, .btn-logout, .menu-item span.text {
    display: none;
  }
  .logo-btn, .menu-item, .btn-logout {
    justify-content: center;
    padding: 12px;
  }
  .main-content {
    margin-left: 80px;
    padding: 24px;
  }
}

/* Header style in reference image */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 16px;
}

#pageTitle {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}

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

.header-icon-btn {
  background: none;
  border: none;
  color: #5e6b7e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.header-icon-btn:hover {
  background-color: #e2e8f0;
}

.language-badge {
  font-size: 20px;
  cursor: pointer;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  font-size: 11px;
  color: #5e6b7e;
  font-weight: 600;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.status-dot.active {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* User Avatar with Green online dot */
.user-avatar-wrapper {
  position: relative;
  width: 36px;
  height: 36px;
  cursor: pointer;
}

.user-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e2e8f0;
}

.avatar-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  border: 2px solid #ffffff;
}

/* Tab Panels */
.tab-panel {
  display: none;
  flex-direction: column;
  gap: 24px;
}

.tab-panel.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

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

/* --- DASHBOARD LAYOUT & WIDGETS --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 7fr 3fr;
  gap: 24px;
}

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

.dashboard-left-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dashboard-right-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 1. Progress cards (Top row) */
.progress-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.progress-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.01), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
}

.card-info {
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 6px;
}

.card-value {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.card-subtext {
  font-size: 10px;
  color: #9ca3af;
}

/* SVG Circular Progress inside Card */
.card-chart {
  position: relative;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.circle-bg {
  fill: none;
  stroke: #f1f5f9;
  stroke-width: 4;
}

.circle-stroke {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dasharray 0.3s ease;
}

.blue-stroke { stroke: #2563eb; }
.orange-stroke { stroke: #ff9f00; }
.lightblue-stroke { stroke: #00bcd4; }

.circle-text {
  position: absolute;
  font-size: 11px;
  font-weight: 700;
  color: #111827;
}

/* 2. Revenue Report Chart (Double Column bar chart) */
.report-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.report-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.report-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  color: #5e6b7e;
  font-weight: 600;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.orange-dot { background-color: #ff9f00; }
.blue-dot { background-color: #2563eb; }

.report-select {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  color: #5e6b7e;
  outline: none;
  cursor: pointer;
}

/* Bar Chart columns visualization */
.bar-chart-container {
  display: flex;
  gap: 16px;
  height: 240px;
  padding-top: 10px;
}

.y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #9ca3af;
  font-size: 11px;
  width: 32px;
  text-align: right;
  padding-bottom: 24px;
}

.bars-wrapper {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 100%;
}

.bar-month {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  flex: 1;
}

.bar-pair {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  border-bottom: 1px solid #e2e8f0;
  width: 100%;
  justify-content: center;
  padding-bottom: 4px;
}

.bar-column {
  width: 6px;
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  transition: height 0.3s ease;
}

.orange-bar { background-color: #ff9f00; }
.blue-bar { background-color: #2563eb; }

.month-label {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 8px;
}

/* 3. Bottom Row: Recent Order & Trending Items */
.bottom-cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .bottom-cards-row {
    grid-template-columns: 1fr;
  }
}

.details-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.01);
}

.details-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
}

.details-card-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.btn-seeall {
  background: none;
  border: none;
  color: #2563eb;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.btn-seeall:hover {
  text-decoration: underline;
}

.more-options {
  color: #9ca3af;
  cursor: pointer;
  letter-spacing: 1px;
}

/* Custom list items inside cards */
.card-list-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f8fafc;
}

.list-item-row:last-child {
  border-bottom: none;
}

.list-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.list-item-icon {
  font-size: 20px;
  background: #f1f5f9;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.list-item-meta {
  display: flex;
  flex-direction: column;
}

.list-item-name {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.list-item-desc {
  font-size: 11px;
  color: #6b7280;
}

.list-item-right {
  font-size: 13px;
  font-weight: 700;
  color: #2563eb;
}

.list-item-right-price {
  color: #ff9f00;
}

/* 4. Right Column: Today Best Sale widget */
.best-sale-content {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 8px;
}

.best-sale-icon {
  width: 48px;
  height: 48px;
  background-color: #eff6ff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.best-sale-info {
  display: flex;
  flex-direction: column;
}

.best-sale-name {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.best-sale-desc {
  font-size: 12px;
  color: #6b7280;
}

/* 5. Right Column: Latest Customer list (Recent Shortlinks) */
.latest-customers-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 8px;
}

.customer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.customer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.customer-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #f1f5f9;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.customer-meta {
  display: flex;
  flex-direction: column;
  max-width: 140px;
}

.customer-name {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-desc {
  font-size: 11px;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-right-btn {
  background-color: #eff6ff;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  color: #2563eb;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.customer-right-btn:hover {
  background-color: #dbeafe;
}

/* 6. Profit Increase (Gauge semi-circle chart) */
.gauge-chart-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0;
}

.gauge-wrapper {
  position: relative;
  width: 160px;
  height: 80px;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.gauge-svg {
  width: 100%;
  height: 100%;
}

.gauge-bg {
  fill: none;
  stroke: #f1f5f9;
  stroke-width: 10;
}

.gauge-stroke {
  fill: none;
  stroke: #2563eb;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dasharray 0.3s ease;
}

.gauge-val {
  position: absolute;
  bottom: 0;
  font-size: 16px;
  font-weight: 700;
  color: #2563eb;
}

/* --- TAB PANELS TABLES & CRUD STYLE --- */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.search-box input, .filter-group input, .filter-group select {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  color: #111827;
  padding: 10px 16px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: all 0.3s;
}

.search-box input:focus, .filter-group input:focus, .filter-group select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.08);
}

.filter-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.01);
}

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

th {
  color: #5e6b7e;
  font-weight: 700;
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
  background-color: #fafbfc;
}

td {
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #374151;
}

tr:hover td {
  background: #fafbfc;
}

.badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.badge-subid {
  background: rgba(255, 167, 38, 0.08);
  color: #e65100;
  border: 1px solid rgba(255, 167, 38, 0.18);
  margin-right: 4px;
  display: inline-block;
  margin-bottom: 4px;
}

/* Button variants */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #374151;
}

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

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

.btn-danger-text {
  background: none;
  border: none;
  color: #ef4444;
  font-weight: 700;
  cursor: pointer;
}

.btn-danger-text:hover {
  text-decoration: underline;
}

.btn-edit-text {
  background: none;
  border: none;
  color: #2563eb;
  font-weight: 700;
  margin-right: 12px;
  cursor: pointer;
}

.btn-edit-text:hover {
  text-decoration: underline;
}

.btn-copy-text {
  background: none;
  border: none;
  color: #10b981;
  font-weight: 700;
  margin-right: 12px;
  cursor: pointer;
}

.btn-copy-text:hover {
  text-decoration: underline;
}

/* Modals glass style */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  width: 90%;
  max-width: 550px;
  padding: 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  animation: modalSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlide {
  from { opacity: 0; transform: translateY(-20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.close-modal {
  font-size: 28px;
  color: #9ca3af;
  cursor: pointer;
  transition: color 0.2s;
}

.close-modal:hover {
  color: #111827;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

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

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

label {
  font-size: 12px;
  font-weight: 700;
  color: #4b5563;
}

.form-group input, .form-group select, .form-group textarea {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  color: #111827;
  padding: 12px 16px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: all 0.3s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.08);
}

.input-with-button {
  display: flex;
  gap: 8px;
}

.input-with-button input {
  flex: 1;
}

.btn-icon {
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid #f1f5f9;
  padding-top: 20px;
  margin-top: 24px;
}

.status-message {
  font-size: 12px;
  padding: 10px;
  border-radius: 8px;
  display: none;
  margin-bottom: 16px;
}

.status-message.success {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.15);
  color: #10b981;
  display: block;
}

.status-message.error {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.15);
  color: #ef4444;
  display: block;
}

.spinner-small {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.prod-icon {
  font-size: 24px;
}
