/* ==========================================================================
   Hong Kong Tender Platform - Design System
   ========================================================================== */

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

/* Design Tokens */
:root {
  /* Brand Colors */
  --color-brand-50: #f0f9f4;
  --color-brand-100: #dcf2e3;
  --color-brand-200: #b9e5c8;
  --color-brand-300: #8dd2a5;
  --color-brand-400: #6bbf8a;
  --color-brand-500: #3d9b62; /* V2.0: deepened from #4ea871 */
  --color-brand-600: #2F7A52; /* V2.0: deepened from #3d8d5c */
  --color-brand-700: #32724a;
  --color-brand-800: #295b3c;
  --color-brand-900: #234a32;

  /* Neutral Colors */
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;

  /* V2.0: Authority Blue (official/stats/authority badges) */
  --color-authority-50: #E8F0F8;
  --color-authority-100: #D1E2F0;
  --color-authority-200: #A3C5E0;
  --color-authority-300: #6E9BCB;
  --color-authority-400: #3D72AC;
  --color-authority-500: #0F4C81;
  --color-authority-600: #0A3A66;
  --color-authority-700: #082E51;

  /* Semantic Colors */
  --color-success: #10b981;
  --color-success-bg: #d1fae5;
  --color-warning: #f59e0b;
  --color-warning-bg: #fef3c7;
  --color-error: #ef4444;
  --color-error-bg: #fee2e2;
  --color-info: #3b82f6;
  --color-info-bg: #dbeafe;

  /* Surface */
  --bg-page: #ffffff;
  --bg-soft: #f8faf9;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;

  /* Text */
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --text-inverse: #ffffff;

  /* Border */
  --border-color: #e5e7eb;
  --border-light: #f3f4f6;
  --border-strong: #d1d5db;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-section: 5rem; /* V2.0: section vertical spacing (BTRI breathing room) */

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-3xl: 24px;
  --radius-full: 9999px;

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Layout */
  --header-height: 64px;
  --sidebar-width: 220px;
  --content-max: 1280px;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "PingFang SC",
    "Microsoft JhengHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-page);
  line-height: 1.5;
  min-height: 100dvh;
}

img, svg, video {
  display: block;
  max-width: 100%;
}

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

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

ul, ol {
  list-style: none;
}

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

/* Typography */
.text-xs { font-size: 12px; }
.text-sm { font-size: 13px; }
.text-base { font-size: 14px; }
.text-md { font-size: 15px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 18px; }
.text-2xl { font-size: 20px; }
.text-3xl { font-size: 24px; }
.text-4xl { font-size: 30px; }
.text-5xl { font-size: 36px; }
.text-6xl { font-size: 48px; }
.text-7xl { font-size: 56px; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-brand { color: var(--color-brand-500); }
.text-success { color: var(--color-success); }
.text-error { color: var(--color-error); }
.text-warning { color: var(--color-warning); }

/* ==========================================================================
   Layout
   ========================================================================== */

.app-container {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.app-container.has-sidebar {
  flex-direction: row;
}

.main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
  padding: var(--space-6);
  background: var(--bg-soft);
}

.page-content--wide {
  max-width: 100%;
}

.page-header {
  margin-bottom: var(--space-6);
}

.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.page-header p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================================================
   Header / Navigation (Frontend)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-color);
  height: var(--header-height);
}

.site-header__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.brand__logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--color-brand-300), var(--color-brand-500));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(78, 168, 113, 0.25);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.brand__subtitle {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-primary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: var(--space-8);
}

.nav-link {
  padding: var(--space-2) var(--space-4);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  cursor: pointer;
}

.nav-link:hover {
  color: var(--color-brand-600);
  background: var(--color-brand-50);
}

.nav-link.active {
  color: var(--color-brand-600);
  background: var(--color-brand-50);
}

.search-box {
  flex: 1;
  max-width: 360px;
  position: relative;
}

.search-box input {
  width: 100%;
  height: 38px;
  padding: 0 var(--space-3) 0 36px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  font-size: 13px;
  transition: var(--transition-fast);
}

.search-box input:focus {
  outline: none;
  border-color: var(--color-brand-400);
  background: white;
  box-shadow: 0 0 0 3px var(--color-brand-100);
}

.search-box__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-left: auto;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 20px;
  background: var(--color-brand-50);
}

.header-user__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-brand-500);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.header-user__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-size: 13px;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.lang-switcher:hover {
  background: var(--bg-soft);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 38px;
  padding: 0 var(--space-5);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
}

.btn--sm {
  height: 32px;
  padding: 0 var(--space-3);
  font-size: 13px;
}

.btn--lg {
  height: 44px;
  padding: 0 var(--space-6);
  font-size: 15px;
}

.btn--primary {
  background: var(--color-brand-500);
  color: white;
}

.btn--primary:hover {
  background: var(--color-brand-600);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(78, 168, 113, 0.3);
}

.btn--secondary {
  background: white;
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn--secondary:hover {
  background: var(--bg-soft);
  border-color: var(--border-strong);
}

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

.btn--ghost:hover {
  background: var(--bg-soft);
}

.btn--text {
  background: transparent;
  color: var(--color-brand-600);
  padding: 0 var(--space-2);
  height: auto;
}

.btn--text:hover {
  color: var(--color-brand-700);
}

.btn--danger {
  background: var(--color-error);
  color: white;
}

.btn--danger:hover {
  background: #dc2626;
}

.btn--register {
  background: var(--color-brand-500);
  color: white;
  height: 36px;
  padding: 0 var(--space-4);
  font-size: 13px;
}

.btn--icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
}

.btn--icon:hover {
  background: var(--bg-soft);
  color: var(--text-primary);
}

