:root {
    --bg-primary: #0B0F19;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2235;
    --bg-hover: #1e293b;
    --border: rgba(255,255,255,0.06);
    --border-light: rgba(255,255,255,0.1);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #6366F1;
    --accent-hover: #818cf8;
    --accent-bg: rgba(99,102,241,0.1);
    --accent-soft: rgba(99,102,241,0.15);
    --green: #10B981;
    --green-bg: rgba(16,185,129,0.1);
    --amber: #F59E0B;
    --amber-bg: rgba(245,158,11,0.1);
    --red: #EF4444;
    --red-bg: rgba(239,68,68,0.1);
    --blue: #3B82F6;
    --blue-bg: rgba(59,130,246,0.1);
    --gray: #6B7280;
    --gray-bg: rgba(107,114,128,0.1);
    --sidebar-width: 240px;
    --sidebar-collapsed: 64px;
    --radius: 8px;
    --radius-lg: 12px;
    --font-display: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'IBM Plex Sans', sans-serif;
    --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 20px rgba(99,102,241,0.15);
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;
}

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

html, body {
    height: 100%;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    overflow: hidden;
}

html::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(99,102,241,0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(168,85,247,0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

.app-layout { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  overflow: hidden;
}

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

.sidebar-header {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
}

.sidebar-logo {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-logo i { color: #fff; width: 18px; height: 18px; }

.sidebar-brand { display: flex; flex-direction: column; overflow: hidden; white-space: nowrap; }
.sidebar-brand h1 { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.sidebar-brand span { font-size: 11px; color: var(--text-muted); letter-spacing: 0.5px; }
.sidebar.collapsed .sidebar-brand { opacity: 0; width: 0; }

.sidebar-nav { flex: 1; padding: 12px 8px; overflow-y: auto; overflow-x: hidden; }

.nav-section-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 12px 12px 6px;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar.collapsed .nav-section-title { opacity: 0; height: 0; padding: 0; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition-normal);
    color: var(--text-secondary);
    position: relative;
    margin-bottom: 4px;
    white-space: nowrap;
    text-decoration: none;
    transform: translateX(0);
}

.nav-item:hover { 
    background: var(--bg-hover); 
    color: var(--text-primary); 
    transform: translateX(2px);
}
.nav-item.active { 
    background: var(--accent-bg); 
    color: var(--accent); 
    box-shadow: var(--shadow-glow);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.nav-item i { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item-text { font-size: 13px; font-weight: 500; overflow: hidden; }
.sidebar.collapsed .nav-item-text { opacity: 0; width: 0; }

.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

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

.sidebar-footer { padding: 12px; border-top: 1px solid var(--border); position: relative; }

.user-wrapper { position: relative; }

.user-info { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius); cursor: pointer; transition: background 0.15s; text-decoration: none; }

.user-info:hover { background: var(--bg-hover); }

.user-chevron {
    margin-left: auto;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.user-wrapper.open .user-chevron {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    bottom: 100%;
    left: 12px;
    right: 12px;
    margin-bottom: 8px;
    background: rgba(17, 24, 39, 0.95);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-lg);
    padding: 4px;
    display: none;
    z-index: 100;
}

.user-wrapper.open .user-dropdown {
    display: block;
    animation: fadeInUp 0.2s ease;
}

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

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    width: 100%;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
}

.user-dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.user-dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366F1, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

.user-details { overflow: hidden; white-space: nowrap; }
.user-details .name { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.user-details .role { font-size: 11px; color: var(--text-muted); }
.sidebar.collapsed .user-details { opacity: 0; width: 0; }

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

.topbar {
  height: 56px;
  min-height: 56px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
}

.topbar-left { display: flex; align-items: center; gap: 16px; }

.toggle-sidebar {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
}

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

.page-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text-primary); }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.topbar-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  position: relative;
  transition: all 0.15s;
  text-decoration: none;
}

.topbar-btn:hover { color: var(--text-primary); border-color: var(--border-light); }

.topbar-btn .dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  background: var(--red);
  border-radius: 50%;
  border: 1.5px solid var(--bg-primary);
}

.content-area { flex: 1; overflow-y: auto; padding: 24px; }

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 150;
}

.mobile-overlay.show { display: block; }

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--transition-normal);
    position: relative;
    backdrop-filter: blur(8px);
}

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

