:root {
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #10223a;
  --muted: #4c5e75;
  --primary: #004aad;
  --accent: #0a8f6a;
  --warn: #f9f1d0;
  --border: #d6deea;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 15px;
  color: var(--text);
  background: radial-gradient(circle at 20% 20%, #dbe8ff, #f3f4f6 45%), var(--bg);
}

.topbar {
  background: linear-gradient(115deg, #082b65, #004aad);
  color: #fff;
  padding: 0.45rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 64px;
  position: sticky;
  top: 0;
  z-index: 1050;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.brand-title {
  flex: 1 1 14rem;
  min-width: 10rem;
  overflow: hidden;
}
.brand-logo-shell,
.print-logo-shell {
  flex: 0 0 auto;
  min-width: 0;
  height: auto;
  background: #ffffff;
  border: 1px solid rgba(19, 42, 86, 0.2);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  padding: 0.2rem 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-logo,
.print-logo {
  width: auto;
  height: auto;
  display: block;
}
.brand-logo {
  height: 56px;
  max-width: min(30vw, 220px);
}
.print-logo {
  width: auto;
  height: auto;
  max-width: 110px;
  max-height: none;
}
.brand-fallback,
.print-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.6rem;
  color: #153784;
  background: linear-gradient(135deg, #f7fbff, #e7efff);
}

.topbar h1 {
  margin: 0;
  font-size: 1rem;
  color: #ffffff;
  line-height: 1.15;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar p { margin: 0.18rem 0 0; opacity: 0.9; font-size: 0.9rem; }
.build-meta {
  align-self: center;
  color: white;
  margin: 0.18rem 0 0;
  font-size: 0.6rem;
  padding: 10px 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  line-height: 1.45;
  display: inline-flex;
}
/* ---- Search icon + dropdown panel ---- */
.search-wrap {
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
}
.search-icon-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  transition: background 0.13s, opacity 0.13s;
}
.search-icon-btn:hover { background: rgba(255,255,255,0.18); opacity: 1; }
.search-icon-btn svg { display: block; }
.search-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(8,43,101,0.22);
  padding: 0.65rem;
  z-index: 900;
  min-width: 280px;
}
.search-panel.open { display: flex; gap: 0.4rem; }
.search-panel input {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  color: #10223a;
  outline: none;
}
.search-panel input:focus { border-color: #004aad; box-shadow: 0 0 0 2px rgba(0,74,173,0.15); }
.search-panel button {
  width: auto;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  background: #004aad;
  color: #fff;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.search-panel button:hover { background: #082b65; }
/* ---- User area ---- */
.top-user {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  white-space: nowrap;
}
.top-user-name {
  font-size: 0.88rem;
  opacity: 0.9;
}
.signout-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  border-radius: 8px;
  padding: 0.25rem 0.45rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  opacity: 0.8;
  transition: background 0.13s, opacity 0.13s;
}
.signout-btn:hover { background: rgba(255,255,255,0.18); opacity: 1; }
.signout-btn svg { display: block; }
/* ---- Help button ---- */
.help-icon-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  opacity: 0.8;
  flex-shrink: 0;
  transition: background 0.13s, opacity 0.13s;
  line-height: 1;
}
.help-icon-btn:hover { background: rgba(255,255,255,0.18); opacity: 1; }
/* ---- Help overlay ---- */
.help-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8,43,101,0.55);
  z-index: 1200;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
}
.help-overlay.open { display: flex; }
.help-panel {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 16px 56px rgba(8,43,101,0.28);
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: calc(100vh - 4rem);
}
.help-panel-header {
  background: linear-gradient(115deg, #082b65, #004aad);
  color: #fff;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.help-panel-header h2 {
  margin: 0;
  font-size: 1.1rem;
}
.help-panel-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  max-width: fit-content;
}
.help-panel-close:hover { background: rgba(255,255,255,0.2); color: #fff; }
.help-panel-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  font-size: 0.92rem;
  line-height: 1.65;
  color: #1e293b;
}
.help-panel-body h3 {
  margin: 1.1rem 0 0.4rem;
  font-size: 0.95rem;
  color: #082b65;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.25rem;
}
.help-panel-body ul {
  margin: 0.3rem 0 0.6rem 1.1rem;
  padding: 0;
}
.help-panel-body li { margin-bottom: 0.35rem; }
.help-panel-body strong { color: #082b65; }
.sidenav-trigger {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  max-width: fit-content;
}
.sidenav-trigger:hover .brand-logo-shell {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55), 0 2px 8px rgba(0, 0, 0, 0.2);
}
.sidenav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  z-index: 1099;
}
.sidenav-overlay.open { display: block; }
.sidenav {
  position: fixed;
  top: 0;
  left: -290px;
  width: 280px;
  height: 100%;
  background: linear-gradient(180deg, #082b65 0%, #0a3278 100%);
  z-index: 1100;
  transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 28px rgba(0, 0, 0, 0.35);
}
.sidenav.open { left: 0; }
.sidenav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}
.sidenav-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}
.sidenav-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  max-width: fit-content;
}
.sidenav-close:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }
.sidenav-links { padding: 0.4rem 0 1.5rem; flex: 1; }
.sidenav-divider {
  padding: 0.9rem 1.4rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(255, 255, 255, 0.42);
}
.sidenav-links a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 0.65rem 1.4rem;
  font-size: 0.94rem;
  border-left: 3px solid transparent;
  transition: background 0.13s;
}
.sidenav-links a:hover { background: rgba(255, 255, 255, 0.12); }
.sidenav-links a.active {
  background: rgba(255, 255, 255, 0.2);
  border-left-color: #fff;
  font-weight: 700;
}
.topbar a {
  color: #fff;
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0.2rem 0.34rem;
  border-radius: 6px;
}
.topbar a:hover { background: rgba(255, 255, 255, 0.18); }
.topbar a.active {
  background: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  font-weight: 700;
}

