/* ==========================================================================
   CachyTheme Standalone — HK Support Portal
   Dark glassmorphism design system
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Dark palette */
  --hk-dark-900: #050508;
  --hk-dark-800: #0a0a0f;
  --hk-dark-700: #0f0f17;
  --hk-dark-600: #141420;
  --hk-dark-500: #1a1a2e;
  --hk-dark-400: #252540;
  --hk-dark-300: #2f2f4a;
  --hk-dark-200: #3a3a55;
  --hk-dark-100: #4a4a66;

  /* Colors */
  --hk-blue: #3742fa;
  --hk-blue-light: #5b63fc;
  --hk-cyan: #00d4ff;
  --hk-purple: #7c3aed;
  --hk-pink: #ec4899;
  --hk-red: #ff1744;
  --hk-green: #00e676;
  --hk-amber: #ffab00;

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-bg-hover: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.15);
  --glass-blur: 16px;

  /* Text */
  --text-primary: rgba(255, 255, 255, 0.87);
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-tertiary: rgba(255, 255, 255, 0.38);
  --text-disabled: rgba(255, 255, 255, 0.2);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--hk-blue), var(--hk-cyan));
  --gradient-glow: linear-gradient(135deg, rgba(55, 66, 250, 0.15), rgba(0, 212, 255, 0.15));

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--hk-dark-800);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Animated background orbs */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  pointer-events: none;
  z-index: -1;
}

body::before {
  width: 600px;
  height: 600px;
  background: var(--hk-blue);
  top: -200px;
  right: -100px;
  animation: orbFloat 20s ease-in-out infinite;
}

body::after {
  width: 500px;
  height: 500px;
  background: var(--hk-cyan);
  bottom: -150px;
  left: -100px;
  animation: orbFloat 25s ease-in-out infinite reverse;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(30px, -30px); }
  66% { transform: translate(-20px, 20px); }
}

a {
  color: var(--hk-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--hk-blue-light);
}

img { max-width: 100%; height: auto; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-sm { max-width: 720px; }
.container-md { max-width: 900px; }

/* ---------- Glass Panels & Cards ---------- */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover {
  transform: translateY(-2px);
  border-color: var(--glass-border-hover);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.glass-card-static {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0 24px;
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar-brand {
  display: flex;
  align-items: center;
}

.navbar-logo {
  height: 32px;
  width: auto;
}

.navbar-nav {
  display: flex;
  list-style: none;
  gap: 8px;
}

.navbar-nav a {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 768px) {
  .navbar-toggle { display: block; }
  .navbar-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--glass-border);
    padding: 16px 24px;
    gap: 4px;
  }
  .navbar-nav.open { display: flex; }
  .navbar-nav a { padding: 12px 16px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: rgba(55, 66, 250, 0.18);
  border-color: rgba(55, 66, 250, 0.3);
  color: #a5b4fc;
}

.btn-primary:hover:not(:disabled) {
  background: rgba(55, 66, 250, 0.28);
  border-color: rgba(55, 66, 250, 0.5);
  box-shadow: 0 0 20px rgba(55, 66, 250, 0.2);
}

.btn-primary:active:not(:disabled) {
  background: rgba(55, 66, 250, 0.35);
}

.btn-cyan {
  background: rgba(0, 212, 255, 0.12);
  border-color: rgba(0, 212, 255, 0.3);
  color: var(--hk-cyan);
}

.btn-cyan:hover:not(:disabled) {
  background: rgba(0, 212, 255, 0.22);
  border-color: rgba(0, 212, 255, 0.5);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}

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

.btn-outline:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-danger {
  background: rgba(255, 23, 68, 0.12);
  border-color: rgba(255, 23, 68, 0.3);
  color: #ff6b8a;
}

.btn-danger:hover:not(:disabled) {
  background: rgba(255, 23, 68, 0.22);
  border-color: rgba(255, 23, 68, 0.5);
}

.btn-success {
  background: rgba(0, 230, 118, 0.12);
  border-color: rgba(0, 230, 118, 0.3);
  color: var(--hk-green);
}

.btn-success:hover:not(:disabled) {
  background: rgba(0, 230, 118, 0.22);
  border-color: rgba(0, 230, 118, 0.5);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
  border-radius: 6px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  display: flex;
  width: 100%;
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-control {
  display: block;
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  transition: all var(--transition-fast);
}

.form-control::placeholder {
  color: var(--text-tertiary);
}

.form-control:focus {
  outline: none;
  border-color: rgba(55, 66, 250, 0.5);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(55, 66, 250, 0.15);
}

.form-control:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.02);
}

.form-control.is-invalid {
  border-color: rgba(255, 23, 68, 0.5);
}

.form-control.is-valid {
  border-color: rgba(0, 230, 118, 0.5);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.4)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

select.form-control option {
  background: #1a1a2e;
  color: #e0e0e0;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
  border-radius: var(--radius-md);
}

.form-text {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.form-text.text-danger {
  color: var(--hk-red);
}

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

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

/* Checkbox / Switch */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  margin-top: 2px;
}

.form-check input[type="checkbox"]:checked {
  background: rgba(55, 66, 250, 0.3);
  border-color: var(--hk-blue);
  box-shadow: 0 0 12px rgba(55, 66, 250, 0.2);
}

.form-check input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #a5b4fc;
  font-size: 13px;
  font-weight: 700;
}

