/* Mithraa Digital Client Portal — theme matched to mithraadigital.com */
:root {
  --red: #C81428;
  --red-dark: #8E0E1E;
  --red-tint: #FBE1E3;
  --cream: #FDF3EF;
  --blush: #FBE9E4;
  --card: #FFFFFF;
  --ink: #1C1210;
  --body: #4A3B37;
  --muted: #6B5650;
  --line: #F1DED8;
  --line-strong: #E6CFC8;
  --green: #2F6B45;
  --green-tint: #E3F4E8;
  --radius: 14px;
  --shadow-cta: 0 8px 20px rgba(200, 20, 40, 0.22);
  --font-display: 'Baloo 2', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
img, video { max-width: 100%; display: block; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.01em; line-height: 1.15; margin: 0; color: var(--ink); }
h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
h2 { font-size: clamp(24px, 3vw, 30px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0; }
.accent { color: var(--red); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); font: 600 14px/1 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--muted); color: var(--ink); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; box-shadow: var(--shadow-cta); }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn-approve { background: var(--green); border-color: var(--green); color: #fff; font-weight: 800; font-size: 15px; min-height: 50px; }
.btn-approve:hover { background: #24563a; color: #fff; }
.btn-changes { background: #fff; border-color: #C53030; color: #A12B2B; font-weight: 800; font-size: 15px; min-height: 50px; }
.btn-changes:hover { background: #FCE4E4; color: #A12B2B; border-color: #A12B2B; }
.btn-soft { background: var(--blush); border-color: var(--blush); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn-link { background: none; border: none; color: var(--red); padding: 0; min-height: 0; font-weight: 600; cursor: pointer; font: inherit; text-decoration: underline; }
.btn-danger { color: #A12B2B; border-color: #E3A3A3; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header { background: var(--cream); border-bottom: 1px solid var(--line); position: relative; z-index: 2; }
.wrap { max-width: 1400px; margin: 0 auto; padding: 0 16px; }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 116px; height: auto; }
.eyebrow { font-size: 11.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red-dark); }
.brand .eyebrow { border-left: 1px solid var(--line-strong); padding-left: 12px; }
.switcher { display: flex; align-items: center; gap: 8px; }
.switcher label { font-size: 13px; font-weight: 700; color: var(--muted); }
.spacer { flex: 1 1 auto; }
.user-chip { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--red-tint); color: var(--red-dark); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex: none; }
.user-chip .who { display: flex; flex-direction: column; line-height: 1.2; }
.user-chip .who strong { font-size: 14px; }
.user-chip .who span { font-size: 12px; color: var(--muted); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.tabs a { padding: 12px 2px 10px; font-size: 14px; font-weight: 700; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--ink); border-bottom-color: var(--red); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 13px; font-weight: 700; color: var(--ink); }
.input, select.input, textarea.input { width: 100%; min-height: 46px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 14px; font: 400 15px/1.4 var(--font-body); color: var(--ink); background: #fff; }
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px rgba(200, 20, 40, 0.15); }
.help { font-size: 12.5px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; min-height: 36px; }
.check input { width: 18px; height: 18px; accent-color: var(--red); }
.type-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.type-option { position: relative; }
.type-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.type-option span { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; font-weight: 700; }
.type-option span small { font-weight: 500; color: var(--muted); font-size: 12px; }
.type-option input:checked + span { border-color: var(--red); box-shadow: 0 0 0 2px var(--red); }
.type-option input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }

/* ---------- Layout ---------- */
.page { padding-top: 24px; padding-bottom: 64px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.page-head .titles { display: flex; flex-direction: column; gap: 4px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.split > .main { flex: 999 1 640px; min-width: 0; }
.split > .side { flex: 1 1 320px; min-width: 0; max-width: 440px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }

/* ---------- Flash ---------- */
.flash { border-radius: 12px; padding: 12px 16px; font-weight: 600; font-size: 14px; margin-bottom: 16px; border: 1px solid transparent; }
.flash-success { background: var(--green-tint); color: #1F4D31; border-color: #BFE3CB; }
.flash-error { background: #FCE4E4; color: #8A1F1F; border-color: #F2B6B6; }
.flash-info { background: var(--blush); color: var(--body); border-color: var(--line-strong); }

/* ---------- Pills & status ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--blush); color: var(--ink); white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
.badge-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; }

/* ---------- Stats & client cards ---------- */
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat strong { font-family: var(--font-display); font-size: 38px; font-weight: 800; line-height: 1; }
.stat span { font-size: 14px; font-weight: 600; color: var(--body); }
.client-card { display: flex; flex-direction: column; gap: 16px; }
.client-head { display: flex; align-items: center; gap: 12px; }
.logo-tile { width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex: none; }
.counters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.counters div { display: flex; flex-direction: column; }
.counters strong { font-size: 24px; font-weight: 800; font-family: var(--font-display); line-height: 1.1; }
.counters span { font-size: 12px; color: var(--muted); }

/* ---------- Calendar ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--body); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.month-nav { display: flex; align-items: center; gap: 8px; }
.cal-scroll { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.cal { min-width: 780px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: 10px 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--line); }
.cal-day { min-height: 128px; padding: 8px; border-right: 1px solid #F5E7E2; border-bottom: 1px solid #F5E7E2; display: flex; flex-direction: column; gap: 6px; }
.cal-day:nth-child(7n) { border-right: none; }
.cal-day.blank { background: #FBEEEA; }
.cal-day.today .daynum { background: var(--red); color: #fff; }
.daynum { align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--muted); min-width: 24px; height: 24px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.day-head { display: flex; align-items: center; justify-content: space-between; }
.add-link { font-size: 18px; line-height: 1; text-decoration: none; color: var(--muted); width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.add-link:hover { background: var(--blush); color: var(--red); }
.chip { display: flex; flex-direction: column; gap: 1px; border-radius: 8px; padding: 6px 8px; text-decoration: none; color: var(--ink); }
.chip:hover { color: var(--ink); filter: brightness(0.97); }
.chip .top { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.chip .ttl { font-size: 12px; color: var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Feed grid ---------- */
.ig-head { display: flex; align-items: center; gap: 10px; }
.ig-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
.ig-tile { aspect-ratio: 4 / 5; position: relative; overflow: hidden; display: block; background: #E9DCD7; color: #fff; text-decoration: none; }
.ig-tile img { width: 100%; height: 100%; object-fit: cover; }
.ig-tile .ph { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 8px; font-size: 12px; font-weight: 700; line-height: 1.25; }
.ig-tile .when { position: absolute; top: 6px; left: 6px; background: #fff; color: var(--ink); font-size: 10.5px; font-weight: 800; padding: 2px 6px; border-radius: 6px; }
.ig-tile .kind { position: absolute; top: 6px; right: 6px; background: rgba(28, 18, 16, 0.7); color: #fff; width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }

/* Phone agenda (replaces the month grid on small screens) */
.agenda { display: none; }
.agenda-day { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.agenda-day:last-child { border-bottom: none; }
.agenda-day .d { font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.agenda-day.today .d { color: var(--red); }
.agenda .chip { padding: 10px 12px; }
.agenda .chip .ttl { font-size: 14px; white-space: normal; }
.ig-empty { aspect-ratio: 4 / 5; background: #F5E7E2; }
.review-item { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.review-item:hover { border-color: var(--line-strong); background: #FFFBFA; color: var(--ink); }
.review-item .t { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.review-item strong { font-size: 14px; }
.review-item span { font-size: 12px; color: var(--muted); }

/* ---------- Post view ---------- */
.preview-col { flex: 1 1 360px; min-width: 0; max-width: 500px; }
.detail-col { flex: 999 1 420px; min-width: 0; }
.frame { width: 100%; margin: 0 auto; border-radius: 12px; overflow: hidden; background: #1C1210; position: relative; display: flex; align-items: center; justify-content: center; }
.frame img, .frame video { width: 100%; height: 100%; object-fit: contain; background: #1C1210; }
.frame.r916 { aspect-ratio: 9 / 16; max-width: 320px; }
.frame.r45 { aspect-ratio: 4 / 5; max-width: 440px; }
.slides .slide { display: none; width: 100%; height: 100%; }
.slides .slide.on { display: block; }
.flag-badge { position: absolute; top: 12px; left: 12px; background: #fff; color: #A12B2B; font-size: 12px; font-weight: 800; padding: 4px 8px; border-radius: 6px; z-index: 1; }
.slide-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.slide-tab { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: #fff; font-weight: 800; position: relative; cursor: pointer; color: var(--ink); font-family: var(--font-body); font-size: 14px; }
.slide-tab.on { background: var(--red); border-color: var(--red); color: #fff; }
.slide-tab .fdot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: #C53030; border: 1px solid #fff; }
.meta-label { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.caption { white-space: pre-line; }
.hashtags { color: var(--red-dark); font-weight: 500; }
.decision { display: flex; flex-wrap: wrap; gap: 10px; }
.decision .btn { flex: 1 1 180px; }
.comment { border-radius: 12px; padding: 10px 12px; background: var(--blush); display: flex; flex-direction: column; gap: 4px; }
.comment.client { background: var(--red-tint); }
.comment.system { background: transparent; border: 1px dashed var(--line-strong); }
.comment.system .body { font-style: italic; color: var(--body); }
.comment .head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.comment .head strong { font-weight: 800; }
.tag { font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #fff; color: var(--red-dark); border: 1px solid #F2B6BD; }
.vtag { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.comment .body { font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.tc-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tc-field { display: flex; gap: 6px; align-items: flex-end; }
.tc-field .field { flex: 1; }
.versions a { text-decoration: none; }
.notice-approved { background: var(--green-tint); border-radius: var(--radius); padding: 16px 20px; color: #1F4D31; }
.dropzone { border: 1px dashed #A9A9A0; border-radius: var(--radius); padding: 16px 20px; background: #fff; }
details summary { cursor: pointer; font-weight: 700; }

/* ---------- Shoots ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.step { border-radius: 12px; padding: 10px 12px; background: var(--blush); color: var(--muted); display: flex; flex-direction: column; }
.step.done { background: var(--red-tint); color: var(--red-dark); }
.step.now { background: var(--red); color: #fff; }
.step b { font-size: 12px; font-weight: 800; }
.step span { font-size: 14px; font-weight: 700; }
.props-list { list-style: none; margin: 0; padding: 0; }
.props-list form { margin: 0; }
.prop-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; background: none; border: none; padding: 4px 0; text-align: left; font: 400 14px/1.4 var(--font-body); color: var(--ink); cursor: pointer; }
.prop-btn .box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; flex: none; background: #fff; }
.prop-btn.done .box { background: var(--red); border-color: var(--red); }
.prop-btn.done .label { text-decoration: line-through; color: var(--muted); }
.script { white-space: pre-line; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.list td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: none; }

/* ---------- Guest (login) ---------- */
.guest { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; position: relative; overflow: hidden; }
.guest .arc { position: absolute; left: -190px; top: -210px; width: 440px; height: 440px; border-radius: 50%; border: 52px solid var(--red); }
.guest .arc2 { position: absolute; right: -240px; bottom: -260px; width: 480px; height: 480px; border-radius: 50%; border: 40px solid var(--red-tint); }
.auth-card { position: relative; width: 100%; max-width: 460px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 36px 32px; display: flex; flex-direction: column; gap: 18px; }
.auth-card .logo { width: 150px; height: auto; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.divider::before, .divider::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.footer-note { text-align: center; font-size: 12px; color: var(--muted); }

@media (max-width: 640px) {
  .card { padding: 16px; }
  .auth-card { padding: 28px 20px; }
  .brand img { width: 96px; }
  .user-chip .who { display: none; }
  .tc-row { grid-template-columns: 1fr; }
  .cal-scroll { display: none; }
  .agenda { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px; }
  .header-row { gap: 10px 12px; }
}
.tc-field .btn { min-height: 46px; }
