:root {
  --bg: #f6faf9;
  --bg-soft: #eef5f3;
  --surface: #ffffff;
  --surface-tint: #fbfdfc;
  --text: #142336;
  --muted: #516176;
  --brand: #12b76a;
  --brand-soft: #1cca86;
  --brand-strong: #07945a;
  --border: #deeaed;
  --border-focus: #cad9df;
  --danger: #b3261e;
  --shadow-soft: 0 8px 20px rgba(17, 30, 49, 0.08);
  --shadow-card: 0 16px 34px rgba(17, 30, 49, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 8%, rgba(49, 189, 131, 0.12) 0%, rgba(49, 189, 131, 0) 30%),
    radial-gradient(circle at 86% 90%, rgba(49, 189, 131, 0.08) 0%, rgba(49, 189, 131, 0) 30%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-soft) 56%, #fbfdfc 100%);
}

.page-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
}

.hidden {
  display: none !important;
}

.card {
  background: linear-gradient(165deg, var(--surface) 0%, var(--surface-tint) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}

.muted {
  color: var(--muted);
}

.error {
  color: var(--danger);
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  font-family: "Manrope", "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
}

h2 {
  font-size: 1.42rem;
  line-height: 1.2;
}

.icon-sprite-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.icon-svg {
  width: 1.12rem;
  height: 1.12rem;
  display: inline-block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes button-spinner {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.login-layout {
  min-height: calc(100vh - 2rem);
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(330px, 500px);
  gap: 1.4rem;
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 1.2rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.86) 0%, rgba(245, 251, 248, 0.92) 100%);
  border: 1px solid #e3ecef;
}

.brand-panel {
  display: grid;
  align-content: center;
  gap: 0.95rem;
  padding: 1.6rem;
  position: relative;
  z-index: 1;
}

.brand-logo-wrap {
  width: fit-content;
  max-width: min(280px, 100%);
  border-radius: 14px;
  padding: 0.5rem 0.6rem;
  background: rgba(255, 255, 255, 0.7);
}

.brand-logo {
  width: min(210px, 100%);
  max-height: 152px;
  object-fit: contain;
  display: block;
}

.brand-lead {
  max-width: 560px;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: clamp(1.55rem, 2.7vw, 2.65rem);
  font-weight: 800;
  line-height: 1.1;
  color: #0f1f32;
  letter-spacing: -0.02em;
}

.brand-kicker {
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: clamp(0.98rem, 1.7vw, 1.45rem);
  font-weight: 800;
  color: var(--brand-strong);
  letter-spacing: -0.02em;
}

.brand-copy {
  max-width: 600px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.48;
}

.brand-features {
  margin-top: 0.65rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.brand-feature-card {
  border: 1px solid #dce9e4;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  padding: 0.75rem;
  display: grid;
  gap: 0.38rem;
  box-shadow: 0 8px 24px rgba(22, 39, 57, 0.04);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-strong);
  background: rgba(46, 183, 120, 0.11);
  border: 1px solid rgba(46, 183, 120, 0.22);
}

.feature-icon .icon-svg {
  width: 1.2rem;
  height: 1.2rem;
}

.brand-feature-card h3 {
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
}

.brand-feature-card p {
  color: #536579;
  font-size: 0.84rem;
  line-height: 1.4;
}

.login-panel {
  align-self: center;
  padding: 1.55rem 1.65rem;
  border-radius: 28px;
  position: relative;
  z-index: 1;
  animation: rise-in 0.55s ease both;
}

.login-panel-icon {
  margin: 0 auto 1rem;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-strong);
  background: rgba(46, 183, 120, 0.12);
  border: 1px solid rgba(46, 183, 120, 0.2);
}

.login-panel-icon .icon-svg {
  width: 1.7rem;
  height: 1.7rem;
}

.login-panel h2 {
  text-align: center;
  margin-bottom: 0.36rem;
  font-size: 1.95rem;
  letter-spacing: -0.02em;
}

.login-subtitle {
  text-align: center;
  color: #556579;
  margin-bottom: 1rem;
  font-size: 0.98rem;
}

.login-footer {
  grid-column: 1 / -1;
  text-align: center;
  color: #63768b;
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.4rem 0 0.1rem;
  position: relative;
  z-index: 1;
}

