:root {
  color-scheme: light;
  --cream: #f1e5d6;
  --latte: #d6c2ad;
  --espresso: #1b0f0a;
  --cocoa: #4b2f22;
  --clay: #b06d48;
  --sage: #7f9b7d;
  --shadow: rgba(22, 12, 7, 0.28);
  --glow: rgba(176, 109, 72, 0.32);
  --ink: #120a06;
  --panel: #f3e7d9;
  --card: #eadbcb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--cream);
  background: radial-gradient(circle at top left, #2b1710 0%, #1b0f0a 45%, #120a06 100%);
  min-height: 100vh;
  text-align: center;
}

.bg-orbit {
  position: fixed;
  inset: -30vh -20vw auto auto;
  width: 75vw;
  height: 75vw;
  background: radial-gradient(circle, rgba(176, 109, 72, 0.22) 0%, rgba(18, 10, 6, 0) 70%);
  z-index: -1;
  filter: blur(1px);
}

.site-header {
  padding: 0 2vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 58px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(18, 10, 6, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(176, 109, 72, 0.2);
}

.site-header::before {
  content: none;
}

.site-header > * {
  position: relative;
  z-index: 1;
}

.site-header .staff-link {
  position: absolute;
  top: 18px;
  right: 8vw;
  z-index: 2;
  font-size: 0.85rem;
}

.site-header .staff-link button {
  background: none;
  border: none;
  color: var(--cream);
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  padding: 0;
  text-decoration: none;
  border-bottom: 1px solid rgba(241, 229, 214, 0.6);
}

.site-header .staff-link button:hover {
  border-bottom-color: var(--cream);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  justify-content: flex-start;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--espresso);
  color: #fff8ec;
  font-family: "DM Serif Display", serif;
  font-size: 28px;
  box-shadow: 0 16px 30px var(--shadow);
}

h1 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(2.4rem, 2vw + 1.8rem, 3.4rem);
  margin: 4px 0 6px;
  color: var(--cream);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.7rem;
  margin: 4px 0 0;
}

.subtitle {
  margin: 0;
  color: var(--latte);
  font-family: "DM Serif Display", serif;
  font-size: 1.05rem;
  white-space: nowrap;
  max-width: none;
}

.connection-card {
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(243, 231, 217, 0.08);
  border: 1px solid rgba(241, 229, 214, 0.15);
  box-shadow: none;
  max-width: none;
  margin: 0;
  text-align: center;
}

.hero-kicker {
  margin: 0 0 8px;
  color: var(--clay);
  font-weight: 600;
}

.hero-body {
  margin: 12px 0 18px;
  color: var(--cocoa);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--latte);
  font-weight: 500;
}

.hero-meta code {
  background: rgba(241, 229, 214, 0.12);
  color: var(--cream);
  padding: 2px 6px;
  border-radius: 6px;
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--clay);
  display: inline-block;
}

.content {
  padding: 0;
  display: grid;
  gap: 0;
  height: calc(100vh - 58px);
  overflow: hidden;
}

.auth-locked .content {
  min-height: calc(100vh - 120px);
  align-content: center;
}

.auth-locked .content > section:first-of-type {
  max-width: 520px;
  margin: 0 auto;
}

.requires-auth {
  display: grid;
  gap: 28px;
  height: 100%;
  overflow: hidden;
}

.panel {
  background: var(--panel);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 20px 40px var(--shadow);
  border: 1px solid rgba(27, 15, 10, 0.12);
  position: relative;
  overflow: hidden;
  color: var(--espresso);
}

.app-section[data-section="log-section"],
.app-section[data-section="bean-section"],
.app-section[data-section="timeline-section"],
.app-section[data-section="prepared-section"] {
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.app-section[data-section="log-section"]::after,
.app-section[data-section="bean-section"]::after,
.app-section[data-section="timeline-section"]::after {
  content: none;
}

.bean-refresh {
  position: static;
}


.panel.wide {
  grid-column: 1 / -1;
}

.panel::after {
  content: "";
  position: absolute;
  inset: auto -40% -60% auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, rgba(255, 255, 255, 0) 70%);
  z-index: 0;
}

