:root{
  --bg:#f6f7fb;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --primary:#2563eb;
  --primary-2:#1d4ed8;
  --border:#e5e7eb;
  --sidebar:#0b1220;
  --sidebar-2:#0f172a;
}

*{ box-sizing:border-box; }
body{ margin:0; font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif; background:var(--bg); color:var(--text); }

a{ color:inherit; }

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

.sidebar{
  width:270px;
  background:linear-gradient(180deg,var(--sidebar),var(--sidebar-2));
  color:#e2e8f0;
  padding:18px 14px;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.sidebar-brand{ display:flex; gap:12px; align-items:center; padding:8px 10px; border-radius:14px; background:rgba(255,255,255,0.06); }
.logo{ width:40px; height:40px; border-radius:12px; display:grid; place-items:center; background:rgba(37,99,235,0.25); color:#fff; font-weight:800; }
.brand-title{ font-weight:800; letter-spacing:0.2px; }
.brand-sub{ font-size:12px; color:#94a3b8; margin-top:2px; }

.nav{ display:flex; flex-direction:column; gap:6px; padding:0 6px; }
.nav-section{ margin-top:10px; font-size:11px; text-transform:uppercase; letter-spacing:0.12em; color:#94a3b8; padding:6px 8px; }
.navlink{
  display:flex; align-items:center;
  padding:10px 10px;
  border-radius:12px;
  text-decoration:none;
  color:#cbd5e1;
}
.navlink:hover{ background:rgba(255,255,255,0.08); color:#fff; }

.sidebar-footer{ margin-top:auto; padding:10px 10px; border-radius:14px; background:rgba(255,255,255,0.06); }
.muted-small{ font-size:11px; color:#94a3b8; }
.small{ font-size:13px; }

.main{ flex:1; display:flex; flex-direction:column; }
.top{
  height:56px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 24px;
  border-bottom:1px solid var(--border);
  background:rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
}

.container{ max-width:1100px; margin:0 auto; padding:22px 24px; width:100%; }

.page-header{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:14px; }
.page-header h1{ margin:0; font-size:26px; }
.muted{ color:var(--muted); margin:6px 0 0; }

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  padding:16px;
  box-shadow: 0 8px 18px rgba(15,23,42,0.04);
}

.card-link{ text-decoration:none; display:block; transition: transform 0.06s ease; }
.card-link:hover{ transform: translateY(-2px); }

.grid-2{ display:grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap:14px; }
.grid-3{ display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:14px; }
.grid-span-2{ grid-column: 1 / span 2; }

@media (max-width: 980px){
  .sidebar{ width:220px; }
  .grid-3{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 720px){
  .app{ flex-direction:column; }
  .sidebar{ width:auto; }
  .grid-2, .grid-3{ grid-template-columns: 1fr; }
  .grid-span-2{ grid-column:auto; }
}

.btn{
  display:inline-block;
  padding:10px 14px;
  background:var(--primary);
  color:#fff;
  border-radius:12px;
  text-decoration:none;
  border:none;
  cursor:pointer;
  font-weight:600;
}
.btn:hover{ background:var(--primary-2); }
.btn.tiny{ padding:6px 10px; border-radius:10px; font-size:12px; }
.btn.danger{ background:#ef4444; }
.btn.danger:hover{ background:#dc2626; }
.btn.secondary{ background:#e2e8f0; color:#0f172a; }
.btn.secondary:hover{ background:#cbd5e1; }
.toolbar{ display:flex; gap:10px; flex-wrap:wrap; margin: 10px 0 14px; }
.actions{ display:flex; gap:10px; flex-wrap:wrap; }

.pill{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  background:#eef2ff;
  color:#3730a3;
  border:1px solid #e0e7ff;
}

.link{ color:var(--primary-2); text-decoration:none; font-weight:600; }
.link:hover{ text-decoration:underline; }

.badge{
  display:inline-block;
  padding:4px 8px;
  border-radius:999px;
  font-size:11px;
  background:#f1f5f9;
  color:#334155;
  border:1px solid var(--border);
}
.badge.ok{ background:#ecfdf5; border-color:#a7f3d0; color:#065f46; }

.details-summary{ cursor:pointer; color:var(--primary-2); font-weight:600; }
.details-box summary{ list-style:none; }
.details-box summary::-webkit-details-marker{ display:none; }

.form label{ display:block; font-size:12px; color:var(--muted); margin-bottom:6px; }
.form input, .form select, .form textarea{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  outline:none;
}
.form textarea{ min-height: 90px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus{
  border-color:#93c5fd;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.12);
}


.table-scroll{ overflow-x:auto; max-width:100%; }
.team-table{ min-width: 980px; }
.team-table td, .team-table th{ word-break: break-word; }
.team-table details{ max-width: 100%; }
.team-table details .form{ min-width: 720px; }

.table{ width:100%; border-collapse: collapse; }
.table th, .table td{ padding:10px 8px; border-bottom:1px solid var(--border); text-align:left; vertical-align:top; }
.table th{ color:var(--muted); font-size:12px; font-weight:700; }
.table .right{ text-align:right; }

.messages{ list-style:none; padding:0; }
.messages li{ background:#ecfeff; border:1px solid #cffafe; padding:10px 12px; border-radius:12px; margin-bottom:10px; }