.btn-group {
  display: inline-flex;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-soft);
  padding: 4px;
  gap: 2px;
}

.btn-group .btn {
  height: 32px;
  padding: 0 var(--space-3);
  font-size: 13px;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
}

.btn-group .btn.active {
  background: white;
  color: var(--color-brand-600);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  height: 40px;
  padding: 0 var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  background: white;
  transition: var(--transition-fast);
}

.form-textarea {
  height: auto;
  min-height: 100px;
  padding: var(--space-3);
  resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-brand-400);
  box-shadow: 0 0 0 3px var(--color-brand-100);
}

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

.input-with-icon {
  position: relative;
}

.input-with-icon__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.input-with-icon .form-input {
  padding-left: 38px;
}

.input-with-icon--right .form-input {
  padding-left: var(--space-3);
  padding-right: 38px;
}

.input-with-icon--right .input-with-icon__icon {
  left: auto;
  right: 12px;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 36px;
  cursor: pointer;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xs);
  transition: var(--transition-fast);
}

.card--hover:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.card__header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.card__body {
  padding: var(--space-6);
}

.card__footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   Badges & Tags
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.badge--brand {
  background: var(--color-brand-50);
  color: var(--color-brand-700);
}

.badge--gray {
  background: var(--color-gray-100);
  color: var(--color-gray-700);
}

.badge--success {
  background: var(--color-success-bg);
  color: #047857;
}

.badge--warning {
  background: var(--color-warning-bg);
  color: #b45309;
}

.badge--error {
  background: var(--color-error-bg);
  color: #b91c1c;
}

.badge--info {
  background: var(--color-info-bg);
  color: #1e40af;
}

.badge--outline {
  background: white;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  background: white;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
  cursor: pointer;
}

.tag:hover {
  border-color: var(--color-brand-400);
  color: var(--color-brand-600);
}

.tag.active {
  background: var(--color-brand-50);
  color: var(--color-brand-700);
  border-color: var(--color-brand-300);
}

/* ==========================================================================
   Status Indicators
   ========================================================================== */

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 4px;
}

.status-dot--success { background: var(--color-success); }
.status-dot--warning { background: var(--color-warning); }
.status-dot--error { background: var(--color-error); }
.status-dot--info { background: var(--color-info); }
.status-dot--gray { background: var(--color-gray-400); }

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-full);
  gap: 6px;
}

.status-pill--running {
  background: var(--color-success-bg);
  color: #047857;
}

.status-pill--closed {
  background: var(--color-gray-100);
  color: var(--color-gray-600);
}

.status-pill--urgent {
  background: var(--color-error);
  color: white;
}

.status-pill--pending {
  background: var(--color-warning-bg);
  color: #b45309;
}

/* ==========================================================================
   Stat Cards (Dashboard)
   ========================================================================== */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.stat-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  position: relative;
  overflow: hidden;
  transition: var(--transition-fast);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.stat-card__icon {
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-brand-50);
  color: var(--color-brand-600);
}

.stat-card__value {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: var(--space-1);
}

.stat-card__label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-card__meta {
  margin-top: var(--space-2);
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table-container {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.table {
  width: 100%;
  font-size: 13px;
}

.table thead th {
  background: var(--bg-soft);
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 12px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}

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

.table tbody tr {
  transition: var(--transition-fast);
}

.table tbody tr:hover {
  background: var(--bg-soft);
}

.table--compact tbody td {
  padding: var(--space-2) var(--space-4);
}

.text-primary-link {
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.text-primary-link:hover {
  color: var(--color-brand-600);
}

.text-link {
  color: var(--color-brand-600);
  cursor: pointer;
  transition: var(--transition-fast);
}

.text-link:hover {
  color: var(--color-brand-700);
  text-decoration: underline;
}

.text-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   Filter Bar
   ========================================================================== */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-4);
  padding: var(--space-4);
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
}

.filter-bar__group {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.filter-bar__divider {
  width: 1px;
  height: 24px;
  background: var(--border-color);
  margin: 0 var(--space-2);
}

.filter-select {
  min-width: 140px;
  height: 36px;
  padding: 0 32px 0 var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13px;
  background: white;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-select:hover {
  border-color: var(--border-strong);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  background: white;
  border-top: 1px solid var(--border-light);
}

.pagination__info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 13px;
  color: var(--text-secondary);
}

.pagination__pages {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.pagination__btn {
  min-width: 32px;
  height: 32px;
  padding: 0 var(--space-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.pagination__btn:hover:not(:disabled) {
  border-color: var(--color-brand-400);
  color: var(--color-brand-600);
}

.pagination__btn.active {
  background: var(--color-brand-500);
  color: white;
  border-color: var(--color-brand-500);
}

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

.pagination__jump {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--text-secondary);
}

.pagination__jump input {
  width: 50px;
  height: 32px;
  text-align: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13px;
}

/* ==========================================================================
   Sidebar (Admin)
   ========================================================================== */

.admin-layout {
  display: flex;
  min-height: 100dvh;
  background: var(--bg-soft);
}

.sidebar {
  width: var(--sidebar-width);
  background: white;
  border-right: 1px solid var(--border-color);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar__brand {
  padding: var(--space-5) var(--space-5);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.sidebar__brand-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-brand-300), var(--color-brand-500));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 3px 8px rgba(78, 168, 113, 0.2);
  flex-shrink: 0;
}

.sidebar__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.sidebar__brand-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar__brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

.sidebar__nav {
  padding: var(--space-4) var(--space-3);
  flex: 1;
}

.sidebar__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}

.sidebar__item:hover {
  background: var(--bg-soft);
  color: var(--text-primary);
}

.sidebar__item.active {
  background: var(--color-brand-50);
  color: var(--color-brand-700);
  font-weight: 600;
}

.sidebar__item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  background: var(--color-brand-500);
  border-radius: 0 2px 2px 0;
}

.sidebar__item-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.sidebar__badge {
  margin-left: auto;
  background: var(--color-error);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

/* Sidebar Group Structure */
.sidebar__group {
  margin-bottom: var(--space-2);
}

.sidebar__group-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px var(--space-3) 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  transition: var(--transition-fast);
}

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

.sidebar__group-text {
  flex: 1;
}

.sidebar__group-arrow {
  font-size: 10px;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.sidebar__lock {
  color: var(--text-muted);
  opacity: 0.6;
}

.sidebar__group-items {
  overflow: hidden;
}

.sidebar__group.expanded > .sidebar__group-label {
  color: var(--text-secondary);
}

/* Badge --blue */
.badge--blue {
  background: #eff6ff;
  color: #2563eb;
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-light);
}

.admin-tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition-fast);
  margin-bottom: -1px;
}

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

