:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f0e8;
  color: #263027;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(250, 248, 241, 0.94), rgba(242, 238, 228, 0.96)),
    #f3f0e8;
}

button,
input {
  font: inherit;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: #2f654d;
  color: #fff;
  cursor: pointer;
  font-weight: 720;
  padding: 0 16px;
}

button:hover {
  background: #285940;
}

a {
  color: #285940;
  font-weight: 720;
  text-decoration: none;
}

a:hover {
  color: #8a5b24;
}

.ghost {
  border: 1px solid #d8d0bd;
  background: #fffdf8;
  color: #263027;
}

.ghost:hover {
  background: #f3ead9;
}

.shell {
  width: min(1320px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 30px 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.brandBlock {
  display: grid;
  gap: 6px;
}

.accountBox,
.accountActions,
.panelActions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.accountActions {
  justify-content: flex-end;
}

#accountEmail {
  color: #545d52;
  font-size: 14px;
  font-weight: 720;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  color: #243126;
  font-size: 32px;
  font-weight: 780;
  letter-spacing: 0;
}

h2 {
  color: #263027;
  font-size: 18px;
  font-weight: 760;
  letter-spacing: 0;
}

.topbar p,
.panelHead p,
.panelHead span,
.message,
.taskMeta,
.usageText p,
.infoPanel p,
.noticeBox p {
  color: #62695f;
  line-height: 1.62;
}

.usageBox {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.usageCard {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  min-height: 118px;
  border: 1px solid #d8d0bd;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 16px 38px rgba(49, 60, 48, 0.1);
  padding: 16px;
}

.usageCardAlt .usageRing {
  --usage-color: #a66b2d;
}

.usageUnavailable {
  grid-column: 1 / -1;
}

.usageRing {
  --usage-angle: 0deg;
  --usage-color: #2f654d;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: conic-gradient(var(--usage-color) var(--usage-angle), #e8e1d1 0);
}

.usageRing span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fffdf8;
  color: #243126;
  font-size: 17px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.usageText {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.panel,
.infoPanel {
  border: 1px solid #d8d0bd;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 14px 34px rgba(49, 60, 48, 0.08);
  padding: 20px;
}

.workbench {
  display: grid;
  grid-template-columns: 420px minmax(520px, 1fr);
  gap: 18px;
  align-items: start;
}

.uploadPanel,
.taskPanel {
  min-height: 438px;
}

.panelHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.form,
.upload {
  display: grid;
  gap: 12px;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfc7b5;
  border-radius: 6px;
  background: #fff;
  color: #263027;
  padding: 0 12px;
}

input::file-selector-button {
  height: 34px;
  border: 0;
  border-radius: 6px;
  background: #ede6d8;
  color: #29352b;
  cursor: pointer;
  font: inherit;
  font-weight: 720;
  margin-right: 12px;
  padding: 0 12px;
}

input:focus {
  outline: 2px solid #9fbeaa;
  outline-offset: 1px;
}

.noticeBox {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  border-left: 4px solid #a66b2d;
  background: #fbf4e7;
  padding: 14px 14px 14px 16px;
}

.taskList,
.adminSummary {
  display: grid;
  gap: 10px;
}

.taskItem,
.adminRow {
  display: grid;
  gap: 10px;
  border: 1px solid #ded6c5;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.taskTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.taskTop strong {
  color: #29352b;
  min-width: 0;
  overflow-wrap: anywhere;
}

.queueMeta {
  border-left: 3px solid #2f654d;
  background: #eef5f1;
  color: #2f654d;
  font-weight: 680;
  padding: 8px 10px;
}

.progressLine {
  display: grid;
  grid-template-columns: 1fr 54px;
  align-items: center;
  gap: 10px;
}

.progressPercent {
  color: #2f654d;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  text-align: right;
}

.taskActions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.buttonLink {
  display: inline-grid;
  min-height: 42px;
  place-items: center;
  border-radius: 6px;
  background: #2f654d;
  color: #fff;
  padding: 0 16px;
}

.buttonLink:hover {
  background: #285940;
  color: #fff;
}

.dangerButton {
  color: #7a2d21;
}

.dangerButton:hover {
  background: #f2dfd9;
}

.badge {
  border-radius: 999px;
  background: #e6f0e8;
  color: #2f654d;
  font-size: 13px;
  font-weight: 720;
  padding: 4px 10px;
  white-space: nowrap;
}

.progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #ece5d7;
}

.progress span {
  display: block;
  height: 100%;
  background: #2f654d;
}

.infoGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.infoPanel {
  display: grid;
  gap: 10px;
}

.legalAssistant {
  background: #eef5f1;
  border-color: #cbd9d1;
}

.message {
  min-height: 24px;
  margin-top: 16px;
}

.siteFooter {
  width: min(1320px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 0 0 26px;
  color: #62695f;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.siteFooter a {
  color: #62695f;
  font-weight: 640;
}

.siteFooter a:hover {
  color: #285940;
}

.loginOverlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 31, 25, 0.42);
}

.loginCard {
  width: min(460px, 100%);
  border: 1px solid #d8d0bd;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 18px 50px rgba(35, 44, 36, 0.24);
  padding: 20px;
}

#loginHint {
  color: #62695f;
  margin-top: 6px;
}

body[data-view="admin"] .infoGrid {
  display: none;
}

.hidden {
  display: none;
}

@media (max-width: 860px) {
  .shell {
    width: min(100vw - 24px, 720px);
    padding: 20px 0;
  }

  .siteFooter {
    width: min(100vw - 24px, 720px);
  }

  .topbar,
  .accountBox,
  .accountActions,
  .panelActions,
  .panelHead,
  .taskTop {
    align-items: flex-start;
    flex-direction: column;
  }

  .usageBox,
  .workbench,
  .infoGrid {
    grid-template-columns: 1fr;
  }

  .usageCard {
    grid-template-columns: 80px minmax(0, 1fr);
  }

  .usageRing {
    width: 74px;
    height: 74px;
  }

  .usageRing span {
    width: 52px;
    height: 52px;
    font-size: 15px;
  }
}
