/* Contract access administration (with Login/css/login.css and Projects/css/projects.css) */

.tv-admin {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.tv-admin h1 {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 4px;
}

.tv-admin-intro {
  color: var(--tv-muted);
  margin: 0 0 16px;
  font-size: 14px;
}

.tv-admin-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
}

.tv-admin-body[hidden] { display: none; }

.tv-admin-users .tv-search {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 8px;
}

.tv-user-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.tv-user-list li {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.tv-user-list li:last-child { border-bottom: none; }
.tv-user-list li:hover { background: #f6f6f6; }

.tv-user-list li[aria-selected="true"] {
  background: #fbe9ec;
  box-shadow: inset 3px 0 0 var(--tv-red);
}

.tv-user-login { font-weight: 600; word-break: break-all; }

.tv-user-sub {
  font-size: 12px;
  color: var(--tv-muted);
  word-break: break-all;
}

.tv-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--tv-red);
  border-radius: 10px;
  padding: 1px 8px;
  margin-left: 6px;
  vertical-align: middle;
}

.tv-admin-detail {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 16px 20px;
  min-width: 0;
}

.tv-detail-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tv-detail-head h2 {
  font-size: 18px;
  margin: 0;
  flex: 1;
  word-break: break-all;
}

.tv-admin-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.tv-admin-note {
  font-size: 13px;
  color: var(--tv-muted);
  background: #f6f6f6;
  border-radius: 6px;
  padding: 8px 12px;
  margin: 0 0 12px;
}

.tv-grant-tools {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
}

.tv-grant-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tv-grant {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 4px 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.tv-grant:last-child { border-bottom: none; }

.tv-grant input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--tv-red);
  cursor: pointer;
}

.tv-grant-name { font-weight: 600; }

.tv-grant-meta {
  font-size: 12px;
  color: var(--tv-muted);
}

.tv-grant .tv-contract-projects { margin-top: 4px; }

.tv-grant-until {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--tv-muted);
}

.tv-grant-until input {
  font: inherit;
  padding: 3px 6px;
  border: 1px solid var(--tv-border);
  border-radius: 4px;
}

.tv-grant-until input:disabled { opacity: 0.4; }

.tv-grant-expired .tv-grant-name::after {
  content: " (expired)";
  color: var(--tv-red-dark);
  font-weight: normal;
}

.tv-saved {
  font-size: 13px;
  color: #2e7d32;
  min-height: 1.2em;
}

@media (max-width: 760px) {
  .tv-admin-body { grid-template-columns: 1fr; }
  .tv-grant { grid-template-columns: auto 1fr; }
  .tv-grant-until { grid-column: 2; }
}
