:root {
  color: #26352f;
  background: #f4f0e5;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 10%, rgb(255 255 255 / 85%), transparent 32rem),
    linear-gradient(145deg, #f7f3e9 0%, #e8eee7 100%);
}

button,
input,
textarea,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
textarea:disabled {
  cursor: wait;
  opacity: 0.55;
}

.dashboard-shell {
  width: min(100% - 40px, 1180px);
  margin: 0 auto;
  padding: 28px 0 64px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(44px, 8vw, 86px);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: #2d4b3e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #fffdf7;
  background: #315c4b;
  font-size: 24px;
  box-shadow: 0 10px 24px rgb(49 92 75 / 20%);
}

.logout-button,
.ghost-button {
  padding: 10px 18px;
  border: 1px solid rgb(49 92 75 / 22%);
  border-radius: 999px;
  color: #315c4b;
  background: rgb(255 253 247 / 62%);
}

.logout-button:hover,
.ghost-button:hover {
  background: #fffdf7;
}

.eyebrow {
  margin: 0 0 12px;
  color: #718078;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: #263b32;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.025em;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(42px, 8vw, 68px);
  line-height: 1.03;
}

h2 {
  margin: 0;
  font-size: clamp(25px, 4vw, 34px);
  line-height: 1.15;
}

h3 {
  margin: 0 0 14px;
  font-size: 24px;
}

.intro {
  max-width: 68ch;
  margin: 22px 0 34px;
  color: #607068;
  font-size: 18px;
  line-height: 1.65;
}

.create-card,
.client-list-card,
.client-detail-card,
.action-block,
.state-panel {
  border: 1px solid rgb(49 92 75 / 12%);
  border-radius: 28px;
  background: rgb(255 253 247 / 72%);
  box-shadow: 0 18px 50px rgb(43 60 51 / 8%);
}

.create-card {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
  padding: 24px;
}

.inline-form,
.ttl-row,
.upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

label {
  display: grid;
  gap: 7px;
  color: #53665c;
  font-size: 14px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgb(49 92 75 / 20%);
  border-radius: 16px;
  color: #26352f;
  background: #fffdf7;
  outline: none;
}

input {
  min-height: 44px;
  padding: 0 14px;
}

textarea {
  resize: vertical;
  padding: 12px 14px;
  line-height: 1.5;
}

input:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(49 92 75 / 25%);
  outline-offset: 3px;
}

.inline-form label {
  min-width: min(100%, 320px);
  flex: 1;
}

button,
.upload-button {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #315c4b;
  border-radius: 999px;
  color: #fff;
  background: #315c4b;
  font-weight: 750;
  text-decoration: none;
}

button:hover,
.upload-button:hover {
  filter: brightness(1.05);
}

.upload-button--secondary {
  color: #315c4b;
  background: #f9fbf8;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.upload-button:has(+ .file-input:focus-visible) {
  outline: 3px solid rgb(49 92 75 / 25%);
  outline-offset: 3px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.client-list-card,
.client-detail-card {
  padding: 24px;
}

.client-detail-card {
  display: grid;
  gap: 18px;
}

.section-heading,
.selected-client-header {
  display: flex;
  gap: 18px;
  align-items: end;
  justify-content: space-between;
}

.client-list,
.materials-list,
.messages-list,
.notes-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.client-list li {
  display: grid;
  gap: 5px;
}

.client-button {
  width: 100%;
  justify-content: start;
  border-color: rgb(49 92 75 / 16%);
  color: #2d4b3e;
  background: #fffdf7;
  text-align: left;
}

.client-button--active {
  color: #fff;
  background: #315c4b;
}

.client-meta,
.muted,
.material-meta,
.message-meta,
.note-meta {
  color: #6e7c74;
  font-size: 13px;
}

.action-block {
  padding: 20px;
}

.ttl-row label {
  width: 128px;
}

.link-result {
  margin-top: 14px;
}

.link-result input {
  font-size: 13px;
}

#copy-invite-button {
  margin-top: 10px;
}

.material-item,
.message-item,
.note-item,
.empty-item {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid rgb(49 92 75 / 12%);
  border-radius: 18px;
  background: rgb(255 253 247 / 72%);
}

.material-title {
  color: #30483d;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.material-item a {
  width: fit-content;
  color: #315c4b;
  font-weight: 750;
}

.message-form,
.note-form {
  display: grid;
  gap: 12px;
}

.message-text,
.note-text {
  margin: 0;
  color: #334a40;
  line-height: 1.55;
  white-space: pre-wrap;
}

.message-item--client {
  border-color: rgb(49 92 75 / 20%);
  background: #f7fbf8;
}

.form-status {
  min-height: 21px;
  margin: 10px 0 0;
  color: #6e7c74;
  font-size: 14px;
}

.form-status--success {
  color: #39735a;
}

.form-status--error {
  color: #944b3a;
}

.state-panel {
  display: flex;
  max-width: 620px;
  gap: 18px;
  align-items: center;
  padding: 22px;
}

.state-panel--error {
  border-color: rgb(148 75 58 / 25%);
}

.state-title {
  margin: 0 0 4px;
  color: #263b32;
  font-weight: 800;
}

.state-message {
  margin: 0;
  color: #607068;
  line-height: 1.55;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgb(49 92 75 / 18%);
  border-top-color: #315c4b;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.error-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #944b3a;
  font-weight: 900;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (width <= 820px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .selected-client-header {
    align-items: start;
    flex-direction: column;
  }
}
