/* ══════════════════════════════════════════════════════════════
   tools.laconcept.de – Shared Styles (Neumorphism Design System)
   Quelle: STYLEGUIDE.md
   ══════════════════════════════════════════════════════════════ */

:root {
  --bg:             #f4f5f7;
  --shadow-dark:    #c9cacd;
  --shadow-light:   #ffffff;
  --accent:         #f5b800;
  --accent-light:   #fef5c0;
  --text-primary:   #1e1e1e;
  --text-secondary: #828282;
}

/* ── Neumorphism-Klassen ───────────────────────────────────── */

.neu-raised {
  background: var(--bg);
  box-shadow: 6px 6px 14px var(--shadow-dark), -6px -6px 14px var(--shadow-light);
}

.neu-raised-sm {
  background: var(--bg);
  box-shadow: 3px 3px 8px var(--shadow-dark), -3px -3px 8px var(--shadow-light);
}

.neu-inset {
  background: var(--bg);
  box-shadow: inset 4px 4px 10px var(--shadow-dark), inset -4px -4px 10px var(--shadow-light);
}

.neu-input {
  background: var(--bg);
  box-shadow: inset 4px 4px 10px var(--shadow-dark), inset -4px -4px 10px var(--shadow-light);
  border: none;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
}
.neu-input:focus {
  outline: 2px solid var(--accent);
}

select.neu-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23828282' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px !important;
}

.neu-btn {
  background: var(--bg);
  box-shadow: 4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light);
  border: none;
  border-radius: 12px;
  color: var(--text-primary);
  cursor: pointer;
}
.neu-btn:active {
  box-shadow: inset 2px 2px 6px var(--shadow-dark), inset -2px -2px 6px var(--shadow-light);
}

.neu-btn-accent {
  background: var(--accent);
  box-shadow: 4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light);
  border: none;
  border-radius: 12px;
  color: #1e1e1e;
  font-weight: 600;
  cursor: pointer;
}
.neu-btn-accent:active {
  box-shadow: inset 2px 2px 6px rgba(0,0,0,.15);
}

.neu-popup {
  background: var(--bg);
  box-shadow: 8px 8px 20px var(--shadow-dark), -8px -8px 20px var(--shadow-light);
  border-radius: 14px;
}

/* ── Utility ───────────────────────────────────────────────── */

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