.admin-tab.active {
  color: var(--color-brand-600);
  border-bottom-color: var(--color-brand-500);
  font-weight: 600;
}

/* Config / Dict Panels */
.config-panel,
.dict-panel {
  animation: fadeIn 0.2s ease;
}

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

/* Org Tree Nodes */
.org-node__row {
  transition: var(--transition-fast);
}

.org-node__row:hover {
  background: var(--bg-soft);
}

.org-children {
  overflow: hidden;
}

/* Admin Topbar — 頂層工具欄（語言切換 + 用戶信息 + 退出） */
.admin-topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--sidebar-width);
  height: 52px;
  background: white;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 var(--space-6);
  z-index: 90;
}
.admin-topbar__right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.admin-topbar__user {
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-topbar__user-info {
  display: flex;
  flex-direction: column;
}
.admin-topbar__user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}
.admin-topbar__user-role {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.2;
}
.admin-topbar__logout {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.admin-topbar__logout:hover {
  background: #ef4444;
  color: #fff;
}

/* Sidebar brand as clickable link */
.sidebar__brand--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}
.sidebar__brand--link:hover {
  opacity: 0.8;
}

.admin-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding-top: 52px; /* 適應頂層工具欄 */
}

.admin-toolbar {
  background: white;
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-toolbar__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.admin-toolbar__subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.admin-toolbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.admin-main {
  flex: 1;
  padding: var(--space-6);
  overflow-x: auto;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--color-gray-900);
  color: white;
  padding: var(--space-8) 0;
  margin-top: auto;
}

.site-footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.site-footer__brand-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-brand-300), var(--color-brand-500));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
}

.site-footer__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.site-footer__brand-title {
  font-size: 13px;
  font-weight: 700;
}

.site-footer__brand-subtitle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

.site-footer__links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.site-footer__link {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: var(--transition-fast);
}

.site-footer__link:hover {
  color: white;
}

.site-footer__copyright {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Hero Section (Homepage)
   ========================================================================== */

.hero {
  position: relative;
  padding: var(--space-20) var(--space-6);
  background: linear-gradient(180deg, var(--color-brand-50) 0%, white 100%);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(circle at 80% 30%, rgba(110, 200, 140, 0.15), transparent 60%);
  pointer-events: none;
}

.hero__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-12);
  align-items: center;
  position: relative;
}

.hero__eyebrow {
  display: inline-block;
  padding: 6px 14px;
  background: white;
  border: 1px solid var(--color-brand-200);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-brand-700);
  margin-bottom: var(--space-5);
}

.hero__title {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--space-5);
}

.hero__title em {
  font-style: normal;
  color: var(--color-brand-500);
}

.hero__subtitle {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.hero__description {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  max-width: 540px;
}

.hero__search {
  display: flex;
  gap: var(--space-3);
  max-width: 520px;
  margin-bottom: var(--space-5);
}

.hero__search .search-box {
  flex: 1;
  max-width: none;
}

.hero__search .search-box input {
  height: 48px;
  font-size: 14px;
}

.hero__search .btn {
  height: 48px;
  padding: 0 var(--space-6);
}

.hero__tags {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.hero__tags-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-right: var(--space-2);
}

.hero__visual {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-3xl);
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-brand-200), var(--color-brand-400));
  box-shadow: 0 30px 60px -20px rgba(78, 168, 113, 0.3);
}

.hero__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
}

.hero__stat-card {
  position: absolute;
  bottom: var(--space-6);
  left: var(--space-6);
  background: white;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.hero__stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-brand-50);
  color: var(--color-brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.hero__stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   Stats Bar
   ========================================================================== */

.stats-bar {
  background: white;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: var(--space-8) var(--space-6);
}

.stats-bar__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}

.stats-bar__item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.stats-bar__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: var(--color-brand-50);
  color: var(--color-brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stats-bar__value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stats-bar__label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   Section
   ========================================================================== */

.section {
  padding: var(--space-16) var(--space-6);
}

.section--soft {
  background: var(--bg-soft);
}

.section__inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section__eyebrow {
  display: inline-block;
  padding: 4px 12px;
  background: var(--color-brand-50);
  color: var(--color-brand-700);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: var(--space-3);
}

.section__title {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  line-height: 1.2;
}

.section__title-en {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: var(--space-3);
}

.section__subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.section__header--left {
  text-align: left;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.section__header--left .section__title {
  margin-bottom: var(--space-2);
}

.section__header--left .section__subtitle {
  margin: 0;
}

/* ==========================================================================
   Featured Tenders
   ========================================================================== */

.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

.tender-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  cursor: pointer;
}

.tender-card:hover {
  border-color: var(--color-brand-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tender-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.tender-card__category {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--color-brand-50);
  color: var(--color-brand-700);
  font-size: 11px;
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.tender-card__days {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--color-gray-100);
  color: var(--text-secondary);
}

.tender-card__days--urgent {
  background: var(--color-error);
  color: white;
}

.tender-card__days--today {
  background: var(--color-error);
  color: white;
}

.tender-card__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tender-card__tags {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}

.tender-card__tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.tender-card__row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
  color: var(--text-secondary);
}

.tender-card__row-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.tender-card__budget {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-brand-600);
}

