/* ===================================================================
   TrÃ¬nh Quáº£n LÃ½ QC v3.0 - Mac Style Clean Modern Theme
   Minimalist, professional design with soft shadows and rounded corners
   =================================================================== */

/* ===== CSS VARIABLES ===== */
:root {
  /* White & Light backgrounds */
  --bg-primary: #F8FAFC;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #F1F5F9;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-hover: #F1F5F9;
  --bg-active: #E2E8F0;

  /* Accent palette (Indigo/Blue) */
  --blue-50: #EEF2FF;
  --blue-100: #E0E7FF;
  --blue-200: #C7D2FE;
  --blue-300: #A5B4FC;
  --blue-400: #818CF8;
  --blue-500: #6366F1;
  --blue-600: #4F46E5;
  --blue-700: #4338CA;
  --blue-800: #3730A3;
  --blue-900: #312E81;

  /* Borders */
  --border-light: #E2E8F0;
  --border-medium: #CBD5E1;
  --border-blue: #C7D2FE;
  --border-focus: #4F46E5;

  /* Text */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-white: #FFFFFF;
  --text-blue: #4F46E5;
  --text-blue-dark: #312E81;

  /* Status */
  --success: #10B981;
  --success-bg: #DCFCE7;
  --success-border: #BBF7D0;
  --success-text: #166534;

  --error: #EF4444;
  --error-bg: #FEE2E2;
  --error-border: #FECACA;
  --error-text: #991B1B;

  --warning: #F59E0B;
  --warning-bg: #FEF3C7;
  --warning-border: #FDE68A;
  --warning-text: #92400E;
  
  --closed: #94A3B8;
  --closed-bg: #F1F5F9;
  --closed-border: #E2E8F0;
  --closed-text: #475569;

  --grace: #0EA5E9;
  --grace-bg: #E0F2FE;
  --grace-border: #BAE6FD;
  --grace-text: #0C4A6E;

  /* Shadows - Modern & Soft */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-blue: 0 4px 14px rgba(79, 70, 229, 0.25);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 12px;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== APP CONTAINER ===== */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  background: var(--bg-primary);
}

/* ===== HEADER ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  min-height: 56px;
  position: relative;
  z-index: 100;
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  display: flex;
  align-items: center;
  background: rgba(79, 70, 229, 0.1);
  border-radius: 10px;
  padding: 6px;
}

.logo-icon svg rect {
  fill: #4F46E5;
}

.logo-icon svg path {
  fill: #FFFFFF;
}

.logo-text h1 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-text .version {
  font-size: 10px;
  font-weight: 700;
  color: var(--blue-600);
  margin-left: 6px;
  padding: 2px 6px;
  background: var(--blue-50);
  border-radius: 6px;
  border: 1px solid var(--blue-100);
}

/* Connection Badge */
.connection-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

.connection-badge.connected {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

.connection-badge.connected .badge-dot {
  animation: pulse-dot 1.5s infinite;
  background: var(--success);
  box-shadow: 0 0 4px rgba(16,185,129,0.4);
}

.connection-badge.error {
  background: var(--error-bg);
  border-color: var(--error-border);
  color: var(--error-text);
}

.connection-badge.error .badge-dot {
  background: var(--error);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* User Card */
.header-right {
  display: flex;
  align-items: center;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 4px 4px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: 30px;
  transition: all var(--transition);
}

.user-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-medium);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue-600);
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.user-id {
  font-size: 11px;
  color: var(--text-secondary);
}

/* ===== TOOLBAR ===== */
.toolbar {
  display: flex;
  align-items: center;
  padding: 0 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  min-height: 50px;
  gap: 20px;
  box-shadow: var(--shadow-sm);
  z-index: 50;
  position: relative;
}

.tab-group {
  display: flex;
  gap: 0;
  height: 100%;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.tab-btn.active {
  color: var(--blue-600);
  border-bottom-color: var(--blue-600);
  background: var(--blue-50);
}

.tab-icon {
  font-size: 14px;
  color: var(--text-muted);
}
.tab-btn.active .tab-icon { color: var(--blue-600); }

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}

.tab-btn.active .tab-count {
  background: var(--blue-100);
  color: var(--blue-700);
  border-color: var(--blue-200);
}

/* Stats */
.stats-group {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  padding: 0 16px;
}