.form-check-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  user-select: none;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

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

.toggle-slider {
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  position: relative;
  transition: all var(--transition-fast);
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-secondary);
  transition: all var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
  background: rgba(55, 66, 250, 0.3);
  border-color: var(--hk-blue);
}

.toggle-switch input:checked + .toggle-slider::after {
  transform: translateX(20px);
  background: #a5b4fc;
}

.toggle-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-requested {
  background: rgba(255, 171, 0, 0.12);
  color: var(--hk-amber);
  border: 1px solid rgba(255, 171, 0, 0.3);
}

.badge-received {
  background: rgba(55, 66, 250, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(55, 66, 250, 0.3);
}

.badge-diagnosing {
  background: rgba(124, 58, 237, 0.12);
  color: #c4b5fd;
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.badge-repairing {
  background: rgba(0, 212, 255, 0.12);
  color: var(--hk-cyan);
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.badge-testing {
  background: rgba(236, 72, 153, 0.12);
  color: #f9a8d4;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.badge-completed {
  background: rgba(0, 230, 118, 0.12);
  color: var(--hk-green);
  border: 1px solid rgba(0, 230, 118, 0.3);
}

.badge-cancelled {
  background: rgba(255, 23, 68, 0.12);
  color: #ff6b8a;
  border: 1px solid rgba(255, 23, 68, 0.3);
}

.badge-archived {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-warranty {
  background: rgba(255, 152, 0, 0.12);
  color: #ffb74d;
  border: 1px solid rgba(255, 152, 0, 0.3);
}

.badge-warranty_requested {
  background: rgba(255, 152, 0, 0.12);
  color: #ffb74d;
  border: 1px solid rgba(255, 152, 0, 0.3);
}

/* ---------- Alerts ---------- */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  border-left: 3px solid;
  background: var(--glass-bg);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.alert-info {
  border-left-color: var(--hk-cyan);
  color: var(--hk-cyan);
}

.alert-success {
  border-left-color: var(--hk-green);
  color: var(--hk-green);
}

.alert-warning {
  border-left-color: var(--hk-amber);
  color: var(--hk-amber);
}

.alert-danger {
  border-left-color: var(--hk-red);
  color: #ff6b8a;
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  background: rgba(255, 255, 255, 0.02);
}

td {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab {
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-tertiary);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
  font-family: inherit;
}

.tab:hover {
  color: var(--text-secondary);
}

.tab.active {
  color: var(--hk-cyan);
  border-bottom-color: var(--hk-cyan);
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

.tab.active .tab-count {
  background: rgba(0, 212, 255, 0.15);
  color: var(--hk-cyan);
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

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

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--hk-dark-400);
  border: 2px solid var(--text-tertiary);
}

.timeline-item:first-child .timeline-dot {
  background: var(--hk-blue);
  border-color: var(--hk-cyan);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}

.timeline-status {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.timeline-note {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.timeline-date {
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

/* ---------- Stepper ---------- */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
  overflow-x: auto;
  padding: 4px 0;
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.stepper-circle {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  border: 2px solid rgba(255, 255, 255, 0.15);
  color: var(--text-tertiary);
  background: rgba(255, 255, 255, 0.03);
  transition: all var(--transition-normal);
}

.stepper-label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  transition: color var(--transition-normal);
}

.stepper-line {
  width: 40px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 8px;
  transition: background var(--transition-normal);
}

.stepper-step.active .stepper-circle {
  border-color: var(--hk-blue);
  background: rgba(55, 66, 250, 0.2);
  color: #a5b4fc;
  box-shadow: 0 0 16px rgba(55, 66, 250, 0.25);
}

.stepper-step.active .stepper-label {
  color: var(--text-primary);
}

.stepper-step.completed .stepper-circle {
  border-color: var(--hk-cyan);
  background: rgba(0, 212, 255, 0.15);
  color: var(--hk-cyan);
}

.stepper-step.completed .stepper-label {
  color: var(--text-secondary);
}

.stepper-line.completed {
  background: var(--gradient-primary);
}

@media (max-width: 768px) {
  .stepper-label { display: none; }
  .stepper-line { width: 24px; }
}

/* ---------- Modal / Overlay ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--hk-dark-600);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-normal);
}

.modal-backdrop.open .modal {
  transform: scale(1) translateY(0);
}

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

.modal-header h3 { margin: 0; }

.modal-body { padding: 24px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--glass-border);
}

/* ---------- Image Upload Zone ---------- */
.upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-tertiary);
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: rgba(55, 66, 250, 0.4);
  background: rgba(55, 66, 250, 0.05);
  color: var(--text-secondary);
}

.upload-zone-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.upload-zone-text {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.upload-zone-hint {
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.upload-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.upload-preview {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

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

.upload-preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 23, 68, 0.8);
  border: none;
  color: white;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Tags Input ---------- */
.tags-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  cursor: text;
  transition: all var(--transition-fast);
  min-height: 44px;
  align-items: center;
}

.tags-input:focus-within {
  border-color: rgba(55, 66, 250, 0.5);
  box-shadow: 0 0 0 3px rgba(55, 66, 250, 0.15);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: rgba(55, 66, 250, 0.15);
  border: 1px solid rgba(55, 66, 250, 0.3);
  border-radius: 14px;
  font-size: 0.8rem;
  color: #a5b4fc;
}

.tag-remove {
  background: none;
  border: none;
  color: #a5b4fc;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  opacity: 0.6;
}

.tag-remove:hover { opacity: 1; }

.tags-input input {
  border: none;
  background: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  flex: 1;
  min-width: 80px;
}

.tags-input input::placeholder {
  color: var(--text-tertiary);
}

/* ---------- Product Search / Autocomplete ---------- */
.autocomplete-wrap {
  position: relative;
}

.autocomplete-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  margin-top: 4px;
  background: var(--hk-dark-600);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  max-height: 240px;
  overflow-y: auto;
  display: none;
}

.autocomplete-results.open {
  display: block;
}

.autocomplete-item {
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--transition-fast);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.autocomplete-item:hover,
.autocomplete-item.highlighted {
  background: rgba(55, 66, 250, 0.1);
}

.autocomplete-item-title {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.autocomplete-item-sub {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* ---------- Summary Table ---------- */
.summary-table {
  width: 100%;
}

.summary-table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-table tr:last-child {
  border-bottom: none;
}

.summary-table td {
  padding: 10px 0;
}

.summary-table .label {
  color: var(--text-secondary);
}

.summary-table .value {
  text-align: right;
  font-weight: 500;
  color: var(--text-primary);
}

.summary-table .total .label,
.summary-table .total .value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--hk-cyan);
  padding-top: 14px;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

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

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(55, 66, 250, 0.2); }
  50% { box-shadow: 0 0 30px rgba(55, 66, 250, 0.4); }
}

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

@keyframes checkmark {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.animate-fade-in { animation: fadeIn 0.5s ease-out both; }
.animate-fade-in-up { animation: fadeInUp 0.5s ease-out both; }
.animate-fade-in-down { animation: fadeInDown 0.5s ease-out both; }
.animate-scale-in { animation: scaleIn 0.4s ease-out both; }
.animate-slide-in-right { animation: slideInRight 0.5s ease-out both; }

/* Stagger children */
.stagger > * {
  opacity: 0;
  animation: fadeInUp 0.5s ease-out both;
}

.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }
.stagger > *:nth-child(7) { animation-delay: 0.35s; }
.stagger > *:nth-child(8) { animation-delay: 0.4s; }

/* ---------- Loader ---------- */
.loader {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--hk-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loader-sm {
  width: 18px;
  height: 18px;
  border-width: 2px;
}

.loader-center {
  display: flex;
  justify-content: center;
  padding: 40px;
}

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-tertiary);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state-text {
  font-size: 0.9rem;
  max-width: 400px;
  margin: 0 auto;
}

/* ---------- Utility ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.p-16 { padding: 16px; }
.p-24 { padding: 24px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ---------- Hero Section ---------- */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.hero .subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 2rem; }
  .hero .subtitle { font-size: 1rem; }
}

.hero-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 700px;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .hero-cards { grid-template-columns: 1fr; }
}

