/* 3D Filament Management ERP - Complete Design System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
  --wp-f-primary: #2271b1;
  --wp-f-accent: #f59e0b;
  --wp-f-emerald: #10b981;
  --wp-f-amber: #f59e0b;
  --wp-f-rose: #ef4444;
  --wp-f-indigo: #4f46e5;
  --wp-f-bg: #f8fafc;
  --wp-f-card-bg: #ffffff;
  --wp-f-border: #e2e8f0;
  --wp-f-text-main: #0f172a;
  --wp-f-text-muted: #64748b;
  --wp-f-sidebar-bg: #ffffff;
  --wp-f-header-bg: #ffffff;
}

.wp-filament-erp-app.dark-mode {
  --wp-f-bg: #090d16;
  --wp-f-card-bg: #111827;
  --wp-f-border: #1f2937;
  --wp-f-text-main: #f8fafc;
  --wp-f-text-muted: #94a3b8;
  --wp-f-sidebar-bg: #0d121f;
  --wp-f-header-bg: #0d121f;
}

.wp-filament-erp-app {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--wp-f-bg);
  color: var(--wp-f-text-main);
  min-height: 100vh;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  width: 100%;
  transition: background-color 0.2s ease, color 0.2s ease;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wp-filament-erp-app * {
  box-sizing: border-box;
}

/* Layout container */
.wp-f-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Top Header */
.wp-f-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--wp-f-header-bg);
  border-bottom: 1px solid var(--wp-f-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.wp-f-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: -0.5px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Sidebar */
.wp-f-sidebar {
  width: 280px;
  min-width: 280px;
  background: var(--wp-f-sidebar-bg);
  border-right: 1px solid var(--wp-f-border);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  flex-shrink: 0;
}

.wp-f-sidebar-section-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wp-f-text-muted);
  margin: 18px 8px 8px 8px;
}

.wp-f-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--wp-f-text-muted);
  font-weight: 600;
  font-size: 13px;
  transition: all 0.15s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  margin-bottom: 2px;
}

.wp-f-nav-item:hover {
  background: rgba(99, 102, 241, 0.06);
  color: var(--wp-f-text-main);
}

.wp-f-nav-item.active {
  background: #0f172a;
  color: #ffffff;
}

.wp-filament-erp-app.dark-mode .wp-f-nav-item.active {
  background: #1e293b;
  color: #ffffff;
}

.wp-f-nav-item.active .wp-f-nav-subtext {
  color: #94a3b8;
}

.wp-f-nav-subtext {
  font-size: 11px;
  font-weight: 500;
  color: var(--wp-f-text-muted);
}

.wp-f-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 20px;
}

.wp-f-badge-gray {
  background: rgba(148, 163, 184, 0.15);
  color: var(--wp-f-text-muted);
}

.wp-f-badge-amber {
  background: #fef3c7;
  color: #d97706;
}

.wp-f-badge-orange {
  background: #ffedd5;
  color: #ea580c;
}

/* Main Area */
.wp-f-main {
  flex: 1;
  padding: 24px 32px;
  overflow-y: auto;
  max-width: 100%;
}

/* Hero Banner Card */
.wp-f-hero {
  background: linear-gradient(135deg, #090d16 0%, #111827 50%, #1e1b4b 100%);
  border-radius: 18px;
  padding: 30px 36px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 35px -10px rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 24px;
}

.wp-f-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.wp-f-hero-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.wp-f-hero-desc {
  font-size: 13.5px;
  color: #94a3b8;
  max-width: 650px;
  margin: 0 0 20px 0;
  line-height: 1.6;
}

.wp-f-btn-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.wp-f-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.wp-f-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.wp-f-btn-purple {
  background: #7c3aed;
  color: #ffffff;
}

.wp-f-btn-emerald {
  background: #059669;
  color: #ffffff;
}

.wp-f-btn-indigo {
  background: #4f46e5;
  color: #ffffff;
}

.wp-f-btn-outline {
  background: var(--wp-f-card-bg);
  color: var(--wp-f-text-main);
  border: 1px solid var(--wp-f-border);
}

.wp-f-btn-outline:hover {
  background: rgba(99, 102, 241, 0.05);
}

/* Metric Cards Grid */
.wp-f-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

@media (max-width: 1200px) {
  .wp-f-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .wp-f-layout {
    flex-direction: column;
  }
  .wp-f-sidebar {
    width: 100%;
    min-width: 100%;
  }
  .wp-f-metrics-grid {
    grid-template-columns: 1fr;
  }
  .wp-f-main {
    padding: 16px;
  }
}

.wp-f-card {
  background: var(--wp-f-card-bg);
  border: 1px solid var(--wp-f-border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -2px rgba(0, 0, 0, 0.02);
}

.wp-f-card-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wp-f-text-muted);
  margin-bottom: 6px;
}

.wp-f-card-val {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--wp-f-text-main);
}

.wp-f-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* Warning Banner */
.wp-f-warning-banner {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 24px;
}

.wp-filament-erp-app.dark-mode .wp-f-warning-banner {
  background: #1e1b13;
  border-color: #78350f;
}

/* Activity Grid */
.wp-f-activity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 992px) {
  .wp-f-activity-grid {
    grid-template-columns: 1fr;
  }
}

/* Table Styles */
.wp-f-table-wrapper {
  background: var(--wp-f-card-bg);
  border: 1px solid var(--wp-f-border);
  border-radius: 14px;
  overflow-x: auto;
}

.wp-f-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.wp-f-table th {
  background: rgba(241, 245, 249, 0.6);
  color: var(--wp-f-text-muted);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--wp-f-border);
  text-align: left;
}

.wp-filament-erp-app.dark-mode .wp-f-table th {
  background: #1a2234;
}

.wp-f-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--wp-f-border);
  color: var(--wp-f-text-main);
  vertical-align: middle;
}

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

.wp-f-table tr:hover td {
  background: rgba(99, 102, 241, 0.02);
}

/* Modals */
.wp-f-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 16px;
}

.wp-f-modal {
  background: var(--wp-f-card-bg);
  border-radius: 16px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--wp-f-border);
  padding: 24px;
}

.wp-f-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--wp-f-border);
  background: var(--wp-f-card-bg);
  color: var(--wp-f-text-main);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}

.wp-f-input:focus {
  border-color: #6366f1;
}

/* Custom WordPress Theme Overrides */
.wp-filament-erp-app { border-radius: 12px; }

@media print {
  body * {
    visibility: hidden;
  }
  #wp-filament-invoice-print-area, #wp-filament-invoice-print-area * {
    visibility: visible;
  }
  #wp-filament-invoice-print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: #ffffff;
    color: #0f172a;
  }
}