.stat {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat strong {
  color: var(--text-primary);
  font-weight: 700;
}

.stat-live strong {
  color: var(--success-text);
  background: var(--success-bg);
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid var(--success-border);
}

.stat-die strong {
  color: var(--error-text);
  background: var(--error-bg);
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid var(--error-border);
}

.stat-closed strong {
  color: var(--closed-text);
  background: var(--closed-bg);
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid var(--closed-border);
}

.stat-grace strong {
  color: var(--grace-text);
  background: var(--grace-bg);
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid var(--grace-border);
}

.stat-debt strong {
  color: #d97706;
  background: #fffbeb;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid #fde68a;
}

/* Filter Active State */
[data-filter] {
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 6px;
  padding: 4px;
  margin: -4px;
}

[data-filter]:hover {
  transform: translateY(-1px);
}

.filter-active {
  box-shadow: 0 0 0 2px var(--blue-200);
  transform: translateY(0);
}

.stat-live.filter-active {
  box-shadow: 0 0 0 2px var(--success-border);
}

.stat-die.filter-active {
  box-shadow: 0 0 0 2px var(--error-border);
}

.stat-closed.filter-active {
  box-shadow: 0 0 0 2px var(--closed-border);
}

.stat-grace.filter-active {
  box-shadow: 0 0 0 2px var(--grace-border);
}

.stat-debt.filter-active {
  box-shadow: 0 0 0 2px #fde68a;
}

/* Toolbar Actions */
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.action-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.action-btn:hover {
  background: var(--blue-50);
  border-color: var(--blue-300);
  color: var(--blue-600);
  box-shadow: var(--shadow-blue);
}

.action-btn.stop:hover {
  background: var(--error-bg);
  border-color: var(--error-border);
  color: var(--error);
}

.loading-indicator {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--blue-600);
  font-weight: 600;
}

.loading-indicator.visible {
  display: flex;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2.5px solid var(--blue-200);
  border-top-color: var(--blue-600);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== MAIN CONTENT ===== */
.content {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* ===== TABLE AREA ===== */
.table-area {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
}

.tab-panel {
  display: none;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.25s ease;
}

.table-wrap {
  flex: 1;
  overflow: auto;
  background: var(--bg-surface);
  margin: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  position: relative;
}

/* Custom Scrollbar */
.table-wrap::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-wrap::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

.table-wrap::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 4px;
}

.table-wrap::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--blue-400);
}

.table-wrap::-webkit-scrollbar-corner {
  background: var(--bg-primary);
}

/* ===== DATA TABLE ===== */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  min-width: max-content;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table thead tr {
  background: var(--bg-tertiary);
  backdrop-filter: blur(8px);
}

.data-table th {
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-medium);
  border-right: 1px solid transparent;
  white-space: nowrap;
  font-size: 11px;
  user-select: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden; /* Prevent text overflow but allow resize */
}

/* JS Based Drag-to-Resize Styles */
.data-table th[data-resizable="true"] {
  position: relative;
  overflow: hidden;
}

.data-table th .resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  cursor: col-resize;
  user-select: none;
  height: 100%;
  background-color: transparent;
  transition: background-color 0.2s;
  z-index: 10;
}

.data-table th .resizer:hover,
.data-table th .resizer.resizing {
  background-color: transparent;
}

.data-table th[data-resizable]::-webkit-resizer {
  display: block;
  background: var(--border-medium);
  width: 12px;
  height: 100%;
  box-shadow: inset 1px 0 0 white;
}

/* Column widths */
.col-check { width: 40px; text-align: center !important; }
.col-num { width: 44px; text-align: center !important; }
.col-status { width: 100px; }
.col-name, .col-bm-name { min-width: 150px; }
.col-id, .col-bm-id { width: 140px; }
.col-currency { width: 70px; }
.col-spent { width: 100px; }
.col-limit { width: 90px; }
.col-acc-status { width: 120px; }
.col-date, .col-time { width: 95px; }
.col-type { width: 60px; }
.col-perm { width: 95px; }
.col-bm-type { width: 75px; }
.col-accounts { width: 170px; }
.col-ads { width: 60px; }
.col-money { width: 90px; }

/* Table Body */
.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
  color: var(--text-primary);
  font-size: 12px;
}

.data-table tbody tr {
  background: var(--bg-surface);
  transition: background var(--transition);
}

.data-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

.data-table tbody tr.selected {
  background: rgba(99, 102, 241, 0.15) !important;
}

.data-table tbody tr.selected:hover {
  background: rgba(99, 102, 241, 0.2) !important;
}

/* Checkbox */
.data-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue-500);
  cursor: pointer;
}

/* Status Badge */
.badge-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-live {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.badge-die {
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-border);
}

.badge-closed {
  background: var(--closed-bg);
  color: var(--closed-text);
  border: 1px solid var(--closed-border);
}

.badge-grace {
  background: var(--grace-bg);
  color: var(--grace-text);
  border: 1px solid var(--grace-border);
}

