/* gfxedit – ZwaytShop Designer */
:root {
    --paper: #faf7f2;
    --ink: #26221e;
    --muted: #7a7269;
    --line: #e4ddd2;
    --plum: #4a3268;
    --plum-dark: #392650;
    --amber: #d9a441;
    --ok: #2e7d4f;
    --error: #b3402f;
    --radius: 10px;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.55;
}
.topbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}
.brand { font-size: 19px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: 0.2px; }
.brand span { color: var(--plum); }
.brand em { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 6px; font-size: 15px; }
.topbar nav a { margin-left: 18px; color: var(--plum); text-decoration: none; font-size: 15px; }
.topbar nav a:hover { text-decoration: underline; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 28px 20px 60px; }
.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 24px; }

h1 { font-size: 26px; margin: 0 0 18px; font-weight: 650; }
h2 { font-size: 17px; margin: 0 0 14px; font-weight: 600; }
h3 { font-size: 15px; margin: 0 0 10px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 22px;
}
.card.narrow { max-width: 420px; margin: 60px auto; }

label { display: block; font-size: 14px; color: var(--muted); margin: 10px 0 4px; }
input[type=text], input[type=password], input[type=email], select {
    width: 100%; padding: 9px 11px;
    border: 1px solid var(--line); border-radius: 7px;
    font-size: 15px; background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--plum); outline-offset: 1px; border-color: var(--plum); }
input[type=range] { width: 100%; accent-color: var(--plum); }
.check { display: flex; align-items: center; gap: 8px; margin: 14px 0; color: var(--ink); font-size: 14px; }
.check input { width: auto; }

.btn {
    display: inline-block; padding: 9px 16px;
    border: 1px solid var(--line); border-radius: 7px;
    background: #fff; color: var(--ink);
    font-size: 14px; cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: var(--plum); color: var(--plum); }
.btn.primary { background: var(--plum); border-color: var(--plum); color: #fff; }
.btn.primary:hover { background: var(--plum-dark); color: #fff; }
.btn.danger { border-color: var(--error); color: var(--error); }
.btn.danger:hover { background: var(--error); color: #fff; }
.btn.small { padding: 5px 12px; font-size: 13px; }

.alert { padding: 10px 14px; border-radius: 7px; font-size: 14px; }
.alert.error { background: #fbeae7; color: var(--error); }
.alert.warn { background: #fdf3df; color: #8a6116; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 18px; }
.job-form button[type=submit] { margin-top: 8px; }

table.jobs, table.details { width: 100%; border-collapse: collapse; font-size: 14px; }
table.jobs th, table.jobs td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.details th { text-align: left; color: var(--muted); font-weight: 500; padding: 6px 16px 6px 0; width: 180px; vertical-align: top; }
table.details td { padding: 6px 0; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12.5px; font-weight: 600; vertical-align: middle; }
.badge.s-neu     { background: #efece6; color: var(--muted); }
.badge.s-entwurf { background: #fdf3df; color: #8a6116; }
.badge.s-fertig  { background: #e3f1e8; color: var(--ok); }

.linkbox { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.linkbox code {
    background: var(--paper); border: 1px solid var(--line);
    padding: 7px 11px; border-radius: 7px; font-size: 14px;
}
.danger-zone { margin-top: 6px; }

.surfaces { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.surface-card img {
    width: 100%; border: 1px solid var(--line); border-radius: 7px;
    background: repeating-conic-gradient(#f1ede6 0% 25%, #fff 0% 50%) 0 0 / 18px 18px;
}
.surface-card .dl { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ---------- Editor ---------- */

.editor-head { margin-bottom: 18px; }
.editor-head h1 { margin-bottom: 2px; }
.editor-grid {
    display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    gap: 26px; align-items: start;
}
@media (max-width: 760px) { .editor-grid { grid-template-columns: 1fr; } }

.stage-col { display: flex; flex-direction: column; align-items: center; }
.surface-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.surface-tabs .tab {
    padding: 7px 18px; border: 1px solid var(--line); border-radius: 20px;
    background: #fff; cursor: pointer; font-size: 14px; color: var(--muted);
}
.surface-tabs .tab.active { background: var(--plum); border-color: var(--plum); color: #fff; }

.stage-outer { display: flex; flex-direction: column; align-items: center; width: 100%; }
.stage-note {
    font-size: 12px; color: var(--error);
    padding: 3px 10px; margin: 4px 0;
    border: 1px dashed rgba(179, 64, 47, 0.55); border-radius: 6px;
    background: repeating-linear-gradient(45deg,
        rgba(179, 64, 47, 0.07), rgba(179, 64, 47, 0.07) 6px,
        transparent 6px, transparent 12px);
}
.product-body { display: inline-block; }
.product-body.shape-tumbler { border-radius: 26px 26px 46% 46% / 26px 26px 22% 22%; }
.product-body.shape-bag { border-radius: 10px 10px 18px 18px; }
.zone-frame {
    border: 1.5px dashed rgba(120, 200, 165, 0.95);
    border-radius: 3px;
    line-height: 0;
}
.zone-frame canvas { border-radius: 2px; }
.zone-hint { font-size: 13px; color: var(--muted); text-align: center; max-width: 420px; margin-top: 12px; }

.tools-col { display: flex; flex-direction: column; gap: 16px; }
.tool-card {
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 16px 18px;
}
.tool-row { display: flex; gap: 8px; align-items: center; }
.tool-row input[type=text] { flex: 1; }
.tool-card .btn { margin-top: 6px; }
.tool-card .btn.primary { width: 100%; margin-top: 10px; }
#save-draft { width: 100%; }

.status-msg { font-size: 13.5px; min-height: 18px; margin: 10px 0 0; color: var(--muted); }
.status-msg.ok { color: var(--ok); }
.status-msg.error { color: var(--error); }