.panel-header {
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.panel-header h3 {
  margin: 0 0 6px;
  font-size: 1.4rem;
}

.panel-header p {
  margin: 0;
  color: var(--cocoa);
}

.panel-header.split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-header.split,
.panel-header.split > div {
  text-align: center;
  justify-content: center;
}

.roast-table {
  position: relative;
}

.filter-trigger {
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(27, 15, 10, 0.22);
  background: rgba(255, 247, 238, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.filter-trigger::after {
  content: "▾";
  font-size: 0.7rem;
  color: var(--clay);
}

.filter-trigger:hover {
  background: rgba(255, 247, 238, 0.95);
  border-color: rgba(27, 15, 10, 0.35);
}

.filter-popover {
  position: absolute;
  top: 46px;
  left: 12px;
  min-width: 200px;
  background: #fffaf4;
  border-radius: 12px;
  border: 1px solid rgba(27, 15, 10, 0.18);
  box-shadow: 0 18px 36px var(--shadow);
  padding: 12px;
  z-index: 5;
}

.filter-popover label {
  font-size: 0.8rem;
  gap: 6px;
}

.filter-popover input,
.filter-popover select {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(47, 30, 23, 0.15);
  font-size: 0.85rem;
  background: #fffdf9;
}

.filter-panel {
  display: none;
}

.filter-panel.active {
  display: grid;
  gap: 6px;
}

.filter-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 24px;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 12, 8, 0.55);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(720px, 92vw);
  background: var(--panel);
  border-radius: 20px;
  padding: 20px;
  border: 1px solid rgba(27, 15, 10, 0.18);
  box-shadow: 0 24px 60px var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.action-buttons button.active {
  background: #d6c2ad;
  color: var(--espresso);
  box-shadow: 0 12px 24px var(--shadow);
  transform: translateY(-1px);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-right #signout {
  color: rgba(214, 194, 173, 0.6);
  border-color: rgba(214, 194, 173, 0.25);
}

.header-right #signout:hover {
  color: var(--cream);
  border-color: rgba(214, 194, 173, 0.55);
  box-shadow: none;
  transform: none;
}

.action-buttons.header-actions {
  justify-content: flex-end;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
}

.header-actions button {
  padding: 6px 14px;
  font-size: 0.85rem;
}

.header-actions .primary {
  background: none;
  color: rgba(214, 194, 173, 0.6);
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.header-actions .primary:hover {
  color: var(--cream);
  border-bottom-color: rgba(176, 109, 72, 0.45);
  box-shadow: none;
  transform: none;
}

.action-buttons.header-actions button.active {
  background: none;
  color: var(--cream);
  border-bottom-color: var(--clay);
  box-shadow: none;
  transform: none;
}

.app-section {
  display: none;
}

.app-section.active {
  display: block;
}

.app-section[data-section="bean-section"].active,
.app-section[data-section="timeline-section"].active,
.app-section[data-section="prepared-section"].active {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.app-section[data-section="log-section"].active {
  height: 100%;
  overflow-y: auto;
}

.app-section[data-section="bean-section"].active .bean-card-block,
.app-section[data-section="timeline-section"].active .bean-card-block,
.app-section[data-section="prepared-section"].active .bean-card-block {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-bottom: none;
  padding: 16px 20px;
}

.app-section[data-section="bean-section"].active .bean-table,
.app-section[data-section="timeline-section"].active .roast-table,
.app-section[data-section="prepared-section"].active .prepared-table {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

#beans-grid,
#roast-table,
#prepared-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0 16px;
}

#beans-grid::-webkit-scrollbar,
#roast-table::-webkit-scrollbar,
#prepared-grid::-webkit-scrollbar {
  width: 5px;
}

#beans-grid::-webkit-scrollbar-track,
#roast-table::-webkit-scrollbar-track,
#prepared-grid::-webkit-scrollbar-track {
  background: transparent;
}

#beans-grid::-webkit-scrollbar-thumb,
#roast-table::-webkit-scrollbar-thumb,
#prepared-grid::-webkit-scrollbar-thumb {
  background: rgba(176, 109, 72, 0.4);
  border-radius: 999px;
}

