:root {
  --bg: #f3f3f3;
  --bg-soft: #f8f8f8;
  --panel: #ffffff;
  --panel-muted: #f6f6f6;
  --text: #101010;
  --muted: #5f5f5f;
  --border: #dcdcdc;
  --border-soft: #e7e7e7;
  --accent: #111111;
  --accent-dark: #111111;
  --success: #167647;
  --danger: #b53a3a;
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-strong: 0 14px 28px rgba(0, 0, 0, 0.12);
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.layout {
  display: flex;
  min-height: 100vh;
  gap: 0;
  padding: 0;
}

.sidebar {
  width: 280px;
  border-right: 1px solid var(--border-soft);
  padding: 18px 12px;
  background: #f7f7f7;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
}

.nav-links {
  margin-top: 18px;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}

.nav-item--bottom {
  margin-top: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  font-size: 16px;
}

.nav-item:hover {
  background: #ececec;
  color: #101010;
}

.nav-item.active {
  background: #e9e9e9;
  color: #101010;
  font-weight: 700;
}


.nav-item--disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

.content {
  flex: 1;
  border: 0;
  border-radius: 0;
  padding: 24px 28px;
  background: #f6f6f6;
  box-shadow: none;
}

.content-header {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(120px, 1fr);
  align-items: end;
  margin-bottom: 10px;
  column-gap: 16px;
}

.content-page-title {
  margin: 0;
  letter-spacing: -0.02em;
  text-align: center;
  font-size: 20px;
}

.selected-app-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.selected-app-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.selected-app-switcher {
  min-width: 260px;
  max-width: 420px;
  height: 38px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
}

.app-nav-title {
  margin-top: 10px;
}


.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
  margin-left: auto;
}

.dashboard-page .content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dashboard-page .content-header h1 {
  margin: 0;
}

.step-indicator {
  font-size: 0.7em;
  font-weight: 600;
  color: var(--text-muted);
}

.user-profile-link {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text);
  box-shadow: none;
}

.logout-btn {
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text);
  box-shadow: none;
  font-weight: 600;
  padding: 0 16px;
}

.user-profile-link:hover,
.logout-btn:hover {
  background: #f2f2f2;
}

.user-menu-icon {
  font-size: 20px;
}

.profile-panel {
  max-width: 520px;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border-soft);
  padding: 12px 0;
}

.profile-row:last-child {
  border-bottom: 0;
}

.profile-label {
  margin: 0;
  font-weight: 600;
  color: var(--muted);
}

.profile-value {
  margin: 0;
  text-align: left;
  word-break: break-word;
}

.profile-row-preferences {
  align-items: flex-start;
}

.profile-helper {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.profile-preferences-form {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.danger-zone {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid #f0b8c0;
  border-radius: var(--radius-lg);
  background: #fff1f4;
  display: grid;
  gap: 16px;
}

.danger-zone__header h2,
.danger-zone__copy h3 {
  margin: 0;
}

.danger-zone__header p,
.danger-zone__copy p {
  margin: 6px 0 0;
}

.danger-zone__card {
  border: 1px solid #efc8cf;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.7);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.danger-zone__copy {
  flex: 1;
}

.danger-zone__actions {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.danger-zone__button {
  min-width: 180px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 16, 16, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}

.modal-card {
  width: min(100%, 520px);
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-strong);
  padding: 24px;
}

.modal-card--danger {
  border: 1px solid #f0b8c0;
}

.modal-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.modal-card__close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
}

.modal-card__body {
  margin: 16px 0 12px;
}

.modal-card__label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.modal-card__input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font: inherit;
}

.modal-card__actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}


.profile-email-form {
  min-width: 360px;
}

.profile-email-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-email-input {
  min-width: 340px;
}

.profile-email-edit {
  border: 1px solid var(--border-soft);
  background: #fff;
}


.github-panel {
  min-height: 420px;
  display: grid;
  gap: 18px;
}

