:root {
  --brand: #5850B5;
  --brand-dark: #4338a0;
  --brand-soft: #eeedff;
  --brand-line: #d9d7ff;
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #161927;
  --muted: #74798d;
  --border: #e4e7ef;
  --green: #1f9f72;
  --green-soft: #e9f8f1;
  --blue: #2776d8;
  --blue-soft: #eaf2ff;
  --amber: #b7791f;
  --amber-soft: #fff4dc;
  --red: #c0394a;
  --red-soft: #fff0f2;
  --shadow: 0 18px 45px rgba(34, 37, 55, 0.08);
  --shadow-soft: 0 12px 28px rgba(34, 37, 55, 0.06);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --sidebar-width: 282px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.is-modal-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 18%, rgba(88, 80, 181, 0.07), transparent 28rem),
    linear-gradient(120deg, #f8f9fd 0%, #f1f4f9 100%);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.sidebar__brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 58px;
  padding: 8px 8px 22px;
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 54px;
  flex: 0 0 42px;
}

.brand-logo__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-copy {
  min-width: 0;
}

.brand-title {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.brand-subtitle {
  margin-top: 5px;
  color: #8581a8;
  font-size: 12px;
  font-weight: 700;
}

.sidebar__nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 14px;
  color: #4d5367;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  color: var(--brand);
  background: #f4f3ff;
}

.nav-link.is-active {
  color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand-line);
}

.nav-link.is-active .nav-icon {
  background: var(--brand);
  box-shadow: 0 8px 16px rgba(88, 80, 181, 0.2);
}

