/* IECMS core styles */
:root {
  --bg-base: #f5f5f0;
  --bg-soft: #eef3ed;
  --panel-bg: #ffffff;
  --panel-soft: #f8faf6;
  --text-dark: #10281c;
  --text-muted: #5a655b;
  --primary: #0d5b38;
  --primary-dark: #08412a;
  --accent: #c2a14d;
  --border: #d9d9d0;
  --shadow: rgba(16, 40, 28, 0.08);
  --sidebar-width: 216px;
  --content-max: 1040px;
}

* {
  box-sizing: border-box;
}

.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;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 12px;
  line-height: 1.45;
  background:
    radial-gradient(circle at top left, rgba(194,161,77,0.08), transparent 24%),
    linear-gradient(180deg, #edf2eb 0%, #f7f6f0 100%);
  color: var(--text-dark);
}

a {
  color: var(--primary);
  text-decoration: none;
}

.app-layout {
  display: flex;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.26), rgba(255,255,255,0)),
    var(--bg-soft);
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background:
    radial-gradient(circle at top, rgba(194,161,77,0.18), transparent 34%),
    linear-gradient(180deg, #0c5535 0%, #0a432b 100%);
  color: #fff;
  min-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  padding: 12px 8px 12px 12px;
  overflow: hidden;
  transition: left 0.25s ease;
  z-index: 20;
  pointer-events: auto;
  box-shadow: 22px 0 45px -28px rgba(0, 0, 0, 0.38);
  display: flex;
  flex-direction: column;
}

.sidebar::-webkit-scrollbar {
  width: 0;
}

.sidebar-scroll-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
  margin-right: -2px;
  scrollbar-gutter: stable;
}

.sidebar-scroll-area::-webkit-scrollbar {
  width: 10px;
}

.sidebar-scroll-area::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
}

.sidebar-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(244,201,109,0.45);
  border-radius: 999px;
  border: 2px solid rgba(10,67,43,0.85);
}

.sidebar-scroll-area {
  scrollbar-width: thin;
  scrollbar-color: rgba(244,201,109,0.55) rgba(255,255,255,0.08);
}

.sidebar-brand {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  padding: 0 4px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}

.sidebar-logo-frame {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #fffef9 0%, #f4f0df 100%);
  border: 1px solid rgba(244,201,109,0.6);
  border-radius: 16px;
  box-shadow: 0 16px 28px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.45);
}

.sidebar-logo {
  width: 50px;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.18));
}

.sidebar-brand-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
  align-content: center;
}

.logo-kicker {
  display: grid;
  color: rgba(244,201,109,0.9);
  font-size: 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.sidebar-user-meta {
  color: rgba(255,255,255,0.72);
  font-size: 0.7rem;
  line-height: 1.2;
}

.nav-sections {
  display: grid;
  gap: 6px;
}

.nav-group {
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.075);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 14px 30px -26px rgba(0,0,0,0.45);
}

.nav-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0));
  border: none;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
  list-style: none;
}

.nav-group-toggle::-webkit-details-marker {
  display: none;
}

.nav-group-copy {
  display: grid;
  gap: 3px;
  justify-items: start;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-group-label {
  line-height: 1.2;
}

.nav-section-icon,
.nav-link-icon,
.sidebar-footer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.nav-section-icon {
  width: 18px;
  height: 18px;
  margin-right: 9px;
  color: rgba(244, 201, 109, 0.92);
}

.nav-section-icon svg,
.nav-link-icon svg,
.sidebar-footer-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.nav-group-meta {
  font-size: 0.6rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.58);
}

.nav-group-arrow {
  transition: transform 0.2s ease;
}

.nav-group[open] .nav-group-arrow {
  transform: rotate(90deg);
}

.nav-group[open] .nav-group-toggle {
  background: linear-gradient(180deg, rgba(194,161,77,0.14), rgba(255,255,255,0.02));
}

.nav-submenu {
  list-style: none;
  padding: 0 5px 5px;
  margin: 0;
  display: none;
}

.nav-group[open] .nav-submenu {
  display: grid;
  gap: 3px;
}

