/* 迅云闲机 - 全局样式 */

:root {
  --primary: #635bff;
  --primary-light: #7a73ff;
  --primary-dark: #5248e0;
  --background: #fafafa;
  --foreground: #0a2540;
  --card: #ffffff;
  --card-foreground: #0a2540;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --muted: #f3f4f6;
  --muted-foreground: #6b7280;
  --accent: #06b6d4;
  --accent-foreground: #ffffff;
  --success: #22c55e;
  --success-foreground: #ffffff;
  --warning: #f59e0b;
  --warning-foreground: #ffffff;
  --destructive: #ef4444;
  --destructive-foreground: #ffffff;
  --info: #3b82f6;
  --info-foreground: #ffffff;
  
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 2px 4px rgba(0,0,0,0.04), 0 8px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 8px rgba(0,0,0,0.06), 0 16px 32px rgba(0,0,0,0.1);
  --shadow-primary: 0 4px 14px rgba(99,91,255,0.4);
  
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1rem;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  min-height: 100vh;
}

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

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.console-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.75rem;
  padding: 0.75rem 1rem;
  background: #0a2540;
  color: white;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.console-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.console-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(99,91,255,0.35);
}

.console-brand strong {
  display: block;
  margin-top: 0.125rem;
  color: white;
  font-size: 1rem;
  font-weight: 700;
}

.console-kicker {
  display: block;
  color: rgba(255,255,255,0.62);
  font-size: 0.75rem;
  font-weight: 600;
}

.console-account {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: rgba(255,255,255,0.72);
  font-size: 0.875rem;
}

.console-account a {
  min-height: 2.25rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius-sm);
  color: white;
}

.console-account .console-home-link {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.22);
}

.console-account a:hover {
  background: rgba(255,255,255,0.1);
}

.console-account .console-home-link:hover {
  background: white;
  color: var(--foreground);
}

.console-project-switch {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  min-width: 0;
  padding: 0;
  background: transparent;
}

.console-project-link {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 2.25rem;
  padding: 0;
  color: rgba(255,255,255,0.76);
  font-size: 0.9375rem;
  font-weight: 800;
  white-space: nowrap;
  transition: color 0.2s;
}

.console-project-link:hover {
  color: white;
}

.console-project-link.active {
  color: white;
}

.console-project-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.25rem;
  height: 0.125rem;
  border-radius: 999px;
  background: white;
}

.console-layout {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  min-height: calc(100vh - 4.75rem);
  background: var(--background);
}

.console-sidebar {
  position: sticky;
  top: 4.75rem;
  height: calc(100vh - 4.75rem);
  padding: 1rem;
  background: white;
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.console-sidebar-title {
  padding: 0.625rem 0.75rem 1rem;
  color: var(--muted-foreground);
  font-size: 0.75rem;
  font-weight: 700;
}

.console-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.console-sidebar-nav a {
  display: flex;
  align-items: center;
  min-height: 2.625rem;
  padding: 0 0.875rem;
  border-radius: var(--radius-sm);
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 600;
}

.console-sidebar-action {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 2.625rem;
  padding: 0 0.875rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted-foreground);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.console-sidebar-nav a:hover,
.console-sidebar-nav a.active,
.console-sidebar-action:hover {
  background: rgba(99,91,255,0.1);
  color: var(--primary);
}

.console-content {
  min-width: 0;
}

.console-password-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(10,37,64,0.42);
}

.console-password-modal.active {
  display: flex;
}

.console-password-dialog {
  width: min(440px, 100%);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-lg);
}

.console-password-head,
.console-password-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
}

.console-password-head strong {
  font-size: 1rem;
}

.console-password-close {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--muted);
  color: var(--muted-foreground);
  cursor: pointer;
}

.console-password-body {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 1.25rem;
}

.console-password-body label {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 600;
}

.console-password-body input {
  width: 100%;
  min-height: 2.625rem;
  padding: 0 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--muted);
  color: var(--foreground);
  font: inherit;
}

.console-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.625rem;
}

.console-code-row button {
  min-width: 6.5rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: rgba(99,91,255,0.1);
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
}

.console-code-row button:disabled,
.console-password-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.console-password-message {
  min-height: 1.25rem;
  font-size: 0.8125rem;
}

.console-password-message.success {
  color: var(--success);
}