.nav-link__text {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.nav-link__subtext {
  display: grid;
  gap: 1px;
  color: #8a91a3;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.nav-link__subtext[hidden] {
  display: none;
}

.nav-link__summary-row {
  min-width: 0;
}

.nav-link__count {
  color: inherit;
  font-weight: 900;
}

.nav-link__count--brand.nav-link__count--is-active {
  color: var(--brand);
}

.nav-link__count--green.nav-link__count--is-active {
  color: var(--green);
}

.nav-link__count--blue.nav-link__count--is-active {
  color: var(--blue);
}

.nav-link__count--amber.nav-link__count--is-active {
  color: var(--amber);
}

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.nav-badge[hidden] {
  display: none;
}

.nav-badge--violet {
  background: var(--brand);
}

.nav-badge--green {
  background: var(--green);
}

.app-toast {
  position: fixed;
  right: 24px;
  top: 24px;
  z-index: 60;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 8px;
  background: #1f2633;
  color: #fff;
  box-shadow: 0 16px 38px rgba(31, 38, 51, 0.22);
  font-size: 14px;
  font-weight: 800;
}

.new-requests-prompt {
  position: fixed;
  right: 24px;
  top: 78px;
  z-index: 60;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid #bfefd7;
  border-radius: 8px;
  background: #f0fdf6;
  color: var(--green);
  box-shadow: 0 16px 38px rgba(31, 38, 51, 0.16);
  font-size: 14px;
  font-weight: 900;
}

.new-requests-prompt span {
  min-width: 0;
}

.nav-link--logout {
  color: #626879;
}

.nav-link--logout:hover {
  color: var(--red);
  background: var(--red-soft);
}

.nav-divider {
  height: 1px;
  margin: 7px 12px;
  background: var(--border);
  opacity: 0.78;
}

.nav-group-title {
  margin: 18px 12px 6px;
  color: #9aa0ae;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-icon {
  position: relative;
  display: inline-block;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 10px;
  background: #eef1f7;
}

.nav-icon::before,
.nav-icon::after {
  position: absolute;
  content: "";
}

.nav-icon--request::before {
  inset: 7px 8px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 2px;
}

.nav-icon--request::after {
  top: 6px;
  left: 8px;
  width: 10px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.nav-icon--line::before {
  top: 7px;
  left: 6px;
  width: 14px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.nav-icon--line::after {
  top: 12px;
  right: 5px;
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: -4px 4px 0 currentColor;
}

.nav-icon--own::before {
  top: 7px;
  left: 7px;
  width: 12px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.nav-icon--own::after {
  top: 11px;
  left: 11px;
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor;
}

.nav-icon--report::before {
  left: 7px;
  bottom: 7px;
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 5px -4px 0 currentColor, 10px -1px 0 currentColor;
}

.nav-icon--utility::before {
  top: 7px;
  left: 7px;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.nav-icon--utility::after {
  top: 11px;
  left: 11px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.nav-icon--salary::before {
  top: 7px;
  left: 4px;
  width: 16px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.nav-icon--salary::after {
  top: 10px;
  left: 9px;
  width: 6px;
  height: 6px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.nav-icon--history::before {
  inset: 7px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.nav-icon--history::after {
  top: 9px;
  left: 13px;
  width: 2px;
  height: 7px;
  border-radius: 2px;
  background: currentColor;
  transform-origin: bottom;
  transform: rotate(-35deg);
}

.nav-icon--category::before {
  top: 7px;
  left: 7px;
  width: 5px;
  height: 5px;
  border-radius: 3px;
  background: currentColor;
  box-shadow: 8px 0 0 currentColor, 0 8px 0 currentColor, 8px 8px 0 currentColor;
}

.nav-icon--bank::before {
  top: 7px;
  left: 6px;
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 10px 0 currentColor;
}

.nav-icon--bank::after {
  top: 11px;
  left: 7px;
  width: 2px;
  height: 7px;
  background: currentColor;
  box-shadow: 5px 0 0 currentColor, 10px 0 0 currentColor;
}

.nav-icon--user::before {
  top: 6px;
  left: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.nav-icon--user::after {
  left: 7px;
  bottom: 6px;
  width: 12px;
  height: 7px;
  border-radius: 7px 7px 3px 3px;
  background: currentColor;
}

.nav-icon--google::before {
  top: 7px;
  left: 7px;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}

.nav-icon--google::after {
  top: 12px;
  right: 6px;
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.nav-icon--archive::before {
  top: 7px;
  left: 6px;
  width: 14px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.nav-icon--archive::after {
  top: 11px;
  left: 10px;
  width: 6px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.nav-icon--logout::before {
  top: 7px;
  left: 7px;
  width: 9px;
  height: 12px;
  border: 2px solid currentColor;
  border-right: 0;
  border-radius: 4px 0 0 4px;
}

.nav-icon--logout::after {
  top: 12px;
  right: 6px;
  width: 9px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.sidebar__footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.main {
  min-width: 0;
  padding: 24px 32px 42px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-height: 58px;
  margin-bottom: 24px;
}

.topbar .topbar__menu {
  display: none;
}

.topbar__date,
.topbar__user {
  display: flex;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.topbar__date {
  gap: 18px;
  padding: 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.topbar__date strong {
  color: var(--text);
  font-weight: 800;
}

.topbar__user {
  gap: 10px;
  padding: 7px 12px 7px 8px;
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #fff;
  background: var(--brand);
  font-size: 15px;
  font-weight: 800;
}

.user-name {
  font-size: 14px;
  font-weight: 800;
}

.user-role {
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.icon-button span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.icon-button span + span {
  margin-top: 0;
}

.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 720px);
  min-height: 46px;
  margin: 0 0 18px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  font-size: 14px;
  font-weight: 700;
}

.auth-page .flash {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 5;
  transform: translateX(-50%);
}

.flash__dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: var(--brand);
}

.flash--danger {
  border-color: #ffd4da;
  background: var(--red-soft);
  color: var(--red);
}

.flash--danger .flash__dot {
  background: var(--red);
}

.flash--warning {
  border-color: #ffe3ad;
  background: var(--amber-soft);
  color: var(--amber);
}

.flash--warning .flash__dot {
  background: var(--amber);
}

.flash--success {
  border-color: #bfefd7;
  background: var(--green-soft);
  color: var(--green);
}

.flash--success .flash__dot {
  background: var(--green);
}

.notice {
  display: grid;
  gap: 4px;
  margin: 0 0 18px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  font-size: 14px;
  line-height: 1.45;
}

.notice strong {
  color: var(--text);
}

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

.notice--warning {
  border-color: #ffe3ad;
  background: var(--amber-soft);
}

.notice--danger {
  border-color: #ffd4da;
  background: var(--red-soft);
}

.notice--danger strong,
.notice--danger span {
  color: var(--red);
}

.form-errors {
  display: grid;
  gap: 6px;
  grid-column: 1 / -1;
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid #ffd4da;
  border-radius: 14px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.form-errors p {
  margin: 0;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(20, 24, 36, 0.44);
}

.confirm-modal__dialog {
  width: min(100%, 430px);
  padding: 22px;
  border: 1px solid rgba(228, 231, 239, 0.95);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: 0 26px 70px rgba(31, 35, 53, 0.25);
}

.confirm-modal__dialog h2 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.confirm-modal__dialog p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
}

.confirm-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.page-actions form {
  margin: 0;
}

.page-head h1,
.login-card h1 {
  margin: 0;
  color: var(--text);
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: 0;
}

.page-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.page-eyebrow,
.login-card__eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled,
.button:disabled:hover {
  opacity: 0.45;
  transform: none;
}

.button--primary {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 14px 24px rgba(88, 80, 181, 0.22);
}

.button--primary:hover {
  background: var(--brand-dark);
}

.button--ghost {
  color: #53586b;
  border-color: var(--border);
  background: #fff;
}

.button--danger {
  color: var(--red);
  border-color: #ffd4da;
  background: var(--red-soft);
}

.button--compact {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 13px;
}

.button--square {
  width: 36px;
  padding: 0;
  font-size: 16px;
}

.button--full {
  width: 100%;
}

.button-icon {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.button-icon--plus::before,
.button-icon--plus::after {
  position: absolute;
  top: 7px;
  left: 2px;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.button-icon--plus::after {
  transform: rotate(90deg);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.metric-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-grid--daily {
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 12px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 154px;
  padding: 18px;
  border: 1px solid rgba(228, 231, 239, 0.9);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}

.metric-card__accent {
  position: absolute;
  top: 0;
  right: 18px;
  left: 18px;
  height: 4px;
  border-radius: 0 0 8px 8px;
  background: var(--brand);
}

.metric-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.metric-card p {
  margin: 8px 0 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric-card strong {
  font-size: 16px;
}

.metric-card__value {
  margin-top: 28px;
  font-size: 27px;
  font-weight: 900;
  line-height: 1.1;
}

.metric-icon {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 15px;
  background: var(--brand-soft);
}

.metric-grid--daily .metric-card {
  min-height: 82px;
  padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(29, 35, 58, 0.07);
}

.metric-grid--daily .metric-card__accent {
  right: 12px;
  left: 12px;
  height: 3px;
}

.metric-grid--daily .metric-card__top {
  gap: 8px;
}

.metric-grid--daily .metric-card p {
  margin: 4px 0 2px;
  font-size: 12px;
}

.metric-grid--daily .metric-card strong {
  color: var(--muted);
  font-size: 12px;
}

.metric-grid--daily .metric-card__value {
  margin-top: 8px;
  font-size: 20px;
}

.metric-grid--daily .metric-icon {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
  border-radius: 9px;
  opacity: 0.65;
}

.metric-grid--compact {
  gap: 12px;
  margin-bottom: 20px;
}

.metric-grid--compact .metric-card {
  min-height: 104px;
  padding: 12px 14px;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.metric-grid--compact .metric-card__accent {
  right: 14px;
  left: 14px;
  height: 3px;
}

.metric-grid--compact .metric-card p {
  margin: 4px 0 2px;
  font-size: 12px;
}

.metric-grid--compact .metric-card strong {
  color: var(--muted);
  font-size: 12px;
}

.metric-grid--compact .metric-card__value {
  margin-top: 12px;
  font-size: 22px;
}

.metric-grid--compact .metric-icon {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  border-radius: 10px;
  opacity: 0.72;
}

.metric-grid--compact .metric-icon::before {
  top: 8px;
  left: 8px;
  width: 12px;
  height: 12px;
  border-width: 2px;
}

.metric-grid--daily .metric-icon::before {
  top: 7px;
  left: 7px;
  width: 12px;
  height: 12px;
  border-width: 2px;
}

.metric-icon::before {
  position: absolute;
  top: 11px;
  left: 11px;
  width: 20px;
  height: 20px;
  border: 3px solid var(--brand);
  border-radius: 50%;
  content: "";
}

.metric-card--blue .metric-card__accent {
  background: var(--blue);
}

.metric-card--blue .metric-icon {
  background: var(--blue-soft);
}

.metric-card--blue .metric-icon::before {
  border-color: var(--blue);
}

.metric-card--green .metric-card__accent {
  background: var(--green);
}

.metric-card--green .metric-icon {
  background: var(--green-soft);
}

.metric-card--green .metric-icon::before {
  border-color: var(--green);
}

.metric-card--amber .metric-card__accent {
  background: var(--amber);
}

.metric-card--amber .metric-icon {
  background: var(--amber-soft);
}

.metric-card--amber .metric-icon::before {
  border-color: var(--amber);
}

.planning-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.planning-card h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.planning-card p {
  max-width: 660px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}

.planning-types {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.planning-types span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.request-number-line {
  display: inline-flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

.origin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  padding: 0 7px;
  border: 1px solid rgba(183, 121, 31, 0.18);
  border-radius: 999px;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.line-deleted-badge {
  display: inline-flex;
  align-items: center;
  max-width: 260px;
  min-height: 19px;
  padding: 0 7px;
  border: 1px solid #ffd4da;
  border-radius: 999px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
}

.content-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.utilities-workspace {
  overflow: hidden;
}

.utility-section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
}

.utility-section-tab {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: #5c6275;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.utility-section-tab.is-active {
  color: var(--brand);
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.utility-section-tab__title {
  color: var(--text);
  font-size: 14px;
}

.utility-section-tab.is-active .utility-section-tab__title {
  color: var(--brand);
}

.utility-section-tab__counts {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.counter-pill__value {
  color: inherit;
}

.counter-pill__value--is-active {
  color: var(--brand);
}

.utility-section-panel[hidden] {
  display: none;
}

.utility-create-panel {
  margin: 16px 18px 0;
  box-shadow: var(--shadow-soft);
}

.utility-table-panel {
  overflow: hidden;
}

.utility-table-panel .table-wrap {
  margin-top: 12px;
}

.utility-placeholder {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 32px;
  text-align: center;
}

.utility-placeholder p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 16px 18px 0;
  overflow-x: auto;
}

.tab {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: #5c6275;
  background: #fff;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.tab.is-active {
  color: var(--brand);
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.filters {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(200px, 1.3fr) minmax(220px, auto);
  gap: 12px;
  padding: 18px;
  align-items: end;
}

.filters--cleanup {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.filters--operations {
  grid-template-columns: minmax(220px, 1.4fr) repeat(5, minmax(135px, 1fr));
}

.filters--daily-operations {
  grid-template-columns: minmax(170px, 1fr) minmax(220px, 1fr) repeat(2, minmax(150px, 1fr));
  padding: 14px;
}

.filters--daily-operations .filter-actions {
  grid-column: 3 / -1;
}

.filters--archive {
  grid-template-columns: minmax(150px, 1fr) minmax(190px, 1fr) minmax(190px, 1fr) minmax(210px, auto);
}

.filters--archive-export {
  grid-template-columns: minmax(150px, 0.8fr) minmax(180px, 1fr) minmax(180px, 1fr) minmax(180px, auto);
  padding-top: 0;
}

.filters--internet {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  padding: 14px;
}

.archive-export-panel {
  margin-top: 14px;
}

.archive-export-panel__head {
  padding-bottom: 10px;
}

.archive-export-panel__head h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.filter-inline-fields {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(92px, 0.7fr);
  gap: 8px;
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.filter-field,
.field {
  display: grid;
  gap: 7px;
}

.field[hidden],
.filter-field[hidden] {
  display: none;
}

.filter-field span,
.field span {
  color: #626879;
  font-size: 12px;
  font-weight: 900;
}

.field__hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.filter-field input,
.filter-field select,
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 13px;
  outline: none;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-field input,
.filter-field select,
.field input,
.field select {
  height: 44px;
}

.filter-field input,
.field input,
.field textarea {
  padding: 0 13px;
}

.field textarea {
  min-height: 104px;
  padding-top: 12px;
  padding-bottom: 12px;
  resize: vertical;
  line-height: 1.45;
}

.readonly-input {
  color: var(--text);
  background: #f7f8fc !important;
}

.utility-method-field {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.utility-method-field legend {
  flex-basis: 100%;
  margin: 0 0 1px;
  color: #626879;
  font-size: 12px;
  font-weight: 900;
}

.utility-method-option {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: #5c6275;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.utility-method-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.utility-method-option.is-active {
  color: var(--brand);
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.utility-receipts {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafbfe;
}

.utility-receipts__head,
.utility-receipt-row__head,
.utility-receipts__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.utility-receipts__head > div {
  display: grid;
  gap: 4px;
}

.utility-receipts__list {
  display: grid;
  gap: 12px;
}

.utility-receipt-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(160px, 0.7fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.utility-receipt-row__head {
  grid-column: 1 / -1;
}

.utility-receipt-row__head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.utility-receipts__total {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.utility-receipts__total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.utility-receipts__total strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}


.filter-field select,
.field select {
  padding: 0 36px 0 13px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #8a90a3 50%),
    linear-gradient(135deg, #8a90a3 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 19px,
    calc(100% - 12px) 19px;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

.filter-field input:focus,
.filter-field select:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(88, 80, 181, 0.12);
}

.field input[type="file"] {
  padding: 9px 13px;
  background: #fafbfe;
}

.autocomplete {
  position: relative;
}

.autocomplete__list {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  z-index: 12;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.autocomplete__list[hidden] {
  display: none;
}

.autocomplete__option {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 10px 13px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: #fff;
  color: #343849;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
}

.autocomplete__option:last-child {
  border-bottom: 0;
}

.autocomplete__option:hover,
.autocomplete__option.is-active {
  color: var(--brand);
  background: var(--brand-soft);
}

.form-panel {
  margin-bottom: 22px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}

.form-panel--compact {
  margin-bottom: 0;
}

.form-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.form-panel h2,
.detail-card h2,
.section-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.form-panel p,
.detail-card__head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}

.request-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

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

.request-form--internet {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.internet-form-panel {
  max-width: 1180px;
}

.quick-operation-form {
  display: grid;
  gap: 18px;
}

.quick-operation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.quick-operation-section {
  min-width: 0;
}

.quick-operation-actions {
  justify-content: flex-end;
}

.quick-operation-extra-payments {
  display: grid;
  gap: 16px;
}

.quick-operation-payment-extra {
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.quick-operation-payment-extra__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.quick-operation-payment-extra__head h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  letter-spacing: 0;
}

.quick-operation-choice {
  padding: 16px;
  border: 1px solid #f5c66a;
  border-radius: 14px;
  background: #fff8e7;
}

.quick-operation-choice h2 {
  margin: 0 0 12px;
  font-size: 18px;
  letter-spacing: 0;
}

.quick-operation-choice p {
  margin: 12px 0 0;
  color: var(--text);
  font-weight: 800;
}

.quick-operation-choice__summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.quick-operation-choice__summary div {
  min-width: 0;
}

.quick-operation-choice__summary dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.quick-operation-choice__summary dd {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.quick-operation-choice__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.field--wide,
.form-actions {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.content-panel--spaced .table-wrap {
  margin-top: 12px;
}

.content-panel--line {
  padding-bottom: 18px;
}

.content-panel--line .tabs {
  padding-bottom: 16px;
}

.content-panel--line .table-panel {
  padding: 0 18px;
}

.content-panel--line .table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}

.content-panel--line .empty-state {
  min-height: 300px;
}

.content-panel--section {
  overflow: hidden;
}

.section-head {
  padding: 18px 20px;
}

.panel-actions {
  display: flex;
  justify-content: flex-end;
  padding: 18px 18px 6px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-actions form {
  margin: 0;
}

.internet-table-actions {
  gap: 6px;
}

.archive-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.archive-month {
  overflow: hidden;
}

.archive-month__summary {
  display: grid;
  grid-template-columns: 22px auto auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}

.archive-month__summary::-webkit-details-marker {
  display: none;
}

.archive-month__chevron {
  width: 9px;
  height: 9px;
  border-right: 2px solid #7d8293;
  border-bottom: 2px solid #7d8293;
  transform: rotate(-45deg);
  transition: transform 0.18s ease;
}

.archive-month[open] .archive-month__chevron {
  transform: rotate(45deg);
}

.archive-month__title {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.archive-month__meta {
  color: #4f5668;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.archive-month__sources {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.archive-month__body {
  border-top: 1px solid var(--border);
}

.archive-source-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 18px;
}

.archive-source-tab {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #626879;
  background: #fff;
  font-size: 13px;
  font-weight: 900;
}

.archive-source-tab span {
  color: var(--muted);
}

.archive-source-tab.is-active {
  color: var(--brand);
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.file-links {
  display: grid;
  gap: 6px;
}

.file-list {
  display: grid;
  gap: 8px;
}

.file-list__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.file-list__item strong,
.file-list__item span,
.file-list__item small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.file-list__item strong {
  color: var(--text);
  font-size: 14px;
}

.file-list__item span,
.file-list__item small {
  margin-top: 3px;
  color: #626879;
  font-size: 12px;
  font-weight: 800;
}

.attachment-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.attachment-cell--stacked {
  display: inline-grid;
  justify-items: start;
  white-space: normal;
}

.attachment-cell__actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.attachment-cell__button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  color: #53586b;
}

.file-links a,
.table-link {
  color: var(--brand);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.75fr);
  gap: 16px;
  margin-bottom: 22px;
}

.detail-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.operation-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.operation-archive-note {
  margin-bottom: 16px;
  padding: 14px 18px;
}

.operation-archive-note p {
  margin: 0;
  color: var(--amber);
  font-size: 14px;
  font-weight: 900;
}

.operation-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.detail-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}

.detail-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.detail-list div,
.detail-note,
.result-box {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fafbfe;
}

.detail-list dt,
.detail-note h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.detail-list dd {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.detail-note + .detail-note {
  margin-top: 12px;
}

.detail-note--utility-adjustment {
  border-color: rgba(31, 116, 183, 0.18);
  background: #eef7ff;
}

.detail-note--utility-adjustment h3,
.detail-note--utility-adjustment p {
  color: #1f5f8f;
}

.utility-payment-box {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafbfe;
}

.utility-payment-box__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.utility-payment-box__grid div {
  min-width: 0;
}

.utility-payment-box__grid dt,
.utility-payment-amount span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.utility-payment-box__grid dd {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  white-space: pre-wrap;
}

.utility-payment-box__files,
.utility-adjustment-summary,
.utility-adjustment-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.utility-receipt-summary {
  display: grid;
  gap: 12px;
}

.utility-receipt-summary__grid,
.utility-receipt-picker__panel dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.utility-receipt-summary__grid div,
.utility-receipt-picker__panel dl div {
  min-width: 0;
}

.utility-receipt-summary__grid dt,
.utility-receipt-picker__panel dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.utility-receipt-summary__grid dd,
.utility-receipt-picker__panel dd {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.utility-receipt-picker {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.utility-receipt-picker__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.utility-receipt-picker__tab {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.utility-receipt-picker__tab.is-active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.utility-receipt-picker__panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.utility-receipt-picker__panel[hidden],
.utility-adjustment-summary[hidden] {
  display: none;
}

.utility-receipt-paid-info {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(39, 138, 78, 0.2);
  border-radius: 8px;
  background: #f2fbf5;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.utility-receipt-paid-info strong {
  color: #25633e;
  font-size: 12px;
  font-weight: 900;
}

.utility-payment-amount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.utility-payment-amount strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.15;
}

.utility-adjustment-summary {
  padding: 12px;
  border: 1px solid rgba(31, 116, 183, 0.18);
  border-radius: 8px;
  background: #eef7ff;
  color: #1f5f8f;
  font-size: 13px;
  font-weight: 800;
}

.utility-adjustment-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(183, 121, 31, 0.24);
  border-radius: 8px;
  background: var(--amber-soft);
}

.utility-adjustment-panel[hidden] {
  display: none;
}

.detail-note--origin {
  margin-bottom: 18px;
  border-color: rgba(183, 121, 31, 0.18);
  background: var(--amber-soft);
}

.detail-note.detail-note--origin h3,
.detail-note.detail-note--origin p {
  color: var(--amber);
}

.detail-note p {
  margin: 8px 0 0;
  color: #343849;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  white-space: pre-wrap;
}

.result-box {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--green);
  background: var(--green-soft);
  border-color: #bfefd7;
}

.result-box strong {
  font-size: 15px;
}

.result-box__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button--disabled {
  opacity: 0.55;
  pointer-events: none;
}

.empty-state--compact {
  min-height: 180px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-top: 1px solid var(--border);
}

.table-panel[hidden] {
  display: none;
}

.data-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: #7d8293;
  background: #fafbfe;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.data-table td {
  color: #343849;
  font-size: 14px;
  font-weight: 700;
}

.money-nowrap,
.money-value,
.amount-value,
.currency-value {
  white-space: nowrap;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tr.is-disabled td {
  color: #858b9d;
  background: #fbfcff;
}

.data-table--filled tbody td {
  height: 58px;
}

.data-table--cleanup {
  min-width: 1320px;
}

.data-table--archive {
  min-width: 1240px;
}

.data-table--daily-operations {
  min-width: 1320px;
}

.data-table--internet {
  min-width: 1220px;
}

.data-table--internet th,
.data-table--internet td {
  padding: 10px 12px;
  font-size: 13px;
}

.data-table--internet th:last-child,
.data-table--internet td:last-child {
  width: 300px;
}

.table-note {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.table-note--danger {
  color: var(--red);
}

.utility-table-summary {
  display: grid;
  gap: 3px;
  min-width: 110px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.utility-table-summary strong {
  color: var(--text);
}

.cleanup-action {
  display: grid;
  gap: 8px;
  min-width: 180px;
}

.cleanup-action + .cleanup-action {
  margin-top: 12px;
}

.cleanup-action--delete {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.cleanup-reason {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  color: var(--text);
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.empty-state {
  display: grid;
  justify-items: center;
  min-height: 250px;
  padding: 42px 20px;
  text-align: center;
}

.empty-state__icon {
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--brand-soft), #fff);
  box-shadow: inset 0 0 0 1px var(--brand-line);
}

.empty-state__icon::before {
  position: absolute;
  inset: 21px 19px;
  border: 3px solid var(--brand);
  border-top: 0;
  border-radius: 4px;
  content: "";
}

.empty-state__icon::after {
  position: absolute;
  top: 18px;
  left: 24px;
  width: 24px;
  height: 3px;
  border-radius: 3px;
  background: var(--brand);
  content: "";
}

.empty-state h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.empty-state p {
  max-width: 430px;
  margin: 9px auto 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}

.empty-state--wide {
  min-height: 330px;
}

.stub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.stub-card {
  min-height: 118px;
  padding: 19px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.stub-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stub-card strong {
  display: block;
  margin-top: 22px;
  font-size: 25px;
  line-height: 1.1;
}

.stub-panel {
  overflow: hidden;
}

.admin-board {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 16px;
}

.admin-card {
  min-height: 260px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}

.admin-card--soft {
  background:
    linear-gradient(145deg, rgba(88, 80, 181, 0.08), rgba(39, 118, 216, 0.08)),
    #fff;
}

.admin-card--form {
  min-height: 0;
  margin-bottom: 18px;
}

.admin-card__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.admin-card h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.admin-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}

.admin-icon {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 16px;
  background: var(--brand-soft);
}

.admin-icon::before,
.admin-icon::after {
  position: absolute;
  content: "";
}

.admin-icon--category::before {
  top: 13px;
  left: 13px;
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--brand);
  box-shadow: 12px 0 0 var(--brand), 0 12px 0 var(--brand), 12px 12px 0 var(--brand);
}

.admin-icon--bank::before {
  top: 14px;
  left: 11px;
  width: 24px;
  height: 4px;
  border-radius: 4px;
  background: var(--blue);
  box-shadow: 0 17px 0 var(--blue);
}

.admin-icon--bank::after {
  top: 20px;
  left: 13px;
  width: 4px;
  height: 12px;
  background: var(--blue);
  box-shadow: 9px 0 0 var(--blue), 18px 0 0 var(--blue);
}

.admin-icon--provider::before {
  top: 12px;
  left: 12px;
  width: 22px;
  height: 22px;
  border: 4px solid var(--green);
  border-radius: 50%;
}

.admin-icon--provider::after {
  top: 19px;
  left: 19px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 -10px 0 -2px var(--green), 0 10px 0 -2px var(--green), -10px 0 0 -2px var(--green), 10px 0 0 -2px var(--green);
}

.admin-icon--google::before {
  inset: 12px;
  border: 4px solid var(--brand);
  border-right-color: transparent;
  border-radius: 50%;
}

.admin-icon--google::after {
  top: 22px;
  right: 11px;
  width: 15px;
  height: 4px;
  border-radius: 4px;
  background: var(--brand);
}

.admin-icon--sheet {
  background: var(--green-soft);
}

.admin-icon--sheet::before {
  top: 11px;
  left: 13px;
  width: 20px;
  height: 25px;
  border: 3px solid var(--green);
  border-radius: 4px;
}

.admin-icon--sheet::after {
  top: 20px;
  left: 17px;
  width: 12px;
  height: 2px;
  background: var(--green);
  box-shadow: 0 6px 0 var(--green);
}

.admin-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.admin-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fafbfe;
}

.admin-list span {
  color: #4a5063;
  font-size: 14px;
  font-weight: 800;
}

.admin-list strong {
  color: var(--brand);
  font-size: 13px;
  white-space: nowrap;
}

.admin-list--settings div {
  align-items: flex-start;
}

.admin-list--settings strong {
  max-width: 560px;
  overflow-wrap: anywhere;
  text-align: right;
  white-space: normal;
}

.dictionary-form {
  display: grid;
  grid-template-columns: minmax(220px, 420px) auto;
  gap: 12px;
  align-items: end;
  margin-top: 22px;
}

.dictionary-panel {
  overflow: hidden;
}

.dictionary-table {
  min-width: 820px;
}

.dictionary-table th:first-child,
.dictionary-table td:first-child {
  width: 72px;
}

.dictionary-table th:nth-child(3),
.dictionary-table td:nth-child(3) {
  width: 130px;
}

.dictionary-table th:last-child,
.dictionary-table td:last-child {
  width: 340px;
}

.dictionary-order {
  color: var(--brand);
  font-weight: 900;
}

.inline-edit-form {
  width: min(100%, 360px);
}

.dictionary-input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.dictionary-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.dictionary-actions form {
  margin: 0;
}

.bank-receipt-field {
  align-content: start;
}

.bank-receipt-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--green);
}

.bank-receipt-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.bank-receipt-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  padding: 0;
  accent-color: var(--green);
}

.bank-receipt-pill {
  min-height: 22px;
  padding: 0 8px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.dictionary-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(88, 80, 181, 0.12);
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 900;
}

.status-pill--admin {
  color: var(--brand);
  background: var(--brand-soft);
}

.status-pill--success {
  color: var(--green);
  background: var(--green-soft);
}

.status-pill--muted {
  color: #6f7586;
  background: #edf0f6;
}

.status-pill--danger {
  color: var(--red);
  background: var(--red-soft);
}

.integration-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin-top: 24px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 13px;
  font-weight: 900;
}

.integration-status--success {
  color: var(--green);
  background: var(--green-soft);
}

.integration-status--success .status-dot {
  background: var(--green);
}

.integration-status--warning {
  color: var(--amber);
  background: var(--amber-soft);
}

.integration-status--warning .status-dot {
  background: var(--amber);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
}

.integration-note {
  padding: 12px 14px;
  border: 1px solid #ffe3ad;
  border-radius: 14px;
  color: var(--amber);
  background: var(--amber-soft);
  overflow-wrap: anywhere;
}

.auth-body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(88, 80, 181, 0.16) 0%, rgba(39, 118, 216, 0.08) 42%, rgba(31, 159, 114, 0.09) 100%),
    #f7f8fc;
}

.auth-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 28px;
}

.login-card {
  width: min(100%, 430px);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 28px 70px rgba(34, 37, 55, 0.14);
  backdrop-filter: blur(18px);
}

.login-logo {
  display: grid;
  place-items: center;
  width: 82px;
  height: 112px;
  margin: 0 auto 22px;
}

.login-logo__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-card__text {
  margin: 12px 0 26px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
  text-align: center;
}

.login-card h1 {
  text-align: center;
}

.login-form {
  display: grid;
  gap: 16px;
  text-align: left;
}

.field input {
  height: 48px;
  background: #fafbfe;
}

.login-form .button {
  min-height: 50px;
  margin-top: 4px;
}

@media (max-width: 1180px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters,
  .filters--operations,
  .filters--daily-operations,
  .filters--archive,
  .filters--internet {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-field--search,
  .filters--daily-operations .filter-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    right: 16px;
    left: 16px;
    top: 72px;
    display: none;
    width: auto;
    height: auto;
    max-height: calc(100vh - 92px);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
  }

  body.is-sidebar-open .sidebar {
    display: flex;
  }

  .sidebar__brand {
    padding-bottom: 14px;
  }

  .main {
    padding: 16px 16px 34px;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 18;
    justify-content: space-between;
    gap: 10px;
    margin: -16px -16px 18px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(246, 247, 251, 0.92);
    backdrop-filter: blur(16px);
  }

  .topbar .topbar__menu {
    display: inline-grid;
  }

  .topbar__date {
    display: none;
  }

  .topbar__user {
    box-shadow: none;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-actions {
    justify-content: flex-start;
    width: 100%;
  }

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

  .planning-card {
    grid-template-columns: 1fr;
  }

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

  .operation-detail-grid {
    grid-template-columns: 1fr;
  }

  .quick-operation-grid {
    grid-template-columns: 1fr;
  }

  .quick-operation-choice__summary {
    grid-template-columns: 1fr;
  }

  .planning-types {
    justify-content: flex-start;
  }

  .archive-month__summary {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .archive-month__meta,
  .archive-month__sources {
    grid-column: 2;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .page-head h1,
  .login-card h1 {
    font-size: 28px;
  }

  .metric-grid,
  .stub-grid,
  .filters,
  .filters--operations,
  .filters--daily-operations,
  .filters--archive,
  .filters--internet,
  .request-form,
  .request-form--single,
  .request-form--internet,
  .detail-list,
  .dictionary-form,
  .inline-edit-form {
    grid-template-columns: 1fr;
  }

  .filter-field--search {
    grid-column: auto;
  }

  .metric-card {
    min-height: 140px;
  }

  .metric-grid--compact .metric-card {
    min-height: 96px;
  }

  .utility-section-tabs {
    padding-right: 14px;
    padding-left: 14px;
  }

  .utility-section-tab {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    white-space: normal;
  }

  .utility-section-tab__counts {
    gap: 6px;
  }

  .page-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .metric-card__value {
    font-size: 24px;
  }

  .content-panel,
  .metric-card,
  .stub-card,
  .admin-card {
    border-radius: 18px;
  }

  .tabs,
  .filters {
    padding-right: 14px;
    padding-left: 14px;
  }

  .archive-month__summary,
  .archive-source-tabs {
    padding-right: 14px;
    padding-left: 14px;
  }

  .login-card {
    padding: 26px;
    border-radius: 22px;
  }

  .auth-page {
    padding: 18px;
  }

  .auth-page .flash {
    top: 14px;
    width: calc(100% - 28px);
  }

  .confirm-modal {
    align-items: end;
    padding: 14px;
  }

  .confirm-modal__dialog {
    padding: 20px;
    border-radius: 18px;
  }

  .confirm-modal__actions {
    flex-direction: column-reverse;
  }

  .confirm-modal__actions .button {
    width: 100%;
  }

  .utility-payment-box__grid,
  .utility-receipt-row {
    grid-template-columns: 1fr;
  }

  .utility-payment-amount {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Mobile topbar burger fix */
@media (max-width: 900px) {
  .topbar__menu {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    padding: 0 !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
  }

  .topbar__menu svg {
    display: none !important;
  }

  .topbar__menu span {

  display: none !important;

}

  .topbar__menu::before {
    content: "";
    width: 22px;
    height: 15px;
    display: block;
    background:
      linear-gradient(#111827, #111827) 0 0 / 22px 3px no-repeat,
      linear-gradient(#111827, #111827) 0 6px / 22px 3px no-repeat,
      linear-gradient(#111827, #111827) 0 12px / 22px 3px no-repeat;
    border-radius: 999px;
  }
}
