:root {
  --bg: #f2f7f8;
  --bg-highlight: #e4f6ef;
  --surface: #ffffff;
  --surface-2: #f7fafc;
  --border: #d5dee5;
  --text: #0f1720;
  --muted: #5a6776;
  --brand: #0b8b7b;
  --brand-strong: #07656e;
  --brand-soft: #d9f3ef;
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(15, 38, 44, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body.app-body {
  margin: 0;
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 5% 0%, #d8efe8 0, transparent 48%),
    radial-gradient(circle at 95% 25%, #dceaf8 0, transparent 44%),
    linear-gradient(165deg, var(--bg) 0%, #edf3f9 100%);
}

a {
  color: inherit;
}

.app-shell {
  width: min(900px, 100% - 1.25rem);
  margin: 0 auto;
  padding: clamp(0.6rem, 1.4vw, 1rem) 0;
}

.reveal {
  animation: rise-in 420ms ease-out both;
}

.reveal-delay {
  animation-delay: 120ms;
}

.login-layout {
  min-height: 100vh;
  display: grid;
  gap: 0.45rem;
  align-content: center;
  justify-content: center;
  grid-template-columns: minmax(0, 440px);
}

.card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.login-card {
  padding: clamp(0.8rem, 1.4vw, 1rem);
}

.login-hero {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

.login-hero-copy {
  min-width: 0;
}

.login-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.login-badges span {
  display: inline-flex;
  align-items: center;
  padding: 0.34rem 0.58rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #eef8f6 0%, #f5f9fd 100%);
  border: 1px solid #d7e8e5;
  color: #38525e;
  font-size: 0.72rem;
  font-weight: 700;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
  color: #07656e;
  background: linear-gradient(135deg, #d9f3ef 0%, #c7edea 100%);
  border: 1px solid #ade6e0;
  border-radius: 10px;
  padding: 0.38rem 0.8rem;
  box-shadow: 0 1px 4px rgba(11, 139, 123, 0.15);
  white-space: nowrap;
}

h1,
h2,
h3 {
  font-family: "Sora", "Segoe UI", sans-serif;
  margin: 0;
}

.login-card h1 {
  margin-top: 0.2rem;
  font-size: clamp(1.15rem, 2.5vw, 1.6rem);
}

.subtext {
  margin-top: 0.3rem;
  color: var(--muted);
  line-height: 1.32;
  font-size: 0.92rem;
}

.form-row {
  margin-top: 0;
  display: flex;
  flex-direction: column;
}

.form-row label {
  display: block;
  margin-bottom: 0.25rem;
  color: #334153;
  font-size: 0.83rem;
  font-weight: 650;
}

.form-row .button {
  margin-top: 0;
  padding: 0.72rem 1rem;
}

.password-field {
  position: relative;
}

.password-field .input {
  padding-right: 2.8rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #688090;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  transition:
    background-color 120ms ease,
    color 120ms ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: rgba(11, 139, 123, 0.08);
  color: #0b8b7b;
  outline: none;
}

.password-toggle__icon {
  width: 17px;
  height: 17px;
  display: block;
}

.password-toggle__icon--hide {
  display: none;
}

.password-toggle.is-active .password-toggle__icon--show {
  display: none;
}

.password-toggle.is-active .password-toggle__icon--hide {
  display: block;
}

.input,
.button {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid #c6d2dd;
  font: inherit;
}

.input {
  padding: 0.62rem 0.72rem;
  background: #ffffff;
}

.input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 139, 123, 0.2);
  outline: none;
}

.button {
  margin-top: 0.7rem;
  border: none;
  background: linear-gradient(
    160deg,
    var(--brand) 0%,
    var(--brand-strong) 100%
  );
  color: #f9ffff;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  padding: 0.7rem 0.9rem;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(7, 101, 110, 0.28);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
  box-shadow: none;
}

.login-button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  isolation: isolate;
}

.login-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 10%,
    rgba(255, 255, 255, 0.18) 35%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 255, 255, 0.18) 65%,
    transparent 90%
  );
  transform: translateX(-140%);
  transition: transform 500ms ease;
  z-index: 0;
}