.console-password-message.error {
  color: var(--destructive);
}

.console-password-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--border-light);
  border-bottom: 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  height: 4.75rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-img {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.logo-icon {
  width: 2.25rem;
  height: 2.25rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--foreground);
}

/* Navigation */
nav {
  display: flex;
  gap: 0.25rem;
}

.site-switch {
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  max-width: 44rem;
  padding: 0;
  background: transparent;
}

nav a {
  padding: 0;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
  font-weight: 700;
  transition: color 0.2s;
}

nav a:hover, nav a.active {
  color: var(--primary);
}

.site-product-link {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 2.25rem;
  padding: 0;
  white-space: nowrap;
}

.site-product-link:hover {
  color: var(--foreground);
}

.site-product-link.active {
  color: var(--foreground);
}

.site-product-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.25rem;
  height: 0.125rem;
  border-radius: 999px;
  background: var(--primary);
}

/* User Menu */
.user-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 9.5rem;
  padding: 0.375rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.25rem);
  transition: all 0.16s ease;
  z-index: 80;
}

.user-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown a {
  display: flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 0.75rem;
  border-radius: calc(var(--radius-sm) - 0.125rem);
  color: var(--foreground);
  font-size: 0.875rem;
}

.user-dropdown a:hover {
  background: var(--muted);
  color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(99,91,255,0.5);
  transform: translateY(-1px);
}

.btn-outline {
  background: white;
  border: 1px solid var(--border);
  color: var(--foreground);
}

.btn-outline:hover {
  background: var(--muted);
}

.btn-ghost {
  background: transparent;
  color: var(--muted-foreground);
}

.btn-ghost:hover,
.btn-ghost.active {
  background: var(--muted);
  color: var(--foreground);
}

.btn-login {
  background: rgba(99,91,255,0.1);
  color: var(--primary);
  border: 1px solid rgba(99,91,255,0.18);
}

.btn-login:hover {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-primary);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.3s ease-out;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-light);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.card-content {
  padding: 1.25rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-success {
  background: var(--success);
  color: var(--success-foreground);
}

.badge-warning {
  background: var(--warning);
  color: var(--warning-foreground);
}

.badge-destructive {
  background: var(--destructive);
  color: var(--destructive-foreground);
}

.badge-info {
  background: var(--info);
  color: var(--info-foreground);
}

.badge-secondary {
  background: var(--muted);
  color: var(--muted-foreground);
}

.badge-outline {
  background: transparent;
  border: 1px solid var(--border);
}

/* Form Elements */
.input, .select, .textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  background: var(--muted);
  transition: all 0.2s;
  font-family: inherit;
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,91,255,0.1);
}

.input:disabled, .select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.form-error {
  font-size: 0.75rem;
  color: var(--destructive);
}

/* Checkbox & Switch */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox {
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  cursor: pointer;
}

.switch-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.switch {
  width: 2.5rem;
  height: 1.25rem;
  background: var(--muted);
  border-radius: 9999px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}

.switch.active {
  background: var(--primary);
}

.switch::after {
  content: '';
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 1rem;
  height: 1rem;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

.switch.active::after {
  transform: translateX(1.25rem);
}

/* Hero Section */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(99,91,255,0.05), rgba(99,91,255,0.1), rgba(6,182,212,0.05));
  border: 1px solid rgba(99,91,255,0.1);
  padding: 2rem;
  margin-bottom: 2rem;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--muted-foreground);
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

/* Auth */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(circle at top left, rgba(99,91,255,0.12), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(6,182,212,0.12), transparent 30rem),
    var(--background);
}

.auth-panel {
  width: 100%;
  max-width: 440px;
}

.auth-logo {
  justify-content: center;
  margin-bottom: 1.5rem;
}

.auth-card {
  box-shadow: var(--shadow-lg);
}

.auth-card .card-content {
  padding: 2rem;
}

