:root {
  --bg: #0d100e;
  --surface: #171b18;
  --surface2: #202520;
  --text: #f4f6f2;
  --muted: #929a94;
  --line: #ffffff12;
  --accent: #b7d8c2;
  --danger: #e6a1a1;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
}
.archive-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #0d100eee;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.brand {
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  font-weight: 850;
  color: var(--text);
}
.brand i {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 8px;
}
.nav-link {
  color: var(--muted);
}
.btn-upload {
  background: var(--accent);
  color: #172219;
  border: 0;
  border-radius: 11px;
  font-weight: 800;
  padding: 0.7rem 1rem;
}
.btn-upload:hover {
  background: #d0e7d7;
  color: #172219;
}
.hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 5rem 0 3rem;
  max-width: 1300px;
  margin: auto;
}
.eyebrow {
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 9px;
}
.hero h1,
.page-title h1,
.form-shell h1 {
  font-size: clamp(2.5rem, 6vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.065em;
  margin: 0;
  font-weight: 850;
}
.hero h1 em {
  font-style: normal;
  color: #adb6b0;
}
.hero p {
  color: var(--muted);
  max-width: 540px;
  margin: 1.2rem 0 0;
}
.count {
  text-align: right;
  color: var(--muted);
}
.count strong {
  display: block;
  color: var(--text);
  font-size: 2rem;
}
.count span {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
}
.filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  max-width: 1300px;
  margin: 0 auto 2rem;
}
.search {
  flex: 1 1 350px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px 15px;
  display: flex;
  gap: 9px;
  color: var(--muted);
}
.search input {
  background: none;
  border: 0;
  outline: 0;
  color: var(--text);
  width: 100%;
}
.chips {
  display: flex;
  gap: 6px;
}
.chips a,
.filters select {
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 9px 13px;
  text-decoration: none;
  font-size: 0.78rem;
}
.chips a.active,
.chips a:hover {
  background: var(--accent);
  color: #172219;
  border-color: var(--accent);
}
.filters select {
  outline: 0;
}
.masonry {
  max-width: 1300px;
  margin: auto;
  columns: 4 220px;
  column-gap: 14px;
}
.tile {
  display: block;
  position: relative;
  break-inside: avoid;
  margin: 0 0 14px;
  border-radius: 15px;
  overflow: hidden;
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
}
.tile img {
  display: block;
  width: 100%;
  height: auto;
}
.tile label {
  position: absolute;
  right: 10px;
  top: 10px;
  background: #0d100ecf;
  border-radius: 99px;
  padding: 5px 8px;
  color: var(--accent);
}
.overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 12px 12px;
  background: linear-gradient(transparent, #000b);
  opacity: 0;
  transition: 0.2s;
}
.tile:hover .overlay {
  opacity: 1;
}
.overlay b,
.overlay small {
  display: block;
}
.overlay small {
  color: #bbc1bd;
  font-size: 0.7rem;
  margin-top: 3px;
}
.video {
  aspect-ratio: 16/10;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, #303831, #101310 68%);
  color: var(--muted);
}
.video span {
  width: 58px;
  height: 58px;
  border: 1px solid #fff3;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text);
}
.video small {
  margin-top: 10px;
  letter-spacing: 0.16em;
}
.empty {
  min-height: 48vh;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 20px;
  max-width: 1300px;
  margin: auto;
  color: var(--muted);
}
.empty div {
  font-size: 2rem;
  color: var(--accent);
}
.empty h3 {
  color: var(--text);
}
.pagination-wrap {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin: 30px 0;
}
.pagination-wrap a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 9px;
}
.pagination-wrap a.active {
  background: var(--accent);
  color: #172219;
}
.page-title {
  max-width: 1300px;
  margin: 3rem auto 2rem;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}
