@import url('../lib/fonts.css');

/* ===== AI Workstation Unified Theme (Light & Dark Adaptive) ===== */
:root {
  /* LIGHT MODE VARIABLES */
  --bg-body: #f4f4f5; /* Zinc 100 */
  --bg-sidebar: #f8fafc; /* Slate 50 */
  --bg-surface: #ffffff;
  --bg-surface-hover: #f4f4f5;
  --text-main: #09090b; /* Zinc 950 */
  --text-muted: #71717a; /* Zinc 500 */
  --border-color: #e4e4e7; /* Zinc 200 */
  
  --accent: #0d9488; /* Emerald/Teal 600 */
  --accent-hover: #0f766e; /* Teal 700 */
  --accent-text: #ffffff;
  --accent-subtle: rgba(13, 148, 136, 0.1);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-glass: 0 4px 30px rgba(0, 0, 0, 0.05);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font-family: 'Inter', -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* DARK MODE VARIABLES */
    --bg-body: #09090b; /* Zinc 950 */
    --bg-sidebar: rgba(255, 255, 255, 0.03);
    --bg-surface: rgba(255, 255, 255, 0.04);
    --bg-surface-hover: rgba(255, 255, 255, 0.08);
    --text-main: #fafafa; /* Zinc 50 */
    --text-muted: #a1a1aa; /* Zinc 400 */
    --border-color: rgba(255, 255, 255, 0.1);
    
    --accent: #2dd4bf; /* Teal 400 */
    --accent-hover: #14b8a6; /* Teal 500 */
    --accent-text: #09090b;
    --accent-subtle: rgba(45, 212, 191, 0.15);

    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.3);
  }
}

/* Force light/dark via body classes if needed, but defaults to OS preference */
body.force-light #probillNativeContainer { 
    --bg-body: #f4f4f5; --bg-sidebar: #f8fafc; --bg-surface: #ffffff; --bg-surface-hover: #f4f4f5; 
    --text-main: #09090b; --text-muted: #71717a; --border-color: #e4e4e7;
    --accent: #0d9488; --accent-hover: #0f766e; --accent-text: #ffffff; --accent-subtle: rgba(13, 148, 136, 0.1);
}
body.force-dark #probillNativeContainer {
    --bg-body: #09090b; --bg-sidebar: rgba(255, 255, 255, 0.03); --bg-surface: rgba(255, 255, 255, 0.04); --bg-surface-hover: rgba(255, 255, 255, 0.08);
    --text-main: #fafafa; --text-muted: #a1a1aa; --border-color: rgba(255, 255, 255, 0.1);
    --accent: #2dd4bf; --accent-hover: #14b8a6; --accent-text: #09090b; --accent-subtle: rgba(45, 212, 191, 0.15);
}

/* ===== Resets & Base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
#probillNativeContainer {
  font-family: var(--font-family);
  background: var(--bg-body);
  color: var(--text-main);
  display: flex;
  height: 100vh;
  overflow: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
input, button, select { font-family: inherit; font-size: inherit; }

/* ===== Typography ===== */
h1 { font-size: 20px; font-weight: 600; color: var(--text-main); }
p { color: var(--text-muted); }

/* ===== Sidebar ===== */
.sidebar {
  width: 200px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  flex-shrink: 0;
  
  
  transition: transform 0.3s var(--ease);
  z-index: 50;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; font-weight: 400; font-size: 18px; padding: 0 8px;}
.brand i { color: var(--accent); width: 20px; height: 20px; }

.nav-section {
  font-size: 12px; font-weight: 600; color: var(--text-muted); 
  letter-spacing: 0.5px; margin: 24px 12px 8px 12px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-md);
  color: var(--text-muted); font-size: 14px; font-weight: 500;
  cursor: pointer; border: none; background: transparent; width: 100%; text-align: left;
  transition: all 0.2s var(--ease); margin-bottom: 4px;
}
.nav-item i { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: var(--bg-surface-hover); color: var(--text-main); }
.nav-item.active { background: var(--accent-subtle); color: var(--accent); font-weight: 600; }

.theme-toggle-wrap { margin-top: auto; padding: 0 8px; }
.theme-toggle {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: var(--radius-md);
  color: var(--text-muted); cursor: pointer; border: none; background: transparent; width: 100%; text-align: left;
}
.theme-toggle:hover { background: var(--bg-surface-hover); color: var(--text-main); }

/* ===== Main Content Area ===== */
.main-content {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
  position: relative;
}
.header {
  padding: 20px 32px; display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border-color); background: var(--bg-body);
  z-index: 10;
}
.mobile-nav-btn { display: none; background: transparent; border: none; color: var(--text-main); cursor: pointer; padding: 8px;}

/* Project Context Header (NEW) */
.project-context-bar {
  display: flex; align-items: center; gap: 16px; margin-bottom: 24px;
}
.project-context-select {
  background: var(--bg-surface-hover);
  border: none;
  color: var(--text-main);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 600; font-size: 15px; outline: none;
  min-width: 200px;
  cursor: pointer; transition: background var(--transition);
}
.project-context-select:hover, .project-context-select:focus { background: var(--border-color); }

