/* Retush / Studio. Native CSS, shared design tokens and accessible components. */
:root {
    color-scheme: light;
    --paper: #f4f5f0;
    --surface: #fff;
    --surface-soft: #f8f9f5;
    --ink: #202923;
    --muted: #6c746e;
    --line: #dde2d9;
    --line-strong: #b9c5b7;
    --accent: #366344;
    --accent-hover: #264b32;
    --accent-soft: #edf3e8;
    --lime: #d8eca9;
    --danger: #ae3932;
    --warning: #8b5919;
    --radius: 16px;
    --shadow: 0 5px 20px #28351f06;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select, [role="button"] { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, input, textarea, select { border-radius: 0; }
button { color: inherit; }
button:disabled { cursor: not-allowed; opacity: .45; }
input, textarea, select { accent-color: var(--accent); }
input::placeholder, textarea::placeholder { color: #7d857e; opacity: 1; }
img, canvas { max-width: 100%; }
img { display: block; }
[hidden], .hidden, .rt-hidden { display: none !important; }
:focus-visible { outline: 3px solid #6f9761; outline-offset: 4px; }
:where(input, textarea, select):focus-visible { outline-offset: 1px; }
::selection { background: #d8eca9; color: #202923; }
.skip-link { position: fixed; top: 10px; left: 20px; z-index: 300; background: #fff; padding: 0; border-radius: 8px; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip-link:focus { width: auto; height: auto; clip-path: none; padding: 14px 24px; }
.app-shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100dvh; }
.app-sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100dvh; background: #222e27; color: #edf2e9; padding: 32px 16px 0; z-index: 60; overflow-y: auto; }
.app-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 38px; font-size: 23px; font-weight: 720; letter-spacing: -.9px; }
.brand-symbol { display: grid; place-items: center; flex: none; width: 39px; height: 43px; border: 1px solid #6f8067; border-radius: 11px 11px 3px 11px; color: var(--lime); font-size: 18px; }
.app-brand small { display: block; font-size: 9px; letter-spacing: 1.7px; font-weight: 500; margin-top: 3px; color: #a7b4a7; }
.nav-label { color: #a4b2a5; font-size: 12px; padding: 0 12px; margin-bottom: 12px; }
.nav-label-secondary { margin-top: 35px; }
.nav-item { display: flex; align-items: center; gap: 11px; min-height: 48px; padding: 12px; border-radius: 9px; margin: 5px 0; color: #c3cec2; font-size: 14px; transition: background .18s, color .18s; }
.nav-item > i:first-child { width: 18px; text-align: center; color: #94a991; }
.nav-item:hover { background: #344437; color: #fff; }
.nav-item.is-active { background: var(--lime); color: #283a24; font-weight: 650; }
.nav-item.is-active > i { color: inherit; }
.nav-arrow { margin-left: auto; font-size: 9px; opacity: 0; }
.nav-item.is-active .nav-arrow { opacity: 1; }
.sidebar-note { margin-top: auto; padding: 32px 12px; color: #acb8a8; }
.sidebar-note-mark { display: block; font-family: Georgia, serif; font-size: 54px; font-style: italic; line-height: 1; color: #62765e; margin-bottom: 18px; }
.sidebar-note p { font-size: 14px; line-height: 1.8; }
.app-account { display: flex; align-items: center; gap: 10px; border-top: 1px solid #415042; padding: 21px 0; }
.account-avatar { display: grid; place-items: center; width: 35px; height: 35px; flex: none; border-radius: 50%; color: #d8eca9; background: #43513c; font-size: 12px; }
.account-details { flex: 1; min-width: 0; }
.account-details strong { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-details span { display: block; font-size: 12px; color: #a5b2a5; margin-top: 3px; }
.account-exit { background: none; border: 0; color: #b9c6b5; min-height: 44px; width: 32px; }
.app-content { min-width: 0; }
.app-topbar { min-height: 76px; padding: 0 36px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--paper); font-size: 13px; }
.topbar-location { display: flex; gap: 16px; align-items: center; }
.topbar-studio, .topbar-divider { color: var(--muted); }
.topbar-caption { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.topbar-caption > span { width: 6px; height: 6px; border-radius: 50%; background: #709362; }
.app-main { padding: 32px 36px 48px; max-width: 1800px; width: 100%; margin: auto; }
.app-main:focus { outline: none; }
.menu-button { display: none; border: 1px solid var(--line); background: #fff; width: 42px; height: 42px; border-radius: 10px; }
.sidebar-overlay { position: fixed; inset: 0; z-index: 50; background: #15211990; backdrop-filter: blur(3px); }
.sidebar-open { overflow: hidden; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; transition: background .18s, border-color .18s; }
.button:hover { border-color: var(--line-strong); background: var(--surface-soft); }
.button-primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.button-primary:hover { background: var(--accent-hover); color: #fff; }
.field-note { color: var(--muted); font-size: 13px; line-height: 1.6; }
.field-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.field-input { display: block; width: 100%; min-height: 46px; border: 1px solid var(--line-strong); background: #fff; border-radius: 8px; padding: 10px 12px; color: var(--ink); }
.form-stack { display: grid; gap: 18px; }
.form-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.form-actions > .button { flex: 1; }
.notice { display: flex; align-items: start; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.notice-success { background: #edf6eb; color: #305d38; border-color: #b9d4b4; }
.notice-error { background: #fff0ed; color: #9a362f; border-color: #efc4be; }
.notice-warning { background: #fff6e7; color: #855519; border-color: #e8d3ae; }
.notice i { margin-top: 4px; }
.color-success { color: #35613a; }
.color-danger { color: var(--danger); }
.color-warning { color: var(--warning); }
.eyebrow { display: block; text-transform: uppercase; font-size: 12px; font-weight: 650; letter-spacing: 1.8px; color: var(--accent); margin-bottom: 20px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 30px; }
.page-title { font-size: clamp(25px, 2.6vw, 36px); font-weight: 620; letter-spacing: -1.1px; margin-bottom: 8px; }
.panel-title { font-size: 18px; font-weight: 650; margin-bottom: 12px; }
.admin-panel { border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 24px; margin-bottom: 22px; }
.admin-panel > p { margin-bottom: 18px; }
.admin-panel .form-actions { justify-content: start; }
.credit-input { width: 140px; }
.table-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
th { font-weight: 600; font-size: 12px; color: var(--muted); background: #edf0e9; white-space: nowrap; }
th, td { padding: 17px 16px; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8faf5; }
.badge { display: inline-flex; align-items: center; border-radius: 6px; padding: 4px 9px; font-size: 12px; white-space: nowrap; }
.badge-success, .badge-admin { background: #eaf2e3; color: #446239; }
.badge-danger { background: #fbedeb; color: #a2463e; }
.badge-neutral { background: #eef0ec; color: #697165; }
.credit-link { font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.credit-link:hover { text-decoration: underline; }
.table-action { width: 40px; min-height: 40px; border: 0; background: transparent; border-radius: 8px; }
.table-action:hover { background: #edf2e8; }
.admin-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; overflow-y: auto; background: #16261dcc; backdrop-filter: blur(5px); }
.admin-dialog { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px; width: min(100%, 500px); max-height: calc(100dvh - 48px); overflow-y: auto; box-shadow: 0 25px 90px #0e201a40; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
.dialog-heading > button { min-width: 44px; min-height: 44px; border: 0; border-radius: 8px; background: #f1f4ed; }
.dialog-title { font-size: 22px; font-weight: 650; letter-spacing: -.6px; }
.admin-dialog input[type="checkbox"] { width: 18px; height: 18px; }
@media (min-width: 1680px) { .app-shell { grid-template-columns: 248px minmax(0, 1fr); } .app-main { padding: 40px 48px; } }
@media (max-width: 1100px) { .app-shell { grid-template-columns: 204px minmax(0, 1fr); } .app-main { padding: 26px 24px 40px; } .app-topbar { padding-inline: 24px; } .topbar-caption { display: none; } .app-sidebar { padding-inline: 12px; } .app-brand { font-size: 21px; } }
@media (max-width: 767px) {
    .app-shell { display: block; }
    .app-sidebar { position: fixed; left: 0; top: 0; width: 270px; transform: translateX(-100%); transition: transform .22s ease; padding: 28px 20px 0; }
    .app-sidebar.is-open { transform: translateX(0); }
    .menu-button { display: inline-grid; place-items: center; flex-shrink: 0; }
    .app-topbar { min-height: 68px; padding: 12px 18px; }
    .topbar-location { gap: 12px; }
    .app-main { padding: 24px 18px 36px; }
    .page-heading { align-items: start; flex-direction: column; gap: 16px; }
    .admin-dialog { padding: 20px; }
    .admin-modal { padding: 12px; }
    .admin-panel { padding: 18px; }
    .form-actions { gap: 10px; }
    .topbar-studio, .topbar-divider { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