form {
  display: grid;
  gap: 0.72rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.96rem;
  font-weight: 700;
  color: #1a2b3f;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid var(--border-focus);
  border-radius: 13px;
  padding: 0.68rem 0.82rem;
  color: var(--text);
  background: #fff;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(46, 183, 120, 0.16);
}

.input-with-icon {
  border: 1px solid var(--border-focus);
  border-radius: 13px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 0.52rem;
  padding: 0 0.82rem;
}

.input-with-icon:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(46, 183, 120, 0.16);
}

.input-with-icon input {
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0.68rem 0;
  background: transparent;
}

.input-with-icon input:focus {
  box-shadow: none;
}

.input-icon {
  color: #6e8197;
  width: 1.15rem;
  height: 1.15rem;
}

.input-icon-trailing {
  margin-left: auto;
  color: #77879b;
}

button {
  border: none;
  border-radius: 13px;
  padding: 0.82rem 0.98rem;
  background: linear-gradient(145deg, var(--brand), var(--brand-soft));
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  transition: transform 130ms ease, filter 130ms ease, opacity 130ms ease;
}

button:hover {
  filter: brightness(0.97);
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.75;
  cursor: wait;
  transform: none;
}

#loginSubmitBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
  min-height: 48px;
  font-size: 0.97rem;
}

#loginSubmitBtn.is-loading::after {
  content: "";
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 999px;
  animation: button-spinner 800ms linear infinite;
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: #495b70;
}

.checkbox-line input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.text-link {
  justify-self: start;
  border: none;
  background: transparent;
  color: var(--brand-strong);
  padding: 0.16rem 0;
  border-radius: 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.text-link:hover {
  filter: none;
  text-decoration: underline;
  transform: none;
}

.forgot-panel {
  margin-top: 0.35rem;
  padding: 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f7fbf8;
  display: grid;
  gap: 0.7rem;
}

.forgot-panel p {
  font-size: 0.86rem;
  line-height: 1.4;
}

#loginStatusText {
  margin-top: 0.55rem;
  text-align: center;
}

.login-bg-orb {
  position: absolute;
  border-radius: 999px;
  background: linear-gradient(160deg, rgba(42, 193, 128, 0.22), rgba(42, 193, 128, 0.08));
  pointer-events: none;
}

.orb-left-top {
  width: 300px;
  height: 300px;
  left: -160px;
  top: -110px;
}

.orb-left-bottom {
  width: 420px;
  height: 420px;
  left: -190px;
  bottom: -210px;
}

.orb-right-bottom {
  width: 260px;
  height: 260px;
  right: -110px;
  bottom: -110px;
}

.login-bg-dots {
  position: absolute;
  right: 42px;
  top: 26px;
  width: 140px;
  height: 140px;
  background-image: radial-gradient(rgba(52, 133, 103, 0.19) 1.5px, transparent 1.5px);
  background-size: 12px 12px;
  opacity: 0.55;
  pointer-events: none;
}

.app-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.2rem;
}

.sidebar {
  border-radius: 22px;
  background:
    radial-gradient(circle at 10% 100%, rgba(255, 255, 255, 0.16), transparent 52%),
    linear-gradient(165deg, #14b86b 0%, #0ca35f 54%, #058b53 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 20px 40px rgba(7, 88, 53, 0.28);
  padding: 1rem;
  display: grid;
  align-content: start;
  gap: 1.2rem;
  animation: rise-in 0.55s ease both;
}

.sidebar-head {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 14px;
  padding: 0.6rem 0.7rem;
}

.sidebar-logo {
  width: 100%;
  height: 108px;
  object-fit: contain;
  background: #fff;
}

.sidebar-nav {
  display: grid;
  gap: 0.3rem;
}

.sidebar-nav a {
  color: #f4fffa;
  text-decoration: none;
  border-radius: 12px;
  padding: 0.64rem 0.72rem;
  font-size: 1.02rem;
  font-weight: 500;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-icon {
  width: 1.3rem;
  height: 1.3rem;
  opacity: 0.95;
}

.sidebar-nav a.active {
  background: rgba(0, 74, 45, 0.28);
  border-color: rgba(255, 255, 255, 0.2);
}

.sidebar-nav a:hover {
  background: rgba(0, 74, 45, 0.2);
}

.nav-badge {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 0.4rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.34);
  font-size: 0.8rem;
  font-weight: 700;
}

.content {
  display: grid;
  gap: 1.1rem;
}

.dashboard-home-view {
  display: grid;
  gap: 0.85rem;
}

.dashboard-home-banner {
  padding: 0.85rem 1rem;
  border-radius: 16px;
}

.dashboard-home-banner-text {
  display: grid;
  gap: 0.3rem;
}

.dashboard-home-banner-text h2 {
  font-size: 1.34rem;
  letter-spacing: -0.02em;
}

.dashboard-home-banner-text p {
  color: var(--muted);
  font-size: 0.86rem;
}

.dashboard-home-hero {
  padding: 1rem 1.08rem;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 1rem;
  align-items: center;
}

.dashboard-home-hero-copy {
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  text-align: center;
}

.dashboard-home-hero-copy h2 {
  font-size: 1.9rem;
  letter-spacing: -0.03em;
}

.dashboard-home-hero-copy p {
  color: #56677b;
  font-size: 0.84rem;
}

.dashboard-home-hero-art {
  min-height: 170px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(247, 253, 250, 0.95), rgba(235, 246, 240, 0.75));
  border: 1px solid #deece5;
  overflow: hidden;
  display: grid;
  align-items: center;
}