.main-panel {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  width: calc(100% - var(--sidebar-width));
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.content-wrapper {
  padding: 14px 14px 18px;
  width: 100%;
}

.content-container {
  width: min(var(--content-max), 100%);
  margin: 0 auto;
}

.iecms-breadcrumb-wrapper {
  margin-bottom: 16px;
  animation: breadcrumbFadeIn 0.26s ease-out;
}

.iecms-breadcrumb-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-radius: 16px;
  border: 1px solid #DCE8E1;
  background: linear-gradient(180deg, #FFFFFF 0%, #F7FAF8 100%);
  box-shadow: 0 14px 28px -26px rgba(13, 92, 59, 0.42);
}

.iecms-breadcrumb {
  min-width: 0;
  flex: 1 1 auto;
}

.iecms-breadcrumb ol {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}

.iecms-breadcrumb ol::-webkit-scrollbar {
  height: 6px;
}

.iecms-breadcrumb ol::-webkit-scrollbar-thumb {
  background: rgba(13, 92, 59, 0.18);
  border-radius: 999px;
}

.iecms-breadcrumb-item {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex: 0 0 auto;
}

.iecms-breadcrumb-link,
.iecms-breadcrumb-current {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 240px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}

.iecms-breadcrumb-link {
  color: #0D5C3B;
  font-weight: 600;
}

.iecms-breadcrumb-link:hover {
  background: rgba(13, 92, 59, 0.08);
  text-decoration: none;
}

.iecms-breadcrumb-link:focus-visible {
  outline: 2px solid rgba(13, 92, 59, 0.3);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(13, 92, 59, 0.08);
}

.iecms-breadcrumb-current {
  background: rgba(31, 41, 55, 0.06);
  border: 1px solid rgba(31, 41, 55, 0.08);
  color: #1F2937;
  font-weight: 700;
}

.iecms-breadcrumb-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.iecms-breadcrumb-icon,
.iecms-breadcrumb-separator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
}

.iecms-breadcrumb-icon svg,
.iecms-breadcrumb-separator svg {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  flex: 0 0 auto;
}

.iecms-breadcrumb-icon {
  width: 16px;
  height: 16px;
  color: #0D5C3B;
}

.iecms-breadcrumb-separator {
  width: 16px;
  height: 16px;
  margin: 0 4px;
  color: #C9A227;
}

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

@keyframes breadcrumbFadeIn {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-shell {
  display: grid;
  gap: 18px;
}

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

.page-intro {
  color: var(--text-muted);
  margin: 0;
  max-width: 760px;
  line-height: 1.55;
}

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

.context-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.context-link {
  padding: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f7faf5 0%, #eef4ea 100%);
  border: 1px solid #dfe8d9;
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 10px 20px -18px rgba(13,91,56,0.48);
}

.context-link:hover {
  background: #e9efe5;
}

.page-footer {
  padding: 10px 14px;
  background: #f1f1ec;
  color: #5a655b;
  text-align: center;
  border-top: 1px solid rgba(13,91,56,0.08);
}

.sidebar .logo-title {
  font-size: 0.78rem;
  line-height: 1.15;
  letter-spacing: 0.02em;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: #f7f7f3;
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  position: relative;
  font-weight: 600;
}

.sidebar .nav-link:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.1);
  transform: translateX(2px);
}

.nav-link-icon {
  width: 15px;
  height: 15px;
  color: rgba(244, 201, 109, 0.82);
}

.nav-link-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar .nav-link.active {
  background: #f4c96d;
  color: #123225;
  font-weight: 700;
  border-color: rgba(244,201,109,0.4);
  box-shadow: 0 16px 26px -20px rgba(244,201,109,0.85);
}

.sidebar .nav-link.active .nav-link-icon {
  color: #123225;
}

.sidebar-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: grid;
  gap: 8px;
  margin-right: 4px;
}

.sidebar-footer-card {
  position: relative;
  padding: 8px 10px;
  padding-left: 34px;
  border-radius: 9px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
}