.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.card-title { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--text-primary); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi-card { 
    background: var(--bg-secondary); 
    border: 1px solid var(--border); 
    border-radius: var(--radius-lg); 
    padding: 20px; 
    transition: all var(--transition-normal); 
    position: relative;
    overflow: hidden;
}
.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: all var(--transition-normal);
}
.kpi-card:hover { 
    border-color: var(--border-light); 
    transform: translateY(-3px); 
    box-shadow: var(--shadow-lg);
}
.kpi-card:hover::before {
    opacity: 1;
    transform: scaleX(1);
}
.kpi-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.kpi-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.kpi-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.kpi-icon i { width: 18px; height: 18px; }
.kpi-icon.accent { background: var(--accent-bg); color: var(--accent); }
.kpi-icon.green { background: var(--green-bg); color: var(--green); }
.kpi-icon.amber { background: var(--amber-bg); color: var(--amber); }
.kpi-icon.blue { background: var(--blue-bg); color: var(--blue); }
.kpi-value { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--text-primary); line-height: 1.2; margin-bottom: 8px; }
.kpi-trend { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; }
.kpi-trend.up { color: var(--green); }
.kpi-trend.down { color: var(--red); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two-col { display: grid; grid-template-columns: 7fr 3fr; gap: 20px; margin-bottom: 24px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-running { background: var(--blue-bg); color: var(--blue); }
.badge-completed { background: var(--green-bg); color: var(--green); }
.badge-failed { background: var(--red-bg); color: var(--red); }
.badge-queued { background: var(--gray-bg); color: var(--gray); }
.badge-paused { background: var(--amber-bg); color: var(--amber); }
.badge-cancelled { background: var(--gray-bg); color: var(--gray); text-decoration: line-through; }
.badge-processing { background: var(--blue-bg); color: var(--blue); }
.badge-pending { background: var(--amber-bg); color: var(--amber); }
.badge-type { background: var(--accent-bg); color: var(--accent); }

.badge-running::before, .badge-processing::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.5s infinite; }

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.progress-bar { width: 100%; height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-hover)); transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); position: relative; }
.progress-fill.animated::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); animation: shimmer 2s infinite; }

@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

.progress-fill.green { background: linear-gradient(90deg, var(--green), #34d399); }
.progress-fill.amber { background: linear-gradient(90deg, var(--amber), #fbbf24); }
.progress-fill.red { background: linear-gradient(90deg, var(--red), #f87171); }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 10px 12px; font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 12px; font-size: 13px; color: var(--text-secondary); border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.data-table .task-name { color: var(--text-primary); font-weight: 500; }

.btn { 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    padding: 8px 16px; 
    border-radius: var(--radius); 
    font-size: 13px; 
    font-weight: 500; 
    cursor: pointer; 
    transition: all var(--transition-fast); 
    border: none; 
    font-family: var(--font-body); 
    white-space: nowrap; 
    text-decoration: none; 
    position: relative;
    overflow: hidden;
}
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}
.btn:hover::before { opacity: 1; }
.btn i { width: 14px; height: 14px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(99,102,241,0.2); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(99,102,241,0.3); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-light); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-icon { 
    padding: 8px; 
    background: transparent; 
    border: none; 
    color: var(--text-muted); 
    cursor: pointer; 
    border-radius: var(--radius); 
    display: inline-flex; 
    align-items: center; 
    transition: all var(--transition-fast); 
    text-decoration: none; 
}
.btn-icon:hover { color: var(--text-primary); background: var(--bg-hover); }
.btn-icon:active { transform: scale(0.95); }
.btn-icon i { width: 16px; height: 16px; }

.filter-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-tabs { display: flex; gap: 4px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 3px; }
.filter-tab { padding: 5px 14px; font-size: 12px; font-weight: 500; color: var(--text-muted); cursor: pointer; border-radius: 6px; transition: all 0.15s; border: none; background: none; font-family: var(--font-body); text-decoration: none; display: inline-flex; align-items: center; }
.filter-tab:hover { color: var(--text-secondary); }
.filter-tab.active { background: var(--accent); color: #fff; }

.search-box { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    background: var(--bg-secondary); 
    border: 1px solid var(--border); 
    border-radius: var(--radius); 
    padding: 0 12px; 
    flex: 1; 
    max-width: 320px; 
    min-width: 180px; 
    transition: all var(--transition-fast); 
}
.search-box:focus-within { 
    border-color: var(--accent); 
    box-shadow: 0 0 0 3px var(--accent-bg);
}
.search-box i { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; transition: color var(--transition-fast); }
.search-box:focus-within i { color: var(--accent); }
.search-box input { background: none; border: none; outline: none; color: var(--text-primary); font-size: 13px; padding: 9px 0; width: 100%; font-family: var(--font-body); }
.search-box input::placeholder { color: var(--text-muted); }

.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.asset-card { 
    background: var(--bg-secondary); 
    border: 1px solid var(--border); 
    border-radius: var(--radius-lg); 
    overflow: hidden; 
    transition: all var(--transition-normal); 
    cursor: pointer; 
    text-decoration: none; 
}
.asset-card:hover { 
    border-color: var(--accent); 
    transform: translateY(-4px) scale(1.02); 
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}
.asset-thumb { 
    width: 100%; 
    height: 160px; 
    object-fit: cover; 
    display: block; 
    background: var(--bg-tertiary); 
    transition: transform var(--transition-normal);
}
.asset-card:hover .asset-thumb { transform: scale(1.05); }

/* 表单输入框样式 */
.form-group { margin-bottom: 16px; }
.form-label { 
    display: block; 
    font-size: 12px; 
    font-weight: 500; 
    color: var(--text-muted); 
    margin-bottom: 6px; 
}
.form-input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
    transition: all var(--transition-fast);
}
.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-bg);
}
.form-input::placeholder {
    color: var(--text-muted);
}
.form-select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
    transition: all var(--transition-fast);
    cursor: pointer;
}
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-bg);
}

