:root {
  --bg: #f6f1e7;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --surface-soft: #f9f7f2;
  --ink: #15130f;
  --muted: #706b61;
  --line: rgba(30, 26, 18, 0.11);
  --line-strong: rgba(30, 26, 18, 0.18);
  --accent: #8a6b3f;
  --accent-strong: #6f542f;
  --danger: #8b1d1d;
  --shadow: 0 34px 90px rgba(44, 34, 19, 0.14);
  --shadow-soft: 0 18px 42px rgba(44, 34, 19, 0.1);
  --shadow-card: 0 22px 56px rgba(44, 34, 19, 0.11), 0 1px 0 rgba(255, 255, 255, 0.82) inset;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Google Sans", "Segoe UI", Arial, sans-serif;
}

[hidden] {
  display: none !important;
}

body {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% -10%, rgba(194, 161, 108, 0.24), transparent 34%),
    radial-gradient(circle at 88% 4%, rgba(255, 255, 255, 0.96), transparent 28%),
    linear-gradient(135deg, #fffdf8 0%, var(--bg) 58%, #efe7d8 100%);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(20, 18, 14, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 18, 14, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.72;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), transparent 72%);
}

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

button,
a,
select {
  cursor: pointer;
}

.filework-shell {
  position: relative;
  z-index: 1;
  height: 100vh;
  overflow: hidden;
}

.topbar {
  width: min(1220px, calc(100vw - 32px));
  height: 56px;
  margin: 8px auto 0;
  padding: 0 14px 0 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(40, 31, 18, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  color: var(--ink);
  font-size: 1.22rem;
  font-weight: 850;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-link,
.credit-link,
.primary-link {
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.top-link:hover,
.credit-link:hover {
  background: rgba(138, 107, 63, 0.11);
  transform: translateY(-1px);
}

.credit-link {
  min-width: 138px;
  border: 1px solid rgba(138, 107, 63, 0.2);
  background: linear-gradient(135deg, rgba(138, 107, 63, 0.13), rgba(255, 255, 255, 0.8));
  color: var(--accent-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.workspace {
  width: min(1220px, calc(100vw - 32px));
  margin: 0 auto;
  height: calc(100vh - 64px);
  padding: 10px 0 12px;
  overflow: hidden;
}

.login-panel {
  min-height: calc(100vh - 126px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 34px;
}

.login-panel .material-symbols-rounded {
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.login-panel h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.07em;
}

.login-panel p {
  color: var(--muted);
  font-weight: 650;
}

.primary-link {
  border: none;
  background: var(--ink);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(21, 19, 15, 0.18);
}

.primary-btn {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.filework-app {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 12px;
  height: 100%;
  min-height: 0;
}

.folder-rail,
.work-panel,
.folder-controls,
.file-list-card,
.editor-card,
.credit-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(250, 248, 244, 0.86)),
    var(--surface-solid);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-card);
}

.folder-rail {
  height: 100%;
  min-height: 0;
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.work-panel {
  height: 100%;
  min-height: 0;
  border-radius: var(--radius-lg);
  padding: 12px;
  display: grid;
  overflow: hidden;
}

.rail-head,
.workspace-head,
.workspace-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.workspace-side {
  display: grid;
  grid-template-columns: minmax(280px, 390px) auto;
  gap: 10px;
  align-items: start;
  justify-content: end;
}

.eyebrow {
  display: none;
}

h1,
h2 {
  letter-spacing: -0.055em;
}

.rail-head h1,
.workspace-head h2 {
  font-size: 1.22rem;
  line-height: 1;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s var(--ease), border 0.2s var(--ease), background 0.2s var(--ease);
}

.icon-btn:hover {
  transform: rotate(-8deg) scale(1.03);
  border-color: var(--line-strong);
  background: #fff;
}

.create-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.folder-select-card {
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.folder-select-card label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  outline: none;
  transition: border 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

input,
select {
  height: 38px;
  padding: 0 12px;
  font-size: 0.9rem;
  font-weight: 650;
}

textarea {
  padding: 10px;
  resize: vertical;
  line-height: 1.55;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.9rem;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(138, 107, 63, 0.5);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(138, 107, 63, 0.13);
}

.create-card input {
  border: none;
  background: transparent;
  box-shadow: none;
}

.create-card input:focus {
  box-shadow: none;
}

.create-card button,
.secondary-btn,
.danger-btn,
.primary-btn {
  min-height: 38px;
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 0.88rem;
  font-weight: 850;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border 0.2s var(--ease), background 0.2s var(--ease);
}

.create-card button,
.secondary-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.create-card button:hover,
.secondary-btn:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 10px 24px rgba(40, 31, 18, 0.08);
}

.danger-btn {
  border: 1px solid rgba(139, 29, 29, 0.22);
  background: rgba(255, 248, 248, 0.92);
  color: var(--danger);
}

.danger-btn:hover {
  transform: translateY(-1px);
  background: #fff3f3;
}

.primary-btn,
.secondary-btn,
.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(21, 19, 15, 0.22);
}

.primary-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.folder-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 2px;
}

.tree-folder-row {
  width: 100%;
  min-height: 40px;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 6px 9px 6px calc(9px + (var(--depth) * 18px));
  display: grid;
  grid-template-columns: 18px 22px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  text-align: left;
  transition: background 0.2s var(--ease);
}

.tree-folder-row:hover {
  background: rgba(255, 255, 255, 0.78);
}

.tree-folder-row .tree-chevron {
  color: var(--muted);
  font-size: 18px;
}

.tree-folder-row .tree-icon {
  color: var(--accent);
  font-size: 21px;
}

.tree-folder-row .tree-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 850;
}

.tree-folder-row em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
}

.folder-item {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--ink);
  padding: 6px 9px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  text-align: left;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border 0.2s var(--ease);
}

