/* ========================================
   GÓI VÔ HẠN - STYLES
   Tương thích với Dark Mode
   ======================================== */

/* CSS Variables - Light Mode (Default) */
:root {
  --gvh-bg: #f5f5f5;
  --gvh-card-bg: #ffffff;
  --gvh-border: #e5e5e5;
  --gvh-border-dashed: #d4d4d4;
  --gvh-text: #171717;
  --gvh-text-secondary: #525252;
  --gvh-text-muted: #737373;
  --gvh-hover: rgba(0, 0, 0, 0.03);
  --gvh-input-bg: #ffffff;
  --gvh-input-border: #d4d4d4;
  --gvh-primary: #3b82f6;
  --gvh-primary-hover: #2563eb;
  --gvh-table-header-bg: #fafafa;
}

/* CSS Variables - Dark Mode */
.dark {
  --gvh-bg: #0f172a;
  --gvh-card-bg: #1e293b;
  --gvh-border: #334155;
  --gvh-border-dashed: #475569;
  --gvh-text: #e2e8f0;
  --gvh-text-secondary: #94a3b8;
  --gvh-text-muted: #64748b;
  --gvh-hover: rgba(255, 255, 255, 0.05);
  --gvh-input-bg: #1e293b;
  --gvh-input-border: #475569;
  --gvh-primary: #3b82f6;
  --gvh-primary-hover: #2563eb;
  --gvh-table-header-bg: #1e293b;
}

/* Main Container */
.gvh-main {
  flex-grow: 1;
  padding-top: 1.25rem;
  background: transparent;
  min-height: 100vh;
}

.gvh-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.gvh-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 1.875rem;
}

.gvh-title {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1;
  color: var(--gvh-text);
  margin: 0;
}

.gvh-subtitle {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--gvh-text-secondary);
  margin: 0;
}

/* Filter Section */
.gvh-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: transparent;
  border-radius: 12px;
}

.gvh-search-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 300px;
}

.gvh-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gvh-text-muted);
  font-size: 14px;
}

.gvh-search-input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  background: var(--gvh-input-bg);
  border: 1px solid var(--gvh-input-border);
  border-radius: 8px;
  color: var(--gvh-text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, background-color 0.3s, color 0.3s;
}

.gvh-search-input::placeholder {
  color: var(--gvh-text-muted);
}

.gvh-search-input:focus {
  border-color: var(--gvh-primary);
}

.gvh-filter-selects {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.gvh-select {
  padding: 10px 32px 10px 14px;
  background: var(--gvh-input-bg);
  border: 1px solid var(--gvh-input-border);
  border-radius: 8px;
  color: var(--gvh-text);
  font-size: 14px;
  outline: none;
  cursor: pointer;
  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='%23737373' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  min-width: 130px;
  transition: border-color 0.2s, background-color 0.3s, color 0.3s;
}

.gvh-select:focus {
  border-color: var(--gvh-primary);
}

/* Dark mode select arrow fix */
.dark .gvh-select {
  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='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

/* Table Wrapper */
.gvh-table-wrapper {
  overflow-x: auto;
  background: var(--gvh-card-bg);
  border-radius: 12px;
  border: 1px solid var(--gvh-border);
  transition: background-color 0.3s, border-color 0.3s;
}

/* Table */
.gvh-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

/* Table Header */
.gvh-thead {
  background: var(--gvh-table-header-bg);
  transition: background-color 0.3s;
}

.gvh-thead th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--gvh-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--gvh-border);
  white-space: nowrap;
  transition: color 0.3s, border-color 0.3s;
}

.gvh-thead th.text-right {
  text-align: right;
}

/* Table Body */
.gvh-tbody .gvh-row {
  transition: background-color 0.15s;
}

.gvh-tbody .gvh-row:hover {
  background: var(--gvh-hover);
}

.gvh-cell {
  padding: 0.95rem 1rem;
  vertical-align: middle;
  border-bottom: 1px dashed var(--gvh-border-dashed);
  transition: border-color 0.3s;
}

/* Tool Cell */
.gvh-cell-tool {
  min-width: 260px;
}

.gvh-tool-info {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.gvh-tool-img {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
}

.gvh-tool-name {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.3;
  color: var(--gvh-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s;
}

/* Pills */
.gvh-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background-color 0.3s, border-color 0.3s;
}

.gvh-pill-online {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.25);
}

.gvh-pill-offline {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.25);
}

