/* Imasto dashboard — the client gallery's design language (gallery.css), applied to
   the photographer's side: centred header block with kicker + thin display title,
   tracked-uppercase micro-labels, hairline sections instead of boxed cards, black
   default buttons with sage only for the primary action, the same switch and
   share-row controls the client sees. Palette tokens come from theme.css. */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font: 16px/1.5 var(--ui);
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); }
h1 { font-weight: 400; font-size: clamp(24px, 4vw, 36px); letter-spacing: .01em; }
h2, .lbl {
  font-size: 12px; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink); margin-bottom: 14px;
}
.mut { color: var(--mut); font-size: 14px; }
.meta { color: var(--mut); font-size: 14px; margin-top: .3rem; }
.err { color: #c0392b; font-size: 14px; margin-bottom: 14px; }

/* slim top strip: brand + account links, tracked like the gallery kicker */
.top {
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  padding: 16px clamp(14px, 4vw, 48px) 0;
  font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
}
.top a, .top button { color: var(--mut); text-decoration: none; font: inherit; letter-spacing: inherit; text-transform: inherit; background: none; border: 0; cursor: pointer; }
.top a:hover, .top button:hover { color: var(--ink); }
.top nav { display: flex; gap: 22px; align-items: center; }
.top .who { color: var(--ink); }

/* centred header block — same as the gallery's .bar */
.bar {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 4px;
  padding: clamp(18px, 4vw, 40px) clamp(14px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}
.kicker {
  font-size: 12px; font-weight: 600;
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--mut); margin-bottom: .4rem;
}
.bar .st { vertical-align: 4px; margin-left: 6px; }
.crumbs { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }

/* content column: hairline-separated sections, no boxes */
main { max-width: 760px; margin: 0 auto; padding: 0 20px 40px; }
.card { padding: 30px 0; border-bottom: 1px solid var(--line); }
.card:last-child { border-bottom: 0; }
.card p + p { margin-top: 8px; }
.card.narrow { max-width: 430px; margin: 10vh auto 0; border: 0; text-align: center; }
.card.narrow h1 { margin-bottom: .6rem; }
.card.narrow form { text-align: left; margin-top: 18px; }
.card.narrow .btn { width: 100%; padding: .9em; margin-top: 4px; }
.card.narrow .mut { margin-top: 16px; }
.card.err { border: 1px solid #dcaaa5; padding: 14px 18px; margin: 16px 0; }

/* two-column panel like the gallery's — every edge on the same two vertical lines */
.panel {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px clamp(24px, 4vw, 48px); align-items: start;
}
@media (max-width: 680px) { .panel { grid-template-columns: 1fr; } }

/* forms */
label { display: block; margin-bottom: 14px; font-size: 13px; color: var(--mut); }
input, textarea, select {
  width: 100%; padding: 10px 12px; margin-top: 5px;
  border: 1px solid var(--line); border-radius: 3px;
  font: inherit; font-size: 15px; color: var(--ink); background: #fafafa;
}
input { border-bottom: 2px solid var(--ink); border-radius: 3px 3px 0 0; }
input:focus, textarea:focus, select:focus { outline: none; border-bottom-color: var(--accent); }
textarea:focus { border-color: var(--accent); }
.newform { display: flex; flex-direction: column; gap: 16px; }
.newform input[name=title] { margin: 0; font-size: 17px; }
.modes { display: flex; flex-wrap: wrap; gap: 8px; }
.mode {
  display: inline-flex; align-items: center;
  font-size: 13px; color: var(--mut); cursor: pointer; margin: 0;
  border: 1px solid var(--line); border-radius: 999px; padding: .4em 1em;
  transition: all .15s;
}
.mode input { display: none; }
.mode:hover { color: var(--ink); border-color: var(--ink); }
.mode:has(:checked) { background: var(--accent); border-color: var(--accent); color: #fff; }
.modebox { display: none; flex-direction: column; gap: 10px; }
.modebox.on { display: flex; }
.modebox input { margin: 0; max-width: 300px; }
.newform .btn { align-self: flex-start; }

/* control rows — the gallery's settings box */
.ctrl-lbl {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase; color: var(--ink);
}
.ctrl-lbl strong { color: var(--accent-ink); }
.editrow { display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; user-select: none; }
.switch {
  flex: none; width: 54px; height: 30px; border-radius: 15px;
  border: 1px solid var(--line); background: #d8d8da;
  position: relative; cursor: pointer; padding: 0;
  transition: background .2s;
}
.switch .knob {
  position: absolute; top: 2px; left: 2px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35);
  transition: left .2s;
}
.switch.on { background: var(--accent); border-color: var(--accent); }
.switch.on .knob { left: 26px; }
.note { font-size: 13px; color: var(--mut); line-height: 1.5; }
.pubnote { font-size: 14px; color: var(--mut); font-style: italic; }
.pubnote.ok { color: var(--accent-ink); font-style: normal; font-weight: 700; }

/* share rows — monospace value + button, as in the gallery's publish box */
.sharerow { display: flex; gap: 8px; margin-top: 8px; }
.sharerow input {
  flex: 1; min-width: 0; margin: 0;
  font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink);
  border: 1px solid var(--line); border-bottom-color: var(--line); border-radius: 3px;
  padding: .6em .8em; background: #fafafa;
}
.sharerow .btn { flex: none; }
.stack { display: flex; flex-direction: column; gap: 8px; }

/* buttons — the gallery's voice: black outline default, sage primary, quiet ghost */
.btn {
  display: inline-block;
  font-family: var(--ui); font-size: 13px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  color: var(--ink); background: #fff;
  border: 1px solid var(--ink); border-radius: 3px;
  padding: .7em 1.3em; cursor: pointer;
  transition: all .15s;
}
.btn:hover { background: var(--ink); color: #fff; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(.88); }
.btn.ghost { border-color: var(--line); color: var(--mut); background: #fff; }
.btn.ghost:hover { background: #f4f4f5; color: var(--ink); }
.btn.tiny { font-size: 11px; padding: .45em .9em; }
.btn.tiny2 { padding: .6em 1em; font-size: 12px; width: 100%; text-align: center; }
.lnk { background: none; border: 0; color: var(--mut); cursor: pointer; font: inherit; font-size: 14px; text-decoration: underline; }

/* gallery list — hairline rows, like the grid's calm */
.g-list { display: flex; flex-direction: column; }
.g-row {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 6px;
  border-top: 1px solid var(--line);
  text-decoration: none; color: inherit;
  transition: background .15s;
}
.g-row:first-child { border-top: 0; }
.g-row:hover { background: #fafafa; }
.g-cover { width: 68px; height: 52px; object-fit: cover; border-radius: 2px; background: #f2f2f3; flex: none; }
.g-cover-empty { display: flex; align-items: center; justify-content: center; color: #c9c9cc; font-size: 20px; }
.g-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.g-main strong { font-size: 16px; font-weight: 600; }
.g-sub { color: var(--mut); font-size: 13.5px; }
.empty { text-align: center; color: var(--mut); padding: 30px 20px; font-style: italic; }

/* status pills */
.st {
  font-style: normal; font-family: var(--ui);
  padding: 3px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  background: #f4f4f5; color: var(--mut); flex: none;
}
.st-live { background: var(--accent-soft); color: var(--accent-ink); }
.st-processing, .st-uploading { background: #faf3e2; color: #8a6117; }
.st-mode { background: #fff; border: 1px solid var(--line); color: var(--mut); }

/* copyables */
code.copy {
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #fafafa; border: 1px solid var(--line);
  padding: 2px 8px; border-radius: 3px; user-select: all;
}
code.block { display: block; padding: 11px; margin-top: 6px; white-space: pre-wrap; word-break: break-all; }
.mailtext { font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; border-bottom: 1px solid var(--line); border-radius: 3px; }
details { margin-bottom: 8px; }
summary { cursor: pointer; }

/* tiers (Tellimus) keep their boxes — they are choices, not sections */
.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.tier-card { border: 1px solid var(--line); border-radius: 4px; padding: 24px 26px; }
.tier-card h2 { text-transform: none; letter-spacing: .01em; font-size: 19px; font-weight: 500; margin-bottom: 2px; }
.tier-cur { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tier-pre { outline: 2px solid var(--accent); outline-offset: 2px; }
.tier-price { font-size: 26px; font-weight: 400; margin: 2px 0 10px; }
.buyrow { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.ok-note { border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent-ink); padding: 14px 18px; margin: 16px 0; border-radius: 4px; }
.pay-hist { width: 100%; border-collapse: collapse; font-size: 14px; }
.pay-hist th, .pay-hist td { text-align: left; padding: 8px 10px 8px 0; border-top: 1px solid var(--line); }
.pay-hist th { border-top: 0; color: var(--mut); font-weight: 600; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; }

.foot { padding: 40px 20px 30px; text-align: center; font-size: 13px; color: var(--mut); }

@media (max-width: 700px) { .tier-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .g-cover { width: 54px; height: 44px; } .top nav { gap: 14px; } .top .who { display: none; } }

/* upload widget buttons speak the same button voice */
.up-btn {
  font-family: var(--ui); font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); background: #fff; border: 1px solid var(--ink); border-radius: 3px;
  padding: .45em .9em; cursor: pointer; transition: all .15s;
}
.up-btn:hover { background: var(--ink); color: #fff; }

/* Konto: accent picker + live demo of the pieces the colour touches */
.accentrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.accentrow input[type=color] { width: 54px; height: 38px; padding: 2px; margin: 0; border: 1px solid var(--line); border-radius: 3px; background: #fff; cursor: pointer; }
.accentdemo { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 4px; }

/* payment history: invoice column */
.pay-hist td.inv { text-align: right; padding-right: 0; }
/* äriregister autocomplete under the company field */
.ac { position: relative; }
.aclist { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; list-style: none; margin: 0; padding: 4px 0; background: #fff; border: 1px solid var(--line); border-radius: 0 0 3px 3px; box-shadow: 0 8px 22px rgba(28,28,30,.08); }
.aclist li { padding: 8px 12px; cursor: pointer; font-size: 14px; color: var(--ink); display: flex; justify-content: space-between; gap: 12px; }
.aclist li span { color: var(--mut); font-variant-numeric: tabular-nums; white-space: nowrap; }
.aclist li:hover, .aclist li.on { background: var(--accent-soft); }

/* feedback lines directly under the header block need air (John 2026-09-08) */
main > .pubnote, main > .err { margin-top: 28px; }
main > .pubnote + .card, main > .err + .card { padding-top: 22px; }
/* one button language: boxy, like everything else (John 2026-09-08: "I like the more boxy buttons more") */
.mode, .st { border-radius: 3px; }
.mode { padding: .45em 1em; }

/* create form: the three business models as three visible choices (John 2026-09-08) */
.modes { display: grid; grid-template-columns: 1fr; gap: 10px; }
.modecard { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 8px 32px; align-items: start; margin: 0; padding: 18px 20px 16px; border: 1px solid var(--line); border-radius: 3px; background: #fff; font-size: 14px; color: var(--ink); transition: border-color .15s; }
.mc-head { display: flex; flex-direction: column; gap: 6px; margin: 0; cursor: pointer; font-size: inherit; color: inherit; }
.mc-head > input[type=radio] { display: none; }
.modecard:hover { border-color: var(--ink); }
.modecard:has(:checked) { border-color: var(--accent-ink); box-shadow: inset 0 3px 0 var(--accent); }
.mc-name { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.mc-who { font-size: 13px; color: var(--mut); margin-top: -4px; }
.mc-text { color: var(--mut); line-height: 1.5; }
.modecard .modebox { display: flex; margin: 0; padding: 0; border: 0; gap: 10px; align-self: center; transition: opacity .15s; }
.modecard:not(:has(:checked)) .modebox { opacity: .5; }
.modecard:not(:has(:checked)) .modebox:hover { opacity: .8; }
.modecard .modebox .note { margin: 0; }
.modecard .modebox.on { display: flex; }
.modecard .modebox input { max-width: none; }
.modecard .editrow { gap: 12px; }
.modecard .ctrl-lbl { font-size: 11px; }
@media (max-width: 760px) { .modecard { grid-template-columns: 1fr; } .modecard .modebox { padding-top: 12px; border-top: 1px solid var(--line); } }

/* photo management grid */
.pbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 6px; }
.pcount { font-size: 14px; color: var(--mut); margin-right: 6px; }
.pcount b { color: var(--ink); font-variant-numeric: tabular-nums; }
.pspace { flex: 1; }
.pmove { width: auto; margin: 0; padding: .5em .8em; font-size: 13px; border-bottom: 1px solid var(--line); }
.pgrid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pset { flex: 0 0 100%; font-size: 12px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--mut); padding: 16px 0 4px; display: flex; gap: 12px; align-items: baseline; }
.pset .lnk { font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 400; }
.pit { position: relative; width: 132px; height: 100px; margin: 0; background: #f2f2f3; border-radius: 3px; overflow: hidden; cursor: pointer; outline: 2px solid transparent; outline-offset: -2px; transition: outline-color .12s; }
.pit img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.pit.on { outline-color: var(--accent-ink); }
.pit.on img { opacity: .78; }
.pit .ptick { position: absolute; top: 6px; left: 6px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; background: rgba(28,28,30,.35); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.pit.on .ptick { background: var(--accent-ink); }
.pit.on .ptick::after { content: ''; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pit .pname { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; padding: 3px 6px; background: rgba(28,28,30,.55); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .12s; }
.pit:hover .pname { opacity: 1; }
.pit.iscover::before { content: 'KAAS'; position: absolute; top: 6px; right: 6px; z-index: 1; font-size: 9px; font-weight: 700; letter-spacing: .12em; padding: 2px 6px; border-radius: 2px; background: var(--accent); color: #1c1c1e; }
.pit.dragging { opacity: .4; }
.pit.dropbefore { box-shadow: -3px 0 0 var(--accent-ink); }
.pset.dropset { color: var(--accent-ink); }
@media (max-width: 600px) { .pit { width: calc(33.33% - 4px); height: 90px; } }

/* create form: the cross-mode option row */
.optrow { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 3px; padding: 14px 20px; background: #fff; flex-direction: row; align-items: center; gap: 24px; }
.optrow .note { margin: 0; }
/* comments list on the manage page */
.clist { display: flex; flex-direction: column; }
.crow { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.crow:first-child { border-top: 0; }
.crow img { width: 72px; height: 54px; object-fit: cover; border-radius: 2px; }
.crow p { margin-top: 4px; font-size: 14px; }

.pit.isguest::after { content: 'KÜLALINE'; position: absolute; top: 6px; right: 6px; z-index: 1; font-size: 9px; font-weight: 700; letter-spacing: .12em; padding: 2px 6px; border-radius: 2px; background: rgba(28,28,30,.7); color: #fff; }

/* admin tables */
.pay-hist.adm td, .pay-hist.adm th { vertical-align: top; padding-right: 14px; font-size: 13.5px; }
.pay-hist .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tierform { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.tierform select, .tierform input { width: auto; margin: 0; padding: 4px 8px; font-size: 13px; }
