/* Shared UI module: nav/buttons/lang layout */
:root {
  --nav-btn-min-height: 30px;
  --nav-btn-pad-y: 6px;
  --nav-btn-pad-x: 10px;
  --nav-btn-line-height: 1.1;
  --select-min-height: 30px;
  --select-pad-y: 4px;
  --select-pad-x: 10px;
  --file-input-min-height: 30px;
  --file-input-btn-height: 24px;
}

.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  align-items: center;
}

.top,
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}

.page-title-wrap {
  min-width: 0;
}

.page-title {
  margin: 0;
  font-size: clamp(1.08rem, 2vw, 1.38rem);
  font-weight: 600;
  line-height: 1.35;
  color: #ffffff;
}

.lang,
.lang-switch {
  display: flex;
  gap: 8px;
  margin-left: auto;
  justify-content: flex-end;
}

select {
  min-height: var(--select-min-height) !important;
  padding: var(--select-pad-y) var(--select-pad-x) !important;
  border: 1px solid #cfdced !important;
  border-radius: 0 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  color: var(--text) !important;
  line-height: 1.2 !important;
  font-size: 0.78rem;
}

select:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.45);
  outline-offset: 1px;
}

input[type="file"] {
  min-height: var(--file-input-min-height) !important;
  height: var(--file-input-min-height) !important;
  padding: 2px 8px !important;
  line-height: 1.2 !important;
}

input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
  height: var(--file-input-btn-height) !important;
  padding: 0 10px !important;
  margin: 0 8px 0 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  font: inherit !important;
  cursor: pointer;
}

.btn {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 0;
  border: none;
  background: rgba(255, 255, 255, 0.72);
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn.small {
  font-size: 0.62rem !important;
  font-weight: 200 !important;
}

body.account-page .dashboard .btn,
body.account-page .dashboard .btn.small {
  font-size: 0.72rem !important;
  font-weight: 300 !important;
}

.nav .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--nav-btn-min-height);
  padding: var(--nav-btn-pad-y) var(--nav-btn-pad-x);
  line-height: var(--nav-btn-line-height);
  font-weight: 300 !important;
  font-size: 0.72rem !important;
  background: #111419;
  color: #f5f7fb;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.nav .btn.nav-btn-image,
.nav .btn.nav-btn-pdf,
.nav .btn.nav-btn-account {
  font-weight: 300 !important;
  font-size: 0.72rem !important;
}

.nav .btn.active {
  background: var(--glass-panel-bg);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.nav .btn:hover {
  background: var(--glass-panel-bg);
  color: #f5f7fb;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.nav .btn.nav-btn-image {
  background: #f97316;
  color: #fff7ed;
}

.nav .btn.nav-btn-image:hover,
.nav .btn.nav-btn-image.active {
  background: #ea580c;
  color: #fff7ed;
}

.nav .btn.nav-btn-pdf {
  background: #16a34a;
  color: #f0fdf4;
}

.nav .btn.nav-btn-pdf:hover,
.nav .btn.nav-btn-pdf.active {
  background: #15803d;
  color: #f0fdf4;
}

.nav .btn.nav-btn-account {
  background: #1e3a8a;
  color: #eff6ff;
}

.nav .btn.nav-btn-account:hover,
.nav .btn.nav-btn-account.active {
  background: #1e40af;
  color: #eff6ff;
}

.nav-auth {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-auth-user {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  color: #d7dde7;
  padding: 0 2px;
}

.nav-auth .btn.nav-auth-icon-btn {
  min-width: 34px;
  width: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #7f1d1d;
  border: 1px solid #991b1b;
  color: #fee2e2;
}

.nav-auth .btn.nav-auth-icon-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.nav-auth .btn.nav-auth-icon-btn:hover,
.nav-auth .btn.nav-auth-icon-btn:focus-visible {
  background: #b91c1c;
  border-color: #ef4444;
  color: #fff1f2;
  box-shadow: 0 10px 22px rgba(185, 28, 28, 0.38);
}

.is-hidden {
  display: none !important;
}

.nav .btn.is-hidden {
  display: none !important;
}

.btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.btn.primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.28);
}

.picseal-large-notice-modal[hidden] {
  display: none !important;
}

.picseal-large-notice-modal {
  position: fixed;
  inset: 0;
  z-index: 2900;
}

.picseal-large-notice-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
}

.picseal-large-notice-dialog {
  position: relative;
  width: min(520px, calc(100vw - 32px));
  margin: 14vh auto 0;
  padding: 16px 16px 13px;
  border: 2px solid #f59e0b;
  background: #1f1300;
  color: #fffbeb;
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.45);
}

.picseal-large-notice-title {
  margin: 0 0 8px;
  color: #fef3c7;
  font-size: 0.98rem;
  font-weight: 700;
}

.picseal-large-notice-message {
  margin: 0;
  color: #fef9c3;
  font-size: 0.9rem;
  line-height: 1.5;
}

.picseal-large-notice-btn {
  margin-top: 14px;
  min-width: 88px;
  border: 1px solid #f59e0b;
  background: #f59e0b;
  color: #111827;
  font-size: 0.78rem;
  font-weight: 600;
}

.btn.home-logo {
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn.home-logo img {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 0;
  object-fit: cover;
}

.lang .btn,
.lang-switch .btn {
  padding: 5px 8px;
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0;
  background: #111419;
  color: #f5f7fb;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.lang .btn:hover,
.lang-switch .btn:hover {
  background: var(--glass-panel-bg);
  color: #f5f7fb;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

@media print {
  html,
  body {
    background: #fff !important;
    color: #111 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.page-shell-dark .container,
  .container {
    display: block !important;
    min-height: auto !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.page-shell-dark #main-footer,
  #main-footer,
  footer {
    margin-top: 12px !important;
  }

  body,
  body.page-shell-dark,
  .container,
  .panel,
  .card,
  .hero,
  .top,
  .topbar,
  .page-header,
  .page-shell-dark .panel {
    background: #fff !important;
    color: #111 !important;
    box-shadow: none !important;
  }

  body * {
    color: #111 !important;
    background-image: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    text-shadow: none !important;
  }

  img,
  svg,
  canvas {
    max-width: 100% !important;
    height: auto !important;
  }

  a,
  a:visited {
    color: #111 !important;
  }

  .btn {
    border: 1px solid #bbb !important;
    background: #fff !important;
    color: #111 !important;
    box-shadow: none !important;
  }
}

@media (max-width: 640px) {
  .nav-auth {
    width: 100%;
    justify-content: flex-end;
  }

  .nav-auth-user {
    max-width: 55vw;
  }

  .page-header {
    align-items: flex-start;
  }

  .top .lang,
  .top .lang-switch,
  .topbar .lang,
  .topbar .lang-switch,
  .page-header .lang,
  .page-header .lang-switch {
    width: 100%;
    justify-content: flex-end;
  }
}
