/**
 * Admin Dashboard Styles
 * Modern dark luxury design
 */

:root {
  /* Brand colors */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --accent: #8b5cf6;
  --accent-light: #a78bfa;

  /* Semantic colors */
  --primary-color: #6366f1;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #06b6d4;

  /* Sidebar */
  --sidebar-bg: #0f172a;
  --sidebar-surface: #1e293b;
  --sidebar-text: #cbd5e1;
  --sidebar-text-muted: #64748b;
  --sidebar-hover: rgba(99, 102, 241, 0.12);
  --sidebar-active-bg: linear-gradient(135deg, #6366f1, #8b5cf6);

  /* Layout */
  --header-bg: #ffffff;
  --header-border: #e2e8f0;
  --content-bg: #f1f5f9;
  --card-bg: #ffffff;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  --card-shadow-hover: 0 4px 12px rgba(99,102,241,0.15), 0 12px 32px rgba(0,0,0,0.08);

  /* Spacing */
  --sidebar-width: 268px;
  --header-height: 68px;
  --radius: 12px;
  --radius-sm: 8px;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1e293b;
  background-color: var(--content-bg);
}

/* ================================
   LOGIN PAGE
   ================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

/* Animated gradient background */
.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 80% at 20% 20%, rgba(99,102,241,0.35) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 80% 80%, rgba(139,92,246,0.3) 0%, transparent 55%),
    radial-gradient(ellipse 50% 50% at 50% 0%, rgba(6,182,212,0.2) 0%, transparent 50%);
  animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  0%   { opacity: 0.8; transform: scale(1); }
  100% { opacity: 1;   transform: scale(1.05); }
}

/* Floating orbs */
.login-page::after {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
  top: -200px; right: -200px;
  animation: floatOrb 12s ease-in-out infinite;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(-40px, 30px) scale(1.05); }
  66%       { transform: translate(20px, -20px) scale(0.95); }
}

.login-container {
  width: 100%;
  max-width: 420px;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.login-box {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow:
    0 32px 64px rgba(0,0,0,0.4),
    0 0 0 1px rgba(255,255,255,0.05) inset;
  padding: 48px 40px;
  animation: fadeUp 0.5s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-header {
  text-align: center;
  margin-bottom: 36px;
}

.login-logo {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(99,102,241,0.4);
  font-size: 28px;
  color: white;
}

.login-header h1 {
  font-size: 26px;
  color: #ffffff;
  margin-bottom: 6px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.login-header p {
  color: rgba(255,255,255,0.5);
  font-size: 14px;
}

.login-form .form-label {
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}

.login-form .form-control {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #ffffff;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  transition: all 0.2s;
}

.login-form .form-control::placeholder {
  color: rgba(255,255,255,0.3);
}

.login-form .form-control:focus {
  background: rgba(255,255,255,0.12);
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.25);
  color: #ffffff;
  outline: none;
}

.login-form .form-control.is-invalid {
  border-color: var(--danger-color);
}

.login-form .btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3px;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(99,102,241,0.4);
}

.login-form .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99,102,241,0.5);
  filter: brightness(1.08);
}

.login-form .btn-primary:active {
  transform: translateY(0);
}

.login-footer {
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 18px;
  margin-top: 4px;
}

.login-footer .text-muted {
  color: rgba(255,255,255,0.35) !important;
  font-size: 13px;
}

/* ================================
   DASHBOARD LAYOUT
   ================================ */
.admin-dashboard {
  background-color: var(--content-bg);
  min-height: 100vh;
}

.wrapper {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ================================
   SIDEBAR
   ================================ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  z-index: 1000;
  padding-top: var(--header-height);
  flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,0.04);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.sidebar-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 8px;
}

.sidebar-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f1f5f9;
  letter-spacing: -0.3px;
}

.sidebar-title i {
  color: var(--primary-light);
}

.sidebar-nav {
  list-style: none;
  padding: 8px 12px;
  margin: 0;
}

.sidebar-nav li { margin: 2px 0; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--sidebar-text);
  text-decoration: none;
  transition: all 0.2s ease;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  position: relative;
}