.gvh-pill-speed {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.22);
}

.gvh-pill-type {
  color: #d97706;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.22);
}

/* Dark mode pill adjustments for better visibility */
.dark .gvh-pill-online {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.35);
}

.dark .gvh-pill-offline {
  color: #f87171;
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.35);
}

.dark .gvh-pill-speed {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.35);
}

.dark .gvh-pill-type {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.35);
}

/* Price */
.gvh-price {
  font-weight: 800;
  font-size: 14px;
  color: var(--gvh-text);
  transition: color 0.3s;
}

/* Action Cell */
.gvh-cell-action {
  text-align: right;
}

/* Buttons */
.gvh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.gvh-btn-primary {
  background: var(--gvh-primary);
  color: #fff;
}

.gvh-btn-primary:hover {
  background: var(--gvh-primary-hover);
}

.gvh-btn-disabled {
  background: var(--gvh-input-bg);
  color: var(--gvh-text-muted);
  cursor: not-allowed;
  border: 1px solid var(--gvh-border);
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

/* Empty States */
.gvh-empty-state {
  padding: 3rem 1rem;
  text-align: center;
}

.gvh-empty-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.gvh-empty-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--gvh-input-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gvh-border);
  transition: background-color 0.3s, border-color 0.3s;
}

.gvh-empty-icon i {
  font-size: 1.75rem;
  color: var(--gvh-text-muted);
  transition: color 0.3s;
}

.gvh-empty-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--gvh-text-muted);
  transition: color 0.3s;
}

.gvh-empty-desc {
  font-size: 0.875rem;
  color: var(--gvh-text-muted);
  transition: color 0.3s;
}

.gvh-no-result {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--gvh-text-muted);
  transition: color 0.3s;
}

/* ========================================
   RESPONSIVE - MOBILE (Card Layout)
   ======================================== */
@media (max-width: 768px) {
  .gvh-container {
    padding: 0 0.75rem;
  }

  .gvh-header {
    padding-bottom: 1.25rem;
  }

  /* Filter Mobile */
  .gvh-filter {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }

  .gvh-search-wrapper {
    max-width: 100%;
  }

  .gvh-filter-selects {
    display: flex;
    gap: 0.5rem;
  }

  .gvh-select {
    flex: 1;
    min-width: 0;
  }

  /* Table wrapper mobile */
  .gvh-table-wrapper {
    background: transparent;
    border: none;
    border-radius: 0;
  }

  /* Hide Table Header on Mobile */
  .gvh-thead {
    display: none;
  }

  /* Table Body as Cards */
  .gvh-tbody {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .gvh-tbody .gvh-row {
    display: block;
    border: 1px dashed var(--gvh-border-dashed);
    border-radius: 16px;
    padding: 1rem;
    background: var(--gvh-card-bg);
    transition: background-color 0.3s, border-color 0.3s;
  }

  .gvh-tbody .gvh-row:hover {
    background: var(--gvh-card-bg);
  }

  .gvh-cell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--gvh-border-dashed);
    width: 100%;
  }

  .gvh-cell:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  /* Data Labels */
  .gvh-cell::before {
    content: attr(data-label);
    color: var(--gvh-text-muted);
    font-weight: 700;
    font-size: 12px;
    flex: 0 0 42%;
    max-width: 42%;
    transition: color 0.3s;
  }

  /* Tool Cell Special Layout */
  .gvh-cell-tool {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-top: 0;
  }

  .gvh-cell-tool::before {
    flex: 0 0 auto;
    max-width: 100%;
  }

  .gvh-tool-info {
    min-width: 0;
    width: 100%;
  }

  /* Action Cell */
  .gvh-cell-action {
    border-bottom: 0;
    padding-top: 12px;
    text-align: left;
  }

  .gvh-cell-action::before {
    display: none;
  }

  .gvh-cell-action .gvh-btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
    border-radius: 12px;
    font-weight: 800;
  }

  /* Empty Row Mobile */
  .gvh-row-empty {
    display: block !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
  }

  .gvh-row-empty[style*="display: none"] {
    display: none !important;
  }
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */
@media (min-width: 769px) and (max-width: 1024px) {
  .gvh-container {
    padding: 0 1.5rem;
  }

  .gvh-cell-tool {
    min-width: 200px;
  }

  .gvh-tool-name {
    font-size: 12px;
  }
}

