:root {
  --bg:     #ffffff;
  --bg2:    #f5f5f7;
  --bg3:    #e8e8ed;
  --text:   #1d1d1f;
  --text2:  #6e6e73;
  --text3:  #86868b;
  --accent: #0071e3;
  --border: #d2d2d7;
  --green:  #34c759;
  --red:    #ff3b30;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; min-height: 100vh;
  display: flex; flex-direction: column; line-height: 1.6;
}

/* ── NAV ─────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,.08);
  height: 52px; padding: 0 40px;
  display: flex; align-items: center; gap: 32px;
}
.nav-brand { font-size: 17px; font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.nav-brand span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--text2); text-decoration: none; font-size: .82rem; font-weight: 400; transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--text); color: #fff; padding: 7px 18px;
  border-radius: 980px; font-size: .82rem; font-weight: 500;
  text-decoration: none; transition: background .15s;
}
.nav-cta:hover { background: #333; }

/* ── MAIN LAYOUT ─────────────────────────────────── */
main {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 100px 24px 80px; gap: 100px;
}

/* ── BRAND COLUMN ────────────────────────────────── */
.brand-col {
  display: flex; flex-direction: column; gap: 28px; max-width: 380px;
}
.brand-tagline {
  font-size: 2rem; font-weight: 700; letter-spacing: -.035em;
  line-height: 1.15; color: var(--text);
}
.brand-tagline span { color: var(--accent); }
.brand-desc { font-size: .95rem; color: var(--text2); font-weight: 300; line-height: 1.7; }
.brand-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  font-size: .75rem; padding: 5px 13px; border-radius: 980px;
  border: 1px solid var(--border); color: var(--text2); background: var(--bg2);
}
.brand-stats {
  display: flex; gap: 28px; padding-top: 4px; border-top: 1px solid var(--border);
}
.brand-stat { display: flex; flex-direction: column; gap: 2px; }
.brand-stat-n { font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; }
.brand-stat-l { font-size: .72rem; color: var(--text3); }

/* ── CARD ─────────────────────────────────────────── */
.card {
  width: 100%; max-width: 400px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 20px; padding: 40px 36px;
  box-shadow: 0 4px 40px rgba(0,0,0,.06);
}
.card-eyebrow {
  font-size: .73rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
  display: flex; align-items: center; gap: 6px;
}
.card-eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); animation: pulse 2s ease infinite;
}
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
.card h1 {
  font-size: 1.6rem; font-weight: 700; letter-spacing: -.03em;
  margin-bottom: 6px; line-height: 1.1;
}
.card-sub { font-size: .88rem; color: var(--text2); font-weight: 300; margin-bottom: 28px; }

/* ── SECTION LABEL ───────────────────────────────── */
.section-label {
  font-size: .72rem; color: var(--text3); text-transform: uppercase;
  letter-spacing: .08em; margin-bottom: 10px; font-weight: 500;
}

/* ── OAUTH BUTTONS ───────────────────────────────── */
.oauth-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.oauth-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; width: 100%; padding: 11px 18px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg2);
  color: var(--text); font-family: inherit; font-size: .875rem; font-weight: 500;
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .1s;
}
.oauth-btn:hover { background: var(--bg3); border-color: #b8b8bd; transform: translateY(-1px); }
.oauth-btn:active { transform: translateY(0); }
.oauth-btn.loading { opacity: .6; pointer-events: none; }

/* ── DIVIDER ─────────────────────────────────────── */
.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0; color: var(--text3); font-size: .78rem;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── TABS ─────────────────────────────────────────── */
.tabs {
  display: flex; border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; margin-bottom: 20px; background: var(--bg2);
}
.tab-btn {
  flex: 1; padding: 9px 12px; text-align: center;
  font-size: .82rem; font-weight: 500; cursor: pointer;
  color: var(--text3); background: transparent;
  transition: background .15s, color .15s; border: none; font-family: inherit;
}
.tab-btn.active { background: var(--bg); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.08); }