.github-or-layout {
  padding: 6px 0;
  background: transparent;
}

.github-section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 12px 0;
}

.github-section-divider::before,
.github-section-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--border-soft);
}

.github-section-divider span {
  margin: 0 18px;
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
}

.github-section {
  padding: 0;
  background: transparent;
}

.github-section h2,
.github-section h3 {
  margin-top: 0;
}

.github-flow-card {
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

.github-flow-card--new {
  border-left: 4px solid #2f6feb;
}

.github-flow-card--existing {
  border-left: 4px solid #1a7f37;
}

.github-flow-card__hint {
  margin-top: -4px;
  margin-bottom: 14px;
}

.github-create-form {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.github-create-form-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
  flex: 1 1 640px;
}

.github-create-field {
  display: grid;
  gap: 6px;
  align-content: start;
}

.github-field-label {
  display: block;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.github-create-form-fields .selected-app-switcher,
.github-create-form-fields .github-new-repo-name {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.github-connect-empty {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.github-connect-empty h2 {
  margin: 0;
  line-height: 1.4;
}

.github-connect-empty-copy {
  display: grid;
  gap: 0;
}

.github-connect-empty-copy h3,
.github-connect-empty-copy p {
  margin: 0;
}

.github-template-note {
  margin: 0;
  grid-column: 1 / span 2;
  font-size: 13px;
}

.github-repo-link {
  color: #243778;
  text-decoration: none;
  font-weight: 600;
}

.github-repo-link:hover {
  text-decoration: none;
}


.overview-top-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.deploy-row {
  margin-top: 0;
  align-items: center;
  justify-content: flex-end;
}

.deploy-status {
  margin: 0;
  font-size: 14px;
}

.deploy-initiated-message {
  margin-top: 12px;
  margin-bottom: 0;
  color: var(--success);
  font-weight: 600;
}

.app-toast-container {
  position: fixed;
  left: 50%;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(560px, calc(100vw - 32px));
  transform: translateX(-50%) translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}

.app-toast-container.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.app-toast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #8dd8a3;
  background: #eaf9ee;
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.12);
}

.app-toast--success {
  color: #166534;
  border-color: #86efac;
  background: #dcfce7;
}

.app-toast--warning,
.app-toast--danger {
  color: #b91c1c;
  border-color: #fca5a5;
  background: #fee2e2;
}

.app-toast__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  font-size: 16px;
  line-height: 1;
}

.app-toast__spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(22, 101, 52, 0.35);
  border-top-color: #166534;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.app-toast__message {
  font-size: 14px;
  font-weight: 600;
}

.deployments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.deployments-header h3 {
  margin: 0;
}

.deployments-header-actions {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.deploy-repo-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  max-width: 320px;
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deploy-repo-name__icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  line-height: 1;
}

.deploy-repo-name__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.deploy-repo-name__text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.deploy-branch-select {
  min-width: 180px;
  height: 40px;
}

.env-variable-item {
  grid-template-columns: 160px 1fr;
  align-items: start;
}

.env-variable-value {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.tabs {
  margin-top: 14px;
  display: inline-flex;
  gap: 8px;
  padding: 7px;
  background: #f1f1f1;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
}

.tab {
  padding: 9px 14px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 999px;
  font-weight: 500;
}

.tab.active {
  color: var(--text);
  background: #ffffff;
  box-shadow: none;
  font-weight: 700;
}

.panel {
  margin-top: 20px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 20px;
  box-shadow: none;
}

.panel h2,
.panel h3 {
  margin-top: 0;
}

.app-name {
  color: #243778;
  font-weight: 700;
  text-decoration: none;
}

.app-name:hover {
  text-decoration: none;
}

.muted {
  color: var(--muted);
  margin: 6px 0 0;
}

.pill {
  border: 1px solid #e4d7a8;
  background: #fff8dd;
  font-size: 13px;
  border-radius: 999px;
  padding: 5px 10px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px 24px;
}

.overview-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fbfcff;
  border: 1px solid var(--border-soft);
}

