:root {
    --bg: #f6efe4;
    --panel: #fffdf8;
    --ink: #241f1a;
    --muted: #756b61;
    --accent: #a8452c;
    --accent-strong: #6f241b;
    --accent-soft: #f4d9cd;
    --line: #e7d7c4;
    --shadow: 0 22px 60px rgba(55, 36, 24, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    background:
            radial-gradient(circle at top left, rgba(168, 69, 44, 0.13), transparent 32rem),
            linear-gradient(135deg, #fbf4e9, #ead8c3);
    color: var(--ink);
}

.layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
}

.sidebar,
.sidebar-nav {
    position: sticky;
    top: 0;
    min-height: 100vh;
    background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 16rem),
            #211814;
    color: #fff;
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-nav h2 {
    margin: 0;
    font-size: 26px;
    letter-spacing: -0.04em;
}

.sidebar-nav a {
    color: #f8eee8;
    text-decoration: none;
    padding: 11px 13px;
    border-radius: 14px;
    transition: background 160ms ease, transform 160ms ease;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
}

.sidebar-nav .subnav {
    margin-left: 14px;
    color: #dacbc0;
    font-size: 14px;
}

.nav-label {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.sidebar-logout {
    margin-top: auto;
    padding-top: 18px;
}

.sidebar-logout-button {
    width: 100%;
    justify-content: center;
    color: #f8eee8;
    border-color: rgba(248, 238, 232, 0.3);
}

.sidebar-logout-button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.content {
    padding: 34px;
    overflow-x: hidden;
}

.content > * {
    animation: rise-in 260ms ease both;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.header-row h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 58px);
    letter-spacing: -0.04em;
    line-height: 0.95;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 12px;
    color: var(--muted);
    margin: 0 0 8px;
}

.page-note {
    max-width: 620px;
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card,
.panel,
.login-card,
.quick-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -42px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(168, 69, 44, 0.1);
}

.stat-card span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}

.stat-card strong {
    font-size: 32px;
}

.quick-card {
    display: grid;
    gap: 8px;
    padding: 20px;
    color: var(--ink);
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.quick-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 28px 70px rgba(55, 36, 24, 0.15);
}

.quick-card span {
    color: var(--accent);
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.quick-card strong {
    font-size: 22px;
    line-height: 1.1;
}

.help-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.help-hero article {
    display: grid;
    gap: 10px;
    padding: 22px;
    background: linear-gradient(145deg, #fffdf8, #f8eadb);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.help-hero span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: white;
    background: var(--accent);
    border-radius: 50%;
    font-weight: 700;
}

.help-hero strong {
    font-size: 22px;
}

.help-hero p,
.help-card p,
.help-card li {
    color: var(--muted);
    line-height: 1.65;
}

.help-page .page-note {
    max-width: 760px;
}

.help-banner {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
    gap: 18px;
    margin-bottom: 24px;
    padding: 28px;
    background:
            radial-gradient(circle at top right, rgba(168, 69, 44, 0.12), transparent 18rem),
            linear-gradient(145deg, rgba(255, 253, 248, 0.98), rgba(246, 233, 219, 0.96));
}

.help-banner-copy {
    display: grid;
    gap: 20px;
}

.help-banner-copy h1 {
    margin: 0;
    font-size: clamp(40px, 5vw, 64px);
    letter-spacing: -0.05em;
    line-height: 0.95;
}

.help-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.help-summary-grid article,
.help-mini-panel,
.help-command-card,
.help-detail-card,
.help-side-nav a,
.help-warning-list article,
.help-check-grid > div {
    border: 1px solid rgba(167, 111, 84, 0.18);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 30px rgba(55, 36, 24, 0.06);
}

.help-summary-grid article {
    display: grid;
    gap: 6px;
    padding: 18px;
    border-radius: 20px;
}

.help-summary-grid strong {
    font-size: 34px;
    line-height: 1;
    color: var(--accent-strong);
}

.help-summary-grid span {
    color: var(--muted);
    line-height: 1.5;
}

.help-banner-side {
    display: grid;
    gap: 14px;
}

.help-mini-panel {
    display: grid;
    gap: 12px;
    padding: 20px;
    border-radius: 22px;
}

.help-mini-panel h2,
.help-command-card h2,
.help-group-head h2,
.help-side-panel h2,
.help-detail-card h3,
.help-check-grid h3,
.help-warning-list strong {
    margin: 0;
}

.help-mini-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.help-ordered {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
    line-height: 1.65;
}

.help-command {
    margin-bottom: 24px;
}

.help-command-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.help-command-card {
    display: grid;
    gap: 12px;
    padding: 20px;
    border-radius: 22px;
}

.help-command-card ul,
.help-detail-card ul,
.help-side-checklist {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
}

.help-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
}

.help-card {
    display: grid;
    gap: 14px;
}

.help-card-title {
    display: grid;
    gap: 10px;
}

.help-card h2 {
    margin: 0;
    font-size: 26px;
    letter-spacing: -0.02em;
}

.help-card p {
    margin: 0;
}

.help-card ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 20px;
}