.page-title h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
}
.muted {
  color: var(--muted);
}
.album-grid {
  max-width: 1300px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.album {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
}
.album-cover {
  aspect-ratio: 16/9;
  display: grid;
  place-items: center;
  font-size: 2rem;
  color: var(--accent);
  background: linear-gradient(135deg, #29352e, #111512);
}
.album > div:last-child {
  padding: 17px;
}
.album h3 {
  margin: 0 0 4px;
}
.album span,
.album p {
  color: var(--muted);
  font-size: 0.75rem;
}
.form-shell {
  max-width: 780px;
  margin: 3rem auto;
}
.form-shell label {
  display: block;
  margin: 22px 0 7px;
  font-size: 0.78rem;
  font-weight: 750;
  color: #ccd1cd;
}
.form-control,
.form-select {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 0.85rem;
}
.form-control:focus,
.form-select:focus {
  background: var(--surface2);
  color: var(--text);
  border-color: #b7d8c288;
  box-shadow: none;
}
.dropzone {
  border: 1px dashed #ffffff2b;
  border-radius: 18px;
  padding: 55px 20px;
  text-align: center;
  background: var(--surface);
  cursor: pointer;
}
.dropzone.drag {
  border-color: var(--accent);
  background: var(--surface2);
}
.dropzone input {
  display: none;
}
.drop-icon {
  font-size: 2rem;
  color: var(--accent);
}
#fileList {
  text-align: left;
  max-width: 600px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.viewer {
  max-width: 1300px;
  margin: 20px auto;
}
.back {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
}
.viewer-media {
  margin-top: 18px;
  background: #080a08;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  max-height: 75vh;
}
.viewer-media img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
}
.viewer-media video {
  width: 100%;
  max-height: 75vh;
}
.viewer-info {
  padding: 25px 2px;
}
.viewer-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
}
.viewer-head h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: -0.05em;
  margin: 0;
}
.actions {
  display: flex;
  gap: 8px;
}
.actions a {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 12px;
  color: var(--text);
  text-decoration: none;
}
.actions .danger {
  color: var(--danger);
}
.description {
  max-width: 800px;
  color: #c1c8c3;
  line-height: 1.7;
  margin-top: 20px;
}
.album-tag {
  display: inline-block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.78rem;
}
@media (max-width: 800px) {
  .hero {
    padding: 3rem 0 2rem;
    align-items: start;
  }
  .count {
    display: none;
  }
  .album-grid {
    grid-template-columns: 1fr;
  }
  .viewer-head {
    flex-direction: column;
  }
  .actions {
    flex-wrap: wrap;
  }
}