/* ========================================
   RESPONSIVE - LARGE DESKTOP
   ======================================== */
@media (min-width: 1200px) {
  .gvh-container {
    max-width: 1400px;
  }
}

/* ========================================
   SMOOTH TRANSITIONS FOR THEME CHANGE
   ======================================== */
.gvh-main,
.gvh-table-wrapper,
.gvh-tbody .gvh-row,
.gvh-search-input,
.gvh-select,
.gvh-cell,
.gvh-tool-name,
.gvh-price,
.gvh-btn-disabled,
.gvh-empty-icon,
.gvh-thead,
.gvh-thead th {
  transition: background-color 0.3s ease, 
              border-color 0.3s ease, 
              color 0.3s ease;
}

/* ===================================
   CẤP BẬC - RANK SYSTEM STYLES
   Hỗ trợ Light Mode và Dark Mode
   =================================== */

/* === CARD WRAPPER === */
.capbac-card-wrapper {
    background-color: #ffffff;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.dark .capbac-card-wrapper {
    background-color: #1e293b;
    border-color: #334155;
}

/* === CARD HEADER === */
.capbac-card-header {
    background-color: #fafafa;
    border-color: #e5e7eb;
    color: #1f2937;
}

.dark .capbac-card-header {
    background-color: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

.capbac-card-header h3 {
    color: inherit;
}

/* === CARD BODY === */
.capbac-card-body {
    background-color: #ffffff;
    color: #1f2937;
}

.dark .capbac-card-body {
    background-color: #1e293b;
    color: #e2e8f0;
}

.capbac-card-body h4,
.capbac-card-body h5 {
    color: inherit;
}

/* === RANK IMAGE === */
.capbac-rank-image {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

/* === PROGRESS BAR === */
.capbac-progress-bar {
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.dark .capbac-progress-bar {
    background-color: #475569;
}

.capbac-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* === BADGE STYLES === */
.capbac-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid;
    transition: all 0.3s ease;
}

.capbac-badge-warning {
    color: #d97706;
    border-color: #fbbf24;
    background-color: rgba(251, 191, 36, 0.1);
}

.dark .capbac-badge-warning {
    color: #fbbf24;
    border-color: #fbbf24;
    background-color: rgba(251, 191, 36, 0.15);
}

.capbac-badge-success {
    color: #059669;
    border-color: #34d399;
    background-color: rgba(52, 211, 153, 0.1);
}

.dark .capbac-badge-success {
    color: #34d399;
    border-color: #34d399;
    background-color: rgba(52, 211, 153, 0.15);
}

.capbac-badge-primary {
    color: #2563eb;
    border-color: #60a5fa;
    background-color: rgba(96, 165, 250, 0.1);
}

.dark .capbac-badge-primary {
    color: #60a5fa;
    border-color: #60a5fa;
    background-color: rgba(96, 165, 250, 0.15);
}

/* === RANK ITEM CARD === */
.capbac-item {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dark .capbac-item {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.capbac-item:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.dark .capbac-item:hover {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Active state - cấp bậc hiện tại của user */
.capbac-item-active {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.05);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

.dark .capbac-item-active {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.capbac-item-active:hover {
    border-color: #60a5fa;
    background-color: rgba(59, 130, 246, 0.1);
}

.dark .capbac-item-active:hover {
    border-color: #60a5fa;
    background-color: rgba(59, 130, 246, 0.15);
}

/* === TEXT COLORS === */
.capbac-card-body .text-neutral-500 {
    color: #6b7280;
}

.dark .capbac-card-body .text-neutral-500 {
    color: #9ca3af;
}

/* === ICON WRAPPER === */
.capbac-icon-wrapper i {
    color: #9ca3af;
}

.dark .capbac-icon-wrapper i {
    color: #6b7280;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .capbac-rank-image {
        width: 120px;
        height: 120px;
    }
    
    .capbac-progress-bar {
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .capbac-rank-image {
        width: 100px;
        height: 100px;
    }
    
    .capbac-badge {
        padding: 4px 10px;
        font-size: 11px;
    }
}

/* === ANIMATIONS === */
@keyframes capbac-glow {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.8));
    }
}

.capbac-item-active .capbac-rank-image {
    animation: capbac-glow 2s ease-in-out infinite;
}

@keyframes capbac-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.capbac-card-body .ri-wallet-3-line {
    animation: capbac-pulse 2s ease-in-out infinite;
}


/**
 * Capwall Liên Quân Mobile - Dedicated Styles
 * Dark mode compatible
 */

/* ===== CSS Variables ===== */
:root {
    --cw-radius: 12px;
    --cw-border: #e5e7eb;
    --cw-background: #fff;
    --cw-card: #fff;
    --cw-foreground: #1f2937;
    --cw-muted-foreground: #6b7280;
    --cw-destructive: #ef4444;
    --cw-primary: #6366f1;
    --cw-primary-hover: #4f46e5;
    --cw-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --cw-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --cw-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Dark mode variables */
.dark {
    --cw-border: #374151;
    --cw-background: #1e293b;
    --cw-card: #1e293b;
    --cw-foreground: #f1f5f9;
    --cw-muted-foreground: #94a3b8;
    --cw-destructive: #f87171;
    --cw-primary: #818cf8;
    --cw-primary-hover: #6366f1;
}

/* ===== Icon Font ===== */
@font-face {
    font-family: 'keenicons-filled';
    src: url('https://tool1s.vn/assets/vendors/keenicons/fonts/keenicons-filled.ttf?nz57rx') format('truetype'),
        url('https://tool1s.vn/assets/vendors/keenicons/fonts/keenicons-filled.woff?nz57rx') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

.ki-filled {
    line-height: 1;
    position: relative;
    display: inline-flex;
}

.ki-filled:after,
.ki-filled:before {
    font-family: 'keenicons-filled' !important;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: inline-flex;
}

.ki-eye-slash.ki-filled:after {
    content: "\eae6";
    opacity: 0.1;
}

.ki-eye-slash.ki-filled:before {
    content: "\eae7";
    position: absolute;
}

.ki-eye.ki-filled:after {
    content: "\eae8";
    opacity: 0.1;
}

.ki-eye.ki-filled:before {
    content: "\eae9";
    position: absolute;
}

.ki-face-id.ki-filled:after {
    content: "\eaea";
    opacity: 0.1;
}

.ki-face-id.ki-filled:before {
    content: "\eaeb";
    position: absolute;
}

.ki-lock-2.ki-filled:after {
    content: "\eb87";
    opacity: 0.1;
}

.ki-lock-2.ki-filled:before {
    content: "\eb88";
    position: absolute;
}

.ki-screen.ki-filled:after {
    content: "\ec44";
    opacity: 0.1;
}

.ki-screen.ki-filled:before {
    content: "\ec45";
    position: absolute;
}

.ki-shield-tick.ki-filled:after {
    content: "\ec5c";
    opacity: 0.1;
}

.ki-shield-tick.ki-filled:before {
    content: "\ec5d";
    position: absolute;
}

.ki-user.ki-filled:after {
    content: "\ed05";
    opacity: 0.1;
}

.ki-user.ki-filled:before {
    content: "\ed06";
    position: absolute;
}

.ki-id-card.ki-filled:after {
    content: "\eb45";
    opacity: 0.1;
}

.ki-id-card.ki-filled:before {
    content: "\eb46";
    position: absolute;
}

.ki-cash.ki-filled:after {
    content: "\ea17";
    opacity: 0.1;
}

.ki-cash.ki-filled:before {
    content: "\ea18";
    position: absolute;
}

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

/* ===== Hero Section ===== */
.cw-hero {
    position: relative;
    border-radius: calc(var(--cw-radius) + 4px);
    border: 1px solid color-mix(in oklab, var(--cw-border) 65%, transparent);
    background: radial-gradient(900px 320px at 0% 0%, rgba(99, 102, 241, .10), transparent 55%),
        radial-gradient(800px 280px at 100% 100%, rgba(236, 72, 153, .10), transparent 60%),
        color-mix(in oklab, var(--cw-background) 82%, transparent);
    box-shadow: var(--cw-shadow-md);
    overflow: hidden;
    padding: 1.5rem 2rem;
}

.dark .cw-hero {
    background: radial-gradient(900px 320px at 0% 0%, rgba(99, 102, 241, .15), transparent 55%),
        radial-gradient(800px 280px at 100% 100%, rgba(236, 72, 153, .15), transparent 60%),
        color-mix(in oklab, var(--cw-background) 90%, transparent);
    border-color: color-mix(in oklab, var(--cw-border) 50%, transparent);
}

.cw-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .06;
    background-image: linear-gradient(to right, currentColor 1px, transparent 1px),
        linear-gradient(to bottom, currentColor 1px, transparent 1px);
    background-size: 32px 32px;
    color: #999;
}

.dark .cw-hero::after {
    opacity: .04;
    color: #fff;
}

.cw-hero h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--cw-foreground);
}

@media (min-width: 768px) {
    .cw-hero {
        padding: 2rem;
    }

    .cw-hero h1 {
        font-size: 1.875rem;
    }
}

.cw-hero p {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--cw-muted-foreground);
    max-width: 36rem;
}

/* ===== One Row Grid Layout ===== */
.cw-one-row {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 1.25rem;
}

@media (max-width: 1023px) {
    .cw-one-row {
        grid-template-columns: 1fr;
    }
}

/* ===== Sticky Card ===== */
.cw-sticky-card {
    position: sticky;
    top: 5rem;
}

/* ===== Glass Card ===== */
.cw-glass {
    position: relative;
    border-radius: var(--cw-radius);
    overflow: clip;
    background: color-mix(in oklab, var(--cw-background) 80%, transparent);
    backdrop-filter: saturate(120%) blur(6px);
    border: 1px solid color-mix(in oklab, var(--cw-border) 70%, transparent);
    box-shadow: var(--cw-shadow-sm);
}

.dark .cw-glass {
    background: color-mix(in oklab, var(--cw-background) 90%, transparent);
    border-color: color-mix(in oklab, var(--cw-border) 50%, transparent);
}

.cw-glass::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(99, 102, 241, .35), rgba(236, 72, 153, .35));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.dark .cw-glass::before {
    background: linear-gradient(135deg, rgba(99, 102, 241, .25), rgba(236, 72, 153, .25));
}