.sidebar-nav a:hover {
  background: var(--sidebar-hover);
  color: #f1f5f9;
  padding-left: 18px;
}

.sidebar-nav a.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(99,102,241,0.35);
}

.sidebar-nav a.active i {
  color: rgba(255,255,255,0.9);
}

.sidebar-nav a i {
  width: 18px;
  text-align: center;
  font-size: 15px;
  color: var(--sidebar-text-muted);
  transition: color 0.2s;
}

.sidebar-nav a:hover i { color: var(--primary-light); }

.sidebar-nav .nav-section {
  padding: 16px 14px 6px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--sidebar-text-muted);
  font-weight: 700;
  letter-spacing: 1.2px;
  margin-top: 8px;
}

.sidebar-footer {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(to top, rgba(0,0,0,0.15), transparent);
}

.sidebar-footer .btn {
  border-color: rgba(255,255,255,0.2);
  color: var(--sidebar-text);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}

.sidebar-footer .btn:hover {
  background: var(--danger-color);
  border-color: var(--danger-color);
  color: white;
  box-shadow: 0 4px 12px rgba(239,68,68,0.35);
}

/* ================================
   MAIN CONTENT
   ================================ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ================================
   HEADER
   ================================ */
.admin-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  padding: 0 28px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 0 #e2e8f0, 0 4px 16px rgba(0,0,0,0.04);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.btn-toggle-sidebar {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--primary);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  display: none;
  transition: background 0.2s;
}

.btn-toggle-sidebar:hover { background: #f1f5f9; }

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.4px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-greeting {
  font-size: 13px;
  color: var(--secondary-color);
}

.user-name {
  font-weight: 600;
  color: #0f172a;
  font-size: 14px;
}

.user-role {
  font-size: 11px;
  color: var(--primary);
  background: rgba(99,102,241,0.1);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ================================
   ALERTS
   ================================ */
.alerts-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 1050;
  max-width: 380px;
}

.alert {
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  border: none;
  font-size: 14px;
}

/* ================================
   PAGE CONTENT
   ================================ */
.page-content,
.content-body,
.content-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px;
  /* Custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.page-content::-webkit-scrollbar,
.content-body::-webkit-scrollbar,
.content-area::-webkit-scrollbar {
  width: 6px;
}

.page-content::-webkit-scrollbar-thumb,
.content-body::-webkit-scrollbar-thumb,
.content-area::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.page-content::-webkit-scrollbar-thumb:hover,
.content-body::-webkit-scrollbar-thumb:hover,
.content-area::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.container-fluid {
  max-width: 1400px;
}

/* ================================
   STAT CARDS
   ================================ */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  gap: 16px;
  align-items: center;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(0,0,0,0.04);
  transition: all 0.25s ease;
}

.stat-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
}