.container {
  max-width: 1200px;
  margin: 0.9rem auto;
  padding: 0 0.8rem 1.2rem;
}

.grid { display: grid; gap: 0.72rem; }
.metrics { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.two-up { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.72rem;
  box-shadow: 0 4px 12px rgba(0, 40, 99, 0.06);
}

.card h2, .card h3 { margin-top: 0; margin-bottom: 0.42rem; line-height: 1.2; }
.card h2 { font-size: 1.06rem; }
.card h3 { font-size: 0.98rem; }
.card p { margin: 0.14rem 0 0; font-size: 1.2rem; font-weight: 700; }
.dashboard-metric-subtext {
  margin-top: 0.28rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
}
.pinboard-new-badge {
  display: inline-block;
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  background: #fff1e8;
  color: #9b3d00;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.pinboard-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 0.85rem;
  width: 100%;
  max-width: none;
  align-items: stretch;
}
.pinboard-note {
  position: relative;
  display: grid;
  gap: 0.7rem;
  min-height: 245px;
  max-width: 400px;
  padding: 1rem 1rem 1.1rem;
  border: 1px solid #d2c37a;
  border-radius: 0 0 0 22px / 0 0 0 28px;
  background:
    linear-gradient(180deg, #fffbd4 0%, #fff1a2 100%);
  box-shadow:
    inset 0 -28px 28px rgba(79, 57, 0, 0.12),
    inset 0 16px 8px rgba(255, 255, 255, 0.35),
    0 8px 18px rgba(84, 67, 6, 0.12);
  overflow: hidden;
}
.pinboard-note::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 18px;
  height: 22px;
  background: #fff1a2;
  box-shadow:
    3px -2px 9px rgba(0, 0, 0, 0.14),
    inset 12px -12px 12px rgba(79, 57, 0, 0.18);
  transform: skewX(24deg);
}
.pinboard-note::after {
  content: "";
  position: absolute;
  left: 11%;
  bottom: 0;
  width: 74%;
  height: 16px;
  border-top: 2px solid rgba(79, 57, 0, 0.42);
  border-radius: 50%;
}
.pinboard-note-top {
  display: flex;
  gap: 0.7rem;
  justify-content: space-between;
  align-items: flex-start;
}
.pinboard-note-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.pinboard-delete-btn {
  min-width: 0;
  padding: 0.22rem 0.36rem;
  line-height: 1;
  font-size: 0.95rem;
}
.pinboard-note-title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.35;
  color: #4f3900;
  font-family: "Trebuchet MS", "Segoe UI", cursive, sans-serif;
}
.pinboard-note-meta {
  display: grid;
  gap: 0.2rem;
  font-size: 0.8rem;
  color: #6f5a19;
}
.pinboard-note-summary {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #4a3e15;
  font-weight: 500;
}
.pinboard-empty {
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--muted);
  background: #fbfdff;
}
.pinboard-editor-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.25rem;
}
.pinboard-spark-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: stretch;
}
.pinboard-spark-row textarea {
  width: 100%;
  resize: vertical;
}
.pinboard-spark-submit {
  min-width: 2.8rem;
  padding: 0.5rem 0.7rem;
  font-size: 1.1rem;
  line-height: 1;
}
.pinboard-spark-submit[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.pinboard-spark-warnings {
  padding: 0.8rem 0.9rem;
  border: 1px solid #f0c38a;
  border-radius: 12px;
  background: #fff7ed;
  color: #8a4b06;
}
.pinboard-spark-warnings strong {
  display: block;
  margin-bottom: 0.35rem;
}
.pinboard-spark-warnings ul {
  margin: 0;
  padding-left: 1.1rem;
}
.pinboard-editor-tools button {
  max-width: fit-content;
  padding: 0.25rem 0.45rem;
  font-size: 0.8rem;
}
.pinboard-manage-list {
  display: grid;
  gap: 0.75rem;
}
.pinboard-manage-item {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfdff;
}
.pinboard-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}
.pinboard-preview-frame {
  width: 100%;
  min-height: 900px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
@media (max-width: 700px) {
  .pinboard-list {
    grid-template-columns: 1fr;
  }
  .pinboard-note {
    min-height: 0;
  }
  .pinboard-note-top,
  .pinboard-preview-head {
    flex-direction: column;
  }
  .pinboard-spark-row {
    grid-template-columns: 1fr;
  }
  .pinboard-manage-item {
    flex-direction: column;
  }
  .pinboard-preview-frame {
    min-height: 640px;
  }
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 0.48rem;
}
.form-grid label { font-size: 0.86rem; color: var(--muted); display: grid; gap: 0.16rem; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .checkbox { display: flex; align-items: center; gap: 0.5rem; }

.users-admin-layout { grid-template-columns: 1fr; }
.users-create-card { max-width: 760px; }
.authorized-users-list { display: grid; gap: 0.7rem; }

.user-admin-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem;
  background: #fbfdff;
  display: grid;
  gap: 0.55rem;
}

.user-admin-top {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
}

.user-admin-avatar {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #eef3fb;
}

.user-admin-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.86rem;
  color: var(--muted);
}