.badge-debt {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.badge-pending {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

/* Permission Badge */
.badge-perm {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
}

.perm-admin {
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-border);
}

.perm-developer {
  background: var(--blue-50);
  color: var(--blue-700);
  border: 1px solid var(--blue-200);
}

.perm-employee {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

/* BM Type Badge */
.badge-bm-type {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  background: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

.caa-row-status {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  display: inline-block;
  min-width: 45px;
  text-align: center;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 11px;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.empty-state.hidden {
  display: none;
}

.empty-icon {
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

.empty-icon svg circle,
.empty-icon svg path,
.empty-icon svg rect,
.empty-icon svg line {
  stroke: var(--blue-400);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.empty-title {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 320px;
  min-width: 320px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: hidden; /* We will use internal scrolling if needed, but flex 1 on content area is better */
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  position: relative;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.02);
  z-index: 40;
}

.sidebar.collapsed {
  width: 0;
  min-width: 0;
  border-left: none;
  overflow: visible;
}

.sidebar.collapsed > *:not(.sidebar-toggle) {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: none;
}

.sidebar-toggle {
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 56px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-right: none;
  border-radius: 8px 0 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
  z-index: 5;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.04);
}

.sidebar-toggle:hover {
  background: var(--blue-500);
  color: white;
  border-color: var(--blue-500);
}

.sidebar.collapsed .sidebar-toggle {
  left: -32px;
}

.sidebar.collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

/* Sidebar Blocks */
.sidebar-block {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-block-grow {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.block-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.block-icon {
  font-size: 14px;
}

.block-header h3 {
  font-size: 11px;
  font-weight: 700;
  color: var(--blue-600);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  flex: 1;
}

.btn-xs {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border-light);
  border-radius: 5px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.btn-xs:hover {
  background: var(--error-bg);
  border-color: var(--error-border);
  color: var(--error);
}

/* Token Input */
.token-input-group {
  display: flex;
  gap: 6px;
}

.token-input-group input {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 11px;
  font-family: inherit;
  outline: none;
  transition: all var(--transition);
}

.token-input-group input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background: var(--bg-secondary);
}

.token-input-group input::placeholder {
  color: var(--text-muted);
}

.token-actions {
  display: flex;
  gap: 2px;
}

.btn-sm {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.btn-sm:hover {
  background: var(--blue-50);
  border-color: var(--blue-300);
  color: var(--blue-600);
}

.btn-sm.accent {
  background: var(--blue-500);
  border-color: var(--blue-500);
  color: white;
}

.btn-sm.accent:hover {
  background: var(--blue-600);
  box-shadow: var(--shadow-blue);
}

.token-status {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
  min-height: 14px;
  font-weight: 500;
}

.token-status.success {
  color: var(--success);
}

.token-status.error {
  color: var(--error);
}

/* Function Select (hidden, JS only) */
.func-select {
  display: none;
}

/* ===== CUSTOM PREMIUM DROPDOWN ===== */
.custom-dropdown {
  position: relative;
  width: 100%;
  font-family: inherit;
}

.custom-dropdown-trigger {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-dropdown-trigger:hover {
  border-color: var(--blue-300);
  background: var(--bg-secondary);
}

.custom-dropdown.open .custom-dropdown-trigger {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
  background: var(--bg-secondary);
}

.dropdown-trigger-text {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-trigger-text.has-value {
  color: var(--blue-600);
  font-weight: 600;
}

.dropdown-arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
  color: var(--blue-500);
}

/* Dropdown Menu */
.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  box-shadow: 0 12px 36px -8px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.04);
  z-index: 999;
  max-height: 520px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-dropdown.open .custom-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Scrollbar styling */
.custom-dropdown-menu::-webkit-scrollbar {
  width: 5px;
}
.custom-dropdown-menu::-webkit-scrollbar-track {
  background: transparent;
}
.custom-dropdown-menu::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 10px;
}
.custom-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Group */
.dropdown-group {
  margin-bottom: 4px;
}

.dropdown-group:last-child {
  margin-bottom: 0;
}

.dropdown-group + .dropdown-group {
  border-top: 1px solid var(--border-light);
  padding-top: 4px;
  margin-top: 2px;
}

.dropdown-group-label {
  padding: 8px 10px 5px 10px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  user-select: none;
}

/* Items */
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 12.5px;
  color: var(--text-secondary);
  position: relative;
}

.dropdown-item:hover {
  background: var(--blue-50);
  color: var(--blue-700);
}

.dropdown-item:active {
  background: var(--blue-100);
  transform: scale(0.98);
}

.dropdown-item.selected {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.15));
  color: var(--blue-700);
  font-weight: 600;
}

.dropdown-item.selected::after {
  content: 'âœ“';
  position: absolute;
  right: 10px;
  font-size: 12px;
  color: var(--blue-500);
  font-weight: 700;
}

.di-icon {
  font-size: 15px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}

.di-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

/* Param Inputs */
.param-label {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 5px;
  font-weight: 600;
}

.param-input {
  width: 100%;
  padding: 6px 8px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  margin-bottom: 10px;
  transition: all var(--transition);
}

.param-input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background: var(--bg-secondary);
}

/* Execute Button */
.btn-execute {
  width: 100%;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-blue);
}

.btn-execute:hover {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
  transform: translateY(-1px);
}

.btn-execute:active {
  transform: translateY(0);
  box-shadow: var(--shadow-blue);
}

/* Result Box */
.result-box {
  width: 100%;
  flex: 1;
  min-height: 130px;
  padding: 8px 10px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 11px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  resize: none;
  outline: none;
  line-height: 1.6;
  transition: border-color var(--transition);
}

.result-box:focus {
  border-color: var(--blue-400);
  background: var(--bg-secondary);
}

.live-textarea {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.05);
}
.live-textarea:focus {
  border-color: var(--success-text);
  background: var(--bg-secondary);
}

.die-textarea {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.05);
}
.die-textarea:focus {
  border-color: var(--error-text);
  background: var(--bg-secondary);
}

.result-box-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 150px;
}

/* Sidebar Footer */
.sidebar-footer {
  margin-top: auto;
  padding: 12px 18px;
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  background: var(--bg-tertiary);
}

/* ===== CONTEXT MENU ===== */
.context-menu {
  position: fixed;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 6px 0;
  min-width: 210px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: none;
}