.auth-heading {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-heading h1 {
  font-size: 1.75rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.auth-heading p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.auth-alert {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(239,68,68,0.22);
  background: rgba(239,68,68,0.08);
  color: var(--destructive);
  font-size: 0.875rem;
}

.auth-alert.success {
  border-color: rgba(34,197,94,0.24);
  background: rgba(34,197,94,0.1);
  color: var(--success);
}

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 200;
  min-width: min(360px, calc(100vw - 2rem));
  max-width: min(520px, calc(100vw - 2rem));
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid rgba(15,23,42,0.08);
  background: rgba(255,255,255,0.96);
  color: var(--foreground);
  box-shadow: var(--shadow-lg);
  font-size: 0.9375rem;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -44%) scale(0.98);
  transition: all 0.2s ease-out;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.toast.success {
  border-color: rgba(34,197,94,0.22);
  background: rgba(240,253,244,0.98);
  color: #166534;
}

.toast.error {
  border-color: rgba(239,68,68,0.22);
  background: rgba(254,242,242,0.98);
  color: #991b1b;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  background: var(--muted);
  margin-bottom: 1.25rem;
}

.auth-tabs a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  border-radius: calc(var(--radius-sm) - 0.125rem);
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 600;
}

.auth-tabs a.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
}

.auth-code-row .btn {
  min-width: 7rem;
}

.auth-remember {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.auth-submit {
  width: 100%;
}

.auth-footer {
  display: flex;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 1.5rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
}

/* Filter Section */
.filter-section {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 2rem;
}

.filter-header {
  padding: 1rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.search-box {
  position: relative;
  flex: 1;
}

.search-box input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  background: var(--muted);
  transition: all 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,91,255,0.1);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
}

.filter-panel {
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: none;
}