.login-button::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12),
    transparent 55%
  );
  z-index: 0;
}

.login-button__label,
.login-button__icon {
  position: relative;
  z-index: 1;
}

.login-button__label {
  transform: translateX(0);
  transition: transform 220ms ease;
}

.login-button__icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  transform: translateX(0);
  transition:
    transform 220ms ease,
    background-color 220ms ease;
}

.login-button__icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.login-button:hover::before,
.login-button:focus-visible::before {
  transform: translateX(140%);
}

.login-button:hover .login-button__label,
.login-button:focus-visible .login-button__label {
  transform: translateX(-2px);
}

.login-button:hover .login-button__icon,
.login-button:focus-visible .login-button__icon {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.24);
}

.login-button:active {
  transform: translateY(0);
}

.login-button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(11, 139, 123, 0.18),
    0 10px 22px rgba(7, 101, 110, 0.24);
}

.login-button:disabled::before,
.login-button:disabled::after {
  display: none;
}

.alert {
  margin-top: 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid #ffc8c2;
  background: #fff4f3;
  color: #8a2419;
  padding: 0.7rem 0.85rem;
  font-size: 0.92rem;
}

.portal-shortcuts {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid #e4edf3;
}

.portal-shortcuts__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.portal-shortcuts__head h2 {
  font-size: 0.88rem;
  color: #1a2b3a;
}

.portal-shortcuts__head p {
  margin: 0;
  color: #718293;
  font-size: 0.75rem;
}

.portal-shortcuts__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.portal-shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: #203243;
  text-align: center;
}

.portal-shortcut span {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #123244 0%, #0b8b7b 100%);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(11, 139, 123, 0.16);
  transition:
    transform 120ms ease,
    box-shadow 120ms ease;
}

.portal-shortcut span svg {
  width: 18px;
  height: 18px;
  display: block;
}

.portal-shortcut strong {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
}

.portal-shortcut:hover span,
.portal-shortcut:focus-visible span {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(11, 139, 123, 0.2);
}

.portal-shortcut:focus-visible {
  outline: none;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 0.5rem;
}

.dashboard-intro {
  flex: 1;
  min-width: 0;
}

.dashboard-header h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  margin-bottom: 0.3rem;
}

.dashboard-header p {
  margin: 0.4rem 0 0;
  color: #6b7d8f;
  font-size: 0.95rem;
}

.header-stats {
  margin-top: 0.65rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  font-size: 0.95rem;
  color: #627488;
}

.header-stat-inline {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  white-space: nowrap;
}

.header-stat-inline strong {
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 0.92rem;
  color: #0f1720;
}

.header-stat-divider {
  color: #9aaaba;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  padding-top: 0.35rem;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid #b7c7d5;
  background: #ffffff;
  color: #182534;
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 0.58rem 0.85rem;
  font-weight: 650;
}

.button-link:hover {
  background: #eef4f8;
}

.logout-link {
  position: relative;
  display: block;
  width: 138px;
  height: 42px;
  cursor: pointer;
  text-align: left;
  padding: 0 0 0 18px;
  border: none;
  border-radius: 10px;
  background: transparent;
  outline: none;
  perspective: 100px;
  overflow: visible;
  box-shadow: none;
}

.logout-link::before {
  z-index: 1;
  display: block;
  position: absolute;
  content: "";
  width: 100%;
  height: 100%;
  background: #fff;
  border: 1px solid #0b8b7b;
  border-radius: 10px;
  left: 0;
  top: 0;
  box-shadow: 0 10px 24px rgba(11, 139, 123, 0.14);
  transition: 0.5s ease;
}

.logout-link:active::before {
  transform: scale(0.96);
}

