/* ============================================
   Design System - Transaction Monitoring Dashboard
   ============================================ */

/* ============================================
   Design Tokens / Variables
   ============================================ */

:root {
  /* Colors */
  --color-bg-primary: #0a0a0a;
  --color-bg-secondary: #101014;
  --color-bg-card: rgba(255, 255, 255, 0.05);
  --color-bg-card-hover: rgba(255, 255, 255, 0.1);
  --color-bg-sidebar: linear-gradient(to bottom, #1a1a1a, #0f0f0f);
  
  --color-text-primary: #ffffff;
  --color-text-secondary: rgba(255, 255, 255, 0.8);
  --color-text-tertiary: rgba(255, 255, 255, 0.6);
  --color-text-muted: #99a1af;
  --color-text-muted-dark: #6a7282;
  
  --color-primary: #ff6b35;
  --color-primary-hover: rgba(255, 107, 53, 0.1);
  --color-danger: #fb2c36;
  --color-danger-light: #ff6467;
  --color-success: #05df72;
  
  --color-border: rgba(255, 255, 255, 0.1);
  --color-border-light: rgba(255, 255, 255, 0.05);
  --color-border-danger: rgba(251, 44, 54, 0.3);
  
  /* Typography */
  --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-display: 'Outfit', sans-serif;
  
  --font-size-xs: 10px;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-md: 16px;
  --font-size-lg: 19px;
  --font-size-xl: 21px;
  --font-size-2xl: 24px;
  --font-size-3xl: 28px;
  --font-size-4xl: 35px;
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --line-height-tight: 1.25;
  --line-height-none: 1;
  --letter-spacing-tight: -0.025em;
  
  /* Spacing */
  --spacing-xs: 0.25rem;    /* 4px */
  --spacing-sm: 0.5rem;     /* 8px */
  --spacing-md: 0.75rem;    /* 12px */
  --spacing-lg: 1rem;       /* 16px */
  --spacing-xl: 1.5rem;     /* 24px */
  --spacing-2xl: 1.75rem;   /* 28px */
  --spacing-3xl: 2.25rem;   /* 36px */
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 18px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 10px 15px -3px rgba(255, 107, 53, 0.2), 0 4px 6px -4px rgba(255, 107, 53, 0.2);
  
  /* Transitions */
  --transition-fast: 150ms;
  --transition-base: 200ms;
  --transition-slow: 300ms;
  --transition-ease: cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Animation Durations */
  --animation-fast: 0.3s;
  --animation-base: 0.5s;
  --animation-slow: 0.7s;
  
  /* Layout */
  --sidebar-width: 220px;
  --sidebar-width-collapsed: 70px;
  --header-height: 84px;
}

/* ============================================
   Reset & Base Styles
   ============================================ */

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

body {
  font-family: var(--font-family-primary);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

::selection {
  background-color: var(--color-primary);
  color: var(--color-text-primary);
}

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

/* Flexbox */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-1 { flex: 1; }
.shrink-0 { flex-shrink: 0; }

/* Grid */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

/* Spacing */
.gap-2 { gap: var(--spacing-sm); }
.gap-3 { gap: var(--spacing-md); }
.gap-4 { gap: var(--spacing-lg); }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: var(--spacing-xl); }
.gap-8 { gap: 2rem; }

.space-y-2 > * + * { margin-top: var(--spacing-sm); }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-6 > * + * { margin-top: var(--spacing-xl); }

.p-4 { padding: var(--spacing-lg); }
.p-6 { padding: var(--spacing-xl); }
.p-7 { padding: var(--spacing-2xl); }
.px-4 { padding-left: var(--spacing-lg); padding-right: var(--spacing-xs); }
.px-7 { padding-left: var(--spacing-2xl); padding-right: var(--spacing-2xl); }
.px-9 { padding-left: var(--spacing-3xl); padding-right: var(--spacing-3xl); }
.py-1 { padding-top: var(--spacing-xs); padding-bottom: var(--spacing-xs); }
.py-2 { padding-top: var(--spacing-sm); padding-bottom: var(--spacing-sm); }
.py-4 { padding-top: var(--spacing-lg); padding-bottom: var(--spacing-lg); }
.pl-6 { padding-left: var(--spacing-xl); }
.pr-4 { padding-right: var(--spacing-lg); }
.pr-6 { padding-right: var(--spacing-xl); }
.pb-4 { padding-bottom: var(--spacing-lg); }

.mt-2 { margin-top: var(--spacing-sm); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-auto { margin-top: auto; }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-6 { margin-bottom: var(--spacing-xl); }

/* Width & Height */
.w-full { width: 100%; }
.w-\[220px\] { width: var(--sidebar-width); }
.w-\[200px\] { width: 200px; }
.w-\[250px\] { width: 250px; }
.w-\[254px\] { width: 254px; }
.w-\[302px\] { width: 302px; }

.h-screen { height: 100vh; }
.h-\[84px\] { height: var(--header-height); }
.h-\[171px\] { height: 171px; }
.h-\[196px\] { height: 196px; }
.h-\[200px\] { height: 200px; }
.h-\[304px\] { height: 304px; }

.min-h-screen { min-height: 100vh; }
.min-w-0 { min-width: 0; }
.min-w-\[800px\] { min-width: 800px; }
.min-w-\[1000px\] { min-width: 1000px; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* Border Radius */
.rounded-\[4px\] { border-radius: var(--radius-sm); }
.rounded-\[8px\] { border-radius: var(--radius-md); }
.rounded-\[12px\] { border-radius: var(--radius-lg); }
.rounded-\[16px\] { border-radius: var(--radius-xl); }
.rounded-\[18px\] { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }
.rounded-tl-\[18px\] { border-top-left-radius: var(--radius-2xl); }

/* Borders */
.border { border-width: 1px; border-style: solid; }
.border-r { border-right-width: 1px; border-right-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-white\/5 { border-color: var(--color-border-light); }
.border-white\/10 { border-color: var(--color-border); }
.border-\[\#fb2c36\]\/30 { border-color: var(--color-border-danger); }

/* Backgrounds */
.bg-\[\#0a0a0a\] { background-color: var(--color-bg-primary); }
.bg-\[\#101014\] { background-color: var(--color-bg-secondary); }
.bg-white\/5 { background-color: var(--color-bg-card); }
.bg-white\/10 { background-color: var(--color-bg-card-hover); }
.bg-\[\#ff6b35\]\/10 { background-color: var(--color-primary-hover); }
.bg-\[\#fb2c36\]\/10 { background-color: rgba(251, 44, 54, 0.1); }
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); }
.from-white\/10 { --tw-gradient-from: rgba(255, 255, 255, 0.1); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(255, 255, 255, 0)); }
.to-transparent { --tw-gradient-to: transparent; }

/* Typography */
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-\[12px\] { font-size: var(--font-size-sm); }
.text-\[14px\] { font-size: var(--font-size-base); }
.text-\[16px\] { font-size: var(--font-size-md); }
.text-\[19px\] { font-size: var(--font-size-lg); }
.text-\[21px\] { font-size: var(--font-size-xl); }
.text-\[24px\] { font-size: var(--font-size-2xl); }
.text-\[28px\] { font-size: var(--font-size-3xl); }
.text-\[35px\] { font-size: var(--font-size-4xl); }

.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

.tracking-tight { letter-spacing: var(--letter-spacing-tight); }
.leading-tight { line-height: var(--line-height-tight); }
.leading-none { line-height: var(--line-height-none); }

.text-white { color: var(--color-text-primary); }
.text-white\/60 { color: var(--color-text-tertiary); }
.text-white\/80 { color: var(--color-text-secondary); }
.text-\[\#05df72\] { color: var(--color-success); }
.text-\[\#6a7282\] { color: var(--color-text-muted-dark); }
.text-\[\#99a1af\] { color: var(--color-text-muted);line-height: 200% }
.text-\[\#ff6b35\] { color: var(--color-primary); }
.text-\[\#ff6467\] { color: var(--color-danger-light); }

/* Effects */
.opacity-5 { opacity: 0.05; }
.pointer-events-none { pointer-events: none; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.transition-all { transition-property: all; transition-timing-function: var(--transition-ease); transition-duration: var(--transition-fast); }
.transition-colors { transition-property: color, background-color, border-color; transition-timing-function: var(--transition-ease); transition-duration: var(--transition-fast); }

.hover\:bg-white\/5:hover { background-color: var(--color-bg-card); }
.hover\:bg-white\/10:hover { background-color: var(--color-bg-card-hover); }
.last\:border-0:last-child { border-width: 0; }

/* Icons */
.icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
}

/* ============================================
   Component Styles
   ============================================ */

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--color-bg-sidebar);
  border-right: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  flex-shrink: 0;
  transition: width var(--transition-slow) var(--transition-ease);
}

.sidebar.collapsed {
  width: var(--sidebar-width-collapsed);
}

.sidebar-header {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border-light);
  padding: 0 var(--spacing-md);
  gap: var(--spacing-md);
}

.sidebar-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar.collapsed .sidebar-logo {
  display: none;
}

.sidebar-toggle {
  background: transparent;
  border: none;
  color: var(--color-text-primary);
  cursor: pointer;
  padding: var(--spacing-sm);
  border-radius: var(--radius-md);
  transition: background-color var(--transition-base);
}

.sidebar-toggle:hover {
  background: var(--color-bg-card-hover);
}

.sidebar-nav {
  flex: 1;
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: 0.625rem var(--spacing-md);
  border-radius: 0.75rem;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: all var(--transition-base);
  height: 48px;
}

.nav-item:hover {
  background: var(--color-bg-card);
}

.nav-item.active {
  background: var(--color-primary);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-primary);
}

.nav-item.active svg {
  stroke: var(--color-text-primary);
}

.nav-item.active svg path {
  stroke: var(--color-text-primary);
}

.nav-item svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.nav-label {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}

.sidebar.collapsed .nav-label {
  display: none;
}

/* Nav Group (Submenu) */
.nav-group {
  display: flex;
  flex-direction: column;
}

.nav-group-header {
  cursor: pointer;
  position: relative;
}

.nav-group-arrow {
  margin-left: auto;
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

.nav-group.expanded .nav-group-arrow {
  transform: rotate(180deg);
}

.nav-submenu {
  display: none;
  flex-direction: column;
  padding-left: calc(var(--spacing-md) + 20px);
  gap: 0.2rem;
  margin-top: 0.2rem;
}

.nav-group.expanded .nav-submenu {
  display: flex;
}

.nav-subitem {
  font-size: var(--font-size-sm);
}

.nav-subitem .nav-label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
}

.nav-subitem.active {
  color: var(--color-text-primary);
}

.sidebar.collapsed .nav-submenu {
  display: none !important;
}

/* Header */
.app-header {
  height: var(--header-height);
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 var(--spacing-3xl);
  position: sticky;
  top: 0;
  z-index: 20;
  flex-shrink: 0;
}

.header-content {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-xl);
}

/* Header Company Logo Section */
.header-company-logo-section {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-company-logo-img {
  height: 60px;
  width: auto;
  object-fit: contain;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  flex-shrink: 0;
}

/* Back Button */
.btn-back {
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: background-color var(--transition-base);
  flex-shrink: 0;
}

.btn-back:hover {
  background: var(--color-bg-card);
}

/* User Profile */
.user-profile {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: transparent;
  cursor: pointer;
  transition: background-color var(--transition-base);
}

.user-profile:hover {
  background: var(--color-bg-card);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-success);
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-email {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  color: var(--color-text-primary);
  line-height: 1.2;
}

.user-role {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  color: var(--color-text-muted);
  line-height: 1.2;
}

/* Logout Button */
.btn-logout {
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: background-color var(--transition-base);
  flex-shrink: 0;
}

.btn-logout:hover {
  background: var(--color-bg-card);
}

.logo {
  font-size: 17px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.current-time {
  color: var(--color-text-tertiary);
  font-size: var(--font-size-base);
}

.btn-icon {
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: background-color var(--transition-base);
}

.btn-icon:hover {
  background: var(--color-bg-card);
}

/* Chart Containers */
.chart-container {
  position: relative;
  width: 100%;
  height: 100%;
}

canvas {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.stat-chart-container {
  position: absolute;
  bottom: var(--spacing-xl);
  right: var(--spacing-xl);
  width: 100px;
  height: 60px;
  z-index: 10;
}

.stat-chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

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

.risk-chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

.alerts-chart-container {
  width: 200px;
  height: 200px;
  flex-shrink: 0;
}

.alerts-chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

.trend-chart-container {
  width: 100%;
  height: 200px;
  position: relative;
}

.trend-chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
}

th, td {
  padding: 0;
}

.data-table {
  width: 100%;
  text-align: left;
  border-collapse: collapse;
  table-layout: fixed; /* 使用固定布局以支持列寬調整 */
}

.data-table th,
.data-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table-wrapper {
  overflow-x: auto;
  width: 100%;
}

.data-table tbody td span {
  padding: 6px 12px !important;
  border-radius: var(--radius-md) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Table Sort Indicator */
.sort-indicator {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  opacity: 0.4;
  transition: opacity var(--transition-base);
  vertical-align: middle;
}

th.sortable:hover .sort-indicator {
  opacity: 0.8;
}

th.sortable {
  user-select: none;
}

th.sortable.active .sort-indicator {
  opacity: 1;
}

.sort-indicator svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  transition: transform var(--transition-base);
}

/* Table Resize Handle */
.resize-handle {
  position: absolute;
  right: -1px;
  top: 0;
  bottom: 0;
  width: 2px;
  cursor: col-resize;
  background: rgba(255, 255, 255, 0.12);
  z-index: 10;
  user-select: none;
  transition: background var(--transition-base);
}

.resize-handle:hover {
  background: rgba(255, 107, 53, 0.5);
  width: 2px;
}

th.resizable {
  position: relative;
  border-right: 1px solid transparent;
  padding-right: 2px !important;
  white-space: nowrap;
}

th.resizable:hover {
  border-right-color: rgba(255, 107, 53, 0.2);
}

th.resizable:hover .resize-handle {
  background: rgba(255, 107, 53, 0.3);
}

/* Export Button Component */
.export-btn {
  width: 86.89px;
  height: 42.18px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 11.7168px;
  border: none;
  flex: none;
  order: 1;
  flex-grow: 0;
  position: relative;
  cursor: pointer;
  transition: background var(--transition-base);
  font-family: var(--font-family-primary);
  font-style: normal;
  font-weight: var(--font-weight-normal);
  font-size: 16.4036px;
  line-height: 23px;
  letter-spacing: -0.17621px;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.export-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.export-btn:active {
  background: rgba(255, 255, 255, 0.1);
}

/* ============================================
   Client Monitoring Page Styles
   ============================================ */

/* Risk Filter Buttons */
.risk-filter-btn {
  padding: 6px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.risk-filter-btn:hover {
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  border-color: var(--color-border);
}

.risk-filter-btn.active {
  background: var(--color-primary);
  color: var(--color-text-primary);
  border-color: var(--color-primary);
}

/* Search Container */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--color-text-muted);
  pointer-events: none;
  z-index: 1;
}

.search-input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  font-family: var(--font-family-primary);
  transition: all var(--transition-base);
}

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

.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* Client List */
.client-list-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 300px;
  max-height: 600px;
}

.client-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.client-list-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-border);
}

.client-list-item.active {
  background: rgba(255, 107, 53, 0.1);
  border-color: var(--color-primary);
}

.client-list-item-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.client-list-item-account {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

.client-list-item-name {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Risk Badge */
.risk-badge {
  padding: 4px 12px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}

.risk-badge.high {
  background: rgba(251, 44, 54, 0.1);
  color: var(--color-danger-light);
  border: 1px solid rgba(251, 44, 54, 0.3);
}

.risk-badge.medium {
  background: rgba(253, 199, 0, 0.1);
  color: #fdc700;
  border: 1px solid rgba(253, 199, 0, 0.3);
}

.risk-badge.low {
  background: rgba(5, 223, 114, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(5, 223, 114, 0.3);
}

/* Client Info Grid */
.client-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 24px;
  margin-bottom: 24px;
}

.client-info-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.client-info-item.full-width {
  grid-column: 1 / -1;
}

.client-info-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  font-weight: var(--font-weight-normal);
}

.client-info-value {
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  font-weight: var(--font-weight-normal);
  word-break: break-word;
}

/* Client Action Buttons */
.client-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--color-border-light);
}

.client-action-btn {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  font-family: var(--font-family-primary);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.client-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-primary);
}

.client-action-btn:active {
  background: rgba(255, 255, 255, 0.1);
}

/* Status Badge */
.status-badge {
  padding: 4px 12px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}

.status-badge.new {
  background: rgba(251, 44, 54, 0.1);
  color: var(--color-danger-light);
  border: 1px solid rgba(251, 44, 54, 0.3);
}

.status-badge.investigating {
  background: rgba(253, 199, 0, 0.1);
  color: #fdc700;
  border: 1px solid rgba(253, 199, 0, 0.3);
}

.status-badge.resolved {
  background: rgba(5, 223, 114, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(5, 223, 114, 0.3);
}

/* Buy/Sell Badge */
.bs-badge {
  padding: 4px 12px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}

.bs-badge.buy {
  background: rgba(5, 223, 114, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(5, 223, 114, 0.3);
}

.bs-badge.sell {
  background: rgba(251, 44, 54, 0.1);
  color: var(--color-danger-light);
  border: 1px solid rgba(251, 44, 54, 0.3);
}

/* Similar Client Page Styles */
.portfolio-chart-container,
.behavioral-chart-container {
  position: relative;
  margin: 0 auto;
}

.portfolio-chart-container canvas,
.behavioral-chart-container canvas {
  max-width: 100%;
  max-height: 100%;
}

/* Wings Page Styles */
.wings-stat-table {
  width: 100%;
  border-collapse: collapse;
}

.wings-stat-table th,
.wings-stat-table td {
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  vertical-align: middle;
  height: 30px;
}

.wings-stat-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-text-muted);
  font-weight: var(--font-weight-bold);
}

.wings-stat-table td {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-normal);
}

.wings-stat-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* STR Reports Page Styles */
.str-info-table {
  width: 100%;
  border-collapse: collapse;
}

.str-info-table th,
.str-info-table td {
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  vertical-align: middle;
  height: 30px;
}

.str-info-table td {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-normal);
}

