:root {
  --ink: #071a17;
  --ink-2: #0d2b26;
  --panel: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.12);
  --text: #eef7f4;
  --muted: #9bb5ae;
  --mint: #5eead4;
  --mint-deep: #2dd4bf;
  --warn: #f0b429;
  --danger: #fb7185;
  --ok: #86efac;
  --radius: 14px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --font-display: "Syne", sans-serif;
  --font-body: "Manrope", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(94, 234, 212, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(240, 180, 41, 0.1), transparent 45%),
    linear-gradient(160deg, #04110f 0%, var(--ink) 45%, #0a221e 100%);
  background-attachment: fixed;
}

a {
  color: var(--mint);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.shell {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  animation: rise 0.5s ease both;
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
}

.brand span {
  color: var(--mint);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

.nav a {
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
}

.user-chip {
  color: var(--muted);
  font-size: 0.85rem;
}

.topbar-public {
  justify-content: space-between;
}

.lang-switch {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
}

.lang-switch a {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
}

.lang-switch a:hover,
.lang-switch a.active {
  color: #04201c;
  background: var(--mint);
  border-color: transparent;
  text-decoration: none;
}

.hero-login {
  min-height: calc(100vh - 3rem);
  display: grid;
  align-items: center;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  animation: rise 0.6s ease both;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 0 0 1rem;
}

.hero-copy h1 em {
  font-style: normal;
  color: var(--mint);
}

.hero-copy p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 28rem;
  margin: 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.panel h2,
.section h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 0.85rem;
  letter-spacing: -0.02em;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.section {
  margin-bottom: 1.25rem;
  animation: rise 0.55s ease both;
}

.section:nth-child(2) {
  animation-delay: 0.05s;
}
.section:nth-child(3) {
  animation-delay: 0.1s;
}

label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.85rem;
}

textarea {
  min-height: 5rem;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  background: var(--mint);
  color: #04201c;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover {
  background: var(--mint-deep);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-danger {
  background: var(--danger);
  color: #2a0610;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.flash {
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
}

.flash-ok {
  background: rgba(134, 239, 172, 0.12);
  color: var(--ok);
}

.flash-err {
  background: rgba(251, 113, 133, 0.12);
  color: var(--danger);
}

.status-pill {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-open {
  background: rgba(94, 234, 212, 0.15);
  color: var(--mint);
}

.status-closed {
  background: rgba(155, 181, 174, 0.15);
  color: var(--muted);
}

.status-pending {
  background: rgba(240, 180, 41, 0.15);
  color: var(--warn);
}

.status-paid {
  background: rgba(134, 239, 172, 0.15);
  color: var(--ok);
}

.status-cancelled {
  background: rgba(251, 113, 133, 0.12);
  color: var(--danger);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  text-align: start;
  padding: 0.7rem 0.4rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.muted {
  color: var(--muted);
}

.stat {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: -0.03em;
  margin: 0.2rem 0 0;
}

.mono {
  font-variant-numeric: tabular-nums;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .hero-login,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

html[dir="rtl"] body {
  font-family: "Vazirmatn", var(--font-body);
}

html[dir="rtl"] .brand,
html[dir="rtl"] .hero-copy h1,
html[dir="rtl"] .panel h2,
html[dir="rtl"] .section h2,
html[dir="rtl"] .stat {
  font-family: "Vazirmatn", var(--font-display);
}

html[dir="rtl"] th {
  text-transform: none;
  letter-spacing: 0;
}
