/* Bitcanario editor area */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url('../assets/fonts/archivo-var.woff2') format('woff2'); }
:root {
  --sun: #FFCC00; --sun-soft: #FFF3B8; --sea: #0768A9; --deep: #062A47; --foam: #EEF4F9; --paper: #fff;
  --laurel: #2F7A4D; --basalt: #23201D; --red: #B3261E; --ink-2: #4A5F72; --line: rgba(6, 42, 71, .15); --r: 8px;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font: 400 16px/1.5 var(--font); color: var(--deep); background: var(--foam); -webkit-font-smoothing: antialiased; }
h1, h2 { margin: 0; line-height: 1.1; font-weight: 800; font-stretch: 112%; letter-spacing: -.015em; }
p { margin: 0; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--ink-2); }
.small { font-size: .9rem; }
.nowrap { white-space: nowrap; }
:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; }
button { font: inherit; color: inherit; cursor: pointer; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 20px; border-radius: 999px; border: 2px solid transparent; font-weight: 700; text-decoration: none; white-space: nowrap; }
.btn:disabled { opacity: .55; cursor: wait; }
.btn-sm { min-height: 34px; padding: 5px 13px; font-size: .88rem; }
.btn-ink { background: var(--deep); color: #fff; }
.btn-ink:hover { background: var(--sea); }
.btn-line { background: var(--paper); border-color: var(--deep); color: var(--deep); }
.btn-line:hover { background: var(--deep); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger-line { background: var(--paper); border-color: rgba(179, 38, 30, .5); color: var(--red); }
.btn-danger-line:hover { background: var(--red); color: #fff; border-color: var(--red); }

label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .92rem; }
label > .muted { font-weight: 400; margin-top: -4px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=date], input[type=time], input[type=number], select, textarea {
  font: inherit; font-weight: 400; color: var(--deep); background: var(--paper); border: 1.5px solid rgba(6, 42, 71, .3); border-radius: var(--r); padding: 10px 12px; width: 100%; min-height: 44px;
}
textarea { resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sea); box-shadow: 0 0 0 3px rgba(7, 104, 169, .2); }
input:disabled { background: var(--foam); color: var(--ink-2); }
.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--deep); }
.stack { display: grid; gap: 14px; }
.narrow { max-width: 420px; margin-bottom: 24px; }
.msg { min-height: 1.3em; color: var(--red); font-weight: 600; font-size: .92rem; }
.msg.ok { color: var(--ink-2); }

.seg { display: inline-flex; background: var(--foam); padding: 4px; border-radius: 999px; gap: 2px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: .92rem; min-height: 36px; }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { background: var(--deep); color: #fff; }
.seg-sm button { padding: 4px 11px; min-height: 30px; font-size: .85rem; }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--sea); }
.auth-card { width: min(440px, 100%); background: var(--paper); border-radius: 14px; padding: 32px; border: 2px solid var(--deep); }
.auth-brand { color: inherit; display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-stretch: 112%; text-decoration: none; font-size: 1.1rem; }
.auth h1 { margin-top: 22px; font-size: 2rem; }
.auth .muted { margin-top: 6px; }
.auth .seg { margin: 22px 0 18px; }
.auth form { margin-bottom: 8px; }

