:root {
  --bg: #f7fafc;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-2: #115e59;
  --text: #1f2937;
  --muted: #6b7280;
  --danger: #b91c1c;
  --border: #e5e7eb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, #d1fae5 0%, transparent 35%),
    radial-gradient(circle at 100% 100%, #bfdbfe 0%, transparent 35%),
    var(--bg);
  min-height: 100vh;
}

.container {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 24px;
}

.menu {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.menu a {
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--text);
  background: var(--panel);
  font-size: 14px;
}

.menu button {
  width: auto;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
}

.menu a.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
  margin-bottom: 14px;
}

h1, h2 { margin-top: 0; }

label {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

input, select, button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 14px;
}

input:focus, select:focus, button:focus {
  outline: 2px solid #0ea5e9;
  outline-offset: 1px;
}

button {
  background: var(--accent);
  border: none;
  color: white;
  cursor: pointer;
}

button:hover { background: var(--accent-2); }
button:disabled { opacity: 0.6; cursor: not-allowed; }
button.secondary { background: #334155; }
button.danger { background: var(--danger); }

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th, td {
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.status {
  font-weight: 600;
  margin-top: 8px;
  min-height: 20px;
}

.hidden { display: none; }
.small { color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions button { width: auto; }
.empty {
  color: var(--muted);
  font-size: 13px;
  padding: 8px 0;
}

.chat-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: 140px;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  background: #f8fafc;
}

.chat-line {
  font-size: 13px;
  padding: 6px;
  margin-bottom: 6px;
  border-radius: 8px;
}

.chat-line.me {
  background: #dcfce7;
}

.chat-line.them {
  background: #e2e8f0;
}

.status-box {
  display: inline-block;
  min-width: 86px;
  text-align: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #111827;
}

.status-idle {
  background: #22c55e;
  color: #064e3b;
}

.status-busy {
  background: #ef4444;
  color: #7f1d1d;
}

.status-dnd {
  background: #facc15;
  color: #713f12;
}

@media (max-width: 768px) {
  .container { padding: 14px; }
  th, td { font-size: 13px; }
}