.btn-text {
  position: relative;
  z-index: 10;
  display: inline-block;
  line-height: 42px;
  font-size: 14px;
  font-weight: 700;
  color: #0b8b7b;
  transition: 0.2s ease;
}

.logout-link:hover .btn-text {
  opacity: 0.8;
}

.logout-link svg {
  display: block;
  position: absolute;
}

.door-frame {
  width: 32px;
  z-index: 3;
  right: 12px;
  bottom: 4px;
  fill: #0b8b7b;
}

.door-frame .flash {
  opacity: 0;
  fill: #07d9c4;
}

.logout-link {
  --door-transform: rotateY(20deg);
  --door-duration: 0.2s;
  --door-delay: 0s;
  --person-transform: none;
  --person-duration: 0.1s;
  --body-duration: 0.1s;
  --arm1-transform: none;
  --arm2-transform: none;
  --leg1-transform: none;
  --leg2-transform: none;
}

.door {
  width: 32px;
  z-index: 5;
  right: 12px;
  bottom: 4px;
  transform-style: preserve-3d;
  transform: var(--door-transform);
  transform-origin: 100% 50%;
  transition: var(--door-duration) ease var(--door-delay);
  fill: #0b8b7b;
}

.door path,
.door circle {
  fill: #07656e;
  stroke: #07656e;
  stroke-width: 4;
}

.person {
  fill: #07656e;
  z-index: 4;
  width: 30px;
  right: 25px;
  bottom: 7px;
  transform: var(--person-transform);
  transition: var(--person-duration) cubic-bezier(0.2, 0.1, 0.8, 0.9);
}

.arm1,
.arm2,
.leg1,
.leg2 {
  transition: var(--body-duration) ease-in-out;
}

.arm1 {
  transform: var(--arm1-transform);
  transform-origin: 52% 45%;
}

.arm2 {
  transform: var(--arm2-transform);
  transform-origin: 47% 43%;
}

.leg1 {
  transform: var(--leg1-transform);
  transform-origin: 47% 64.5%;
}

.leg2 {
  transform: var(--leg2-transform);
  transform-origin: 43% 63%;
}

.logout-link:hover {
  --door-transform: rotateY(28deg);
  --person-transform: translateX(2px);
  --arm1-transform: rotate(-5deg);
  --arm2-transform: rotate(5deg);
  --leg1-transform: rotate(-10deg);
  --leg2-transform: rotate(20deg);
  transform: none;
}

.logout-link.clicked {
  pointer-events: none;
  --door-transform: rotateY(45deg);
  --person-transform: translateX(21px);
  --person-duration: 0.3s;
  --body-duration: 0.3s;
  --arm1-transform: translateX(-4px) translateY(-2px) rotate(120deg);
  --arm2-transform: translateX(4px) rotate(-110deg);
  --leg1-transform: translateX(-3px) rotate(80deg);
  --leg2-transform: translateX(4px) rotate(-60deg);
}

.logout-link.anim1 {
  --door-transform: none;
  --door-duration: 0.1s;
  --door-delay: 0.25s;
  --person-duration: 0.4s;
  --arm1-transform: rotate(60deg);
  --arm2-transform: rotate(-45deg);
  --leg1-transform: rotate(-5deg);
  --leg2-transform: rotate(10deg);
}

.logout-link.anim2 {
  animation: logout-shake 0.2s linear;
  --person-duration: 1.6s;
  --body-duration: 0.4s;
  --arm1-transform: rotate(-60deg);
  --arm2-transform: rotate(30deg);
  --leg1-transform: rotate(-30deg);
  --leg2-transform: rotate(20deg);
}

.logout-link.anim2 .flash {
  animation: logout-flash 0.3s linear;
}

.logout-link.anim2 .person {
  animation: logout-spin 1.2s infinite linear;
  bottom: -1080px;
  right: 1px;
  transition:
    transform var(--person-duration) linear,
    bottom var(--person-duration) cubic-bezier(0.7, 0.1, 1, 1) 0.1s;
  z-index: 1;
}