.str-info-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Alert List (Maker) Page Styles */
.filter-select,
.filter-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  font-family: var(--font-family-primary);
  transition: all var(--transition-base);
}

.filter-select:focus,
.filter-input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.08);
}

.filter-select option {
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
}

.filter-reset-btn {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--color-text-muted);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  font-family: var(--font-family-primary);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.filter-reset-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--color-text-primary);
  color: var(--color-text-primary);
}

.filter-reset-btn:active {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(0.98);
}

/* Password Input Wrapper */
.password-input-wrapper {
  position: relative;
  width: 100%;
}

.password-input-wrapper .filter-input {
  padding-right: 45px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-base);
  z-index: 1;
}

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

.password-toggle svg {
  width: 20px;
  height: 20px;
}

/* Validation Message */
.validation-message {
  display: none;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  line-height: 1.5;
}

.validation-message.show {
  display: block;
}

/* Form Group */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.password-requirements {
  margin-top: 4px;
  margin-bottom: 8px;
}

.password-requirements ul {
  list-style-type: disc;
  padding-left: 20px;
  margin: 0;
}

.password-requirements li {
  margin: 4px 0;
  line-height: 1.5;
  transition: color var(--transition-base);
}

.requirement-item {
  color: var(--color-text-muted);
}

.requirement-item.requirement-met {
  color: var(--color-success);
}