/* 上传区域样式 */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
    background: rgba(255,255,255,0.02);
}
.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--accent);
    background: var(--accent-bg);
}
.upload-zone i {
    font-size: 32px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.upload-zone-text {
    font-size: 13px;
    color: var(--text-secondary);
}
.upload-zone-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}
.asset-info { padding: 14px; }
.asset-name { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.asset-size { font-size: 11px; color: var(--text-muted); }
.asset-actions { display: flex; gap: 4px; }

.provider-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.provider-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; transition: all 0.2s; }
.provider-card:hover { border-color: var(--border-light); }
.provider-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; }
.provider-name { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 8px; min-width: 0; }
.provider-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.online { background: var(--green); box-shadow: 0 0 8px rgba(16,185,129,0.5); animation: pulse 2s infinite; }
.status-dot.offline { background: var(--red); }
.status-dot.warning { background: var(--amber); animation: pulse 2s infinite; }
.provider-body { margin-bottom: 16px; }
.provider-field { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12px; gap: 12px; }
.provider-field:last-child { border-bottom: none; }
.provider-field .label { color: var(--text-muted); }
.provider-field .value { color: var(--text-secondary); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 12px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.provider-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.provider-tag { padding: 3px 10px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 20px; font-size: 11px; color: var(--text-secondary); }
.provider-actions { display: flex; gap: 8px; }

.text-accent { color: var(--accent); }
.text-accent-hover:hover { color: var(--accent-hover); }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-green { color: var(--green); }
.text-amber { color: var(--amber); }
.text-blue { color: var(--blue); }

.bg-accent\/10 { background: var(--accent-bg); }
.bg-green\/10 { background: var(--green-bg); }
.bg-amber\/10 { background: var(--amber-bg); }
.bg-blue\/10 { background: var(--blue-bg); }

.action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all 0.15s ease;
}