.stat-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon.bg-primary { background: linear-gradient(135deg, #6366f1, #8b5cf6); box-shadow: 0 6px 16px rgba(99,102,241,0.3); }
.stat-icon.bg-success { background: linear-gradient(135deg, #10b981, #06b6d4); box-shadow: 0 6px 16px rgba(16,185,129,0.3); }
.stat-icon.bg-warning { background: linear-gradient(135deg, #f59e0b, #ef4444); box-shadow: 0 6px 16px rgba(245,158,11,0.3); }
.stat-icon.bg-info    { background: linear-gradient(135deg, #06b6d4, #6366f1); box-shadow: 0 6px 16px rgba(6,182,212,0.3); }

.stat-content { flex: 1; }

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--secondary-color);
  letter-spacing: 0.8px;
  margin-bottom: 6px;
  font-weight: 600;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -1px;
}

/* ================================
   CARDS
   ================================ */
.card {
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
  background: var(--card-bg);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid #f1f5f9;
  padding: 16px 20px;
  font-weight: 600;
  color: #0f172a;
}

.card-title {
  color: #0f172a;
  font-weight: 700;
  margin-bottom: 16px;
  font-size: 16px;
}

/* ================================
   TABLES
   ================================ */
.table {
  font-size: 14px;
  color: #334155;
}

.table thead th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e2e8f0;
  padding: 12px 16px;
}

.table tbody td {
  padding: 13px 16px;
  vertical-align: middle;
  border-color: #f1f5f9;
}

.table tbody tr:hover td {
  background: #f8fafc;
}

/* ================================
   BUTTONS
   ================================ */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
  transition: all 0.2s !important;
  box-shadow: 0 2px 8px rgba(99,102,241,0.3) !important;
}

.btn-primary:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(99,102,241,0.4) !important;
  filter: brightness(1.06) !important;
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #06b6d4) !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(16,185,129,0.25) !important;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #f97316) !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
}

/* ================================
   BADGES / STATUS
   ================================ */
.badge {
  border-radius: 6px;
  font-weight: 600;
  font-size: 11px;
  padding: 4px 10px;
  letter-spacing: 0.3px;
}

/* ================================
   FORMS
   ================================ */
.form-control, .form-select {
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: all 0.2s;
  color: #1e293b;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
  outline: none;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

/* ================================
   FOOTER
   ================================ */
.admin-footer {
  background: var(--header-bg);
  border-top: 1px solid var(--header-border);
  padding: 14px 28px;
  text-align: center;
  font-size: 12px;
  color: var(--secondary-color);
  margin-top: auto;
}

.footer-content p { margin: 0; }

.footer-content code {
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 5px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 11px;
  color: var(--primary);
}
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  overflow-y: auto;
  position: relative;
  z-index: 1000;
  padding-top: var(--header-height);
  flex-shrink: 0;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
}

.sidebar-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  margin: 0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--sidebar-text);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
  background-color: var(--sidebar-hover);
  padding-left: 24px;
}

.sidebar-nav a.active {
  background-color: var(--primary-color);
  border-left-color: var(--warning-color);
  font-weight: 600;
}

.sidebar-nav a i {
  width: 20px;
  text-align: center;
}

.sidebar-nav .nav-section {
  padding: 15px 20px 8px;
  font-size: 12px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  letter-spacing: 1px;
  margin-top: 10px;
}

.sidebar-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(0, 0, 0, 0.1);
}

.sidebar-footer .btn {
  border-color: var(--sidebar-text);
  color: var(--sidebar-text);
}

.sidebar-footer .btn:hover {
  background-color: var(--danger-color);
  border-color: var(--danger-color);
  color: white;
}

/* Main Content Area */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.admin-header {
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  padding: 0 30px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--card-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.btn-toggle-sidebar {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--primary-color);
  cursor: pointer;
  padding: 5px 10px;
  display: none;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-greeting {
  font-size: 14px;
  color: var(--secondary-color);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-name {
  font-weight: 600;
  color: #333;
}

.user-role {
  font-size: 12px;
  color: var(--secondary-color);
  background-color: #f0f0f0;
  padding: 2px 8px;
  border-radius: 12px;
}

/* Alerts Container */
.alerts-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 1050;
  max-width: 400px;
}

.alert {
  margin-bottom: 10px;
  border-radius: 6px;
  box-shadow: var(--card-shadow);
}

.container-fluid {
  max-width: 1400px;
}

/* Stat Cards */
.stat-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  gap: 15px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
}

.stat-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-icon.bg-primary {
  background-color: var(--primary-color);
}

.stat-icon.bg-success {
  background-color: var(--success-color);
}

.stat-icon.bg-warning {
  background-color: var(--warning-color);
}

.stat-icon.bg-info {
  background-color: var(--info-color);
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--secondary-color);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  font-weight: 600;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #333;
  margin: 0;
}

/* Cards */
.card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
}

.card-title {
  color: #333;
  font-weight: 600;
  margin-bottom: 15px;
}

/* Footer */
.admin-footer {
  background-color: var(--header-bg);
  border-top: 1px solid var(--header-border);
  padding: 15px 30px;
  text-align: center;
  font-size: 12px;
  color: var(--secondary-color);
  margin-top: auto;
}

.footer-content p {
  margin: 0;
}

