:root {
  --links: #1a73e8;
  --focus: #1a73e8;
  --border: #e0e0e0;
  --muted: #666;
  --danger: #dc3545;
  --success-bg: #d4edda;
  --success-fg: #155724;
  --success-border: #c3e6cb;
  --error-bg: #f8d7da;
  --error-fg: #721c24;
  --error-border: #f5c6cb;
}

body {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
  font-family: Hack, monospace;
  line-height: 1.5;
}

/* Header */

header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

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

nav a {
  margin-right: 1rem;
}

header .logo-reveng-ai {
  display: inline-block;
  margin-bottom: 1.5rem;
}

header .logo-reveng-ai img {
  height: 50px;
  width: auto;
  margin-left: -3px;
}

/* Alerts */

.alert {
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success-fg);
  border: 1px solid var(--success-border);
}

.alert-error {
  background: var(--error-bg);
  color: var(--error-fg);
  border: 1px solid var(--error-border);
}

/* Buttons */

.btn {
  display: inline-block;
  padding: 1rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn:hover,
.btn:focus,
.btn:active {
  text-decoration: none;
}

.btn-primary {
  background: var(--links);
  color: white;
}

.btn-primary:hover {
  background: #1557b0;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

/* Forms */

form label {
  display: block;
  margin-top: 1rem;
  font-weight: bold;
}

form input[type="text"],
form input[type="email"] {
  width: 100%;
  padding: 1rem;
  box-sizing: border-box;
}

.input-clearable {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-clearable input {
  padding-right: 2.5rem;
}

.input-clear-btn {
  position: absolute;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0.25rem;
  display: none;
}

.input-clear-btn:hover {
  background: none;
  color: var(--links);
}

.form-actions {
  margin-top: 1.5rem;
}

fieldset {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem;
  margin: 1.5rem 0;
}

fieldset legend {
  font-weight: bold;
  padding: 0 0.5rem;
}

.checkbox-group {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 0.5rem 0;
}

.checkbox-group label,
.radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: normal;
  margin-top: 0;
}

fieldset ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

fieldset ul li label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: normal;
  margin-top: 0;
}

.errorlist {
  color: var(--danger);
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

/* Cards */

.card {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.card-highlight {
  margin-top: 2rem;
  padding: 1.5rem;
  border: 2px solid var(--links);
  border-radius: 8px;
}

.card-highlight > :first-child,
.card > :first-child {
  margin-top: 0;
}

/* Utilities */

.text-muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.badge-muted {
  font-size: 0.8rem;
  color: var(--muted);
}

.badge-warning {
  font-size: 0.8rem;
  color: #e65100;
}

.mt-2 {
  margin-top: 2rem;
}

/* Private files table */

.file-table {
  width: 100%;
  font-size: small;
  border-collapse: collapse;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.file-table th,
.file-table td {
  border-bottom: 1px dotted var(--border);
  padding: 0.5rem;
  text-align: left;
  vertical-align: middle;
}

.file-table th {
  color: var(--muted);
  font-weight: bold;
}

.file-table tbody tr,
.file-table tbody tr:nth-child(even),
.file-table tbody tr:nth-child(odd) {
  background: transparent;
}

.session-separator-row td {
  padding: 0;
  border-bottom: 0;
}

.session-label-row td {
  padding: 0.35rem 0.5rem 0.25rem;
  border-bottom: 1px dotted var(--border);
  font-size: 0.9rem;
}

.session-file-row td {
  border-top: 0;
}

.file-col-modified {
  width: 9.5rem;
  white-space: nowrap;
  font-size: 0.78rem;
}

.file-col-size {
  width: 6rem;
  white-space: nowrap;
  text-align: right;
  font-size: 0.78rem;
}

.file-name-link {
  font-size: small;
}

.private-breadcrumbs {
  font-size: 0.8rem;
  color: var(--muted);
}

.badge-public {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.35rem 0.05rem;
  font-size: 0.7rem;
  line-height: 1.2;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 3px;
  vertical-align: middle;
}

/* Footer */

footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-logos {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.footer-logos a {
  display: inline-flex;
  align-items: center;
}

.footer-logos img {
  height: 32px;
  width: auto;
}

.footer-logos img.logo-square {
  height: 64px;
}