.sidebar-footer-icon {
  position: absolute;
  left: 10px;
  top: 11px;
  width: 15px;
  height: 15px;
  color: rgba(244, 201, 109, 0.84);
}

.sidebar-footer-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.6rem;
  color: rgba(255,255,255,0.62);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-footer-card strong {
  display: block;
  line-height: 1.35;
}

.topbar {
  background: linear-gradient(180deg, rgba(13,91,56,0.97) 0%, rgba(11,77,49,0.97) 100%);
  color: #fff;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(244,201,109,0.16);
  box-shadow: 0 18px 36px -30px rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
}

.topbar-start,
.topbar .topbar-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.topbar-start {
  flex: 0 1 auto;
}

.topbar-brand {
  display: flex;
  gap: 4px;
  align-items: center;
  min-width: 0;
  flex: 0 0 auto;
}

.topbar-back-button {
  font-size: 1rem;
  font-weight: 700;
}

html[dir="rtl"] .topbar-back-button {
  transform: scaleX(-1);
}

.topbar .topbar-actions {
  flex: 1 1 auto;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.topbar-meta-pills {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-language-switcher,
.auth-language-switcher {
  margin: 0;
}

.topbar-language-switcher select,
.auth-language-switcher select {
  width: auto;
  min-height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.12);
  color: #fff;
  padding: 4px 8px;
  margin: 0;
}

.topbar-language-switcher option,
.auth-language-switcher option {
  color: #10281c;
}

.auth-language-switcher select {
  border-color: rgba(13,91,56,0.18);
  background: rgba(255,255,255,0.92);
  color: var(--text-dark);
  box-shadow: 0 12px 28px -22px rgba(16,40,28,0.32);
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.meta-pill-soft {
  color: rgba(255,255,255,0.86);
  background: rgba(255,255,255,0.08);
}

.topbar-search {
  display: flex;
  gap: 4px;
  align-items: center;
  margin: 0;
  padding: 2px;
  border-radius: 9px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  flex: 0 1 320px;
  max-width: 320px;
  min-width: 0;
}

.topbar-search input[type='text'] {
  min-width: 0;
  width: 100%;
  flex: 1 1 auto;
  margin: 0;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #fff;
  box-shadow: none;
}

.topbar-search input[type='text']::placeholder {
  color: rgba(255,255,255,0.72);
}

.topbar-search-btn {
  padding: 5px 10px;
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.16);
  color: #fff;
  flex-shrink: 0;
}

.topbar-search-btn:hover {
  background: rgba(255,255,255,0.18);
}

.topbar-notification {
  position: relative;
  flex: 0 0 auto;
}

.topbar-notification::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  height: 10px;
}

.topbar-icon-link {
  appearance: none;
  color: #fff;
  font-size: 0.92rem;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.topbar-icon-link:hover,
.topbar-icon-link:focus-visible,
.topbar-notification-toggle[aria-expanded="true"] {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.18);
  outline: none;
}