.requirement-item.requirement-unmet {
  color: var(--color-danger);
}

.filter-process-btn {
  padding: 10px 20px;
  background: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  font-family: var(--font-family-primary);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.filter-process-btn:hover {
  background: rgba(255, 107, 53, 0.9);
  border-color: var(--color-primary);
}

.filter-process-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.filter-process-btn:disabled:hover {
  background: var(--color-primary);
}

.file-upload-label {
  padding: 10px 20px;
  background: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  font-family: var(--font-family-primary);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  display: inline-block;
}

.file-upload-label:hover {
  background: rgba(255, 107, 53, 0.9);
  border-color: var(--color-primary);
}

/* File Upload Container */
.file-upload-container {
  width: 100%;
}

.file-upload-dropzone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  transition: all var(--transition-base);
  cursor: pointer;
  display: block;
}

.file-upload-dropzone:hover {
  border-color: var(--color-primary);
  background: rgba(255, 107, 53, 0.05);
}

.file-upload-dropzone.drag-over {
  border-color: var(--color-primary);
  background: rgba(255, 107, 53, 0.1);
  border-style: solid;
}

.file-upload-icon {
  color: var(--color-text-muted);
  margin: 0 auto 16px;
  transition: all var(--transition-base);
}

.file-upload-icon-large {
  color: var(--color-primary);
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.file-upload-dropzone:hover .file-upload-icon,
.file-upload-dropzone:hover .file-upload-icon-large {
  color: var(--color-primary);
  transform: scale(1.05);
}

.file-upload-text-primary {
  color: var(--color-text-muted);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  margin: 0;
  transition: color var(--transition-base);
}

.file-upload-dropzone:hover .file-upload-text-primary {
  color: var(--color-text-primary);
}

.file-upload-wrapper {
  width: 100%;
}

.uploaded-files-list {
  margin-top: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.uploaded-file-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.uploaded-file-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--color-primary);
}