.dashboard-home-hero-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.dashboard-home-sections {
  padding: 0.95rem 0.95rem 1rem;
  border-radius: 16px;
  display: grid;
  gap: 0.58rem;
}

.dashboard-home-sections h3 {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 1.46rem;
  color: #0a6c40;
  letter-spacing: -0.02em;
}

.dashboard-home-sections > p {
  margin: 0;
  color: #56667a;
  font-size: 0.84rem;
}

.dashboard-home-grid {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.dashboard-home-tile {
  border: 1px solid #d9e7e1;
  border-radius: 16px;
  padding: 0.85rem;
  background: #ffffff;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.72rem;
  align-items: start;
  text-align: left;
  color: inherit;
  box-shadow: none;
}

button.dashboard-home-tile {
  cursor: pointer;
}

button.dashboard-home-tile:hover {
  transform: translateY(-1px);
  background: #fcfffd;
  filter: none;
}

.dashboard-home-tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(46, 183, 120, 0.14);
  border: 1px solid rgba(46, 183, 120, 0.22);
  color: #118e58;
}

.dashboard-home-tile-icon .icon-svg {
  width: 1.22rem;
  height: 1.22rem;
}

.dashboard-home-tile-body {
  display: grid;
  gap: 0.35rem;
}

.dashboard-home-tile-body h4 {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 1.16rem;
  letter-spacing: -0.02em;
  color: #102136;
}

.dashboard-home-tile-body p {
  margin: 0;
  color: #56667a;
  font-size: 0.82rem;
  line-height: 1.42;
}

.dashboard-home-tile-link {
  margin-top: 0.1rem;
  color: #0a8f52;
  font-weight: 700;
  font-size: 0.86rem;
}

.dashboard-home-help {
  padding: 0.86rem 1rem;
  border-radius: 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.8rem;
  align-items: center;
}

.dashboard-home-help-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #1fa365;
  color: #1fa365;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
}

.dashboard-home-help-copy {
  display: grid;
  gap: 0.25rem;
}

.dashboard-home-help-copy h4 {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.dashboard-home-help-copy p {
  margin: 0;
  color: #5d6f82;
  font-size: 0.82rem;
}

.dashboard-home-help-btn {
  background: #ffffff;
  color: #1a2b3f;
  border: 1px solid var(--border-focus);
  border-radius: 12px;
  box-shadow: none;
  white-space: nowrap;
  padding: 0.58rem 0.85rem;
  font-size: 0.9rem;
}

.dashboard-home-help-btn:hover {
  background: #f8fcfa;
  filter: none;
}

.documents-view {
  display: grid;
  gap: 1rem;
}

.content-header {
  padding: 1.2rem 1.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  animation: rise-in 0.55s ease both;
}

.header-title {
  position: static;
  transform: none;
  width: auto;
  text-align: left;
  pointer-events: auto;
}

.header-title h2 {
  margin: 0;
  font-size: 1.92rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.header-actions {
  display: grid;
  justify-items: end;
  gap: 0.45rem;
  align-items: center;
  margin-left: auto;
}

.header-logout-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.header-logout-text {
  margin: 0;
  color: #6c7d90;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.header-logout {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-logout .icon-svg {
  width: 1.08rem;
  height: 1.08rem;
}

#userBadge {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  flex-wrap: nowrap;
}

.user-name-wrap {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.4rem 0.7rem;
  background: #fff;
}

.user-name {
  font-weight: 700;
  color: #1a2b3f;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(46, 183, 120, 0.16);
  color: var(--brand-strong);
  font-weight: 700;
}

.stats-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  display: grid;
  justify-items: start;
  text-align: left;
  gap: 0.42rem;
  padding: 1.15rem;
  animation: rise-in 0.55s ease both;
}