.tender-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-muted);
}

.tender-card__status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

/* ==========================================================================
   Service Features
   ========================================================================== */

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

.service-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-5);
  text-align: center;
  transition: var(--transition-fast);
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-brand-200);
}

.service-card__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--color-brand-50);
  color: var(--color-brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-card__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.service-card__title-en {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.service-card__description {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Process Steps
   ========================================================================== */

.process-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-3);
  align-items: stretch;
}

.process-step {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-4);
  text-align: center;
  position: relative;
  transition: var(--transition-fast);
}

.process-step:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.process-step__num {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-brand-500);
  color: white;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(78, 168, 113, 0.3);
}

.process-step__icon {
  width: 48px;
  height: 48px;
  margin: var(--space-3) auto var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-brand-50);
  color: var(--color-brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
}

.process-step__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.process-step__description {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.process-arrow {
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-brand-300);
  z-index: 1;
}

/* ==========================================================================
   Cases / Success Stories
   ========================================================================== */

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.case-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: var(--transition-fast);
  cursor: pointer;
}

.case-card:hover {
  border-color: var(--color-brand-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.case-card__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.case-card__logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--color-brand-50);
  color: var(--color-brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-card__brand-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.case-card__brand-en {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.case-card__project {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.case-card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.case-card__value {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-brand-600);
  margin-bottom: var(--space-4);
}

.case-card__badge {
  display: inline-block;
  padding: 2px 10px;
  background: var(--color-brand-50);
  color: var(--color-brand-700);
  font-size: 11px;
  font-weight: 500;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-3);
}

.case-card__description {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-light);
}

/* ==========================================================================
   Data Source Grid (Homepage)
   ========================================================================== */

.data-source-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.data-source-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-6) var(--space-4);
  background: white;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.data-source-card:hover {
  border-color: var(--color-brand-300);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.data-source-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-brand-50);
  border-radius: 12px;
  color: var(--color-brand-500);
  margin-bottom: var(--space-3);
}

.data-source-card__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.data-source-card__name-en {
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .data-source-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   Overseas Enterprise Page
   ========================================================================== */

.overseas-hero {
  padding: var(--space-20) var(--space-6) var(--space-16);
  background: linear-gradient(180deg, var(--color-brand-50), white);
}

.overseas-hero__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.overseas-hero__badge {
  display: inline-block;
  padding: 4px 12px;
  background: white;
  border: 1px solid var(--color-brand-200);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-brand-700);
  margin-bottom: var(--space-5);
}

.overseas-hero__title {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.overseas-hero__title-em {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-brand-500);
  display: block;
  margin-bottom: var(--space-5);
}

.overseas-hero__subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-6);
  max-width: 480px;
}

.overseas-hero__search {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  max-width: 520px;
}

.overseas-hero__search .search-box {
  flex: 1;
  max-width: none;
}

.overseas-hero__search .search-box input {
  height: 48px;
}

.overseas-hero__search .btn {
  height: 48px;
  padding: 0 var(--space-6);
}

.overseas-hero__cta {
  display: flex;
  gap: var(--space-3);
}

.overseas-hero__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.overseas-stat {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-align: center;
  transition: var(--transition-fast);
}

.overseas-stat:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.overseas-stat__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-brand-50);
  color: var(--color-brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
}

.overseas-stat__value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: var(--space-1);
}

.overseas-stat__value--small {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: var(--space-1);
}

.overseas-stat__label {
  font-size: 12px;
  color: var(--text-muted);
}

/* Market advantages */
.advantage-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

.advantage-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: var(--transition-fast);
}

.advantage-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.advantage-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-brand-50);
  color: var(--color-brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.advantage-card__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.advantage-card__description {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Service detail grid */
.service-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.service-detail-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: var(--transition-fast);
}

.service-detail-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.service-detail-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-brand-50);
  color: var(--color-brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.service-detail-card__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.service-detail-card__description {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Country cards */
.country-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-4);
}

.country-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-4);
  text-align: center;
  transition: var(--transition-fast);
  cursor: pointer;
}

.country-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-brand-200);
}

.country-card__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-3);
  color: var(--color-info);
}

.country-card__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.country-card__name-en {
  font-size: 12px;
  color: var(--text-muted);
}

.country-card__footer {
  text-align: center;
  margin-top: var(--space-6);
  font-size: 13px;
  color: var(--text-muted);
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  transition: var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--color-brand-200);
}

.faq-item__header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.faq-item__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--color-brand-500);
  margin-top: 2px;
}

.faq-item__question {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.faq-item__answer {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding-left: 36px;
}

/* ==========================================================================
   Map Page
   ========================================================================== */

.map-page {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 0;
  height: calc(100dvh - var(--header-height));
}

.map-sidebar {
  background: white;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.map-sidebar__header {
  padding: var(--space-4);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.map-sidebar__count {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}

.map-sidebar__count strong {
  color: var(--color-brand-600);
  font-weight: 700;
}

.map-sidebar__search {
  position: relative;
  margin-bottom: var(--space-3);
}

.map-sidebar__search input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13px;
}

.map-sidebar__search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.map-sidebar__filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-2);
}

.map-sidebar__filter {
  height: 32px;
  padding: 0 24px 0 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 12px;
  background: white;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
}

.map-sidebar__list {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-3);
}

.map-tender-item {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-2);
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}