.uploaded-file-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 107, 53, 0.1);
  border-radius: var(--radius-md);
  color: var(--color-primary);
  flex-shrink: 0;
}

.uploaded-file-icon svg {
  width: 24px;
  height: 24px;
}

.uploaded-file-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.uploaded-file-name {
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uploaded-file-size {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
}

.upload-progress-bar {
  width: 100%;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.upload-progress-fill {
  height: 100%;
  background-color: var(--color-primary);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.upload-progress-text {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  margin-top: 4px;
}

.uploaded-file-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-shrink: 0;
}

.upload-success-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-success);
}

.upload-success-icon svg {
  width: 20px;
  height: 20px;
}

.upload-file-delete-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-base);
  padding: 0;
}

.upload-file-delete-btn:hover {
  background: rgba(251, 44, 54, 0.1);
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.file-upload-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.file-upload-link {
  color: var(--color-primary);
  text-decoration: underline;
  cursor: pointer;
  transition: all var(--transition-base);
  display: inline-block;
}

.file-upload-link:hover {
  color: rgba(255, 107, 53, 0.8);
}

/* File Selected Container */
.file-selected-container {
  margin-top: 0;
}

.file-selected-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.file-icon-wrapper {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 107, 53, 0.1);
  border-radius: var(--radius-md);
  color: var(--color-primary);
  flex-shrink: 0;
}

