/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

:root {
  --bg: #090d12;
  --panel: #111923;
  --line: #263647;
  --text: #e7eef7;
  --muted: #91a2b7;
  --teal: #3ee6c4;
  --blue: #5da7ff;
  --green: #74e38a;
  --yellow: #ffd166;
  --red: #ff6680;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at 12% 0%, rgba(62, 230, 196, 0.12), transparent 32rem), linear-gradient(135deg, #090d12 0%, #101721 54%, #0b1118 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 32px;
  background: rgba(9, 13, 18, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--teal); font-weight: 800; font-size: 20px; }
.brand-logo { width: 34px; height: 34px; display: block; }
nav, .button-row, .actions { display: flex; align-items: center; gap: 12px; }
nav a, .link-button { color: var(--muted); font: inherit; background: transparent; border: 0; padding: 0; cursor: pointer; }

.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 36px 0 64px; }
.app-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 22px; align-items: start; }
.app-main { min-width: 0; }
.repo-sidebar {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(15, 25, 36, 0.94), rgba(10, 17, 24, 0.94));
  border: 1px solid var(--line);
  border-radius: 8px;
}
.repo-switcher select {
  width: 100%;
  min-height: 42px;
  color: var(--text);
  background: #0a1118;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
}
.sidebar-add-button { width: 100%; }
.side-nav { display: grid; gap: 6px; }
.side-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 8px;
}
.side-nav a:hover, .side-nav a.active {
  color: var(--text);
  background: rgba(62, 230, 196, 0.08);
  border-color: rgba(62, 230, 196, 0.28);
}
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-panel { width: min(960px, 100%); display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center; }
.login-logo { width: 86px; height: 86px; display: block; margin-bottom: 18px; }
.login-panel h1, .page-heading h1 { margin: 0; font-size: clamp(34px, 6vw, 68px); letter-spacing: 0; line-height: 1; }
.lede { max-width: 520px; color: var(--muted); font-size: 18px; line-height: 1.7; }
.trial-contact { margin-top: 18px; color: var(--muted); font-size: 13px; }
.trial-contact a { color: var(--teal); font-weight: 800; }
.eyebrow { margin: 0 0 10px; color: var(--teal); font-size: 12px; font-weight: 800; text-transform: uppercase; }

.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; }
.page-heading h1 { font-size: clamp(32px, 4vw, 52px); }
.panel, .metric {
  background: linear-gradient(180deg, rgba(22, 34, 49, 0.92), rgba(17, 25, 35, 0.92));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.28);
}
.panel { padding: 22px; }
.full-width-panel { width: 100%; }
.compact-panel { max-width: 720px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric { padding: 20px; }
.metric span, small, .empty { color: var(--muted); }
.error-text { color: var(--red); }
.metric strong { display: block; margin-top: 10px; font-size: 30px; }
.grid { display: grid; gap: 18px; margin-bottom: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
h2 { margin: 0; font-size: 18px; }

.list { display: grid; gap: 10px; }
.list.compact { gap: 8px; }
.row, .row-link {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}
.row-link:hover { border-color: rgba(62, 230, 196, 0.42); }
.row span, .row-link span { min-width: 0; }
small { display: block; margin-top: 4px; }

.primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
}
.primary-button { color: #04110f; background: linear-gradient(135deg, var(--teal), var(--green)); }
.secondary-button { color: var(--text); background: rgba(255, 255, 255, 0.05); border-color: var(--line); }
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.modal {
  width: min(420px, calc(100% - 32px));
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
}
.modal::backdrop { background: rgba(2, 6, 12, 0.72); backdrop-filter: blur(6px); }
.modal-panel {
  padding: 22px;
  background: linear-gradient(180deg, rgba(22, 34, 49, 0.98), rgba(17, 25, 35, 0.98));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}
.modal-panel small { color: var(--muted); }

.form-stack, .form-grid { display: grid; gap: 16px; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.compact-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; }
.compact-form small { grid-column: 1 / -1; }
.filter-bar {
  display: flex;
  align-items: end;
  gap: 12px;
  margin: 0 0 16px;
  flex-wrap: wrap;
}
.filter-bar label { width: min(360px, 100%); }
.span-2 { grid-column: span 2; }
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.checkbox-card {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}
.checkbox-card input {
  width: 18px;
  min-height: 18px;
}
.setup-panel { max-width: 560px; }
label { display: grid; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
input, textarea, select {
  width: 100%;
  color: var(--text);
  background: #0a1118;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}
input, select { min-height: 42px; padding: 0 12px; }
textarea { min-height: 220px; padding: 12px; resize: vertical; line-height: 1.55; }
.toggle { display: flex; align-items: center; }
.toggle input { width: 18px; min-height: 18px; }
.form-section {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.form-section p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
code { color: var(--teal); }
.mail-preview {
  overflow: hidden;
  background: #f7fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.mail-preview-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  color: #182331;
  background: #e9f0f7;
  border-bottom: 1px solid #d5e0eb;
  font-weight: 800;
}
.mail-preview-header small {
  overflow: hidden;
  max-width: 70%;
  color: #64748b;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mail-preview iframe { display: block; width: 100%; height: 300px; border: 0; background: #fff; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
td { color: #d7e2ef; }
.sent-flag { font-size: 18px; }
.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: rgba(93, 167, 255, 0.15); color: var(--blue); }
.badge-succeeded, .badge-sent { color: var(--green); background: rgba(116, 227, 138, 0.14); }
.badge-failed { color: var(--red); background: rgba(255, 102, 128, 0.14); }
.badge-skipped { color: var(--yellow); background: rgba(255, 209, 102, 0.14); }
.flash, .form-errors { margin-bottom: 18px; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); background: rgba(93, 167, 255, 0.12); }
.alert, .form-errors { background: rgba(255, 102, 128, 0.12); }
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.pagination-summary {
  color: var(--muted);
  font-size: 13px;
}
.pagination-button {
  min-width: 88px;
  text-align: center;
}
.pagination-button.disabled {
  opacity: 0.45;
  cursor: default;
}

@media (max-width: 780px) {
  .topbar, .page-heading, nav { align-items: flex-start; flex-direction: column; height: auto; }
  .topbar { padding: 18px; }
  .app-layout { grid-template-columns: 1fr; }
  .repo-sidebar { position: static; }
  .login-panel, .grid.two, .metrics, .form-grid { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: 1fr; }
  .compact-panel { max-width: none; }
  .compact-form { grid-template-columns: 1fr; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .filter-bar label { width: 100%; }
  .span-2 { grid-column: span 1; }
  .page-heading { align-items: stretch; }
  .pagination { justify-content: flex-start; }
}