.context-menu.visible {
  display: block;
  animation: menuIn 0.15s ease;
}

@keyframes menuIn {
  from { opacity: 0; transform: scale(0.95) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.ctx-item {
  padding: 9px 18px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ctx-item:hover {
  background: var(--blue-50);
  color: var(--blue-700);
}

.ctx-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 12px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Row animation */
.data-table tbody tr {
  animation: rowIn 0.3s ease forwards;
  opacity: 0;
}

@keyframes rowIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .sidebar {
    width: 230px;
    min-width: 230px;
  }
  .stats-group {
    display: none;
  }
}

/* ===== SELECTION ===== */
::selection {
  background: rgba(59, 130, 246, 0.2);
  color: var(--text-primary);
}

/* ===== MONEY TEXT ===== */
.money-text {
  color: var(--success);
  font-weight: 700;
}

.money-zero {
  color: var(--text-muted);
}

/* ===== ACCOUNT STATUS ===== */
.acc-status-active {
  color: var(--success);
  font-weight: 600;
}

.acc-status-disabled {
  color: var(--error);
  font-weight: 600;
}

.acc-status-pending {
  color: var(--warning);
  font-weight: 600;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-500), var(--blue-400));
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ===== ACCOUNT DETAIL PANEL ===== */
.account-detail-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 9998;
  backdrop-filter: blur(2px);
}
.account-detail-overlay.show { display: block; }

.account-detail-panel {
  display: none;
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%) translateX(20px);
  width: 380px;
  max-height: 85vh;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0,0,0,0.05);
  border: 1px solid rgba(255, 255, 255, 0.4);
  z-index: 9999;
  overflow: hidden;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.account-detail-panel.show {
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}
.detail-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.detail-avatar {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--blue-100);
  color: var(--blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.detail-name {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.detail-subtext {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.detail-close {
  background: var(--bg-tertiary);
  border: none;
  color: var(--text-secondary);
  width: 30px; height: 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}
.detail-close:hover { background: var(--error-bg); color: var(--error); }

.detail-body {
  padding: 8px 10px;
  overflow-y: auto;
  flex: 1;
  max-height: 60vh;
}
.detail-loading {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  font-size: 12px;
}

.detail-row {
  display: flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 8px;
  transition: background 0.15s;
  gap: 8px;
}
.detail-row:hover { background: var(--blue-50); }

.detail-row-icon {
  font-size: 14px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.detail-row-label {
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 90px;
  flex-shrink: 0;
}
.detail-row-value {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
  flex: 1;
  word-break: break-all;
}

.detail-row-value.val-live { color: var(--success); }
.detail-row-value.val-die { color: var(--error); }
.detail-row-value.val-money { color: #D97706; }
.detail-row-value.val-blue { color: var(--blue-600); }

.detail-divider {
  height: 1px;
  background: var(--border-light);
  margin: 6px 10px;
}

.detail-footer {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-tertiary);
}
.detail-btn {
  flex: 1;
  padding: 8px 0;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.detail-btn-ads {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  color: white;
}
.detail-btn-ads:hover { background: linear-gradient(135deg, var(--blue-600), var(--blue-700)); }
.detail-btn-link {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
}
.detail-btn-link:hover { background: linear-gradient(135deg, #059669, #047857); }
.detail-btn-copy {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}
.detail-btn-copy:hover { background: var(--blue-50); border-color: var(--blue-300); }

/* Info Button in Table Row */
.btn-info-detail {
  width: 28px; height: 28px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  color: white;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}
.btn-info-detail:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.45);
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
}
.btn-info-detail:active { transform: scale(0.95); }

/* ===== KICK BM3 MODAL ===== */
.kick-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9998;
  animation: fadeIn 0.2s ease;
}

.kick-modal-overlay.show { display: block; }

.kick-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 620px;
  max-height: 85vh;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1);
  z-index: 9999;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}

.kick-modal.show {
  display: flex;
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* Modal Header */
.kick-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
  color: white;
}

.kick-modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kick-icon {
  font-size: 24px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.kick-modal-title h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.kick-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(255,255,255,0.2);
  color: white;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.kick-modal-close:hover {
  background: rgba(255,255,255,0.35);
  transform: rotate(90deg);
}

/* Modal Info */
.kick-modal-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--blue-50);
  border-bottom: 1px solid var(--blue-100);
  font-size: 12px;
  font-weight: 500;
  color: var(--blue-700);
}

.kick-info-badge {
  font-size: 16px;
}

/* Modal Body */
.kick-modal-body {
  padding: 20px 24px;
  flex: 1;
  overflow-y: auto;
}

.kick-result-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.kick-result-box {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.kick-success-box {
  border-color: var(--success-border);
}

.kick-die-box {
  border-color: var(--error-border);
}

/* Result Header */
.kick-result-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-light);
}

.kick-success-box .kick-result-header {
  background: var(--success-bg);
  border-color: var(--success-border);
}

.kick-die-box .kick-result-header {
  background: var(--error-bg);
  border-color: var(--error-border);
}

