:root {
  color-scheme: light;
  font-family: "DM Sans", sans-serif;
  color: #2f261f;
  background: #f4efe7;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at top right, #ead9c3 0, transparent 34%), #f4efe7; }
button, input { font: inherit; }

.app-shell { min-height: 100vh; }
.loading-card, .state-card { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 32px; text-align: center; }
.state-card h1 { margin: 0; font-family: "Playfair Display", serif; font-size: clamp(2rem, 6vw, 3.5rem); }
.state-card p { max-width: 560px; margin: 0; color: #6d5f53; line-height: 1.7; }
.state-card code { max-width: 720px; padding: 10px 14px; border-radius: 10px; background: #fff9f2; border: 1px solid #decdbb; overflow-wrap: anywhere; }

.brand-mark { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; background: #2f3a31; color: #fffaf2; font-weight: 800; letter-spacing: -0.04em; box-shadow: 0 12px 30px rgba(47, 58, 49, .2); }
.brand-mark--small { width: 40px; height: 40px; border-radius: 13px; box-shadow: none; }
.eyebrow { margin: 0 0 8px; color: #9c633d !important; font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

.button { border: 0; border-radius: 999px; padding: 12px 19px; background: #2f3a31; color: white; font-weight: 700; cursor: pointer; }
.button--disabled { opacity: .48; cursor: not-allowed; }

.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); }
.auth-intro { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: clamp(48px, 8vw, 120px); background: #2f3a31; color: #fffaf2; }
.auth-intro .eyebrow { margin-top: 32px; color: #d9ad88 !important; }
.auth-intro h1 { margin: 0; font-family: "Playfair Display", serif; font-size: clamp(3.2rem, 7vw, 6.6rem); line-height: .98; letter-spacing: -.055em; }
.auth-intro > p:last-child { max-width: 600px; margin: 28px 0 0; color: #d9d2c6; font-size: 1.05rem; line-height: 1.7; }
.auth-card { display: grid; place-items: center; padding: 32px; }
#clerk-sign-in { width: min(420px, 100%); }

.office-layout { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding: 26px 20px; background: #2f3a31; color: white; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; }
.sidebar-brand strong { font-family: "Playfair Display", serif; font-size: 1.25rem; }
.sidebar nav { display: grid; gap: 7px; }
.nav-item { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; color: #d8d4cc; text-decoration: none; font-weight: 600; }
.nav-item--active { background: rgba(255,255,255,.11); color: white; }
.nav-item--disabled { opacity: .48; }
.nav-item small { font-size: .62rem; font-weight: 500; }
.user-area { min-height: 40px; padding: 8px; }
.workspace { padding: clamp(30px, 5vw, 72px); }
.workspace-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; margin-bottom: 42px; }
.workspace-header h1 { margin: 0; font-family: "Playfair Display", serif; font-size: clamp(2.6rem, 6vw, 5rem); letter-spacing: -.045em; }
.workspace-header > div > p:last-child { margin: 12px 0 0; color: #74675c; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.project-card { min-height: 260px; display: flex; flex-direction: column; position: relative; padding: 24px; border: 1px solid #dfd2c3; border-radius: 24px; background: rgba(255,255,255,.76); box-shadow: 0 16px 50px rgba(75, 59, 43, .07); }
.project-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: #efe2d2; font-size: 1.35rem; }
.project-copy { margin-top: auto; }
.project-key { color: #9c633d; font-size: .72rem; font-weight: 800; letter-spacing: .12em; }
.project-card h2 { margin: 7px 0 10px; font-family: "Playfair Display", serif; font-size: 1.65rem; }
.project-card p { margin: 0; color: #75685d; line-height: 1.55; }
.project-status { position: absolute; top: 24px; right: 24px; padding: 6px 9px; border-radius: 999px; background: #e4ede3; color: #38543c; font-size: .66rem; font-weight: 800; }
.empty-state { grid-column: 1 / -1; padding: 50px; border: 1px dashed #cdbcaa; border-radius: 24px; text-align: center; }

@media (max-width: 980px) {
  .project-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-intro { min-height: 44vh; padding: 48px 28px; }
  .office-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; padding: 14px 18px; }
  .sidebar nav { display: none; }
  .sidebar-brand { padding: 0; }
  .workspace { padding: 28px 18px 48px; }
  .workspace-header { align-items: flex-end; }
  .project-grid { grid-template-columns: 1fr; }
}
