.tools-wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px clamp(16px, 3vw, 42px) 72px;
}

.tools-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.tools-intro .sub { max-width: 680px; margin-bottom: 0; line-height: 1.65; }

.privacy-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e2f3ee;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 700;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.tool-card {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--navy);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tool-card:hover,
.tool-card.aktif {
  transform: translateY(-2px);
  border-color: #9cb0c7;
  box-shadow: 0 10px 28px rgba(20, 38, 62, 0.08);
}

.tool-card.aktif { outline: 2px solid var(--gold); outline-offset: 1px; }

.tool-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--navy);
  color: var(--gold);
  font-family: "Fraunces", serif;
  font-size: 0.78rem;
  font-weight: 700;
}

.tool-card h2 { font-size: 0.95rem; margin-bottom: 4px; }
.tool-card p { color: var(--muted); font-size: 0.78rem; line-height: 1.45; }

.tool-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr);
  gap: 0;
  overflow: hidden;
  padding: 0;
}

.tool-form-area { padding: 28px; }
.tool-side {
  padding: 28px;
  background: var(--navy);
  color: #fff;
}
.tool-side h3 { font-family: "Fraunces", serif; font-size: 1.25rem; margin-bottom: 8px; }
.tool-side p { color: #c8d4e4; font-size: 0.86rem; line-height: 1.65; }
.tool-side ul { margin: 18px 0 0 18px; color: #dbe4ef; font-size: 0.82rem; line-height: 1.8; }

.drop-zone {
  position: relative;
  border: 2px dashed #b8c6d6;
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  background: #f8fafc;
  transition: border-color 0.15s, background 0.15s;
}
.drop-zone.dragging { border-color: var(--teal); background: #eff9f6; }
.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.drop-zone strong { display: block; margin-bottom: 5px; }
.drop-zone span { color: var(--muted); font-size: 0.78rem; }
.file-summary { min-height: 20px; margin-top: 10px; color: var(--teal); font-size: 0.8rem; font-weight: 600; }

.tool-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.tool-options .field { margin: 0; }
.tool-options input[type="range"] { padding: 0; }
.quality-value { color: var(--teal); font-weight: 700; }

.tool-actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.tool-status { min-height: 22px; color: var(--muted); font-size: 0.82rem; }
.tool-status.error { color: var(--red); }
.tool-status.success { color: var(--teal); }

.ai-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.menu button.premium-locked { color: #f4d99c; }
.premium-lock {
  display: none;
  max-width: 620px;
  margin: 20px auto;
  padding: 42px 28px;
  border: 1px solid #ead4a4;
  border-radius: 16px;
  background: linear-gradient(145deg, #fffdf7, #fbf1dd);
  text-align: center;
  box-shadow: 0 16px 44px rgba(20, 38, 62, 0.09);
}
.premium-lock.show { display: block; }
.premium-lock-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 20px;
  background: var(--navy);
  font-size: 2rem;
}
.premium-lock h2 { font-family: "Fraunces", serif; font-size: 1.45rem; margin-bottom: 8px; }
.premium-lock p { max-width: 470px; margin: 0 auto 20px; color: var(--muted); font-size: 0.9rem; line-height: 1.65; }
.premium-lock-status { min-height: 22px; margin-top: 14px; color: var(--teal); font-size: 0.82rem; font-weight: 600; }
.premium-workspace.locked { display: none; }
.upgrade-request {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fbf1dd;
  color: #8a6210;
  font-size: 0.7rem;
  font-weight: 700;
}
.ai-panel { min-height: 390px; display: flex; flex-direction: column; }
.ai-panel textarea { flex: 1; min-height: 260px; resize: vertical; line-height: 1.6; }
.ai-panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; }
.ai-panel-head h2 { font-family: "Fraunces", serif; font-size: 1.1rem; }
.char-count { color: var(--muted); font-size: 0.75rem; }
.ai-mode {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.ai-mode button {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ai-mode button strong { display: block; font-size: 0.9rem; margin-bottom: 3px; }
.ai-mode button span { color: var(--muted); font-size: 0.75rem; }
.ai-mode button.aktif { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: #f5f8fb; }
.ai-disclaimer { margin-top: 14px; color: var(--muted); font-size: 0.76rem; line-height: 1.5; }

@media (max-width: 900px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-workbench { grid-template-columns: 1fr; }
  .tool-side { order: -1; }
  .ai-layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .tools-intro { align-items: start; flex-direction: column; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 96px; }
  .tool-options, .ai-mode { grid-template-columns: 1fr; }
  .tool-form-area, .tool-side { padding: 20px; }
}
