﻿:root {
  --shield-gold: #d4a64f;
  --shield-gold-bright: #f3d18b;
  --shield-red: #a80d12;
  --shield-ink: #080706;
  --shield-paper: #f4ead8;
}

html, body {
  min-height: 100%;
  color: var(--shield-paper) !important;
  background: #050403 url("../images/shield-background.png") center / cover fixed !important;
  font-family: Inter, "Segoe UI", system-ui, sans-serif !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 30%, rgba(151, 20, 20, .16), transparent 38%),
    linear-gradient(180deg, rgba(0, 0, 0, .16), rgba(0, 0, 0, .7));
}

body.layout_frontend header,
body.layout_frontend [role="banner"] {
  justify-content: center !important;
  padding-top: 1.2rem !important;
  background: transparent !important;
}

img[alt="Vaultwarden"],
.new-logo-themed,
body.layout_frontend header img {
  content: url("../images/shield-logo.png") !important;
  width: clamp(190px, 24vw, 320px) !important;
  height: auto !important;
  max-height: 34vh !important;
  object-fit: contain !important;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, .8)) drop-shadow(0 0 18px rgba(212, 166, 79, .16));
}

body.layout_frontend main {
  width: min(94vw, 460px) !important;
  margin-inline: auto !important;
  padding: clamp(1.5rem, 4vw, 2.5rem) !important;
  border: 1px solid rgba(212, 166, 79, .48) !important;
  border-radius: 24px !important;
  background: linear-gradient(145deg, rgba(18, 15, 12, .93), rgba(5, 5, 5, .84)) !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .72), inset 0 1px rgba(255, 255, 255, .06) !important;
  backdrop-filter: blur(14px);
}

h1, h2, h3, h4, label, legend {
  color: var(--shield-paper) !important;
  letter-spacing: .02em;
}

h1, h2 {
  font-family: Georgia, "Times New Roman", serif !important;
  text-shadow: 0 2px 22px rgba(212, 166, 79, .2);
}

input, textarea, select,
bit-form-control input,
bit-form-control textarea,
bit-form-control select {
  color: #fff8ec !important;
  caret-color: var(--shield-gold-bright) !important;
  background: rgba(7, 7, 7, .82) !important;
  border-color: rgba(212, 166, 79, .56) !important;
  border-radius: 12px !important;
  box-shadow: inset 0 1px 12px rgba(0, 0, 0, .58) !important;
}

input:focus, textarea:focus, select:focus,
bit-form-control input:focus,
bit-form-control textarea:focus {
  border-color: var(--shield-gold-bright) !important;
  outline: 2px solid rgba(168, 13, 18, .42) !important;
  box-shadow: 0 0 0 4px rgba(212, 166, 79, .12), 0 0 24px rgba(168, 13, 18, .22) !important;
}

button[type="submit"],
button.tw-bg-primary-600,
.btn-primary {
  color: #fff8ec !important;
  border: 1px solid rgba(243, 209, 139, .58) !important;
  background: linear-gradient(135deg, #bd171c, #73070b 58%, #3d0305) !important;
  box-shadow: 0 12px 30px rgba(120, 0, 5, .36), inset 0 1px rgba(255, 255, 255, .12) !important;
}

button:hover, a:hover {
  filter: brightness(1.12);
}

a {
  color: var(--shield-gold-bright) !important;
}

header, nav, aside,
bit-nav-logo,
[class*="tw-bg-background"],
[class*="tw-bg-secondary"] {
  background-color: rgba(8, 7, 6, .88) !important;
  border-color: rgba(212, 166, 79, .24) !important;
  backdrop-filter: blur(12px);
}

bit-card, .card, [class*="tw-shadow"] {
  border-color: rgba(212, 166, 79, .3) !important;
  background: rgba(15, 13, 11, .9) !important;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .48) !important;
}

bit-nav-logo bit-nav-item a::before {
  width: 42px !important;
  height: 42px !important;
  background-image: url("../images/shield-logo.png") !important;
  background-size: contain !important;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .7));
}

footer, [role="contentinfo"] {
  color: rgba(244, 234, 216, .74) !important;
  background: rgba(4, 4, 4, .76) !important;
  border-top: 1px solid rgba(212, 166, 79, .2) !important;
}

.shield-brand-footer {
  width: 100%;
  padding: 1rem 1.5rem;
  text-align: center;
  color: rgba(244, 234, 216, .78);
  letter-spacing: .08em;
}

.shield-brand-footer strong { color: var(--shield-gold-bright); }
.shield-brand-footer span { color: #db2d31; }

@media (max-width: 720px) {
  body.layout_frontend main { border-radius: 18px !important; padding: 1.25rem !important; }
  img[alt="Vaultwarden"], .new-logo-themed, body.layout_frontend header img { width: 190px !important; }
}

body.layout_frontend header > a,
body.layout_frontend [role="banner"] > a {
  width: 190px !important;
  min-height: 88px !important;
  margin: .45rem 0 !important;
  padding: 0 !important;
  background: url("images/shield-logo.png") left center / contain no-repeat !important;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .8));
}