.filter-panel.active {
  display: block;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filter-group label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.3s ease-out;
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.product-stock {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-bottom: 0.25rem;
}

.load-more-state {
  margin: 1.5rem auto 0;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.pager-info {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.product-image {
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-image img {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  transition: transform 0.5s;
}

.product-card:hover .product-image img {
  transform: scale(1.1);
}

.brand-bg-apple { background: linear-gradient(135deg, #f1f5f9, #e2e8f0); }
.brand-bg-huawei { background: linear-gradient(135deg, #fef2f2, #fee2e2); }
.brand-bg-xiaomi { background: linear-gradient(135deg, #fff7ed, #ffedd5); }
.brand-bg-oppo { background: linear-gradient(135deg, #f0fdf4, #dcfce7); }
.brand-bg-vivo { background: linear-gradient(135deg, #eff6ff, #dbeafe); }
.brand-bg-honor { background: linear-gradient(135deg, #ecfeff, #cffafe); }
.brand-bg-samsung { background: linear-gradient(135deg, #eef2ff, #e0e7ff); }
.brand-bg-oneplus { background: linear-gradient(135deg, #fff1f2, #ffe4e6); }
.brand-bg-realme { background: linear-gradient(135deg, #fefce8, #fef3c7); }
.brand-bg-iqoo { background: linear-gradient(135deg, #f5f3ff, #ede9fe); }
.brand-bg-meizu { background: linear-gradient(135deg, #eff6ff, #dbeafe); }
.brand-bg-nubia { background: linear-gradient(135deg, #fef2f2, #fee2e2); }
.brand-bg-redmagic { background: linear-gradient(135deg, #f3f4f6, #fee2e2); }
.brand-bg-rog { background: linear-gradient(135deg, #f9fafb, #e5e7eb); }
.brand-bg-sony { background: linear-gradient(135deg, #f8fafc, #e2e8f0); }
.brand-bg-google { background: linear-gradient(135deg, #f0fdf4, #dbeafe); }
.brand-bg-motorola { background: linear-gradient(135deg, #eff6ff, #e0e7ff); }
.brand-bg-nokia { background: linear-gradient(135deg, #f0f9ff, #e0f2fe); }
.brand-bg-transsion { background: linear-gradient(135deg, #ecfeff, #cffafe); }
.brand-bg-zte { background: linear-gradient(135deg, #eff6ff, #dbeafe); }
.brand-bg-lenovo { background: linear-gradient(135deg, #fef2f2, #fee2e2); }
.brand-bg-asus { background: linear-gradient(135deg, #f5f3ff, #ede9fe); }
.brand-bg-blackshark { background: linear-gradient(135deg, #f0fdf4, #dcfce7); }
.brand-bg-coolpad { background: linear-gradient(135deg, #f0f9ff, #e0f2fe); }
.brand-bg-tcl { background: linear-gradient(135deg, #f0fdf4, #dcfce7); }
.brand-bg-default { background: linear-gradient(135deg, #f3f4f6, #e5e7eb); }

.brand-tag {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.75rem;
  background: rgba(255,255,255,0.9);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.condition-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: var(--success);
  color: white;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.feature-badges {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  display: flex;
  gap: 0.25rem;
}

.feature-badge {
  padding: 0.125rem 0.5rem;
  background: rgba(255,255,255,0.8);
  border-radius: 0.25rem;
  font-size: 0.75rem;
}

.product-info {
  padding: 1.25rem;
}

.product-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.product-location {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.product-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.spec-tag {
  padding: 0.25rem 0.5rem;
  background: var(--muted);
  border-radius: 0.375rem;
  font-size: 0.75rem;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.price-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.price-unit {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.25rem;
  transition: all 0.2s;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
}

/* Tabs */
.tabs {
  margin-bottom: 1.5rem;
}

.tabs-list {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.tab-btn {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.tab-btn:hover {
  color: var(--foreground);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Dialog */
.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

.dialog-overlay.active {
  opacity: 1;
  visibility: visible;
}

.dialog {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow: auto;
  transform: scale(0.95);
  transition: transform 0.2s;
}

.dialog-sm {
  max-width: 420px;
}

.dialog-overlay.active .dialog {
  transform: scale(1);
}

.dialog-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.dialog-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.dialog-content {
  padding: 1.25rem;
}

.dialog-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* QR Code */
.qr-code {
  width: 200px;
  height: 200px;
  background: var(--muted);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.qr-code svg {
  width: 160px;
  height: 160px;
  color: var(--foreground);
}

/* Progress Steps */
.progress-steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.step-bar {
  height: 0.5rem;
  width: 100%;
  background: var(--muted);
  border-radius: 9999px;
}

.step.active .step-bar {
  background: var(--primary);
}

.step-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.step.active .step-label {
  color: var(--primary);
  font-weight: 500;
}

/* Coupon Card */
.coupon-card {
  display: flex;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.2s;
}

.coupon-card:hover {
  box-shadow: var(--shadow-md);
}

.coupon-left {
  width: 100px;
  background: var(--primary);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.coupon-amount {
  font-size: 1.5rem;
  font-weight: 700;
}

.coupon-threshold {
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.coupon-right {
  flex: 1;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted-foreground);
}

.empty-state svg {
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

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

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

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

.animate-fade-in {
  animation: fade-in 0.3s ease-out;
}

.animate-slide-up {
  animation: slide-up 0.3s ease-out;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Grid */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }

/* Flex */
.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-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* Spacing */
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }

/* Text */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Colors */
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-destructive { color: var(--destructive); }
.text-muted { color: var(--muted-foreground); }

/* Border */
.border-t { border-top: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.pt-4 { padding-top: 1rem; }
.pb-4 { padding-bottom: 1rem; }

/* Responsive */
@media (max-width: 768px) {
  .console-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }

  .console-project-switch {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .console-project-switch::-webkit-scrollbar {
    display: none;
  }

  .console-project-link {
    flex: 0 0 auto;
  }

  .console-account {
    width: 100%;
    justify-content: space-between;
  }

  .console-layout {
    display: block;
  }

  .console-sidebar {
    position: static;
    height: auto;
    padding: 0.75rem 1rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
  }

  .console-sidebar-title {
    display: none;
  }

  .console-sidebar-nav {
    flex-direction: row;
    min-width: max-content;
  }

  .console-sidebar-nav a {
    min-height: 2.375rem;
    white-space: nowrap;
  }

  .header-content nav {
    display: flex;
  }

  .header-content {
    flex-wrap: wrap;
    height: auto;
    gap: 0.75rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .site-switch {
    order: 3;
    width: 100%;
    max-width: none;
    overflow-x: auto;
    scrollbar-width: none;
    justify-content: flex-start;
  }

  .site-switch::-webkit-scrollbar {
    display: none;
  }

  .site-product-link {
    flex: 0 0 auto;
  }
  
  .product-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-row {
    grid-template-columns: 1fr;
  }
  
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .hero h1 {
    font-size: 1.5rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Utility */
.hidden { display: none; }
.block { display: block; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.rounded { border-radius: var(--radius); }
.rounded-sm { border-radius: var(--radius-sm); }
.overflow-hidden { overflow: hidden; }
.cursor-pointer { cursor: pointer; }
.transition { transition: all 0.2s; }
