/**
 * Atölye Pro — görsel katman (html.design-pro)
 * Geri alma: design-revert.js + DESIGN_REVERT.md
 */

/* —— Kabuk ve görünümler —— */
html.design-pro .shell {
  max-width: 960px;
  padding: 0 var(--space-4) var(--space-8);
}

html.design-pro body.calc-view-active .shell {
  max-width: 1320px;
}

/* Ana panel genişliği → home-screen.css */

html.design-pro .app-global-err {
  margin: var(--space-3) 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  border: 1px solid rgba(180, 35, 24, 0.25);
  background: var(--err-bg);
  font-size: var(--text-sm);
}

/* —— Kartlar —— */
html.design-pro .card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-5);
  box-shadow: var(--shadow-sm);
  background: var(--card);
}

html.design-pro .card h2,
html.design-pro .form-card h2.sub {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-4);
}

html.design-pro .form-section-title {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

/* —— Formlar —— */
html.design-pro label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--space-3);
}

html.design-pro input,
html.design-pro select,
html.design-pro textarea,
html.design-pro .catalog-code-input {
  margin-top: var(--space-1);
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: var(--text-base);
  background: var(--card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

html.design-pro input:focus,
html.design-pro select:focus,
html.design-pro textarea:focus,
html.design-pro .catalog-code-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

html.design-pro .hint {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: var(--leading);
}

html.design-pro .ok {
  color: var(--ok);
  background: var(--ok-bg);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  font-size: var(--text-sm);
}

html.design-pro .err {
  color: var(--err);
  background: var(--err-bg);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  font-size: var(--text-sm);
}

/* —— Butonlar —— */
html.design-pro .btn {
  width: auto;
  max-width: 100%;
  min-height: 2.5rem;
  margin-top: var(--space-2);
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  font-size: var(--text-sm);
  font-weight: 600;
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s, transform 0.08s;
}

html.design-pro .btn:hover {
  background: var(--surface-sunken);
  border-color: var(--line);
}

html.design-pro .btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

html.design-pro .btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-green);
  box-shadow: var(--shadow-sm);
}

html.design-pro .btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

html.design-pro .btn-ghost,
html.design-pro .btn.btn-ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--accent);
}

html.design-pro .btn-ghost:hover {
  background: var(--accent-muted);
}

html.design-pro .btn.btn-sm {
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  font-size: var(--text-xs);
}

html.design-pro .btn-danger {
  border-color: rgba(180, 35, 24, 0.35);
  color: var(--err);
}

html.design-pro .btn-danger:hover {
  background: var(--err-bg);
}

html.design-pro .btn-link {
  font-weight: 600;
  color: var(--accent);
}

/* Tam genişlik CTA (kurulum / launch / form gövdesi) */
html.design-pro .setup-btn-wide,
html.design-pro .launch-btn,
html.design-pro .setup-nav .btn,
html.design-pro .form-card > .btn:not(.btn-sm):not(.btn-ghost):not(.btn-link),
html.design-pro .card > .btn.primary:only-of-type {
  width: 100%;
  min-height: 2.75rem;
  border-radius: var(--radius);
}

html.design-pro .app-modal-foot .btn,
html.design-pro .finance-modal-foot .btn,
html.design-pro .row .btn,
html.design-pro .calc-price-row .btn {
  width: auto;
}

/* Ana panel → home-screen.css */

html.design-pro .home-hero:not(.home-pro .home-hero) {
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  box-shadow: var(--shadow);
}

/* —— Kurulum —— */
html.design-pro .setup-view {
  padding-top: var(--space-4);
}

html.design-pro .setup-shell {
  max-width: 640px;
}

html.design-pro .setup-steps {
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

html.design-pro .setup-step-dot {
  font-size: var(--text-xs);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
}

html.design-pro .setup-step-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-green);
  font-weight: 600;
}

html.design-pro .setup-panel {
  padding: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow);
}

html.design-pro .setup-catalog-card,
html.design-pro .setup-import-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-sunken);
}

html.design-pro .setup-title {
  font-size: var(--text-2xl);
  letter-spacing: -0.02em;
}

/* Açılış ekranı → launch-screen.css */

/* —— Tablolar (sipariş, teklif, stok, kullanıcı) —— */
html.design-pro .orders-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: auto;
  box-shadow: var(--shadow-sm);
}

html.design-pro .orders-table {
  font-size: var(--text-sm);
  line-height: var(--leading-tight);
}

html.design-pro .orders-table th,
html.design-pro .orders-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

html.design-pro .orders-table th {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-sunken);
  position: sticky;
  top: 0;
  z-index: 1;
}

html.design-pro .orders-table tbody tr:hover td {
  background: var(--green-tint);
}

html.design-pro .stock-table {
  font-size: var(--text-sm);
}

html.design-pro .stock-table th,
html.design-pro .stock-table td {
  padding: 0.45rem 0.6rem;
}

html.design-pro .stock-section {
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--line);
  padding: var(--space-4);
}

html.design-pro .stock-type {
  border-radius: var(--radius);
  transition: border-color 0.12s, background 0.12s;
}

html.design-pro .stock-type.active,
html.design-pro .stock-type:hover {
  border-color: var(--accent);
  background: var(--green-tint);
}

html.design-pro .paspartu-group-card {
  border-radius: var(--radius-lg);
}

html.design-pro .paspartu-summary-card {
  border-radius: var(--radius-lg);
  background: var(--green-tint);
}

