:root {
  color-scheme: light;
  --bg: #f7f1e7;
  --surface: #ffffff;
  --surface-soft: #edf5ef;
  --ink: #16342d;
  --muted: #5f746f;
  --line: #cfe0d5;
  --accent: #1c5e4d;
  --accent-dark: #123d31;
  --accent-soft: #e1f1eb;
  --danger: #b42318;
  --danger-soft: #fff2ee;
  --success-soft: #dff2e8;
  --shadow: 0 20px 44px rgba(22, 52, 45, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(28, 94, 77, 0.12), transparent 32%),
    radial-gradient(circle at top right, rgba(190, 140, 66, 0.12), transparent 28%),
    linear-gradient(180deg, #fbf6ef 0%, #eef4ef 100%);
}

body {
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  font-family:
    "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.is-hidden {
  display: none !important;
}

.auth-shell,
.app-shell,
.admin-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 20px;
}

.auth-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(100%, 460px);
  padding: 28px;
  border: 1px solid rgba(28, 94, 77, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.auth-copy,
.header-copy {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 50px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  transform: translateY(-50%);
}

.password-toggle:hover {
  color: var(--ink);
  background: rgba(28, 94, 77, 0.08);
}

.password-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(28, 94, 77, 0.16);
}

.login-status {
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(28, 94, 77, 0.18);
  border-radius: 12px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 0.92rem;
  font-weight: 700;
}

.login-status.is-error {
  border-color: rgba(180, 35, 24, 0.22);
  color: var(--danger);
  background: var(--danger-soft);
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-dark);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 2.6vw, 2.3rem);
  line-height: 1.05;
}

h2 {
  margin-bottom: 0;
  font-size: 1.08rem;
  line-height: 1.2;
}

h3 {
  margin-bottom: 0;
  font-size: 0.98rem;
  line-height: 1.25;
}

.status-pill {
  max-width: min(46vw, 360px);
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.88);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 8px 20px rgba(25, 35, 45, 0.05);
}

.workspace {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}

.capture-panel,
.settings-panel,
.image-board {
  width: 100%;
  max-width: none;
}

.panel,
.image-board {
  border: 1px solid rgba(23, 33, 43, 0.07);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.panel {
  padding: 16px;
}

.section-title,
.board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title span,
.board-header .eyebrow + h2 + span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.destination-card {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(28, 94, 77, 0.09);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(28, 94, 77, 0.06), rgba(182, 122, 42, 0.05));
}

.destination-card span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.destination-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
}

.folder-select-control {
  margin-top: 12px;
}

.folder-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.folder-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.camera-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 5 / 7;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #17212b;
}

.camera-frame.is-live-capture {
  cursor: pointer;
  touch-action: manipulation;
}

.camera-frame[data-orientation="landscape"] {
  aspect-ratio: 7 / 5;
}

.camera-orientation {
  margin-top: 14px;
}

#cameraVideo {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #05070a;
}

#cameraVideo.is-active {
  display: block;
}

.camera-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: #d7e6e2;
  background:
    linear-gradient(135deg, rgba(28, 94, 77, 0.34), rgba(182, 122, 42, 0.1)),
    #17212b;
  text-align: center;
}

.camera-placeholder.is-hidden {
  display: none;
}

.placeholder-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.placeholder-icon svg {
  width: 25px;
  height: 25px;
}

.button-grid,
.action-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}

.recording-status {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.recording-status.is-recording {
  color: #b42318;
}

.btn,
.chip,
.icon-btn {
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  font-weight: 800;
}

.btn:hover,
.chip:hover,
.icon-btn:hover {
  border-color: #b9c6ce;
  transform: translateY(-1px);
}

.btn:active,
.chip:active,
.icon-btn:active {
  transform: translateY(0);
}

.btn:disabled,
.icon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  transform: none;
}

.btn.primary {
  border-color: var(--accent);
  color: #ffffff;
  background: var(--accent);
}

.btn.primary:hover {
  background: var(--accent-dark);
}

.btn.ghost {
  background: transparent;
}

.btn.danger,
.icon-btn.danger {
  color: var(--danger);
}

.btn.danger:hover,
.icon-btn.danger:hover {
  border-color: #f2b5ad;
  background: var(--danger-soft);
}