.file-icon-wrapper svg {
  width: 24px;
  height: 24px;
}

.file-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-details p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-remove-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.file-remove-btn:hover {
  background: rgba(251, 44, 54, 0.1);
  border-color: var(--color-danger);
  color: var(--color-danger);
}

/* Delete Button */
.delete-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-base);
  padding: 0;
}

.delete-btn:hover {
  background: rgba(251, 44, 54, 0.1);
  border-color: var(--color-danger);
  color: var(--color-danger);
}

/* Drag and Drop Overlay */
.drag-drop-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  pointer-events: none;
}

.drag-drop-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.drag-drop-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-lg);
  padding: var(--spacing-2xl);
  background-color: var(--color-bg-card);
  border: 2px dashed var(--color-primary);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform var(--transition-base);
}

.drag-drop-overlay.active .drag-drop-content {
  transform: scale(1);
}

.drag-drop-icon {
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* ============================================
   Page Transition Animations
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

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

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

/* Page Enter Animation */
.page-enter {
  animation: fadeIn var(--animation-base) var(--transition-ease);
}

/* Main Content Animation */
main {
  animation: fadeIn var(--animation-base) var(--transition-ease);
}

/* Section Header Animation */
.section-header-enter {
  animation: slideDown var(--animation-base) var(--transition-ease) 0.1s both;
}

/* Card Enter Animations */
.card-enter {
  animation: slideUp var(--animation-base) var(--transition-ease) both;
}

.card-enter-delay-1 {
  animation: slideUp var(--animation-base) var(--transition-ease) 0.1s both;
}

.card-enter-delay-2 {
  animation: slideUp var(--animation-base) var(--transition-ease) 0.2s both;
}

.card-enter-delay-3 {
  animation: slideUp var(--animation-base) var(--transition-ease) 0.3s both;
}

.card-enter-delay-4 {
  animation: slideUp var(--animation-base) var(--transition-ease) 0.4s both;
}

/* Table Enter Animation */
.table-enter {
  animation: slideUp var(--animation-slow) var(--transition-ease) 0.2s both;
}

/* Filter Section Animation */
.filter-enter {
  animation: slideDown var(--animation-base) var(--transition-ease) 0.15s both;
}

/* Sidebar Animation */

/* Header Animation */


/* Stagger Animation for Grid Items */
@keyframes staggerFadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stagger-item {
  opacity: 0;
  animation: staggerFadeIn var(--animation-base) var(--transition-ease) both;
}

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

.drag-drop-text {
  color: var(--color-text-primary);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
  text-align: center;
  margin: 0;
}

.drag-drop-subtext {
  color: var(--color-text-muted);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  text-align: center;
  margin: 0;
}

.filter-refresh-btn {
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  font-family: var(--font-family-primary);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
}

.filter-refresh-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-primary);
}