.map-tender-item:hover {
  border-color: var(--color-brand-300);
  box-shadow: var(--shadow-sm);
}

.map-tender-item.active {
  border-color: var(--color-brand-500);
  background: var(--color-brand-50);
}

.map-tender-item__indicator {
  position: absolute;
  left: 12px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-brand-500);
}

.map-tender-item.has-urgent .map-tender-item__indicator {
  background: var(--color-error);
}

.map-tender-item__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  padding-left: 16px;
  padding-right: 16px;
  line-height: 1.4;
}

.map-tender-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
  padding-left: 16px;
}

.map-tender-item__meta-item {
  display: flex;
  align-items: center;
  gap: 3px;
}

.map-tender-item__tags {
  display: flex;
  gap: var(--space-2);
  padding-left: 16px;
  flex-wrap: wrap;
}

.map-tender-item__tag {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--bg-soft);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
}

.map-tender-item__tag--closing {
  background: var(--color-warning-bg);
  color: #b45309;
}

.map-canvas {
  background: #c8e0d4;
  position: relative;
  overflow: hidden;
}

.map-canvas__placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #b8d4c0 0%, #c8e0d4 50%, #d4e8d8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.map-canvas__legend {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: 12px;
}

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

.map-canvas__legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.map-canvas__attribution {
  position: absolute;
  bottom: 6px;
  right: 10px;
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.8);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Tender Detail Page
   ========================================================================== */

.detail-page {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-6) var(--space-6) var(--space-12);
}

.detail-page__tags {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.detail-page__tag {
  padding: 3px 12px;
  background: var(--color-brand-50);
  color: var(--color-brand-700);
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-full);
}

.detail-page__title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: var(--space-3);
}

.detail-page__subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.detail-page__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--space-5);
}

.detail-page__actions {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.detail-section {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-4);
}

.detail-section__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.detail-section__title-icon {
  color: var(--color-brand-500);
}

.detail-section__subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.detail-info-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.detail-info-card__label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.detail-info-card__label-icon {
  color: var(--text-muted);
}

.detail-info-card__value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.detail-info-card__value--brand {
  color: var(--color-brand-600);
}

.detail-section-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.detail-cta-card {
  background: linear-gradient(135deg, var(--color-brand-50), white);
  border: 1px solid var(--color-brand-200);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-align: center;
  margin-bottom: var(--space-4);
}

.detail-cta-card__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.detail-cta-card__description {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-4);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Login Page
   ========================================================================== */

.auth-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: var(--bg-soft);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
}

.auth-card__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.auth-card__title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.auth-card__subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: var(--space-6);
}

.auth-tab {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

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

.auth-form__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.auth-form__forgot {
  font-size: 13px;
  color: var(--color-brand-600);
  cursor: pointer;
}

.auth-submit {
  width: 100%;
  height: 44px;
  background: var(--color-brand-500);
  color: white;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  cursor: pointer;
  transition: var(--transition-fast);
  margin-bottom: var(--space-4);
}

.auth-submit:hover {
  background: var(--color-brand-600);
}

.auth-footer {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-light);
}

.auth-footer__link {
  color: var(--color-brand-600);
  font-weight: 500;
  cursor: pointer;
}

.auth-footer__note {
  margin-top: var(--space-3);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   Charts (Dashboard)
   ========================================================================== */

.chart-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
}

.chart-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

.chart-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.chart-card__subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.chart-card__legend {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.chart-card__legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

.chart-card__legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.chart-svg {
  width: 100%;
  height: 240px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}

.dashboard-grid--charts {
  grid-template-columns: 1fr 1fr;
}

.dashboard-grid--stats-bottom {
  grid-template-columns: 1fr 1fr;
}

.match-rate-card {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: var(--space-5);
}

.donut-chart {
  position: relative;
  width: 200px;
  height: 200px;
}

.donut-chart__center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.donut-chart__center-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.donut-chart__center-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 200px;
  padding: var(--space-4) 0;
  gap: var(--space-3);
}

.bar-chart__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  height: 100%;
}

.bar-chart__bar {
  width: 100%;
  max-width: 40px;
  background: var(--color-brand-500);
  border-radius: 4px 4px 0 0;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 6px;
  color: white;
  font-size: 11px;
  font-weight: 600;
  transition: var(--transition-fast);
}

.bar-chart__bar:hover {
  background: var(--color-brand-600);
}

.bar-chart__label {
  font-size: 12px;
  color: var(--text-secondary);
}

.line-chart {
  height: 200px;
  position: relative;
}

.line-chart svg {
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   Match List
   ========================================================================== */

.match-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.match-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  cursor: pointer;
}

.match-item:hover {
  background: var(--color-brand-50);
}

.match-item__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-brand-100);
  color: var(--color-brand-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.match-item__info {
  flex: 1;
  min-width: 0;
}

.match-item__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.match-item__role {
  font-size: 11px;
  color: var(--text-muted);
}

.match-item__score {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-brand-600);
}

/* ==========================================================================
   Activity / Todo
   ========================================================================== */

.activity-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-light);
}

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

.activity-item__icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-item--brand .activity-item__icon {
  background: var(--color-brand-50);
  color: var(--color-brand-600);
}

.activity-item--warning .activity-item__icon {
  background: var(--color-warning-bg);
  color: #b45309;
}

.activity-item--error .activity-item__icon {
  background: var(--color-error-bg);
  color: #b91c1c;
}

.activity-item__content {
  flex: 1;
}

.activity-item__title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.activity-item__meta {
  font-size: 11px;
  color: var(--text-muted);
}