.cw-glass-padding {
    padding: 1rem;
}

@media (min-width: 768px) {
    .cw-glass-padding {
        padding: 1.25rem;
    }
}

/* ===== Section Headers ===== */
.cw-section-header {
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed var(--cw-border);
    margin-bottom: 0.75rem;
}

.cw-section-header h2 {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--cw-foreground);
    letter-spacing: -0.01em;
}

.cw-section-header p {
    font-size: 0.75rem;
    color: var(--cw-muted-foreground);
    margin-top: 0.25rem;
}

/* ===== Form Styles ===== */
.cw-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

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

.cw-required {
    color: var(--cw-destructive);
}

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

.cw-hint-small {
    font-size: 0.6875rem;
    color: var(--cw-muted-foreground);
}

/* ===== Input Field ===== */
.cw-field {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--cw-border);
    border-radius: 10px;
    background: var(--cw-card);
    transition: box-shadow 0.2s ease;
}

.cw-field:hover {
    box-shadow: inset 0 0 0 1px color-mix(in oklab, #6366f1 35%, var(--cw-border));
}

.cw-field:focus-within {
    box-shadow: inset 0 0 0 1px var(--cw-primary), 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.cw-field i {
    margin-left: 0.5rem;
    opacity: 0.7;
    color: var(--cw-muted-foreground);
}

.cw-field input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 0.65rem 0.75rem;
    font-size: 0.95rem;
    color: var(--cw-foreground);
}

.cw-field input::placeholder {
    color: var(--cw-muted-foreground);
    opacity: 0.7;
}

.cw-field input:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.cw-btn-plain {
    border: 0;
    background: transparent;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    color: var(--cw-muted-foreground);
    transition: background 0.2s ease;
}

.cw-btn-plain:hover {
    background: rgba(0, 0, 0, .04);
    border-radius: 8px;
}

.dark .cw-btn-plain:hover {
    background: rgba(255, 255, 255, .08);
}

/* ===== Segmented Control ===== */
.cw-segmented {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--cw-border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--cw-card);
    box-shadow: var(--cw-shadow-sm);
}

