@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&family=Dancing+Script:wght@700&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

button,
input,
select,
textarea {
  font-family: 'Roboto', sans-serif;
}

body {
  font-family: 'Roboto', sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  overflow: hidden;
  height: 100vh;
}

.app {
  display: flex;
  height: 100vh;
  padding: 16px;
  gap: 16px;
  overflow: hidden;
  position: relative;
}

/* SIDEBAR */
.sidebar {
  width: 256px;
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 1.5rem;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: #2563eb;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-style: italic;
  color: #fff;
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
  font-size: 14px;
}

.logo span {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fff;
}

nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  color: #94a3b8;
  border-radius: 12px;
  cursor: not-allowed;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: #0f172a;
}

.nav-section-label {
  font-size: 10px;
  color: #64748b;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 12px;
  margin-bottom: 4px;
}

.nav-agent {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid transparent;
  font-size: 14px;
}

.nav-agent .icon {
  flex-shrink: 0;
}

.nav-agent.active-invoice {
  background: rgba(37, 99, 235, 0.1);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.1);
}

.nav-agent.active-invoice .label {
  font-weight: 700;
  color: #fff;
}

.nav-agent.active-invoice .icon {
  color: #3b82f6;
}

.nav-agent.active-bookkeeping {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}

.nav-agent.active-bookkeeping .label {
  font-weight: 700;
  color: #fff;
}

.nav-agent.active-bookkeeping .icon {
  color: #10b981;
}

.nav-agent.inactive {
  color: #94a3b8;
  border-color: transparent;
}

.nav-agent.inactive:hover {
  background: #0f172a;
  color: #cbd5e1;
}

.nav-agent .label {
  font-weight: 500;
}

.wallet-box {
  margin-top: auto;
  background: #0f172a;
  padding: 16px;
  border-radius: 1rem;
  border: 1px solid #1e293b;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.wallet-label {
  font-size: 10px;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.wallet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wallet-amount {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
}

/* MAIN CONTENT */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  position: relative;
  min-width: 0;
}

.header-bar {
  background: rgba(2, 6, 23, 0.5);
  backdrop-filter: blur(12px);
  border: 1px solid #1e293b;
  border-radius: 1.5rem;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.back-btn {
  padding: 8px;
  background: #1e293b;
  border: none;
  color: #e2e8f0;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.back-btn:hover {
  background: #334155;
}

.header-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fff;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  background: #0f172a;
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid #1e293b;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.user-btn {
  width: 36px;
  height: 36px;
  background: #1e293b;
  border-radius: 12px;
  border: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s;
}

.user-btn:hover {
  background: #334155;
}

.content-row {
  flex: 1;
  display: flex;
  gap: 16px;
  overflow: hidden;
}

/* WHITE PANEL */
.white-panel {
  flex: 1.8;
  background: #fff;
  border-radius: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  animation: fadeIn 0.3s ease-out;
}

