/* ============================================================
   DESIGN TOKENS — Septeo Hospitality / Listo
   ============================================================ */
:root {
  --brand:        #e84418;
  --navy:         #1d2443;
  --bg:           #eef1f7;
  --surface:      #ffffff;
  --border:       #e2e6ee;
  --text:         #1d2443;
  --text-muted:   #8b91a1;
  --error-bg:     #fff0ec;
  --error-color:  #e84418;
  --shadow-card:  0 1px 3px rgba(0,0,0,0.07), 0 2px 8px rgba(0,0,0,0.04);
  --radius-sm:    6px;
  --radius-md:    10px;
  --radius-lg:    14px;
}

/* ============================================================
   BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
}

#app { min-height: 100vh; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  background: var(--navy);
  padding: 0 1.5rem;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--brand);
  border-radius: 7px;
  color: white;
  font-size: 15px;
  flex-shrink: 0;
  line-height: 1;
}

.brand-accent { color: var(--brand); }

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-username {
  color: rgba(255,255,255,0.8);
  font-size: 0.875rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
button { font-family: inherit; cursor: pointer; }

.btn-primary {
  background: var(--navy);
  color: white;
  border: none;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-primary:hover { background: #141a32; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-full { width: 100%; padding: 0.65rem 1.25rem; }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}
.btn-secondary:hover { background: var(--bg); border-color: #c5cad6; }

.btn-outline-white {
  background: transparent;
  color: white;
  border: 1.5px solid rgba(255,255,255,0.45);
  padding: 0.38rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
}

.btn-copy {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-copy:hover { background: #e2e6f0; }

/* ============================================================
   FORMS
   ============================================================ */
label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

input[type="text"],
input[type="password"],
select {
  display: block;
  width: 100%;
  padding: 0.55rem 0.75rem;
  margin-top: 0.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(29,36,67,0.09);
}

.error {
  color: var(--error-color);
  font-size: 0.84rem;
  margin-top: 0.9rem;
  padding: 0.6rem 0.85rem;
  background: var(--error-bg);
  border-radius: var(--radius-sm);
}

/* ============================================================
   LOGIN VIEW
   ============================================================ */
#login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 2rem;
}

.login-brand .brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 17px;
}

.login-brand-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
}

.login-card h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.page-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

/* ============================================================
   PROJECT CARDS
   ============================================================ */
#repo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.project-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.git-url-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.git-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.git-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.77rem;
  color: var(--text-muted);
  background: var(--bg);
  padding: 0.22rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  display: block;
}

.empty-state {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 2rem;
  text-align: center;
}

/* ============================================================
   DEPLOYMENT RESULT
   ============================================================ */
.result-card {
  margin-top: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.result-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

pre {
  background: var(--bg);
  padding: 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.8rem;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  border: 1px solid var(--border);
}

.modal h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.modal-placeholder {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.875rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ============================================================
   DEPLOY FORM
   ============================================================ */
.deploy-env-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.deploy-env-fieldset legend {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0 0.25rem;
  color: var(--text);
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0;
  margin-right: 1.25rem;
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
}

.deploy-field {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}