.logout-link.logged-out .door,
.logout-link.logged-out .door-frame {
  transform: translateX(10px) scale(0);
  transition-duration: 0.1s;
  transition-delay: 0s;
}

.logout-link.logged-out .btn-text {
  color: #d33b4d;
}

.filter-card {
  position: relative;
  z-index: 12;
  margin-top: 1.75rem;
  padding: 1.35rem 1.4rem 1.45rem;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.97) 0%,
    rgba(249, 252, 253, 0.98) 100%
  );
  border: 1px solid rgba(204, 220, 228, 0.95);
  border-radius: 26px;
  box-shadow:
    0 24px 60px rgba(15, 38, 44, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  overflow: visible;
}

.filter-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 26px;
  background: linear-gradient(
    135deg,
    rgba(222, 244, 238, 0.45),
    transparent 30%,
    transparent 70%,
    rgba(219, 232, 248, 0.28)
  );
  pointer-events: none;
}

.filter-form {
  position: relative;
  z-index: 1;
  margin: 0;
}

.filter-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr)
    auto;
  gap: 0.8rem;
  align-items: end;
  width: 100%;
}

.filter-grid .form-row {
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
}

.filter-grid .form-row label {
  font-size: 0.72rem;
  margin-bottom: 0.55rem;
  color: #38525e;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-grid .input,
.filter-grid input[type="date"] {
  min-height: 52px;
}

.filter-grid .input {
  padding: 0.78rem 0.9rem;
  font-size: 0.95rem;
  border: 1.5px solid #cfdae3;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfe 100%);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.filter-grid .input:hover {
  border-color: #b9c9d5;
}

.filter-grid .input:focus {
  border-color: #0b8b7b;
  box-shadow: 0 0 0 3px rgba(35, 35, 35, 0.08);
  transform: translateY(-1px);
}

.filter-grid .button {
  margin-top: 0;
  min-height: 52px;
  padding: 0.8rem 1.25rem;
  font-size: 0.97rem;
  font-weight: 800;
  white-space: nowrap;
  border-radius: 16px;
}

.filter-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.8rem;
  justify-self: end;
}

.filter-actions .button,
.filter-actions .button-link {
  width: 164px;
  min-width: 164px;
}

.secondary-action {
  min-height: 52px;
  white-space: nowrap;
  border-radius: 16px;
  border-color: #cad7e2;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.active-filters {
  position: relative;
  z-index: 1;
  margin-bottom: 1.1rem;
  padding: 0.9rem 1rem;
  background: linear-gradient(
    135deg,
    rgba(240, 253, 249, 0.95) 0%,
    rgba(245, 250, 253, 0.98) 100%
  );
  border: 1px solid #cfe8e4;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.active-filters > span:first-child {
  font-weight: 600;
  color: #0b8b7b;
  font-size: 0.83rem;
  white-space: nowrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  background: #ffffff;
  border: 1px solid #ade6e0;
  border-radius: 5px;
  font-size: 0.84rem;
  color: #0b8b7b;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(11, 139, 123, 0.1);
}

.chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  background: transparent;
  border: none;
  color: #0b8b7b;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 3px;
  transition: all 100ms ease;
  margin-left: 0.2rem;
  opacity: 0.8;
}

.chip-remove:hover {
  background: rgba(11, 139, 123, 0.2);
  opacity: 1;
}

.data-day {
  margin-top: 1.8rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(15, 38, 44, 0.08);
}

