/* aleksic.app · clean, square-edged UI · Light / Dark / Cute */
:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101217;
  --surface: #181b22;
  --surface-raised: #1e222b;
  --nav: #15181e;
  --text: #ecedf1;
  --muted: #969ba6;
  --border: #323640;
  --accent: #9eb6ea;
  --accent-contrast: #101622;
  --button-hover: #b0c5ef;
  --success: #90cfb2;
  --danger: #ea9198;
  --input: #14171c;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5f3;
  --surface: #fff;
  --surface-raised: #f8f8f6;
  --nav: #f0f0ee;
  --text: #252830;
  --muted: #656a75;
  --border: #d4d7dd;
  --accent: #273f6b;
  --accent-contrast: #fff;
  --button-hover: #385582;
  --success: #286d4a;
  --danger: #b32f44;
  --input: #fff;
}
html[data-theme="cute"] {
  color-scheme: light;
  --bg: #fff4f8;
  --surface: #fffcfe;
  --surface-raised: #fff0f6;
  --nav: #fff0f6;
  --text: #402839;
  --muted: #876778;
  --border: #ebcddc;
  --accent: #bc3c7a;
  --accent-contrast: #fff;
  --button-hover: #a92d6b;
  --success: #357353;
  --danger: #b73252;
  --input: #fff;
}
* { box-sizing: border-box; border-radius: 0 !important; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  transition: background-color .16s ease, color .16s ease;
}
button,input,textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
h1,h2,h3,p { margin-top: 0; }
h1 { letter-spacing: -.045em; font-weight: 660; }
h2 { letter-spacing: -.02em; }
.site-shell { min-height: 100vh; }
.site-header {
  min-height: 72px;
  padding: 0 clamp(20px, 5vw, 74px);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.wordmark { display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; font-size: 17px; font-weight: 700; letter-spacing: -.045em; }
.wordmark .mark { padding: 1px 6px; background: var(--accent); color: var(--accent-contrast); font-size: 16px; font-weight: 760; letter-spacing: -.08em; }
.wordmark-tail { color: var(--muted); }
.header-right { display: flex; align-items: center; gap: 24px; }
.signed-in { color: var(--muted); font-size: 12px; }
.theme-switch { border: 1px solid var(--border); display: inline-flex; align-items: stretch; }
.theme-switch button {
  background: transparent;
  color: var(--muted);
  border: 0;
  border-right: 1px solid var(--border);
  padding: 8px 13px;
  min-width: 54px;
  font-size: 12px;
  font-weight: 550;
}
.theme-switch button:last-child { border-right: 0; }
.theme-switch button:hover { background: var(--surface-raised); color: var(--text); }
.theme-switch button.is-selected,
.theme-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-contrast);
}
.global-messages { width: min(1120px, calc(100% - 40px)); margin: 20px auto 0; display: grid; gap: 8px; }
.message { padding: 12px 15px; background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.message-error { border-left: 3px solid var(--danger); }
.message-success { border-left: 3px solid var(--success); }
.kicker { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .14em; margin-bottom: 8px; }
.auth-layout { min-height: calc(100vh - 73px); display: grid; place-items: center; padding: 36px 20px 72px; }
.auth-panel { width: 100%; max-width: 408px; background: var(--surface); padding: 36px; border: 1px solid var(--border); }
.panel-header { margin-bottom: 27px; }
.auth-panel h1 { font-size: 30px; line-height: 1.2; margin: 0; }
.field-stack { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.field-stack label { font-size: 12px; color: var(--muted); font-weight: 650; margin-top: 10px; }
.field-stack input,.field-stack textarea {
  color: var(--text);
  background: var(--input);
  border: 1px solid var(--border);
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  outline: none;
}
.field-stack textarea { min-height: 95px; resize: vertical; }
.field-stack input::placeholder,.field-stack textarea::placeholder { color: var(--muted); opacity: .75; }
.field-stack input:focus,.field-stack textarea:focus { border-color: var(--accent); }
.password-field { position: relative; }
.password-field input { padding-right: 92px; }
.password-field button {
  position: absolute; right: 1px; top: 1px; bottom: 1px;
  border: 0; padding: 0 12px; background: var(--surface-raised); color: var(--muted); font-size: 12px;
}
.password-field button:hover { color: var(--text); }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 16px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 650;
  min-height: 42px;
}
.button-primary { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.button-primary:hover { background: var(--button-hover); border-color: var(--button-hover); }
.button-secondary { background: var(--surface-raised); color: var(--text); }
.button-secondary:hover { border-color: var(--accent); }
.button-wide { width: 100%; margin-top: 20px; }
.back-link { align-self: flex-start; font-size: 13px; color: var(--muted); margin-top: 8px; }
.back-link:hover { color: var(--accent); }
.field-error { font-size: 12px; color: var(--danger); margin: 0 0 3px; }
.workspace { display: grid; grid-template-columns: 210px minmax(0,1fr); min-height: calc(100vh - 73px); }
.side-nav { padding: 27px 14px; background: var(--nav); border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: stretch; }
.nav-title { color: var(--muted); font-size: 10px; font-weight: 680; letter-spacing: .15em; margin: 0 12px 20px; }
.nav-link { display: block; border: 0; padding: 11px 12px; color: var(--muted); background: transparent; font-size: 13px; text-align: left; width: 100%; }
.nav-link:hover { background: var(--surface-raised); color: var(--text); }
.nav-link.is-active { color: var(--accent); background: var(--surface-raised); border-left: 2px solid var(--accent); padding-left: 10px; font-weight: 650; }
.nav-button { font-family: inherit; }
.sidebar-account { border-top: 1px solid var(--border); padding: 17px 12px; margin-top: auto; }
.sidebar-account span { display: block; font-size: 13px; font-weight: 650; }
.sidebar-account small { color: var(--muted); font-size: 11px; }
.workspace-main { min-width: 0; width: min(1170px, 100%); margin: 0 auto; padding: 35px clamp(22px, 4vw, 55px) 75px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.page-heading h1 { margin: 0; font-size: 30px; line-height: 1.1; }
.role-label { border: 1px solid var(--border); color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .1em; padding: 5px 9px; }
.stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 22px; border: 1px solid var(--border); background: var(--surface); }
.stat { padding: 18px 20px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.stat:last-child { border-right: 0; }
.stat span { font-size: 12px; color: var(--muted); }
.stat strong { font-size: 22px; line-height: 1.3; font-weight: 680; overflow-wrap: anywhere; }
.online { color: var(--success) !important; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(240px,1fr); gap: 22px; align-items: start; }
.panel { border: 1px solid var(--border); background: var(--surface); padding: 22px; min-width: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--border); padding-bottom: 14px; margin-bottom: 19px; }
.section-heading h2 { font-size: 16px; font-weight: 650; margin: 0; }
.section-heading span { font-size: 12px; color: var(--muted); }
.note-form .button { align-self: flex-start; margin-top: 9px; }
.notes { margin-top: 22px; }
.note { border-top: 1px solid var(--border); padding: 15px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.note-info { min-width: 0; }
.note h3 { font-size: 13px; margin: 0 0 5px; }
.note p { font-size: 13px; margin: 0 0 8px; color: var(--muted); overflow-wrap: anywhere; }
.note time { font-size: 11px; color: var(--muted); }
.empty-note { color: var(--muted); font-size: 13px; margin: 0; }
.text-button { padding: 2px 4px; font-size: 12px; background: transparent; border: 0; color: var(--muted); }
.text-button:hover { text-decoration: underline; }
.text-button.danger:hover { color: var(--danger); }
.account-details { margin: 0 0 25px; }
.account-details div { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.account-details dt { color: var(--muted); font-size: 12px; }
.account-details dd { margin: 0; font-size: 12px; font-weight: 650; }
.users-panel { margin-top: 22px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 12px; }
th,td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 650; }
td { color: var(--text); }
@media (max-width: 900px) {
  .workspace { grid-template-columns: 160px minmax(0,1fr); }
  .dashboard-columns { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .site-header { min-height: 65px; padding: 12px 14px; }
  .header-right { gap: 8px; }
  .signed-in { display: none; }
  .theme-switch button { padding: 7px 9px; min-width: 0; }
  .wordmark { font-size: 15px; gap: 6px; }
  .wordmark .mark { font-size: 14px; }
  .auth-layout { min-height: calc(100vh - 65px); padding: 18px; align-items: start; }
  .auth-panel { margin-top: 44px; padding: 23px; }
  .workspace { display: flex; flex-direction: column; }
  .side-nav { padding: 0; flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--border); overflow-x: auto; }
  .nav-title,.sidebar-account { display: none; }
  .nav-link { width: auto; white-space: nowrap; padding: 12px; font-size: 12px; }
  .nav-link.is-active { border-left: 0; border-bottom: 2px solid var(--accent); padding: 12px 12px 10px; }
  .workspace-main { padding: 28px 15px 45px; }
  .stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .stat { padding: 12px 10px; }
  .stat strong { font-size: 17px; }
  .stat span { font-size: 11px; }
  .panel { padding: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { transition: none !important; animation: none !important; }
}

/* Minimal authenticated user shell */
.blank-workspace { min-height: calc(100vh - 73px); }
.header-link { font-size: 12px; color: var(--muted); white-space: nowrap; }
.header-link:hover { color: var(--text); }
.header-logout { margin: 0; }
.header-logout-button { background: none; border: 0; padding: 0; }
@media(max-width: 750px) {
  .site-header { flex-wrap: wrap; }
  .header-right { margin-left: auto; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
  .signed-in { display: none; }
}

/* EU Age Verification page: square, minimal, in all three themes */
.age-content { max-width: 790px; margin: 0 auto; padding: 40px 22px 60px; }
.age-panel { margin-bottom: 17px; }
.age-note { font-size: 13px; color: var(--text); margin: 0 0 20px; }
.age-footnote { font-size: 12px; color: var(--muted); margin: 13px 0 0; }
.age-content > .back-link { display: inline-block; margin-top: 12px; }
@media (max-width: 620px) { .age-content { padding: 27px 15px 50px; } }

/* Compact account settings and registration */
.settings-layout { max-width: 810px; margin: 0 auto; padding: 38px 20px 60px; }
.settings-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.settings-tabs a { padding: 10px 17px; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; }
.settings-tabs a:hover { color: var(--text); }
.settings-tabs a.is-active { color: var(--accent); border-color: var(--accent); font-weight: 650; }
.settings-layout .panel { margin-bottom: 17px; }
.settings-verification-secondary { margin-top: 32px; }
.settings-layout > .back-link { display: inline-block; margin-top: 8px; }
.register-link { display: inline-block; margin-top: 18px; }
.auth-hint { font-size: 13px; color: var(--muted); line-height: 1.65; margin: 9px 0 22px; }
.field-stack input[type="hidden"] { display:none; }

/* Codes: compact, square-edged, fully theme-aware */
.codes-layout .panel { margin-bottom: 18px; }
.redeem-form { display: flex; align-items: stretch; gap: 10px; }
.redeem-form input {
  color: var(--text);
  background: var(--input);
  border: 1px solid var(--border);
  padding: 10px 12px;
  min-height: 42px;
  width: 100%;
  min-width: 0;
  flex: 1;
}
.redeem-form input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.redeem-form .button { flex: 0 0 auto; }
.sr-only { position: absolute; height: 1px; width: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.code-active-list { display: flex; flex-direction: column; }
.code-active-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; }
.code-active-item + .code-active-item { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border); }
.code-active-item .button { min-height: 34px; padding: 6px 12px; }
.inline-link { color: var(--accent); font-weight: 600; }
.inline-link:hover { text-decoration: underline; }
.admin-code-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; }
.admin-code-actions form { margin: 0; }
.code-blocklist { margin-top: 27px; }
.muted-cell { color: var(--muted); }
.section-empty { min-height: calc(100vh - 73px); padding: 36px clamp(18px,5vw,74px); }
.section-empty h1 { margin: 0; font-size: 28px; }
@media (max-width: 620px) {
  .redeem-form { flex-wrap: wrap; }
  .redeem-form input, .redeem-form button { width: 100%; }
}

/* Fetisch area: compact, flat, theme-driven (Light / Dark / Cute) */
.fetish-area .page-heading { margin-bottom: 23px; }
.fetish-tiles { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.fetish-tile {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  padding: 21px; font-size: 15px; font-weight: 600;
}
.fetish-tile:hover { border-color: var(--accent); }
.care-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 0; gap: 15px; border-bottom: 1px solid var(--border);
}
.care-user { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.care-user > span,.care-user > small { color: var(--muted); font-size: 12px; }
.care-assign { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 0 21px; }
.care-assign label { color: var(--muted); font-size: 12px; }
.care-assign select { border: 1px solid var(--border); background: var(--input); color: var(--text); padding: 10px; min-width: 190px; flex: 1; }
.fetish-chat-layout { width: min(800px, calc(100% - 30px)); margin: 35px auto 60px; }
.chat-page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 20px; }
.chat-page-heading h1 { font-size: 25px; margin-bottom: 0; }
.chat-window { border: 1px solid var(--border); background: var(--surface); }
.chat-stream { display: flex; flex-direction: column; gap: 17px; height: min(58vh, 570px); min-height: 260px; overflow-y: auto; overscroll-behavior: contain; padding: 24px; }
.chat-message { display: flex; flex-direction: column; align-items: flex-start; width: min(88%, 550px); }
.chat-message.chat-own { align-self: flex-end; align-items: flex-end; }
.chat-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.chat-meta strong { color: var(--text); font-size: 12px; font-weight: 600; }
.chat-kind { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.chat-bubble { background: var(--surface-raised); border: 1px solid var(--border); padding: 10px 12px; overflow-wrap: anywhere; max-width: 100%; font-size: 13px; white-space: normal; }
.chat-own .chat-bubble { border-color: var(--accent); }
.chat-status { display: flex; margin-top: 5px; font-size: 11px; color: var(--muted); }
.chat-status .text-button { color: var(--accent); font-size: 11px; padding: 3px 0; }
.chat-status form { margin: 0; }
.chat-empty { color: var(--muted); font-size: 13px; text-align: center; margin: auto; }
.chat-composer { border-top: 1px solid var(--border); padding: 14px; }
.chat-composer textarea { display: block; width: 100%; min-height: 70px; resize: vertical; padding: 10px 12px; border: 1px solid var(--border); background: var(--input); color: var(--text); font: inherit; }
.chat-compose-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; }
.chat-compose-actions span { color: var(--muted); font-size: 11px; }
.little-check-label { display: flex; gap: 9px; align-items: center; font-weight: 500 !important; color: var(--text) !important; }
.little-check-label input[type=checkbox] { flex: none; width: 16px; height: 16px; accent-color: var(--accent); }
.little-save { align-self: flex-start; margin-top: 13px; }
@media (max-width: 620px) {
  .fetish-tiles { grid-template-columns: 1fr; }
  .fetish-chat-layout { margin: 22px auto 40px; }
  .chat-stream { padding: 14px; height: 58vh; }
  .chat-message { width: min(96%, 550px); }
  .chat-page-heading h1 { font-size: 21px; }
  .care-assign select, .care-assign .button { width: 100%; }
}

.unread-count { display: inline-block; font-size: 11px; font-weight: 650; color: var(--accent); margin-left: 9px; }
