:root { --accent: #087f8c; }
body { background: #eef4f8; color: #18333d; }
.brand-logo { width: 44px; height: 44px; flex-shrink: 0; }
.navbar-brand { font-size: 1.25rem; }
.upload-title { font-size: 1.625rem; font-weight: 700; line-height: 1.25; }
#uploadSection .card { border-color: #dce6e9; border-radius: 20px; }
#dropZone { border: 2px dashed #8ab7be; background: #f1fafb; border-radius: 16px; padding: 48px 20px; }
#dropZone:hover, #dropZone:focus-within { background: #e4f4f5; }
.upload-icon { width: 50px; height: 50px; background: var(--accent); font-size: 32px; line-height: 1; }
#uploadSection .btn-primary { --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-hover-bg: #066774; --bs-btn-hover-border-color: #066774; --bs-btn-active-bg: #066774; --bs-btn-active-border-color: #066774; }
#mergeZip:checked { background-color: var(--accent); border-color: var(--accent); }
@media (max-width: 575.98px) { .upload-title { font-size: 1.375rem; } }

/* Match NobiPhoto's 760px white guest card without changing signed-in pages. */
.guest-page { color: #343a40; }
.guest-page > .navbar { width: calc(100% - 24px); max-width: 760px; margin: 16px auto 0; padding: 24px 24px 8px !important; background: #fff !important; border-radius: 28px 28px 0 0; box-shadow: none !important; }
.guest-page > .navbar > .container { padding: 0; }
.guest-page .navbar-brand { color: #343a40 !important; font-size: 1.35rem; margin: 0; }
.guest-page .brand-logo { width: 40px; height: 40px; }
.guest-page > main { width: calc(100% - 24px); max-width: 760px; margin: 0 auto 16px; padding: 16px 24px 24px !important; background: #fff; border-radius: 0 0 28px 28px; box-shadow: 0 20px 50px #1b3b5a1a; }
.guest-page #uploadSection .card { border: 0; border-radius: 0; box-shadow: none !important; }
.guest-page #uploadSection .card-body { padding: 0 !important; }
.guest-page .upload-title { font-size: 2rem; margin-bottom: 4px !important; }
.guest-page #dropZone { border-color: #00a8d4; border-radius: 22px; background: #f1fbff; }
.guest-page #dropZone:hover, .guest-page #dropZone:focus-within { background: #e4f7fd; }
.guest-page .upload-icon { width: 48px; height: 48px; background: #00a8d4; }
.guest-page #chooseFiles, .guest-page #guestHome { --bs-btn-bg: #00a8d4; --bs-btn-border-color: #00a8d4; --bs-btn-hover-bg: #0089b2; --bs-btn-hover-border-color: #0089b2; }
.guest-page #openLogin { --bs-btn-color: #0089b2; --bs-btn-border-color: #00a8d4; --bs-btn-hover-bg: #00a8d4; --bs-btn-hover-border-color: #00a8d4; }
.guest-page #send { --bs-btn-bg: #123e83; --bs-btn-border-color: #123e83; --bs-btn-hover-bg: #0b2e68; --bs-btn-hover-border-color: #0b2e68; border-radius: 50rem; padding-left: 24px; padding-right: 24px; }
.guest-page .form-control:focus, .guest-page .form-select:focus { border-color: #00a8d4; box-shadow: 0 0 0 .25rem #00a8d426; }
@media (max-width: 575.98px) {
  .guest-page > .navbar { width: calc(100% - 20px); margin-top: 6px; padding: 12px 16px 8px !important; border-radius: 20px 20px 0 0; }
  .guest-page > main { width: calc(100% - 20px); padding: 8px 16px 16px !important; border-radius: 0 0 20px 20px; }
  .guest-page .brand-logo { width: 32px; height: 32px; }
  .guest-page .upload-title { font-size: 1.35rem; }
}
/* Login matches NobiPhoto; keep these rules scoped to the login route. */
.login-page { background: #e3eef0; color: #182637; }
.login-page > .navbar { display: none; }
.login-page > main { width: 100%; max-width: 1140px; margin: 0 auto; padding: 30px 16px 32px !important; background: transparent; border-radius: 0; box-shadow: none; }
.login-card { max-width: 34rem; padding: 50px; background: white; border-radius: 28px; box-shadow: 0 .125rem .25rem #00000013; }
.login-brand { margin-bottom: 20px; font-size: 1.625rem; font-weight: 700; line-height: 1.25; }
.login-brand img { flex-shrink: 0; }
.login-card form { width: 100%; max-width: 304px; }
.login-card .form-label, .login-card .form-control, .login-card button, .login-return { font-size: 16px; }
.login-card .form-label { margin-bottom: 7px; color: #58687b; }
.login-card .form-control { height: 40px; border: 1px solid #d7dfe7; border-radius: 6px; }
.login-card button[type="submit"] { display: block; width: auto; margin-inline: auto; padding: 8px 26px; border-radius: 6px; --bs-btn-bg: #00a8d4; --bs-btn-border-color: #00a8d4; --bs-btn-hover-bg: #0089b2; --bs-btn-hover-border-color: #0089b2; }
.login-return { margin-top: 26px; color: #0089b2; }
@media (max-width: 575.98px) { .login-card { padding: 30px 24px; } .login-brand { font-size: 1.375rem; } }
/* Shared signed-in navigation: one desktop row, two mobile rows. */
body:not(.guest-page) .system-topbar { background: #000; color: #fff; }
body:not(.guest-page) .system-topbar > .container { flex-wrap: nowrap !important; }
body:not(.guest-page) .system-brand { font-size: 1.35rem; font-weight: 800 !important; white-space: nowrap; margin-right: 0; }
body:not(.guest-page) .system-brand img { width: 40px; height: 40px; }
body:not(.guest-page) #nav { flex-wrap: nowrap !important; }
.system-topbar .nav-link { display: inline-flex; align-items: center; color: #fff; border: 1px solid #ffffff99; border-radius: .375rem; padding: .375rem .75rem; white-space: nowrap; }
.system-topbar .nav-link:hover, .system-topbar .nav-link:focus-visible { color: #fff; background: #ffffff26; }
.system-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 #ffffff88; color: #fff; font-weight: 600; white-space: nowrap; min-width: 0; }
.topbar-display-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.topbar-logout { gap: .4rem; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; width: auto; height: 38px; flex: 0 0 auto; 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; }
@media (max-width: 575px) {
  body:not(.guest-page) .system-topbar { padding-block: 0 !important; }
  body:not(.guest-page) .system-topbar > .container { position: relative; flex-wrap: wrap !important; gap: .5rem !important; padding-block: .5rem !important; }
  body:not(.guest-page) .system-brand { max-width: 54%; font-size: 1.1rem; }
  body:not(.guest-page) .system-brand img { width: 34px; height: 34px; }
  body:not(.guest-page) #nav { width: 100%; margin-left: 0 !important; flex-wrap: wrap !important; justify-content: flex-start !important; gap: .375rem !important; overflow: visible; }
  .system-topbar .nav-link { min-height: 40px; padding: .35rem .55rem; font-size: .875rem; }
  body:not(.guest-page) .topbar-user { position: absolute; top: .5rem; right: .75rem; max-width: 42%; min-height: 34px; margin-left: 0; padding-left: .5rem; font-size: .875rem; }
  .system-topbar .topbar-logout { gap: .4rem; white-space: nowrap; width: auto; height: 34px; flex: 0 0 auto; }
}

/* Public upload return icon; login and signed-in navigation stay unchanged. */
.guest-page:not(.login-page) .topbar-home-return { display: inline-flex !important; align-items: center; justify-content: center; flex: 0 0 38px; width: 38px; height: 38px; color: #0d6efd; text-decoration: none; }
.guest-page:not(.login-page) .topbar-home-return:hover,.guest-page:not(.login-page) .topbar-home-return:focus-visible { color: #0a58ca; }
.topbar-home-return svg { width: 24px; height: 24px; fill: currentColor; }

.guest-page #nav:empty { display: none !important; }

.guest-page .local-login-link{color:#0d6efd!important;}
body:not(.guest-page) .topbar-home-return,body:not(.guest-page) .local-login-link{display:none!important;}
/* Signed-in card only: retain guest upload, delivery state and native client UI. */
#express-tabbed-card { width: calc(100% - 24px); max-width: none; margin-inline: auto; border: 0; border-radius: 0; }
#express-tabbed-card > .card-header { padding-inline: 0; background: #eef4f8; }
#express-tabbed-card .nav-link { padding-inline: 10px; flex: 0 0 auto; }
.express-settings-group { display:flex; flex:0 0 auto; }
.express-settings-menu { position:fixed; z-index:1080; margin:0; padding:.5rem 0; overflow-y:auto; background:#fff; color:#212529; border:1px solid #dee2e6; border-radius:.375rem; }
.express-settings-menu[hidden] { display:none!important; }
.express-settings-menu .dropdown-item { display:flex; align-items:center; min-height:44px; padding:.5rem 1rem; color:#212529; background:#fff; }
.express-settings-menu .dropdown-item:hover { color:#212529; background:#fff; }
.express-settings-menu .dropdown-item.active,
.express-settings-menu .dropdown-item.active:hover { color:#fff; background:#495057; }
.express-settings-menu .dropdown-item:focus-visible { outline:2px solid #495057; outline-offset:-2px; }
#express-tab-panel { width: 100%; max-width: none; padding: 1rem !important; }
.express-tabbed-view .system-topbar { padding-block: 0 !important; }
body.express-tabbed-view .system-topbar > .container { max-width: none; padding: 8px 12px !important; }
.express-tabbed-view .system-brand { padding: 0; margin: 0; }
.express-tabbed-view #account { margin-left: auto; }
@media (min-width: 992px) {
  #express-tabbed-card { width: calc(100% - 100px); }
  #express-tabbed-card .nav-link { padding-inline: 20px; }
}
@media (max-width: 991.98px) {
  body.express-tabbed-view .system-topbar > .container { padding-block: 4px !important; }
  .express-tabbed-view .system-brand { max-width: none; font-size: 1.1rem !important; }
  body.express-tabbed-view .system-brand img { width: 34px; height: 34px; }
}
@media (max-width: 575px) {
  body.express-tabbed-view .system-topbar > .container { flex-wrap: nowrap !important; }
  .express-tabbed-view .topbar-user { position: static !important; max-width: 42%; }
}

/* Keep the management label and caret on one line on narrow screens. */
#express-tabbed-card #express-settings-toggle { display: inline-flex; align-items: center; flex-wrap: nowrap; white-space: nowrap; }

/* Mobile tabs stay on one row and scroll without widening the page. */
@media (max-width: 575px) {
  #express-tabbed-card > .card-header { min-width: 0; }
  #express-tabbed-card #nav {
    display: flex;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
  #express-tabbed-card #nav > * { flex: 0 0 auto; }
  #express-tabbed-card #nav .nav-link { white-space: nowrap; }
}

/* Account state uses the existing Bootstrap switch. */
.form-switch .account-enabled-switch:checked { background-color: #198754; border-color: #198754; }
.form-switch .account-enabled-switch { cursor: pointer; }
.form-switch .account-enabled-switch:disabled { cursor: default; }