.kick-result-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.success-dot {
  background: var(--success);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

.die-dot {
  background: var(--error);
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

.kick-result-header h3 {
  flex: 1;
  font-size: 12px;
  font-weight: 700;
}

.kick-success-box .kick-result-header h3 { color: var(--success-text); }
.kick-die-box .kick-result-header h3 { color: var(--error-text); }

.kick-result-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  background: white;
  border: 1px solid var(--border-light);
}

.kick-success-box .kick-result-count {
  color: var(--success-text);
  border-color: var(--success-border);
}

.kick-die-box .kick-result-count {
  color: var(--error-text);
  border-color: var(--error-border);
}

.kick-copy-btn {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.kick-copy-btn:hover {
  background: rgba(0,0,0,0.08);
  transform: scale(1.1);
}

.kick-result-textarea {
  width: 100%;
  min-height: 180px;
  max-height: 250px;
  resize: vertical;
  border: none;
  padding: 8px 10px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-primary);
  background: white;
  outline: none;
}

.kick-result-textarea::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

/* Modal Footer */
.kick-modal-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-tertiary);
}

.kick-progress {
  flex: 1;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
  display: none;
}

.kick-progress.show { display: block; }

.kick-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #FF6B35, #F7931E);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.kick-progress-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 60px;
}

.kick-start-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
  color: white;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.35);
  white-space: nowrap;
}

.kick-start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
  background: linear-gradient(135deg, #E85D2C 0%, #D97706 100%);
}

.kick-start-btn:active {
  transform: translateY(0);
}

.kick-start-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.kick-start-btn svg {
  flex-shrink: 0;
}

/* ===== RENAME/REMOVE RESULT PANELS ===== */
.rename-result-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  background: var(--bg-surface);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.rename-result-card.remove-card {
  border-color: rgba(239, 68, 68, 0.2);
}

.rename-result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);
  color: white;
}

.rename-result-header.remove-header {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
}

.rename-result-icon {
  font-size: 18px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.rename-result-header h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.rename-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--border-light);
}

.rename-stat {
  text-align: center;
  padding: 12px 8px;
  border-right: 1px solid var(--border-light);
}

.rename-stat:last-child {
  border-right: none;
}

.rename-stat-num {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.rename-stat.success .rename-stat-num { color: var(--success); }
.rename-stat.failed .rename-stat-num { color: var(--error); }
.rename-stat.skipped .rename-stat-num { color: var(--text-muted); }

.rename-stat-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rename-result-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
}

.rename-result-empty {
  text-align: center;
  padding: 20px 12px;
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}

.rename-result-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin: 2px 0;
  border-radius: 6px;
  font-size: 11px;
  font-family: 'SF Mono', Monaco, monospace;
  line-height: 1.3;
  transition: background 0.15s;
}

.rename-result-item:hover {
  background: var(--bg-tertiary);
}

.rename-result-item.item-success {
  color: var(--success-text);
  background: var(--success-bg);
}

.rename-result-item.item-failed {
  color: var(--error-text);
  background: var(--error-bg);
}

.rename-result-item.item-skipped {
  color: var(--text-muted);
  background: var(--bg-tertiary);
}

.rename-result-item .item-icon {
  flex-shrink: 0;
  font-size: 12px;
}

.rename-result-item .item-text {
  flex: 1;
  word-break: break-all;
}

/* ===== CARD BADGES ===== */
.card-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.card-badge.card-yes {
  background: linear-gradient(135deg, #059669 0%, #10B981 100%);
  color: white;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

.card-badge.card-no {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}
/* ==================================================== */
/* C?T LIï¿½N K?T VIA & BM */
/* ==================================================== */
.col-links {
  width: auto;
  min-width: 80px;
}

.link-badges {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.link-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
}

.link-badge:hover {
  background: rgba(255, 255, 255, 0.1);
}

.link-badge.green {
  background: rgba(16, 185, 129, 0.1);
  color: #10B981;
  border-color: rgba(16, 185, 129, 0.3);
}

.link-badge.yellow {
  background: rgba(245, 158, 11, 0.1);
  color: #F59E0B;
  border-color: rgba(245, 158, 11, 0.3);
}

.link-badge.red {
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.link-badge.critical {
  background: #EF4444;
  color: #FFFFFF;
  border-color: #DC2626;
  animation: pulse-red 2s infinite;
}

/* Modal Liï¿½n k?t */
.link-modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s;
}

.link-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.95);
  background: #1E293B;
  width: 650px;
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1001;
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-direction: column;
}

.link-modal.show, .link-modal-overlay.show {
  display: flex;
  opacity: 1;
}
.link-modal.show {
  transform: translate(-50%, -50%) scale(1);
}

.link-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}

.link-modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.link-modal-title h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #F8FAFC;
}

