/* Salt Cella Design · Client Portal
   Brand: Chalk #F7F5F0 · Espresso charcoal #292825 · Soft clay #B18E7C · Olive #72745F (sparingly)
   Type: Playfair Display (headings) · Manrope (body) */
:root {
  --chalk: #F7F5F0;
  --white: #FFFFFF;
  --espresso: #292825;
  --text: #4A4B49;
  --muted: #6C6B67;
  --line: #EAE5DC;
  --fill: #EFEBE4;
  --input: #D3CCC1;
  --clay: #B18E7C;
  --clay-dark: #85614F;
  --clay-light: #C9A794;
  --clay-tint: #EFDFD6;
  --clay-ink: #7A5644;
  --olive-tint: #E4E5DC;
  --olive-ink: #4D4F3F;
  --danger: #8C3B2E;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 4px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--chalk); color: var(--espresso); font-family: var(--sans); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--clay-dark); }
a:hover { color: var(--espresso); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(34px, 5vw, 52px); }
h2 { font-size: clamp(24px, 3vw, 30px); }
h3 { font-size: 22px; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--clay-dark); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Layout */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap { padding: 0 18px; } }
.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); }
.row { display: flex; flex-wrap: wrap; gap: var(--gap, 16px); align-items: center; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 280px)), 1fr)); }
.split { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.split > .main { flex: 999 1 560px; min-width: 0; }
.split > .side { flex: 1 1 300px; min-width: 0; }
main { padding: 40px 0 72px; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.site-header .logo img { height: 38px; width: auto; }
.nav { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.nav a { color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 1px solid transparent; }
.nav a[aria-current="page"] { color: var(--espresso); border-bottom-color: var(--espresso); }
.nav a:hover { color: var(--espresso); }
.who { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--clay); color: var(--espresso); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; flex: none; }
.avatar.estie { background: var(--espresso); color: var(--chalk); }
.studio-header { background: var(--espresso); border-bottom: 0; }
.studio-header .nav a { color: #DCD5CA; }
.studio-header .nav a[aria-current="page"] { color: var(--chalk); border-bottom-color: var(--chalk); }
.studio-header .who, .studio-header .who a { color: var(--chalk); }
.studio-tag { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--clay-light); }

/* Hero */
.hero { background: var(--espresso); color: var(--chalk); }
.hero .wrap { padding-top: 56px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 12px; }
.hero p { max-width: 680px; opacity: .94; }
.hero-panel { background: var(--espresso); color: var(--chalk); border-radius: var(--radius); padding: 48px; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 640px) { .hero-panel { padding: 28px; } }
.eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hero .eyebrow, .hero-panel .eyebrow { color: var(--clay-light); }

/* Cards */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card.soft { background: var(--fill); border-color: transparent; }
.card.accent { border: 2px solid var(--clay); }
.card.tight { padding: 16px 20px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.xsmall { font-size: 13px; }
.text { color: var(--text); }
.prose p + p { margin-top: 12px; }
.prose { color: var(--text); white-space: normal; }

/* Status chips */
.chip { display: inline-block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 5px 11px; border-radius: 20px; white-space: nowrap; background: var(--fill); color: var(--text); font-weight: 600; }
.chip.clay { background: var(--clay-tint); color: var(--clay-ink); }
.chip.olive { background: var(--olive-tint); color: var(--olive-ink); }
.chip.dark { background: var(--espresso); color: var(--chalk); }
.chip.outline { background: transparent; border: 1px solid var(--input); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 2px; padding: 13px 24px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; text-decoration: none; cursor: pointer; background: var(--clay); color: var(--espresso); min-height: 44px; }
.btn:hover { background: var(--clay-light); color: var(--espresso); }
.btn.dark { background: var(--espresso); color: var(--chalk); }
.btn.dark:hover { background: #3a3935; color: var(--chalk); }
.btn.ghost { background: transparent; color: var(--espresso); border: 1px solid var(--espresso); }
.btn.ghost:hover { background: var(--fill); }
.btn.link { background: none; padding: 8px 0; min-height: 0; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 14px; color: var(--clay-dark); text-decoration: underline; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.small { padding: 9px 16px; min-height: 38px; }
.dl { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--espresso); background: none; border: 0; padding: 6px 0; cursor: pointer; text-decoration: underline; }
.icon-btn { background: none; border: 0; padding: 10px; cursor: pointer; color: var(--muted); border-radius: 2px; }
.icon-btn:hover { background: var(--fill); color: var(--espresso); }

/* Forms */
label { font-size: 14px; color: var(--text); }
.field { display: flex; flex-direction: column; gap: 6px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], textarea, select {
  padding: 12px 14px; border: 1px solid var(--input); border-radius: 2px; background: var(--white); width: 100%;
}
textarea { resize: vertical; min-height: 90px; }
.form-error { color: var(--danger); font-size: 14px; }
.form-ok { color: var(--olive-ink); font-size: 14px; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #F1EDE6; }
.list > li:last-child { border-bottom: 0; }
.list a { color: var(--espresso); text-decoration: none; }
.list a:hover { text-decoration: underline; }

/* Progress */
.progress { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); list-style: none; margin: 0; padding: 0; }
.progress li { display: flex; flex-direction: column; gap: 8px; }
.bar { height: 6px; border-radius: 3px; background: #DCD5CA; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--clay); }
.progress a { font-family: var(--serif); font-size: 21px; color: var(--espresso); text-decoration: none; line-height: 1.25; }

/* Item cards on phase pages */
.item-card { display: flex; flex-wrap: wrap; overflow: hidden; padding: 0; }
.item-card .thumb { flex: 0 0 240px; min-height: 180px; background: var(--fill) center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.item-card .body { flex: 1 1 380px; padding: 28px; display: flex; flex-direction: column; gap: 8px; }
.item-card.info { background: var(--fill); border-color: transparent; }

/* Gallery */
.gallery { display: grid; gap: 12px; }
.gallery img { width: 100%; height: auto; border-radius: var(--radius); background: var(--fill); border: 1px solid var(--line); }
.files { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.files li { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid #F1EDE6; }
.files li:last-child { border-bottom: 0; }
.files .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.files .name { overflow-wrap: anywhere; }
.fthumb { width: 48px; height: 48px; border-radius: 2px; background: var(--fill) center/cover no-repeat; flex: none; display: flex; align-items: center; justify-content: center; color: var(--muted); }

/* Dropzone */
.drop { border: 2px dashed var(--clay); border-radius: var(--radius); background: var(--white); padding: 36px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.drop.over { background: var(--clay-tint); }
.pbar { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; width: 100%; }
.pbar > span { display: block; height: 100%; background: var(--clay); width: 0; transition: width .2s; }

/* Comments */
.thread { display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 14px; }
.msg .bubble { flex: 1; min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.msg.draft .bubble { border-style: dashed; border-color: var(--clay); }
.msg .by { font-size: 13px; color: var(--muted); }
.msg .by strong { color: var(--espresso); font-weight: 600; }
.round { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: 6px; }

/* Tables (studio) */
.table-box { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 14px 20px; border-bottom: 1px solid var(--line); }
td { padding: 14px 20px; border-bottom: 1px solid #F1EDE6; vertical-align: top; }
tr:last-child td { border-bottom: 0; }

/* Misc */
.notice { background: var(--fill); border-radius: var(--radius); padding: 14px 16px; font-size: 14px; color: var(--text); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--espresso); color: var(--chalk); padding: 12px 20px; border-radius: 2px; font-size: 14px; z-index: 50; box-shadow: 0 6px 24px rgba(0,0,0,.18); max-width: calc(100% - 32px); }
.toast.error { background: var(--danger); }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); padding: 24px 0; text-align: center; font-size: 13px; color: var(--muted); letter-spacing: .08em; }
details > summary { cursor: pointer; }
details { border-top: 1px solid #F1EDE6; padding-top: 10px; }
.login { min-height: 100vh; display: flex; flex-wrap: wrap; }
.login .panel { flex: 1 1 460px; background: var(--espresso); color: var(--chalk); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-height: 320px; }
.login .panel a { color: var(--chalk); }
.login .form-side { flex: 1 1 460px; display: flex; align-items: center; justify-content: center; padding: 48px 28px; }
.login form { width: 100%; max-width: 380px; }
.lock { display: inline-flex; gap: 8px; align-items: center; justify-content: center; font-size: 14px; color: var(--text); background: var(--fill); padding: 12px; border-radius: 2px; }