/* ── FORM ─────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: .8rem; font-weight: 500; color: var(--text2); margin-bottom: 6px; }
.form-group input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--bg2); color: var(--text);
  font-family: inherit; font-size: .875rem; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-group input::placeholder { color: var(--text3); }
.form-group input:focus {
  border-color: var(--accent); background: var(--bg);
  box-shadow: 0 0 0 3px rgba(0,113,227,.12);
}

.form-forgot { text-align: right; margin-top: -8px; margin-bottom: 14px; }
.form-forgot a { font-size: .78rem; color: var(--text3); text-decoration: none; transition: color .15s; }
.form-forgot a:hover { color: var(--accent); }

/* ── SUBMIT ──────────────────────────────────────── */
.submit-btn {
  width: 100%; padding: 13px; background: var(--text); color: #fff;
  border: none; border-radius: 980px; font-family: inherit;
  font-size: .9rem; font-weight: 500; cursor: pointer; margin-top: 6px;
  transition: background .15s, transform .1s;
}
.submit-btn:hover { background: #333; transform: translateY(-1px); }
.submit-btn:active { transform: translateY(0); }
.submit-btn:disabled { background: var(--bg3); color: var(--text3); cursor: default; transform: none; }

/* ── MESSAGES ─────────────────────────────────────── */
.msg { display: none; margin-top: 12px; padding: 10px 14px; border-radius: 10px; font-size: .82rem; }
.msg.success { background: rgba(52,199,89,.08); color: #1a7f37; border: 1px solid rgba(52,199,89,.25); display: block; }
.msg.error   { background: rgba(255,59,48,.06); color: var(--red); border: 1px solid rgba(255,59,48,.2); display: block; }

/* ── CARD FOOTER ─────────────────────────────────── */
.card-footer { margin-top: 20px; text-align: center; font-size: .74rem; color: var(--text3); line-height: 1.6; }
.card-footer a { color: var(--accent); text-decoration: none; }
.card-footer a:hover { text-decoration: underline; }

/* ── DASHBOARD ───────────────────────────────────── */
#dashboard-screen { display: flex; flex-direction: column; min-height: 100vh; }
.dashboard-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 56px; background: rgba(255,255,255,.9);
  backdrop-filter: blur(20px); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.dashboard-main { padding: 48px 56px; flex: 1; }
.dashboard-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 36px; }
.dashboard-header h2 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }

.search-input {
  padding: 9px 16px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 980px; color: var(--text); width: 240px; font-size: 13px;
  font-family: inherit; outline: none; transition: border-color .15s;
}
.search-input:focus { border-color: var(--accent); }

.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px;
}

.btn-primary {
  padding: 9px 20px; background: var(--accent); border: none; border-radius: 980px;
  color: #fff; font-size: .85rem; font-weight: 500; cursor: pointer; font-family: inherit;
  transition: background .15s, transform .1s;
}
.btn-primary:hover { background: #0064cc; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  padding: 8px 18px; background: transparent; border: 1px solid var(--border);
  border-radius: 980px; color: var(--text2); font-size: .82rem;
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.btn-ghost:hover { border-color: var(--text); color: var(--text); }

.user-menu { display: flex; align-items: center; gap: 12px; }
.user-name { font-size: .85rem; color: var(--text2); }

/* ── PROJECT CARDS ───────────────────────────────── */
.project-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; cursor: pointer; transition: all .25s;
}
.project-card:hover { border-color: #b8b8bd; transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,.08); }
.project-thumb {
  height: 140px; background: var(--bg2);
  display: flex; align-items: center; justify-content: center; font-size: 48px; color: var(--bg3);
}
.project-thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-info { padding: 14px 16px; }
.project-info h4 { font-size: .875rem; font-weight: 600; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-info .proj-date { color: var(--text3); font-size: .75rem; }
.project-actions { display: flex; justify-content: flex-end; padding: 0 12px 12px; gap: 8px; }
.btn-open { padding: 6px 14px; background: var(--text); color: #fff; border: none; border-radius: 980px; font-size: .75rem; font-weight: 500; cursor: pointer; font-family: inherit; transition: background .15s; }
.btn-open:hover { background: #333; }
.btn-delete { padding: 6px 10px; background: transparent; border: 1px solid var(--border); border-radius: 980px; color: var(--text3); font-size: .75rem; cursor: pointer; font-family: inherit; transition: all .15s; }
.btn-delete:hover { border-color: var(--red); color: var(--red); }

.empty-state { grid-column: 1/-1; text-align: center; padding: 80px 0; color: var(--text3); }
.empty-icon { font-size: 64px; margin-bottom: 16px; opacity: .25; }
.empty-state h3 { font-size: 18px; margin-bottom: 8px; color: var(--text2); font-weight: 500; }

/* ── MODAL ───────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.25);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
  backdrop-filter: blur(4px);
}
.modal-content {
  background: var(--bg); border: 1px solid var(--border); border-radius: 20px;
  padding: 32px 36px; width: 420px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.12);
}
.modal-content h3 { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.modal-content input, .modal-content textarea {
  padding: 10px 14px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-family: inherit; font-size: .875rem; width: 100%; outline: none;
}
.modal-content input:focus, .modal-content textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,113,227,.1); }
.modal-content textarea { height: 80px; resize: none; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }

/* ── FOOTER ──────────────────────────────────────── */
footer { text-align: center; padding: 24px; font-size: .75rem; color: var(--text3); border-top: 1px solid var(--border); }
footer a { color: var(--text3); text-decoration: none; }
footer a:hover { color: var(--text2); }

@media (max-width: 860px) { .brand-col { display: none; } main { padding: 72px 16px 40px; } }
@media (max-width: 680px) { nav { padding: 0 20px; } .nav-links { display: none; } }