.label { color: var(--muted); }

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.loading-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
  animation: pulse 1.2s ease-in-out infinite;
}

.status-tick {
  color: var(--success);
  font-weight: 700;
  line-height: 1;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

a.primary,
a.secondary,
button.primary,
button.secondary {
  text-decoration: none;
}

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #111111;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary:hover {
  transform: translateY(-1px);
  box-shadow: none;
}

.github-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #1f2328;
  border-radius: 12px;
  background: linear-gradient(180deg, #24292f 0%, #1b1f24 100%);
  color: #ffffff;
  padding: 11px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(27, 31, 36, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.github-login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(27, 31, 36, 0.4);
  filter: brightness(1.05);
}

.github-login-btn:focus-visible {
  outline: 3px solid rgba(47, 129, 247, 0.55);
  outline-offset: 2px;
}

.github-login-btn__icon {
  width: 18px;
  height: 18px;
}

.secondary {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: #1f1f1f;
  font-weight: 600;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

a.secondary {
  text-decoration: none;
}

.secondary:hover {
  transform: translateY(-1px);
  border-color: #bcbcbc;
  box-shadow: none;
}

.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #b42318;
  border-radius: 10px;
  background: linear-gradient(180deg, #d92d20 0%, #b42318 100%);
  color: #ffffff;
  font-weight: 700;
  padding: 10px 16px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(180, 35, 24, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(180, 35, 24, 0.24);
  filter: brightness(1.03);
}

.danger:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: none;
}

.primary:disabled {
  opacity: 0.8;
  cursor: wait;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.full { width: 100%; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hidden { display: none !important; }

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.modal {
  width: min(450px, 92vw);
  background: white;
  border-radius: 16px;
  padding: 18px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-strong);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.icon-btn {
  border: none;
  background: #f3f5fa;
  border-radius: 10px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 14px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  margin-top: 4px;
  font-size: 14px;
  color: #3f4a66;
}

input,
select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fdfefe;
}

input:focus,
select:focus {
  border-color: #90a7ff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 111, 247, 0.15);
}

.error {
  color: var(--danger);
  margin: 0;
}


.prerequisites-section {
  margin-top: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: #fbfcff;
  padding: 14px;
}


.overview-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.prerequisites-list {
  margin: 10px 0 18px;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.prereq-command {
  margin: 8px 0 0;
  padding: 8px 10px;
  background: #0f1730;
  color: #f5f7ff;
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre-wrap;
  font-size: 12px;
}


.create-app-layout {
  display: grid;
  grid-template-columns: 1fr;
}

.create-app-layout--plain {
  margin-top: 20px;
}

.create-step-back {
  justify-self: start;
  margin-bottom: 0;
}

.create-step-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.create-step-header-row h3 {
  margin: 0;
}

.create-prerequisites {
  margin: 12px 0 0;
  padding: 12px;
}

.create-prerequisites h4 {
  margin: 0;
}

.create-app-form {
  gap: 16px;
}


.provision-status-list {
  margin: 12px 0 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.provision-status-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 14px;
}

.provision-status-icon {
  line-height: 1.2;
}

.provision-status-item--success {
  color: var(--success);
}

.provision-status-item--error {
  color: var(--danger);
}

.provision-status-item--muted,
.provision-status-item--running {
  color: var(--muted);
}

.provision-status-item--info {
  color: #000;
}

.create-success-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #4f9f68;
  background: #e7f8ec;
  color: #000;
  font-weight: 600;
  font-size: 14px;
}

.create-success-icon {
  color: var(--success);
  margin-right: 6px;
}

.create-success-note a {
  font-weight: 600;
}

.create-step {
  padding: 18px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--panel-muted);
}

.create-grid {
  display: grid;
  grid-template-columns: minmax(160px, 1.1fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr) minmax(210px, 1.3fr);
  gap: 12px;
  margin: 12px 0 14px;
  align-items: start;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-group label {
  margin-top: 0;
}

.field-group-small {
  max-width: 180px;
}

.create-step .primary {
  width: fit-content;
}

.primary.is-disabled {
  opacity: 0.6;
  pointer-events: none;
  cursor: not-allowed;
}

.create-default-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}


.create-step.is-inactive {
  opacity: 0.62;
  background: #f4f7ff;
}

.create-step.is-complete {
  opacity: 1;
  background: #eefaf1;
  border-color: #bde6c9;
}

#create-step-1.is-complete h3 {
  color: var(--muted);
}

.create-step.is-inactive input,
.create-step.is-inactive select,
.create-step.is-inactive button {
  pointer-events: none;
}

.create-step.is-inactive .allow-while-locked {
  pointer-events: auto;
}

#create-step-1.is-inactive button:disabled,
#create-step-1.is-inactive input:disabled,
#create-step-1.is-inactive select:disabled {
  cursor: not-allowed;
  filter: grayscale(0.2);
}

