/* Low-Fidelity Functional Wireframe Styles */
/* ERP Enterprise Styling: Clean, High Information Density, Restrained Palette */

:root {
  --wf-bg: #f8fafc;
  --wf-panel-bg: #ffffff;
  --wf-border: #cbd5e1;
  --wf-border-dark: #94a3b8;
  --wf-text-main: #0f172a;
  --wf-text-muted: #64748b;
  --wf-accent: #1e293b;
  --wf-accent-hover: #334155;
  --wf-highlight: #e2e8f0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--wf-bg);
  color: var(--wf-text-main);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* Custom scrollbars for dense ERP tables and sidebars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ============================================================
   ROUNDER BORDERS DESIGN SYSTEM (No Boxy Corners)
   ============================================================ */

/* Global rounder corners overrides */
.rounded, .rounded-sm, .rounded-md {
  border-radius: 12px !important;
}

.rounded-lg {
  border-radius: 16px !important;
}

.rounded-xl {
  border-radius: 20px !important;
}

.rounded-2xl {
  border-radius: 24px !important;
}

.rounded-full {
  border-radius: 9999px !important;
}

/* Cards, panels, alerts, and table containers with rounder borders */
.bg-white.border.border-slate-200,
.bg-white.border.border-slate-300,
.p-2\.5.bg-white.border,
.p-3.bg-white.border,
.p-4.bg-white.border,
.p-5.bg-white.border,
.p-6.bg-white.border {
  border-radius: 14px;
}

/* Table containers */
.overflow-x-auto.border,
div:has(> table.wf-table) {
  border-radius: 14px;
  overflow: hidden;
}

/* Modal dialogue container roundness */
#modal-backdrop > div {
  border-radius: 20px !important;
}

#modal-backdrop > div > div:first-child {
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

#modal-backdrop > div > div:last-child {
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}


/* Wireframe badge */
.wireframe-badge {
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
  background-color: #fef08a;
  color: #854d0e;
  border: 1px dashed #ca8a04;
  padding: 3px 10px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Screen ID Tag */
.screen-id-tag {
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  background-color: #e2e8f0;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 2px 8px;
  border-radius: 8px;
}

/* Restrained Status Badges (Pill style for softer, rounder feel) */
.wf-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
  background-color: #f1f5f9;
  color: #334155;
  white-space: nowrap;
}

.wf-badge-success {
  background-color: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

.wf-badge-warning {
  background-color: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.wf-badge-danger {
  background-color: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.wf-badge-info {
  background-color: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}

.wf-badge-neutral {
  background-color: #f8fafc;
  color: #475569;
  border-color: #cbd5e1;
}

.wf-badge-blocked {
  background-color: #450a0a;
  color: #fecaca;
  border-color: #7f1d1d;
}

/* Enterprise Form Inputs (Rounded corners) */
.wf-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  padding: 10px 14px;
  font-size: 13px;
  border-radius: 10px;
  color: #0f172a;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wf-input:focus {
  outline: none;
  border-color: #475569;
  box-shadow: 0 0 0 2px rgba(71, 85, 105, 0.2);
}

.wf-input:disabled {
  background-color: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

/* Soft Rounded Buttons */
.wf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wf-btn:hover:not(:disabled) {
  background-color: #f8fafc;
  border-color: #94a3b8;
  transform: translateY(-0.5px);
}

.wf-btn:active:not(:disabled) {
  background-color: #e2e8f0;
  transform: translateY(0);
}

.wf-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.wf-btn-primary {
  background-color: #1e293b;
  color: #ffffff;
  border-color: #0f172a;
}

.wf-btn-primary:hover:not(:disabled) {
  background-color: #334155;
  border-color: #1e293b;
}

.wf-btn-danger {
  background-color: #dc2626;
  color: #ffffff;
  border-color: #b91c1c;
}

.wf-btn-danger:hover:not(:disabled) {
  background-color: #b91c1c;
}

.wf-btn-sm {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 8px;
}

/* Stepper styles */
.stepper-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.stepper-item::before {
  content: '';
  position: absolute;
  top: 14px;
  left: -50%;
  width: 100%;
  height: 2px;
  background-color: #cbd5e1;
  z-index: 1;
}

.stepper-item:first-child::before {
  display: none;
}

.stepper-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  z-index: 2;
  color: #64748b;
}

.stepper-item.completed .stepper-circle {
  background-color: #1e293b;
  border-color: #1e293b;
  color: #ffffff;
}

.stepper-item.completed::before {
  background-color: #1e293b;
}

.stepper-item.current .stepper-circle {
  border-color: #2563eb;
  color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.stepper-item.blocked .stepper-circle {
  border-color: #dc2626;
  color: #dc2626;
  background-color: #fef2f2;
}

/* Table layout */
.wf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.wf-table th {
  background-color: #f1f5f9;
  border-bottom: 1px solid #cbd5e1;
  border-top: 1px solid #cbd5e1;
  padding: 10px 16px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.03em;
}

.wf-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
  vertical-align: middle;
}

.wf-table tr:hover td {
  background-color: #f8fafc;
}

/* Toast container */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.wf-toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  padding: 12px 16px;
  background-color: #1e293b;
  color: #ffffff;
  font-size: 12px;
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-left: 4px solid #3b82f6;
  animation: slideInRight 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.wf-toast.toast-success {
  border-left-color: #22c55e;
}

.wf-toast.toast-error {
  border-left-color: #ef4444;
}

.wf-toast.toast-warning {
  border-left-color: #f59e0b;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Kanban column (Rounder borders) */
.kanban-col {
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  min-width: 260px;
  max-width: 320px;
  flex: 1;
}

.kanban-card {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.kanban-card:hover {
  border-color: #64748b;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

/* Screen visibility */
.screen-container {
  display: none;
}
.screen-container.active {
  display: block;
}
