:root {
  --brand-primary: #2563eb;
  --brand-secondary: #1e293b;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --border: #e6e8eb;
  --text: #1a1a1a;
  --muted: #6b7280;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --space: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 15px;
}
a { color: var(--brand-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: 0; }
h2 { font-size: 1.15rem; }
code { background: #eef1f5; padding: 2px 6px; border-radius: 6px; font-size: .85em; }
.muted { color: var(--muted); }
.sm { font-size: .82rem; }
.nowrap { white-space: nowrap; }
.inline { display: inline; }
.contents { display: contents; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: #eef1f5; color: var(--text); font-size: .9rem; font-weight: 600;
  cursor: pointer; transition: filter .15s, background .15s; text-decoration: none;
}
.btn:hover { filter: brightness(.97); text-decoration: none; }
.btn--primary { background: var(--brand-primary); color: #fff; }
.btn--secondary { background: var(--brand-secondary); color: #fff; }
.btn--ghost { background: transparent; border-color: var(--border); }
.btn--danger { background: #fff; color: var(--red); border-color: #f3c6c6; }
.btn--danger:hover { background: #fef2f2; }
.btn--sm { padding: 5px 10px; font-size: .8rem; }
.btn--block { width: 100%; }

/* Pills & chips */
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.pill--green { background: #dcfce7; color: #166534; }
.pill--red { background: #fee2e2; color: #991b1b; }
.pill--amber { background: #fef3c7; color: #92400e; }
.pill--gray { background: #e5e7eb; color: #374151; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.lang-chip { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: .72rem; background: #dcfce7; color: #166534; margin: 1px; text-transform: uppercase; }
.lang-chip--missing { background: #fee2e2; color: #991b1b; }
.chip { display: inline-block; padding: 3px 10px; border: 1px solid var(--border); border-left-width: 3px; border-radius: 6px; font-size: .8rem; margin: 2px; }
.chip--character { border: none; border-radius: 999px; background: #eef2ff; color: #3730a3; font-weight: 600; font-size: .72rem; padding: 2px 10px; }
.chips { margin: 12px 0; }
.ev-characters { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: var(--space); box-shadow: var(--shadow); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card__head .card__title { margin: 0; }
.card--highlight { border-color: var(--brand-primary); }
.card__title { margin: 0 0 14px; font-size: 1.05rem; display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.token { display: block; padding: 12px; background: #0f172a; color: #4ade80; border-radius: 8px; word-break: break-all; font-family: monospace; }

/* Forms */
.form .field, .field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 5px; color: #374151; }
input, select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .9rem; font-family: inherit; background: #fff; color: var(--text);
}
input[type=color] { padding: 2px; height: 38px; }
input[type=checkbox], input[type=radio] { width: auto; }
textarea { resize: vertical; }
.form--row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.form--row .field { flex: 1; min-width: 140px; margin-bottom: 12px; }
.form__actions { margin-top: 8px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; margin-bottom: 4px; }
.check input { margin: 0; }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* Layout shell */
.topbar { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.topbar__brand { font-weight: 700; color: var(--text); }
.topbar__spacer { flex: 1; }
.topbar__menu { background: none; border: none; font-size: 1.4rem; cursor: pointer; display: none; }
.topbar__icon { position: relative; font-size: 1.1rem; padding: 4px; }
.topbar__icon .badge { position: absolute; top: -2px; inset-inline-end: -4px; background: var(--red); color: #fff; font-size: .65rem; padding: 0 5px; border-radius: 999px; }
.topbar__user { display: flex; align-items: center; gap: 10px; }
.topbar__email { font-size: .82rem; color: var(--muted); }

.shell { display: flex; min-height: calc(100vh - 56px); }
.sidenav { width: 230px; background: var(--surface); border-inline-end: 1px solid var(--border); padding: 16px 10px; flex-shrink: 0; }
.sidenav__nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 72px; }
.sidenav__link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); color: #374151; font-weight: 500; font-size: .9rem; }
.sidenav__link:hover { background: #f1f3f6; text-decoration: none; }
.sidenav__link.is-active { background: var(--brand-primary); color: #fff; }
.sidenav__section { font-size: .72rem; text-transform: uppercase; color: var(--muted); margin: 16px 12px 4px; letter-spacing: .04em; }
.content { flex: 1; padding: 24px; max-width: 1200px; width: 100%; }
.nav-scrim { display: none; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Grids */
.grid { display: grid; gap: var(--space); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--main { grid-template-columns: 2fr 1fr; gap: var(--space); }
.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: var(--space); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; box-shadow: var(--shadow); }
.stat__num { font-size: 1.7rem; font-weight: 700; color: var(--brand-primary); }
.stat__label { font-size: .78rem; color: var(--muted); }

/* Meters */
.meter { margin-bottom: 14px; }
.meter__label { font-size: .85rem; margin-bottom: 5px; display: flex; justify-content: space-between; }
.meter__bar { height: 8px; background: #eef1f5; border-radius: 999px; overflow: hidden; }
.meter__bar span { display: block; height: 100%; background: var(--brand-primary); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 7px 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }

/* Flash */
.flash-stack { margin-bottom: 16px; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 8px; font-size: .9rem; }
.flash--success { background: #dcfce7; color: #166534; }
.flash--error { background: #fee2e2; color: #991b1b; }
.flash--info { background: #dbeafe; color: #1e40af; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters input, .filters select { width: auto; flex: 0 1 auto; min-width: 130px; }

/* Edit rows (taxonomy) */
.edit-row { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.edit-row__form { flex: 1; align-items: center; }
.edit-row__form input[type=text] { min-width: 120px; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.tab { background: none; border: none; padding: 8px 14px; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; }
.tab.is-active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); }
.tab--missing { color: var(--amber); }
.tab--missing.is-active { color: var(--brand-primary); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* Quill */
.quill { background: #fff; min-height: 160px; }
.ql-editor { min-height: 140px; }

/* Sticky save */
.form__sticky { position: sticky; bottom: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; display: flex; gap: 10px; box-shadow: 0 -2px 6px rgba(0,0,0,.05); }

/* Cover preview */
.cover-preview { width: 100%; height: 150px; border: 1px dashed var(--border); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 10px; }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }

/* AI translate preview */
.ai-preview { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.ai-preview__item { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }

/* Media */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.media-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.media-card img { width: 100%; height: 140px; object-fit: cover; display: block; }
.media-card__body { padding: 10px; }
.media-card__name { font-size: .82rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-card form { margin-top: 6px; }
.media-card input { margin-bottom: 4px; }
.dropzone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 30px; text-align: center; cursor: pointer; color: var(--muted); margin-bottom: 12px; }
.dropzone.is-drag { border-color: var(--brand-primary); background: #f0f6ff; }
.aspect-warnings { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.aspect-warning { border: 1px solid #f0c674; background: #fffbeb; border-radius: var(--radius); padding: 14px 16px; }
.aspect-warning__title { font-weight: 600; margin: 0 0 6px; }
.aspect-warning__hint { margin: 0 0 10px; }
.aspect-warning__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.aspect-warning__done { margin: 0; color: var(--success, #15803d); font-weight: 600; }
.aspect-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
@media (max-width: 640px) { .aspect-compare { grid-template-columns: 1fr; } }
.aspect-compare__card { border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; background: #fff; }
.aspect-compare__label { font-weight: 600; margin: 0 0 8px; font-size: .9rem; }
.aspect-compare__img { width: 100%; height: auto; display: block; border-radius: calc(var(--radius) - 2px); object-fit: contain; max-height: 220px; background: #f4f4f5; }
.aspect-remake { border-top: 1px solid #f0dca0; padding-top: 12px; }
.aspect-remake__comment { width: 100%; margin-top: 6px; margin-bottom: 8px; font-family: inherit; resize: vertical; }
body.ai-aspect-loader-open { overflow: hidden; }
.ai-aspect-loader { position: fixed; inset: 0; z-index: 200; background: rgba(15, 23, 42, .55); display: flex; align-items: center; justify-content: center; padding: 24px; }
.ai-aspect-loader[hidden] { display: none !important; }
.ai-aspect-loader__box { background: #fff; border-radius: var(--radius); padding: 28px 32px; text-align: center; box-shadow: 0 12px 40px rgba(0, 0, 0, .2); min-width: 220px; max-width: 320px; }
.ai-aspect-loader__spinner { width: 40px; height: 40px; margin: 0 auto 16px; border: 3px solid #e2e8f0; border-top-color: var(--brand-primary, #2563eb); border-radius: 50%; animation: ai-aspect-spin .8s linear infinite; }
.ai-aspect-loader__text { margin: 0; font-weight: 600; color: var(--text, #0f172a); }
@keyframes ai-aspect-spin { to { transform: rotate(360deg); } }
.card--wide { grid-column: 1 / -1; }
.upload-status { margin-top: 8px; font-size: .85rem; }

/* Modal */
.modal:not([hidden]) { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal[hidden] { display: none !important; }
.modal__box { background: #fff; border-radius: var(--radius); width: 100%; max-width: 760px; max-height: 80vh; display: flex; flex-direction: column; }
.modal__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal__close { background: none; border: none; font-size: 1.5rem; cursor: pointer; }
.modal__body { padding: 18px; overflow: auto; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.picker-upload { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.picker-grid img { width: 100%; height: 90px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
.picker-grid img:hover { border-color: var(--brand-primary); }

.result-area { font-family: inherit; }
.link-box { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.card--nested { background: #f8fafc; border: 1px dashed var(--border); padding: 14px; margin: 12px 0; }
.token { margin-top: 8px; }

/* Notifications */
.notif-list { list-style: none; padding: 0; margin: 0; }
.notif { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.notif--unread { background: #f0f6ff; margin: 0 -20px; padding: 12px 20px; }
.notif__title { font-weight: 600; }
.notif__actions { display: flex; gap: 6px; align-items: center; }

/* Auth */
.auth { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; background: linear-gradient(135deg, #eef2ff, #f5f6f8); }
.auth__card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; width: 100%; max-width: 380px; box-shadow: var(--shadow); }
.auth__brand { font-weight: 700; color: var(--brand-primary); text-align: center; margin-bottom: 8px; }
.auth__title { text-align: center; margin-bottom: 18px; font-size: 1.3rem; }
.auth__alt { text-align: center; margin-top: 14px; font-size: .85rem; }

/* Errors */
.error-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; text-align: center; }
.error-box h1 { font-size: 3rem; color: var(--brand-primary); }

/* Public */
.public-header { background: var(--brand-primary); color: #fff; }
.public-header__inner { max-width: 1100px; margin: 0 auto; padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.public-header__brand { color: #fff; font-weight: 700; font-size: 1.2rem; }
.public-header__brand:hover { text-decoration: none; }
.public-header__lang a { color: rgba(255,255,255,.8); margin-inline-start: 10px; font-size: .85rem; }
.public-header__lang a.is-active { color: #fff; font-weight: 700; }
.public-main { max-width: 1100px; margin: 0 auto; padding: 20px; }
.public-footer { text-align: center; color: var(--muted); padding: 24px; font-size: .85rem; }
.filter-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 16px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: var(--radius-sm); }
.filter-banner p { margin: 0; font-size: .9rem; }
.public-toolbar { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.viewswitch { display: flex; gap: 4px; flex-wrap: wrap; }
.viewswitch__btn { padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; text-transform: capitalize; font-size: .85rem; }
.viewswitch__btn.is-active { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }
.public-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.public-filters input, .public-filters select { width: auto; min-width: 120px; }
.calendar-dynamic { transition: opacity .15s ease; }
.calendar-dynamic.is-loading { opacity: .55; pointer-events: none; }
#calendar { background: #fff; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); }

.event-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.ev-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: var(--text); }
.ev-card:hover { text-decoration: none; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.ev-card__img img { width: 100%; height: 150px; object-fit: cover; display: block; }
.ev-card__body { padding: 14px; }
.ev-card__date { font-size: .78rem; color: var(--brand-primary); font-weight: 600; }
.ev-card__title { margin: 6px 0; font-size: 1.05rem; }
.ev-card__excerpt { color: var(--muted); font-size: .85rem; }
.ev-card__price { margin-top: 8px; font-weight: 600; font-size: .85rem; }

.event-list, .event-agenda { display: flex; flex-direction: column; gap: 10px; }
.ev-row { display: flex; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; color: var(--text); }
.ev-row:hover { text-decoration: none; box-shadow: var(--shadow); }
.ev-row__date { text-align: center; min-width: 52px; }
.ev-row__day { font-size: 1.6rem; font-weight: 700; color: var(--brand-primary); line-height: 1; }
.ev-row__mon { font-size: .75rem; text-transform: uppercase; color: var(--muted); }
.ev-row__title { margin: 0 0 4px; font-size: 1.05rem; }
.ev-row__excerpt { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }

.event-detail { max-width: 760px; margin: 0 auto; }
.event-detail__back { display: inline-block; margin-bottom: 14px; font-size: .85rem; }
.event-detail__cover { aspect-ratio: 16 / 9; width: 100%; max-height: 380px; background: #0f0f14; border-radius: var(--radius); overflow: hidden; margin-bottom: 4px; }
.event-detail__cover img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 0; }
.event-detail__title { margin: 16px 0 10px; }
.event-detail__meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); margin-bottom: 12px; align-items: center; }
.event-detail__character { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.event-detail__character-label { font-size: .82rem; font-weight: 600; color: var(--text); }
.event-detail__content { margin: 18px 0; }
.event-detail__actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

.fc-event-custom { display: flex; flex-direction: column; gap: 1px; overflow: hidden; line-height: 1.2; }
.fc-event-character { display: block; font-size: .62rem; font-weight: 700; opacity: .95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-event-title { display: block; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rich img { max-width: 100%; height: auto; border-radius: 8px; }
.rich iframe { max-width: 100%; }

/* RTL adjustments */
[dir=rtl] .stat, [dir=rtl] .ev-card__body { text-align: right; }

/* Responsive */
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .grid--main { grid-template-columns: 1fr; }
}
/* Taxonomy manager (categories / audiences) */
.page-head .sm { font-size: .8rem; }
.tax-form__main { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.tax-form__name { flex: 1; min-width: 220px; margin-bottom: 0; }
.tax-color-field { display: block; }
.tax-color-field > span { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 5px; color: #374151; }
.tax-color { width: 46px; height: 42px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.tax-extra { margin-top: 14px; }
.tax-extra summary { cursor: pointer; font-size: .85rem; color: var(--brand-primary); font-weight: 600; width: fit-content; }
.tax-extra__body { margin-top: 14px; }
.tax-langs { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.tax-langs .field { margin-bottom: 0; }

.tax-list { display: flex; flex-direction: column; gap: 8px; border-radius: var(--radius-sm); transition: outline-color .2s; outline: 2px solid transparent; outline-offset: 3px; }
.tax-list.is-saved { outline-color: #22c55e; }
.tax-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); transition: box-shadow .15s, border-color .15s, opacity .15s; }
.tax-item:hover { border-color: #cbd2da; }
.tax-item.is-dragging { opacity: .45; box-shadow: var(--shadow); }
.tax-item__head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.tax-drag { cursor: grab; color: var(--muted); font-size: 1rem; line-height: 1; user-select: none; }
.tax-drag:active { cursor: grabbing; }
.tax-swatch { width: 16px; height: 16px; border-radius: 5px; border: 1px solid rgba(0,0,0,.12); flex-shrink: 0; }
.tax-item__name { flex: 1; text-align: start; background: none; border: none; font-size: .95rem; font-weight: 600; color: #1f2937; cursor: pointer; padding: 4px 0; }
.tax-item__name:hover { color: var(--brand-primary); }
.tax-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.tax-chip { font-size: .62rem; font-weight: 700; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; letter-spacing: .03em; }
.tax-chip.is-set { background: #dcfce7; color: #166534; }
.tax-chip.is-missing { background: #f1f3f5; color: #aab0b8; }
.tax-item__toggle { color: var(--muted); transition: transform .2s; }
.tax-item.is-open .tax-item__toggle { transform: rotate(180deg); }
.tax-item__body { display: none; padding: 4px 14px 14px; }
.tax-item.is-open .tax-item__body { display: block; border-top: 1px solid var(--border); }
.tax-item__body .tax-langs { margin-top: 14px; }
.tax-item__actions { display: flex; align-items: flex-end; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.tax-delete { margin-top: 10px; }

@media (max-width: 768px) {
  .grid--2 { grid-template-columns: 1fr; }
  .topbar__menu { display: block; }
  .topbar__email { display: none; }
  .sidenav {
    position: fixed; top: 56px; bottom: 0; inset-inline-start: 0; z-index: 40;
    transform: translateX(-110%); transition: transform .2s; box-shadow: 2px 0 12px rgba(0,0,0,.1);
  }
  [dir=rtl] .sidenav { transform: translateX(110%); }
  body.nav-open .sidenav { transform: translateX(0); }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: 56px 0 0 0; background: rgba(0,0,0,.4); z-index: 35; }
  .content { padding: 16px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
