:root {
  --bg: #f7f8fa;
  --panel: #fff;
  --sidebar: #f0f2f5;
  --ink: #202731;
  --muted: #77818e;
  --line: #dfe3e8;
  --blue: #1778f2;
  --blue-soft: #e6f0ff;
  --danger: #c84e55;
  --shadow: 0 10px 35px rgba(20, 36, 52, 0.09);
  --radius: 14px;
}
html[data-theme="soft-dark"] {
  --bg: #363a3e;
  --panel: #3f4448;
  --sidebar: #2e3236;
  --ink: #e6e3dc;
  --muted: #b0b5b9;
  --line: #50565b;
  --blue: #68a8f5;
  --blue-soft: #3e4e60;
  --danger: #f38b90;
  --shadow: 0 13px 38px rgba(5, 9, 13, 0.25);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}
.button:hover {
  filter: brightness(0.96);
}
.button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  box-shadow: 0 3px 10px rgba(23, 120, 242, 0.25);
}
.button.wide {
  width: 100%;
}
.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--ink);
}
.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  width: 238px;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  overflow: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 7px 17px;
}
.brand > span,
.app-logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, #1e92ff, #6954e8);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(60, 100, 210, 0.35);
}
.brand div {
  display: flex;
  flex-direction: column;
}
.brand strong {
  font-size: 14px;
}
.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}
.sidebar nav {
  flex: 1;
}
.sidebar nav p {
  margin: 17px 9px 6px;
  color: #929aa4;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 33px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
}
.sidebar nav a:hover {
  background: rgba(128, 145, 162, 0.12);
  color: var(--ink);
}
.sidebar nav a span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-user {
  display: grid;
  grid-template-columns: 33px 1fr 24px;
  align-items: center;
  gap: 8px;
  padding: 13px 5px 0;
  border-top: 1px solid var(--line);
}
.sidebar-user > div {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #242b34;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}
.sidebar-user span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.sidebar-user strong,
.sidebar-user small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-user strong {
  font-size: 11px;
}
.sidebar-user small {
  color: var(--muted);
  font-size: 9px;
}
.sidebar-user > a {
  color: var(--muted);
  font-size: 17px;
}
.topbar {
  position: fixed;
  z-index: 15;
  top: 0;
  right: 0;
  left: 238px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
}
.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(620px, 60vw);
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg) 75%, var(--panel));
  color: var(--muted);
}
.top-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}
.topbar > div {
  display: flex;
  align-items: center;
  gap: 9px;
}
.theme-button,
.mobile-menu {
  width: 37px;
  height: 37px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 19px;
}
.mobile-menu {
  display: none;
}
.content {
  min-height: 100vh;
  margin-left: 238px;
  padding: 102px 34px 50px;
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.page-head h1 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.55px;
}
.page-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.page-actions {
  display: flex;
  gap: 8px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.toolbar select,
.toolbar input:not([type="range"]) {
  height: 35px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-size: 11px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 220px;
  flex: 1;
  padding: 0 9px;
  color: var(--muted);
}
.search-field input {
  width: 100%;
  border: 0 !important;
  background: transparent !important;
  outline: 0;
}
.toolbar input[type="range"] {
  width: 90px;
  accent-color: var(--blue);
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--thumb), 1fr));
  gap: 25px 20px;
  align-items: end;
}
.image-card {
  min-width: 0;
  padding: 7px;
  border: 2px solid transparent;
  border-radius: 13px;
  transition: 0.16s;
}
.image-card:hover {
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  border-color: var(--line);
}
.thumb {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 9px;
  background: #252b31;
  box-shadow: 0 5px 15px rgba(18, 32, 45, 0.15);
  aspect-ratio: 1;
}
.image-card.landscape .thumb {
  aspect-ratio: 1.36;
}
.image-card.portrait .thumb {
  aspect-ratio: 0.78;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
}
.thumb:hover img {
  transform: scale(1.025);
}
.orientation {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(16, 22, 29, 0.68);
  color: #fff;
  font-size: 8px;
  text-transform: uppercase;
}
.card-info {
  display: grid;
  grid-template-columns: 1fr 26px;
  gap: 5px;
  align-items: center;
  padding: 9px 2px 1px;
}
.card-info > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}
.card-info a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 700;
}
.card-info small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-info form {
  margin: 0;
}
.favorite {
  border: 0;
  background: transparent;
  color: #a8afb7;
  font-size: 18px;
}
.favorite.active {
  color: #f06a75;
}
.list-view {
  display: block;
}
.list-view .image-card {
  display: grid;
  grid-template-columns: 105px 1fr;
  margin-bottom: 7px;
}
.list-view .thumb {
  height: 70px;
  aspect-ratio: 1.5;
}
.pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 30px;
}
.pagination a {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  font-size: 11px;
}
.pagination a.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}
.empty {
  padding: 80px 20px;
  text-align: center;
  color: var(--muted);
}
.empty > div {
  font-size: 50px;
}
.empty h2 {
  color: var(--ink);
}
.alert {
  margin: 0 0 15px;
  padding: 11px 13px;
  border-radius: 8px;
  font-size: 11px;
}
.alert.error {
  background: #642f3429;
  border: 1px solid #d6737b;
  color: var(--danger);
}
.alert.success {
  background: #2e704c25;
  border: 1px solid #58ae7d;
  color: #61bd88;
}
.alert.warning {
  background: #7a64272a;
  border: 1px solid #b49b4f;
  color: #c8aa54;
}
.form-card {
  margin-bottom: 20px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.form-card h2,
.form-card h3 {
  margin: 0 0 15px;
}
.form-card p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.form-grid label,
.install-form label,
.editor-controls label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}
.form-grid .full,
.permission-grid.full {
  grid-column: 1/-1;
}
.form-grid input,
.form-grid select,
.form-grid textarea,
.inline-form input,
.inline-form select,
.install-form input,
.editor-controls input,
.editor-controls select {
  width: 100%;
  min-height: 38px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  outline: 0;
  font-size: 12px;
  font-weight: 400;
}
.form-grid textarea {
  min-height: 72px;
  resize: vertical;
}
.check {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 7px !important;
  color: var(--ink) !important;
}
.check input {
  width: auto !important;
  min-height: 0 !important;
}
.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.user-access-form {
  display: contents;
}
.permission-mini {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 5px 12px;
  margin-bottom: 8px;
}
.permission-mini .check {
  font-size: 9px;
  font-weight: 400;
}
.inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  font-size: 11px;
}
.data-table th,
.data-table td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.data-table th {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.data-table tr:last-child td {
  border-bottom: 0;
}
.data-table td > small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}
.status {
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 9px;
}
.dropzone {
  position: relative;
  display: flex;
  min-height: 260px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  padding: 30px;
  border: 2px dashed var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  text-align: center;
  transition: 0.2s;
}
.dropzone.dragover {
  border-color: var(--blue);
  background: var(--blue-soft);
}
.dropzone > input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.dropzone > span {
  font-size: 43px;
  color: var(--blue);
}
.dropzone strong {
  font-size: 16px;
}
.dropzone p,
.dropzone small {
  color: var(--muted);
}
.file-list {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}
.file-list span {
  padding: 4px 7px;
  border-radius: 5px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 9px;
}
.upload-progress {
  position: relative;
  overflow: hidden;
  height: 36px;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.upload-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--blue-soft);
  transition: width 0.15s;
}
.upload-progress strong {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 10px;
}
.upload-progress.error {
  border-color: var(--danger);
}
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}
.album-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.album-card > a > div {
  display: grid;
  place-items: center;
  height: 150px;
  background: color-mix(in srgb, var(--sidebar) 85%, var(--panel));
  font-size: 42px;
}
.album-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.album-card h3,
.album-card p,
.album-card small {
  margin-right: 14px;
  margin-left: 14px;
}
.album-card h3 {
  margin-bottom: 5px;
}
.album-card p,
.album-card small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}
.album-card form {
  padding: 9px 14px;
  border-top: 1px solid var(--line);
}
.album-card form button {
  border: 0;
  background: transparent;
  color: var(--danger);
  font-size: 9px;
}
.tag-cloud,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.tag-cloud span,
.tag-row span {
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
}
.tag-cloud small {
  opacity: 0.7;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
  margin-bottom: 20px;
}
.stat-grid article {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.stat-grid span {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}
.stat-grid strong {
  font-size: 20px;
}
.maintenance-grid,
.backup-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.login-body {
  overflow: hidden;
}
.login-shell {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: 100vh;
}
.login-art {
  position: relative;
  overflow: hidden;
  background: radial-gradient(
    circle at 50% 50%,
    #2c7498,
    #103651 42%,
    #071b2d 80%
  );
  color: #fff;
}
.login-art:after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    145deg,
    transparent 0 30px,
    rgba(123, 204, 230, 0.05) 32px 33px
  );
}
.login-orbit {
  position: absolute;
  left: 18%;
  top: 25%;
  width: 66%;
  aspect-ratio: 1;
  border: 1px solid rgba(188, 228, 242, 0.22);
  border-radius: 50%;
  box-shadow:
    0 0 80px rgba(77, 178, 211, 0.14),
    inset 0 0 100px rgba(77, 178, 211, 0.09);
}
.login-orbit:after {
  content: "";
  position: absolute;
  left: 47%;
  top: 47%;
  width: 6%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #c9f4ff;
  box-shadow: 0 0 35px #a5eaff;
}
.login-copy {
  position: absolute;
  z-index: 2;
  left: 8%;
  bottom: 8%;
}
.login-copy span {
  font-size: 10px;
  letter-spacing: 0.18em;
}
.login-copy h1 {
  margin: 14px 0;
  font-size: 44px;
  line-height: 1.05;
}
.login-copy p {
  color: #b8d5df;
}
.login-panel {
  display: grid;
  place-items: center;
  padding: 35px;
  background: var(--bg);
}
.login-card {
  width: min(370px, 100%);
}
.login-card .app-logo {
  margin-bottom: 28px;
}
.login-card h2 {
  margin: 0;
  font-size: 27px;
}
.login-card > p {
  margin: 8px 0 25px;
  color: var(--muted);
}
.login-card form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.login-card form > label:not(.check) {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}
.login-card input:not([type="checkbox"]) {
  height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--ink);
}
.login-card > small {
  display: block;
  margin-top: 20px;
  color: var(--muted);
  text-align: center;
}
.installer-body {
  background: #e9edf2;
}
.installer {
  width: min(760px, calc(100% - 28px));
  margin: 40px auto;
}
.install-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.install-brand > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, #1e92ff, #6954e8);
  color: white;
  font-weight: 800;
}
.install-brand > div {
  display: flex;
  flex-direction: column;
}
.install-brand small {
  color: #67717d;
}
.install-card {
  padding: 28px;
  border: 1px solid #d8dde3;
  border-radius: 16px;
  background: #fff;
  color: #27303b;
  box-shadow: 0 15px 50px rgba(23, 38, 52, 0.12);
}
.install-card h1 {
  margin-top: 0;
}
.install-card .lead {
  color: #707b88;
}
.requirements {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0;
}
.requirements span {
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 10px;
}
.requirements .ok {
  background: #e5f5ec;
  color: #327953;
}
.requirements .bad {
  background: #fde8e9;
  color: #a44449;
}
.install-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.install-form fieldset {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid #dfe3e7;
  border-radius: 11px;
}
.install-form fieldset:first-of-type {
  grid-row: span 2;
}
.install-form legend {
  padding: 0 6px;
  font-size: 11px;
  font-weight: 800;
}
.install-form label {
  color: #66717d;
}
.install-form input {
  background: #f7f8fa;
  color: #28313c;
}
.success-card {
  text-align: center;
}
.success-icon {
  display: grid;
  place-items: center;
  width: 55px;
  height: 55px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #e3f6eb;
  color: #34915e;
  font-size: 28px;
}
.viewer-page {
  overflow: hidden;
}
.viewer-page .sidebar,
.viewer-page .topbar {
  display: none;
}
.viewer-page .content {
  margin: 0;
  padding: 0;
}
.viewer {
  display: grid;
  grid-template-columns: 1fr 340px;
  grid-template-rows: 56px calc(100vh - 56px);
  height: 100vh;
  background: #24282c;
  color: #e6e3dc;
}
.viewer-toolbar {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  border-bottom: 1px solid #454b50;
  background: #303438;
}
.viewer-toolbar div {
  display: flex;
  gap: 6px;
}
.viewer-toolbar button {
  height: 30px;
  border: 1px solid #555c62;
  border-radius: 6px;
  background: #3e4449;
  color: #dddcd7;
  font-size: 10px;
}
.viewer-stage {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 25px;
}
.viewer-stage > img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center;
  transition: transform 0.12s;
}
.viewer-nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 50px;
  border-radius: 9px;
  background: rgba(15, 18, 20, 0.48);
  font-size: 38px;
}
.viewer-nav.prev {
  left: 15px;
}
.viewer-nav.next {
  right: 15px;
}
.viewer-nav.disabled {
  opacity: 0.2;
}
.info-drawer {
  overflow: auto;
  padding: 24px;
  border-left: 1px solid #4b5156;
  background: #34383c;
}
.info-drawer h1 {
  margin-top: 0;
}
.info-drawer > p {
  color: #b7bcc0;
  font-size: 11px;
  line-height: 1.5;
}
.info-drawer dl {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 8px;
  margin: 20px 0;
  font-size: 10px;
}
.info-drawer dt {
  color: #92999e;
}
.info-drawer dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.version-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.version-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #4e5459;
  font-size: 10px;
}
.version-list small {
  color: #999fa4;
}
.dashboard-section {
  margin-top: 34px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-head h2 {
  margin: 0;
}
.section-head a {
  color: var(--blue);
  font-size: 11px;
}
.metadata-editor {
  margin: 22px 0;
  padding-top: 18px;
  border-top: 1px solid #4e5459;
}
.metadata-editor summary {
  cursor: pointer;
  font-weight: 700;
  margin-bottom: 14px;
}
.metadata-editor form {
  display: grid;
  gap: 10px;
}
.metadata-editor label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #aeb4b8;
  font-size: 10px;
}
.metadata-editor input,
.metadata-editor select,
.metadata-editor textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #555c62;
  border-radius: 7px;
  background: #2d3135;
  color: #e6e3dc;
}
.metadata-editor textarea {
  min-height: 76px;
  resize: vertical;
}
.danger-link {
  border: 0;
  background: none;
  color: var(--danger);
  padding: 8px 0;
}
.album-card details {
  padding: 0 14px 14px;
}
.album-card details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 10px;
}
.album-card details form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 0;
}
.album-card details input {
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  color: var(--ink);
}
.editor-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 18px;
}
.editor-preview {
  display: grid;
  place-items: center;
  min-height: 570px;
  padding: 25px;
  border-radius: 13px;
  background: #282c30;
}
.editor-preview img {
  max-width: 100%;
  max-height: 75vh;
}
.editor-controls {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
}
.operation-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: 0.2s;
  }
  .sidebar.open {
    transform: none;
  }
  .topbar {
    left: 0;
    padding: 0 15px;
  }
  .mobile-menu {
    display: block;
  }
  .content {
    margin-left: 0;
    padding: 92px 16px 40px;
  }
  .top-search {
    width: 50vw;
  }
  .toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }
  .search-field {
    flex-basis: 100%;
  }
  .gallery {
    gap: 16px 10px;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .maintenance-grid,
  .backup-grid {
    grid-template-columns: 1fr;
  }
  .viewer {
    grid-template-columns: 1fr;
    grid-template-rows: 56px minmax(45vh, 1fr) auto;
    overflow: auto;
  }
  .viewer-stage {
    min-height: 48vh;
  }
  .info-drawer {
    border-top: 1px solid #4b5156;
    border-left: 0;
  }
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-art {
    display: none;
  }
  .install-form {
    grid-template-columns: 1fr;
  }
  .install-form fieldset:first-of-type {
    grid-row: auto;
  }
}
@media (max-width: 600px) {
  .topbar .button {
    padding: 8px;
    font-size: 0;
  }
  .topbar .button:first-letter {
    font-size: 17px;
  }
  .content {
    padding-right: 11px;
    padding-left: 11px;
  }
  .page-head {
    align-items: flex-start;
  }
  .page-head h1 {
    font-size: 23px;
  }
  .toolbar select {
    max-width: 145px;
  }
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .form-grid,
  .permission-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .full,
  .permission-grid.full {
    grid-column: auto;
  }
  .inline-form {
    align-items: stretch;
    flex-direction: column;
  }
  .data-table {
    display: block;
    overflow-x: auto;
  }
  .album-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .login-panel {
    padding: 24px;
  }
  .login-copy h1 {
    font-size: 34px;
  }
  .editor-preview {
    min-height: 350px;
  }
  .operation-fields {
    grid-template-columns: 1fr;
  }
  .viewer {
    display: block;
    height: auto;
    min-height: 100vh;
  }
  .viewer-toolbar {
    height: 56px;
  }
  .viewer-stage {
    height: 55vh;
  }
  .info-drawer {
    min-height: 45vh;
  }
}
