:root { --accent: #00a8d4; --accent-dark: #0089b2; --bs-primary: var(--accent); --bs-primary-rgb: 0, 168, 212; --bs-link-color: var(--accent-dark); --bs-link-hover-color: #006b8e; }
body { min-height: 100vh; background: #eef4f8; color: #343a40; }
.app-card { max-width: 760px; background: white; border-radius: 28px; box-shadow: 0 20px 50px #1b3b5a1a; }
.brand { display: inline-flex; align-items: center; gap: .5rem; color: var(--accent-dark); font-size: 1.35rem; font-weight: 800; }
.brand span { color: #343a40; }
.home-return { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 38px; width: 38px; height: 38px; color: var(--bs-link-color); text-decoration: none; }
.home-return:hover, .home-return:focus-visible { color: var(--bs-link-hover-color); }
.home-return svg { width: 24px; height: 24px; fill: currentColor; }
.btn-primary { --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-hover-bg: var(--accent-dark); --bs-btn-hover-border-color: var(--accent-dark); --bs-btn-active-bg: var(--accent-dark); --bs-btn-active-border-color: var(--accent-dark); --bs-btn-disabled-bg: var(--accent); --bs-btn-disabled-border-color: var(--accent); }
#upload { --bs-btn-bg: #123e83; --bs-btn-border-color: #123e83; --bs-btn-hover-bg: #0b2e68; --bs-btn-hover-border-color: #0b2e68; --bs-btn-active-bg: #092551; --bs-btn-active-border-color: #092551; --bs-btn-disabled-bg: #123e83; --bs-btn-disabled-border-color: #123e83; }
.btn-outline-primary, .btn-outline-info { --bs-btn-color: var(--accent-dark); --bs-btn-border-color: var(--accent); --bs-btn-hover-bg: var(--accent); --bs-btn-hover-border-color: var(--accent); --bs-btn-active-bg: var(--accent-dark); --bs-btn-active-border-color: var(--accent-dark); }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 .25rem #00a8d426; }
.alert-pink { color: #84284b; background: #fce4ec; border-color: #f3b8ca; }
.nav-pills { --bs-nav-pills-link-active-bg: #0d6efd; }
.admin-topbar { background: #000; color: #fff; box-shadow: 0 2px 4px #00000018; }
.admin-topbar > .container { max-width: none; padding-inline: 12px; }
.admin-topbar .brand span { color: #fff; }
.admin-topbar .nav-link { color: #fff; border: 1px solid #fff9; border-radius: .375rem; padding: .375rem .75rem; }
.admin-topbar .nav-link:hover, .admin-topbar .nav-link:focus-visible { color: #fff; background: #ffffff26; }
.admin-topbar .nav-link.active { color: #fff; background: #0d6efd; border-color: #0d6efd; }
.topbar-user { display: inline-flex; align-items: center; gap: .5rem; margin-left: .25rem; padding-left: .75rem; border-left: 1px solid #fff8; color: #fff; font-weight: 600; white-space: nowrap; }
.topbar-logout { gap: .4rem; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; width: auto; height: 38px; padding: 0 .4rem; border: 0; background: transparent; color: #fff; }
.topbar-logout:hover, .topbar-logout:focus-visible { background: #ffffff26; }
.topbar-logout svg { width: 21px; height: 21px; fill: currentColor; }
.gallery-link { color: #212529; }
#galleryLinks .btn { font-size: 14px; line-height: 1.5; font-weight: 400 !important; padding: 6px 12px; border-radius: 6px; }
.gallery-link:hover, .gallery-link:focus-visible { background-color: #006b8e; border-color: #006b8e; color: #fff; }
.gallery-viewer { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; background: #000; overflow: hidden; }
.gallery-viewer::backdrop { background: #000; }
.gallery-viewer-stage { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.gallery-viewer-original { display: flex; align-items: center; justify-content: center; max-width: 100%; max-height: 100%; }
.gallery-viewer-image { display: block; max-width: 100vw; max-height: 100dvh; object-fit: contain; }
.gallery-viewer-arrow { position: absolute; top: 50%; z-index: 1; transform: translateY(-50%); width: 48px; height: 60px; border: 0; border-radius: 12px; background: #0008; color: #fff; font-size: 3rem; line-height: 1; cursor: pointer; }
.gallery-viewer-arrow:hover, .gallery-viewer-arrow:focus-visible { background: #000c; }
.gallery-viewer-arrow:disabled { opacity: .35; cursor: default; }
.gallery-viewer-previous { left: max(8px, env(safe-area-inset-left)); }
.gallery-viewer-next { right: max(8px, env(safe-area-inset-right)); }
.dropzone { border: 2px dashed var(--accent); border-radius: 22px; background: #f1fbff; transition: background .15s; cursor: pointer; }
.dropzone.dragover, .dropzone:hover { background: #e4f7fd; }
.upload-icon { width: 60px; height: 60px; border-radius: 50%; background: var(--accent); color: white; font-size: 2.6rem; line-height: 53px; }
.dropzone .upload-icon { width: 48px; height: 48px; font-size: 2rem; line-height: 42px; }
.image-item { border: 1px solid #e1e8f0; border-radius: 16px; }
.image-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.crop-container { max-height: 55vh; overflow: hidden; }
.crop-container img { max-width: 100%; display: block; }
.admin-card { max-width: 1050px; }
#photo-tabbed-card { width: calc(100% - 24px); max-width: none; margin-inline: auto; border: 0; border-radius: 0; }
#photo-tabbed-card > .card-header { padding-inline: 0; background: #eef4f8; }
#photo-tabbed-card .nav-link { padding-inline: 10px; flex: 0 0 auto; }
@media (min-width: 992px) {
  #photo-tabbed-card { width: calc(100% - 100px); }
  #photo-tabbed-card .nav-link { padding-inline: 20px; }
}
#photo-tab-panel { width: 100%; max-width: none; padding: 1rem !important; }
#photo-tab-panel > .app-card { max-width: none; padding: 0 !important; border: 0; border-radius: 0; box-shadow: none; }
@media (max-width: 991.98px) {
  .photo-tabbed-view .admin-topbar > .container { padding-block: .25rem !important; }
  .photo-tabbed-view .admin-topbar .brand { font-size: 1.1rem; }
  .photo-tabbed-view .admin-topbar .brand img { width: 34px; height: 34px; }
}
.stat-card { border: 1px solid #d7e8f0; border-radius: 16px; background: #f8fcfe; }
@media (max-width: 575px) {
  .upload-main { padding: 6px 10px calc(10px + env(safe-area-inset-bottom)) !important; }
  .upload-main .app-card { border-radius: 20px; padding: 12px 16px !important; }
  .upload-main .app-card > header { margin-bottom: 8px !important; }
  #uploadBrand { margin-bottom: 0 !important; }
  #uploadBrand img { width: 32px; height: 32px; }
  .home-return { width: 34px; height: 34px; flex-basis: 34px; }
  .upload-main h1 { font-size: 1.2rem; margin-bottom: 0 !important; }
  .upload-main #publicGalleries h2 { font-size: 1.2rem; }
  .upload-main header p { font-size: .875rem; }
  .admin-topbar .container { position: relative; gap: .5rem !important; padding-top: .25rem !important; padding-bottom: .25rem !important; }
  .admin-topbar .brand { max-width: 54%; font-size: 1.1rem; }
  .photo-tabbed-view .admin-topbar .brand { max-width: none; }
  .admin-topbar .brand img { width: 34px; height: 34px; }
  .admin-topbar nav { width: auto; margin-left: auto !important; flex-wrap: nowrap !important; justify-content: flex-end !important; gap: .375rem !important; overflow: visible; }
  .admin-topbar nav .nav-link { white-space: nowrap; min-height: 40px; padding: .35rem .55rem; font-size: .875rem; display: inline-flex; align-items: center; }
  .admin-topbar .topbar-user { position: absolute; top: .25rem; right: .75rem; max-width: 42%; min-height: 34px; margin-left: 0; padding-left: .5rem; font-size: .875rem; }
  .admin-topbar .topbar-user > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .admin-topbar .topbar-logout { gap: .4rem; white-space: nowrap; width: auto; height: 34px; flex: 0 0 auto; }
  .dropzone { padding: 8px !important; margin-bottom: 8px !important; border-radius: 14px; }
  .dropzone .upload-icon { display: none; }
  .dropzone h2, .dropzone p { display: none; }
  .dropzone label { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  #tagField { margin-bottom: 8px !important; }
  #tagField .form-label, #uploadOptions .form-label { margin-bottom: 4px; }
  #tagsHelp { margin-top: 2px; font-size: .75rem; }
  #uploadOptions { --bs-gutter-y: 8px; margin-bottom: 0 !important; }
  .image-item { gap: .75rem !important; }
  .image-item > div { min-width: calc(100% - 90px); }
  .image-item > button { flex: 1; min-height: 44px; }
  .upload-action #upload { width: 100%; min-height: 48px; }
  .has-pending-upload .upload-main, .has-pending-upload #photo-tab-panel.upload-main { padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important; }
  .has-pending-upload .upload-action { position: fixed; z-index: 1030; left: 0; right: 0; bottom: 0; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -4px 18px #1b3b5a26; }
  #cropModal .modal-body { overflow-y: auto; }
  #cropModal .crop-container { max-height: min(60dvh, 620px); }
}


/* Account switches retain Bootstrap focus and disabled states. */
.account-status-switch .form-check-input:checked { background-color: #198754; border-color: #198754; }