.topbar-notification-feed,
.topbar-notification-feed.card {
  position: fixed;
  top: 0;
  left: 0;
  width: min(420px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  padding: 14px;
  z-index: 40;
}

.topbar-notification-feed[hidden] {
  display: none;
}

.topbar-notification-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.topbar-notification-feed-link {
  color: #1b5e3f;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.topbar-notification-feed-link:hover,
.topbar-notification-feed-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

.topbar-notification-items {
  max-height: 360px;
  overflow-y: auto;
}

.topbar-notification-empty {
  margin: 0;
  color: #5a655b;
}

.topbar-notification-item {
  display: block;
  padding: 12px 0;
  border-top: 1px solid #e3e3df;
  color: inherit;
  text-decoration: none;
}

.topbar-notification-item:first-child {
  padding-top: 2px;
  border-top: 0;
}

.topbar-notification-item:hover,
.topbar-notification-item:focus-visible {
  color: inherit;
  text-decoration: none;
  background: rgba(27,94,63,0.04);
  outline: none;
}

.topbar-notification-message {
  margin-top: 4px;
  color: #5a655b;
}

.topbar-notification-case {
  margin-top: 4px;
  color: #7b8c7f;
  font-size: 0.9rem;
}

.topbar-notification-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #f8b334;
  color: #10281c;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.8rem;
  font-weight: 700;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 2px;
  min-width: 0;
  flex-shrink: 0;
}

.topbar-user-avatar {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(180deg, #f4c96d 0%, #d4ab53 100%);
  color: #123225;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.topbar-user-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
  max-width: 118px;
}

.topbar-user-name {
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-user-role {
  color: rgba(255,255,255,0.72);
  font-size: 0.7rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-logout {
  color: #fff;
  text-decoration: none;
  background: rgba(255,255,255,0.12);
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  white-space: nowrap;
}

.topbar-logout:hover {
  background: rgba(255,255,255,0.18);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 14, 0.45);
  z-index: 9;
  display: none;
  pointer-events: none;
}

.sidebar-overlay.is-visible {
  display: block;
  pointer-events: auto;
}

.topbar button.mobile-menu {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  display: none;
}

.content-wrapper .card {
  margin-bottom: 14px;
}

a:hover {
  color: #083423;
}

button, input, select, textarea {
  font: inherit;
}

.container {
  width: min(1100px, calc(100% - 28px));
  margin: 0 auto;
}

.card {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 20px 50px -34px rgba(16, 40, 28, 0.22);
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 14px;
  right: 14px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(13,91,56,0.18), rgba(194,161,77,0.52), rgba(13,91,56,0.18));
}

.page-title {
  margin: 0 0 10px;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.2;
}

.form-card {
  max-width: 640px;
  margin: 16px auto;
}

.form-card.offense-picker-enabled {
  overflow: visible;
}

body.modal-open {
  overflow: hidden;
}

.modal-backdrop[hidden],
.modal-shell[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 14, 0.45);
  backdrop-filter: blur(2px);
  z-index: 1100;
}

.modal-shell {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1110;
}

.modal-card {
  width: min(100%, 560px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #fdfdf9;
  border: 1px solid rgba(13, 91, 56, 0.18);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(10, 20, 14, 0.22);
  padding: 20px;
}

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

.modal-title {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}

.modal-copy {
  margin: 0;
  color: #5a655b;
}

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text-dark);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.modal-close:hover {
  background: #f1f5f1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

input[type='text'], input[type='email'], input[type='password'], select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 10px;
  margin-bottom: 8px;
  background: #fbfbf8;
  color: var(--text-dark);
}

input[type='date'],
input[type='datetime-local'],
input[type='number'],
input[type='file'] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 10px;
  margin-bottom: 8px;
  background: #fbfbf8;
  color: var(--text-dark);
}

.password-field {
  position: relative;
  margin-bottom: 8px;
}

.password-field .password-toggle-input {
  margin-bottom: 0;
  padding-inline-end: 58px;
}

.password-toggle-button {
  position: absolute;
  top: 50%;
  inset-inline-end: 8px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
}

.password-toggle-button:hover {
  color: var(--primary-dark);
}

.password-toggle-button:focus {
  outline: none;
  border-radius: 6px;
  box-shadow: 0 0 0 3px rgba(13,91,56,0.12);
}

input[type='text']:focus,
input[type='email']:focus,
input[type='password']:focus,
input[type='date']:focus,
input[type='datetime-local']:focus,
input[type='number']:focus,
input[type='file']:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(13,91,56,0.38);
  box-shadow: 0 0 0 4px rgba(13,91,56,0.08);
}

button.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #fff;
  padding: 8px 12px;
  border-radius: 9px;
  cursor: pointer;
}

button.btn-primary:hover {
  background: #0a4a2e;
  border-color: #0a4a2e;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -20px rgba(16,40,28,0.35);
}

.btn-secondary {
  background: #f4f6ef;
  border-color: #d9e0d4;
  color: var(--primary);
}

.btn-secondary:hover {
  background: #e9efe5;
}

.section-title {
  margin: 0 0 14px;
  font-size: 1.2rem;
  font-weight: 700;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.summary-card {
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f8f3 100%);
  border: 1px solid #e4e8df;
  border-radius: 16px;
  min-width: 0;
  overflow: hidden;
}