.spinner { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Entity-Farben ─────────────────────────────────────────── */

:root {
  --color-fehlbestand:   #ea580c;
  --color-auftrag:       #3b82f6;
  --color-bestellung:    #d97706;
  --color-produktion:    #7c3aed;
  --color-projekt:       #0891b2;
  --color-angebot:       #16a34a;
  --color-ticket:        #e11d48;
  --color-artikel:       #6b7280;
  --color-mietsystem:    #0d9488;
}

/* ── Top Navigation Header ─────────────────────────────────── */

header {
  height: 52px;
  background: var(--bg);
  flex-shrink: 0;
  box-shadow: 0 4px 16px var(--shadow-dark), 0 -2px 6px var(--shadow-light);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 20;
}

/* ── Status-Farben ─────────────────────────────────────────── */

.status-success { background: #dcfce7; color: #16a34a; }
.status-error   { background: #fee2e2; color: #dc2626; }

/* ── Alpine.js Cloak ────────────────────────────────────────── */
[x-cloak] { display: none !important; }

/* ── Badges ─────────────────────────────────────────────────── */

.neu-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 20px;
  letter-spacing: .03em;
  white-space: nowrap;
  line-height: 1.6;
}
.neu-badge-default { background: #e5e7eb; color: #374151; }
.neu-badge-success { background: #dcfce7; color: #16a34a; }
.neu-badge-error   { background: #fee2e2; color: #dc2626; }
.neu-badge-warning { background: #fef3c7; color: #d97706; }
.neu-badge-info    { background: #dbeafe; color: #2563eb; }
.neu-badge-purple  { background: #ede9fe; color: #7c3aed; }
.neu-badge-teal    { background: #ccfbf1; color: #0d9488; }
.neu-badge-orange  { background: #ffedd5; color: #ea580c; }

/* ── Tags ───────────────────────────────────────────────────── */

.neu-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--bg);
  box-shadow: 2px 2px 6px var(--shadow-dark), -2px -2px 6px var(--shadow-light);
  color: var(--text-primary);
  cursor: default;
}

/* ── Alerts ─────────────────────────────────────────────────── */

.neu-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.neu-alert-success { background: #dcfce7; color: #15803d; border-left: 3px solid #16a34a; }
.neu-alert-error   { background: #fee2e2; color: #b91c1c; border-left: 3px solid #dc2626; }
.neu-alert-warning { background: #fef3c7; color: #b45309; border-left: 3px solid #d97706; }
.neu-alert-info    { background: #dbeafe; color: #1d4ed8; border-left: 3px solid #2563eb; }

/* ── Progress ───────────────────────────────────────────────── */

.neu-progress {
  border-radius: 99px;
  height: 10px;
  overflow: hidden;
  box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -1px -1px 3px var(--shadow-light);
  background: var(--bg);
}
.neu-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
  transition: width .4s ease;
}
.neu-progress-fill-success { background: #16a34a; }
.neu-progress-fill-error   { background: #dc2626; }
.neu-progress-fill-info    { background: #2563eb; }
.neu-progress-fill-purple  { background: #7c3aed; }

/* ── Tooltip ────────────────────────────────────────────────── */

[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e1e1e;
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 9999;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ── Divider ────────────────────────────────────────────────── */

.neu-divider {
  border: none;
  border-top: 1px solid var(--shadow-dark);
  margin: 0;
}
.neu-divider-labeled {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
}
.neu-divider-labeled::before,
.neu-divider-labeled::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--shadow-dark);
}

/* ── Skeleton ───────────────────────────────────────────────── */

.neu-skeleton {
  background: linear-gradient(90deg,
    var(--shadow-dark) 25%,
    #e9eaec 50%,
    var(--shadow-dark) 75%
  );
  background-size: 200% 100%;
  animation: neu-shimmer 1.5s infinite;
  border-radius: 6px;
}
@keyframes neu-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ── Empty State ────────────────────────────────────────────── */

.neu-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  gap: 6px;
}
.neu-empty-icon  { font-size: 36px; opacity: .35; margin-bottom: 6px; }
.neu-empty-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.neu-empty-sub   { font-size: 13px; color: var(--text-secondary); }

/* ── Modal Overlay ──────────────────────────────────────────── */

.neu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.neu-modal {
  background: var(--bg);
  border-radius: 16px;
  box-shadow: 10px 10px 30px var(--shadow-dark), -10px -10px 30px var(--shadow-light);
  min-width: 320px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
}
.neu-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--shadow-dark);
}
.neu-modal-title  { font-weight: 700; font-size: 15px; color: var(--text-primary); }
.neu-modal-body   { padding: 20px; }
.neu-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--shadow-dark);
}

/* ── Toast ──────────────────────────────────────────────────── */

.neu-toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2000;
  pointer-events: none;
}
.neu-toast {
  background: var(--bg);
  border-radius: 12px;
  box-shadow: 6px 6px 16px var(--shadow-dark), -3px -3px 10px var(--shadow-light);
  padding: 12px 14px;
  font-size: 13px;
  min-width: 240px;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: all;
  animation: neu-slide-in .2s ease;
}
@keyframes neu-slide-in {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.neu-toast-success { border-left: 3px solid #16a34a; }
.neu-toast-error   { border-left: 3px solid #dc2626; }
.neu-toast-info    { border-left: 3px solid #2563eb; }
.neu-toast-warning { border-left: 3px solid #d97706; }
