:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f5;
  --card: #ffffff;
  --border: #d7d7d7;
  --border2: #eeeeee;
  --text: #111111;
  --muted: #666666;
  --danger: #991b1b;
  --success: #14532d;
  --radius: 5px;
  --header-h: 52px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.35;
}

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

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

.layout {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: 210px;
  border-right: 1px solid var(--border);
  background: #fff;
  padding: 12px 10px;
  display: none;
  flex-direction: column;
  gap: 4px;
}

.sidebarLogo {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .12em;
  padding: 6px 10px 14px;
}

.sidebarNav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebarLink {
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 650;
}

.sidebarLink:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.sidebarLink.active {
  background: #111;
  color: #fff;
}

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

.topbar {
  min-height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbarTitle {
  font-size: 14px;
  font-weight: 750;
  min-width: 0;
}

.topbarRight {
  display: flex;
  align-items: center;
  gap: 6px;
}

.langSwitch {
  display: flex;
  gap: 4px;
}

.langBtn {
  height: 30px;
  min-width: 40px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.langBtn.active {
  background: #111;
  color: #fff;
  border-color: #111;
}

.logoutForm {
  margin: 0;
}

.logoutBtn {
  height: 30px;
  padding: 0 9px;
  font-size: 11px;
}

.content {
  padding: 10px;
}

.pageHead {
  margin-bottom: 10px;
}

.pageHead h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.1;
}

.pageHead p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.card,
.loginCard,
.details,
.cardForm,
.rateForm,
.tableWrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
}

.cardBody {
  padding: 10px;
}

.k {
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}

.v {
  font-size: 26px;
  font-weight: 850;
  margin-top: 4px;
}

.v.small {
  font-size: 13px;
  word-break: break-word;
}

.filter {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
  margin-bottom: 10px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  outline: none;
  padding: 0 9px;
  font-weight: 600;
}

input,
select {
  height: 38px;
}

textarea {
  min-height: 92px;
  padding-top: 8px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #111;
}

button,
.btn {
  height: 38px;
  border: 1px solid #111;
  border-radius: var(--radius);
  background: #111;
  color: #fff;
  padding: 0 11px;
  font-weight: 750;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn.secondary {
  border-color: var(--border);
  background: #fff;
  color: #111;
}

.tableWrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border2);
  white-space: nowrap;
}

th {
  font-size: 11px;
  color: var(--muted);
  font-weight: 800;
}

td {
  font-size: 12px;
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 10px;
  font-weight: 800;
  background: #fff;
}

.details {
  display: grid;
  gap: 7px;
  padding: 10px;
  margin-bottom: 10px;
}

.details div {
  border-bottom: 1px solid var(--border2);
  padding-bottom: 7px;
}

.form {
  display: grid;
  gap: 8px;
}

.form label,
.rateForm label {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}

.cardForm {
  padding: 10px;
  margin-top: 10px;
}

.rateForm {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  padding: 10px;
  margin-bottom: 10px;
}

.mt {
  margin-top: 14px;
}

.loginBody {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 12px;
  background: #fff;
}

.loginCard {
  width: 100%;
  max-width: 390px;
  padding: 14px;
}

.loginTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.loginLogo {
  font-weight: 850;
  letter-spacing: .12em;
}

.loginCard h1 {
  margin: 0 0 6px;
  font-size: 22px;
}

.loginCard p {
  color: var(--muted);
  margin: 0 0 12px;
  font-size: 12px;
}

.alert {
  border: 1px solid #e5b4b4;
  background: #fff5f5;
  color: var(--danger);
  border-radius: var(--radius);
  padding: 8px 9px;
  margin-bottom: 10px;
  font-weight: 750;
}

.bottomNav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 56px;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 50;
}

.bottomNavLink {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.bottomNavLink.active {
  color: #111;
}

@media (max-width: 1023px) {
  .content {
    padding-bottom: 76px;
  }
}

@media (min-width: 760px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rateForm {
    grid-template-columns: 140px 1fr 140px 1fr;
    align-items: center;
  }

  .rateForm button {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .sidebar {
    display: flex;
  }

  .bottomNav {
    display: none;
  }

  .content {
    padding: 18px;
  }

  input,
  select,
  button,
  .btn {
    height: 36px;
  }
}