.folder-item:hover,
.folder-item.active {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.76);
  transform: translateX(2px);
}

.folder-item.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.folder-item .material-symbols-rounded,
.file-row .material-symbols-rounded,
.empty-state .material-symbols-rounded {
  color: var(--accent);
}

.folder-item span:last-child,
.file-row span:nth-child(2) {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.folder-item strong,
.folder-item small,
.file-row strong,
.file-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-item strong,
.file-row strong {
  font-size: 0.9rem;
}

.folder-item small,
.file-row small,
.workspace-head p,
.status-message,
.credit-copy span,
.empty-state p {
  color: var(--muted);
  font-size: 0.82rem;
}

.empty-state {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
}

.empty-state .material-symbols-rounded {
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}

.empty-state h2 {
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  line-height: 0.95;
}

.folder-workspace,
.folder-controls,
.file-list-card,
.editor-card {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.folder-workspace {
  height: 100%;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.workspace-head {
  align-items: flex-start;
  padding: 0 2px;
}

.workspace-actions {
  flex-wrap: wrap;
}

.plan-panel {
  min-width: 280px;
  max-width: 390px;
  border: 1px solid rgba(138, 107, 63, 0.16);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(249, 244, 235, 0.78)),
    var(--surface);
  box-shadow: 0 12px 30px rgba(40, 31, 18, 0.08);
  padding: 10px;
}

.plan-panel.active {
  border-color: rgba(138, 107, 63, 0.32);
}

.plan-panel.running {
  border-color: rgba(21, 19, 15, 0.28);
}

.plan-panel.complete {
  border-color: rgba(76, 121, 84, 0.32);
}

.plan-topline,
.progress-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.plan-topline span,
.progress-copy span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plan-topline strong,
.progress-copy strong {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 950;
  white-space: nowrap;
}

.plan-steps {
  list-style: none;
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.plan-steps li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 780;
  line-height: 1.28;
}

.plan-steps li span {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(138, 107, 63, 0.13);
  color: var(--accent-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 950;
}

.progress-panel {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.progress-track {
  height: 9px;
  margin-top: 7px;
  border-radius: 999px;
  background: rgba(138, 107, 63, 0.15);
  overflow: hidden;
  position: relative;
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, var(--ink), var(--accent), #c2a16c);
  transition: width 0.45s var(--ease);
}

.plan-panel.running .progress-track span {
  background-size: 180% 100%;
  animation: progressSheen 1.4s linear infinite;
}

@keyframes progressSheen {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 180% 50%;
  }
}

.folder-controls,
.file-list-card,
.editor-card,
.credit-card {
  border-radius: var(--radius-md);
  padding: 10px;
}

.folder-controls {
  grid-template-columns: minmax(230px, 0.8fr) minmax(220px, 0.55fr);
  align-items: stretch;
  gap: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(250, 246, 237, 0.82)),
    var(--surface);
}

.credit-card {
  background:
    linear-gradient(135deg, rgba(138, 107, 63, 0.13), rgba(255, 255, 255, 0.76));
  gap: 6px;
  display: grid;
  box-shadow: none;
}

.credit-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.credit-copy strong {
  font-size: 0.94rem;
  letter-spacing: -0.02em;
}

.credit-meter {
  height: 6px;
  border-radius: 999px;
  background: rgba(138, 107, 63, 0.17);
  overflow: hidden;
}

.credit-meter span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #b4935f);
}

.model-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  gap: 5px;
}