#create-step-2 .field-group {
  max-width: 520px;
}

.create-step-with-prerequisites {
  display: grid;
  gap: 8px;
}

.create-step-2-columns {
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(260px, 1fr);
  gap: 18px;
  align-items: start;
}

.create-step-2-form-column {
  display: grid;
  gap: 10px;
}

#create-step-2 .primary {
  margin-top: 12px;
}

@media (max-width: 900px) {
  .overview-top-row {
    align-items: stretch;
  }

  .deploy-row {
    justify-content: flex-start;
  }

  .create-step-2-columns {
    grid-template-columns: 1fr;
  }
  .github-create-form-fields {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .github-create-form .primary {
    width: 100%;
  }
}


.docs-layout {
  max-width: 960px;
}

.docs-toc ol {
  margin: 8px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.docs-toc a {
  color: #243778;
  text-decoration: none;
}

.docs-toc a:hover {
  text-decoration: underline;
}

.docs-section {
  margin-top: 18px;
}

.docs-section p {
  margin: 8px 0 0;
}
.overview-tabs {
  margin-top: 22px;
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border-soft);
  background: var(--panel-muted);
  border-radius: 999px;
}

.overview-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 9px 14px;
  cursor: pointer;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
}

.overview-tab.active {
  color: var(--text);
  background: #fff;
  box-shadow: 0 6px 12px rgba(38, 56, 98, 0.12);
  font-weight: 700;
}

.build-history-section {
  margin-top: 18px;
}

.build-logs-btn {
  min-width: 80px;
}

.build-logs-modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  z-index: 300;
  padding: 24px;
  align-items: center;
  justify-content: center;
}

.build-logs-modal {
  width: min(1200px, 96vw);
  height: min(86vh, 900px);
  max-height: calc(100vh - 48px);
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-strong);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.build-logs-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.build-logs-modal__header h2 {
  margin: 0;
}

.build-logs-modal__meta {
  margin: 0;
}

.build-logs-modal__content {
  margin: 0;
  flex: 1;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: #1f2937;
  color: #f3f4f6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.45;
  padding: 14px;
}

.build-logs-page-content {
  margin: 0;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.84rem;
  line-height: 1.45;
  max-height: 62vh;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.build-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.build-history-header h3 {
  margin: 0;
}

.logs-section {
  margin-top: 22px;
  --logs-time-col: 150px;
  --logs-level-col: 90px;
  --logs-copy-col: 76px;
}


.logs-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.logs-toolbar .input {
  flex: 1;
}

.logs-filter-bar {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
}

.logs-filter-bar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.logs-list-header {
  display: grid;
  grid-template-columns: var(--logs-time-col) minmax(0, 1fr) var(--logs-level-col) var(--logs-copy-col);
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  padding: 0 14px 6px;
  align-items: center;
}

.logs-list-header-spacer {
  width: var(--logs-copy-col);
}
.logs-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.log-item {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: #fcfdff;
  padding: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--logs-copy-col);
  gap: 8px;
  align-items: start;
}