.user-pill {
  font-size: 0.7rem;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 7px 10px;
  border-radius: 999px;
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 25px;
  background: radial-gradient(circle at 20% 15%, #26352b 0, transparent 30%),
    var(--bg);
}
.login-shell {
  width: min(430px, 100%);
  text-align: center;
}
.login-mark {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  font-weight: 850;
  margin-bottom: 22px;
}
.login-mark i {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 8px;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px;
  text-align: left;
  box-shadow: 0 25px 80px #0005;
}
.login-card h1 {
  font-size: 2.5rem;
  letter-spacing: -0.06em;
  margin: 0;
}
.login-card > p {
  margin-top: 8px;
}
.login-card label {
  display: block;
  margin: 20px 0 7px;
  font-size: 0.78rem;
  font-weight: 750;
  color: #ccd1cd;
}
.login-error {
  background: #5b2b2b55;
  border: 1px solid #e6a1a133;
  color: #efbcbc;
  padding: 10px 12px;
  border-radius: 10px;
  margin-top: 18px;
  font-size: 0.8rem;
}
.login-note {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 18px;
}

.upload-file {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.upload-file small {
  color: var(--muted);
}

.user-pill {
  font-size: 0.7rem;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 7px 10px;
  border-radius: 999px;
}
.viewer-shell {
  min-height: calc(100vh - 72px);
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 24px 50px;
}
.viewer-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.viewer-back {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
}
.viewer-back:hover {
  color: var(--text);
}
.viewer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-action {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
}
.btn-soft {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 9px 14px;
  border-radius: 9px;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 750;
}
.btn-danger-soft {
  border: 1px solid #a54d4d55;
  background: #5b292922;
  color: #efb6b6;
  padding: 9px 14px;
  border-radius: 9px;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 750;
}
.viewer-stage {
  height: min(72vh, 760px);
  min-height: 380px;
  background: #090b09;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.viewer-media {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.viewer-stage video.viewer-media {
  width: min(100%, 1200px);
  height: min(100%, 760px);
}
.viewer-info {
  position: relative;
  margin-top: 18px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.viewer-info h1 {
  font-size: 1.8rem;
  letter-spacing: -0.045em;
  margin: 4px 0 5px;
}
.viewer-description {
  margin: 20px 0 0;
  line-height: 1.65;
  color: #c5cac6;
  font-size: 0.85rem;
}
.media-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.media-meta span {
  font-size: 0.68rem;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 7px 10px;
  border-radius: 999px;
}
.edit-card {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 520px);
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
}
.edit-preview {
  min-height: 420px;
  background: #090b09;
  border-radius: 13px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.edit-preview img,
.edit-preview video {
  max-width: 100%;
  max-height: 600px;
  object-fit: contain;
}
.edit-form label {
  display: block;
  margin: 0 0 7px;
  font-size: 0.75rem;
  font-weight: 750;
  color: #ccd1cd;
}
.edit-form label:not(:first-child) {
  margin-top: 18px;
}
.edit-meta {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.edit-meta span {
  font-size: 0.67rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
}
@media (max-width: 850px) {
  .edit-card {
    grid-template-columns: 1fr;
  }
  .edit-preview {
    min-height: 300px;
  }
}
@media (max-width: 700px) {
  .viewer-shell {
    padding: 12px 14px 35px;
  }
  .viewer-stage {
    min-height: 300px;
    height: 55vh;
    border-radius: 12px;
  }
  .viewer-topbar {
    align-items: flex-start;
  }
  .viewer-actions .btn-danger-soft {
    display: none;
  }
  .viewer-info h1 {
    font-size: 1.45rem;
  }
}

.bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  margin: 0 0 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
}
.bulk-select-row {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.72rem;
}
.bulk-select-row input {
  accent-color: var(--accent);
}
.media-card {
  position: relative;
}
.media-select {
  position: absolute;
  z-index: 5;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #080a08aa;
  border: 1px solid #ffffff22;
  backdrop-filter: blur(8px);
  cursor: pointer;
}
.media-select input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

:root {
  --accent: #0e8140;
  --accent-2: #63c68b;
  --bg: #0b0e0c;
  --surface: #121713;
  --surface-2: #171d18;
  --text: #f2f5f2;
  --muted: #8e9891;
  --line: #273029;
}
* {
  box-sizing: border-box;
}
body {
  background: var(--bg);
  color: var(--text);
}
.container-fluid {
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px 28px 55px;
}
.container-fluid.narrow {
  max-width: 980px;
}
.hero-heading,
.page-heading,
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.hero-heading {
  padding: 35px 0 30px;
}
.page-heading {
  padding: 22px 0 22px;
}
.page-heading h1,
.hero-heading h1 {
  margin: 3px 0 6px;
  letter-spacing: -0.055em;
}
.hero-heading h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}
.section-heading {
  margin: 38px 0 14px;
}
.section-heading h2 {
  margin: 2px 0;
  font-size: 1.1rem;
}
.eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--accent-2);
  font-weight: 800;
}
.muted {
  color: var(--muted);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  cursor: pointer;
}
.btn-upload {
  background: var(--accent);
  color: white;
  padding: 10px 15px;
  border-radius: 9px;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(14, 129, 64, 0.16);
}
.btn-soft {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 9px 14px;
  border-radius: 9px;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 750;
}
.btn-danger-soft {
  border: 1px solid #a54d4d55;
  background: #5b292922;
  color: #efb6b6;
  padding: 9px 14px;
  border-radius: 9px;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 750;
}
.notice {
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 15px;
  font-size: 0.78rem;
}
.notice.success {
  background: #103b25;
  color: #b8e7c9;
  border-color: #1c6a40;
}
.notice.warning {
  background: #3c3217;
  color: #ead89d;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.stat-card {
  padding: 20px;
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: 15px;
  text-decoration: none;
  color: var(--text);
  transition: 0.2s;
}
.stat-card:hover,
.album-card:hover,
.mini-album:hover,
.media-card:hover {
  transform: translateY(-2px);
  border-color: #3b4a3f;
}
.stat-card span {
  font-size: 0.61rem;
  letter-spacing: 0.13em;
  color: var(--muted);
  font-weight: 800;
}
.stat-card strong {
  display: block;
  font-size: 2rem;
  letter-spacing: -0.05em;
  margin: 7px 0 1px;
}
.stat-card small {
  font-size: 0.7rem;
  color: var(--muted);
}
.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) repeat(3, minmax(130px, 1fr)) auto auto auto;
  gap: 8px;
  margin: 5px 0 15px;
}
.form-control {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 9px;
  padding: 10px 11px;
  font-size: 0.77rem;
  outline: none;
}
.form-control:focus {
  border-color: var(--accent);
}
.filter-favorite {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}
.filter-favorite input {
  accent-color: var(--accent);
}
.bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  margin: 0 0 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
}
.bulk-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}
.bulk-actions .form-control {
  width: 190px;
}
.bulk-select-row {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.72rem;
}
.bulk-select-row input {
  accent-color: var(--accent);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.gallery-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.media-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  transition: 0.2s;
}
.media-thumb {
  display: block;
  position: relative;
  aspect-ratio: 4/3;
  background: #090b09;
  overflow: hidden;
}
.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.media-card:hover .media-thumb img {
  transform: scale(1.025);
}
.media-card-info {
  padding: 11px 12px 13px;
}
.media-card-info b {
  display: block;
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-card-info small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.63rem;
}
.media-card-info .album-line {
  color: #6ebd8c;
}
.media-select {
  position: absolute;
  z-index: 5;
  top: 9px;
  left: 9px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #080a08aa;
  border: 1px solid #ffffff22;
  backdrop-filter: blur(8px);
  cursor: pointer;
}
.media-select input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}
.type-badge,
.fav-badge,
.duration-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 0.55rem;
  font-weight: 850;
  padding: 5px 7px;
  background: #080a08cc;
  backdrop-filter: blur(7px);
}
.type-badge {
  left: 8px;
  bottom: 8px;
  color: #dce5df;
}
.fav-badge {
  right: 8px;
  top: 8px;
  color: #ffb4b4;
}
.duration-badge {
  right: 8px;
  bottom: 8px;
  color: #fff;
}
.video {
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  color: #b7c0b9;
  gap: 5px;
}
.video span {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #18201a;
  border: 1px solid #344238;
}
.video small {
  font-size: 0.55rem;
  letter-spacing: 0.12em;
}
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 20px;
  border: 1px dashed var(--line);
  border-radius: 15px;
}
.empty-icon {
  font-size: 2rem;
  color: var(--accent-2);
}
.empty-state h2 {
  margin: 8px 0;
}
.empty-state p {
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 18px;
}
.album-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.album-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  transition: 0.2s;
}
.album-cover {
  position: relative;
  aspect-ratio: 16/10;
  background: #0a0d0b;
  overflow: hidden;
}
.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.album-cover > span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 5px 7px;
  background: #080a08cc;
  border-radius: 999px;
  font-size: 0.58rem;
}
.cover-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #516257;
  font-size: 2rem;
  background: radial-gradient(circle at center, #182219 0, #0a0d0b 65%);
}
.album-card-body {
  padding: 14px;
}
.album-card-body h2 {
  font-size: 0.9rem;
  margin: 0 0 6px;
}
.album-card-body p {
  font-size: 0.7rem;
  color: var(--muted);
  margin: 0 0 10px;
  line-height: 1.5;
  height: 34px;
  overflow: hidden;
}
.album-card-body small,
.album-stat-line {
  color: var(--muted);
  font-size: 0.63rem;
}
.album-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.mini-album {
  display: block;
  text-decoration: none;
  color: var(--text);
}
.mini-cover {
  aspect-ratio: 1.4;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  margin-bottom: 7px;
}
.mini-album b {
  display: block;
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-album small {
  display: block;
  color: var(--muted);
  font-size: 0.6rem;
  margin-top: 3px;
}
.text-link {
  font-size: 0.68rem;
  color: #8ccca4;
  text-decoration: none;
}
.heading-actions {
  display: flex;
  gap: 7px;
}
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
}
.form-card label {
  display: block;
  margin: 18px 0 7px;
  font-size: 0.74rem;
  font-weight: 750;
}
.form-card label:first-of-type {
  margin-top: 0;
}
.upload-dropzone {
  border: 1px dashed #3c4d41;
  border-radius: 14px;
  padding: 38px 18px;
  text-align: center;
  background: #0e130f;
}
.upload-dropzone.drag {
  border-color: var(--accent-2);
  background: #112017;
}
.upload-dropzone .upload-icon {
  font-size: 2rem;
  color: var(--accent-2);
}
.upload-dropzone h2 {
  font-size: 1rem;
  margin: 8px 0 3px;
}
.upload-dropzone p {
  font-size: 0.73rem;
  color: var(--muted);
  margin: 0 0 15px;
}
.upload-dropzone input {
  display: block;
  margin: 0 auto 10px;
  max-width: 100%;
  font-size: 0.7rem;
}
.upload-dropzone small,
.field-help {
  display: block;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.5;
}
.file-list {
  margin: 12px 0 4px;
}
.upload-file {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.7rem;
}
.upload-file small {
  color: var(--muted);
}
.trash-actions {
  display: flex;
  gap: 6px;
  margin-top: 9px;
}
.viewer-shell {
  min-height: calc(100vh - 72px);
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 24px 50px;
}
.viewer-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.viewer-back {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
}
.viewer-back:hover {
  color: var(--text);
}
.viewer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-action {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
}
.viewer-stage {
  height: min(72vh, 760px);
  min-height: 380px;
  background: #090b09;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.viewer-media {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.viewer-stage video.viewer-media {
  width: min(100%, 1200px);
  height: min(100%, 760px);
}
.viewer-info {
  margin-top: 18px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.viewer-info h1 {
  font-size: 1.8rem;
  letter-spacing: -0.045em;
  margin: 4px 0 5px;
}
.viewer-description {
  margin: 20px 0 0;
  line-height: 1.65;
  color: #c5cac6;
  font-size: 0.85rem;
}
.media-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.media-meta span {
  font-size: 0.68rem;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 7px 10px;
  border-radius: 999px;
}
.edit-card {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 520px);
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
}
.edit-preview {
  min-height: 420px;
  background: #090b09;
  border-radius: 13px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.edit-preview img,
.edit-preview video {
  max-width: 100%;
  max-height: 600px;
  object-fit: contain;
}
.edit-form label {
  display: block;
  margin: 0 0 7px;
  font-size: 0.75rem;
  font-weight: 750;
}
.edit-form label:not(:first-child) {
  margin-top: 18px;
}
.edit-meta {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.edit-meta span {
  font-size: 0.67rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
}
@media (max-width: 1100px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .album-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 850px) {
  .edit-card {
    grid-template-columns: 1fr;
  }
  .edit-preview {
    min-height: 300px;
  }
  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }
  .filter-bar .search-input {
    grid-column: 1/-1;
  }
  .gallery-grid,
  .gallery-grid.compact {
    grid-template-columns: repeat(3, 1fr);
  }
  .album-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .album-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 600px) {
  .container-fluid {
    padding: 20px 14px 40px;
  }
  .hero-heading,
  .page-heading,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .heading-actions {
    width: 100%;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .filter-bar {
    grid-template-columns: 1fr;
  }
  .filter-bar .search-input {
    grid-column: auto;
  }
  .gallery-grid,
  .gallery-grid.compact {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .album-grid {
    grid-template-columns: 1fr 1fr;
  }
  .album-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .bulk-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .bulk-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .bulk-actions .form-control {
    width: 100%;
  }
  .viewer-shell {
    padding: 12px 14px 35px;
  }
  .viewer-stage {
    min-height: 300px;
    height: 55vh;
    border-radius: 12px;
  }
  .viewer-topbar {
    align-items: flex-start;
  }
  .viewer-actions .btn-danger-soft {
    display: none;
  }
  .viewer-info h1 {
    font-size: 1.45rem;
  }
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 0, #122117 0, #0b0e0c 50%);
}
.auth-shell {
  width: min(430px, calc(100% - 28px));
}
.auth-brand {
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  font-weight: 850;
  margin-bottom: 20px;
}
.auth-brand span {
  color: var(--accent-2);
  margin-right: 5px;
}
.auth-card {
  background: rgba(18, 23, 19, 0.94);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}
.auth-card h1 {
  font-size: 2rem;
  letter-spacing: -0.05em;
  margin: 4px 0 6px;
}
.auth-card label {
  display: block;
  margin: 19px 0 7px;
  font-size: 0.74rem;
  font-weight: 750;
}

.auth-footer {
  margin: 12px 0 0 0;
}

.auth-submit {
  width: 100%;
  margin-top: 20px;
}

/* =========================================================
   ACCOUNT PAGE
   ========================================================= */

.account-page {
  max-width: 1450px;
  margin: 0 auto;
  padding: 40px 18px 80px;
}

/* Heading */

.account-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 42px;
}

.account-heading h1 {
  margin: 10px 0 8px;
  color: #f4f7f5;
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -2.5px;
  line-height: 1.05;
}

.account-subtitle {
  margin: 0;
  color: #84918a;
  font-size: 16px;
}

/* Cards */

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
}

.account-card {
  background: #ffffff;
  border: 1px solid #e4e9e5;
  border-radius: 20px;
  padding: 30px;
  min-width: 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Card header */

.account-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.account-eyebrow {
  margin-bottom: 10px;
  color: #0e8140;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

.account-card h2 {
  margin: 0 0 8px;
  color: #17221b;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.account-card p {
  margin: 0;
  color: #68756d;
  font-size: 14px;
  line-height: 1.6;
}

/* Avatar */

.account-avatar {
  width: 58px;
  height: 58px;

  flex: 0 0 58px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 16px;

  background: #eaf5ef;
  border: 1px solid #c8e4d4;

  color: #0e8140;

  font-size: 21px;
  font-weight: 800;
}

/* Forms */

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;

  color: #536158;
  font-size: 12px;
  font-weight: 700;
}

.account-input,
.account-readonly {
  width: 100%;
  min-height: 48px;

  padding: 12px 14px;

  border: 1px solid #d6ddd8;
  border-radius: 11px;

  background: #ffffff;

  color: #17221b;

  font-family: inherit;
  font-size: 14px;

  outline: none;

  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.account-input:focus {
  border-color: #0e8140;
  box-shadow: 0 0 0 3px rgba(14, 129, 64, 0.1);
}

.account-readonly {
  display: flex;
  align-items: center;

  background: #f7f9f8;
  color: #657169;
}

/* Buttons */

.account-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 44px;

  padding: 0 18px;

  border: 0;
  border-radius: 10px;

  background: #0e8140;
  color: #ffffff;

  font-family: inherit;
  font-size: 13px;
  font-weight: 700;

  cursor: pointer;

  box-shadow: 0 8px 20px rgba(14, 129, 64, 0.18);

  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.account-button:hover {
  background: #11964b;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(14, 129, 64, 0.25);
}

/* Storage */

.storage-summary {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  margin-top: 32px;
  margin-bottom: 14px;
}

.storage-value {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.storage-value strong {
  color: #17221b;
  font-size: 32px;
  font-weight: 750;
  letter-spacing: -1px;
}

.storage-value span {
  color: #7b867f;
  font-size: 12px;
}

.storage-total {
  text-align: right;
}

.storage-progress {
  width: 100%;
  height: 9px;

  overflow: hidden;

  border-radius: 999px;

  background: #e9eeeb;
}

.storage-progress-bar {
  height: 100%;

  min-width: 0;

  border-radius: inherit;

  background: #0e8140;

  transition: width 0.4s ease;
}

.storage-details {
  display: flex;
  justify-content: space-between;

  margin-top: 10px;

  color: #7b867f;
  font-size: 12px;
}

.storage-divider {
  height: 1px;

  margin: 28px 0 0;

  background: #e4e9e5;
}

.storage-link {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding-top: 20px;

  color: #17221b;
  text-decoration: none;

  font-size: 14px;
  font-weight: 700;

  transition: color 0.2s ease;
}

.storage-link:hover {
  color: #0e8140;
  text-decoration: none;
}

.storage-arrow {
  color: #0e8140;
  font-size: 20px;
}

/* Password */

.password-hint {
  display: block;
  margin-top: 7px;

  color: #89938d;
  font-size: 11px;
}

/* Account information */

.account-info-card {
  align-self: start;
}

.info-list {
  margin-top: 25px;
  border-top: 1px solid #e4e9e5;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  padding: 16px 0;

  border-bottom: 1px solid #e4e9e5;
}

.info-row span {
  color: #7b867f;
  font-size: 13px;
}

.info-row strong {
  color: #17221b;
  font-size: 13px;
  font-weight: 700;

  text-align: right;
}

/* Alerts */

.account-alert {
  display: flex;
  align-items: center;
  gap: 10px;

  margin-bottom: 22px;
  padding: 13px 16px;

  border-radius: 12px;

  font-size: 13px;
  font-weight: 600;
}

.account-alert.success {
  background: #eaf7ef;
  border: 1px solid #cce8d7;
  color: #166534;
}

.account-alert.error {
  background: #fff0f0;
  border: 1px solid #f0cccc;
  color: #a12828;
}

.alert-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 22px;
  height: 22px;

  border-radius: 50%;

  background: currentColor;
  color: #ffffff;

  font-size: 11px;
}

/* Responsive */

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

@media (max-width: 700px) {
  .account-page {
    padding: 25px 14px 60px;
  }

  .account-heading {
    margin-bottom: 30px;
  }

  .account-heading h1 {
    font-size: 42px;
    letter-spacing: -1.5px;
  }

  .account-card {
    padding: 22px;
    border-radius: 16px;
  }

  .account-card-header {
    margin-bottom: 24px;
  }

  .storage-value strong {
    font-size: 25px;
  }

  .account-avatar {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }
}

@media (max-width: 480px) {
  .account-heading h1 {
    font-size: 34px;
  }

  .account-card-header {
    gap: 12px;
  }

  .account-card h2 {
    font-size: 21px;
  }

  .info-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .info-row strong {
    text-align: left;
  }
}