.stat-role-card {
  justify-items: center;
  text-align: center;
}

.stat-role-card .stat-head {
  justify-content: center;
}

.stat-role-card .stat-value,
.stat-role-card .stat-link {
  text-align: center;
}

.stat-card:nth-child(1) {
  animation-delay: 50ms;
}

.stat-card:nth-child(2) {
  animation-delay: 100ms;
}

.stat-card:nth-child(3) {
  animation-delay: 150ms;
}

.stat-card:nth-child(4) {
  animation-delay: 200ms;
}

.stat-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(46, 183, 120, 0.14);
  color: #0d9e61;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(46, 183, 120, 0.22);
}

.stat-icon .icon-svg {
  width: 1.42rem;
  height: 1.42rem;
}

.stat-label {
  color: #3f5369;
  font-size: 0.92rem;
  font-weight: 600;
}

.stat-value {
  margin-top: 0.5rem;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.stat-link {
  margin-top: 0.45rem;
  color: var(--brand-strong);
  font-size: 0.86rem;
  font-weight: 600;
}

.stats-grid .stat-card:nth-child(n + 3) .stat-label {
  font-size: 0.84rem;
}

.stats-grid .stat-card:nth-child(n + 3) .stat-value {
  font-size: 1.7rem;
}

.stats-grid .stat-card:nth-child(n + 3) .stat-link {
  font-size: 0.78rem;
}

.object-card {
  grid-column: span 2;
  gap: 0.45rem;
}

.object-select-label {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.object-select-panel {
  margin-top: 0.35rem;
  width: 100%;
  display: grid;
  gap: 0.42rem;
  position: relative;
}

.object-select-toggle {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  color: #1a2b3f;
  border: 1px solid var(--border-focus);
  border-radius: 12px;
  padding: 0.52rem 0.72rem;
  font-weight: 600;
  box-shadow: none;
}

.object-select-toggle:hover {
  background: #f7fbf8;
  filter: none;
}

#objectSelectToggleText {
  font-size: 0.8rem;
  font-weight: 600;
}

.object-select-toggle.is-open .object-toggle-icon {
  transform: rotate(180deg);
}

.object-toggle-icon {
  width: 1.05rem;
  height: 1.05rem;
  transition: transform 150ms ease;
}

.object-select-dropdown {
  position: absolute;
  top: calc(100% + 0.28rem);
  left: 0;
  right: 0;
  z-index: 22;
  background: #fff;
  border: 1px solid var(--border-focus);
  border-radius: 12px;
  box-shadow: 0 14px 24px rgba(15, 35, 24, 0.14);
  padding: 0.56rem;
  display: grid;
  gap: 0.44rem;
}

.object-select-search {
  font-size: 0.84rem;
  padding: 0.52rem 0.64rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.object-select {
  width: 100%;
  min-height: 132px;
  max-height: 172px;
  padding: 0.36rem 0.4rem;
  text-align: left;
  overflow-y: auto;
  font-size: 0.84rem;
}

.object-select option {
  padding: 0.24rem 0.34rem;
}

.filters {
  padding: 1.1rem;
  display: grid;
  grid-template-columns: 1.7fr 0.75fr 0.75fr auto auto;
  gap: 0.75rem;
  align-items: end;
}

.filter-field {
  display: grid;
  gap: 0.36rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #3f5369;
}

.filter-submit-btn {
  min-height: 49px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.44rem;
}

.filter-reset-btn {
  min-height: 49px;
  background: #ffffff;
  color: var(--brand-strong);
  border: 1px solid var(--border-focus);
  box-shadow: none;
}

.filter-reset-btn:hover {
  background: #f5faf7;
  filter: none;
}

.compact-date input {
  min-width: 0;
}

.content-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 1rem;
}

.content-grid .card {
  padding: 1rem;
  animation: rise-in 0.55s ease both;
  animation-delay: 220ms;
}

.admin-section {
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
  animation: rise-in 0.55s ease both;
  animation-delay: 260ms;
}

.admin-intro {
  font-size: 0.92rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0.9rem;
  align-items: start;
}

.admin-col {
  background: #f7fbf8;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem;
  display: grid;
  gap: 0.75rem;
  height: 100%;
}

.admin-subtitle {
  font-size: 0.95rem;
}

.admin-divider {
  height: 1px;
  width: 100%;
  background: var(--border);
}

.admin-col-wide {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.admin-location-head {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.admin-location-head .filter-field {
  min-width: 0;
}

#adminSelectedCount {
  margin: 0;
  font-size: 0.86rem;
  white-space: nowrap;
  align-self: center;
}

.admin-checkbox {
  font-size: 0.85rem;
  font-weight: 600;
}

.admin-checkbox.compact {
  align-self: center;
}

.admin-location-tools {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-location-list {
  min-height: 240px;
  height: clamp(240px, 45vh, 460px);
  max-height: 460px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem;
  display: grid;
  gap: 0.44rem;
}

.admin-location-item {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  border: 1px solid #e7f0ea;
  border-radius: 9px;
  background: #fbfdfb;
  padding: 0.45rem 0.5rem;
}

.admin-location-item input {
  width: 16px;
  height: 16px;
  margin-top: 0.2rem;
}

.admin-location-label {
  display: grid;
  gap: 0.1rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.admin-location-label small {
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 500;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

#adminStatusText {
  margin: 0;
  font-size: 0.9rem;
}

.admin-docs-block {
  margin-top: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f7fbf8;
  padding: 0.85rem;
  display: grid;
  gap: 0.62rem;
}

.admin-docs-head {
  display: grid;
  gap: 0.58rem;
}

.admin-docs-head h3 {
  margin: 0;
  font-size: 1rem;
}

.admin-docs-tools {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-docs-tools input {
  min-width: min(460px, 100%);
  flex: 1 1 280px;
}

#adminUnassignedStatusText {
  margin: 0;
  font-size: 0.86rem;
}

.admin-unassigned-list {
  min-height: 72px;
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 0.55rem;
  display: grid;
  gap: 0.5rem;
}

.admin-unassigned-item {
  border: 1px solid #e7f0ea;
  border-radius: 9px;
  background: #fbfdfb;
  padding: 0.52rem;
  display: grid;
  gap: 0.45rem;
}

.admin-unassigned-title {
  margin: 0;
  font-weight: 700;
  font-size: 0.9rem;
  color: #123026;
}

.admin-unassigned-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-unassigned-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 0.45rem;
  align-items: center;
}

.admin-unassigned-actions select {
  min-width: 0;
}

.admin-secondary-btn {
  background: #ffffff;
  color: var(--brand-strong);
  border: 1px solid var(--border-focus);
  box-shadow: none;
}

.admin-secondary-btn:hover {
  background: #f5faf7;
  filter: none;
}

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

.admin-danger-btn {
  background: #fff6f6;
  color: #9b1a1a;
  border: 1px solid #eab8b8;
  box-shadow: none;
}

.admin-danger-btn:hover {
  background: #ffecec;
  filter: none;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.panel-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.panel-toggle-btn {
  min-width: 102px;
  padding: 0.32rem 0.56rem;
  border-radius: 9px;
  background: #ffffff;
  color: var(--brand-strong);
  border: 1px solid var(--border-focus);
  box-shadow: none;
  font-size: 0.78rem;
}

.panel-toggle-btn:hover {
  background: #f5faf7;
  filter: none;
}

.panel-tag {
  padding: 0.22rem 0.52rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--brand-strong);
  background: rgba(95, 175, 120, 0.12);
  border: 1px solid rgba(46, 139, 87, 0.2);
}

.collapsible-panel {
  display: grid;
  gap: 0.65rem;
}

.collapsible-panel.is-collapsed {
  display: none;
}

.status {
  margin: 0.25rem 0 0.8rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.admin-docs-section {
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
  animation: rise-in 0.55s ease both;
  animation-delay: 250ms;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--border);
  padding: 0.64rem 0.44rem;
}

th {
  color: #455f52;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

th:nth-child(4),
th:nth-child(5),
th:nth-child(6),
td:nth-child(4),
td:nth-child(5),
td:nth-child(6) {
  text-align: center;
}

.sort-btn {
  border: none;
  background: transparent;
  color: #455f52;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  min-width: 0;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.sort-btn:hover {
  filter: none;
  transform: none;
  color: #2d5d45;
}

.sort-btn.active {
  color: #1f7a45;
}

.sort-indicator {
  font-size: 0.8rem;
  line-height: 1;
}

tbody tr:hover {
  background: rgba(46, 139, 87, 0.05);
}

td button {
  min-width: 0;
  padding: 0.42rem 0.5rem;
  border-radius: 10px;
  font-size: 0.84rem;
}

.table-icon-btn {
  width: 38px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.table-icon-btn .icon-svg {
  width: 1.02rem;
  height: 1.02rem;
}

.table-icon-btn-danger {
  background: #fff6f6;
  color: #9b1a1a;
  border: 1px solid #e8bcbc;
  box-shadow: none;
}

.table-icon-btn-danger:hover {
  background: #ffecec;
  filter: none;
}

.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.62rem;
}

.activity-list li {
  border-left: 3px solid var(--brand-soft);
  padding: 0.15rem 0 0.15rem 0.55rem;
  color: #3e5347;
  line-height: 1.36;
}

@media (max-width: 1180px) {
  .login-layout {
    grid-template-columns: minmax(300px, 1fr) minmax(320px, 460px);
    gap: 1.2rem;
  }

  .brand-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .object-card {
    grid-column: span 2;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-home-hero {
    grid-template-columns: 1fr;
  }

  .dashboard-home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-location-list {
    height: 360px;
    max-height: 360px;
  }
}

@media (max-width: 960px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    gap: 0.8rem;
    padding: 0.85rem;
  }

  .sidebar-nav {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .sidebar-nav a {
    white-space: nowrap;
  }
}

@media (max-width: 840px) {
  .login-layout {
    grid-template-columns: 1fr;
    min-height: auto;
    border-radius: 20px;
    padding: 1rem;
    gap: 1rem;
  }

  .brand-panel {
    padding: 1rem;
  }

  .brand-logo {
    max-height: 138px;
  }

  .brand-lead {
    font-size: clamp(1.9rem, 9vw, 3rem);
  }

  .brand-kicker {
    font-size: clamp(1.1rem, 6vw, 1.6rem);
  }

  .brand-copy {
    font-size: 0.98rem;
  }

  .brand-features {
    grid-template-columns: 1fr;
  }

  .login-panel {
    padding: 1.3rem 1.15rem;
  }

  .login-panel h2 {
    font-size: 1.8rem;
  }

  .login-bg-dots,
  .login-bg-orb {
    display: none;
  }

  .content-header {
    flex-direction: column;
    align-items: flex-start;
    min-height: unset;
  }

  .header-title {
    position: static;
    transform: none;
    width: 100%;
    text-align: left;
    pointer-events: auto;
  }

  .header-title h2 {
    font-size: 1.34rem;
  }

  .header-actions {
    width: 100%;
    justify-items: start;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .dashboard-home-banner-text h2 {
    font-size: 1.3rem;
  }

  .dashboard-home-hero-copy h2 {
    font-size: 2.15rem;
  }

  .dashboard-home-sections h3 {
    font-size: 1.5rem;
  }

  .dashboard-home-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-home-tile-body h4 {
    font-size: 1.35rem;
  }

  .dashboard-home-help {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .admin-location-head {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .admin-unassigned-actions {
    grid-template-columns: 1fr;
  }

  #adminSelectedCount {
    white-space: normal;
  }
}

@media (max-width: 760px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .object-card {
    grid-column: span 1;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  thead {
    display: none;
  }

  tr {
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 0.76rem;
    padding: 0.6rem 0.64rem;
    box-shadow: 0 6px 16px rgba(46, 139, 87, 0.08);
    background: #fff;
  }

  td {
    border: none;
    padding: 0.35rem 0;
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: center;
  }

  td::before {
    content: attr(data-label);
    font-size: 0.82rem;
    font-weight: 700;
    color: #4b6558;
    min-width: 82px;
    flex: 0 0 auto;
  }
}