#beans-grid::-webkit-scrollbar-thumb:hover,
#roast-table::-webkit-scrollbar-thumb:hover,
#prepared-grid::-webkit-scrollbar-thumb:hover {
  background: var(--clay);
}

.bean-filter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(234, 219, 203, 0.92);
  border: 1px solid rgba(176, 109, 72, 0.45);
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: var(--espresso);
}

.bean-filter-banner[hidden] {
  display: none;
}

button.ghost.small.roast-open {
  background: #ffffff;
  color: var(--espresso);
  border-color: #ffffff;
}

.inline-edit-form {
  padding: 8px 0 4px;
}

.inline-bean-select {
  width: 100%;
}

.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  position: relative;
  z-index: 1;
  text-align: center;
}

.bean-form {
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(240px, 1fr) auto;
  gap: 16px;
  align-items: end;
  text-align: center;
}

.bean-card-block {
  background: rgba(241, 229, 214, 0.07);
  border: 1px solid rgba(176, 109, 72, 0.25);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  margin-bottom: 16px;
}

.bean-library-header {
  margin: 6px 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.bean-library-header h3 {
  font-size: 1.4rem;
  margin: 0;
  color: var(--cream);
}

.bean-library-actions {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.bean-library-actions .ghost {
  min-width: 92px;
  white-space: nowrap;
  background: rgba(27, 15, 10, 0.55);
  border-color: rgba(241, 229, 214, 0.25);
  color: rgba(241, 229, 214, 0.9);
}

.bean-library-actions .ghost:hover {
  background: rgba(27, 15, 10, 0.75);
  color: var(--cream);
  border-color: rgba(241, 229, 214, 0.45);
}

.bean-stack {
  display: grid;
  gap: 6px;
}

.bean-stack input {
  height: 42px;
}

.bean-notes {
  align-content: end;
}

.bean-notes .auto-note {
  height: 90px;
  min-height: 90px;
}

.bean-actions {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.bean-actions .bean-submit {
  height: 90px;
  min-height: 90px;
  padding: 0 18px;
}

.auth-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: end;
}

.auth-meta {
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--cocoa);
}

.auth-meta .form-message {
  margin: 0;
}

.auth-meta #auth-status {
  font-weight: 600;
  color: var(--espresso);
}

.auth-meta .return-home {
  margin-top: 12px;
  color: var(--cocoa);
  text-decoration: none;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(75, 47, 34, 0.4);
  display: inline-block;
  align-self: center;
  justify-self: center;
}

.auth-meta .return-home:hover {
  color: var(--clay);
  border-bottom-color: var(--clay);
}

.auth-locked .requires-auth {
  opacity: 0.55;
  filter: grayscale(0.15);
  pointer-events: none;
}

.auth-locked .app-shell {
  display: none;
}

.auth-authed .auth-panel {
  display: none;
}

.form-grid-roast {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  position: relative;
  z-index: 1;
  text-align: center;
}

.log-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding: 8px 0 4px;
  border-top: 1px solid rgba(27, 15, 10, 0.08);
  margin-top: 4px;
}

.refractometer-section {
  text-align: left;
  min-width: 220px;
  max-width: 320px;
}

.roast-btn-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 24px;
}

.roast-btn-row .form-message {
  display: flex;
  align-items: center;
}

.roast-btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.roast-submit-btn {
  flex: 1;
  padding: 14px 36px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 12px;
  white-space: nowrap;
  min-width: 200px;
}

.roast-submit-btn.primary {
  background: rgba(234, 219, 203, 0.85);
  color: var(--espresso);
  border: 1px solid rgba(27, 15, 10, 0.12);
}