.summary-card .label {
  color: var(--text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-card .value {
  margin-top: 8px;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
}

.detail-tab {
  padding: 10px 14px;
  border-radius: 999px;
  background: #edf2ea;
  color: var(--primary);
  font-weight: 600;
  border: 1px solid #d8e1d3;
}

.detail-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.meta-item {
  padding: 16px;
  border: 1px solid #e8ece3;
  border-radius: 14px;
  background: #fbfcf9;
}

.meta-item strong {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.table-shell {
  overflow-x: auto;
  margin-top: 16px;
}

.table-shell table {
  width: 100%;
  border-collapse: collapse;
  background: linear-gradient(180deg, #ffffff 0%, #fcfcfa 100%);
  border-radius: 16px;
  overflow: hidden;
}

.table-shell th {
  text-align: left;
  border-bottom: 2px solid #e3e3df;
  padding: 12px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: #f7f8f4;
}

.table-shell td {
  padding: 12px;
  border-bottom: 1px solid #f1f1ec;
  vertical-align: top;
}

.table-shell tr:hover td {
  background: #fafbf8;
}

.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline-list li {
  padding: 14px 0;
  border-bottom: 1px solid #f1f1ec;
}

.timeline-time {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 4px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.communication-entry {
  padding: 18px 0;
}

.communication-entry-header {
  gap: 12px;
}

.communication-entry-route {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.communication-body {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.communication-heading {
  font-weight: 700;
  color: var(--primary);
}

.communication-heading-small {
  font-size: 0.96rem;
}

.communication-line,
.communication-bullet {
  color: var(--text-color);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.communication-bullet {
  padding-left: 16px;
  position: relative;
}

.communication-bullet::before {
  content: '\2022';
  position: absolute;
  left: 0;
  color: var(--primary);
}

.communication-body code {
  font-family: "Courier New", monospace;
  background: rgba(16, 40, 28, 0.06);
  padding: 1px 5px;
  border-radius: 6px;
}

.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.link-button:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  text-decoration: none;
}

.offense-picker-shell {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  cursor: text;
}

.offense-picker-shell:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 91, 56, 0.10);
}

.offense-picker-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.offense-picker-placeholder {
  color: var(--text-muted);
}

.offense-picker-search {
  flex: 1 1 220px;
  min-width: 180px;
  border: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;
}

.offense-picker-search:focus {
  outline: none;
  box-shadow: none;
}

.offense-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #edf5ef;
  color: var(--text-dark);
  border: 1px solid #cfe0d4;
}

.offense-chip-remove {
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
  font: inherit;
  line-height: 1;
}

.offense-picker-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 200;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 30px rgba(16, 40, 28, 0.12);
  max-height: 260px;
  overflow-y: auto;
}

.offense-suggestion-empty {
  cursor: default;
  color: var(--text-muted);
}

.offense-suggestion {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.offense-suggestion:hover,
.offense-suggestion:focus {
  background: #f4f7f2;
}

.offense-suggestion-meta {
  color: var(--text-muted);
  font-size: 0.92em;
}

.empty-state {
  padding: 18px;
  border: 1px dashed #cfdbca;
  border-radius: 14px;
  background: #f9fbf7;
  color: var(--text-muted);
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: center;
}

.badge-primary { background: #1f5f94; color: #fff; }
.badge-info { background: #119f9d; color: #fff; }
.badge-success { background: #237a46; color: #fff; }
.badge-purple { background: #5e3b8b; color: #fff; }
.badge-warning { background: #d08e20; color: #fff; }
.badge-orange { background: #e07a2b; color: #fff; }
.badge-yellow { background: #cbb34c; color: #10281c; }
.badge-indigo { background: #3c4cae; color: #fff; }
.badge-dark { background: #1f362b; color: #fff; }
.badge-darkblue { background: #0f3b61; color: #fff; }
.badge-cyan { background: #1aa1b4; color: #fff; }
.badge-secondary { background: #6b7168; color: #fff; }

.login-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.auth-language-bar {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 12;
}

.login-panel {
  width: 100%;
  max-width: 480px;
  background: rgba(255,255,255,0.95);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.10);
  border: 1px solid rgba(13,91,56,0.08);
}

.login-header {
  padding: 32px 32px 0;
  text-align: center;
}

.workflow-step-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.workflow-step-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faf5 100%);
  border: 1px solid #e0e7dc;
  box-shadow: 0 16px 28px -26px rgba(16,40,28,0.34);
}

.workflow-step-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.workflow-step-card p {
  margin: 0 0 12px;
  color: var(--text-muted);
  line-height: 1.55;
}

.workflow-step-card .action-row a,
.workflow-step-card .action-row button {
  min-height: 40px;
}

.dashboard-stat-grid,
.dashboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.dashboard-stat-card,
.dashboard-summary-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.dashboard-stat-card h2,
.dashboard-summary-card strong {
  margin: 0;
  width: 100%;
  text-align: center;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dashboard-stat-value,
.dashboard-summary-value {
  margin: 10px 0 0;
  font-weight: 700;
  line-height: 1.1;
}

.dashboard-stat-value {
  font-size: 2.2rem;
}

.dashboard-summary-value {
  font-size: 1.6rem;
}

.stage-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.stage-upload-card {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8faf6 0%, #f2f6ef 100%);
  border: 1px solid #dfe7da;
}

.stage-upload-card strong {
  display: block;
  margin-bottom: 6px;
}

.stage-upload-card p {
  margin: 0 0 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

.calendar-agenda {
  display: grid;
  gap: 18px;
}

.calendar-day-card {
  padding: 20px;
  border: 1px solid #dfe6da;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbf7 100%);
}

.calendar-day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.calendar-day-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.calendar-hearing-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.calendar-hearing-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f6f9f4;
  border: 1px solid #e4ebe0;
}

.calendar-hearing-time {
  font-weight: 700;
  color: var(--primary);
}

.calendar-hearing-meta {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 4px;
}

.login-brand {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.login-logo-frame {
  width: 124px;
  height: 124px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  background: linear-gradient(180deg, #fffef9 0%, #f3efde 100%);
  border: 1px solid rgba(194,161,77,0.45);
  border-radius: 30px;
  box-shadow: 0 18px 38px rgba(16,40,28,0.14);
}

.login-logo {
  width: 96px;
  height: auto;
  display: block;
}

.login-kicker {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  font-weight: 700;
}

.login-header h1 {
  margin: 0;
  font-size: 2rem;
  color: var(--primary);
}

.login-header p {
  margin: 12px 0 0;
  color: var(--text-muted);
}

.login-body {
  padding: 32px;
}

.notice-box {
  background: #f4f8f5;
  border-left: 4px solid var(--primary);
  padding: 16px 18px;
  border-radius: 12px;
  margin-bottom: 16px;
  color: #2f4d3b;
}

html[dir='rtl'] body {
  direction: rtl;
}

html[dir='rtl'] .sidebar {
  left: auto;
  right: 0;
  padding: 14px 14px 14px 10px;
  box-shadow: -22px 0 45px -28px rgba(0, 0, 0, 0.38);
}

html[dir='rtl'] .main-panel {
  margin-left: 0;
  margin-right: var(--sidebar-width);
}

html[dir='rtl'] .sidebar-brand {
  padding: 0 4px 14px 0;
}

html[dir='rtl'] .sidebar .nav-link {
  padding-left: 9px;
  padding-right: 9px;
}

html[dir='rtl'] .nav-section-icon {
  margin-right: 0;
  margin-left: 9px;
}

html[dir='rtl'] .sidebar-footer-card {
  padding-left: 10px;
  padding-right: 34px;
}

html[dir='rtl'] .sidebar-footer-icon {
  left: auto;
  right: 10px;
}

html[dir='rtl'] .topbar-user {
  padding-left: 0;
  padding-right: 4px;
}

html[dir='rtl'] .auth-language-bar {
  right: auto;
  left: 18px;
}