.help-index {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.help-index a {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fbf4ec;
    color: var(--accent-strong);
    text-decoration: none;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.help-index a:hover {
    transform: translateY(-1px);
    background: #fff7ef;
    border-color: #d8b79c;
}

.help-card[id] {
    scroll-margin-top: 24px;
}

.help-main {
    display: grid;
    gap: 24px;
}

.help-section-group {
    display: grid;
    gap: 18px;
}

.help-group-head {
    display: grid;
    gap: 10px;
}

.help-group-head p {
    margin: 0;
    max-width: 900px;
    color: var(--muted);
    line-height: 1.65;
}

.help-section {
    display: grid;
    gap: 18px;
    scroll-margin-top: 28px;
}

.help-section-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.help-section-head h2 {
    margin: 6px 0 8px;
    font-size: clamp(28px, 3vw, 38px);
    letter-spacing: -0.03em;
}

.help-section-head p {
    max-width: 860px;
    margin: 0;
    color: var(--muted);
}

.help-section-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.help-anchor-tag {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: #f6ece2;
    color: #7d5a43;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.help-back-link {
    flex-shrink: 0;
}

.help-meta-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.help-meta-row article {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 18px;
    background: #fbf5ee;
    border: 1px solid #efdfcf;
}

.help-meta-row span {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.help-meta-row strong {
    font-size: 16px;
    line-height: 1.45;
}

.help-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.help-detail-card {
    display: grid;
    gap: 12px;
    padding: 20px;
    border-radius: 22px;
}

.help-detail-card h3,
.help-check-grid h3 {
    font-size: 20px;
    letter-spacing: -0.02em;
}

.help-detail-card ul {
    line-height: 1.65;
}

.help-sidebar-rail {
    position: sticky;
    top: 24px;
    display: grid;
    gap: 16px;
}

.help-side-panel {
    display: grid;
    gap: 14px;
}

.help-side-nav {
    display: grid;
    gap: 10px;
}

.help-side-nav a {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 18px;
    color: var(--ink);
    text-decoration: none;
    transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.help-side-nav a:hover {
    transform: translateY(-1px);
    background: #fff9f2;
    border-color: rgba(168, 69, 44, 0.3);
}

.help-side-nav span {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.help-side-nav strong {
    font-size: 15px;
    line-height: 1.45;
}

.help-side-checklist {
    line-height: 1.65;
}

.help-wrap-up {
    display: grid;
    gap: 18px;
}

.help-closing-card {
    display: grid;
    gap: 18px;
}

.help-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.help-check-grid > div,
.help-warning-list article {
    display: grid;
    gap: 8px;
    padding: 18px;
    border-radius: 20px;
}

.help-check-grid p,
.help-warning-list p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.help-warning-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.help-warning-list strong {
    font-size: 18px;
    letter-spacing: -0.02em;
}

.panel {
    padding: 22px;
}

.stacked-panels {
    display: grid;
    gap: 22px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-header h2 {
    margin: 0 0 8px;
    font-size: 28px;
    letter-spacing: -0.02em;
}

.panel-header.compact {
    align-items: center;
}

.request-filter-panel {
    margin-bottom: 22px;
}

.request-filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr)) auto;
    gap: 14px;
    align-items: end;
}

.filter-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.message-cell {
    min-width: 220px;
    max-width: 360px;
    color: var(--muted);
    line-height: 1.5;
    white-space: pre-wrap;
}

.empty-cell {
    text-align: center;
    color: var(--muted);
    padding: 24px;
}

.table-card {
    overflow: hidden;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: white;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: #fbf4ec;
}

tbody tr:hover {
    background: #fff9f2;
}

tbody tr:last-child td {
    border-bottom: none;
}

td:first-child {
    min-width: 180px;
}

a {
    color: var(--accent);
}

button,
.ghost,
.primary-action {
    border: none;
    border-radius: 999px;
    padding: 12px 18px;
    background: var(--accent);
    color: white;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    font-weight: 700;
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

button:hover,
.ghost:hover,
.primary-action:hover {
    transform: translateY(-1px);
}

.danger {
    background: #8f2d23;
    box-shadow: 0 10px 18px rgba(143, 45, 35, 0.16);
}

.ghost {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.ghost:hover {
    background: #fff5ed;
}

.primary-action {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 12px 24px rgba(168, 69, 44, 0.22);
}

.actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.actions form,
.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-grid .full {
    grid-column: 1 / -1;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.role-card {
    display: grid;
    gap: 16px;
}

.role-selector {
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 242, 233, 0.96));
}

.role-grid,
.token-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.role-option {
    flex: 1 1 260px;
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
}

.role-option-top {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
}

.role-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.form-grid > label,
.form-grid > .media-picker {
    min-width: 0;
}

.localized-intro {
    padding: 14px 16px;
    border: 1px dashed rgba(168, 69, 44, 0.28);
    border-radius: 18px;
    background: rgba(255, 249, 242, 0.9);
}

.certificate-form {
    align-items: start;
}

.workflow-card,
.form-section-card,
.admin-details {
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 242, 233, 0.96));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.workflow-card {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
    gap: 18px;
    padding: 22px;
    background:
            radial-gradient(circle at top right, rgba(168, 69, 44, 0.12), transparent 20rem),
            linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 239, 227, 0.98));
}

.workflow-card-copy {
    display: grid;
    gap: 10px;
}

.workflow-card-copy h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 34px);
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.workflow-steps {
    display: grid;
    gap: 10px;
    align-content: start;
}