.activity-item__badge {
  font-size: 11px;
  font-weight: 600;
  background: var(--color-error);
  color: white;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.quick-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.quick-action:hover {
  background: var(--color-brand-50);
  color: var(--color-brand-700);
}

/* ==========================================================================
   Toggle Switch
   ========================================================================== */

.toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle__slider {
  position: absolute;
  inset: 0;
  background: var(--color-gray-300);
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.toggle__slider::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.toggle input:checked + .toggle__slider {
  background: var(--color-brand-500);
}

.toggle input:checked + .toggle__slider::before {
  transform: translateX(16px);
}

/* ==========================================================================
   Tabs
   ========================================================================== */

.tabs {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--space-4);
}

.tab {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  bottom: -1px;
}

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

.tab.active {
  color: var(--color-brand-600);
  border-bottom-color: var(--color-brand-500);
}

.tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  background: var(--color-error);
  color: white;
  font-size: 10px;
  font-weight: 600;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   Star Rating
   ========================================================================== */

.star-rating {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: #f59e0b;
}

.star-rating--empty {
  color: var(--color-gray-300);
}

/* Progress bar */
.progress {
  width: 80px;
  height: 6px;
  background: var(--color-gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress__bar {
  height: 100%;
  background: var(--color-brand-500);
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

.progress--success .progress__bar {
  background: var(--color-success);
}

/* Avatar group */
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-brand-100);
  color: var(--color-brand-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  border: 2px solid white;
  flex-shrink: 0;
}

.avatar--sm {
  width: 24px;
  height: 24px;
  font-size: 11px;
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar-stack .avatar {
  margin-left: -8px;
}

.avatar-stack .avatar:first-child {
  margin-left: 0;
}

/* Action buttons in tables */
.action-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.action-btn:hover {
  background: var(--bg-soft);
  color: var(--text-primary);
}

.action-btn--danger:hover {
  background: var(--color-error-bg);
  color: var(--color-error);
}

.action-btns {
  display: flex;
  gap: 2px;
  justify-content: flex-end;
}

/* Alert */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}

.alert--info {
  background: var(--color-info-bg);
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.alert--warning {
  background: var(--color-warning-bg);
  border: 1px solid #fde68a;
  color: #b45309;
}

.alert--error {
  background: var(--color-error-bg);
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.alert--success {
  background: var(--color-success-bg);
  border: 1px solid #a7f3d0;
  color: #047857;
}

/* Empty state */
.empty-state {
  padding: var(--space-12) var(--space-6);
  text-align: center;
}

.empty-state__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state__title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.empty-state__description {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

/* ==========================================================================
   Utility
   ========================================================================== */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.cursor-pointer { cursor: pointer; }
.relative { position: relative; }

.hidden { display: none; }

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

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

::-webkit-scrollbar-thumb {
  background: var(--color-gray-200);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-300);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .hero__inner,
  .overseas-hero__inner {
    grid-template-columns: 1fr;
  }
  .featured-grid,
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .process-flow {
    grid-template-columns: repeat(2, 1fr);
  }
  .advantage-grid,
  .service-detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .country-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .case-grid {
    grid-template-columns: 1fr;
  }
  .stats-bar__inner {
    grid-template-columns: repeat(2, 1fr);
  }
  .map-page {
    grid-template-columns: 1fr;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .detail-section-row {
    grid-template-columns: 1fr;
  }
  .dashboard-grid,
  .dashboard-grid--charts,
  .dashboard-grid--stats-bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .site-header__inner {
    gap: var(--space-3);
    padding: 0 var(--space-4);
  }
  .nav-primary {
    display: none;
  }
  .search-box {
    max-width: none;
  }
  .featured-grid,
  .service-grid,
  .advantage-grid,
  .service-detail-grid {
    grid-template-columns: 1fr;
  }
  .country-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .section__title {
    font-size: 28px;
  }
  .hero__title,
  .overseas-hero__title,
  .overseas-hero__title-em {
    font-size: 36px;
  }
  .admin-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  .page-content,
  .admin-main {
    padding: var(--space-4);
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ==================== 會員中心側邊欄分組 ==================== */
.member-sidebar__group {
  margin-bottom: 4px;
}
.member-sidebar__group-title {
  padding: 10px 16px 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.member-sidebar__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.member-sidebar__item:hover {
  background: var(--color-brand-50);
  color: var(--color-brand-600);
}
.member-sidebar__item.active {
  background: var(--color-brand-50);
  color: var(--color-brand-600);
  font-weight: 500;
}
.member-sidebar__badge {
  margin-left: auto;
  background: var(--color-error);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  font-weight: 600;
}

/* ==================== 會員中心新頁面樣式 ==================== */

/* 消息 Tab */
.member-msg-tab {
  transition: all 0.2s;
  user-select: none;
}
.member-msg-tab:hover {
  color: var(--color-brand-500) !important;
}

/* FAQ 摺疊過渡 */
.faq-arrow,
.faq-q-arrow {
  transition: transform 0.2s;
}

/* 響應式：會員中心側邊欄 */
@media (max-width: 768px) {
  .member-sidebar__group-title {
    padding: 8px 12px 4px;
  }
  .member-sidebar__item {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* ==================== 後台側邊欄 - 當前管理員卡片 ==================== */
.sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 8px 12px 12px;
  background: var(--color-brand-50, #eff6ff);
  border-radius: 10px;
  border: 1px solid rgba(37, 99, 235, 0.12);
}
.sidebar__user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}
.sidebar__user-info {
  flex: 1;
  min-width: 0;
}
.sidebar__user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar__user-role {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.sidebar__user-logout {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.sidebar__user-logout:hover {
  background: #ef4444;
  color: #fff;
}

/* ==========================================================================
   V2.0 UI/UX UPGRADE — BTRI-inspired components & tri-lingual system
   ========================================================================== */

/* --- Tri-lingual font switching (pure CSS attribute selectors, zero JS) --- */
html[lang="zh-CN"] body {
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "PingFang SC", "Noto Sans SC", -apple-system, "Helvetica Neue", Arial, sans-serif;
}
html[lang="zh-HK"] body {
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang HK", "PingFang TC",
    "Microsoft JhengHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "PingFang HK", "PingFang TC", "Noto Sans HK", -apple-system,
    "Helvetica Neue", Arial, sans-serif;
}
html[lang="en"] body {
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    Helvetica, Arial, sans-serif;
  --font-display: "Inter", "Helvetica Neue", -apple-system, Arial, sans-serif;
}

.stat-hero__value,
[data-count-up] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-family: var(--font-display);
}

/* --- Section spacing upgrade (BTRI breathing room 5rem) --- */
.section {
  padding: var(--space-section) var(--space-6);
}

/* --- Section eyebrow (authority blue pill) --- */
.section__eyebrow--authority {
  display: inline-block;
  padding: 4px 14px;
  background: var(--color-authority-50);
  color: var(--color-authority-600);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: var(--space-3);
}

/* ==========================================================================
   Stat Hero — large number statistics (48px+, BTRI 40+/45+)
   ========================================================================== */
.stat-hero {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  padding: var(--space-12) var(--space-8);
}
.stat-hero__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}
.stat-hero__item {
  text-align: center;
  position: relative;
}
.stat-hero__item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: calc(var(--space-6) * -0.5);
  top: 15%;
  height: 70%;
  width: 1px;
  background: var(--border-light);
}
.stat-hero__value {
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  color: var(--color-authority-500);
  letter-spacing: -0.02em;
}
.stat-hero__value .stat-hero__suffix {
  font-size: 36px;
  font-weight: 700;
}
.stat-hero__label {
  margin-top: var(--space-3);
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   Entry Cards — three quick-access cards under hero (BTRI multi-entry)
   ========================================================================== */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
.entry-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
  cursor: pointer;
}
.entry-card:hover {
  border-color: var(--color-authority-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.entry-card:hover .entry-card__arrow {
  transform: translateX(3px);
  color: var(--color-authority-500);
}
.entry-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--color-authority-50);
  color: var(--color-authority-500);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.entry-card__body { flex: 1; min-width: 0; }
.entry-card__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.entry-card__desc {
  font-size: 13px;
  color: var(--text-muted);
}
.entry-card__arrow {
  color: var(--text-muted);
  transition: var(--transition-fast);
  flex-shrink: 0;
}

/* ==========================================================================
   Arrow Link — micro-interaction (BTRI hover white-blue arrow shift)
   ========================================================================== */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-authority-600);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
}
.arrow-link::after {
  content: "\2192";
  font-size: 16px;
  transition: transform var(--transition-fast);
}
.arrow-link:hover {
  color: var(--color-authority-700);
}
.arrow-link:hover::after {
  transform: translateX(4px);
}

/* ==========================================================================
   Milestone Timeline — vertical timeline (BTRI "Our Milestones")
   ========================================================================== */
.milestone-timeline {
  max-width: 820px;
  margin: 0 auto;
  position: relative;
}
.milestone-timeline::before {
  content: "";
  position: absolute;
  left: 120px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--color-authority-200), var(--color-authority-100));
}
.milestone-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--space-8);
  padding: var(--space-4) 0;
  position: relative;
}
.milestone-item__year-block {
  text-align: right;
  padding-right: var(--space-6);
}
.milestone-item__year {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-authority-500);
  font-family: var(--font-display);
  line-height: 1.1;
}
.milestone-item__date {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.milestone-item__node {
  position: absolute;
  left: 113px;
  top: 18px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-authority-500);
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--color-authority-200);
  transition: var(--transition-fast);
  z-index: 1;
}
.milestone-item:hover .milestone-item__node {
  transform: scale(1.3);
  box-shadow: 0 0 0 4px var(--color-authority-100);
}
.milestone-item__card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  box-shadow: var(--shadow-xs);
  transition: var(--transition-fast);
  margin-left: var(--space-6);
}
.milestone-item:hover .milestone-item__card {
  box-shadow: var(--shadow-md);
  border-color: var(--color-authority-200);
}
.milestone-item__event {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
}

/* ==========================================================================
   Pricing Card — membership tier comparison (BTRI membership)
   ========================================================================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  max-width: 760px;
  margin: 0 auto;
}
.pricing-card {
  background: white;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-2xl);
  padding: var(--space-8) var(--space-6);
  position: relative;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
}
.pricing-card--featured {
  border-color: var(--color-authority-500);
  box-shadow: 0 12px 32px -8px rgba(15, 76, 129, 0.18);
}
.pricing-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-authority-500);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 16px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.pricing-card__name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: var(--space-4);
}
.pricing-card__price {
  text-align: center;
  margin-bottom: var(--space-6);
}
.pricing-card__amount {
  font-size: 40px;
  font-weight: 800;
  color: var(--color-authority-500);
  font-family: var(--font-display);
  line-height: 1;
}
.pricing-card__amount--muted { color: var(--text-secondary); }
.pricing-card__period {
  font-size: 14px;
  color: var(--text-muted);
}
.pricing-card__benefits {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.pricing-card__benefit {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.pricing-card__benefit-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}
.pricing-card__benefit-icon--yes { color: var(--color-success); }
.pricing-card__benefit-icon--no { color: var(--text-muted); opacity: 0.5; }
.pricing-card__cta {
  width: 100%;
}

/* ==========================================================================
   Membership Promotion Block (BTRI membership CTA section)
   ========================================================================== */
.membership-promo {
  background: linear-gradient(135deg, var(--color-authority-500), var(--color-authority-600));
  border-radius: var(--radius-2xl);
  padding: var(--space-12) var(--space-8);
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}
.membership-promo::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 50%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.08), transparent 70%);
}
.membership-promo__eyebrow {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.membership-promo__title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: var(--space-3);
  position: relative;
}
.membership-promo__subtitle {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: var(--space-8);
  position: relative;
}
.membership-promo__actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  position: relative;
  flex-wrap: wrap;
}
.membership-promo .btn--primary {
  background: white;
  color: var(--color-authority-600);
}
.membership-promo .btn--secondary {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.4);
}
.membership-promo .btn--secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: white;
}

