:root {
  --terracotta: #D9713C;
  --terracotta-dark: #B85A2C;
  --cream: #FFF8F1;
  --cream-2: #F4E9DC;
  --border: #E3D5C4;
  --charcoal: #2A2118;
  --text-muted: #7A6F62;
  --green: #5B7A63;
  --red: #B3453A;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream-2);
  color: var(--charcoal);
}

a { color: var(--terracotta-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 20px;
  color: var(--charcoal);
}
.brand img { height: 36px; }

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 8px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.btn-primary { background: var(--terracotta); color: var(--cream); }
.btn-primary:hover { background: var(--terracotta-dark); }
.btn-ghost { background: transparent; color: var(--charcoal); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--cream-2); }
.btn-block { width: 100%; }

.auth-wrap {
  min-height: calc(100vh - 74px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px;
  width: 100%;
  max-width: 400px;
}

.card h1 { font-size: 22px; margin: 0 0 6px; }
.card .sub { color: var(--text-muted); font-size: 14px; margin: 0 0 24px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  color: var(--charcoal);
}
.field input:focus, .field select:focus { outline: 2px solid var(--terracotta); }

.error-box {
  background: #FBEAE7;
  border: 1px solid var(--red);
  color: var(--red);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.switch-line { margin-top: 20px; font-size: 14px; text-align: center; color: var(--text-muted); }

.dash-wrap { padding: 32px; max-width: 960px; margin: 0 auto; }
.dash-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.dash-header h1 { font-size: 22px; margin: 0; }

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.project-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}
.project-card h3 { margin: 0 0 6px; font-size: 16px; }
.project-card .status {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--cream-2);
  color: var(--terracotta-dark);
  margin-top: 8px;
}
.empty-state { color: var(--text-muted); text-align: center; padding: 60px 20px; }

.modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(42,33,24,0.4);
  align-items: center; justify-content: center;
  z-index: 50;
}
.modal-backdrop.open { display: flex; }
.modal { background: var(--cream); border-radius: 14px; padding: 28px; width: 100%; max-width: 380px; }