body.layout_frontend header > a bit-svg,
body.layout_frontend [role="banner"] > a bit-svg {
  display: none !important;
}
/* Login page: retain the credential form while removing Vaultwarden's shell. */
body.shield-login-cleanup { background: #050403 url("../images/shield-background.png") center / cover fixed !important; }
body.shield-login-cleanup > app-root > div > .tw-fixed,
body.shield-login-cleanup .tw-relative.tw-grow > .tw-hidden,
body.shield-login-cleanup .shield-login-heading { display: none !important; }
body.shield-login-cleanup header,
body.shield-login-cleanup [role="banner"] { display: none !important; min-height: 0 !important; height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
body.layout_frontend.shield-login-cleanup main,
body.shield-login-cleanup .shield-login-shell { border: 0 !important; background: transparent !important; box-shadow: none !important; backdrop-filter: none !important; }
body.layout_frontend.shield-login-cleanup main { width: min(94vw, 460px) !important; padding: 0 !important; }
.shield-login-logo { display: block; width: clamp(210px, 28vw, 330px); max-width: 88%; height: auto; margin: 0 auto clamp(1rem, 3vh, 1.75rem); object-fit: contain; filter: drop-shadow(0 18px 34px rgba(0, 0, 0, .8)) drop-shadow(0 0 18px rgba(212, 166, 79, .16)); }
body.shield-login-cleanup .shield-login-form { border-color: rgba(212, 166, 79, .48) !important; background: rgba(10, 9, 8, .9) !important; box-shadow: none !important; }


/* Login-only cleanup revision 2. */
body.shield-login-cleanup .shield-vaultwarden-illustration,
body.shield-login-cleanup .shield-vaultwarden-illustration-wrap,
body.shield-login-cleanup [class*="tw-fill-illustration"],
body.shield-login-cleanup .shield-old-vaultwarden-logo { display: none !important; }
body.shield-login-cleanup app-root > div > .tw-relative.tw-grow > div:has(svg [class*="tw-fill-illustration"]) { display: none !important; }
body.shield-login-cleanup .shield-login-email,
body.shield-login-cleanup .shield-login-email:hover,
body.shield-login-cleanup .shield-login-email:focus,
body.shield-login-cleanup .shield-login-email:focus-visible { border: 0 !important; outline: 0 !important; box-shadow: none !important; background: transparent !important; }
body.shield-login-cleanup footer,
body.shield-login-cleanup [role="contentinfo"] { background: rgba(4, 4, 4, .82) !important; border-top: 1px solid rgba(212, 166, 79, .35) !important; }
body.shield-login-cleanup .shield-brand-footer { display: flex; flex-direction: column; align-items: center; gap: .3rem; width: 100%; padding: .9rem 1.5rem; text-align: center; letter-spacing: .035em; line-height: 1.35; }
body.shield-login-cleanup .shield-footer-copyright { color: #f3d18b !important; }
body.shield-login-cleanup .shield-footer-company { color: #f4ead8 !important; }
body.shield-login-cleanup .shield-footer-company span { color: #db2d31 !important; font-weight: 700; }

/* Official BadgeInk footer, matched to dev.badgeink.com. */
body.shield-login-cleanup footer,
body.shield-login-cleanup [role="contentinfo"] { padding: 0 !important; background: #020202 !important; border-top: 1px solid rgba(185, 138, 69, .18) !important; }
body.shield-login-cleanup .shield-brand-footer { display: grid; justify-items: center; gap: 0; width: 100%; padding: 72px 24px 28px; text-align: center; font-family: Inter, "Segoe UI", system-ui, sans-serif; }
body.shield-login-cleanup .shield-footer-brand { color: #f4ead8 !important; font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-weight: 600; letter-spacing: .08em; line-height: 1.2; text-transform: none; text-decoration: none; }
body.shield-login-cleanup .shield-footer-tagline { margin: 6px 0 0; color: #777068 !important; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; }
body.shield-login-cleanup .shield-footer-rule { width: min(550px, 80vw); height: 1px; margin: 38px 0 23px; background: linear-gradient(90deg, transparent, rgba(185, 138, 69, .65), transparent); }
body.shield-login-cleanup .shield-footer-company { margin: 0; color: #8d867e !important; font-size: 10px; letter-spacing: .34em; text-transform: uppercase; }
body.shield-login-cleanup .shield-footer-company strong { color: #dbb978 !important; font-family: Georgia, "Times New Roman", serif; font-size: 13px; }
body.shield-login-cleanup .shield-footer-copyright { margin-top: 34px; color: #48443f !important; font-size: 8px; letter-spacing: .13em; text-transform: uppercase; }

/* Keep both login credential steps to one outer form-control border. */
body.shield-login-cleanup .shield-login-credential,
body.shield-login-cleanup .shield-login-credential:hover,
body.shield-login-cleanup .shield-login-credential:focus,
body.shield-login-cleanup .shield-login-credential:focus-visible {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