/* ==========================================================================
   Tender Card thumbnail enhancement (BTRI content card)
   ========================================================================== */
.tender-card__thumb {
  width: 100%;
  height: 140px;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
  background: linear-gradient(135deg, var(--color-authority-50), var(--color-brand-50));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-authority-400);
  overflow: hidden;
  position: relative;
}
.tender-card__thumb::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--color-authority-500);
}
.tender-card--enhanced {
  padding: 0;
  overflow: hidden;
}
.tender-card--enhanced .tender-card__body {
  padding: var(--space-4) var(--space-5) var(--space-5);
}
.tender-card--enhanced:hover {
  border-color: var(--color-authority-300);
}

/* ==========================================================================
   Language Switcher — functional dropdown (V2.0)
   ========================================================================== */
.lang-switcher {
  position: relative;
}
.lang-switcher__trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  background: transparent;
  border: 1px solid transparent;
}
.lang-switcher__trigger:hover {
  background: var(--bg-soft);
  border-color: var(--border-light);
}
.lang-switcher__trigger[aria-expanded="true"] {
  background: var(--bg-soft);
  border-color: var(--border-color);
}
.lang-switcher__chevron {
  transition: transform var(--transition-fast);
}
.lang-switcher__trigger[aria-expanded="true"] .lang-switcher__chevron {
  transform: rotate(180deg);
}
.lang-switcher__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  z-index: 200;
  display: none;
  animation: langFadeIn 0.18s ease;
}
.lang-switcher__menu--open { display: block; }
@keyframes langFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.lang-switcher__option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  width: 100%;
  text-align: left;
  border: none;
  background: none;
}
.lang-switcher__option:hover {
  background: var(--color-authority-50);
  color: var(--color-authority-600);
}
.lang-switcher__option--active {
  color: var(--color-authority-600);
  font-weight: 600;
}
.lang-switcher__option--active::after {
  content: "\2713";
  margin-left: auto;
  color: var(--color-authority-500);
}
.lang-switcher__short {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  background: var(--color-authority-50);
  color: var(--color-authority-600);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ==========================================================================
   Responsive grid upgrade (auto-fit + minmax)
   ========================================================================== */
.featured-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.service-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.case-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.data-source-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

/* ==========================================================================
   Responsive breakpoints (V2.0)
   ========================================================================== */
@media (max-width: 1024px) {
  .stat-hero__grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-8); }
  .stat-hero__item:nth-child(2)::after { display: none; }
  .entry-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; }
  .nav-primary { margin-left: var(--space-4); }
  .process-flow { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .hero { padding: var(--space-12) var(--space-4); }
  .hero__inner { grid-template-columns: 1fr; gap: var(--space-8); }
  .hero__visual { display: none; }
  .hero__title { font-size: 36px; }
  html[lang="en"] .hero__title { font-size: 32px; }
  .stats-bar__inner { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
  .stat-hero { padding: var(--space-8) var(--space-4); }
  .stat-hero__value { font-size: 40px; }
  .stat-hero__item::after { display: none; }
  .nav-primary { display: none; }
  .search-box { display: none; }
  .section { padding: var(--space-12) var(--space-4); }
  .section__title { font-size: 28px; }
  .milestone-timeline::before { left: 8px; }
  .milestone-item { grid-template-columns: 1fr; gap: var(--space-2); }
  .milestone-item__year-block { text-align: left; padding-left: var(--space-8); padding-right: 0; }
  .milestone-item__node { left: 1px; top: 4px; }
  .milestone-item__card { margin-left: var(--space-8); }
  .process-flow { grid-template-columns: 1fr; }
  .membership-promo__title { font-size: 24px; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .stats-bar__inner { grid-template-columns: 1fr; }
  .stat-hero__grid { grid-template-columns: 1fr; }
  .header-user__name { display: none; }
}

/* ==========================================================================
   Accessibility (V2.0 A11y)
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--color-authority-500);
  outline-offset: 2px;
  border-radius: 2px;
}
.btn:focus-visible,
.nav-link:focus-visible,
.tag:focus-visible,
.form-input:focus-visible,
.form-select:focus-visible,
.lang-switcher__trigger:focus-visible,
.lang-switcher__option:focus-visible {
  outline: 2px solid var(--color-authority-500);
  outline-offset: 2px;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Skip-to-content link for screen readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-authority-600);
  color: white;
  padding: 8px 16px;
  z-index: 9999;
  border-radius: 0 0 var(--radius-md) 0;
  font-size: 13px;
}
.skip-link:focus {
  top: 0;
}

/* Authority badge for official/stats context */
.badge--authority {
  background: var(--color-authority-50);
  color: var(--color-authority-600);
}

/* Benefit grid (membership center) */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
@media (max-width: 768px) {
  .benefit-grid { grid-template-columns: repeat(2, 1fr); }
}
.benefit-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-5);
  text-align: center;
  transition: var(--transition-fast);
}
.benefit-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-authority-200);
}
.benefit-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-authority-50);
  color: var(--color-authority-500);
  display: flex;
  align-items: center;
  justify-content: center;
}
.benefit-card__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}
.benefit-card__desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