.footer-content code {
  background-color: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 768px) {
  :root { --sidebar-width: 68px; }

  .sidebar {
    position: fixed;
    left: 0; top: 0;
    height: 100vh;
    z-index: 999;
  }

  .sidebar-header { padding: 15px 10px; }
  .sidebar-title span { display: none; }
  .sidebar-nav a span { display: none; }

  .sidebar-nav a {
    justify-content: center;
    padding: 13px;
  }

  .sidebar-footer { display: none; }
  .btn-toggle-sidebar { display: block; }
  .page-title { font-size: 18px; }

  .alerts-container {
    max-width: 90%;
    left: 5%; right: 5%;
  }

  .stat-card {
    flex-direction: column;
    text-align: center;
  }

  .stat-icon { margin: 0 auto; }
  .page-content,
  .content-body,
  .content-area { padding: 16px; }
}

/* ================================
   UTILITY
   ================================ */
.d-none { display: none !important; }

.fade {
  opacity: 1;
  transition: opacity 0.15s linear;
}

.fade.show { opacity: 1; }

.alert-dismissible .btn-close { padding: 0.5rem; }

/* Backdrop override (orders modal) */
.modal-backdrop {
  background-color: #94a3b8 !important;
}
.modal-backdrop.show {
  opacity: 0.4 !important;
}

/* ══════════════════════════════════════════
   Upload Zone Component
   ══════════════════════════════════════════ */
.upload-zone {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #fafafa;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: #6366f1;
  background: #f0f0ff;
}

.upload-zone i {
  font-size: 28px;
  color: #bbb;
  display: block;
}

.upload-zone p {
  margin: 6px 0 0;
  font-size: 13px;
  color: #666;
}

.upload-zone small {
  color: #aaa;
  font-size: 11px;
}

.btn-link-upload {
  background: none;
  border: none;
  color: #6366f1;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  font-size: 13px;
}

.btn-link-upload:hover {
  color: #4f46e5;
}

/* File preview row after selection */
.upload-img-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #dee2e6;
}

.upload-img-preview img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid #ddd;
}

.upl-file-name {
  font-size: 13px;
  font-weight: 500;
  word-break: break-all;
  max-width: 220px;
  color: #333;
}

.upl-file-size {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}

.upload-status-info {
  color: #6366f1;
  font-size: 12px;
}

.upload-status-success {
  color: #198754;
  font-size: 12px;
}

.upload-status-error {
  color: #dc3545;
  font-size: 12px;
}

/* ══════════════════════════════════════════════════════════
   Multi-Image Gallery (Product form)
   ══════════════════════════════════════════════════════════ */
.product-images-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  min-height: 112px;
  align-items: flex-start;
}

.product-img-card {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 8px;
  border: 2px solid #dee2e6;
  background: #f8f9fa;
  overflow: visible;
  flex-shrink: 0;
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
  user-select: none;
}

.product-img-card:active {
  cursor: grabbing;
}

/* Ảnh đang được kéo */
.product-img-card.dragging {
  opacity: 0.35;
  cursor: grabbing;
  transform: scale(0.97);
}

/* Vị trí đang được thả vào */
.product-img-card.drag-over-card {
  border-color: #0d6efd;
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(13, 110, 253, 0.35);
}

/* Drag handle icon (hiện khi hover) */
.product-img-card .drag-handle {
  position: absolute;
  top: 3px;
  left: 4px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  z-index: 3;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.2s;
}

.product-img-card:hover .drag-handle {
  opacity: 1;
}

.product-img-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.product-img-card.is-primary {
  border-color: #0d6efd;
}

.product-img-card .primary-badge {
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  background: #0d6efd;
  color: #fff;
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
}

.product-img-card .btn-remove-img {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dc3545;
  color: #fff;
  border: 2px solid #fff;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
  line-height: 1;
}

.product-img-card .btn-remove-img:hover {
  background: #b02a37;
}

.upload-zone-add {
  width: 100px;
  height: 100px;
  border: 2px dashed #ced4da;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6c757d;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  background: #f8f9fa;
  flex-shrink: 0;
  user-select: none;
}

.upload-zone-add:hover,
.upload-zone-add.drag-over {
  border-color: #0d6efd;
  background: #e8f0fe;
  color: #0d6efd;
}

.upload-zone-add i {
  font-size: 22px;
  margin-bottom: 4px;
}

.upload-zone-add small {
  font-size: 11px;
  font-weight: 500;
}