.action-btn-r,
.action-btn-a {
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  font-family: var(--font-family-primary);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.action-btn-r:hover,
.action-btn-a:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-primary);
}

.select-all-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  font-family: var(--font-family-primary);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.select-all-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-primary);
}

.table-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-primary);
}

.action-btn-f,
.action-btn-s {
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  font-family: var(--font-family-primary);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.sticky-action-buttons {
  position: sticky;
  bottom: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(8px);
  padding: 12px 0;
  z-index: 10;
  margin-top: 16px;
  margin-bottom: -16px;
}

.action-btn-f:hover,
.action-btn-s:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-primary);
}

.action-btn-small {
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  font-family: var(--font-family-primary);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  min-width: 32px;
}

.action-btn-small:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-primary);
}

.action-btn-f-small:hover {
  background: rgba(255, 107, 53, 0.1);
  border-color: var(--color-primary);
}

.action-btn-s-small:hover {
  background: rgba(255, 107, 53, 0.1);
  border-color: var(--color-primary);
}

.action-btn-c-small:hover {
  background: rgba(255, 107, 53, 0.1);
  border-color: var(--color-primary);
}

.action-btn-r-small:hover {
  background: rgba(255, 107, 53, 0.1);
  border-color: var(--color-primary);
}

.action-btn-a-small:hover {
  background: rgba(255, 107, 53, 0.1);
  border-color: var(--color-primary);
}

/* ============================================
   Table Tooltip Styles
   ============================================ */
.table-tooltip {
  position: absolute;
  background: rgba(20, 20, 24, 0.95);
  color: var(--color-text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  white-space: normal;
  max-width: 300px;
  word-wrap: break-word;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.table-tooltip.show {
  opacity: 1;
  visibility: visible;
}

.table-cell-with-tooltip {
  position: relative;
  cursor: default;
}

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

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .xl\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .xl\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 640px) {
  .sm\:text-\[12px\] {
    font-size: var(--font-size-sm);
  }
}

/* ============================================
   Comment Modal Styles
   ============================================ */

.comment-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.comment-modal.active {
  display: flex;
  opacity: 1;
}

.comment-modal-card {
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 32px;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.comment-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  z-index: 10;
}

.comment-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.comment-modal-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin: 0 0 24px 0;
  font-family: var(--font-family-display);
}

.comment-history-section {
  margin-bottom: 24px;
  max-height: 200px;
  overflow-y: auto;
}

.comment-history-section::-webkit-scrollbar {
  width: 6px;
}