.cw-segmented input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cw-segmented label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.92rem;
    color: var(--cw-foreground);
    transition: all 0.2s ease;
}

.cw-segmented label i {
    opacity: 0.75;
}

.cw-segmented>input:first-of-type+label {
    border-right: 1px solid var(--cw-border);
}

.cw-segmented input:checked+label {
    background: #eef2ff;
    color: #4338ca;
    font-weight: 600;
}

.dark .cw-segmented input:checked+label {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

/* ===== Primary Button ===== */
.cw-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--cw-primary), #8b5cf6);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.cw-btn-primary:hover {
    background: linear-gradient(135deg, var(--cw-primary-hover), #7c3aed);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.cw-btn-primary:active {
    transform: translateY(0);
}

/* ===== Price Display ===== */
.cw-price-row {
    padding-top: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cw-price {
    color: var(--cw-destructive);
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.cw-price-hint {
    font-size: 0.6875rem;
    color: var(--cw-muted-foreground);
    font-style: italic;
}

/* ===== Security Notice ===== */
.cw-security-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.cw-security-notice i {
    font-size: 1.125rem;
    color: var(--cw-primary);
    flex-shrink: 0;
}

.cw-security-notice .cw-security-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cw-security-notice p {
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--cw-muted-foreground);
}

.cw-security-notice p:not(:first-child) {
    font-size: 0.6875rem;
}

/* ===== Preview Card ===== */
.cw-preview-card {
    min-height: 320px;
}

.cw-preview-header {
    margin-bottom: 0.75rem;
}

.cw-preview-header h2 {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--cw-foreground);
}

