:root {
  color-scheme: dark;
  --bg: #080d13;
  --white: #111923;
  --surface: #111923;
  --surface-2: #16212d;
  --ink: #f1f5f9;
  --muted: #8b9aaa;
  --line: #253241;
  --green: #27c58a;
  --light: rgba(39, 197, 138, 0.14);
  --red: #ff6b78;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  border: 0;
  cursor: pointer;
}
aside {
  position: fixed;
  inset: 0 auto 0 0;
  width: 240px;
  padding: 27px 18px;
  background: #080d13;
  color: #e4ece8;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 32px;
}
.brand b,
.mark {
  width: 43px;
  height: 43px;
  border-radius: 13px;
  background: rgba(39, 197, 138, 0.15);
  color: #39d39a;
  display: grid;
  place-items: center;
  font-weight: 900;
}
.brand span {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
}
aside nav {
  display: grid;
  gap: 7px;
}
aside nav a,
.logout {
  padding: 13px 15px;
  border-radius: 10px;
  color: #9fb7ad;
  font-weight: 700;
  font-size: 14px;
}
aside nav a.active,
aside nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.logout {
  margin-top: auto;
}
.shell {
  margin-left: 240px;
}
.shell > header {
  height: 100px;
  padding: 20px 4vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(8, 13, 19, 0.88);
  backdrop-filter: blur(12px);
  z-index: 3;
}
.shell header small,
.panel > small,
.timer small {
  font-size: 10px;
  color: #36c58f;
  letter-spacing: 0.16em;
  font-weight: 850;
}
.shell header h1 {
  font-size: 25px;
  margin: 4px 0;
}
.menu {
  display: none;
  background: none;
  font-size: 22px;
}
.global-timer {
  display: flex;
  gap: 9px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 10px 13px;
  border-radius: 11px;
  font-size: 11px;
}
.global-timer i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #28a873;
  box-shadow: 0 0 0 5px #e3f5ed;
}
main {
  max-width: 1550px;
  margin: auto;
  padding: 32px 4vw 60px;
}
.welcome,
.toolbar,
.service-title,
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.welcome {
  margin-bottom: 22px;
}
.welcome h2,
.service-title h2 {
  font-size: 27px;
  margin: 0 0 5px;
}
.welcome p,
.service-title p {
  margin: 0;
  color: var(--muted);
}
.button,
button.primary {
  display: inline-flex;
  justify-content: center;
  padding: 12px 17px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 750;
}
.primary,
button.primary {
  background: var(--green);
  color: #fff;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 21px;
}
.stats article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 21px;
}
.stats article.dark {
  background: linear-gradient(145deg, #123c30, #0d2a22);
  color: #fff;
}
.stats span,
.stats small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.stats .dark span {
  color: #b9d1c7;
}
.stats strong {
  display: block;
  font-size: 24px;
  margin: 10px 0 4px;
}
.amber {
  color: #bd7b20;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 23px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.panel-head {
  margin-bottom: 18px;
}
.panel-head h2,
.panel > h2 {
  margin: 3px 0;
  font-size: 19px;
}
.panel-head a,
.tr a,
.service-title a {
  font-size: 12px;
  color: var(--green);
  font-weight: 800;
}
.table {
  overflow: auto;
}
.tr {
  display: grid;
  grid-template-columns: 2fr 1.2fr 0.8fr 0.8fr 0.5fr;
  gap: 12px;
  align-items: center;
  padding: 15px 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  min-width: 650px;
}
.tr.head {
  border: 0;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}
.split,
.detail {
  display: grid;
  grid-template-columns: 1.45fr 0.8fr;
  gap: 20px;
}
.client-list {
  display: grid;
  gap: 9px;
}
.client-list article {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--light);
  color: var(--green);
  display: grid;
  place-items: center;
}
.client-list span strong,
.client-list span small {
  display: block;
}
.client-list small {
  font-size: 11px;
  color: var(--muted);
}
.client-list a {
  font-size: 11px;
  color: var(--green);
  font-weight: 800;
}
form {
  display: grid;
  gap: 13px;
}
label {
  display: grid;
  gap: 6px;
  color: #53625c;
  font-size: 12px;
  font-weight: 700;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #0d151e;
  border-radius: 10px;
  padding: 12px;
  outline: 0;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #2b8b66;
  box-shadow: 0 0 0 3px rgba(43, 139, 102, 0.1);
}
textarea {
  min-height: 85px;
}
.danger {
  background: none;
  color: var(--red);
  font-weight: 800;
}
.grid-form {
  grid-template-columns: 1fr 1fr;
}
.grid-form .wide {
  grid-column: span 2;
}
.toolbar {
  margin-bottom: 18px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  transition: 0.18s;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.card h3 {
  margin: 18px 0 5px;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.card > div {
  display: flex;
  justify-content: space-between;
  margin-top: 22px;
}
.card span small,
.card span strong {
  display: block;
}
.card span small {
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 4px;
}
.badge {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #19242e;
  color: #9aaaa3;
  font-size: 10px;
  font-weight: 800;
}
.badge.active {
  background: var(--light);
  color: #39d39a;
}
.badge.waiting {
  background: var(--surface) 0d6;
  color: #936114;
}
.badge.completed {
  background: rgba(80, 126, 220, 0.16);
  color: #405f9e;
}
.service-title {
  margin-bottom: 18px;
}
.timer {
  background: linear-gradient(120deg, #12372a, #1c6047);
  color: #fff;
  border-radius: 18px;
  padding: 27px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.timer > div:first-child strong {
  display: block;
  font-size: 43px;
  margin: 5px 0;
}
.timer p {
  color: #b8d1c7;
  font-size: 11px;
  margin: 0;
}
.timer > div:last-child {
  display: grid;
  grid-template-columns: minmax(230px, 350px) auto;
  gap: 9px;
}
.timer input {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.timer button {
  padding: 12px 17px;
  border-radius: 10px;
  color: #fff;
  font-weight: 800;
}
.start {
  background: #2fa576;
}
.stop {
  background: #c45454;
}
.manual {
  display: flex;
  align-items: end;
  gap: 8px;
  padding: 13px;
  background: #0c141c;
  border-radius: 11px;
}
.manual label:last-of-type {
  flex: 1;
}
.list article {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.list article > span {
  flex: 1;
}
.list strong,
.list small {
  display: block;
}
.list small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.alert {
  padding: 13px 15px;
  background: rgba(39, 197, 138, 0.14);
  color: #39d39a;
  border-radius: 10px;
  margin-bottom: 17px;
}
.alert.error {
  background: rgba(255, 107, 120, 0.13);
  color: #983f3f;
}
.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(
      circle at 18% 8%,
      rgba(39, 197, 138, 0.15),
      transparent 34rem
    ),
    radial-gradient(
      circle at 85% 90%,
      rgba(65, 105, 225, 0.1),
      transparent 30rem
    ),
    var(--bg);
}
.auth-card {
  width: min(100%, 420px);
  background: var(--surface);
  padding: 35px;
  border: 1px solid var(--line);
  border-radius: 21px;
  box-shadow: var(--shadow);
}
.auth-card > small {
  display: block;
  color: #36c58f;
  font-size: 10px;
  letter-spacing: 0.16em;
  font-weight: 850;
  margin-top: 24px;
}
.auth-card h1 {
  margin: 6px 0;
}
.auth-card > p {
  color: var(--muted);
  margin-bottom: 24px;
}
@media (max-width: 1050px) {
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .cards {
    grid-template-columns: 1fr 1fr;
  }
  .split,
  .detail {
    grid-template-columns: 1fr;
  }
  .timer {
    align-items: stretch;
    flex-direction: column;
  }
}
@media (max-width: 700px) {
  aside {
    transform: translateX(-100%);
    transition: 0.2s;
  }
  .open aside {
    transform: none;
  }
  .shell {
    margin-left: 0;
  }
  .menu {
    display: block;
  }
  .shell > header {
    height: 84px;
    padding: 14px 17px;
  }
  .shell header small {
    display: none;
  }
  .shell header h1 {
    font-size: 20px;
  }
  .global-timer {
    font-size: 0;
  }
  .global-timer b {
    font-size: 11px;
  }
  main {
    padding: 22px 14px 45px;
  }
  .stats,
  .cards,
  .grid-form {
    grid-template-columns: 1fr;
  }
  .grid-form .wide {
    grid-column: auto;
  }
  .client-list article {
    grid-template-columns: auto 1fr auto;
  }
  .client-list article > small {
    display: none;
  }
  .timer > div:first-child strong {
    font-size: 35px;
  }
  .timer > div:last-child {
    grid-template-columns: 1fr;
  }
  .manual {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .manual label:last-of-type,
  .manual button {
    grid-column: span 2;
  }
}