.link-modal-close {
  background: transparent;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.link-modal-close:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

.link-modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.link-section {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
}

.link-section h3 {
  margin: 0 0 12px 0;
  font-size: 12px;
  font-weight: 600;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.link-item {
  display: flex;
  flex-direction: column;
  padding: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 8px;
  border-left: 3px solid transparent;
}

.link-item:last-child {
  margin-bottom: 0;
}

.link-item.live { border-left-color: #10B981; }
.link-item.die { border-left-color: #EF4444; }
.link-item.warning { border-left-color: #F59E0B; }

.link-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: #E2E8F0;
}

.link-item-sub {
  margin-top: 6px;
  font-size: 12px;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 12px;
}

.link-tree {
  margin-top: 8px;
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: #94A3B8;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tree-node {
  background: rgba(0,0,0,0.2);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.05);
}

.summary-box {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  padding: 12px;
}

.summary-box h4 {
  margin: 0 0 8px 0;
  color: #38BDF8;
  font-size: 12px;
}

.summary-list {
  list-style: none;
  margin: 0; padding: 0;
  font-size: 12px;
  color: #CBD5E1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

#liveResultBoxContainer, #dieResultBoxContainer { display: none !important; }

/* ===== CHECK BM LIVE/DIE PANEL ===== */
.checkbm-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkbm-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbm-header-icon {
  font-size: 18px;
}

.checkbm-header h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-700);
  margin: 0;
}

/* Input */
.checkbm-input-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checkbm-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.checkbm-textarea {
  width: 100%;
  min-height: 120px;
  max-height: 200px;
  padding: 10px 12px;
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 12px;
  font-family: 'Consolas', 'Monaco', monospace;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: all 0.2s ease;
}

.checkbm-textarea:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
  background: var(--bg-secondary);
}

.checkbm-textarea::placeholder {
  color: var(--text-muted);
  font-family: inherit;
}

.checkbm-input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.checkbm-id-count {
  font-size: 11px;
  color: var(--text-muted);
}

.checkbm-id-count strong {
  color: var(--blue-600);
  font-weight: 700;
}

.checkbm-btn-clear {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.checkbm-btn-clear:hover {
  background: var(--error-bg);
  color: var(--error-text);
}

/* Run Button */
.checkbm-run-btn {
  width: 100%;
  padding: 11px 16px;
  background: linear-gradient(135deg, #0EA5E9, #0284C7);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.checkbm-run-btn:hover {
  background: linear-gradient(135deg, #0284C7, #0369A1);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
  transform: translateY(-1px);
}

.checkbm-run-btn:active {
  transform: translateY(0);
}

.checkbm-run-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Progress */
.checkbm-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbm-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.checkbm-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0EA5E9, #22D3EE);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.checkbm-progress-text {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 500;
}

/* Stats */
.checkbm-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.checkbm-stat {
  text-align: center;
  padding: 10px 6px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: var(--bg-tertiary);
  transition: all 0.2s ease;
}

.checkbm-stat-num {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.checkbm-stat-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}

.stat-live-box {
  border-color: rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.04);
}
.stat-live-box .checkbm-stat-num { color: #16A34A; }

.stat-die-box {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.04);
}
.stat-die-box .checkbm-stat-num { color: #DC2626; }

.stat-fail-box {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.04);
}
.stat-fail-box .checkbm-stat-num { color: #D97706; }

/* Result Boxes */
.checkbm-result-box {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.checkbm-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
}

.live-header {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(34, 197, 94, 0.15));
  color: #16A34A;
  border-bottom: 1px solid rgba(34, 197, 94, 0.2);
}

.die-header {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.15));
  color: #DC2626;
  border-bottom: 1px solid rgba(239, 68, 68, 0.2);
}

.fail-header {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.15));
  color: #D97706;
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}

.checkbm-result-count {
  font-size: 11px;
  font-weight: 700;
  background: rgba(255,255,255,0.6);
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.checkbm-copy-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s ease;
  opacity: 0.7;
}
.checkbm-copy-btn:hover { opacity: 1; background: rgba(255,255,255,0.3); }

.checkbm-result-textarea {
  width: 100%;
  min-height: 80px;
  max-height: 150px;
  padding: 8px 12px;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 11px;
  font-family: 'Consolas', 'Monaco', monospace;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}

.checkbm-result-textarea::placeholder {
  color: var(--text-muted);
}

/* ===== VERIFICATION ICON STYLES ===== */
.verify-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  cursor: default;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.verify-icon:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.verify-green {
  background: #DCFCE7;
  color: #166534;
  border: 2px solid #10B981;
}

.verify-yellow {
  background: #FEF3C7;
  color: #92400E;
  border: 2px solid #F59E0B;
}

.verify-gray {
  background: #F1F5F9;
  color: #94A3B8;
  border: 2px solid #CBD5E1;
}

.col-verify {
  width: 60px;
  text-align: center;
}

.col-currency {
  width: 70px;
}

/* ===== CURRENCY TOGGLE BUTTONS ===== */
.currency-toggle {
  display: flex;
  align-items: center;
  gap: 0;
  margin-right: 8px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  border: 1px solid var(--border-light);
  padding: 2px;
  overflow: hidden;
}

.curr-btn {
  padding: 4px 10px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.curr-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.curr-btn.active {
  background: var(--blue-600);
  color: white;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.3);
}

/* ===== GET LINK BM PANEL ===== */
.getlink-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.getlink-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.getlink-header-icon {
  font-size: 18px;
}

.getlink-header h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-700);
  margin: 0;
}

.getlink-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: 8px;
  font-size: 11px;
  color: var(--blue-700);
  font-weight: 500;
}

.getlink-info svg {
  flex-shrink: 0;
  color: var(--blue-400);
}