.workflow-steps span {
    display: block;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(168, 69, 44, 0.14);
    background: rgba(255, 255, 255, 0.74);
    color: var(--accent-strong);
    font-weight: 700;
}

.error-list strong {
    display: block;
    margin-bottom: 8px;
}

.error-list ul {
    margin: 0;
    padding-left: 20px;
}

.form-section-card {
    display: grid;
    gap: 16px;
    padding: 20px;
}

.form-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.form-section-head h2 {
    margin: 0 0 6px;
    font-size: 24px;
    letter-spacing: -0.03em;
}

.form-section-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.section-grid {
    gap: 14px;
}

.localized-section {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(251, 246, 238, 0.95));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.about-form {
    align-items: start;
}

.toggle-card,
.stat-editor {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(251, 246, 238, 0.95));
}

.toggle-card {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.toggle-card p,
.stat-editor p {
    margin: 0;
}

.toggle-field {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    justify-self: end;
}

.toggle-field input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.stat-grid {
    display: grid;
    gap: 16px;
}

.stat-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.stat-editor-grid .full {
    grid-column: 1 / -1;
}

.localized-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
}

.localized-section-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.localized-section-copy {
    display: grid;
    gap: 6px;
}

.localized-section-copy h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -0.03em;
}

.localized-section-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.localized-section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff5ed;
    border: 1px solid rgba(168, 69, 44, 0.16);
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.localized-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.admin-details {
    overflow: hidden;
}

.admin-details summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    cursor: pointer;
}

.admin-details summary::-webkit-details-marker {
    display: none;
}

.admin-details summary::after {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff5ed;
    color: var(--accent-strong);
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}

.admin-details[open] summary::after {
    content: "-";
}