.view-container { flex: 1; overflow-y: auto; padding: 24px 32px;}
.view { display: none; }
.view.active { display: block; animation: fadeIn 0.3s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ===== Inputs & UI Components ===== */
.filter-bar {
  display: flex; gap: 12px; align-items: center; background: var(--bg-surface);
  padding: 8px 12px; border-radius: var(--radius-md);
  border: 1px solid var(--border-color); box-shadow: var(--shadow-sm);
  margin-bottom: 24px; flex-wrap: wrap;
}
.filter-input {
  background: transparent; border: none; color: var(--text-main); outline: none; flex: 1; min-width: 150px; font-size: 14px;
}
.filter-input::placeholder { color: var(--text-muted); }
.date-wrap { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 13px; padding-left: 8px;}
.date-wrap input[type="date"] {
  background: transparent; border: none; color: var(--text-main); outline: none; cursor: pointer; padding: 4px; border-radius: 4px; font-family: inherit; font-size: 13px;
}
.date-wrap input[type="date"]:hover { background: var(--bg-surface-hover); }

/* Base Form Inputs */
.text-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.text-field label { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.text-field input, .text-field select {
  height: 44px; width: 100%; padding: 8px 16px;
  background: var(--bg-surface); border: 1.5px solid var(--border-color);
  color: var(--text-main); border-radius: var(--radius-md);
  outline: none; transition: all 0.2s; font-family: inherit; font-size: 14px;
  box-sizing: border-box;
}
.text-field input:focus, .text-field select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1); }

/* Global Date Input Style (UI UX Max override) */
.modern-date-input {
  height: 44px !important;
  background-color: var(--bg-surface) !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: 12px center !important;
  padding: 10px 16px 10px 38px !important; border: 1.5px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important; color: var(--text-main) !important;
  font-weight: 500 !important; font-size: 14px !important; cursor: pointer !important;
  transition: all 0.2s !important; outline: none !important; width: 100%; box-sizing: border-box;
}
.modern-date-input::placeholder { color: var(--text-lighter) !important; font-weight: 400 !important; }
.modern-date-input:hover { background-color: var(--border-color) !important; }
.modern-date-input:focus { border-color: var(--accent) !important; background-color: var(--bg-surface) !important; box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1) !important; }
.modern-date-input.has-value,
.modern-date-input:not(:placeholder-shown) { 
    border-color: rgba(16, 185, 129, 0.6) !important; 
    background-color: rgba(16, 185, 129, 0.03) !important; 
    color: #0f766e !important;
    font-weight: 600 !important;
}

/* Global Select UI overrides */
select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px !important; cursor: pointer;
}
select::-ms-expand { display: none; }