.model-grid label,
.section-title {
  font-weight: 850;
  letter-spacing: -0.02em;
}

.status-message {
  min-height: 20px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.files-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(420px, 0.66fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
}

.file-list-card,
.editor-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.file-list {
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
  min-height: 0;
  flex: 1;
  overflow-y: auto;
}

.file-row {
  width: 100%;
  min-height: 42px;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 6px 9px 6px calc(9px + (var(--depth, 0) * 18px));
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  text-align: left;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.file-row:hover,
.file-row.active {
  background: #fff;
}

.file-row.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.file-row:last-child {
  border-bottom: none;
}

.tree-folder-row:last-child {
  border-bottom: none;
}

.file-row em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
}

.editor-card textarea {
  flex: 1;
  min-height: 0;
  resize: none;
  border-radius: 20px;
  background:
    linear-gradient(180deg, #ffffff, #fffdf9);
  border-color: rgba(30, 26, 18, 0.12);
  color: var(--ink);
  padding: 18px;
  font-size: 0.98rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 12px 30px rgba(40, 31, 18, 0.08);
}

.editor-card textarea::placeholder {
  color: rgba(21, 19, 15, 0.42);
}

.task-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.task-actions .primary-btn {
  min-width: 132px;
}

.run-estimate {
  grid-column: 1 / -1;
  border: 1px solid rgba(138, 107, 63, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  padding: 8px 10px;
  display: grid;
  gap: 2px;
}

.task-actions .run-estimate {
  grid-column: auto;
  min-height: 42px;
  align-content: center;
}

.run-estimate strong {
  font-size: 0.82rem;
  font-weight: 900;
}

.run-estimate span,
.run-estimate small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.primary-btn.ready-submit {
  background: linear-gradient(135deg, #fffaf1, #ffffff);
  color: var(--accent-strong);
  border-color: rgba(138, 107, 63, 0.28);
}

.sandbox-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(250, 247, 240, 0.86)),
    var(--surface-solid);
  box-shadow: var(--shadow-card);
  padding: 10px;
  display: grid;
  gap: 10px;
  min-height: 300px;
}

.sandbox-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.sandbox-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.sandbox-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.compact {
  min-height: 34px !important;
  height: 34px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.sandbox-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  min-height: 240px;
}

.terminal-panel {
  min-width: 0;
  min-height: 0;
  border-radius: 18px;
  background:
    linear-gradient(180deg, #ffffff, #fffdf8);
  border: 1px solid rgba(30, 26, 18, 0.12);
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 16px 36px rgba(40, 31, 18, 0.08);
}

.sandbox-terminal {
  min-height: 230px;
  max-height: none;
  overflow: auto;
  padding: 16px;
  color: #29231a;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  line-height: 1.58;
  white-space: pre-wrap;
}

.terminal-line {
  color: rgba(41, 35, 26, 0.92);
}

.terminal-line.command {
  color: var(--accent-strong);
  font-weight: 800;
}

.terminal-line.success {
  color: #247245;
}

.terminal-line.warn {
  color: #8a6218;
}

.terminal-line.error {
  color: #9f2f26;
}

.terminal-input-row {
  height: 40px;
  border-top: 1px solid rgba(30, 26, 18, 0.1);
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  padding: 0 10px;
  color: var(--accent-strong);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  background: rgba(250, 247, 241, 0.82);
}

.terminal-input-row input {
  height: 32px;
  border: none;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.78rem;
}

.terminal-input-row input:focus {
  box-shadow: none;
  background: transparent;
}

.sandbox-preview {
  width: 100%;
  height: 100%;
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}

#packsLink,
.sandbox-preview[hidden] {
  display: none !important;
}

.empty-list {
  padding: 16px;
  color: var(--muted);
  font-weight: 650;
}

.topbar {
  height: 62px;
  margin-top: 12px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 252, 245, 0.78));
  box-shadow:
    0 18px 46px rgba(44, 34, 19, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.workspace {
  height: calc(100vh - 74px);
  padding-top: 14px;
}

.filework-app {
  grid-template-columns: 304px minmax(0, 1fr);
  gap: 16px;
}

.folder-rail,
.work-panel {
  border-radius: 32px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(253, 250, 244, 0.9));
  box-shadow:
    0 30px 84px rgba(44, 34, 19, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.86) inset;
}

.folder-rail {
  padding: 16px;
  gap: 14px;
}

.work-panel {
  padding: 16px;
}

.folder-controls,
.file-list-card,
.editor-card,
.credit-card,
.plan-panel,
.sandbox-card {
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    0 18px 46px rgba(44, 34, 19, 0.09),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.folder-controls,
.file-list-card,
.editor-card,
.credit-card {
  border-radius: 24px;
  padding: 14px;
}

.folder-controls {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(250, 245, 235, 0.74));
}

.files-grid {
  gap: 14px;
}

.file-list {
  border-radius: 22px;
  padding: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(253, 250, 244, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.file-row {
  min-height: 50px;
  border-bottom: none;
  border-radius: 16px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.file-row:hover,
.file-row.active {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(44, 34, 19, 0.08);
}

.editor-card textarea {
  border-radius: 26px;
  background: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 18px 42px rgba(44, 34, 19, 0.08);
}

.sandbox-card {
  border-radius: 26px;
  min-height: 340px;
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(252, 248, 240, 0.86));
}

.sandbox-grid {
  min-height: 278px;
}

.terminal-panel {
  min-height: 278px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, #ffffff 0%, #fffdf8 100%);
  border: 1px solid rgba(30, 26, 18, 0.1);
  display: block;
  box-shadow:
    0 18px 44px rgba(44, 34, 19, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.96) inset;
}

.sandbox-command-input {
  width: 100%;
  height: 100%;
  min-height: 278px;
  resize: none;
  border: none;
  outline: none;
  background: transparent;
  color: #231d14;
  padding: 18px 20px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.65;
  white-space: pre-wrap;
  caret-color: var(--accent);
  box-shadow: none;
}

.sandbox-command-input:focus {
  background: transparent;
  box-shadow: inset 0 0 0 2px rgba(138, 107, 63, 0.18);
}

.sandbox-command-input::placeholder {
  color: rgba(35, 29, 20, 0.42);
}

.terminal-panel:focus-within {
  border-color: rgba(138, 107, 63, 0.28);
  box-shadow:
    0 22px 56px rgba(44, 34, 19, 0.12),
    0 0 0 4px rgba(138, 107, 63, 0.08);
}

@media (max-width: 940px) {
  .filework-app,
  .files-grid,
  .folder-controls,
  .model-grid,
  .workspace-side,
  .sandbox-grid {
    grid-template-columns: 1fr;
  }

  .folder-rail,
  .work-panel {
    min-height: auto;
  }

  .workspace-head {
    flex-direction: column;
  }

  .workspace-side,
  .plan-panel {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 620px) {
  .topbar,
  .workspace {
    width: calc(100vw - 18px);
  }

  .topbar {
    margin-top: 9px;
    padding: 0 10px 0 14px;
    border-radius: 18px;
  }

  .workspace {
    padding: 9px 0 18px;
  }

  .top-link,
  .credit-link {
    padding: 0 11px;
  }

  .top-link .material-symbols-rounded {
    display: none;
  }

  .workspace-actions,
  .workspace-actions button,
  .task-actions,
  .task-actions button {
    width: 100%;
  }

  .task-actions {
    grid-template-columns: 1fr;
  }

  .create-card {
    grid-template-columns: 1fr;
  }
}