.cw-preview-header p {
    font-size: 0.75rem;
    color: var(--cw-muted-foreground);
    margin-top: 0.25rem;
}

.cw-preview-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem;
    border-radius: var(--cw-radius);
    border: 1px dashed color-mix(in oklab, var(--cw-border) 90%, transparent);
    background: color-mix(in oklab, var(--cw-background) 92%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--cw-border) 70%, transparent);
}

.cw-preview-inner {
    border-radius: calc(var(--cw-radius) - 4px);
    overflow: hidden;
    box-shadow: var(--cw-shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cw-preview-inner:hover {
    transform: scale(1.01);
    box-shadow: var(--cw-shadow-lg);
}

.cw-preview-img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(100%, 1100px);
    max-height: 72vh;
    object-fit: contain;
}

/* ===== Table Styles ===== */
.cw-scrollable-x {
    overflow-x: auto;
}

.cw-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.cw-table th,
.cw-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--cw-border);
}

.cw-table th {
    font-weight: 500;
    color: var(--cw-foreground);
    background: color-mix(in oklab, var(--cw-background) 95%, transparent);
}

.cw-table td {
    color: var(--cw-foreground);
}

.cw-table tbody tr:hover {
    background: color-mix(in oklab, var(--cw-primary) 5%, transparent);
}

/* ===== Pagination ===== */
.cw-pagination {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--cw-muted-foreground);
}

@media (min-width: 768px) {
    .cw-pagination {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        font-size: 0.875rem;
    }
}

.cw-pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cw-pagination-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .cw-pagination-info {
        justify-content: flex-end;
    }
}

.cw-select {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--cw-border);
    border-radius: 6px;
    background: var(--cw-card);
    color: var(--cw-foreground);
    font-size: 0.75rem;
    cursor: pointer;
}

.cw-btn-sm {
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--cw-border);
    border-radius: 6px;
    background: var(--cw-card);
    color: var(--cw-foreground);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cw-btn-sm:hover:not(:disabled) {
    background: color-mix(in oklab, var(--cw-primary) 10%, var(--cw-card));
}

.cw-btn-sm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Utility Classes ===== */
.cw-space-y-4>*+* {
    margin-top: 1rem;
}

.cw-space-y-5>*+* {
    margin-top: 1.25rem;
}

.cw-space-y-6>*+* {
    margin-top: 1.5rem;
}

.cw-mt-6 {
    margin-top: 1.5rem;
}

.cw-pt-6 {
    padding-top: 1.5rem;
}

@media (min-width: 768px) {
    .cw-pt-6 {
        padding-top: 2rem;
    }
}

.cw-text-center {
    text-align: center;
}

.cw-mobile-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--cw-muted-foreground);
    font-style: italic;
    margin-top: 0.5rem;
}

@media (min-width: 768px) {
    .cw-mobile-hint {
        display: none;
    }
}

/* ===== Mobile Responsive ===== */
@media (max-width: 640px) {

    .cw-hero,
    .cw-glass {
        padding: 12px;
    }

    .cw-scrollable-x {
        overflow-x: visible;
    }

    .cw-table {
        width: 100%;
        table-layout: fixed;
    }

    .cw-table thead {
        display: none;
    }

    .cw-table tr {
        display: block;
        padding: 8px 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.4);
    }

    .cw-table td {
        display: block;
        width: 100%;
        min-width: 0 !important;
        padding: 4px 0;
    }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}