.hero-card {
  padding: 32px 24px;
  text-align: center;
}

.hero-card-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.hero-card h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.hero-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 80px;
  padding: 24px 0;
  border-top: 1px solid var(--glass-border);
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--hk-cyan);
}

/* Language Switch */
.lang-switch {
  display: flex;
  gap: 4px;
  align-items: center;
}

.lang-btn {
  padding: 2px 8px !important;
  font-size: 0.75rem !important;
  min-width: auto !important;
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}

.lang-btn:hover,
.lang-btn.active {
  opacity: 1;
}

/* ---------- Section ---------- */
.section {
  padding: 48px 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 32px;
}

/* ---------- Slide Panel (Admin Detail) ---------- */
.slide-panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.slide-panel-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.slide-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 680px;
  background: var(--hk-dark-700);
  border-left: 1px solid var(--glass-border);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  z-index: 151;
}

.slide-panel-backdrop.open .slide-panel {
  transform: translateX(0);
}

.slide-panel-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: rgba(15, 15, 23, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}

.slide-panel-body {
  padding: 24px;
}

.slide-panel-section {
  margin-bottom: 32px;
}

.slide-panel-section h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ---------- Info Grid (key-value pairs) ---------- */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}

.info-item {}

.info-label {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-bottom: 2px;
}

.info-value {
  font-size: 0.9rem;
  color: var(--text-primary);
}

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

/* ---------- Success Checkmark ---------- */
.success-checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0, 230, 118, 0.1);
  border: 2px solid var(--hk-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  animation: checkmark 0.6s var(--transition-spring) both;
}

.success-checkmark::after {
  content: '✓';
  font-size: 2rem;
  color: var(--hk-green);
}

/* ---------- Tracking ID Display ---------- */
.tracking-id-display {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  padding: 16px 0;
}

/* ---------- Conditions Scroll Box ---------- */
.conditions-box {
  max-height: 300px;
  overflow-y: auto;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.conditions-box h4 {
  color: var(--text-primary);
  font-size: 1rem;
  margin: 16px 0 8px;
}

.conditions-box h4:first-child {
  margin-top: 0;
}

.conditions-box ul {
  padding-left: 20px;
  margin: 8px 0;
}

.conditions-box li {
  margin-bottom: 4px;
}