.user-admin-identity {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
}

.user-admin-identity label,
.user-admin-role-row label {
  font-size: 0.84rem;
  color: var(--muted);
  display: grid;
  gap: 0.14rem;
}

.user-admin-middle { display: grid; gap: 0.45rem; }

.user-admin-role-row {
  display: grid;
  grid-template-columns: minmax(220px, 320px) auto;
  gap: 0.8rem;
  align-items: end;
}

.user-admin-active {
  align-self: center;
  margin-top: 0.7rem;
}

.user-admin-permissions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.3rem 0.7rem;
}

.user-admin-bottom {
  border-top: 1px solid #e3e9f4;
  padding-top: 0.5rem;
  display: flex;
  gap: 0.7rem;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.user-admin-meta {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  font-size: 0.83rem;
  color: var(--muted);
}

.user-admin-actions { display: flex; gap: 0.45rem; }

button.save-user-btn--disabled,
button.save-user-btn:disabled {
  background: #9aa3ad;
  color: #f3f6fa;
  cursor: not-allowed;
  filter: none;
}

button.danger { background: linear-gradient(120deg, #b93636, #8a2323); }

input, textarea, select, button {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.36rem 0.42rem;
  font: inherit;
}
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  padding: 0;
  border-radius: 0;
}
button {
  background: linear-gradient(120deg, #0a8f6a, #0c6fbe);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
  line-height: 1.2;
}
button:hover { filter: brightness(0.96); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
thead {
  text-align: left;
  background: #ecf2fc;
}
th, td {
  padding: 0.32rem 0.38rem;
  border-bottom: 1px solid #e4e8f0;
  vertical-align: top;
}
small { color: var(--muted); }
.warn { background: var(--warn); }

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem;
}

.flash {
  margin-bottom: 0.72rem;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  border: 1px solid;
}
.flash.success {
  background: #eaf9f2;
  color: #0f5132;
  border-color: #b8e7cf;
}
.flash.error {
  background: #fdecec;
  color: #8a1f1f;
  border-color: #f5c2c2;
}

.login-private h2 {
  font-size: 1.45rem;
  margin-bottom: 0.45rem;
}

.login-private p {
  margin: 0.22rem 0 0;
  font-size: 1.02rem;
  font-weight: 500;
}

.login-actions {
  margin-top: 1rem;
}

.google-signin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 40px;
  padding: 0.54rem 0.95rem;
  border: 1px solid #dadce0;
  border-radius: 4px;
  background: #ffffff;
  color: #3c4043;
  text-decoration: none;
  font-family: "Roboto", "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.google-signin-btn:hover {
  background: #f8fbff;
  border-color: #c6d1e4;
}

.google-signin-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.login-contact {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.action-link {
  display: inline-block;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.34rem;
  font-size: 0.86rem;
  color: var(--text);
  background: #f8fbff;
}
.action-link:hover { background: #ecf5ff; }

.dashboard-compact .card {
  display: ruby;
  padding: 0.62rem;
}

.dashboard-compact .card h2 {
  font-size: 1rem;
  margin-bottom: 0.32rem;
}

.dashboard-compact .card h3 {
  font-size: 0.92rem;
  margin-bottom: 0.22rem;
}

.dashboard-compact .card p {
  font-size: 1.2rem;
}

.dashboard-compact table {
  font-size: 0.84rem;
}

.dashboard-compact th,
.dashboard-compact td {
  padding: 0.28rem 0.34rem;
}

.dashboard-compact .action-link {
  padding: 0.18rem 0.3rem;
  font-size: 0.84rem;
}

.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.detail-head h2 {
  margin: 0;
}

.detail-actions {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.38rem;
}

.detail-actions form {
  margin: 0;
  display: inline-flex;
  gap: 0.34rem;
  align-items: center;
}

.dashboard-calendar {
  width: 100%;
}

.dashboard-calendar-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.dashboard-calendar-toolbar strong {
  text-align: center;
  font-size: 0.95rem;
}

.calendar-nav-btn {
  max-width: 72px;
  padding: 0.26rem 0.3rem;
  font-size: 0.8rem;
}

.dashboard-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.22rem;
}

.calendar-weekday {
  font-size: 0.74rem;
  color: var(--muted);
  text-align: center;
  padding: 0.16rem 0;
  font-weight: 600;
}

.calendar-day {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 6px;
  min-height: 42px;
  padding: 0.2rem 0.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  cursor: pointer;
}

.calendar-day .num {
  font-size: 0.8rem;
  line-height: 1;
}

.calendar-day .count {
  align-self: flex-end;
  font-size: 0.66rem;
  line-height: 1;
  border-radius: 10px;
  background: #e9f1ff;
  color: #0c4aa7;
  padding: 0.1rem 0.3rem;
  font-weight: 700;
}

.calendar-day.today {
  border-color: #8eb5f7;
}

.calendar-day.selected {
  border-color: #0c6fbe;
  box-shadow: inset 0 0 0 1px #0c6fbe;
}

.calendar-day.muted {
  opacity: 0.25;
  cursor: default;
}

.dashboard-schedule-list {
  margin: 0.3rem 0 0;
  padding-left: 1rem;
  font-size: 0.82rem;
}

.dashboard-schedule-list li {
  margin: 0.16rem 0;
}

.dashboard-schedule-list li.empty {
  list-style: none;
  margin-left: -1rem;
  color: var(--muted);
}

.serials-page .table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e4e8f0;
  border-radius: 7px;
}

.serials-page .tools-table-wrap table {
  min-width: 640px;
}

.serials-page .register-table-wrap table {
  min-width: 1080px;
}

.serials-page table input,
.serials-page table select,
.serials-page table button {
  min-width: 72px;
}

.hardware-page .table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e4e8f0;
  border-radius: 7px;
}

.hardware-page .hardware-catalog-wrap table {
  min-width: 640px;
}

.hardware-page .hardware-inventory-wrap table {
  min-width: 1240px;
}

.suppliers-page .table-wrap {
  display: block;
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e4e8f0;
  border-radius: 7px;
  -webkit-overflow-scrolling: touch;
}

.suppliers-page .suppliers-table-wrap table {
  min-width: 1400px;
}

.suppliers-page table input[type="text"],
.suppliers-page table input[type="email"],
.suppliers-page table input[type="number"],
.suppliers-page table input:not([type]) {
  min-width: 140px;
}

.suppliers-page table select {
  min-width: 160px;
}

.suppliers-page table td,
.suppliers-page table th {
  white-space: nowrap;
}

.print-page {
  background: #f0f2f5;
  margin: 0;
  padding: 0;
}
.print-top-actions {
  position: fixed;
  top: 0.45rem;
  right: 0.55rem;
  z-index: 999;
}
.print-top-actions button {
  width: auto;
  min-width: 0;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  font-size: 0.76rem;
  line-height: 1.1;
}
.print-sheet {
  background: #fff;
  width: 210mm;
  min-height: 297mm;
  max-width: 210mm;
  margin: 1rem auto;
  padding: 10mm;
  border: 1px solid #d9dde5;
  box-shadow: 0 2px 8px rgba(16, 34, 58, 0.08);
}
.print-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid #edf1f7;
  padding-bottom: 0.8rem;
  margin-bottom: 0.8rem;
}
.print-header h1 { margin: 0; }
.print-header p { margin: 0.2rem 0 0; font-size: 1.1rem; }
.print-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.print-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.totals {
  max-width: 350px;
  margin-left: auto;
}
.totals p {
  display: flex;
  justify-content: space-between;
  margin: 0.45rem 0;
}
.totals .grand {
  border-top: 1px solid #d9dde5;
  padding-top: 0.45rem;
}