.action-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.workflow-flow { display: flex; align-items: center; gap: 0; padding: 24px 16px; overflow-x: auto; }
.flow-node { display: flex; flex-direction: column; align-items: center; min-width: 140px; position: relative; }
.flow-node-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; border: 2px solid; }
.flow-node-icon i { width: 20px; height: 20px; }
.flow-node-icon.type-input { background: rgba(99,102,241,0.1); border-color: var(--accent); color: var(--accent); }
.flow-node-icon.type-process { background: rgba(59,130,246,0.1); border-color: var(--blue); color: var(--blue); }
.flow-node-icon.type-output { background: rgba(16,185,129,0.1); border-color: var(--green); color: var(--green); }
.flow-node-icon.type-ai { background: rgba(168,85,247,0.1); border-color: #a855f7; color: #a855f7; }
.flow-node-label { font-size: 12px; font-weight: 600; color: var(--text-primary); text-align: center; margin-bottom: 4px; }
.flow-node-detail { font-size: 11px; color: var(--text-muted); text-align: center; max-width: 130px; }
.flow-arrow { display: flex; align-items: center; padding: 0 8px; color: var(--text-muted); flex-shrink: 0; }
.flow-arrow i { width: 20px; height: 20px; }

.workflow-detail-panel { display: none; margin-top: 20px; animation: fadeIn 0.3s ease; }
.workflow-detail-panel.open { display: block; }

.task-row td { cursor: pointer; }
.task-expand-icon { transition: transform 0.2s; display: inline-flex; }
.task-expand-icon.open { transform: rotate(90deg); }

.task-detail { display: none; padding: 16px 20px; background: rgba(255,255,255,0.02); border-bottom: 1px solid var(--border); }
.task-detail.open { display: block; animation: fadeIn 0.2s ease; }
.task-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.step-result { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--bg-secondary); border-radius: var(--radius); border: 1px solid var(--border); }
.step-result-icon { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-result-icon i { width: 14px; height: 14px; }
.step-result-info { flex: 1; min-width: 0; }
.step-result-name { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.step-result-meta { font-size: 11px; color: var(--text-muted); }

.cost-breakdown { padding: 12px; background: var(--bg-secondary); border-radius: var(--radius); border: 1px solid var(--border); }
.cost-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 12px; gap: 12px; }
.cost-row .label { color: var(--text-muted); }
.cost-row .value { color: var(--text-secondary); font-weight: 500; }
.cost-row.total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px; }
.cost-row.total .label { color: var(--text-primary); font-weight: 600; }
.cost-row.total .value { color: var(--accent); font-weight: 700; }