/* Format Selection */
.getlink-format-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.getlink-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Email Input */
.getlink-email-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.getlink-email-input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
  background: var(--bg-secondary);
}

.getlink-email-input::placeholder {
  color: var(--text-muted);
}

/* Accept BM Textarea */
.acceptbm-textarea {
  width: 100%;
  min-height: 100px;
  max-height: 180px;
  padding: 10px 12px;
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 12px;
  font-family: 'Consolas', 'Monaco', monospace;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: all 0.2s ease;
}

.acceptbm-textarea:focus {
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
  background: var(--bg-secondary);
}

.acceptbm-textarea::placeholder {
  color: var(--text-muted);
  font-family: inherit;
}

.acceptbm-input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.acceptbm-link-count {
  font-size: 11px;
  color: var(--text-muted);
}

.acceptbm-link-count strong {
  color: #059669;
  font-weight: 700;
}

.acceptbm-name-row {
  display: flex;
  gap: 8px;
}

.acceptbm-password-row {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.acceptbm-toggle-pw {
  width: 36px;
  flex-shrink: 0;
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-tertiary);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.acceptbm-toggle-pw:hover {
  background: var(--bg-hover);
  border-color: #10B981;
}

.getlink-format-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.getlink-fmt-btn {
  padding: 7px 10px;
  border: 1.5px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
}

.getlink-fmt-btn:hover {
  border-color: var(--blue-300);
  background: var(--blue-50);
  color: var(--blue-700);
}

.getlink-fmt-btn.active {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  color: white;
  border-color: var(--blue-600);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

/* Run Button */
.getlink-run-btn {
  width: 100%;
  padding: 11px 16px;
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.getlink-run-btn:hover {
  background: linear-gradient(135deg, #7C3AED, #6D28D9);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

.getlink-run-btn:active {
  transform: translateY(0);
}

.getlink-run-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Progress */
.getlink-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.getlink-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.getlink-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #8B5CF6, #A78BFA);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.getlink-progress-text {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 500;
}

/* Stats */
.getlink-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.getlink-stat {
  text-align: center;
  padding: 10px 6px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: var(--bg-tertiary);
  transition: all 0.2s ease;
}

.getlink-stat-num {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.getlink-stat-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}

.getlink-stat-total {
  border-color: rgba(139, 92, 246, 0.25);
  background: rgba(139, 92, 246, 0.04);
}
.getlink-stat-total .getlink-stat-num { color: #7C3AED; }

.getlink-stat-live {
  border-color: rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.04);
}
.getlink-stat-live .getlink-stat-num { color: #16A34A; }

.getlink-stat-die {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.04);
}
.getlink-stat-die .getlink-stat-num { color: #DC2626; }

/* Result Area */
.getlink-result-area {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
}

.getlink-result-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.06), rgba(139, 92, 246, 0.12));
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
}

.getlink-result-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-700);
}

.getlink-toolbar-btns {
  display: flex;
  gap: 6px;
}

.getlink-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.getlink-toolbar-btn:hover {
  background: var(--blue-50);
  border-color: var(--blue-300);
  color: var(--blue-700);
}

.getlink-toolbar-btn svg {
  flex-shrink: 0;
}

/* Result List */
.getlink-result-list {
  max-height: 400px;
  overflow-y: auto;
  background: var(--bg-tertiary);
}

.getlink-result-list::-webkit-scrollbar {
  width: 6px;
}
.getlink-result-list::-webkit-scrollbar-track {
  background: transparent;
}
.getlink-result-list::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 3px;
}

/* Individual Link Row */
.getlink-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s ease;
  font-size: 11px;
}

.getlink-row:last-child {
  border-bottom: none;
}

.getlink-row:hover {
  background: rgba(139, 92, 246, 0.04);
}

.getlink-row-index {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 22px;
  text-align: center;
}

.getlink-row-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.getlink-row-status.live {
  background: var(--success);
  box-shadow: 0 0 4px rgba(16, 185, 129, 0.4);
}

.getlink-row-status.die {
  background: var(--error);
  box-shadow: 0 0 4px rgba(239, 68, 68, 0.4);
}

.getlink-row-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.getlink-row-name {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
}

.getlink-row-id {
  font-size: 10px;
  color: var(--text-muted);
  font-family: 'Consolas', monospace;
}

.getlink-row-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.getlink-row-btn {
  padding: 4px 8px;
  border: 1px solid var(--border-light);
  border-radius: 5px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.getlink-row-btn:hover {
  background: var(--blue-50);
  border-color: var(--blue-300);
  color: var(--blue-700);
}

.getlink-row-btn.btn-open {
  border-color: rgba(139, 92, 246, 0.3);
  color: #7C3AED;
}

.getlink-row-btn.btn-open:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.5);
}