.roast-submit-btn.primary:hover {
  background: #d6c2ad;
  box-shadow: 0 12px 32px rgba(22, 12, 7, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

.form-section {
  display: grid;
  gap: 12px;
  padding: 18px 12px 12px;
  border-radius: 12px;
  background: rgba(234, 219, 203, 0.85);
  border: 1px solid rgba(27, 15, 10, 0.12);
  text-align: center;
  align-content: start;
}

.datalog-section {
  display: flex;
  flex-direction: column;
}

.datalog-notes-label {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.datalog-notes-input {
  flex: 1;
  min-height: 120px;
  resize: none;
}

.stage-table-wrap {
  overflow-x: auto;
  padding-bottom: 6px;
}

.stage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  background: #fffefb;
  border-radius: 12px;
  overflow: hidden;
}

.stage-table th,
.stage-table td {
  border: 1px solid rgba(47, 30, 23, 0.1);
  padding: 8px;
  text-align: left;
  white-space: nowrap;
}

.stage-table .col-gas {
  min-width: 82px;
}

.stage-table .col-temp {
  min-width: 62px;
}

.stage-table thead th {
  background: rgba(233, 220, 203, 0.6);
  font-weight: 600;
}

.stage-table input[type="text"],
.stage-table input[type="number"],
.stage-table select,
.stage-table textarea {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(47, 30, 23, 0.15);
  font-size: 0.8rem;
  background: #fffdf9;
}

.stage-table select {
  min-width: 84px;
}

/* Remove up/down spinners from number inputs (gas %, temperature) */
.stage-table input[type="number"]::-webkit-outer-spin-button,
.stage-table input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.stage-table input[type="number"] {
  -moz-appearance: textfield;
}

.stage-table textarea {
  resize: none;
  line-height: 1.4;
  min-height: 28px;
  transition: min-height 0.15s ease;
  overflow: hidden;
}


.auto-note {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(47, 30, 23, 0.15);
  font-family: inherit;
  font-size: 0.8rem;
  background: #fffdf9;
  resize: none;
  min-height: 28px;
  transition: min-height 0.15s ease;
}

.stage-table input[type="checkbox"] {
  transform: scale(1.1);
}

.stage-table .center {
  text-align: center;
}

.form-section h4 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--espresso);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  align-self: start;
}