.admin-details summary strong {
    display: block;
    color: var(--ink);
    font-size: 18px;
}

.admin-details summary span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.5;
}

.details-body {
    padding: 0 20px 20px;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.form-actions .helper {
    max-width: 560px;
}

.localized-field {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
}

.localized-field input,
.localized-field textarea {
    min-width: 0;
}

.localized-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

.localized-label small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.lang-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lang-pill.az {
    color: #6f241b;
    background: #f7ddd1;
}

.lang-pill.en {
    color: #234c7d;
    background: #dceafd;
}

.lang-pill.ru {
    color: #23573e;
    background: #ddf3e4;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(460px, 100%);
    padding: 32px;
}

.stack {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    transition: border 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

textarea,
select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: white;
    color: var(--ink);
    font-family: inherit;
    transition: border 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(168, 69, 44, 0.12);
    background: #fffdf8;
}

.error {
    color: #b91c1c;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 14px;
    padding: 10px 12px;
}

.success {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    padding: 10px 12px;
}

.helper {
    color: var(--muted);
    margin: 0;
    line-height: 1.6;
}

.count-pill,
.status-pill,
.code-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 13px;
    line-height: 1;
}

.count-pill {
    color: var(--accent-strong);
    background: var(--accent-soft);
}

.status-pill {
    color: #245334;
    background: #dff0df;
}

.code-pill {
    color: #6a4d38;
    background: #f3eadf;
    font-family: "Courier New", monospace;
}

.row-subtitle {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.media-picker {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(180deg, #fffefb, #fbf6ee);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.media-picker-header {
    display: grid;
    gap: 4px;
}

.media-picker-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.media-picker-toolbar input[type="file"] {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.file-control {
    display: inline-flex;
    flex: 1 1 320px;
    min-width: min(100%, 280px);
    align-items: center;
    gap: 10px;
    padding: 0;
    color: var(--ink);
    font-size: 14px;
    font-weight: 400;
}

.file-control-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--accent);
    color: var(--accent);
    background: #fff8f2;
    font-weight: 700;
    cursor: pointer;
}

.file-control-name {
    min-width: 0;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-picker-toolbar .media-picker-upload {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.media-picker-current {
    display: grid;
    gap: 10px;
}

.media-picker-preview,
.media-picker-tile-image {
    width: 100%;
    max-width: 240px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #f2ede4;
}

.media-picker-file {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
}

.media-picker-gallery {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.media-picker-tile {
    display: grid;
    gap: 8px;
    padding: 10px;
    text-align: left;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
    color: var(--ink);
}

.media-picker-tile.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(170, 63, 45, 0.12);
}

.media-picker-tile-name {
    font-size: 13px;
    color: var(--muted);
    word-break: break-word;
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar,
    .sidebar-nav {
        position: static;
        min-height: auto;
        padding: 20px;
    }

    .sidebar-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar-nav > div,
    .nav-label {
        grid-column: 1 / -1;
    }

    .content {
        padding: 20px;
    }

    .workflow-card,
    .help-banner,
    .help-shell,
    .help-command-grid,
    .help-meta-row,
    .help-detail-grid,
    .help-summary-grid,
    .help-check-grid,
    .help-warning-list {
        grid-template-columns: 1fr;
    }

    .help-sidebar-rail {
        position: static;
    }

    .help-section-head {
        display: grid;
    }

    .header-row,
    .panel-header {
        display: grid;
    }

    .request-filter-grid {
        grid-template-columns: 1fr;
    }

    .filter-actions,
    .filter-actions button,
    .filter-actions .ghost {
        width: 100%;
        justify-content: center;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .localized-grid {
        grid-template-columns: 1fr;
    }

    .actions {
        width: 100%;
    }

    .actions > a,
    .actions > button,
    .actions > form {
        width: 100%;
    }

    .actions button,
    .actions .ghost,
    .actions .primary-action {
        justify-content: center;
        text-align: center;
        width: 100%;
    }

    .help-banner {
        padding: 22px;
    }

    .help-banner-copy h1 {
        font-size: clamp(34px, 10vw, 50px);
    }
}