.wide {
  width: 100%;
}

.drop-zone {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed #aebcc5;
  border-radius: 20px;
  background: var(--surface-soft);
}

.drop-zone.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop-zone input {
  display: none;
}

.drop-zone strong,
.drop-zone span {
  display: block;
}

.drop-zone span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

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

.settings-form {
  display: grid;
  gap: 12px;
}

.orientation-field {
  margin: 0;
  padding: 0;
  border: 0;
}

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

.toggle-option {
  position: relative;
  display: block;
}

.toggle-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.toggle-option span {
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: var(--surface);
  font-size: 0.92rem;
  font-weight: 800;
}

.toggle-option input:checked + span {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(28, 94, 77, 0.16);
}

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

label {
  display: grid;
  gap: 6px;
}

label span,
legend {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

input[type="number"],
input[type="text"],
input[type="password"],
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  -webkit-text-fill-color: var(--ink);
  opacity: 1;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

input:disabled,
select:disabled,
textarea:disabled {
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);
  opacity: 0.92;
  background: #f7faf8;
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% - 3px),
    calc(100% - 14px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

select option {
  color: #16342d;
  background: #ffffff;
}

input[type="number"]:focus,
input[type="text"]:focus,
input[type="password"]:focus,
select:focus,
input[type="color"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(28, 94, 77, 0.16);
}

input[type="color"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px;
  background: var(--surface);
}

input[type="range"] {
  accent-color: var(--accent);
}

.image-board {
  min-height: auto;
  padding: 16px;
}

.board-header {
  margin-bottom: 14px;
}

.board-tools {
  display: inline-flex;
  gap: 8px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
}

.empty-state {
  min-height: 300px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 1px dashed var(--line);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.58);
}

.empty-state.is-hidden {
  display: none;
}

.empty-state h3 {
  color: var(--ink);
}

.empty-state p {
  margin: 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.image-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.thumb-wrap {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 5 / 7;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(45deg, #eff3f2 25%, transparent 25%),
    linear-gradient(-45deg, #eff3f2 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eff3f2 75%),
    linear-gradient(-45deg, transparent 75%, #eff3f2 75%),
    #ffffff;
  background-position:
    0 0,
    0 10px,
    10px -10px,
    -10px 0;
  background-size: 20px 20px;
}

.thumb-wrap.is-clickable {
  cursor: pointer;
}

.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.media-chip {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(23, 33, 43, 0.78);
  font-size: 0.68rem;
  font-weight: 800;
}

.media-chip.is-hidden {
  display: none;
}

.badge {
  position: absolute;
  right: 8px;
  top: 8px;
  max-width: calc(100% - 16px);
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(23, 33, 43, 0.78);
  font-size: 0.72rem;
  font-weight: 800;
}

.badge.ready {
  background: rgba(15, 118, 110, 0.9);
}

.badge.error {
  background: rgba(180, 35, 24, 0.9);
}

.card-body {
  padding: 9px;
}

.image-name-control {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.image-name-input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 8px;
  color: var(--ink);
  background: #fbfcfc;
  font-weight: 800;
  outline: none;
}

.image-name-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(28, 94, 77, 0.16);
}

.card-body dl {
  display: grid;
  gap: 5px;
  margin: 0;
}

.card-body dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 800;
  text-align: right;
}

.card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.admin-toolbar {
  margin-bottom: 16px;
}

.admin-filter-control {
  display: grid;
  gap: 8px;
  width: min(360px, 100%);
}

.admin-filter-control span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-board {
  display: grid;
  gap: 16px;
}

.admin-tech {
  border: 1px solid rgba(23, 33, 43, 0.07);
  border-radius: 24px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.admin-tech-header,
.admin-folder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-tech-header {
  margin-bottom: 14px;
  cursor: pointer;
  list-style: none;
}

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

.admin-tech-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-disclosure {
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.admin-tech[open] > .admin-tech-header .admin-disclosure {
  transform: rotate(225deg);
}

.admin-tech-header span,
.admin-folder-header span,
.muted-text {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.admin-folders {
  display: grid;
  gap: 12px;
}

.admin-date {
  border: 1px solid rgba(23, 33, 43, 0.08);
  border-radius: 18px;
  padding: 10px 12px 12px;
  background: #f7f9fb;
}

.admin-date-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  list-style: none;
}

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

.admin-date-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-date-header span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.admin-date[open] > .admin-date-header .admin-disclosure {
  transform: rotate(225deg);
}

.admin-folder {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px;
  background: #fbfcfc;
}

.admin-folder-header {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-folder-header h3 {
  margin-bottom: 3px;
}

.admin-folder-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
}

.admin-folder-name-control {
  display: grid;
  gap: 6px;
  min-width: min(280px, 100%);
}

.admin-folder-name-control span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-folder-name-input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #ffffff;
}

.admin-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 12px;
}

.admin-thumb {
  position: relative;
  display: grid;
  grid-template-rows: minmax(150px, auto) auto;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.admin-preview-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.admin-delete-image {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(190, 24, 24, 0.25);
  border-radius: 10px;
  color: #b91c1c;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  cursor: pointer;
}

.admin-delete-image:hover {
  border-color: rgba(190, 24, 24, 0.45);
  background: #fff5f5;
}

.admin-delete-image:disabled {
  cursor: wait;
  opacity: 0.55;
}

.admin-delete-image svg {
  width: 17px;
  height: 17px;
}

.admin-thumb img {
  display: block;
  width: 100%;
  height: 180px;
  padding: 8px;
  object-fit: cover;
  background: #f3f6f8;
}

.admin-thumb figcaption {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 8px 9px 9px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.admin-image-name-control {
  display: grid;
  gap: 6px;
}

.admin-image-name-control span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-image-name-input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #ffffff;
}

.admin-thumb-actions {
  display: flex;
  gap: 8px;
  justify-content: stretch;
}

.admin-thumb-actions .btn,
.admin-thumb-actions a.btn {
  width: 100%;
}

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
}

.preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 11, 22, 0.74);
  backdrop-filter: blur(3px);
}

