:root {
  --ink: #081735;
  --muted: #596984;
  --blue: #075bff;
  --blue-dark: #003fbe;
  --blue-bright: #15cfff;
  --line: #d8e5fb;
  --soft: #f4f8ff;
  --navy: #04102d;
  --green: #0da869;
}

.brand {
  flex: 0 0 auto;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 176px;
  height: auto;
  max-height: 52px;
  object-fit: contain;
  object-position: left center;
}

footer .brand-logo,
.brand.inverse .brand-logo {
  filter: brightness(0) invert(1);
}

.modal-brand-icon {
  display: block;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
}

.primary,
.cta,
.submit {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue) 58%, #079cff);
}

.primary {
  box-shadow: 0 10px 25px rgba(7, 91, 255, 0.26);
}

.primary:hover,
.submit:hover {
  background: linear-gradient(135deg, #002f96, var(--blue-dark) 54%, var(--blue));
  box-shadow: 0 13px 30px rgba(7, 91, 255, 0.34);
}

.hero {
  background: radial-gradient(circle at 50% 25%, rgba(21, 207, 255, 0.16) 0, rgba(7, 91, 255, 0.08) 28%, rgba(255, 255, 255, 0) 58%);
}

.page-hero {
  background: radial-gradient(circle at 50% 0, rgba(21, 207, 255, 0.16), rgba(7, 91, 255, 0.08) 35%, transparent 65%);
}

.file-icon,
.doc-icon,
.format-item i,
.card i {
  background: #e9f2ff;
}

.converter-card {
  border-color: #cfdef7;
  box-shadow: 0 24px 70px rgba(0, 63, 190, 0.14);
}

.converter-card.drag {
  box-shadow: 0 22px 80px rgba(7, 91, 255, 0.26);
}

.shield {
  background: linear-gradient(150deg, var(--blue-bright), var(--blue) 48%, var(--blue-dark));
}

.cta {
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(21, 207, 255, 0.28), transparent 34%);
  pointer-events: none;
}

.cta > * {
  position: relative;
}

.text-link,
.topbar nav a:hover,
.content a {
  color: var(--blue);
}

@media (max-width: 520px) {
  .brand-logo {
    width: 148px;
    max-height: 46px;
  }
}

.account-page {
  background: #f4f8ff;
}

.account-header-logout {
  margin-left: auto;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--blue-dark);
  background: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.account-header-logout:hover {
  border-color: var(--blue);
  background: #edf4ff;
}

.account-main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 90px;
}

.account-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 34px;
}

.account-welcome h1 {
  margin: 8px 0 6px;
  color: var(--ink);
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -2px;
}

.account-welcome h1 span {
  color: var(--blue);
}

.account-welcome p {
  margin: 0;
  color: var(--muted);
}

.account-convert-button {
  display: inline-block;
  padding: 14px 20px;
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  white-space: nowrap;
} 

.account-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.account-stats article {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 63, 190, 0.06);
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  color: var(--blue);
  background: #eaf2ff;
  font-size: 22px;
}

.account-stats strong {
  display: block;
  color: var(--ink);
  font-size: 25px;
}

.account-stats small {
  color: var(--muted);
}

.account-panel {
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(0, 63, 190, 0.08);
}

.account-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.account-panel h2 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: clamp(27px, 4vw, 36px);
  letter-spacing: -1px;
}

.privacy-chip {
  padding: 8px 12px;
  border-radius: 999px;
  color: #087747;
  background: #e9f9f1;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.history-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.history-row {
  display: grid;
  grid-template-columns: 1.2fr .55fr 1fr;
  gap: 18px;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.history-row:last-child {
  border-bottom: 0;
}

.history-head {
  color: var(--ink);
  background: var(--soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.history-format {
  display: flex;
  align-items: center;
  gap: 9px;
}

.history-format i {
  min-width: 48px;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--blue-dark);
  background: #eaf2ff;
  font-style: normal;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.account-empty,
.account-loading {
  padding: 52px 20px;
  color: var(--muted);
  text-align: center;
}

.account-empty > span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 17px;
  color: var(--blue);
  background: #eaf2ff;
  font-size: 28px;
}

.account-empty h3 {
  margin: 0 0 5px;
  color: var(--ink);
}

.account-empty p {
  margin: 0 0 14px;
}

.account-empty a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.account-privacy {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  margin-top: 24px;
  padding: 26px 30px;
  border-radius: 18px;
  color: #d7e6ff;
  background: linear-gradient(135deg, var(--navy), #082a72);
}

.account-privacy-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-bright));
  font-size: 22px;
  font-weight: 900;
}

.account-privacy h2 {
  margin: 0 0 4px;
  color: #fff;
  font-size: 20px;
}

.account-privacy p {
  margin: 0;
  color: #afc3e8;
  font-size: 14px;
}

.account-privacy a {
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.account-error {
  max-width: 650px;
  margin: 50px auto;
  text-align: center;
}

.account-error h1 {
  margin-top: 0;
}

@media (max-width: 760px) {
  .account-page .topbar nav {
    display: none;
  }

  .account-main {
    width: min(100% - 28px, 1120px);
    padding-top: 42px;
  }

  .account-welcome,
  .account-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .account-stats {
    grid-template-columns: 1fr;
  }

  .privacy-chip {
    width: fit-content;
  }

  .history-head {
    display: none;
  }

  .history-row {
    grid-template-columns: 1fr auto;
  }

  .history-row time {
    grid-column: 1 / -1;
  }

  .account-privacy {
    grid-template-columns: auto 1fr;
  }

  .account-privacy a {
    grid-column: 2;
  }
}

@media (max-width: 480px) {
  .account-header-logout {
    padding: 9px 11px;
    font-size: 12px;
  }

  .account-page .brand-logo {
    width: 130px;
  }

  .account-welcome h1 {
    font-size: 36px;
  }

  .account-privacy {
    grid-template-columns: 1fr;
  }

  .account-privacy a {
    grid-column: auto;
  }
}

.account-card {
  width: min(520px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow-y: auto;
}

.auth-status {
  min-height: 22px;
  margin: 12px 0 0;
  color: #c13838;
  font-size: 14px;
}

.auth-status.ok {
  color: #087747;
}

.account-benefits {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--soft);
}

.account-benefits ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.history-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 24px;
}

.history-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--soft);
}

.history-item strong {
  color: var(--ink);
}

.history-item span,
.history-item time {
  color: var(--muted);
  font-size: 13px;
}

.logout-button {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.breadcrumb {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 24px 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.related-conversions {
  margin-top: 58px;
  padding-top: 38px;
  border-top: 1px solid var(--line);
}

.related-conversions h2 {
  margin-top: 0;
}

.related-grid,
.conversion-directory {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.related-grid a,
.conversion-directory a {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 63, 190, 0.06);
}

.related-grid a:hover,
.conversion-directory a:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(7, 91, 255, 0.12);
}

.related-grid span,
.conversion-directory span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

footer .footer-links {
  grid-template-columns: 1.35fr repeat(3, 1fr);
}

@media (max-width: 820px) {
  .related-grid,
  .conversion-directory {
    grid-template-columns: repeat(2, 1fr);
  }

  footer .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .related-grid,
  .conversion-directory,
  footer .footer-links {
    grid-template-columns: 1fr;
  }
}