.basic-info input[type="text"],
.basic-info input[type="date"] {
  width: min(240px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.basic-info label {
  justify-items: center;
}

.bean-select {
  position: relative;
  width: min(240px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.bean-select input[type="text"] {
  width: 100%;
  margin: 0;
}

.bean-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #f7efe6;
  border: 1px solid rgba(27, 15, 10, 0.18);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(27, 15, 10, 0.12);
  max-height: 200px;
  overflow-y: auto;
  z-index: 50;
}

.bean-dropdown.open {
  display: block;
}

.bean-option {
  padding: 8px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s;
}

.bean-option:first-child {
  border-radius: 12px 12px 0 0;
}

.bean-option:last-child {
  border-radius: 0 0 12px 12px;
}

.bean-option:only-child {
  border-radius: 12px;
}

.bean-option:hover,
.bean-option.active {
  background: rgba(176, 109, 72, 0.12);
}

.bean-option .bean-option-identity {
  font-weight: 600;
  color: var(--espresso);
}

.bean-option .bean-option-origin {
  color: rgba(27, 15, 10, 0.55);
  font-size: 0.82rem;
}

.lot-select {
  position: relative;
  width: min(240px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.lot-select input[type="text"] {
  width: 100%;
  margin: 0;
}

.lot-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #f7efe6;
  border: 1px solid rgba(27, 15, 10, 0.18);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(27, 15, 10, 0.12);
  max-height: 200px;
  overflow-y: auto;
  z-index: 50;
}

.lot-dropdown.open {
  display: block;
}

.lot-option {
  padding: 8px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s;
}

.lot-option:first-child {
  border-radius: 12px 12px 0 0;
}

.lot-option:last-child {
  border-radius: 0 0 12px 12px;
}

.lot-option:only-child {
  border-radius: 12px;
}

.lot-option:hover,
.lot-option.active {
  background: rgba(176, 109, 72, 0.12);
}

.note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.note-header button {
  white-space: nowrap;
}

.color-field {
  display: grid;
  grid-template-columns: 1fr 64px;
  gap: 10px;
  align-items: center;
}

.color-field select {
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid rgba(47, 30, 23, 0.15);
  font-family: inherit;
  font-size: 0.95rem;
  background: #fffdf9;
}

.full-width {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--ink);
}



.field-title {
  display: inline-block;
}

.shift-down-5 {
  transform: translateY(5px);
}


.field-error {
  color: #c24a2b;
  font-weight: 600;
}

.input-error {
  border-color: rgba(194, 74, 43, 0.6);
  background: #fff6f2;
  box-shadow: 0 0 0 2px rgba(194, 74, 43, 0.12);
}

input,
select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(27, 15, 10, 0.18);
  font-family: inherit;
  font-size: 0.95rem;
  background: #f7efe6;
  text-align: center;
}

textarea {
  text-align: center;
}

input:focus,
select:focus {
  outline: 2px solid rgba(176, 109, 72, 0.45);
  border-color: var(--clay);
}

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

button {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
  --tx: 0px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
  transform: translateX(var(--tx)) translateY(-1px);
  box-shadow: 0 10px 20px var(--shadow);
}

.primary {
  background: #2b1710;
  color: #f7efe6;
}

.ghost {
  background: transparent;
  border: 1px solid rgba(27, 15, 10, 0.35);
  color: var(--ink);
}

.ghost.danger {
  border-color: rgba(198, 124, 90, 0.6);
  color: var(--clay);
}

.bean-actions .ghost.small,
.roast-actions .ghost.small {
  color: rgba(241, 229, 214, 0.65);
  border-color: rgba(241, 229, 214, 0.15);
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 500;
}

.bean-actions .ghost.small:hover,
.roast-actions .ghost.small:hover {
  color: var(--cream);
  border-color: rgba(241, 229, 214, 0.4);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  transform: none;
}

.bean-actions .ghost.danger.small,
.roast-actions .ghost.danger.small {
  color: var(--clay);
  border-color: rgba(176, 109, 72, 0.3);
}

.bean-actions .ghost.danger.small:hover,
.roast-actions .ghost.danger.small:hover {
  background: rgba(176, 109, 72, 0.1);
  border-color: rgba(176, 109, 72, 0.55);
  box-shadow: none;
  transform: none;
}

.small {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.bean-submit {
  border-radius: 12px;
  padding: 0 12px;
  font-size: 0.95rem;
  line-height: 1.2;
  height: 42px;
  min-height: 42px;
}

.form-message {
  margin: 0;
  font-size: 0.85rem;
  color: var(--sage);
}

.form-message.error {
  color: #c0392b;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  position: relative;
  z-index: 1;
  text-align: center;
}

.bean-card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(47, 30, 23, 0.08);
  background: linear-gradient(180deg, #fffaf4, #ffffff);
  display: grid;
  gap: 8px;
  text-align: center;
}

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

.bean-actions {
  display: inline-flex;
  gap: 8px;
}

.bean-card h4 {
  margin: 0;
  font-size: 1.1rem;
}

.bean-meta {
  font-size: 0.85rem;
  color: var(--cocoa);
}

.table {
  display: grid;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.table-head {
  font-weight: 700;
  background: rgba(241, 229, 214, 0.18);
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid rgba(176, 109, 72, 0.35);
  border-radius: 10px 10px 0 0;
}

.table-head span {
  color: rgba(255, 255, 255, 0.95);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.65rem;
  font-weight: 700;
}

.table-head .filterable-header input,
.table-head .filterable-header select,
.table-head .filter-trigger {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.table-head .filterable-header input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.table-head .filterable-header select option {
  background: #08050f;
  color: #fff;
}

.bean-table {
  gap: 12px;
}

.bean-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(200px, 1.2fr) minmax(220px, 1.4fr) minmax(160px, 0.8fr) minmax(140px, 0.7fr);
  align-items: center;
}

.bean-row span {
  color: rgba(241, 229, 214, 0.8);
}

.bean-row .bean-actions {
  justify-content: center;
  flex-wrap: wrap;
}

.filterable-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filterable-header input,
.filterable-header select {
  padding: 4px 8px;
  font-size: 0.8rem;
  font-weight: 400;
  border-radius: 6px;
  border: 1px solid rgba(27, 15, 10, 0.12);
  background: rgba(255, 255, 255, 0.5);
  font-family: inherit;
  color: var(--espresso);
  width: 100%;
  cursor: pointer;
}

.filterable-header input:focus,
.filterable-header select:focus {
  outline: 2px solid rgba(176, 109, 72, 0.45);
  border-color: var(--clay);
}

.roast-filter-strip {
  display: flex;
  justify-content: flex-end;
  padding: 4px 0 6px;
}

.roast-filter-strip[hidden] {
  display: none;
}

.roast-filter-strip .ghost {
  background: var(--cream);
  border-color: var(--latte);
  color: var(--cocoa);
}

.roast-row {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  align-items: center;
  justify-items: center;
  min-height: 60px;
}

.roast-row span {
  color: rgba(241, 229, 214, 0.8);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  max-width: 100%;
}

.roast-actions {
  display: grid;
  gap: 4px;
  justify-items: center;
  justify-self: center;
}

.roast-actions .small {
  padding: 2px 5px;
  font-size: 0.65rem;
}

.roast-detail-row {
  display: none;
  grid-column: 1 / -1;
}

.roast-detail-row.active {
  display: block;
}

.roast-detail-card {
  margin-top: 8px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(27, 15, 10, 0.12);
  background: #f7efe6;
  display: grid;
  gap: 12px;
}

.roast-detail-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 4px;
  border-top: 1px solid rgba(27, 15, 10, 0.08);
}

.prepared-row {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(27, 15, 10, 0.08);
}

.prepared-data-row {
  cursor: pointer;
  transition: background 0.15s;
}

.prepared-data-row:hover {
  background: rgba(176, 109, 72, 0.08);
}

.prepared-notes {
  color: var(--cocoa);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prepared-empty {
  color: var(--latte);
  font-size: 0.9rem;
  margin-top: 8px;
}

.bean-row input[type="text"],
.bean-row textarea {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(27, 15, 10, 0.2);
  font-family: inherit;
  font-size: 0.9rem;
  background: #f7efe6;
}

.bean-row textarea {
  resize: vertical;
  min-height: 32px;
}

.table-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 6px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(241, 229, 214, 0.08);
  background: rgba(241, 229, 214, 0.1);
  font-size: 0.9rem;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

#bean-table > .table-row:nth-child(even),
#roast-table > .table-row:nth-child(even) {
  background: rgba(241, 229, 214, 0.16);
}

.table-row:not(.table-head):hover {
  box-shadow: inset 3px 0 0 var(--clay);
  background: rgba(241, 229, 214, 0.22);
}

.roast-table .table-row {
  font-size: 0.82rem;
}

.table-row span {
  color: rgba(241, 229, 214, 0.95);
}

.roast-card {
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(47, 30, 23, 0.08);
  background: linear-gradient(135deg, #fffaf4, #ffffff);
  display: grid;
  gap: 16px;
  text-align: center;
}

.roast-actions {
  display: inline-flex;
  gap: 8px;
}

.roast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(47, 30, 23, 0.08);
}

.roast-header h4 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--espresso);
}

.roast-date {
  font-size: 0.85rem;
  color: var(--clay);
  font-weight: 600;
}

.roast-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.detail-section {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
}

.detail-section strong {
  color: var(--espresso);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.detail-section div {
  color: var(--cocoa);
  padding-left: 4px;
}

.site-footer {
  padding: 24px 8vw 48px;
  color: var(--cocoa);
}

[data-stagger] {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s ease forwards;
}

[data-stagger]:nth-of-type(1) { animation-delay: 0.05s; }
[data-stagger]:nth-of-type(2) { animation-delay: 0.12s; }
[data-stagger]:nth-of-type(3) { animation-delay: 0.2s; }
[data-stagger]:nth-of-type(4) { animation-delay: 0.28s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 48px 6vw 18px;
    grid-template-columns: 1fr;
  }

  .content {
    padding: 0 6vw 60px;
  }

  .panel-header.split {
    flex-direction: column;
    align-items: flex-start;
  }

  .log-row {
    flex-direction: column;
    align-items: stretch;
  }

  .roast-btn-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .roast-btn-group {
    width: 100%;
  }
}
.header-panel {
  grid-column: 2;
}
.bean-form textarea {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(47, 30, 23, 0.15);
  font-family: inherit;
  font-size: 0.95rem;
  background: #fffdf9;
  height: 42px;
}
