:root {
  --bg: #0b1020;
  --panel: #11182c;
  --panel2: #151f38;
  --text: #e8ecf7;
  --muted: #94a3b8;
  --line: #24304d;
  --primary: #5865f2;
  --green: #22c55e;
  --yellow: #f59e0b;
  --red: #ef4444;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(circle at top left, #18244a, var(--bg) 35%);
  color: var(--text);
  font-family: Inter, system-ui, Arial, sans-serif;
}
.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: rgba(8, 12, 25, 0.78);
  border-right: 1px solid var(--line);
  padding: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 28px;
}
nav {
  display: grid;
  gap: 8px;
}
a {
  color: #c7d2fe;
  text-decoration: none;
}
nav a,
.btn,
button {
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
}
nav a.active,
nav a:hover,
.btn.primary {
  background: var(--primary);
  border-color: transparent;
}
.logout {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
}
.logout button {
  width: 100%;
}
.content {
  padding: 28px;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.top h1 {
  margin: 0;
}
.card,
.stat,
.message {
  background: rgba(17, 24, 44, 0.86);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}
.hero {
  display: grid;
  place-items: center;
  min-height: 70vh;
}
.login {
  max-width: 560px;
  text-align: center;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}
.grid.two {
  align-items: start;
}
.stat b {
  display: block;
  font-size: 42px;
}
.stat span,
p,
small {
  color: var(--muted);
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.between {
  justify-content: space-between;
}
.form {
  display: grid;
  gap: 14px;
}
.narrow {
  max-width: 760px;
}
label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}
input,
select,
textarea {
  width: 100%;
  background: #0b1224;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px;
}
textarea {
  resize: vertical;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
th {
  color: var(--muted);
  font-weight: 600;
}
.badge {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  background: #334155;
  font-size: 12px;
}
.badge.open {
  background: var(--green);
  color: #052e16;
}
.badge.in_progress {
  background: var(--primary);
}
.badge.waiting_user {
  background: var(--yellow);
  color: #451a03;
}
.badge.closed {
  background: var(--red);
}
.messages {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}
.message.internal {
  border-color: var(--yellow);
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.check input {
  width: auto;
}
@media (max-width: 850px) {
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    height: auto;
    position: relative;
  }
  .logout {
    position: static;
    margin-top: 20px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .content {
    padding: 18px;
  }
}
