@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn-medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn-semibold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn-light.woff2") format("woff2");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #202b3b;
  --ink-soft: #526071;
  --navy: #142235;
  --navy-light: #1d3048;
  --paper: #f5f6f7;
  --surface: #ffffff;
  --line: #e5e8ec;
  --muted: #8993a1;
  --bronze: #a58a61;
  --bronze-soft: #f2ede5;
  --success: #39765f;
  --warning: #9b7439;
  --danger: #a64d4d;
  --radius: 7px;
  --sidebar-width: 238px;
  --font-fa: "Vazirmatn", sans-serif;
  --font-en: "Inter", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-fa);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

.liecb-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  direction: rtl;
}

.liecb-sidebar {
  background: var(--navy);
  color: #f4f5f6;
  min-height: 100vh;
  padding: 25px 17px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255,255,255,.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 3px 8px 24px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.brand-mark {
  width: 35px;
  height: 35px;
  border: 1px solid rgba(194,169,126,.8);
  color: #d6c09b;
  display: grid;
  place-items: center;
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .015em;
}

.brand-caption {
  color: #aeb8c5;
  font-size: 10px;
  line-height: 1.6;
  font-family: var(--font-en);
  letter-spacing: .08em;
}

.nav-section {
  margin-top: 25px;
}

.nav-heading {
  color: #91a0b1;
  font-size: 10px;
  font-weight: 500;
  padding: 0 11px 9px;
}

.nav-link {
  min-height: 39px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 11px;
  border-radius: 5px;
  color: #d0d7df;
  font-size: 12.5px;
  transition: background .15s ease, color .15s ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  background: var(--navy-light);
  color: #ffffff;
}

.nav-indicator {
  width: 5px;
  height: 5px;
  border: 1px solid #bba47e;
  transform: rotate(45deg);
  flex: 0 0 auto;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 17px 9px 0;
  color: #aeb8c5;
  font-size: 10.5px;
}

.liecb-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 65px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.breadcrumb {
  color: var(--muted);
  font-size: 11.5px;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-soft);
  font-size: 11.5px;
}

.system-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.system-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.page-content {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 29px 30px 45px;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.page-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  font-weight: 600;
  color: var(--ink);
}

.page-subtitle {
  margin: 4px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

.section-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.section-caption {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel-header {
  padding: 17px 19px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-body {
  padding: 19px;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 20px;
}

.metric {
  padding: 16px 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}

.metric-label {
  color: var(--muted);
  font-size: 11px;
}

.metric-value {
  margin-top: 7px;
  font-family: var(--font-en), var(--font-fa);
  font-size: 21px;
  font-weight: 500;
  direction: ltr;
  text-align: right;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.metric-note {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  white-space: nowrap;
}

.data-table th {
  background: #fafbfc;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
}

.data-table th,
.data-table td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
}

.data-table td {
  font-size: 12px;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.ltr,
.numeric {
  direction: ltr;
  unicode-bidi: isolate;
  font-family: var(--font-en), var(--font-fa);
  font-variant-numeric: tabular-nums;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 500;
  background: #f0f2f4;
  color: var(--ink-soft);
}

.status-success {
  background: #edf4f0;
  color: var(--success);
}

.status-warning {
  background: #f6f1e8;
  color: var(--warning);
}

.status-danger {
  background: #f7eeee;
  color: var(--danger);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 35px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 500;
}

.btn-primary {
  color: white;
  background: var(--navy);
  border-color: var(--navy);
}

.btn-primary:hover {
  background: var(--navy-light);
}

.btn:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 2px;
}

.empty-state {
  padding: 35px 15px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.form-control {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  color: var(--ink);
  font-size: 12px;
}

.footer {
  margin-top: auto;
  padding: 15px 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
}

@media (max-width: 1050px) {
  :root {
    --sidebar-width: 205px;
  }

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

@media (max-width: 720px) {
  .liecb-shell {
    grid-template-columns: 1fr;
  }

  .liecb-sidebar {
    min-height: auto;
    padding: 12px 14px;
  }

  .brand {
    padding-bottom: 11px;
  }

  .nav-section {
    margin-top: 10px;
  }

  .nav-section:not(:first-of-type),
  .sidebar-footer {
    display: none;
  }

  .topbar {
    min-height: 52px;
    padding: 0 15px;
  }

  .page-content {
    padding: 21px 14px 30px;
  }

  .page-heading {
    margin-bottom: 17px;
  }

  .data-grid {
    gap: 9px;
  }

  .metric {
    padding: 12px;
  }

  .metric-value {
    font-size: 18px;
  }

  .panel-header,
  .panel-body {
    padding: 14px;
  }

  .footer {
    padding: 13px 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
