/* ERP — cream + navy glass (no teal/cyan) */
:root {
  --color-bg: #F9E8A2;
  --color-cream-deep: #E8D48A;
  --color-cream-lift: #FFF8E0;
  --color-soft: #FFF4D4;
  --color-mid: #243B5C;
  --color-accent: #1A2F4D;
  --color-navy: #121C2E;
  --color-gold: #C9A227;
  --color-gold-soft: #E8C547;
  --color-text: #121C2E;
  --color-muted: #5A6578;
  --color-white: #FFFEFA;
  --color-danger: #C94B4B;
  --color-ok: #2F6B4F;

  --glass: rgba(255, 251, 240, 0.52);
  --glass-strong: rgba(255, 254, 248, 0.76);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-edge: rgba(26, 47, 77, 0.28);

  --neon-glow: 0 0 22px rgba(201, 162, 39, 0.28), 0 0 48px rgba(26, 47, 77, 0.1);
  --neon-glow-strong: 0 0 28px rgba(201, 162, 39, 0.4), 0 0 56px rgba(26, 47, 77, 0.14);
  --neon-text-glow: 0 0 12px rgba(201, 162, 39, 0.35);
  --ring: 0 0 0 3px rgba(26, 47, 77, 0.18);

  --radius: 24px;
  --radius-sm: 14px;
  --font: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
  --shadow: 0 28px 64px rgba(18, 28, 46, 0.14), 0 8px 20px rgba(18, 28, 46, 0.06);
}

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image:
    radial-gradient(ellipse 65% 45% at 0% 0%, rgba(26, 47, 77, 0.1), transparent 55%),
    radial-gradient(ellipse 55% 40% at 100% 0%, rgba(255, 255, 255, 0.55), transparent 50%),
    radial-gradient(ellipse 70% 50% at 80% 100%, rgba(201, 162, 39, 0.14), transparent 55%),
    linear-gradient(165deg, #F9E8A2 0%, #F3E2A0 48%, #EFE6C0 100%);
  background-attachment: fixed;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(48px);
}
body::before {
  width: min(46vw, 400px);
  height: min(46vw, 400px);
  top: -10%;
  right: -8%;
  background: radial-gradient(circle, rgba(26, 47, 77, 0.18), transparent 70%);
  animation: drift 16s ease-in-out infinite alternate;
}
body::after {
  width: min(40vw, 340px);
  height: min(40vw, 340px);
  bottom: -12%;
  left: -8%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.22), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); opacity: 0.6; }
  to { transform: translate(16px, -20px) scale(1.06); opacity: 0.9; }
}

a {
  color: var(--color-mid);
  text-decoration: none;
  transition: color .2s ease;
}
a:hover { color: var(--color-gold); }

.glass, .card {
  position: relative;
  z-index: 1;
  background: var(--glass);
  backdrop-filter: blur(26px) saturate(1.25);
  -webkit-backdrop-filter: blur(26px) saturate(1.25);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
  transition: transform .28s cubic-bezier(.22, 1, .36, 1), box-shadow .28s ease, border-color .28s ease;
}

.card:hover {
  border-color: rgba(26, 47, 77, 0.22);
  box-shadow: var(--shadow), var(--neon-glow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.glass-neon {
  border-color: rgba(26, 47, 77, 0.2);
  box-shadow: var(--shadow), var(--neon-glow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.brand-mark .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #E8C547, #C9A227 55%, #1A2F4D);
  box-shadow: 0 0 10px rgba(201, 162, 39, 0.7), 0 0 20px rgba(26, 47, 77, 0.25);
  animation: pulse-neon 2.4s ease-in-out infinite;
}
.brand-mark .brand-logo {
  height: 28px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
@keyframes pulse-neon {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.9; }
}
.brand-mark span {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 0.92rem;
  color: var(--color-accent);
}

h1, h2, h3 {
  color: var(--color-text);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.3;
}
.muted { color: var(--color-muted); }

label {
  display: block;
  margin: 0 0 7px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--color-muted);
}

input, textarea, select {
  width: 100%;
  margin-bottom: 16px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(18, 28, 46, 0.1);
  background: rgba(255, 254, 250, 0.7);
  backdrop-filter: blur(12px);
  color: var(--color-text);
  font-family: var(--font);
  font-size: 1rem;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  min-width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  margin-inline-start: 8px;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--color-accent, #1A2F4D);
  vertical-align: middle;
  background: transparent;
  border: none;
  box-shadow: none;
}
input:hover, textarea:hover, select:hover {
  border-color: rgba(26, 47, 77, 0.28);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--color-mid);
  box-shadow: var(--ring), 0 0 18px rgba(201, 162, 39, 0.15);
  background: rgba(255, 255, 255, 0.9);
}

button, .btn {
  font-family: var(--font);
  padding: 12px 18px;
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #2A4668 0%, #1A2F4D 55%, #121C2E 100%);
  color: #FFFEFA;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(18, 28, 46, 0.28), 0 0 18px rgba(201, 162, 39, 0.12);
  transition: transform .18s ease, filter .18s ease, box-shadow .22s ease;
  position: relative;
  overflow: hidden;
}
button::after, .btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 25%, rgba(255,255,255,0.22) 50%, transparent 75%);
  transform: translateX(-130%);
  transition: transform .5s ease;
}
button:hover::after, .btn:hover::after { transform: translateX(130%); }
button:hover, .btn:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(18, 28, 46, 0.32), var(--neon-glow);
}
button:active, .btn:active { transform: translateY(0); }
button.ghost, .btn.ghost {
  background: rgba(255, 251, 240, 0.5);
  color: var(--color-muted);
  border: 1.5px solid rgba(18, 28, 46, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
  backdrop-filter: blur(12px);
}
button.ghost:hover, .btn.ghost:hover {
  border-color: rgba(26, 47, 77, 0.35);
  color: var(--color-text);
  box-shadow: 0 0 16px rgba(201, 162, 39, 0.15);
}
button.danger, .btn.danger {
  background: rgba(255, 251, 240, 0.55);
  color: var(--color-danger);
  border: 1.5px solid rgba(201, 75, 75, 0.4);
  box-shadow: none;
}

.error, .err, .ok, .success, .debug {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: .9rem;
  backdrop-filter: blur(10px);
}
.error, .err {
  background: rgba(201, 75, 75, 0.1);
  color: var(--color-danger);
  border: 1px solid rgba(201, 75, 75, 0.35);
}
.ok, .success {
  background: rgba(47, 107, 79, 0.1);
  color: var(--color-ok);
  border: 1px solid rgba(47, 107, 79, 0.35);
}
.debug {
  background: rgba(255, 251, 240, 0.6);
  color: var(--color-text);
  border: 1px dashed rgba(26, 47, 77, 0.35);
}

code {
  display: block;
  word-break: break-all;
  background: rgba(18, 28, 46, 0.04);
  border: 1px solid rgba(26, 47, 77, 0.18);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  color: var(--color-text);
  margin-top: 10px;
  font-family: ui-monospace, Consolas, monospace;
  backdrop-filter: blur(8px);
}

.date-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 251, 240, 0.6);
  border: 1px solid rgba(26, 47, 77, 0.18);
  color: var(--color-muted);
  font-size: .8rem;
  font-weight: 600;
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

.neon-line {
  height: 2px;
  width: 100%;
  border: 0;
  background: linear-gradient(90deg, transparent, #C9A227, #1A2F4D, #C9A227, transparent);
  box-shadow: 0 0 12px rgba(201, 162, 39, 0.35);
  margin: 16px 0;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: rise .55s cubic-bezier(.22, 1, .36, 1) both; }