.timeline { padding: 4px 0; }
.timeline-item { display: flex; gap: 12px; padding: 10px 0; position: relative; }
.timeline-item:not(:last-child)::after { content: ''; position: absolute; left: 15px; top: 38px; bottom: -2px; width: 1px; background: var(--border); }
.timeline-icon { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.timeline-icon i { width: 14px; height: 14px; }
.timeline-content { flex: 1; min-width: 0; }
.timeline-text { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.timeline-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state i { width: 48px; height: 48px; margin-bottom: 16px; opacity: 0.3; }
.empty-state p { font-size: 14px; }

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

.pf-card { background: rgba(17, 24, 39, 0.72); border: 1px solid var(--border); border-radius: var(--radius-lg); backdrop-filter: blur(12px); box-shadow: var(--shadow); }
.pf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: transparent; color: var(--text-secondary); text-decoration: none; cursor: pointer; }
.pf-btn:hover { background: var(--bg-hover); border-color: var(--border-light); color: var(--text-primary); }
.pf-btn-primary { background: var(--accent); color: #fff; border: 1px solid transparent; border-radius: var(--radius); padding: 8px 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.pf-btn-primary:hover { background: var(--accent-hover); }

.pf-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pf-section-title { font-weight: 800; font-size: 14px; }

.pf-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  color: var(--text-primary);
  outline: none;
  font-family: var(--font-body);
}

.pf-input:focus { border-color: rgba(99,102,241,0.55); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.pf-error { margin-top: 6px; color: #f87171; font-size: 12px; }

@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { position: fixed; left: -240px; top: 0; bottom: 0; z-index: 200; }
  .sidebar.mobile-open { left: 0; }
  .sidebar.collapsed { left: -64px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .provider-grid { grid-template-columns: 1fr; }
  .content-area { padding: 16px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .search-box { max-width: none; }
  .task-detail-grid { grid-template-columns: 1fr; }
}

body.fi-body,
.fi-body {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.fi-topbar {
  background: rgba(11, 15, 25, 0.6);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.fi-sidebar {
  background: rgba(17, 24, 39, 0.86);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.fi-section,
.fi-card,
.fi-ta-content,
.fi-wi {
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
}

.fi-btn { border-radius: var(--radius); }

.fi-btn-color-primary,
.fi-btn.fi-color-primary { background: var(--accent); }

.fi-btn-color-primary:hover,
.fi-btn.fi-color-primary:hover { background: var(--accent-hover); }

.fi-input,
.fi-select-input,
.fi-textarea {
  border-radius: var(--radius);
  border-color: var(--border-light);
}

.fi-ta-row:hover { background: rgba(255, 255, 255, 0.02); }

.fi-body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
}

.fi-topbar {
  background: rgba(11, 15, 25, 0.7);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  box-shadow: none;
}

.fi-sidebar {
  background: rgba(17, 24, 39, 0.85);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.fi-sidebar-nav-item.fi-active {
  background: var(--accent-bg);
  color: var(--accent);
}

.fi-sidebar-nav-item:hover {
  background: var(--bg-hover);
}

.fi-card,
.fi-section,
.fi-wi,
.fi-ta-content {
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.fi-btn {
  border-radius: var(--radius);
  transition: all 0.15s ease;
}

.fi-btn-color-primary,
.fi-btn.fi-color-primary {
  background: var(--accent);
}

.fi-btn-color-primary:hover,
.fi-btn.fi-color-primary:hover {
  background: var(--accent-hover);
}

.fi-input,
.fi-select-input,
.fi-textarea,
.fi-search-input input {
  border-radius: var(--radius);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

.fi-input:focus,
.fi-select-input:focus,
.fi-textarea:focus,
.fi-search-input input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.fi-badge {
  border-radius: 20px;
}

.fi-tabs-tab.fi-active {
  color: var(--accent);
  border-color: var(--accent);
}

.fi-header-heading,
.fi-header {
  font-family: var(--font-display);
}

.fi-heading {
  font-family: var(--font-display);
}

.fi-modal-content-wrapper {
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
}

.fi-dropdown-panel {
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
}

.fi-dropdown-item:hover {
  background: var(--bg-hover);
}

.fi-avatar {
  background: linear-gradient(135deg, var(--accent), #a78bfa);
}

.fi-sidebar-header {
  border-bottom: 1px solid var(--border);
}

.fi-sidebar-group-label {
  color: var(--text-muted);
}

/* Filament Admin Panel Customization */
.fi-layout {
  background: var(--bg-primary);
}

.fi-body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
}

.fi-topbar {
  background: var(--bg-primary) !important;
  border-bottom: 1px solid var(--border) !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}

.fi-topbar-search {
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: var(--border) !important;
}

.fi-topbar-search input {
  color: var(--text-primary) !important;
}

.fi-topbar-user-menu {
  background: transparent !important;
  border: none !important;
}

.fi-sidebar {
  background: rgba(17, 24, 39, 0.9) !important;
  border-right: 1px solid var(--border) !important;
  backdrop-filter: blur(12px) !important;
}

.fi-sidebar-header {
  border-bottom: 1px solid var(--border) !important;
  padding: 16px !important;
}

.fi-sidebar-nav-item {
  border-radius: var(--radius) !important;
  margin: 2px 8px !important;
}

.fi-sidebar-nav-item.fi-active {
  background: var(--accent-bg) !important;
  color: var(--accent) !important;
}

.fi-sidebar-nav-item:hover {
  background: var(--bg-hover) !important;
  color: var(--text-primary) !important;
}

.fi-sidebar-nav-item-icon {
  color: var(--text-secondary) !important;
}

.fi-sidebar-nav-item.fi-active .fi-sidebar-nav-item-icon {
  color: var(--accent) !important;
}

.fi-sidebar-group-label {
  color: var(--text-muted) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 1.2px !important;
  padding: 12px 12px 6px !important;
}

.fi-card,
.fi-section,
.fi-wi,
.fi-ta-content {
  background: rgba(17, 24, 39, 0.72) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  backdrop-filter: blur(12px) !important;
  box-shadow: var(--shadow) !important;
}

.fi-card-header {
  border-bottom: 1px solid var(--border) !important;
}

.fi-card-title {
  font-family: var(--font-display) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
}

.fi-btn {
  border-radius: var(--radius) !important;
  transition: all 0.15s ease !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

.fi-btn-color-primary,
.fi-btn.fi-color-primary {
  background: var(--accent) !important;
  color: white !important;
  border: none !important;
}

.fi-btn-color-primary:hover,
.fi-btn.fi-color-primary:hover {
  background: var(--accent-hover) !important;
}

.fi-btn-color-secondary,
.fi-btn.fi-color-secondary {
  background: transparent !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border) !important;
}

.fi-btn-color-secondary:hover,
.fi-btn.fi-color-secondary:hover {
  background: var(--bg-hover) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-light) !important;
}

.fi-input,
.fi-select-input,
.fi-textarea,
.fi-search-input input {
  border-radius: var(--radius) !important;
  border-color: var(--border) !important;
  background: rgba(255, 255, 255, 0.02) !important;
  color: var(--text-primary) !important;
  padding: 10px 12px !important;
}

.fi-input:focus,
.fi-select-input:focus,
.fi-textarea:focus,
.fi-search-input input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-bg) !important;
}

.fi-input::placeholder,
.fi-select-input::placeholder,
.fi-textarea::placeholder {
  color: var(--text-muted) !important;
}

.fi-badge {
  border-radius: 20px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

.fi-badge.fi-color-primary {
  background: var(--accent-bg) !important;
  color: var(--accent) !important;
}

.fi-badge.fi-color-success {
  background: var(--green-bg) !important;
  color: var(--green) !important;
}

.fi-badge.fi-color-warning {
  background: var(--amber-bg) !important;
  color: var(--amber) !important;
}

.fi-badge.fi-color-danger {
  background: var(--red-bg) !important;
  color: var(--red) !important;
}

.fi-tabs {
  background: transparent !important;
  border-bottom: 1px solid var(--border) !important;
}

.fi-tabs-tab {
  border-radius: var(--radius) var(--radius) 0 0 !important;
  margin-bottom: -1px !important;
  padding: 8px 16px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--text-muted) !important;
}

.fi-tabs-tab.fi-active {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--accent) !important;
  border-color: var(--accent) !important;
  border-bottom-color: transparent !important;
}

.fi-header-heading,
.fi-header {
  font-family: var(--font-display) !important;
  color: var(--text-primary) !important;
}

.fi-heading {
  font-family: var(--font-display) !important;
  color: var(--text-primary) !important;
}

.fi-modal-content-wrapper {
  background: rgba(17, 24, 39, 0.95) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  backdrop-filter: blur(16px) !important;
}

.fi-modal-header {
  border-bottom: 1px solid var(--border) !important;
}

.fi-modal-footer {
  border-top: 1px solid var(--border) !important;
}

.fi-dropdown-panel {
  background: rgba(17, 24, 39, 0.95) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  backdrop-filter: blur(12px) !important;
  box-shadow: var(--shadow-lg) !important;
}

.fi-dropdown-item {
  color: var(--text-secondary) !important;
  padding: 10px 12px !important;
}

.fi-dropdown-item:hover {
  background: var(--bg-hover) !important;
  color: var(--text-primary) !important;
}

.fi-avatar {
  background: linear-gradient(135deg, var(--accent), #a78bfa) !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  color: white !important;
}

.fi-ta-row {
  border-bottom: 1px solid var(--border) !important;
}

.fi-ta-row:hover {
  background: rgba(255, 255, 255, 0.02) !important;
}

.fi-ta-cell {
  color: var(--text-secondary) !important;
}

.fi-ta-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-bottom: 16px !important;
  border-bottom: 1px solid var(--border) !important;
  margin-bottom: 16px !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
}

.fi-ta-search-wrapper {
  flex: 1 !important;
  max-width: 320px !important;
  margin-right: auto !important;
}

.fi-ta-actions {
  display: flex !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

.fi-actions {
  display: flex !important;
  gap: 8px !important;
}

.fi-page-list-records-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-bottom: 16px !important;
  border-bottom: 1px solid var(--border) !important;
  margin-bottom: 16px !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
}

.fi-page-list-records-header .fi-search {
  flex: 1 !important;
  max-width: 320px !important;
  margin-right: auto !important;
}

.fi-page-list-records-header .fi-actions {
  flex-shrink: 0 !important;
}

.fi-ta-header-cell {
  color: var(--text-muted) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.fi-action-trigger {
  color: var(--text-muted) !important;
}

.fi-action-trigger:hover {
  color: var(--text-primary) !important;
}

.fi-wi {
  padding: 20px !important;
}

.fi-stat-value {
  font-family: var(--font-display) !important;
  font-size: 28px !important;
  font-weight: 800 !important;
  color: var(--text-primary) !important;
}

.fi-stat-label {
  font-size: 12px !important;
  color: var(--text-muted) !important;
}

/* Filament Login Page Customization */
.fi-page-auth-login {
  background: linear-gradient(135deg, #0B0F19 0%, #111827 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.fi-page-auth-login::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.1), transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.1), transparent 50%);
  pointer-events: none;
}

.fi-auth-layout {
  position: relative;
  z-index: 1;
}

.fi-card {
  background: rgba(17, 24, 39, 0.72) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 12px !important;
  backdrop-filter: blur(12px) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
}

.fi-heading {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.fi-input-wrapper input,
.fi-input {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  color: #f1f5f9 !important;
}

.fi-input-wrapper input:focus,
.fi-input:focus {
  border-color: rgba(99, 102, 241, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12) !important;
}

.fi-btn-primary {
  background: #6366F1 !important;
  border-radius: 8px !important;
}

.fi-btn-primary:hover {
  background: #818cf8 !important;
}

.fi-checkbox input:checked {
  background-color: #6366F1 !important;
  border-color: #6366F1 !important;
}

.fi-brand img {
  display: none;
}

.fi-brand::before {
  content: '';
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #6366F1, #a78bfa);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 28px 28px;
}

/* Filament Create/Edit Page Header */
.fi-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px;
  margin: -24px -24px 24px -24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.fi-page-header-start {
  flex: 1;
  min-width: 0;
}

.fi-page-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.fi-page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.fi-page-header-end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Filament Form Layout Improvements */
.fi-form-card {
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}

.fi-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.fi-section-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Form Field Labels */
.fi-field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}

/* Checkbox/Radio styling */
.fi-checkbox,
.fi-radio {
  border-radius: 4px;
  border-color: var(--border-light);
}

.fi-checkbox:checked,
.fi-radio:checked {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
}

/* Repeater styling */
.fi-repeater-item {
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.fi-repeater-header {
  background: var(--bg-tertiary);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.fi-repeater-header-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.fi-repeater-content {
  padding: 16px;
}

/* File Upload styling */
.fi-file-upload {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.15s ease;
}

.fi-file-upload:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
}

/* KeyValue input styling */
.fi-key-value-row {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-bottom: 8px;
}

/* Tags Input styling */
.fi-tags-input {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
}

.fi-tags-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.fi-tag {
  background: var(--accent-bg);
  color: var(--accent);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Page Actions Bar */
.fi-page-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  margin-top: 24px;
}

.fi-page-actions-start {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fi-page-actions-end {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Filament Empty State */
.fi-empty-state {
  padding: 60px 20px;
  text-align: center;
  background: rgba(17, 24, 39, 0.5);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

.fi-empty-state-icon {
  color: var(--text-muted);
  opacity: 0.4;
  margin-bottom: 16px;
}

.fi-empty-state-heading {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.fi-empty-state-description {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Filament Table Improvements */
.fi-ta-header {
  background: transparent !important;
  border-bottom: 1px solid var(--border) !important;
  padding-bottom: 12px !important;
  margin-bottom: 16px !important;
}

.fi-ta-empty-state {
  background: rgba(17, 24, 39, 0.3);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
}

/* Filament Notifications */
.fi-notification {
  background: rgba(17, 24, 39, 0.95) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  backdrop-filter: blur(12px) !important;
  box-shadow: var(--shadow-lg) !important;
}

.fi-notification-icon {
  border-radius: 50%;
  padding: 8px;
}

.fi-notification-icon.success {
  background: var(--green-bg);
  color: var(--green);
}

.fi-notification-icon.danger {
  background: var(--red-bg);
  color: var(--red);
}

.fi-notification-icon.warning {
  background: var(--amber-bg);
  color: var(--amber);
}

.fi-notification-icon.info {
  background: var(--blue-bg);
  color: var(--blue);
}

/* Filament Select Dropdown */
.fi-select-dropdown {
  background: rgba(17, 24, 39, 0.95) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  backdrop-filter: blur(12px) !important;
  box-shadow: var(--shadow-lg) !important;
}

.fi-select-option {
  padding: 10px 12px;
  transition: background 0.15s;
}

.fi-select-option:hover {
  background: var(--bg-hover);
}

.fi-select-option.selected {
  background: var(--accent-bg);
  color: var(--accent);
}

/* Loading States */
.fi-loading-indicator {
  color: var(--accent);
}

/* Stat Widget Improvements */
.fi-stat-card {
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.fi-stat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.fi-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.fi-stat-icon i {
  width: 20px;
  height: 20px;
}

/* Table Widget */
.fi-table-widget {
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.fi-table-widget-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Modal Customizations */
.fi-modal {
  background: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(4px);
}

.fi-modal-content {
  background: rgba(17, 24, 39, 0.95) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
}

.fi-modal-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
}

.fi-modal-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.fi-modal-body {
  padding: 20px;
}

.fi-modal-footer {
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Action Group */
.fi-action-group {
  display: inline-flex;
  gap: 4px;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .fi-stat-card {
    padding: 16px;
  }
}

@media (max-width: 768px) {
  .fi-empty-state {
    padding: 40px 16px;
  }

  .fi-modal-content {
    margin: 16px;
    max-width: calc(100% - 32px);
  }
}

/* ============ 通用辅助样式 ============ */
.space-y-6 > * + * {
  margin-top: 24px;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-3 {
  gap: 12px;
}

.gap-2 {
  gap: 8px;
}

.w-full {
  width: 100%;
}

.w-6 {
  width: 24px;
  height: 24px;
}

.w-10 {
  width: 40px;
  height: 40px;
}

.w-12 {
  width: 48px;
  height: 48px;
}

.h-6 {
  height: 24px;
}

.h-10 {
  height: 40px;
}

.h-12 {
  height: 48px;
}

.p-0 {
  padding: 0;
}

.p-3 {
  padding: 12px;
}

.p-4 {
  padding: 16px;
}

.px-4 {
  padding-left: 16px;
  padding-right: 16px;
}

.px-5 {
  padding-left: 20px;
  padding-right: 20px;
}

.py-3 {
  padding-top: 12px;
  padding-bottom: 12px;
}

.py-4 {
  padding-top: 16px;
  padding-bottom: 16px;
}

.py-5 {
  padding-top: 20px;
  padding-bottom: 20px;
}

.pl-5 {
  padding-left: 20px;
}

.pr-5 {
  padding-right: 20px;
}

.rounded-lg {
  border-radius: var(--radius);
}

.rounded {
  border-radius: var(--radius);
}

.text-sm {
  font-size: 13px;
}

.text-xs {
  font-size: 11px;
}

.text-lg {
  font-size: 18px;
}

.font-bold {
  font-weight: 700;
}

.font-medium {
  font-weight: 500;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.mb-2 {
  margin-bottom: 8px;
}

.mb-3 {
  margin-bottom: 12px;
}

.mb-4 {
  margin-bottom: 16px;
}

.ml-auto {
  margin-left: auto;
}

.opacity-30 {
  opacity: 0.3;
}

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

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

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

.text-accent {
  color: var(--accent);
}

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

.text-green {
  color: var(--green);
}

.text-amber {
  color: var(--amber);
}

.text-blue {
  color: var(--blue);
}

.bg-accent\/10 {
  background: var(--accent-bg);
}

.bg-green\/10 {
  background: var(--green-bg);
}

.bg-amber\/10 {
  background: var(--amber-bg);
}

.bg-blue\/10 {
  background: var(--blue-bg);
}

.bg-tertiary {
  background: var(--bg-tertiary);
}

.grid {
  display: grid;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.transition-colors {
  transition: color var(--transition-fast);
}

.hover\:bg-white\/5:hover {
  background: rgba(255, 255, 255, 0.05);
}

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

.overflow-hidden {
  overflow: hidden;
}

.object-cover {
  object-fit: cover;
}

.border-t {
  border-top: 1px solid var(--border);
}

.border-border {
  border-color: var(--border);
}

.pt-4 {
  padding-top: 16px;
}

/* ============ 管理端页面布局优化 ============ */
.card-body {
  padding: 0;
}

.card-body:first-child {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-body:last-child {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* 管理员端页面标题样式 */
.admin-page-header {
  margin-bottom: 24px;
}

.admin-page-header h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

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

/* 快捷操作卡片改进 */
.action-card {
  border-radius: var(--radius-lg);
}

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