.comment-history-section::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.comment-history-section::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.comment-history-section::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.comment-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-history-item {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.comment-history-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.comment-history-item-user {
  color: var(--color-primary);
  font-weight: var(--font-weight-medium);
}

.comment-history-item-time {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

.comment-history-item-content {
  color: var(--color-text-secondary);
  word-break: break-word;
}

.comment-upload-section {
  margin-bottom: 24px;
}

.comment-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.comment-upload-area {
  position: relative;
  border: 2px dashed rgba(255, 107, 53, 0.3);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  background: rgba(255, 107, 53, 0.05);
  cursor: pointer;
  transition: all var(--transition-base);
}

.comment-upload-area:hover {
  border-color: rgba(255, 107, 53, 0.5);
  background: rgba(255, 107, 53, 0.08);
}

.comment-upload-area.dragover {
  border-color: var(--color-primary);
  background: rgba(255, 107, 53, 0.1);
}

.comment-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.comment-upload-content {
  pointer-events: none;
}

.comment-upload-icon {
  color: var(--color-primary);
  margin: 0 auto 12px;
  display: block;
}

.comment-upload-text {
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  margin: 0 0 4px 0;
}

.comment-upload-hint {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  margin: 0;
}

.comment-file-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
}

.comment-file-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.comment-file-item-icon {
  color: var(--color-primary);
  flex-shrink: 0;
}

.comment-file-item-name {
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comment-file-item-size {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  margin-left: 8px;
}

.comment-file-item-remove {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.comment-file-item-remove:hover {
  background: rgba(251, 44, 54, 0.1);
  color: var(--color-danger);
}

.comment-input-section {
  margin-bottom: 24px;
}

.comment-textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  font-family: var(--font-family-primary);
  resize: vertical;
  transition: all var(--transition-base);
}

.comment-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.comment-textarea::placeholder {
  color: var(--color-text-muted);
}

.comment-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.comment-btn-cancel,
.comment-btn-add {
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-base);
  border: 1px solid;
}

.comment-btn-cancel {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--color-text-secondary);
}

.comment-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--color-text-primary);
}

.comment-btn-add {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-primary);
}

.comment-btn-add:hover {
  background: rgba(255, 107, 53, 0.9);
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.comment-btn-add:active {
  transform: translateY(0);
}

/* ============================================
   Alert Detail Panel (Right Sidebar)
   ============================================ */

.alert-detail-panel {
  position: fixed;
  top: var(--header-height);
  right: 0;
  width: 400px;
  height: calc(100vh - var(--header-height));
  background: rgba(16, 16, 20, 0.98);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: none;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition-slow) var(--transition-ease);
  transform: translateX(100%);
}

.alert-detail-panel.active {
  display: flex;
  transform: translateX(0);
}

.alert-detail-header {
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  transition: background-color var(--transition-base);
}

/* Late Alert - 深绿色 #006400 */
.alert-detail-panel.late-alert .alert-detail-header {
  background: #006400 !important;
}

.alert-detail-panel.late-alert .alert-detail-header .alert-detail-title,
.alert-detail-panel.late-alert .alert-detail-header .alert-detail-subtitle {
  color: #ffffff !important;
}

.alert-detail-panel.late-alert .alert-detail-header .alert-detail-title #alertDetailId {
  color: #ffffff !important;
}

/* Follow Up Alert - 深红色 #8b0000 */
.alert-detail-panel.follow-up-alert .alert-detail-header {
  background: #8b0000 !important;
}

.alert-detail-panel.follow-up-alert .alert-detail-header .alert-detail-title,
.alert-detail-panel.follow-up-alert .alert-detail-header .alert-detail-subtitle {
  color: #ffffff !important;
}

.alert-detail-panel.follow-up-alert .alert-detail-header .alert-detail-title #alertDetailId {
  color: #ffffff !important;
}

/* Awaiting Check Alert - 橙色 #ff8c00 */
.alert-detail-panel.awaiting-check-alert .alert-detail-header {
  background: #ff8c00 !important;
}

.alert-detail-panel.awaiting-check-alert .alert-detail-header .alert-detail-title,
.alert-detail-panel.awaiting-check-alert .alert-detail-header .alert-detail-subtitle {
  color: #ffffff !important;
}

.alert-detail-panel.awaiting-check-alert .alert-detail-header .alert-detail-title #alertDetailId {
  color: #ffffff !important;
}

/* ============================================
   Alert List Checker 页面弹窗头部背景色
   ============================================ */

/* Review 和 Resolved Alert - 深红色 #8b0000 */
.alert-detail-panel.review-alert .alert-detail-header,
.alert-detail-panel.resolved-alert .alert-detail-header {
  background: #8b0000 !important;
}