.panel-header {
  background: #f8fafc;
  padding: 24px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.agent-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.agent-avatar {
  width: 56px;
  height: 56px;
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-style: italic;
  font-size: 1.5rem;
}

.agent-avatar.blue {
  background: #2563eb;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.agent-avatar.green {
  background: #10b981;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.agent-name {
  color: #0f172a;
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.2;
}

.agent-role {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  margin-top: 2px;
}

.panel-header-actions {
  display: flex;
  gap: 8px;
}

.btn-share {
  padding: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-share:hover {
  background: #f8fafc;
}

.btn-download {
  padding: 10px 16px;
  background: #059669;
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.btn-download:hover {
  background: #047857;
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  position: relative;
}

/* SETUP CARDS */
.setup-container {
  max-width: 448px;
  margin: 0 auto;
  padding: 40px 32px 32px;
}

.setup-title {
  text-align: center;
  margin-bottom: 8px;
}

.setup-title h4 {
  font-size: 1.25rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.025em;
}

.setup-title.blue h4 {
  color: #1e3a5f;
}

.setup-title.green h4 {
  color: #047857;
}

.setup-desc {
  text-align: center;
  font-size: 14px;
  color: #64748b;
  font-style: italic;
  margin-bottom: 24px;
}

.pricing-box {
  padding: 24px;
  border-radius: 1.5rem;
  margin-bottom: 24px;
}

.pricing-box.blue {
  background: rgba(239, 246, 255, 0.5);
  border: 1px solid #bfdbfe;
}

.pricing-box.green {
  background: rgba(236, 253, 245, 0.5);
  border: 1px solid #a7f3d0;
}

.pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.pricing-row.bordered {
  border-bottom: 1px solid #bfdbfe;
}

.pricing-row.bordered-green {
  border-bottom: 1px solid #a7f3d0;
}

.pricing-label {
  font-size: 14px;
  font-weight: 500;
  color: #475569;
}

.pricing-value {
  font-weight: 700;
}

.pricing-value.blue {
  color: #2563eb;
}

.pricing-value.green {
  color: #059669;
}

.pricing-note {
  font-size: 12px;
  color: rgba(5, 150, 105, 0.8);
  font-weight: 500;
  line-height: 1.6;
}

.btn-sign {
  width: 100%;
  padding: 16px;
  color: #fff;
  border: none;
  border-radius: 1rem;
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-sign.blue {
  background: #2563eb;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.btn-sign.blue:hover {
  background: #1d4ed8;
}

.btn-sign.green {
  background: #059669;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.btn-sign.green:hover {
  background: #047857;
}

.btn-sign:active {
  transform: scale(0.98);
}

.btn-sign:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* CHAT BUBBLES */
.chat-area {
  padding: 32px;
}

.chat-bubble {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.chat-avatar.blue {
  background: #2563eb;
}

.chat-avatar.green {
  background: #10b981;
}

.chat-msg {
  background: #f8fafc;
  padding: 16px;
  border-radius: 1rem;
  border-top-left-radius: 0;
  color: #334155;
  font-size: 14px;
  max-width: 80%;
  border: 1px solid #e2e8f0;
  line-height: 1.6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-simulate {
  margin-left: 56px;
  padding: 14px 32px;
  background: #0f172a;
  color: #fff;
  border: none;
  border-radius: 1rem;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.btn-simulate:hover {
  background: #000;
}

.btn-simulate:active {
  transform: scale(0.95);
}

.btn-simulate:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* REPORT BOX */
.report-box {
  margin-left: 56px;
  padding: 20px;
  border-radius: 1rem;
  font-size: 14px;
  color: #334155;
  line-height: 1.6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.report-box.blue {
  background: rgba(239, 246, 255, 0.5);
  border: 1px solid #bfdbfe;
}

.report-box.green {
  background: rgba(236, 253, 245, 0.5);
  border: 1px solid #a7f3d0;
}

.report-label {
  font-weight: 700;
  display: block;
  margin-bottom: 8px;
}

.report-label.blue-dark {
  color: #0f172a;
}

.report-label.green-dark {
  color: #064e3b;
  text-transform: uppercase;
  letter-spacing: -0.025em;
}

.highlight-blue {
  font-weight: 700;
  color: #2563eb;
  font-size: 1.125rem;
  margin: 0 4px;
}

.highlight-dark {
  font-weight: 700;
  color: #0f172a;
}

.highlight-red {
  font-weight: 700;
  color: #ef4444;
}

.highlight-green {
  font-weight: 700;
  color: #059669;
}

.action-buttons {
  display: flex;
  gap: 12px;
  margin-left: 56px;
}

.btn-action {
  padding: 12px 24px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-action.primary-blue {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-action.primary-blue:hover {
  background: #1d4ed8;
}

.btn-action.primary-green {
  background: #059669;
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-action.primary-green:hover {
  background: #047857;
}

.btn-action.secondary {
  background: #fff;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.btn-action.secondary:hover {
  background: #f8fafc;
}

/* INVOICE TABLE */
.table-container {
  padding: 32px;
}

table {
  width: 100%;
  text-align: left;
  font-size: 14px;
  color: #334155;
  border-collapse: collapse;
}

table thead td,
table thead th {
  padding: 16px;
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
}

table tbody td {
  padding: 16px;
  border-bottom: 1px solid #f8fafc;
}

table tbody tr {
  transition: background 0.2s;
}

table tbody tr:hover {
  background: rgba(248, 250, 252, 0.5);
}

.td-mono {
  font-family: monospace;
  font-weight: 700;
  color: #2563eb;
}

.td-right {
  text-align: right;
}

.td-center {
  text-align: center;
}

.td-bold {
  font-weight: 700;
}

.td-medium {
  font-weight: 500;
}

.td-small {
  font-size: 12px;
  color: #64748b;
}

.td-status {
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 500;
  font-size: 12px;
}

/* REPORT VIEW */
.report-view {
  padding: 32px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  padding: 20px;
  border-radius: 1.5rem;
}

.stat-card.blue {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.stat-card.green-stat {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.stat-card.gray {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
}

.stat-label {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.stat-label.blue {
  color: #3b82f6;
}

.stat-label.green {
  color: #10b981;
}

.stat-label.gray {
  color: #94a3b8;
}

.stat-value {
  font-size: 1.875rem;
  font-weight: 900;
}

.stat-value.blue {
  color: #1e3a5f;
}

.stat-value.green {
  color: #064e3b;
}

.stat-value.gray {
  color: #1e293b;
}

.chart-container {
  background: #f8fafc;
  padding: 32px;
  border-radius: 2.5rem;
  border: 1px solid #f1f5f9;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 16px;
}

.chart-title {
  font-size: 1.125rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.025em;
}

.chart-subtitle {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  font-style: italic;
  margin-top: 4px;
}

.chart-legend {
  display: flex;
  gap: 16px;
  background: rgba(255, 255, 255, 0.6);
  padding: 10px 20px;
  border-radius: 9999px;
  border: 1px solid rgba(226, 232, 240, 0.5);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.legend-dot.blue {
  background: #3b82f6;
}

.legend-dot.green {
  background: #34d399;
}

.legend-text {
  font-size: 10px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
}

.chart-bars {
  height: 256px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4px;
  padding: 0 8px;
  position: relative;
}

.chart-gridlines {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
  z-index: 0;
}

.gridline {
  border-top: 1px solid rgba(226, 232, 240, 0.6);
  width: 100%;
  height: 0;
}

.gridline-bold {
  border-top: 2px solid #cbd5e1;
  width: 100%;
  height: 0;
}

.bar-group {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.bar-pair {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  padding-bottom: 8px;
}

.bar {
  width: 20px;
  border-radius: 6px 6px 0 0;
  transition: all 0.7s;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: relative;
  transform-origin: bottom;
}

.bar:hover {
  transform: scaleX(1.1);
}

.bar:active {
  transform: scale(0.95);
}

.bar.blue {
  background: #3b82f6;
}

.bar.blue:hover {
  background: #2563eb;
}

.bar.green {
  background: #34d399;
}

.bar.green:hover {
  background: #10b981;
}

.bar-tooltip {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #fff;
  font-size: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
  z-index: 20;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.bar:hover .bar-tooltip {
  opacity: 1;
}

.bar-label {
  height: 32px;
  display: flex;
  align-items: center;
}

.bar-label span {
  font-size: 12px;
  font-weight: 900;
  color: #94a3b8;
  text-transform: uppercase;
  transition: color 0.2s;
}

.bar-group:hover .bar-label span {
  color: #0f172a;
}

/* CONFIG VIEW */
.config-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
}

.config-header {
  padding: 24px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 10;
}

.config-back {
  padding: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  color: #475569;
}

.config-back:hover {
  background: #e2e8f0;
}

.config-title {
  font-size: 14px;
  font-weight: 900;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.config-subtitle {
  font-size: 10px;
  color: #64748b;
}

.config-body {
  padding: 32px;
  max-width: 672px;
  margin: 0 auto;
  width: 100%;
}

.info-box {
  background: rgba(239, 246, 255, 0.5);
  border: 1px solid #bfdbfe;
  padding: 20px;
  border-radius: 1.5rem;
  display: flex;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 40px;
}

.info-box .info-icon {
  color: #3b82f6;
  flex-shrink: 0;
}

.info-box .info-text {
  font-size: 12px;
  color: #1d4ed8;
  line-height: 1.6;
  font-weight: 500;
}

.config-section {
  margin-bottom: 32px;
}

.config-section-title {
  font-size: 11px;
  font-weight: 900;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.radio-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
  cursor: pointer;
  margin-bottom: 12px;
  background: #fff;
}

.radio-option:hover {
  border-color: #cbd5e1;
}

.radio-option.selected {
  border-color: #10b981;
  background: rgba(236, 253, 245, 0.3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.radio-option .radio-label {
  font-size: 14px;
  font-weight: 700;
  color: #334155;
}

.radio-option.selected .radio-label {
  color: #047857;
}

.radio-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.radio-option.selected .radio-circle {
  border-color: #10b981;
}

.radio-dot {
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 50%;
  display: none;
}

.radio-option.selected .radio-dot {
  display: block;
}

.btn-activate {
  width: 100%;
  padding: 16px;
  background: #0f172a;
  color: #fff;
  border: none;
  border-radius: 1rem;
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  margin-top: 40px;
}

.btn-activate:active {
  transform: scale(0.98);
}

.btn-activate:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* BOOKKEEPING VIEW */
.book-view {
  padding: 32px;
}

.book-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  padding: 16px;
  border-radius: 1.5rem;
  border: 1px solid #f1f5f9;
  margin-bottom: 24px;
}

.book-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.book-date {
  font-size: 14px;
  font-weight: 700;
  color: #334155;
  background: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.book-search {
  position: relative;
}

.book-search input {
  padding: 8px 12px 8px 36px;
  font-size: 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  outline: none;
  font-family: 'Inter', sans-serif;
}

.book-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.book-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.book-stat {
  background: #fff;
  padding: 24px;
  border-radius: 2rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.book-stat-label {
  font-size: 10px;
  font-weight: 900;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.book-stat-value {
  font-size: 1.875rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.book-stat-value.green {
  color: #059669;
}

.book-stat-value.dark {
  color: #0f172a;
}

.book-table-wrapper {
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-top: 16px;
}

.book-table-header {
  padding: 16px;
  background: #0f172a;
  color: #fff;
  text-align: center;
}

.book-table-header h4 {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.book-table-header p {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 500;
  font-style: italic;
  margin-top: 4px;
}

.book-table {
  width: 100%;
  font-size: 12px;
  color: #334155;
  border-collapse: collapse;
}

.book-table thead td {
  padding: 12px;
  background: #f8fafc;
  font-weight: 700;
  border-bottom: 1px solid #e2e8f0;
  text-transform: uppercase;
  font-size: 10px;
  color: #64748b;
}

.book-table thead td:not(:last-child) {
  border-right: 1px solid #e2e8f0;
}

.book-table tbody td {
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.book-table tbody td:not(:last-child) {
  border-right: 1px solid #e2e8f0;
}

.book-table tbody tr:hover {
  background: #f8fafc;
}

.book-table tfoot td {
  padding: 12px;
  background: #f8fafc;
  font-weight: 700;
  color: #0f172a;
}

.book-table tfoot td:not(:last-child) {
  border-right: 1px solid #e2e8f0;
}

/* RIGHT PANEL */
.right-panel {
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}

.log-panel {
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(12px);
  border-radius: 1.5rem;
  padding: 24px;
  border: 1px solid #1e293b;
  flex: 1;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.log-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.log-label {
  font-size: 10px;
  color: #64748b;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.log-entries {
  flex: 1;
  font-family: monospace;
  font-size: 10px;
  overflow-y: auto;
  padding-right: 8px;
}

.log-entry {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.2);
  padding-bottom: 12px;
  margin-bottom: 12px;
  line-height: 1.6;
  animation: fadeIn 0.3s ease-out;
}

.log-time {
  color: #475569;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.log-text-system {
  color: #94a3b8;
}

.log-text-ai-blue {
  color: #60a5fa;
  font-weight: 600;
}

.log-text-ai-green {
  color: #34d399;
  font-weight: 600;
}

.log-text-success {
  color: #4ade80;
  font-weight: 700;
}

.info-panel {
  border-radius: 1.5rem;
  padding: 20px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.info-panel.blue {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), transparent);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.info-panel.green {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), transparent);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.info-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.info-panel-title {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.info-panel-title.blue {
  color: #bfdbfe;
}

.info-panel-title.green {
  color: #a7f3d0;
}

.info-panel-desc {
  font-size: 11px;
  font-style: italic;
  line-height: 1.6;
}

.info-panel-desc.blue {
  color: rgba(147, 197, 253, 0.7);
}

.info-panel-desc.green {
  color: rgba(110, 231, 183, 0.7);
}

/* MODALS */
.modal-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.3s ease-out;
}

.modal-overlay.blur {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.modal-overlay.dark {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
}

.export-modal {
  background: #fff;
  border-radius: 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  width: 100%;
  max-width: 320px;
  overflow: hidden;
  animation: zoomIn 0.2s ease-out;
}

.export-header {
  padding: 24px;
  border-bottom: 1px solid #f8fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.export-title {
  font-weight: 900;
  color: #1e293b;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.export-close {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
}

.export-close:hover {
  color: #475569;
}

.export-body {
  padding: 16px;
}

.export-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: none;
  border: none;
  border-radius: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.export-option:hover {
  background: #f8fafc;
}

.export-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.export-option:hover .export-icon {
  transform: scale(1.1);
}

.export-icon.red {
  background: #fef2f2;
  color: #ef4444;
}

.export-icon.green {
  background: #ecfdf5;
  color: #10b981;
}

.export-opt-title {
  font-size: 14px;
  font-weight: 900;
  color: #1e293b;
  letter-spacing: -0.025em;
}

.export-opt-desc {
  font-size: 9px;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
}

/* PDF PREVIEW */
.pdf-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 32px;
  animation: fadeIn 0.3s ease-out;
}

.pdf-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  max-width: 896px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.pdf-title {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 14px;
}

.pdf-actions {
  display: flex;
  gap: 16px;
}

.pdf-btn {
  padding: 8px 16px;
  background: #1e293b;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.pdf-btn:hover {
  background: #334155;
}

.pdf-close {
  width: 36px;
  height: 36px;
  background: #1e293b;
  border: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
}

.pdf-close:hover {
  background: #334155;
}

.pdf-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  padding-bottom: 40px;
}

.pdf-paper {
  background: #fff;
  width: 100%;
  max-width: 896px;
  min-height: 1000px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  padding: 64px;
  font-family: 'Times New Roman', serif;
  color: #000;
  position: relative;
}

.pdf-info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
  font-size: 14px;
}

.pdf-info-left {
  font-weight: 700;
  line-height: 1.6;
}

.pdf-info-left span {
  font-weight: 400;
}

.pdf-info-right {
  text-align: center;
}

.pdf-info-right .mau {
  font-weight: 700;
  font-size: 16px;
}

.pdf-info-right .tt {
  font-size: 12px;
  font-style: italic;
  margin-top: 4px;
  max-width: 250px;
  line-height: 1.3;
}

.pdf-center {
  text-align: center;
  margin-bottom: 24px;
}

.pdf-center h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pdf-center p {
  font-size: 14px;
  font-weight: 700;
}

.pdf-unit {
  text-align: right;
  font-size: 12px;
  font-style: italic;
  margin-bottom: 8px;
}

.pdf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 48px;
}

.pdf-table th,
.pdf-table td {
  border: 1px solid #000;
  padding: 8px;
}

.pdf-table th {
  font-weight: 700;
  text-align: center;
}

.pdf-table tfoot td {
  font-weight: 700;
  text-transform: uppercase;
}

.pdf-signature {
  display: flex;
  justify-content: flex-end;
  padding-right: 40px;
  text-align: center;
  font-size: 14px;
}

.pdf-signature .date-line {
  font-style: italic;
  margin-bottom: 4px;
}

.pdf-signature .title-line {
  font-weight: 700;
}

.pdf-signature .note-line {
  font-style: italic;
  margin-bottom: 96px;
}

.pdf-signature .name-line {
  font-weight: 700;
  font-size: 1.125rem;
  color: #1e40af;
  opacity: 0.8;
  font-family: 'Dancing Script', cursive;
}

/* SCROLLBAR */
.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 10px;
}

/* PERFORMANCE */
.white-panel,
.log-panel,
.sidebar {
  will-change: contents;
  contain: layout style;
}

.panel-body {
  will-change: scroll-position;
}

.bar {
  will-change: transform;
}

.modal-overlay,
.pdf-overlay {
  will-change: opacity;
}

/* ANIMATIONS */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade {
  animation: fadeIn 0.3s ease-out;
}

.animate-slide-up {
  animation: slideUp 0.5s ease-out;
}

.animate-zoom {
  animation: zoomIn 0.2s ease-out;
}

.hidden {
  display: none !important;
}

/* SVG Icons inline */
.icon-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}