.day-head {
  background: linear-gradient(135deg, #f7fbfa 0%, #f0f7fc 100%);
  border-bottom: 2px solid #d5dee5;
  padding: 1.3rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.day-head h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0f1720;
  margin: 0 0 0.2rem 0;
  letter-spacing: -0.02em;
}

.day-head p {
  margin: 0;
  font-size: 0.83rem;
  color: #5a6776;
}

.day-head p strong {
  color: #0b8b7b;
  font-weight: 600;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid #e1e8ef;
  border-right: 1px solid #e1e8ef;
  padding: 0.8rem 0.9rem;
  vertical-align: middle;
  text-align: center;
}

.data-table th:last-child,
.data-table td:last-child {
  border-right: none;
}

.data-table th {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: #0f1720;
  text-transform: uppercase;
  background: linear-gradient(180deg, #f5f9fc 0%, #f0f7fa 100%);
  border-top: 1px solid #d5dee5;
  border-bottom: 2px solid #c0cdd8;
  padding: 0.95rem 0.9rem;
}

.data-table td {
  font-size: 0.83rem;
  color: #2a3f4f;
  min-height: 38px;
  padding: 0.85rem 0.9rem;
}

.data-table tbody tr {
  transition: background-color 150ms ease;
}

.data-table tbody tr:hover {
  background: #f0f8fb !important;
}

.data-table tbody tr:nth-child(odd) {
  background: #ffffff;
}

.data-table tbody tr:nth-child(even) {
  background: #f9fbfd;
}

.data-table tbody tr.data-subrow {
  background: #fafbfc;
}

.data-table td > div:first-child {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.data-table td > div:last-child {
  font-size: 0.77rem;
  color: #8a96a8;
  font-family: "Monaco", "Courier New", monospace;
  letter-spacing: 0.3px;
  line-height: 1.4;
  word-break: break-all;
  text-align: center;
}

.mobile-records {
  display: none;
  padding: 1rem 0.85rem;
}

.mobile-record {
  border: 1px solid #d5dee5;
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0.9rem;
  box-shadow: 0 1px 3px rgba(15, 38, 44, 0.04);
}

.mobile-record p {
  margin: 0.5rem 0;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
}

.mobile-record p span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.mobile-record p strong {
  text-align: right;
  word-break: break-word;
}

.empty-state {
  margin-top: 2rem;
  border: 2px dashed #d5dee5;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f8fbfd 0%, #f5f9fc 100%);
  color: #516277;
  padding: 2.5rem 1.5rem;
  text-align: center;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes logout-shake {
  0%,
  100% {
    transform: rotate(-1deg);
  }

  50% {
    transform: rotate(2deg);
  }
}

@keyframes logout-flash {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes logout-spin {
  from {
    transform: rotate(0deg) scale(1.3);
  }

  to {
    transform: rotate(359deg) scale(1.3);
  }
}
@media (prefers-reduced-motion: reduce) {
  .logout-link,
  .logout-link::before,
  .logout-link *,
  .logout-link *::before,
  .logout-link *::after {
    animation: none !important;
    transition: none !important;
  }

  .logout-link:hover,
  .logout-link.clicked,
  .logout-link.anim1,
  .logout-link.anim2,
  .logout-link.logged-out {
    transform: none !important;
  }
}

@media (max-width: 1000px) {
  .login-layout {
    grid-template-columns: 1fr;
    align-content: start;
    padding-top: 2rem;
  }

  .portal-shortcuts__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .filter-actions {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .filter-grid .button {
    padding: 0.65rem 1rem;
    font-size: 0.83rem;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(900px, 100% - 0.85rem);
  }

  .login-badges {
    gap: 0.85rem;
  }

  .portal-shortcuts__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .portal-shortcut span {
    width: 48px;
    height: 48px;
  }

  .dashboard-header {
    flex-direction: column;
  }

  .header-stats {
    width: 100%;
    gap: 0.85rem;
  }

  .header-stat-divider {
    display: none;
  }

  .actions {
    width: 100%;
    justify-content: flex-start;
    padding: 0;
  }

  .button-link {
    min-width: 140px;
  }

  .logout-link {
    min-width: 164px;
  }

  .filter-card {
    padding: 1rem 1.1rem;
  }

  .filter-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .filter-grid .button {
    padding: 0.6rem 1rem;
    font-size: 0.83rem;
  }

  .filter-actions {
    grid-column: 1;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-self: stretch;
  }

  .filter-actions .button,
  .filter-actions .button-link {
    width: 100%;
    min-width: 0;
  }

  .active-filters {
    padding: 0.7rem 0.9rem;
    font-size: 0.85rem;
    gap: 0.6rem;
  }

  .filter-chip {
    padding: 0.4rem 0.7rem;
    font-size: 0.68rem;
  }

  .table-wrap {
    display: none;
  }

  .mobile-records {
    display: grid;
    gap: 0.85rem;
  }
}

/* Built-in Filter Controls */
.native-select {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.custom-select {
  position: relative;
}

.custom-select__trigger {
  width: 100%;
  min-height: 52px;
  padding: 0.2rem;
  border: 1.5px solid #232323;
  border-radius: 12px;
  background: #ffffff;
  display: flex;
  align-items: center;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition:
    box-shadow 140ms ease,
    transform 140ms ease;
}

.custom-select__trigger::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  margin-top: -3px;
  border-width: 8px 6px 0;
  border-style: solid;
  border-color: #8a8f97 transparent transparent;
  transition: transform 140ms ease;
}

.custom-select.is-open .custom-select__trigger::after {
  transform: rotate(180deg);
}

.custom-select__value {
  width: 100%;
  min-height: 40px;
  padding: 0.35rem 2.2rem 0.35rem 0.7rem;
  border: 1.5px solid #232323;
  border-radius: 10px;
  display: flex;
  align-items: center;
  color: #0f1720;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.35;
}

.custom-select__value.is-placeholder {
  color: #8a8f97;
}

.custom-select.is-open .custom-select__trigger {
  box-shadow: 0 0 0 3px rgba(35, 35, 35, 0.08);
}

.custom-select__trigger:focus-visible,
.custom-select__search:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(35, 35, 35, 0.08);
}

.custom-select__panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  width: 100%;
  z-index: 30;
  border: 1.5px solid #232323;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(15, 38, 44, 0.12);
}

.custom-select__search-wrap {
  padding: 0.4rem 0.4rem 0.2rem;
}

.custom-select__search {
  width: 100%;
  min-height: 40px;
  padding: 0.35rem 0.7rem;
  border: 1.5px solid #232323;
  border-radius: 10px;
  background: #ffffff;
  color: #0f1720;
  font: inherit;
}

.custom-select__search:focus {
  outline: none;
}

.custom-select__search::placeholder {
  color: #8a8f97;
}

.custom-select__list {
  max-height: 220px;
  overflow-y: auto;
  padding: 0.2rem 0;
  scrollbar-width: auto;
  scrollbar-color: #8a8f97 #ffffff;
}

.custom-select__option,
.custom-select__empty {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 0;
  border-bottom: 1px solid #e8eef4;
  background: #ffffff;
  text-align: left;
  color: #0f1720;
  font: inherit;
  line-height: 1.45;
}

.custom-select__option {
  cursor: pointer;
}

.custom-select__option:hover,
.custom-select__option:focus,
.custom-select__option.is-selected {
  background: #f0f8f6;
  color: #0b8b7b;
  outline: none;
}

.custom-select__list > :last-child {
  border-bottom: none;
}

.custom-select__list::-webkit-scrollbar {
  width: 10px;
}

.custom-select__list::-webkit-scrollbar-track {
  background: #ffffff;
  border-left: 1px solid #edf2f6;
}

.custom-select__list::-webkit-scrollbar-thumb {
  background: #8a8f97;
  border-radius: 10px;
  border: 2px solid #ffffff;
}

@media (max-width: 768px) {
  .custom-select__trigger {
    min-height: 48px;
    border-radius: 12px;
  }

  .custom-select__value,
  .custom-select__search {
    min-height: 38px;
    padding-top: 0.32rem;
    padding-bottom: 0.32rem;
  }

  .custom-select__panel {
    border-radius: 12px;
  }

  .custom-select__list {
    max-height: 200px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
