/* Modern Financial Dashboard Dark Theme */
:root {
  --bg-main: #0b0f19;
  --bg-card: #131b2e;
  --bg-card-hover: #1a253f;
  --bg-glass: rgba(19, 27, 46, 0.75);
  --border-card: #1e293b;
  --border-highlight: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-blue: #38bdf8;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Glass Card */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: 1rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

.glass-panel:hover {
  border-color: var(--border-highlight);
}

/* Pulse indicator */
.pulse-dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #10b981;
  opacity: 0.6;
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.8; }
  50% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(0.8); opacity: 0; }
}

/* Custom button glow */
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
  transition: all 0.2s;
}
.btn-secondary:hover {
  background: #334155;
  color: white;
}

.btn-emerald {
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.35);
}
.btn-emerald:hover {
  background: linear-gradient(135deg, #047857, #059669);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}

/* Table styling - Clean, Non-wrapping, Premium Dark */
.ledger-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.ledger-table th {
  padding: 0.75rem 1rem;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: #94a3b8;
  background-color: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
  white-space: nowrap !important;
  user-select: none;
}

.ledger-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(30, 41, 59, 0.5);
  font-size: 0.825rem;
  white-space: nowrap !important;
  vertical-align: middle;
}

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

.ledger-table tr:hover td {
  background-color: rgba(30, 41, 59, 0.45);
}

/* Badge System */
.badge-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap !important;
  border-radius: 9999px;
  line-height: 1.25;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap !important;
  border-radius: 0.375rem;
  line-height: 1.25;
  min-width: 44px;
}

/* Modal styling */
.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

/* Animation utilities */
.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

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