.print-sheet table {
  font-size: 0.8rem;
}

.print-sheet table th,
.print-sheet table td {
  padding: 0.32rem 0.38rem;
}

.ifr-sheet-wrap {
  overflow-x: auto;
}

.ifr-sheet {
  width: 100%;
  max-width: 8.5in;
  border-collapse: collapse;
  table-layout: fixed;
  margin-top: 0.5rem;
  background: #fff;
}

.ifr-sheet td {
  border: 1px solid #2e3f55;
  padding: 0.28rem 0.34rem;
  vertical-align: middle;
  font-size: 0.82rem;
}

.ifr-title {
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem !important;
  letter-spacing: 0.02em;
}

.ifr-note {
  font-size: 0.74rem !important;
  line-height: 1.35;
}

.ifr-section {
  font-weight: 700;
  background: #f7fbff;
}

.ifr-field-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid #506a88;
  border-radius: 0;
  padding: 0.1rem 0.12rem;
  background: transparent;
}

.ifr-field-input:focus {
  outline: none;
  box-shadow: none;
  border-bottom: 2px solid #0c6fbe;
}

.ifr-line {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.25rem;
}

.ifr-line-right {
  justify-content: end;
  grid-template-columns: auto minmax(120px, 1fr);
}

.ifr-value {
  display: inline-block;
  min-height: 1.1rem;
  width: 100%;
  border-bottom: 1px solid #506a88;
  padding: 0.02rem 0.12rem;
}

