:root {
    --ink: #102b29;
    --muted: #60716b;
    --cream: #f7f7f0;
    --lime: #d5f46c;
    --line: #dce1d4;
    --white: #ffffff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--cream); font: 15px/1.55 Arial, sans-serif; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 4px; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 3px solid #5c9252;
    outline-offset: 3px;
}
.brand { text-decoration: none; font-size: 23px; font-weight: 800; line-height: 1.2; }
.brand span { display: block; margin-top: 8px; font-size: 11px; font-weight: 400; letter-spacing: 1.5px; text-transform: uppercase; }
.auth-screen { max-width: 510px; margin: 70px auto; padding: 0 24px; }
.auth-card { margin: 36px 0 20px; padding: 38px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; }
.auth-card h1 { font-size: 42px; }
.back { font-size: 13px; }
.eyebrow { font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: 1.8px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font: normal 52px/1.05 Georgia, serif; letter-spacing: -1.5px; margin: 17px 0 28px; }
h2 { font-size: 22px; font-weight: 500; margin-bottom: 18px; }
h3 { font-size: 16px; }
p, small { color: var(--muted); }
label { display: block; margin: 16px 0; font-size: 13px; font-weight: bold; }
label small { display: block; font-weight: normal; margin-top: 6px; }
input, select, textarea { display: block; width: 100%; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); padding: 13px; margin-top: 7px; font-weight: normal; }
textarea { resize: vertical; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: normal; }
.check input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--ink); }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid var(--ink); border-radius: 30px; padding: 13px 23px; font-weight: bold; text-decoration: none; font-size: 13px; }
.primary { background: var(--ink); color: var(--white); }
.primary:hover { background: #285244; }
.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.secondary:hover { background: #edf1e6; }
button:disabled { opacity: .5; cursor: wait; }
.text-button { background: transparent; color: inherit; border: 0; padding: 9px 0; text-decoration: underline; text-underline-offset: 5px; }
.auth-card .primary { width: 100%; margin-top: 12px; }
.notice { position: fixed; top: 18px; right: 24px; z-index: 20; max-width: min(480px, calc(100% - 48px)); background: var(--ink); color: white; border-radius: 10px; box-shadow: 0 5px 25px #102b2933; }
.notice:not(:empty) { padding: 16px 22px; }
.notice.error { background: #8b2c29; }
.workspace { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--ink); color: var(--cream); padding: 37px 24px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { font-size: 22px; }
.sidebar nav { display: grid; gap: 7px; margin-top: 64px; }
.sidebar nav button { display: flex; justify-content: space-between; text-align: left; padding: 14px; background: transparent; color: inherit; border: 0; border-radius: 8px; font-size: 13px; }
.sidebar nav button span { opacity: .5; font-size: 10px; }
.sidebar nav button[aria-current] { background: var(--lime); color: var(--ink); font-weight: bold; }
.sidebar-bottom { margin-top: auto; padding-top: 30px; font-size: 12px; }
.sidebar-bottom p { color: #c7d3c5; margin-bottom: 0; }
.content { padding: 0 45px 60px; min-width: 0; max-width: 1600px; width: 100%; margin: auto; }
.panel-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding: 27px 0; gap: 15px; margin-bottom: 40px; }
.panel-header a { font-size: 12px; text-decoration: none; }
.heading-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.badge { display: inline-block; padding: 10px 16px; border-radius: 30px; background: #e9eddf; font-size: 12px; white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 6px 0 28px; }
.stats article { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 23px; }
.stats article:first-child { background: var(--lime); border-color: var(--lime); }
.stats span, .stats small { display: block; font-size: 12px; }
.stats strong { display: block; font-size: clamp(25px, 3vw, 42px); font-weight: 500; margin: 15px 0 6px; letter-spacing: -1px; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; align-items: start; }
.card { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 28px; margin-bottom: 25px; min-width: 0; }
.card > p { font-size: 13px; }
.hint { font-size: 12px; }
.button-row, .form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.form-row { flex-wrap: nowrap; align-items: start; }
.form-row label { flex: 1; min-width: 0; }
.list-item { padding: 18px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item p { font-size: 13px; margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.list-item small { display: block; margin-bottom: 7px; font-size: 11px; }
.list-item button { margin: 8px 8px 0 0; font-size: 11px; padding: 8px 14px; }
.empty { padding: 20px 0; color: var(--muted); font-size: 13px; }
.upload-card { background: #eef3e2; }
.file-label { padding: 20px; border: 1px dashed #9cab88; border-radius: 10px; }
.file-label input { padding: 0; border: 0; background: transparent; }
progress { display: block; width: 100%; height: 12px; margin-top: 25px; accent-color: #426541; }
#upload-status { font-size: 12px; min-height: 18px; margin-top: 10px; }
.filter-row { display: flex; gap: 20px; align-items: center; justify-content: space-between; margin: 5px 0 25px; }
.filter-row label { max-width: 470px; width: 100%; }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 25px; }
.media-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: white; min-width: 0; }
.media-preview { width: 100%; height: 200px; object-fit: contain; background: #e9eddf; display: block; }
div.media-preview { display: grid; place-items: center; font-size: 20px; }
.media-details { padding: 18px; }
.media-details h3 { margin-bottom: 10px; overflow-wrap: anywhere; }
.media-details p { font-size: 11px; margin-bottom: 8px; }
.media-details .button-row { margin-top: 14px; gap: 10px; }
.media-details a, .media-details button { font-size: 11px; }
.media-details button { padding: 8px 13px; }
.visibility { display: inline-block; background: #edf1e5; padding: 4px 9px; font-size: 10px; border-radius: 15px; }
.visibility.public { background: var(--lime); }
fieldset { border: 1px solid var(--line); border-radius: 9px; margin: 20px 0; padding: 12px 20px; }
legend { font-size: 12px; padding: 0 6px; }
dialog { border: 1px solid var(--line); border-radius: 15px; padding: 30px; max-width: 540px; width: calc(100% - 40px); }
dialog::backdrop { background: #102b2988; }
dialog p { font-size: 13px; }
.progress-chart svg { display: block; width: 100%; height: 120px; }
@media (max-width: 1100px) {
    .workspace { grid-template-columns: 205px 1fr; }
    .content { padding-left: 25px; padding-right: 25px; }
    .sidebar { padding-left: 18px; padding-right: 18px; }
    .two-columns { grid-template-columns: 1fr; gap: 0; }
    .media-grid { grid-template-columns: repeat(2, 1fr); }
    .stats { gap: 10px; }
    .stats article { padding: 18px; }
}
@media (max-width: 720px) {
    .workspace { display: block; }
    .sidebar { position: static; height: auto; padding: 22px; }
    .sidebar .brand { font-size: 21px; }
    .sidebar nav { display: flex; overflow-x: auto; margin-top: 24px; padding-bottom: 5px; }
    .sidebar nav button { flex-shrink: 0; gap: 12px; padding: 12px 15px; }
    .sidebar-bottom { margin: 12px 0 0; padding: 0; display: flex; justify-content: space-between; align-items: center; }
    .content { padding: 0 20px 45px; }
    .panel-header { margin-bottom: 28px; padding: 20px 0; }
    h1 { font-size: 43px; }
    .heading-row { display: block; margin-bottom: 24px; }
    .stats { grid-template-columns: 1fr; gap: 10px; }
    .stats strong { font-size: 35px; margin: 6px 0; }
    .stats article { padding: 20px; }
    .card { padding: 23px; }
    .media-grid { gap: 12px; }
    .media-preview { height: 150px; }
    .media-details { padding: 12px; }
    .media-details h3 { font-size: 13px; }
    .filter-row { display: block; }
    .auth-screen { margin-top: 40px; }
    .auth-card { padding: 26px; }
    .auth-card h1 { font-size: 36px; }
    .form-row { display: block; }
}