/* —— Modallar —— */
html.design-pro .app-modal-backdrop,
html.design-pro .finance-modal-backdrop {
  background: rgba(15, 20, 18, 0.48);
  backdrop-filter: blur(6px);
}

html.design-pro .app-modal-card,
html.design-pro .finance-modal-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

html.design-pro .app-modal-head,
html.design-pro .finance-modal-head {
  padding: var(--space-4) var(--space-5);
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--line);
}

html.design-pro .app-modal-head h2,
html.design-pro .app-modal-head h3,
html.design-pro .finance-modal-head h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

html.design-pro .app-modal-body,
html.design-pro .finance-modal-body {
  padding: var(--space-4) var(--space-5);
}

html.design-pro .app-modal-foot,
html.design-pro .finance-modal-foot,
html.design-pro .panel-form-foot {
  padding: var(--space-3) var(--space-5);
  background: var(--surface-sunken);
  border-top: 1px solid var(--line);
  gap: var(--space-2);
}

html.design-pro .modal-close-btn {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  color: var(--muted);
  transition: background 0.12s, color 0.12s;
}

html.design-pro .modal-close-btn:hover {
  background: var(--accent-muted);
  color: var(--text);
}

/* —— Hesap ekranı —— */
html.design-pro body.calc-view-active .form-card {
  border-radius: var(--radius-lg);
}

html.design-pro .calc-mode-chips,
html.design-pro .calc-subchips-btns {
  gap: var(--space-2);
}

html.design-pro .calc-chip,
html.design-pro .calc-subchip {
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 600;
  border: 1px solid var(--line);
  padding: 0.4rem 0.75rem;
}

html.design-pro .calc-chip.active,
html.design-pro .calc-subchip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-green);
}

html.design-pro .calc-price-row {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4) var(--space-5);
}

html.design-pro .calc-live-price {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--green-deep);
}

html.design-pro .mat-row {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-sunken);
  padding: var(--space-3);
}

html.design-pro .picker-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

html.design-pro .picker-tab.active,
html.design-pro .picker-filter.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-green);
}

html.design-pro .picker-filter {
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
}

/* Özet paneli — koyu, okunaklı (iş akışı odaklı) */
html.design-pro body.calc-view-active #calc_summary.summary {
  border-radius: var(--radius-xl);
  border: 1px solid #3d4540;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(160deg, #2a3034 0%, #1e2326 55%, #181c1f 100%);
}

html.design-pro .calc-fiyat-breakdown-table th,
html.design-pro .calc-fiyat-breakdown-table td {
  padding: 0.5rem 0.65rem;
  font-size: var(--text-sm);
}

html.design-pro .calc-fiyat-breakdown-table tr.row-ozet td {
  background: var(--green-tint);
  font-weight: 600;
}

/* —— Maliyet kademe paneli —— */
html.design-pro .maliyet-kademe-panel {
  margin: var(--space-4) 0;
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-sunken);
}

html.design-pro .maliyet-kademe-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}

html.design-pro .maliyet-kademe-table th {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--surface-sunken);
}

html.design-pro .maliyet-kademe-table th,
html.design-pro .maliyet-kademe-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

html.design-pro .maliyet-kademe-extras label {
  font-size: var(--text-sm);
}

/* —— Finans / POS / bildirim —— */
html.design-pro .finance-panel-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--space-3);
}

html.design-pro .action-toast {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  font-weight: 500;
}

/* Sipariş kartları → orders-screen.css + app.css (.order-info-card) */

/* —— Giriş —— */
html.design-pro .login-card,
html.design-pro #view_login .card {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

/* —— Mobil —— */
@media (max-width: 640px) {
  html.design-pro .shell {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }

  html.design-pro .app-modal {
    padding: 0;
    align-items: flex-end;
  }

  html.design-pro .app-modal-card {
    width: 100%;
    max-height: 92dvh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  html.design-pro .btn:not(.setup-btn-wide):not(.launch-btn) {
    min-height: 2.75rem;
  }
}

/* —— Finans / kasa —— */
html.design-pro .finance-page-title {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

html.design-pro .finance-topbar {
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-4);
}

html.design-pro .finance-modal-card {
  border-radius: var(--radius-xl);
}

/* —— Bildirimler —— */
html.design-pro .notify-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

html.design-pro .notify-template-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  margin-bottom: var(--space-3);
}

html.design-pro .notify-template-block summary {
  font-weight: 600;
  font-size: var(--text-sm);
  padding: var(--space-3) var(--space-4);
}

html.design-pro .notify-email-preview {
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

/* —— Panel formları —— */
html.design-pro .panel-field-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
}

html.design-pro .panel-field-input {
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
}

html.design-pro .panel-field-hint {
  font-size: var(--text-xs);
  color: var(--muted);
}

/* —— Çerçeve seçici ızgarası —— */
html.design-pro .frame-tile,
html.design-pro .frame-picker-item {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: border-color 0.12s, box-shadow 0.12s;
}

html.design-pro .frame-tile.active,
html.design-pro .frame-tile:hover,
html.design-pro .frame-picker-item.active,
html.design-pro .frame-picker-item:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-muted);
}

/* —— Teklif özeti modal —— */
html.design-pro .quote-modal-card .summary {
  border-radius: var(--radius-lg);
}

html.design-pro .quote-opt-section-title {
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

/* —— Özet / fiyat —— */
html.design-pro .summary .price {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

html.design-pro .stock-warn {
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
}