.getlink-row-btn.btn-copy:hover {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

/* Link type badges in all mode */
.getlink-link-type {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.getlink-link-type.type-settings {
  background: rgba(139, 92, 246, 0.1);
  color: #7C3AED;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.getlink-link-type.type-ads {
  background: rgba(14, 165, 233, 0.1);
  color: #0284C7;
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.getlink-link-type.type-billing {
  background: rgba(245, 158, 11, 0.1);
  color: #D97706;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Copied animation */
.getlink-row-btn.copied {
  background: var(--success-bg) !important;
  border-color: var(--success-border) !important;
  color: var(--success-text) !important;
}

/* Empty state */
.getlink-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

.getlink-empty-icon {
  font-size: 28px;
  margin-bottom: 8px;
  opacity: 0.5;
}

/* ===== CUSTOM SELECT CURRENCY ===== */
.custom-select-wrapper {
  position: relative;
  user-select: none;
}
.custom-select-btn {
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  background: #fff;
  cursor: pointer;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 110px;
  transition: all 0.2s;
}
.custom-select-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
.custom-select-btn.active {
  border-color: #1877F2;
  box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.1);
  color: #1877F2;
}
.custom-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  width: 100%;
  min-width: 130px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 4px;
  animation: colDropdownFadeIn 0.2s ease;
}
.custom-select-option {
  padding: 8px 12px;
  font-size: 13px;
  color: #334155;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.custom-select-option:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.custom-select-option.selected {
  background: #eff6ff;
  color: #1877F2;
  font-weight: 600;
}

/* ===== COLUMN VISIBILITY MANAGER ===== */
.settings-gear-btn {
  background: transparent;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #475569;
  transition: all 0.2s;
  padding: 0;
}
.settings-gear-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}
.settings-gear-btn.active {
  background: #eff6ff;
  border-color: #1877F2;
  color: #1877F2;
}

.col-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  width: 250px;
  padding: 12px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform-origin: top right;
  animation: colDropdownFadeIn 0.2s ease;
}

@keyframes colDropdownFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(-5px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.col-dropdown-header {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  padding-bottom: 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.col-dropdown-list {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.col-dropdown-list::-webkit-scrollbar { width: 5px; }
.col-dropdown-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 5px; }

.col-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
  padding: 5px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  user-select: none;
}
.col-item:hover { background: #f8fafc; }
.col-item input { margin: 0; cursor: pointer; transform: scale(1.1); }
.col-item span { flex: 1; text-align: left; }

.col-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}
.col-btn {
  flex: 1;
  padding: 6px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
}
.col-btn:hover { background: #e2e8f0; color: #0f172a; }
.col-btn-primary { background: #1877F2; color: white; border-color: #1877F2; }
.col-btn-primary:hover { background: #166fe5; color: white; }

/* Trạng thái ẩn cột */
.col-hidden { display: none !important; }

/* Custom Nhét D2 Premium */
.premium-number-input-group { display: flex; flex-direction: column; gap: 8px; }
.premium-number-input-group input { background: rgba(15, 23, 42, 0.4); border: 1px solid rgba(245, 158, 11, 0.3); border-radius: 8px; color: var(--text-primary); padding: 8px 12px; font-family: monospace; font-size: 14px; outline: none; transition: all 0.2s; box-shadow: inset 0 2px 4px rgba(0,0,0,0.1); }
.premium-number-input-group input:focus { border-color: #f59e0b; box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2), inset 0 2px 4px rgba(0,0,0,0.1); }
.premium-number-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.premium-preset-btn { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 6px; color: var(--text-secondary); padding: 4px 10px; font-size: 12px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.premium-preset-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); color: var(--text-primary); }
.premium-preset-btn.active { background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.4); color: #f59e0b; }

/* ===== CREATE AD ACCOUNTS PANEL ===== */
.caa-delay-btn { flex: 1; text-align: center; padding: 7px 6px !important; }

.create-ad-accounts-bm-info {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  min-height: 38px;
  flex-wrap: wrap;
}

.caabm-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.1);
  color: var(--error-text);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.caabm-name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-text);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Status Table */
.create-ad-accounts-status-table {
  border: 1px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 0;
}

.caa-status-table-wrap {
  max-height: 350px;
  overflow-y: auto;
  background: var(--bg-tertiary);
}

.caa-status-table-wrap::-webkit-scrollbar { width: 6px; }
.caa-status-table-wrap::-webkit-scrollbar-track { background: transparent; }
.caa-status-table-wrap::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: 3px; }

.caa-status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.caa-status-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  padding: 7px 10px;
  text-align: left;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
  z-index: 1;
}

.caa-status-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}

.caa-status-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.04);
}

.caa-status-table tbody td {
  padding: 6px 10px;
  color: var(--text-primary);
  vertical-align: middle;
}

.caa-status-table tbody tr:last-child {
  border-bottom: none;
}

.caa-row-pending { color: var(--text-muted); }
.caa-row-success { color: var(--success-text); font-weight: 600; }
.caa-row-fail { color: var(--error-text); font-weight: 600; }

.caa-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.caa-status-badge.pending {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
}

.caa-status-badge.success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success-text);
}

.caa-status-badge.fail {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error-text);
}

.caa-status-badge.running {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue-600);
  animation: pulse-blue 1.5s infinite;
}

@keyframes pulse-blue {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
  70% { box-shadow: 0 0 0 4px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.caa-id-cell {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 10px;
  color: var(--text-secondary);
}

.caa-time-cell {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

.caa-current-row {
  background: rgba(59, 130, 246, 0.06) !important;
}


.panel-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 16px 0 16px;
}