.log-summary {
  width: 100%;
  border: none;
  background: transparent;
  padding: 6px;
  display: grid;
  grid-template-columns: var(--logs-time-col) minmax(0, 1fr) var(--logs-level-col);
  gap: 10px;
  text-align: left;
  cursor: pointer;
  vertical-align: top;
}

.log-time,
.log-severity {
  color: var(--muted);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
}

.log-time {
  white-space: nowrap;
}

.log-message {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
  min-width: 0;
  max-width: 100%;
}

 .log-details {
  margin: 8px 0 0;
  grid-column: 1 / -1;
  background: #13192d;
  color: #e5e7eb;
  border-radius: 8px;
  padding: 10px;
  max-height: 260px;
  overflow: auto;
  font-size: 12px;
}


.command-block {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.copy-command-btn,
.copy-log-btn {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  padding: 6px 10px;
  margin-left: 0;
  vertical-align: top;
}

.copy-command-btn {
  margin: 0;
}

.command-block .prereq-command {
  width: 100%;
}

.command-block--assign-owner {
  position: relative;
  align-items: stretch;
}

.command-block--assign-owner .copy-command-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
}

.command-block--assign-owner .prereq-command {
  padding-top: 44px;
}

.stats-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 16px;
  box-shadow: none;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
  animation: fadeUp 420ms ease both;
  animation-delay: var(--delay, 0ms);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: none;
}

.stat-label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.stat-value {
  margin: 10px 0 0;
  font-size: 26px;
  font-weight: 700;
  color: #111111;
}

.dashboard-panel {
  animation: fadeUp 560ms ease both;
  animation-delay: 120ms;
}

.apps-table tbody tr {
  animation: fadeUp 300ms ease both;
  animation-delay: var(--row-delay, 0ms);
}

.apps-table tbody tr:hover {
  background: #f6f9ff;
}

.stats-skeleton {
  margin-top: 18px;
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.skeleton-card {
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 16px;
}

.skeleton {
  border-radius: 8px;
  background: #e7eef9;
}

.skeleton-label {
  width: 46%;
  height: 12px;
}

.skeleton-value {
  margin-top: 14px;
  width: 72%;
  height: 30px;
}

.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.7) 45%, transparent 100%);
  animation: shimmer 1.35s linear infinite;
}

body.dashboard-page.loading .stats-grid {
  display: none;
}

body.dashboard-page.loading .stats-skeleton {
  display: grid;
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
}

.apps-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.apps-table th,
.apps-table td {
  text-align: left;
  padding: 12px 12px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
}

.apps-table th {
  color: var(--muted);
  font-weight: 600;
  background: #f5f5f5;
}


.app-actions-cell {
  text-align: center;
  width: 70px;
}

.delete-app-btn {
  color: #d11a2a;
  background: #fff0f2;
  border: 1px solid #ffc2cb;
}

.delete-app-btn:hover {
  color: #b40f1d;
  background: #ffe4e9;
}

.delete-app-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cost-section {
  margin-top: 18px;
}

.cost-stats-grid {
  margin: 8px 0 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.app-overview-page .content {
  padding: 20px 24px;
}

.app-overview-page .panel {
  margin-top: 14px;
  padding: 14px;
}

.app-overview-page .tabs {
  margin-top: 0;
  padding: 5px;
}

.app-overview-page .deploy-row {
  margin-left: auto;
}

.app-overview-page .tab {
  padding: 7px 12px;
}

.app-overview-page .overview-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
}

.app-overview-page .overview-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 110px;
  padding: 14px 16px;
  border: 1px solid #dce5f8;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  box-shadow: 0 8px 20px rgba(35, 55, 120, 0.08);
}