/* Artiscent Custom Select System */
.articent-select-container { position: relative; width: 100%; }
.articent-select-trigger {
  height: 44px; width: 100%; box-sizing: border-box;
  background: var(--bg-surface); border: 1.5px solid var(--border-color);
  padding: 10px 14px; border-radius: var(--radius-md);
  color: var(--text-main); font-size: 14px; font-weight: 500;
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.articent-select-trigger.has-value {
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(16, 185, 129, 0.03);
}
.articent-select-trigger:hover { background: var(--border-color); }
.articent-select-trigger.active { 
  background: #fff; border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1), 0 8px 20px rgba(0,0,0,0.05); 
  transform: translateY(-1px);
}
.articent-select-options {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--border-color);
  border-radius: var(--radius-md); box-shadow: 0 15px 40px rgba(0,0,0,0.12);
  z-index: 9999; display: none; max-height: 280px; overflow-y: auto;
  animation: slideInSelect 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 6px;
}
@keyframes slideInSelect { from { opacity: 0; transform: translateY(-10px) scale(0.98); } to { opacity: 1; transform: none; } }
.articent-select-options.show { display: block; }
.articent-select-option {
  padding: 10px 16px; color: var(--text-main); font-size: 14px;
  cursor: pointer; transition: all 0.2s; border-radius: var(--radius-sm);
  margin-bottom: 2px;
}
.articent-select-option:hover { background: #f1f5f9; color: var(--accent); }
.articent-select-option.selected { 
  background: rgba(13, 148, 136, 0.08); color: var(--accent); font-weight: 700;
  display: flex; justify-content: space-between; align-items: center;
}
.articent-select-option.selected::after {
  content: "✓"; font-size: 14px; font-weight: bold; margin-left: 8px;
}

/* Unified Interactive Form Inputs */
.articent-input {
  height: 44px; width: 100%; padding: 8px 16px; 
  border: 1.5px solid var(--border-color); border-radius: var(--radius-md);
  background: var(--bg-surface); color: var(--text-main);
  font-size: 14px; font-family: inherit; transition: all 0.2s;
  outline: none; box-sizing: border-box;
}
.articent-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1); }
.articent-input::placeholder { color: var(--text-muted); opacity: 0.7; }
input[type="number"].articent-input { font-variant-numeric: tabular-nums; }
.extra-row-item { margin-bottom: 8px; display: flex; align-items: center; gap: 12px; animation: slideInX 0.3s ease; }
@keyframes slideInX { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Settings & Dashboard Premium Components */
.client-card {
  background: #ffffff; border: 1px solid #e2e8f0;
  border-radius: 12px; padding: 16px; display: flex; align-items: center; gap: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.client-card:hover { border-color: #94a3b8; box-shadow: 0 12px 24px -4px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04); transform: translateY(-2px); }
.client-logo-box { width: 46px; height: 46px; border-radius: 12px; background: #f8fafc; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid #e2e8f0; flex-shrink: 0; }
.client-logo-box img { width: 100%; height: 100%; object-fit: contain; }
.client-info { flex: 1; min-width: 0; }
.client-name { font-weight: 700; font-size: 15px; color:#1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-actions { display: flex; align-items: center; gap: 4px; opacity: 0.6; transition: opacity 0.2s; }
.client-card:hover .client-actions { opacity: 1; }

.team-chip {
  background: #f8fafc; border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md); padding: 6px 6px 6px 14px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-main);
  transition: all 0.2s; cursor: default;
}
.team-chip:hover { border-color: var(--accent); background: #fff; }
.team-chip .remove-icon {
  width: 20px; height: 20px; border-radius: var(--radius-full); background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: #94a3b8; cursor: pointer; transition: all 0.2s; border: 1px solid var(--border-color);
}
.team-chip .remove-icon:hover { background: #fee2e2; color: #ef4444; border-color: #fca5a5; }

.clickable-row { cursor: pointer; transition: all 0.2s; position: relative; }
.sortable-header { cursor: pointer; transition: all 0.2s; user-select: none; }
.sortable-header:hover { color: var(--accent) !important; background: var(--bg-surface-hover); }
.sortable-header i { transition: transform 0.2s, opacity 0.2s; }
.sortable-header.asc i { transform: rotate(180deg); opacity: 1 !important; color: var(--accent); }
.sortable-header.desc i { opacity: 1 !important; color: var(--accent); }
.clickable-row:hover { background: #f1f5f9 !important; }
.clickable-row:active { background: #e2e8f0 !important; }

.detail-item-box { 
  margin-bottom: 12px; padding: 16px; background: #fff; border: 1px solid #f1f5f9; border-radius: var(--radius-md);
  display: flex; justify-content: space-between; align-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}
.detail-item-info h4 { margin: 0 0 4px 0; font-size: 14px; color: #1e293b; font-weight: 700; }
.detail-item-info p { margin: 0; font-size: 11px; color: #94a3b8; }
.detail-item-stats { text-align: right; }
.detail-item-stats strong { display: block; font-size: 15px; color: var(--accent); font-weight: 800; }
.detail-item-stats span { font-size: 11px; color: #94a3b8; }

/* Task Row High-Fidelity Components */
.task-date-group { display: flex; align-items: center; gap: 12px; }
.date-stack { display: flex; flex-direction: column; gap: 2px; line-height: 1.2; }
.date-row { display: flex; align-items: center; gap: 6px; font-family: 'Inter', system-ui, sans-serif; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text-main); font-weight: 600; }
.date-indicator { width: 16px; height: 16px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; color: #fff; flex-shrink: 0; }
.date-indicator.start { background: #0d9488; }
.date-indicator.end { background: #10b981; }

.duration-badge {
  padding: 4px 10px; background: rgba(13, 148, 136, 0.08); color: #0d9488;
  border-radius: var(--radius-sm); font-size: 11px; font-weight: 700; border: 1px solid rgba(13, 148, 136, 0.1);
  white-space: nowrap;
}

.task-content-wrap { display: flex; align-items: center; gap: 12px; }
.task-category-tag {
  padding: 4px 10px; background: #f1f5f9; border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm); font-size: 11px; font-weight: 700; color: #475569;
  white-space: nowrap; text-transform: uppercase; letter-spacing: 0.3px;
}
.task-main-text { font-weight: 700; color: #1e293b; font-size: 14px; }

.contributor-stack { display: flex; flex-wrap: wrap; gap: 6px; }
.contributor-minichip {
  display: flex; align-items: center; gap: 6px; padding: 4px 10px;
  background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius-md);
  font-size: 12px; font-weight: 600; color: var(--text-main);
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.contrib-pct-val { color: var(--accent); font-weight: 800; font-size: 11px; }

/* Buttons */
.btn-primary {
  background: var(--accent); color: var(--accent-text);
  padding: 8px 16px; border-radius: var(--radius-md);
  font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; gap: 6px;
  border: none; cursor: pointer; transition: all var(--transition);
  box-shadow: var(--shadow-sm); height: 36px;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary i, .btn-secondary i { width: 16px; height: 16px; margin-right: -2px; }

.btn-secondary {
  background: var(--bg-surface); color: var(--text-main);
  padding: 8px 16px; border-radius: var(--radius-md);
  font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border-color); cursor: pointer; transition: all var(--transition);
  height: 36px;
}
.btn-secondary:hover { background: var(--bg-surface-hover); }
.date-shortcut-btn.active { border-color: rgba(16, 185, 129, 0.6); background-color: rgba(16, 185, 129, 0.03); color: #0f172a; font-weight: 600; }

.btn-outline {
  background: transparent; color: var(--text-main);
  padding: 8px 16px; border-radius: var(--radius-md);
  font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border-color); cursor: pointer; transition: all var(--transition);
  height: 36px;
}
.btn-outline:hover { background: var(--bg-surface-hover); border-color: var(--text-muted); }
.btn-outline.danger { color: #ef4444; border-color: #f1f5f9;}
.btn-outline.danger:hover { background: #fee2e2; border-color: #fca5a5;}

/* ===== Table / List Updates Component ===== */
.card-table {
  background: var(--bg-surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border-color); box-shadow: var(--shadow-glass);
}
.card-table table { width: 100%; border-collapse: collapse; text-align: left; }
.card-table th {
  padding: 16px 20px; font-size: 12px; font-weight: 500; color: var(--text-muted);
  border-bottom: 1px solid var(--border-color); white-space: nowrap; letter-spacing: 0.5px;
}
.card-table td {
  padding: 12px 20px; font-size: 14px; border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}
.card-table tr:last-child td { border-bottom: none; }
.card-table tbody tr { transition: background var(--transition); }
.card-table tbody tr:hover { background: var(--bg-surface-hover); }

/* Standard Cards */
.card {
  background: var(--bg-surface); padding: 24px; border-radius: var(--radius-lg);
  border: 1px solid var(--border-color); box-shadow: var(--shadow-glass); margin-bottom: 24px;
}
.card-header { padding-bottom: 16px; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; display:flex; justify-content:space-between; align-items:center;}
.card-header h2 { font-size: 16px; margin: 0; display:flex; align-items:center; gap:8px;}
.table-wrap { overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; }
.table-wrap th { 
    padding: 16px 20px; 
    font-size: 13px; 
    font-weight: 500;
    color: #4b5563; 
    background-color: transparent;
    border-bottom: 1px solid #e5e7eb; 
    white-space: nowrap; 
    border-right: none;
}
#tasksTable th {
    padding: 14px 20px; 
    font-size: 13px; 
    font-weight: 700;
    color: #475569; 
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0; 
    border-top: 1px solid #e2e8f0;
    letter-spacing: 1px;
}
#tasksTable th:first-child {
    border-left: 1px solid #e2e8f0;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}
#tasksTable th:last-child {
    border-right: 1px solid #e2e8f0;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}
.table-wrap td { padding: 16px 20px; font-size: 14px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; border-right: none; color: #1f2937; }
.table-wrap tbody tr { transition: background-color 0.2s ease; }
.table-wrap tbody tr:hover { background-color: #f8fafc; }

/* Dashboard & Premium Modern overrides */
#probillNativeContainer {
    background-color: #f8fafc;
    background-image: radial-gradient(at 0% 0%, hsla(253,16%,7%,0.02) 0, transparent 40%), 
                      radial-gradient(at 100% 0%, hsla(225,39%,30%,0.03) 0, transparent 40%),
                      radial-gradient(at 50% 100%, hsla(160,84%,39%,0.03) 0, transparent 60%);
    background-attachment: fixed;
}
.card { background: rgba(255, 255, 255, 0.96) !important;   }

/* Dashboard metric cards – flat design, no glass effect */
.premium-dash-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.premium-dash-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

#dashTable th, #dashTable td { border-right: none !important; }
#dashTable tr:hover { background: rgba(248, 250, 252, 0.8) !important; box-shadow: 0 4px 12px rgba(0,0,0,0.02); }
#dashTable td { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); border-bottom: none !important; }
#dashTable { border-spacing: 0; }

/* Chips */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: var(--radius-md);
  font-size: 12px; font-weight: 500;
  background: var(--bg-surface-hover); color: var(--text-muted); border: 1px solid var(--border-color);
}
.pill.accent { background: var(--accent-subtle); color: var(--accent); border-color: transparent;}

/* Popover Dropdown */
.action-menu { position: relative; display: inline-block; }
.action-btn { background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 8px; border-radius: var(--radius-md); transition: all var(--transition);}
.action-btn:hover { background: var(--bg-surface-hover); color: var(--text-main);}

.action-dropdown {
  position: absolute; right: 0; top: 100%; margin-top: 4px;
  background: var(--bg-surface); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  min-width: 140px; display: none; flex-direction: column; padding: 6px;
  z-index: 100;
}
.action-dropdown.show { display: flex; animation: fadeMenu 0.15s ease-out; }
@keyframes fadeMenu { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.action-item {
  padding: 8px 12px; border-radius: var(--radius-sm); color: var(--text-main); font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 8px; text-decoration: none; border: none; background: transparent; width: 100%; text-align: left;
}
.action-item:hover { background: var(--bg-surface-hover); }
.action-item.danger { color: #ef4444; }

/* Dashboard Cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card {
  background: var(--bg-surface); padding: 24px; border-radius: var(--radius-lg);
  border: 1px solid var(--border-color); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 8px;
}
.stat-card .label { font-size: 13px; color: var(--text-muted); font-weight: 500;}
.stat-card .value { font-size: 32px; font-weight: 600; color: var(--text-main); line-height: 1; margin: 4px 0;}
.stat-card .sub { font-size: 12px; color: var(--text-muted); }

/* Modals */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); 
  z-index: 200; display: none; align-items: center; justify-content: center; opacity: 0;
  transition: opacity 0.2s; padding: 20px;
}
.modal-overlay.active { display: flex; opacity: 1; }
.modal {
  background: var(--bg-body); border-radius: var(--radius-lg); width: 100%; max-width: 800px;
  max-height: 90vh; overflow-y: auto; display: flex; flex-direction: column;
  box-shadow: var(--shadow-glass); border: 1px solid var(--border-color);
}
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; background: var(--bg-surface);}
.modal-#probillNativeContainer { padding: 24px; }
.modal-footer { padding: 20px 24px; border-top: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; background: var(--bg-surface);}
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row > * { flex: 1; min-width: 180px; }
.contributor-list { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.contributor-row {
  display: inline-flex; align-items: center; gap: 12px; width: auto;
  background: var(--bg-surface-hover); border: 1px dashed var(--border-color);
  padding: 12px; border-radius: var(--radius-md); margin-bottom: 0;
}
.pct-input-wrap:focus-within { border-color: var(--accent) !important; box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1) !important; }

/* Invoices (Billing View) */
.invoice-paper {
  background: #cbd5e1 !important; color: #1f2937 !important;
  padding: 40px 0; display: flex; flex-direction: column; gap: 40px; align-items: center;
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  overflow-y: auto;
}
.billing-page {
  background: #ffffff !important;
  width: 210mm; height: 297mm; /* Standard A4 size */
  padding: 15mm 20mm; border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  position: relative; box-sizing: border-box; overflow: hidden;
  display: flex; flex-direction: column;
  font-family: 'Inter', 'Noto Sans SC', sans-serif !important;
}

#probillNativeContainer.export-active .invoice-paper {
    background: #ffffff !important;
    padding: 0 !important;
    gap: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
}
#probillNativeContainer.export-active .billing-page {
    box-shadow: none !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    height: 296.5mm !important; /* Intentionally subtract 0.5mm to perfectly defeat the html2canvas sub-pixel rounding engine that creates phantom appended pages */
}

@media print {
  @page { size: A4 portrait; margin: 0; }
  #probillNativeContainer { 
      background: white !important; 
      padding: 0 !important; 
      margin: 0 !important;
      -webkit-print-color-adjust: exact !important; 
      print-color-adjust: exact !important;
  }
  #app { display: none !important; }
  .invoice-paper { background: none !important; padding: 0 !important; margin: 0 !important; width: 100% !important; gap: 0 !important; }
  .billing-page { 
    width: 210mm !important; height: 297mm !important; 
    padding: 15mm !important; box-shadow: none !important; border: none !important; margin: 0 !important; 
    page-break-after: always !important; 
  }
  .billing-page:last-child {
    page-break-after: auto !important;
  }
}
/* ── Classic Centered Invoice (UI Theme) ── */
.inv-classic { font-family: 'Inter', 'Noto Sans SC', sans-serif; color: #1f2937; }
.ic-top { text-align: center; margin-bottom: 32px; padding-top: 24px; }
.ic-title { font-size: 32px; font-weight: 900; color: #111827; margin-bottom: 16px; letter-spacing: 2px; }
.ic-meta { font-size: 13px; color: #64748b; font-family: 'JetBrains Mono', monospace; display: flex; justify-content: center; align-items: center; gap: 12px; }
.ic-meta .divider { color: #cbd5e1; font-weight: 300; }
.ic-meta-val { color: #111827; font-weight: 600; font-size: 13.5px;}

.ic-footer-company { margin-top: auto; padding-top: 12px; border-top: 1px dashed #e2e8f0; text-align: center; width: 100%;}
.ic-company-name { font-size: 11px; font-weight: 700; color: #94a3b8; margin-bottom: 4px; letter-spacing: 0.5px; }
.ic-company-contact { font-size: 10.5px; color: #cbd5e1; display: flex; gap: 12px; align-items: center; justify-content: center; font-weight: 400;}
.ic-company-contact .val { font-family: 'JetBrains Mono', monospace; color: #94a3b8; font-weight: 500; margin-left: 2px;}
.ic-company-contact .divider { color: #f1f5f9; font-weight: 300; }

.ic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 40px; margin-top: 40px; align-items: start; }
.ic-col-label { font-size: 12.5px; font-weight: 600; color: #94a3b8; letter-spacing: 1px; margin-bottom: 12px; }

.ic-bill-to { padding-top: 0; }
.ic-bill-to .client { font-size: 22px; font-weight: 800; color: var(--accent); margin-bottom: 16px; }
.ic-bill-to .detail-row { font-size: 13.5px; color: #475569; display: flex; margin-bottom: 8px; }
.ic-bill-to .detail-row span { color: var(--accent); font-weight: 600; }

.ic-payment { background: #f8fafc; border-radius: 8px; padding: 16px 20px; border: 1px solid #f1f5f9; }
.ic-payment-row { display: flex; font-size: 12px; margin-bottom: 8px; color: #64748b; }
.ic-payment-row:last-child { margin-bottom: 0; }
.ic-payment-row .k { width: 95px; color: #94a3b8; }
.ic-payment-row .v { color: #475569; font-weight: 400; flex: 1; text-align: left; }
.ic-payment-row .v.mono { font-family: 'JetBrains Mono', monospace; letter-spacing: 0.5px; font-size: 12.5px; color: #334155;}

.ic-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; table-layout: fixed; }
.ic-table th { padding: 8px 0; border-bottom: 1px solid #cbd5e1; font-size: 12.5px; font-weight: 700; color: #64748b; text-align: left; letter-spacing: 0.5px;}
.ic-table td { padding: 12px 0; border-bottom: 1px dotted #e2e8f0; vertical-align: middle; }
.ic-table td .t-name { font-size: 14.5px; font-weight: 800; color: #111827; margin-bottom: 2px; }
.ic-table td .t-desc { font-size: 11.5px; color: #94a3b8; }
.ic-table td .t-qty { font-size: 14px; font-weight: 500; color: #0f172a; text-align: center;}
.ic-table td .t-amt { font-size: 15px; font-weight: 800; color: #111827; font-family: 'JetBrains Mono', monospace; text-align: right; }

.ic-summary { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 0; margin-bottom: 32px; }
.ic-sum-box { width: 100%; max-width: 440px; }
.ic-sum-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #475569; padding: 6px 0; }
.ic-sum-row .v { font-weight: 800; color: #111827; font-family: 'JetBrains Mono', monospace; font-size: 15px;}
.ic-sum-row.discount { color: #dc2626; }
.ic-sum-row.discount .v { color: #dc2626; }
.ic-sum-grand { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding: 12px 0; border-top: 2px solid #0f172a; border-bottom: 2px solid #0f172a; }
.ic-sum-grand .lbl { font-size: 18px; font-weight: 900; color: #111827; line-height: 1.2; }
.ic-sum-grand .val { font-size: 26px; font-weight: 900; color: #111827; font-family: 'JetBrains Mono', monospace; line-height: 1; text-align: right; }

.ic-watermark { text-align: center; font-size: 10px; color: #e2e8f0; letter-spacing: 0.5px; margin-top: 12px;}
.detail-link { color: #0d9488; text-decoration: none; font-size: 11px; display: inline-flex; align-items: center; gap: 4px; max-width: 100px; }
.detail-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Flatpickr Premium Skin (UI UX Max override) */
.flatpickr-calendar { 
  font-family: inherit !important; border-radius: 20px !important; 
  box-shadow: 0 20px 50px rgba(0,0,0,0.1) !important; border: 1px solid var(--border-color) !important;
  background: var(--bg-surface) !important; padding: 12px !important;
  width: auto !important;
}
/* removed fixed multiMonth width for auto alignment */
.flatpickr-months { padding: 8px 0 !important; }
.flatpickr-months .flatpickr-month { color: var(--text-main) !important; fill: var(--text-main) !important; }
.flatpickr-current-month .flatpickr-monthDropdown-months { font-weight: 700 !important; font-size: 16px !important; }
.flatpickr-day { border-radius: 8px !important; color: var(--text-main) !important; font-weight: 500 !important; width: 38px !important; height: 38px !important; line-height: 38px !important; margin: 2px 0 !important; max-width: none !important; }
.flatpickr-day.inRange { 
  background: #e6f4f3 !important; 
  border-color: transparent !important; color: var(--accent) !important;
  border-radius: 0 !important;
  box-shadow: -5px 0 0 #e6f4f3, 5px 0 0 #e6f4f3 !important;
}
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange, .flatpickr-day.selected.inRange, .flatpickr-day.startRange.inRange, .flatpickr-day.endRange.inRange, .flatpickr-day.startRange.endRange { 
  background: var(--accent) !important; 
  color: #fff !important; border-color: var(--accent) !important; font-weight: 600 !important; 
  border-radius: 8px !important; 
}
.flatpickr-day.startRange {
  box-shadow: 5px 0 0 #e6f4f3 !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}
.flatpickr-day.endRange {
  box-shadow: -5px 0 0 #e6f4f3 !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}
.flatpickr-day.startRange.endRange { box-shadow: none !important; border-radius: 8px !important; }
.flatpickr-day.today:not(.selected):not(.startRange):not(.endRange) { border-color: var(--accent) !important; background: transparent !important; color: var(--accent) !important; }
.flatpickr-day:hover:not(.selected):not(.startRange):not(.endRange) { background: #e6f4f3 !important; color: var(--accent) !important; }
.flatpickr-weekday { color: var(--text-muted) !important; font-weight: 600 !important; font-size: 11px !important; letter-spacing: 0.5px; }
.flatpickr-calendar.arrowTop:before, .flatpickr-calendar.arrowTop:after { border-bottom-color: var(--bg-surface) !important;}
.flatpickr-calendar.arrowBottom:before, .flatpickr-calendar.arrowBottom:after { border-top-color: var(--bg-surface) !important;}
/* Remove flatpickr multi-month divider lines and add spacing */
.flatpickr-calendar .dayContainer, .flatpickr-calendar .flatpickr-month, .flatpickr-calendar .flatpickr-days { border: none !important; box-shadow: none !important; }
.flatpickr-calendar .dayContainer + .dayContainer, .flatpickr-calendar .flatpickr-month + .flatpickr-month { padding-left: 24px !important; }

/* Mobile Adjustments */
@media (max-width: 768px) {
  .sidebar { position: fixed; transform: translateX(-100%); width: 240px; }
  .sidebar.mobile-open { transform: translateX(0); box-shadow: 0 0 50px rgba(0,0,0,0.3); }
  .mobile-nav-btn { display: block; }
  .view-container { padding: 16px; }
  .header { padding: 16px; }
  .filter-bar { padding: 8px 16px; flex-direction: column; align-items: stretch; border-radius: var(--radius-md);}
  .card-table table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* Premium Filter Bar (Single Line) */
.premium-filter-bar {
  display: flex; align-items: center; gap: 4px; background: var(--bg-surface);
  border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 4px 16px; 
  box-shadow: var(--shadow-sm); margin-bottom: 24px; transition: all var(--transition);
}
.premium-filter-bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1); }
.filter-group { display: flex; align-items: center; gap: 12px; height: 40px; }
.filter-label { font-size: 13px; color: var(--text-muted); font-weight: 500; white-space: nowrap;}
.filter-divider { width: 1px; height: 20px; background: var(--border-color); margin: 0 12px; }
.filter-reset-btn {
  background: transparent; border: 1px solid var(--border-color); font-size: 12px; 
  padding: 4px 12px; border-radius: var(--radius-md); height: 32px; color: var(--text-muted); cursor: pointer;
  transition: all var(--transition);
}
.filter-reset-btn:hover { background: var(--bg-surface-hover); color: var(--text-main); }
.filter-search-wrap {
  display: flex; align-items: center; gap: 8px; background: #f8fafc; 
  padding: 4px 16px; border-radius: var(--radius-md); width: 220px;
}
.filter-search-wrap i { color: var(--text-muted); width: 14px;}
.filter-search-wrap input { background: transparent; border: none; font-size: 13px; width: 100%; color: var(--text-main); outline: none;}

/* Header Filter Bar (Very Compact) */
.header-filter-bar {
  display: flex; align-items: center; gap: 4px; background: #f1f5f9; 
  padding: 4px 10px; border-radius: var(--radius-md); border: 1px solid var(--border-color);
}
.mini-select {
  background: transparent; border: none; font-size: 13px; font-weight: 500;
  color: var(--text-main); outline: none; cursor: pointer; padding: 4px;
}
.modern-date-input.mini {
  background: transparent; border: none; box-shadow: none; height: 28px;
  font-size: 13px; width: 140px; color: var(--text-main); font-weight: 500;
}
.filter-reset-btn.mini {
  font-size: 11px; padding: 2px 8px; height: 24px; border-radius: var(--radius-md);
  background: #fff; border: 1px solid var(--border-color); color: var(--text-muted);
}

/* Settings Optimization: Chips & Cards */
.chip-container {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px;
}
.member-chip {
  display: flex; align-items: center; gap: 6px; padding: 6px 14px;
  background: var(--bg-surface-hover); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); font-size: 13px; font-weight: 500; color: var(--text-main);
  transition: all var(--transition);
}
.member-chip:hover { border-color: #ef4444; color: #ef4444; }
.member-chip .remove-icon { font-size: 14px; cursor: pointer; opacity: 0.5; }
.member-chip:hover .remove-icon { opacity: 1; }

.compact-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}

/* Modal tweaks */
.modal-overlay.active { display: flex; opacity: 1; z-index: 1000; }

/* Inovice Action Bar (Compact + Glassmorphism Sticky Bottom/Top) */
.invoice-action-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px; padding: 12px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: sticky; top: -20px; z-index: 40;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
@supports (backdrop-filter: blur(12px)) {
  .invoice-action-bar { background: rgba(255, 255, 255, 0.85); }
  @media (prefers-color-scheme: dark) { .invoice-action-bar { background: rgba(24, 24, 27, 0.85); } }
  body.force-dark .invoice-action-bar { background: rgba(24, 24, 27, 0.85); }
}

.action-bar-left { display: flex; align-items: center; gap: 14px; }
.action-bar-left i { width: 20px; height: 20px; color: var(--accent); }
.action-title { display: flex; flex-direction: column; }
.action-title span:first-child { font-size: 14px; font-weight: 700; color: var(--text-main); line-height: 1.2;}
.action-sub { font-size: 11px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; font-weight: 500;}

.action-bar-right { display: flex; gap: 10px; }
.btn-icon-text { height: 36px; padding: 0 16px; font-size: 13px; border-radius: 8px; font-weight: 600; }
.btn-icon-text i { width: 14px; margin-right: 4px; }
.invert-btn { background: var(--text-main); color: var(--bg-surface); }
.invert-btn:hover { background: var(--text-muted); transform: translateY(-1px); }

/* History Modal Tidy */
.history-tabs {
  display: flex; border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface); padding: 0 20px; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.history-tab-btn {
  flex: 1; padding: 16px 0; background: none; border: none; outline: none;
  border-bottom: 2px solid transparent; color: var(--text-muted);
  font-weight: 500; cursor: pointer; transition: all 0.2s;
  font-size: 14px;
}
.history-tab-btn:hover { color: var(--text-main); }
.history-tab-btn.active {
  color: var(--text-main); font-weight: 700; border-bottom-color: var(--accent);
}

.history-list-container {
  max-height: 55vh; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px;
}

.history-card {
  background: var(--bg-surface); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: 16px 20px; display: flex;
  justify-content: space-between; align-items: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02); transition: all 0.2s;
}
.history-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.hc-title { font-weight: 800; color: var(--text-main); margin-bottom: 6px; font-size: 16px; }
.hc-badge {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-sm); 
  margin-left: 6px; vertical-align: middle;
}
.hc-badge.draft { background: rgba(245, 158, 11, 0.1); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.2); }
.hc-badge.final { background: rgba(13, 148, 136, 0.1); color: #0d9488; border: 1px solid rgba(13, 148, 136, 0.2); }
.hc-date { font-size: 13px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; display: flex; align-items: center; gap: 6px; }
.hc-archive-time { font-size: 12px; color: var(--text-muted); margin-top: 8px; opacity: 0.8; font-weight: 500;}
.hc-actions { display: flex; gap: 8px; }

/* Ensure printed pages fill the vertical space so margin-top:auto sticks correctly */
.billing-page {
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
}

/* ===== Interactive Contributor Split Panel ===== */
.split-panel {
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: var(--radius-lg); padding: 20px; margin-bottom: 24px;
}
.split-badge {
    padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; font-family: 'JetBrains Mono', monospace; display:flex; align-items:center;
}
.split-badge.error { background: #fee2e2; color: #ef4444; border: 1px solid #fca5a5; }
.split-badge.success { background: #d1fae5; color: #10b981; border: 1px solid #6ee7b7; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);}
.split-bar-container {
    width: 100%; height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; margin-bottom: 20px;
}
.split-bar-segment { height: 100%; transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1); }

.active-members-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.member-split-row {
    display: flex; align-items: center; justify-content: space-between;
    background: #ffffff; padding: 12px 16px; border: 1px solid var(--border-color); border-radius: var(--radius-md);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02); transition: all 0.2s; animation: slideInX 0.2s ease-out;
}
.member-split-row:hover { border-color: #cbd5e1; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.ms-left { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 14px; color:var(--text-main); }
.ms-avatar { width: 30px; height: 30px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; box-shadow:inset 0 -2px 0 rgba(0,0,0,0.1); }
.ms-right { display: flex; align-items: center; gap: 12px; }

.quick-add-members { padding-top: 16px; border-top: 1px dashed var(--border-color); }
.quick-add-chip {
    padding: 3px 14px 3px 4px; /* Reduced left padding to hug the avatar nicely */
    background: #fff; border: 1px solid var(--border-color); border-radius: 20px;
    font-size: 13px; font-weight: 600; color: #475569; cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none; display:inline-flex; align-items:center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.quick-add-chip:hover {
    border-color: #cbd5e1; color: #0f172a; background: #f8fafc;
    transform: translateY(-1px); box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.quick-add-chip i { width: 14px; height: 14px; margin-right: 4px; }

/* Global Dropdown Menu */
.global-dropdown-menu {
    position: absolute;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    min-width: 180px;
    z-index: 9999;
    display: none;
    flex-direction: column;
    padding: 6px;
}
.global-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    border: none;
    background: transparent;
    text-align: left;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.global-dropdown-item i {
    opacity: 0.6;
    width: 16px;
    height: 16px;
}
.global-dropdown-item:hover {
    background: var(--bg-surface-hover);
}
.global-dropdown-item.danger {
    color: #ef4444;
}
.global-dropdown-item.danger:hover {
    background: #fee2e2;
}