.alert-detail-panel.review-alert .alert-detail-header .alert-detail-title,
.alert-detail-panel.review-alert .alert-detail-header .alert-detail-subtitle,
.alert-detail-panel.resolved-alert .alert-detail-header .alert-detail-title,
.alert-detail-panel.resolved-alert .alert-detail-header .alert-detail-subtitle {
  color: #ffffff !important;
}

.alert-detail-panel.review-alert .alert-detail-header .alert-detail-title #alertDetailId,
.alert-detail-panel.resolved-alert .alert-detail-header .alert-detail-title #alertDetailId {
  color: #ffffff !important;
}

/* All Alert under Maker - 深绿色 #006400 */
.alert-detail-panel.all-alert .alert-detail-header {
  background: #006400 !important;
}

.alert-detail-panel.all-alert .alert-detail-header .alert-detail-title,
.alert-detail-panel.all-alert .alert-detail-header .alert-detail-subtitle {
  color: #ffffff !important;
}

.alert-detail-panel.all-alert .alert-detail-header .alert-detail-title #alertDetailId {
  color: #ffffff !important;
}

.alert-detail-title-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.alert-detail-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  font-family: var(--font-family-display);
  margin: 0;
}

.alert-detail-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.alert-detail-close:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.alert-detail-subtitle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  font-weight: var(--font-weight-medium);
}

.alert-detail-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.alert-detail-content::-webkit-scrollbar {
  width: 6px;
}

.alert-detail-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.alert-detail-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.alert-detail-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.alert-detail-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alert-detail-item.alert-detail-summary {
  flex: 1;
  min-height: 150px;
}

.alert-detail-label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.alert-detail-value {
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  line-height: 1.5;
  word-break: break-word;
}

.alert-detail-summary-text {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
}

.alert-detail-actions {
  padding: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.alert-detail-download {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-base);
}

.alert-detail-download:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.alert-detail-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alert-detail-btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border: 1px solid;
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
  font-family: var(--font-family-primary);
}

.alert-detail-btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-primary);
}

.alert-detail-btn-primary:hover {
  background: rgba(255, 107, 53, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.alert-detail-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
}

.alert-detail-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.alert-detail-btn:active {
  transform: translateY(0);
}

/* ============================================
   Card Report List Page Styles
   ============================================ */

/* Tab Buttons */
.tab-btn {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  font-family: var(--font-family-primary);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-border);
  color: var(--color-text-primary);
}

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

/* Monitoring Tab Buttons */
.monitoring-tab-btn {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--color-text-muted);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  font-family: var(--font-family-primary);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  margin-bottom: -2px;
}

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

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

/* Date List Container */
.date-list-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 300px;
  max-height: calc(100vh - 300px);
}

.date-list-item {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.date-list-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-border);
}

.date-list-item.active {
  background: rgba(255, 107, 53, 0.15);
  border-color: var(--color-primary);
}

.date-list-item-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.date-list-item-date {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

.date-list-item-new {
  padding: 2px 6px;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  margin-left: 8px;
}

.date-list-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.date-list-item-matches {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.date-list-item-status-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.date-list-item-status-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.date-list-item-status-icon.pending {
  background: var(--color-primary);
}

.date-list-item-status-icon.completed {
  background: var(--color-success);
}

.date-list-item-status {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.date-list-item-status.pending {
  color: var(--color-primary);
}

.date-list-item-status.completed {
  color: var(--color-success);
}

.date-list-item-completion {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted-dark);
}

/* Filter Status Buttons */
.filter-status-btn {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.filter-status-btn:hover {
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  border-color: var(--color-border);
}

.filter-status-btn.active {
  background: var(--color-primary);
  color: var(--color-text-primary);
  border-color: var(--color-primary);
}

/* Search Button */
.search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  font-family: var(--font-family-primary);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.search-btn:hover {
  background: rgba(255, 107, 53, 0.9);
  border-color: var(--color-primary);
}

/* Open All Button */
.open-all-btn {
  padding: 10px 20px;
  background: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  font-family: var(--font-family-primary);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.open-all-btn:hover {
  background: rgba(255, 107, 53, 0.9);
  border-color: var(--color-primary);
}

/* Status Badge for Table */
.status-badge.completed {
  background: rgba(5, 223, 114, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(5, 223, 114, 0.3);
}

.status-badge.pending {
  background: rgba(251, 44, 54, 0.1);
  color: var(--color-danger-light);
  border: 1px solid rgba(251, 44, 54, 0.3);
}

/* Tab Content */
.tab-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tab-content.hidden {
  display: none;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--color-primary);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* Pagination Buttons */
.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  cursor: pointer;
  transition: all var(--transition-base);
}

.pagination-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-border);
  color: var(--color-text-primary);
}

.pagination-btn.active {
  background: var(--color-primary);
  color: var(--color-text-primary);
  border-color: var(--color-primary);
}

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