/* app */
.app-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; padding: 10px 24px; background: var(--sea); color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .15); flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 9px 14px; border-radius: 999px; font-weight: 700; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--sea); }
.app-top :focus-visible { outline-color: var(--sun); }
.who { margin-left: auto; font-weight: 600; font-size: .92rem; }
.panel { max-width: 1180px; margin: 0 auto; padding: 32px 24px 64px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.panel-head h2 { font-size: 2rem; }
.panel-head .muted { margin-top: 6px; max-width: 70ch; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar select { width: auto; min-height: 40px; }
.table-wrap { background: var(--paper); border-radius: 12px; border: 1px solid var(--line); overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
.list th { text-align: left; font-size: .82rem; color: var(--ink-2); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.list td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.list tr:last-child td { border-bottom: 0; }
.acts { text-align: right; white-space: nowrap; }
.acts .btn { margin-left: 6px; }
.tag { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--foam); margin: 0 4px 4px 0; }
.tag-ok { background: #D7F2DF; color: #1D5A35; }
.tag-draft { background: #E6E6E6; color: #444; }
.tag-star { background: var(--sun-soft); color: #6A5200; }
.tag-cancel { background: #FBDAD6; color: var(--red); }
.kind { font-size: .8rem; font-weight: 700; color: var(--sea); }
.kind.k-walk { color: var(--laurel); } .kind.k-conference { color: var(--basalt); } .kind.k-talk, .kind.k-workshop { color: #8A6A00; }
.inline-form { display: grid; grid-template-columns: 2fr 1.2fr 1.6fr auto; gap: 12px; align-items: end; background: var(--paper); padding: 16px; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 16px; }
.inline-form select { min-height: 44px; }
.list td select { width: auto; min-height: 36px; padding: 5px 8px; }

/* dialogs */
.sheet { width: min(860px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: 14px; color: var(--deep); }
.sheet-wide { width: min(1000px, calc(100vw - 24px)); }
.sheet-small { width: min(460px, calc(100vw - 24px)); }
.sheet::backdrop { background: rgba(6, 42, 71, .55); }
.sheet form { display: flex; flex-direction: column; max-height: calc(100vh - 24px); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 1.4rem; }
.x { border: 0; background: none; font-size: 1.8rem; line-height: 1; width: 40px; height: 40px; border-radius: 50%; }
.x:hover { background: var(--foam); }
.sheet-body { padding: 20px 22px; overflow-y: auto; display: grid; grid-auto-rows: max-content; gap: 16px; }
.sheet-foot { display: flex; gap: 10px; align-items: center; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.sheet-foot .msg { margin-right: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
fieldset { border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px 14px; margin: 0; display: grid; gap: 12px; }
legend { font-weight: 700; padding: 0 6px; }
.flags { display: grid; gap: 8px; }
.upl { display: flex; gap: 8px; }
.upl input { flex: 1; }
.slug { display: flex; align-items: center; gap: 4px; }
.slug .muted { font-weight: 400; font-size: .85rem; white-space: nowrap; }
.thumb { max-height: 160px; width: auto; border-radius: 6px; border: 1px solid var(--line); }
input.big { font-size: 1.3rem; font-weight: 700; }
.md { border: 1.5px solid rgba(6, 42, 71, .3); border-radius: var(--r); overflow: hidden; background: var(--paper); }
.md-bar { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; padding: 6px; border-bottom: 1px solid var(--line); background: var(--foam); }
.md-bar > button { border: 1px solid transparent; background: none; border-radius: 6px; padding: 5px 10px; font-weight: 600; font-size: .88rem; min-height: 34px; }
.md-bar > button:hover { background: var(--paper); border-color: var(--line); }
.md-sp { flex: 1; }
.md textarea { border: 0; border-radius: 0; min-height: 380px; font-size: 1rem; }
.md textarea:focus { box-shadow: none; }
.md-prev { padding: 16px 20px; min-height: 380px; }
.prose { font-size: 1.05rem; line-height: 1.65; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 1.5rem; margin-top: 1.4em; }
.prose ul { padding-left: 1.3em; }
.prose blockquote { margin: 0; padding-left: 16px; border-left: 4px solid var(--sun); }
.prose img { border-radius: 6px; }
.prose a { color: var(--sea); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: var(--deep); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; transition: transform .25s, visibility .25s; z-index: 1000; max-width: calc(100vw - 32px); visibility: hidden; }
.toast.on { transform: translate(-50%, 0); visibility: visible; }

@media (max-width: 760px) {
  .app-top { padding: 10px 14px; gap: 10px; }
  .who { margin-left: 0; width: 100%; order: -1; text-align: right; font-size: .82rem; }
  .panel { padding: 22px 14px 48px; }
  .grid2, .grid3, .inline-form { grid-template-columns: 1fr; }
  .list thead { display: none; }
  .list tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .list td { display: block; border: 0; padding: 4px 14px; }
  .acts { text-align: left; white-space: normal; }
  .acts .btn { margin: 4px 6px 0 0; }
  .sheet-foot .msg { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
