@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

:root {
  font-family: Vazirmatn, Tahoma, sans-serif;
  color: #e8edf7;
  background: #0a1020;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 75% 0%, #14264a 0%, transparent 35%),
    #0a1020;
}

.hidden { display: none !important; }
.muted { color: #8996ae; font-size: 13px; }
.error { color: #ff7777; font-size: 13px; }

button, input { font: inherit; }
button {
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 17px;
  color: #fff;
  background: linear-gradient(135deg, #287de0, #1760bd);
  font-weight: 600;
  transition: .2s ease;
}
button:hover { filter: brightness(1.13); transform: translateY(-1px); }
button:disabled { opacity: .6; cursor: wait; transform: none; }

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-card {
  width: min(420px, 100%);
  padding: 36px;
  background: #141e33;
  border: 1px solid #293955;
  border-radius: 22px;
  box-shadow: 0 25px 90px #0008;
}

.brand {
  color: #fff;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: 1px;
}
.brand span { color: #55a6ff; }
.login-card > .muted { margin: 6px 0 28px; }

label {
  display: block;
  margin: 17px 0 8px;
  color: #c5cde0;
  font-size: 13px;
}

input {
  width: 100%;
  padding: 13px;
  border: 1px solid #34435f;
  border-radius: 10px;
  outline: none;
  background: #0c1528;
  color: #fff;
}
input:focus { border-color: #55a6ff; }
#loginForm button { width: 100%; margin-top: 24px; }

#appView { min-height: 100vh; }

.sidebar {
  position: fixed;
  z-index: 5;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: 250px;
  padding: 28px 18px;
  background: #101a2d;
  border-left: 1px solid #263550;
}

.side-label {
  margin: 42px 10px 13px;
  color: #74839f;
  font-size: 12px;
}

.nav {
  width: 100%;
  margin: 4px 0;
  padding: 13px 15px;
  text-align: right;
  color: #aab7ce;
  background: transparent;
  border: 1px solid transparent;
}
.nav.active {
  color: #fff;
  background: linear-gradient(100deg, #1d3d6c, #1b2e4d);
  border-color: #2d5489;
}

.side-bottom {
  margin-top: auto;
  padding: 18px 8px 0;
  border-top: 1px solid #293750;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.logout {
  width: 100%;
  margin-top: 18px;
  background: #293750;
}

.main {
  max-width: 1600px;
  margin-right: 250px;
  padding: 32px;
}

header, .section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 27px;
}

h1 { margin: 0 0 5px; font-size: 25px; }
h2 { margin: 0 0 8px; font-size: 20px; }
h3 { margin: 0 0 15px; font-size: 16px; }

.status-pill {
  padding: 8px 14px;
  border: 1px solid #245b4b;
  border-radius: 30px;
  color: #73ddb0;
  background: #15352e;
  font-size: 12px;
  white-space: nowrap;
}
.status-pill i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-radius: 50%;
  background: #4bd69a;
  box-shadow: 0 0 10px #4bd69a;
}

.welcome, .panel-card, .stat-card {
  background: linear-gradient(145deg, #17243b, #121c30);
  border: 1px solid #293a57;
  border-radius: 16px;
}

.welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 27px;
  padding: 27px;
}
.welcome p { margin-bottom: 0; color: #9baac2; font-size: 13px; }

.welcome-mark {
  padding: 12px 19px;
  border: 1px solid #345b8b;
  border-radius: 15px;
  color: #70b6ff;
  background: #1c3151;
  font-size: 35px;
  font-weight: 800;
}

.dashboard-section { margin-bottom: 27px; }
.dashboard-section > h3 { margin-bottom: 14px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}

.stat-card {
  position: relative;
  min-height: 120px;
  padding: 20px;
  overflow: hidden;
  transition: .2s ease;
}
.stat-card:hover {
  border-color: #4775aa;
  transform: translateY(-3px);
}
.stat-card::after {
  position: absolute;
  bottom: -30px;
  left: -20px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #287de014;
  content: "";
}
.stat-card span {
  display: block;
  color: #9baac2;
  font-size: 13px;
}
.stat-card strong {
  display: block;
  margin-top: 12px;
  color: #f1f6ff;
  font-size: 30px;
  font-weight: 800;
  direction: ltr;
  text-align: right;
}

.panel-card { padding: 22px; }
.panel-card .section-head { margin: 0 0 17px; }
.panel-card .section-head h3 { margin-bottom: 4px; }

.secondary {
  padding: 9px 14px;
  border-color: #344967;
  background: #1b2b45;
  color: #c9d8ed;
  white-space: nowrap;
}

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

table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  padding: 15px 12px;
  border-bottom: 1px solid #293750;
  text-align: right;
  vertical-align: middle;
}
th { color: #91a4c1; font-weight: 600; white-space: nowrap; }
td { color: #dce5f4; }
tbody tr:hover { background: #ffffff06; }
tbody tr:last-child td { border-bottom: 0; }

.section-head { margin: 8px 0 20px; }
.notice {
  margin-bottom: 18px;
  padding: 17px;
  border: 1px solid #2e6d65;
  border-radius: 12px;
  background: #172d32;
  overflow-wrap: anywhere;
}
.notice code {
  display: block;
  margin: 10px 0;
  padding: 12px;
  border-radius: 8px;
  background: #0b1724;
  text-align: left;
  direction: ltr;
  user-select: all;
}

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .sidebar {
    width: 76px;
    padding: 20px 8px;
  }
  .sidebar .brand {
    font-size: 0;
    text-align: center;
  }
  .sidebar .brand:first-letter { font-size: 24px; }
  .side-label, .side-bottom { display: none; }
  .nav {
    height: 49px;
    padding: 10px 3px;
    text-align: center;
    font-size: 0;
  }
  .nav.active { border-radius: 10px; }
  .main {
    margin-right: 76px;
    padding: 20px 14px;
  }
  header { align-items: flex-start; }
  h1 { font-size: 21px; }
  .welcome { padding: 19px; }
  .welcome-mark { font-size: 25px; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .stat-card { min-height: 105px; padding: 14px; }
  .stat-card span { font-size: 11px; }
  .stat-card strong { font-size: 25px; }
  .status-pill { padding: 7px 9px; font-size: 10px; }
  .panel-card { padding: 14px; }
  .section-head { align-items: flex-start; }
  .welcome h2 { font-size: 17px; }
  .welcome p { font-size: 11px; }
}