.preview-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(1100px, 100%);
  max-height: calc(100dvh - 32px);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 60px rgba(4, 11, 22, 0.28);
}

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

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.preview-zoom-controls {
  display: flex;
  gap: 8px;
}

.preview-zoom-controls .btn {
  min-width: 54px;
}

.preview-body {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 16px;
  border-radius: 20px;
  background: #edf2f5;
  overflow: auto;
}

.preview-image-stage {
  width: 100%;
  height: min(74dvh, 900px);
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: none;
}

.preview-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  border-radius: 16px;
  background: #08111b;
  transform-origin: center center;
  transition: transform 0.12s ease-out;
  cursor: grab;
  user-select: none;
}

.preview-image.is-dragging {
  transition: none;
  cursor: grabbing;
}

.preview-body img,
.preview-body video {
  display: block;
  max-width: 100%;
  max-height: min(74dvh, 900px);
  border-radius: 16px;
  background: #08111b;
}

.push-toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  min-width: min(82vw, 320px);
  max-width: min(88vw, 360px);
  padding: 12px 16px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 16px;
  color: #ffffff;
  background: rgba(15, 118, 110, 0.96);
  box-shadow: 0 18px 36px rgba(4, 11, 22, 0.22);
  font-size: 0.94rem;
  font-weight: 800;
  text-align: center;
  transform: translateX(-50%);
}

.push-toast.is-visible {
  animation: push-toast-in 180ms ease-out;
}

@keyframes push-toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.disabled-link {
  pointer-events: none;
  opacity: 0.46;
}

a.btn {
  text-decoration: none;
}

@media (max-width: 1120px) {
  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .auth-shell,
  .app-shell,
  .admin-shell {
    padding: 14px;
  }

  .app-header {
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .preview-header {
    flex-direction: column;
  }

  .preview-actions {
    width: 100%;
    justify-content: stretch;
  }

  .preview-actions .btn {
    flex: 1 1 0;
  }
}

@media (max-width: 520px) {
  .button-grid,
  .action-row,
  .format-grid {
    grid-template-columns: 1fr;
  }

  .drop-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .status-pill {
    max-width: 100%;
    width: 100%;
  }

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

  .admin-folder-actions {
    width: 100%;
  }

  .admin-folder-name-control {
    min-width: 100%;
  }

  .admin-folder-actions .btn {
    width: 100%;
  }
}