.app-overview-page .overview-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(35, 55, 120, 0.12);
  border-color: #c8d7fa;
}

.app-overview-page .overview-item .label {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.app-overview-page .overview-item > :not(.label) {
  margin: 0;
  font-size: 15px;
  color: var(--text);
  font-weight: 600;
  line-height: 1.4;
}

.app-overview-page .overview-tabs {
  margin-top: 14px;
}

.app-overview-page .logs-section,
.app-overview-page .build-history-section,
.app-overview-page .cost-section {
  margin-top: 12px;
}

.app-overview-page .logs-list {
  gap: 8px;
}

.app-overview-page .log-item {
  padding: 6px;
}

.app-overview-page .log-summary {
  padding: 4px;
  grid-template-columns: var(--logs-time-col) minmax(0, 1fr) var(--logs-level-col);
}

.app-overview-page .apps-table th,
.app-overview-page .apps-table td {
  padding: 9px 10px;
}

@media (max-width: 1280px) {
  .app-overview-page .overview-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 1100px) {
  .layout {
    padding: 12px;
    gap: 12px;
  }

  .sidebar {
    width: 220px;
  }

  .content {
    padding: 20px;
  }
}

@media (max-width: 900px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .create-app-layout {
    grid-template-columns: 1fr;
  }

  .create-grid {
    grid-template-columns: 1fr;
  }

  .field-group-small {
    max-width: none;
  }

  .create-step .primary {
    width: 100%;
  }

  .overview-item {
    grid-template-columns: 130px 1fr;
  }

  .log-summary {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .copy-log-btn {
    margin: 8px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

.sidebar-user {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

.sidebar-user-name {
  font-weight: 600;
  margin: 4px 0 12px;
  word-break: break-word;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-page-elegant {
  background:
    radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.18), transparent 36%),
    radial-gradient(circle at 100% 100%, rgba(59, 130, 246, 0.16), transparent 38%),
    linear-gradient(165deg, #eef2ff 0%, #f8faff 45%, #eef4ff 100%);
}


.auth-page-login {
  min-height: 100vh;
  padding: 24px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}


.auth-shell.auth-shell--login {
  width: min(520px, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  grid-template-columns: none;
}

.auth-card--login {
  width: 100%;
  max-width: 480px;
  padding: 40px 36px;
  border-radius: 22px;
  border: 1px solid rgba(194, 208, 246, 0.9);
  box-shadow: 0 30px 54px rgba(31, 61, 131, 0.18);
}

.auth-card--login .muted {
  margin-top: 12px;
  line-height: 1.55;
}

.auth-shell {
  width: min(1020px, 100%);
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(360px, 440px);
  gap: 20px;
  align-items: stretch;
}

.auth-showcase {
  border: 1px solid rgba(131, 149, 255, 0.24);
  border-radius: 24px;
  padding: 34px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.85), rgba(240, 246, 255, 0.9));
  box-shadow: 0 24px 45px rgba(56, 83, 154, 0.14);
}

.auth-showcase h1 {
  margin: 8px 0 12px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #1d2f63;
}

.auth-kicker,
.auth-eyebrow {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: #4f6ff7;
}

.auth-highlights {
  margin: 22px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: #304275;
}

.auth-card {
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-soft);
}

.auth-card-elevated {
  align-self: center;
  border: 1px solid rgba(212, 223, 248, 0.95);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 28px 44px rgba(50, 78, 147, 0.16);
}

.auth-card-elevated h2 {
  margin: 8px 0 0;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #1c2d61;
}

.auth-form {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.auth-form input {
  width: 100%;
}

.auth-switch {
  margin-top: 16px;
  text-align: center;
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-showcase {
    padding: 24px;
  }

  .auth-shell--login {
    min-height: auto;
  }

  .auth-card--login {
    padding: 30px 24px;
  }
}

.subdomain-sample-url {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

.field-group-subdomain {
  min-width: 0;
}

.create-grid .field-group-small {
  max-width: none;
}

.selected-github-repo-display {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 2px;
  color: var(--text);
  font-weight: 500;
}

.selected-github-repo-display__icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  line-height: 1;
}

.selected-github-repo-display__icon svg {
  width: 100%;
  height: 100%;
}

.selected-github-repo-display__text {
  min-width: 0;
  overflow-wrap: anywhere;
}


/* Modern theme enhancements */
:root {
  --teal: #11b99b;
  --teal-soft: #dff7f2;
}

.sidebar-brand {
  margin: 2px 8px 16px;
}

.sidebar-logo {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: #111;
}

.sidebar-tag {
  display: none;
}

.sidebar-section-title {
  margin: 4px 12px 10px;
  color: #878787;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.sidebar {
  position: relative;
  overflow: hidden;
}

.sidebar::before {
  display: none;
}

.content {
  animation: fadeUp 500ms ease both;
}

.content-header {
  padding-bottom: 14px;
  border-bottom: 1px solid #e3e3e3;
  margin-bottom: 14px;
}

.panel {
  animation: fadeUp 540ms ease both;
}

.workflow-strip {
  margin: 4px 0 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid #dcdcdc;
}

.workflow-step {
  position: relative;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #4a4a4a;
  background: #f8f8f8;
}

.workflow-step::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border-radius: 999px;
  font-size: 11px;
  background: #ececec;
  color: #606060;
}

.workflow-step.is-active {
  border-color: #bdbdbd;
  color: #1d1d1d;
  background: #efefef;
}

.workflow-action {
  margin-left: auto;
  border-radius: 999px;
  border-color: #8db2eb;
  color: #1a4f9f;
  background: #f5f9ff;
}

.overview-item,
.stat-card,
.log-item,
.create-step,
.prerequisites-section {
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.overview-item:hover,
.log-item:hover,
.create-step:hover,
.prerequisites-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(45, 66, 123, 0.12);
  border-color: #c9d8f5;
}

.provision-status-item {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e4eaf5;
  background: #fafcff;
}

.provision-status-item--success {
  background: #effcf6;
  border-color: #b9efd4;
}

.provision-status-item--error {
  background: #fff2f4;
  border-color: #f5cad1;
}

.create-success-note {
  animation: fadeUp 280ms ease both;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(244, 248, 255, 0.72);
  backdrop-filter: blur(2px);
  display: grid;
  place-items: center;
}

.loading-overlay.hidden {
  display: none;
}

.loading-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid #d6e4fc;
  border-radius: 999px;
  background: #ffffff;
  color: #24407b;
  box-shadow: 0 10px 26px rgba(38, 60, 112, 0.16);
  font-weight: 600;
}

.loading-badge .spinner {
  border-color: rgba(79, 111, 247, 0.3);
  border-top-color: #4f6ff7;
}

@media (max-width: 900px) {
  .workflow-action {
    margin-left: 0;
  }

  .sidebar-logo {
    font-size: 30px;
  }
}


#load-more-logs-btn {
  margin: 14px auto 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.logs-section {
  margin-top: 0;
}

.env-variable-form {
  display: grid;
  gap: 10px;
}

.env-variable-value-input {
  width: 100%;
  min-height: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.env-variable-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.app-links-list {
  display: grid;
  gap: 8px;
}

.app-links-list a,
.overview-item a {
  word-break: break-all;
}

.env-variable-value-input:disabled {
  background: #f6f7fb;
  color: #3f4a66;
  cursor: not-allowed;
}

.app-settings-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  margin-bottom: 20px;
}

.settings-danger-bar {
  background: #fde8eb;
  border: 1px solid #f6c8ce;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.github-controls-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.github-installation-select {
  min-width: 280px;
}

.github-repo-search {
  min-width: 260px;
}

.github-panel--flat {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}


.github-repo-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}


.status-error {
  color: #b3261e;
}
