.admin-navigation { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.admin-navigation a { color: var(--ink); text-decoration: none; font-weight: 700; padding: .7rem 1rem; border: 1px solid transparent; border-radius: 999px; }
.admin-navigation a:hover, .admin-navigation a.active { color: var(--brand); background: #fff; border-color: var(--line); }
.image-bank-shell { min-height: calc(100vh - 76px); }
.image-bank { margin-top: 2rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 24px; background: rgba(255, 255, 255, .72); box-shadow: 0 18px 50px rgba(49, 32, 22, .06); }
.image-bank-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.image-bank-toolbar form { flex: 1; max-width: 620px; }
.image-bank-toolbar label { display: block; margin-bottom: .4rem; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.image-bank-toolbar form > div { display: flex; gap: .6rem; }
.image-bank-toolbar input { min-width: 0; flex: 1; padding: .82rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; }
.image-bank-notice { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1rem 0 0; }
.image-bank-notice.error { border-color: #e4aaa4; background: #fff0ee; color: #9f2f27; }
.image-bank-location { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; margin-top: 1rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.image-bank-location nav { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; min-width: 0; }
.image-bank-location nav button, .image-bank-location > button, .image-bank-location > div button { border: 0; background: transparent; color: var(--brand); font: inherit; font-weight: 700; cursor: pointer; padding: .35rem; }
.image-bank-location nav button:disabled { color: var(--ink); cursor: default; }
.image-bank-location > div { display: flex; gap: .4rem; }
.image-bank-location .danger { color: #a52b27; }
.image-bank-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; margin-top: 1rem; }
.image-bank-folder { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: .7rem; row-gap: .12rem; min-width: 0; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--accent-soft); color: var(--ink); cursor: pointer; text-align: left; }
.image-bank-folder:hover { border-color: var(--brand); transform: translateY(-1px); }
.image-bank-folder span { grid-row: 1 / 3; font-size: 1.25rem; }
.image-bank-folder strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-bank-folder small { grid-column: 2; color: var(--muted); font-size: .72rem; white-space: nowrap; }
.image-bank-folder.is-drop-target { border-color: var(--brand); background: #f0ded9; box-shadow: 0 0 0 4px rgba(112, 35, 50, .14); transform: translateY(-2px); }
.image-bank-selection-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.image-bank-selection-bar.has-selection { border-color: rgba(112, 35, 50, .42); background: #fbf4f1; }
.image-bank-selection-bar label { display: flex; align-items: center; gap: .55rem; font-weight: 700; cursor: pointer; }
.image-bank-selection-bar input, .image-bank-select input { width: 1.1rem; height: 1.1rem; accent-color: var(--brand); }
.image-bank-selection-bar > div { display: flex; align-items: center; gap: .55rem; }
.image-bank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-top: 1rem; }
.image-bank-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; transition: border-color .16s ease, box-shadow .16s ease, opacity .16s ease; }
.image-bank-card.is-selected { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(112, 35, 50, .12); }
.image-bank-card.is-dragging { opacity: .55; }
.image-bank-select { position: absolute; z-index: 2; top: .65rem; left: .65rem; display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid rgba(112, 35, 50, .25); border-radius: 9px; background: rgba(255, 255, 255, .94); box-shadow: 0 3px 12px rgba(49, 32, 22, .12); cursor: pointer; }
.image-bank-select span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.image-bank-preview { display: grid; place-items: center; height: 210px; padding: .75rem; background: #f7f2e9; }
.image-bank-preview img { width: 100%; height: 100%; object-fit: contain; }
.image-bank-card-copy { display: grid; gap: .3rem; padding: .9rem .9rem .5rem; }
.image-bank-card-copy strong, .image-bank-card-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-bank-card-copy small { color: var(--muted); }
.image-bank-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: .5rem .9rem .9rem; }
.image-bank-card-actions button { width: 100%; }
.image-bank-delete, .image-bank-delete-selected { border-color: #d9aaa5 !important; color: #9f2f27 !important; background: #fff7f5 !important; }
.image-bank-delete:hover, .image-bank-delete-selected:hover { border-color: #9f2f27 !important; background: #fff0ee !important; }
.image-bank-state { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: .6rem; min-height: 220px; color: var(--muted); text-align: center; }
.image-bank-state.error { color: #a52b27; flex-direction: column; }
.image-bank-modal-backdrop { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 1rem; background: rgba(24, 15, 13, .58); backdrop-filter: blur(3px); }
.image-bank-folder-picker { width: min(720px, 100%); max-height: min(760px, calc(100vh - 2rem)); overflow: auto; border: 1px solid var(--line); border-radius: 22px; background: #fffdf9; box-shadow: 0 28px 90px rgba(25, 13, 10, .28); }
.image-bank-folder-picker > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.25rem .85rem; border-bottom: 1px solid var(--line); }
.image-bank-folder-picker h2 { margin: .15rem 0 0; font-size: clamp(1.45rem, 3vw, 2rem); }
.image-bank-modal-close { display: grid; place-items: center; flex: 0 0 auto; width: 2.4rem; height: 2.4rem; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); font-size: 1.5rem; cursor: pointer; }
.image-bank-move-warning { margin: 1rem 1.25rem 0; padding: .8rem 1rem; border-radius: 12px; background: #fff2d9; color: #6f4d13; font-size: .9rem; }
.image-bank-picker-breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; margin: 1rem 1.25rem 0; padding-bottom: .85rem; border-bottom: 1px solid var(--line); }
.image-bank-picker-breadcrumbs button { border: 0; background: transparent; color: var(--brand); font: inherit; font-weight: 750; cursor: pointer; padding: .3rem; }
.image-bank-picker-breadcrumbs button:disabled { color: var(--ink); cursor: default; }
.image-bank-picker-content { min-height: 250px; padding: 1rem 1.25rem; }
.image-bank-picker-folders { display: grid; gap: .55rem; }
.image-bank-picker-folders button { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .7rem; width: 100%; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--accent-soft); color: var(--ink); text-align: left; cursor: pointer; }
.image-bank-picker-folders button:hover { border-color: var(--brand); }
.image-bank-picker-folders button span:first-child { font-size: 1.2rem; }
.image-bank-picker-folders button span:last-child { color: var(--brand); font-size: 1.4rem; }
.image-bank-picker-state { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 220px; color: var(--muted); text-align: center; }
.image-bank-picker-state.error { color: #a52b27; }
.image-bank-folder-picker > footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem 1.25rem; border-top: 1px solid var(--line); }
.image-bank-folder-picker > footer > div { display: flex; gap: .55rem; }
@media (max-width: 760px) {
  .admin-view .topbar { flex-wrap: wrap; }
  .admin-navigation { width: 100%; order: 3; justify-content: center; border-top: 1px solid var(--line); padding-top: .55rem; }
  .admin-navigation a { flex: 1; max-width: 170px; padding: .55rem .7rem; text-align: center; }
  .image-bank-toolbar, .image-bank-location { align-items: stretch; flex-direction: column; }
  .image-bank-notice { align-items: stretch; flex-direction: column; }
  .image-bank-location > div { flex-wrap: wrap; }
  .image-bank-folder small { display: none; }
  .image-bank-selection-bar, .image-bank-folder-picker > footer { align-items: stretch; flex-direction: column; }
  .image-bank-selection-bar > div, .image-bank-folder-picker > footer > div { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .image-bank-folder-picker > footer > div { grid-template-columns: 1fr; }
  .image-bank-selection-bar > div strong { grid-column: 1 / -1; }
  .image-bank-delete-selected { grid-column: 1 / -1; }
  .image-bank-folder-picker > footer > .secondary-button { width: 100%; }
  .image-bank-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
  .image-bank-preview { height: 170px; }
  .image-bank-card-actions { grid-template-columns: 1fr; }
}
