/* Product catalog: compact cards, spacious guidance and focused editing. */
.product-media-advice { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; margin:24px 0 32px; }
.product-media-advice h2 {font-size:1.2rem; margin:14px 0;}
.product-media-advice p {color:var(--text-muted);line-height:1.9;}
.product-list {display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:24px;align-items:start;}
.product-card {padding:20px;display:flex;flex-direction:column;gap:16px;min-width:0;}
.product-cover {width:100%;height:220px;object-fit:contain;border-radius:14px;background:var(--surface);}
.product-card-price {color:var(--accent-text);font-size:1.2rem;}
.product-card-description {color:var(--text-muted);line-height:1.7;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;}
.product-dialog {box-sizing:border-box;width:min(760px,calc(100% - 32px));max-height:88dvh;overflow:auto;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:22px;padding:28px;}
.product-dialog::backdrop {background:rgb(1 8 20 / .8);}
.product-dialog .panel {background:transparent;border:0;box-shadow:none;padding:0;}
.product-dialog h2 {font-size:1.5rem;margin:8px 0 24px;}
.product-dialog form {display:grid;gap:14px;}
.dialog-close {float:left;margin-bottom:16px;}
.photo-preview {display:flex;flex-wrap:wrap;gap:10px;}
.photo-preview img {width:92px;height:92px;object-fit:cover;border-radius:12px;}
.product-dialog input[type=file] {padding:14px;max-width:100%;}
@media(max-width:700px){.product-media-advice{grid-template-columns:1fr;gap:16px;}.product-dialog{padding:20px;}}
.product-knowledge-section {padding:20px;border:1px solid var(--line);border-radius:16px;margin:20px 0;}
.product-knowledge-section h3{font-size:1.15rem;margin:0 0 12px;}
.knowledge-row {display:grid;gap:12px;padding:14px;margin:14px 0;border:1px solid var(--line);border-radius:12px;background:var(--surface);}
.knowledge-row .danger {justify-self:start;}
.dialog-feedback {padding:14px;border:1px solid var(--danger);color:var(--danger-text);background:var(--danger-bg);border-radius:12px;}
body.workspace .product-media-advice .panel {padding:24px;background:var(--surface-2);border:1px solid var(--line);border-radius:18px;}
body.workspace .product-dialog .panel {padding:0;background:transparent;max-width:none;min-width:0;border:0;border-radius:0;margin:0;}
.product-dialog .dialog-close {width:42px;min-width:42px;height:42px;display:inline-flex;align-items:center;justify-content:center;float:left;padding:0;}
.product-dialog form label {margin:8px 0 0;}
.product-dialog form input,.product-dialog form textarea {margin:0;}
.product-dialog .product-card-actions {margin-top:8px;}
.product-dialog .knowledge-row label {margin:0;}
.product-dialog .product-knowledge-section {margin:10px 0;}
.product-dialog .product-knowledge-section .button {width:auto;}
.product-media-advice .section-label {font-size:13px;}
.knowledge-row .button.danger {background:var(--surface-2);color:var(--danger-text);border:1px solid var(--danger);}
/* Native file input stays accessible over the custom upload button. */
.product-dialog .photo-picker {position:relative;display:inline-flex;align-items:center;justify-content:center;gap:10px;justify-self:start;min-height:48px;padding:12px 22px;border:1px solid var(--accent);border-radius:12px;background:var(--accent);color:var(--on-accent);font-weight:700;cursor:pointer;overflow:hidden;}
.product-dialog .photo-picker:hover {background:var(--accent);}
.product-dialog .photo-picker:focus-within {outline:3px solid var(--text);outline-offset:3px;}
.product-dialog .photo-picker input[type=file] {position:absolute;inset:0;width:100%;height:100%;padding:0;margin:0;opacity:0;cursor:pointer;}
.photo-field-title {font-weight:700;margin-top:12px;}