.alt-test-table input {
  width: 100%;
  border: none;
  border-bottom: 1px solid #547196;
  border-radius: 0;
  background: transparent;
  padding: 0.1rem 0.1rem;
}

.alt-test-table input:focus {
  outline: none;
  box-shadow: none;
  border-bottom: 2px solid #0c6fbe;
}

@page {
  size: A4 portrait !important;
  margin: 10mm;
}

@media print {
  .topbar, .flash, .no-print, .print-top-actions, .print-top-actions * { display: none !important; }
  .print-top-actions {
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
  }
  body, .print-page { background: #fff; }
  html, body, .print-page {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
  }
  .container { margin: 0; padding: 0; max-width: none; }
  .print-sheet {
    margin: 0;
    width: auto;
    min-height: 0 !important;
    max-width: none;
    padding: 0;
    border: none;
    box-shadow: none;
    break-after: auto;
    page-break-after: auto;
  }
  .print-header h1 {
    font-size: 1.15rem !important;
  }
  .print-header p,
  .print-grid p,
  .print-sheet p {
    font-size: 0.8rem !important;
  }
  .print-sheet h2,
  .print-sheet h3 {
    font-size: 0.9rem !important;
    margin: 0.25rem 0 0.3rem !important;
  }
  .print-sheet table {
    font-size: 0.72rem !important;
  }
  .print-sheet table th,
  .print-sheet table td {
    padding: 0.22rem 0.28rem !important;
  }
  .ifr-sheet td {
    border-color: #262f3a;
    font-size: 0.76rem;
    padding: 0.22rem 0.28rem;
  }
  .ifr-title {
    font-size: 0.9rem !important;
  }
  .ifr-note {
    font-size: 0.68rem !important;
  }
  a.action-link { border: none; padding: 0; }
}

@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; zoom: .8; }
  .brand-title { min-width: 0; }
  .search-panel { right: -0.5rem; min-width: 240px; }
  .brand-logo-shell,
  .print-logo-shell {
    min-width: 0;
    height: auto;
  }
  .brand-logo { height: 50px; max-width: min(44vw, 180px); }
  .print-logo { width: auto; height: auto; max-width: 96px; max-height: none; }
  .form-grid { grid-template-columns: 1fr; }
  .user-admin-top { flex-direction: column; }
  .user-admin-role-row { grid-template-columns: 1fr; gap: 0.45rem; }
  .user-admin-active { margin-top: 0; }
}

/* ---- environment badge (hidden in prod) ---- */
.env-badge {
  position: fixed;
  bottom: 10px;
  right: 12px;
  z-index: 9999;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  opacity: .82;
  pointer-events: none;
  color: #fff;
  background: #555;
}
.env-badge--dev   { background: #1565c0; }
.env-badge--beta  { background: #e65100; }
.env-badge--src   { background: #6a1b9a; }