/* Keep navigation visible in the original navy palette. */
body .topbar {position:sticky;top:0;z-index:100;background:var(--bg);border-bottom:1px solid var(--line);box-shadow:0 5px 20px #0003;}
html {scroll-padding-top:110px;}
.automation-section {margin:24px 0;padding:24px;border:1px solid var(--line);border-radius:18px;background:var(--surface);}
.automation-section h2 {font-size:1.3rem;margin:0 0 12px;}
.automation-card {display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px;border:1px solid var(--line);border-radius:14px;background:var(--surface);margin-top:14px;}
.automation-card h3 {font-size:1.1rem;margin:0 0 6px;}
.automation-card p {margin:0;color:var(--text-muted);}
.automation-account {direction:ltr;unicode-bidi:isolate;overflow-wrap:anywhere;}
.automation-toolbar {display:flex;gap:14px;align-items:end;flex-wrap:wrap;margin:20px 0;}
.automation-toolbar label {flex:1;min-width:180px;}
.automation-toolbar .button {width:auto;}
.automation-switch {display:flex;align-items:center;gap:10px;white-space:nowrap;font-weight:700;}
.automation-switch input {width:24px;height:24px;accent-color:var(--accent);}
.automation-note {line-height:1.9;color:var(--text-muted);}
@media(max-width:660px){.automation-card{align-items:flex-start;flex-direction:column;}.automation-section{padding:18px;}}.automation-switch input {appearance:none;position:relative;width:46px;height:26px;flex:none;margin:0;padding:0;border:1px solid var(--line-strong);border-radius:999px;background:var(--surface-3);cursor:pointer;}
.automation-switch input::before {content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;background:var(--text);border-radius:50%;}
.automation-switch input:checked {background:var(--accent);border-color:var(--accent);}
.automation-switch input:checked::before {transform:translateX(20px);background:var(--bg);}
.automation-switch input:focus-visible {outline:3px solid var(--warning-soft);outline-offset:3px;}
.automation-switch input:disabled {opacity:.55;cursor:not-allowed;}
/* Three compact automation sections with one action beside each account/conversation. */
.automation-global-card {margin:0;border:0;padding:0;background:transparent;}
.automation-global-card h2 {margin-bottom:6px;}
.automation-power {width:auto;min-width:140px;flex:none;}
.automation-power.is-running {background:var(--danger);border-color:var(--danger);color:var(--text);}
.automation-power.is-running:hover {background:var(--danger);}
.automation-card > div {min-width:0;}
.automation-card p {font-size:13px;overflow-wrap:anywhere;}
.automation-section > h2 {margin-bottom:18px;}
@media(max-width:660px){.automation-card{flex-direction:row;align-items:center;gap:12px;}.automation-power{min-width:108px;padding:10px;font-size:12px;}.automation-card h3{font-size:14px;}}
.catalog-heading {display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:28px;}
.catalog-counter {padding:16px 22px;border:1px solid color-mix(in srgb, var(--accent) 37.6%, transparent);border-radius:16px;background:color-mix(in srgb, var(--accent) 6.3%, transparent);white-space:nowrap;}
.catalog-counter strong {color:var(--orange);font-size:28px;margin-inline-start:12px;}
.catalog-search {display:flex;gap:12px;padding:16px;border:1px solid var(--line);border-radius:16px;margin-bottom:28px;background:var(--surface);}
.catalog-search input {flex:1;min-width:0;margin:0;}
.catalog-search .button {width:auto;}
.catalog-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:24px;}
.catalog-card {border:1px solid var(--line);border-radius:20px;overflow:hidden;background:var(--surface);min-width:0;}
.catalog-photo {display:flex;align-items:center;justify-content:center;width:100%;height:240px;object-fit:contain;background:var(--surface);color:var(--text-muted);}
.catalog-card-content {padding:20px;display:grid;gap:12px;}
.catalog-card h2 {font-size:19px;margin:0;}
.catalog-price {color:var(--orange);font-size:22px;}
.catalog-description {color:var(--text-muted);margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.catalog-badge {font-size:12px;color:var(--success-text);}
.catalog-badge.paused {color:var(--warning-text);}
.catalog-card .button {width:100%;}
.catalog-gallery {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:20px 0;}
.catalog-gallery img {width:100%;max-height:300px;object-fit:contain;border-radius:12px;background:var(--surface);}
.catalog-full-description {white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.9;}
.account-settings-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;align-items:start;}
.settings-card {background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:26px;}
.settings-card h2 {font-size:20px;border-bottom:1px solid var(--line);padding-bottom:16px;margin:0 0 20px;}
.settings-card form {display:grid;gap:10px;}
.settings-card input {margin:0;}
.settings-card .button {justify-self:start;width:auto;margin-top:12px;}
.account-settings-column {display:flex;flex-direction:column;gap:24px;min-width:0;}
.subscription-countdown {display:flex;align-items:baseline;flex-wrap:wrap;gap:12px;margin:20px 0;}
.subscription-countdown strong {font-size:48px;font-weight:800;line-height:1.2;color:var(--orange);font-variant-numeric:tabular-nums;}
.subscription-countdown span {font-size:14px;color:var(--text-muted);}
.subscription-expiry-label {margin:0 0 6px;font-size:13px;color:var(--text-muted);}
.subscription-ending {border-color:var(--accent);box-shadow:0 0 0 1px color-mix(in srgb, var(--accent) 14.9%, transparent);}
.subscription-inactive .subscription-countdown strong {color:var(--text-muted);}

@media(max-width:760px){.account-settings-grid{grid-template-columns:1fr;}.catalog-heading{align-items:flex-start;flex-direction:column;}.catalog-search{flex-wrap:wrap;}.catalog-search input{flex-basis:100%;}.catalog-gallery{grid-template-columns:1fr;}}
.catalog-search {align-items:center;}
.catalog-search .button {margin:0;}


.settings-card form label {margin:4px 0 0;}
