:root {
  color: #101936;
  background: #eef3fb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #101936;
  --muted: #65728c;
  --line: #dfe7f4;
  --surface: #ffffff;
  --blue: #3157e8;
  --purple: #7c4dff;
  --green: #49b96f;
  --orange: #ff7a1a;
  --cyan: #35bfc1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

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

button {
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  min-height: 38px;
  padding: 0 14px;
  background: #eef3fb;
  color: var(--ink);
}

button:hover {
  background: #dce3ea;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

a {
  color: #1f6f8b;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin: 0;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #17202a;
  min-height: 40px;
  padding: 9px 10px;
}

textarea {
  min-height: 94px;
  resize: vertical;
}

label {
  display: grid;
  gap: 7px;
  color: #43505d;
  font-size: 0.9rem;
  font-weight: 700;
}

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

td {
  border-top: 1px solid #e5ebf0;
  padding: 13px 8px;
  vertical-align: middle;
}

td strong,
td small {
  display: block;
}

td small {
  color: #6b7682;
  line-height: 1.45;
  margin-top: 4px;
}

.loginShell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(430px, 40%) minmax(0, 60%);
  background:
    radial-gradient(circle at 92% 8%, rgba(124, 77, 255, 0.12), transparent 18%),
    radial-gradient(circle at 100% 0, rgba(49, 87, 232, 0.11) 0 1px, transparent 1px),
    #f8fbff;
  background-size: auto, 18px 18px, auto;
  overflow: hidden;
}

.loginBrandPane {
  background:
    radial-gradient(circle at 95% 90%, rgba(157, 54, 255, 0.72), transparent 28%),
    radial-gradient(circle at 84% 20%, rgba(58, 105, 255, 0.2), transparent 22%),
    linear-gradient(145deg, #061640 0%, #071d5d 48%, #0b1d67 68%, #6622d6 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(34px, 5vw, 64px);
  position: relative;
}

.loginBrandPane::before {
  color: rgba(255, 255, 255, 0.06);
  content: "⚖";
  font-size: 260px;
  position: absolute;
  right: -42px;
  top: 108px;
}

.loginBrandPane::after {
  border: 1px solid rgba(58, 180, 255, 0.16);
  border-radius: 50%;
  bottom: -150px;
  content: "";
  height: 420px;
  position: absolute;
  right: -120px;
  width: 520px;
}

.loginBrand,
.loginCopy,
.loginBenefits,
.loginSecurity {
  position: relative;
  z-index: 1;
}

.loginBrand {
  align-items: center;
  display: flex;
  gap: 18px;
}

.loginLogoMark,
.loginCardIcon {
  align-items: center;
  background: linear-gradient(135deg, #2467ff, #8b21ff);
  border-radius: 16px;
  box-shadow: 0 18px 36px rgba(59, 76, 255, 0.28);
  color: #fff;
  display: flex;
  height: 74px;
  justify-content: center;
  width: 74px;
}

.loginLogoMark svg {
  height: 44px;
  width: 44px;
}

.loginBrand h1 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 0.95;
}

.loginBrand strong {
  color: #68a7ff;
  display: block;
  font-size: clamp(24px, 2.5vw, 34px);
  letter-spacing: 1px;
}

.loginAccent {
  background: linear-gradient(90deg, #3a76ff, #8b2bff, rgba(255, 255, 255, 0.08));
  border-radius: 999px;
  height: 3px;
  margin: 34px 0 42px;
  position: relative;
  width: 190px;
  z-index: 1;
}

.loginCopy {
  max-width: 420px;
}

.loginCopy h2 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.16;
}

.loginCopy h2 span {
  color: #72abff;
  display: block;
}

.loginCopy p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.55;
  margin-top: 26px;
}

.loginBenefits {
  display: grid;
  gap: 22px;
  margin-top: 44px;
}

.loginBenefits article {
  align-items: center;
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 18px;
  transition: transform 0.18s ease;
}

.loginBenefits article:hover,
.loginInfoCard:hover {
  transform: translateY(-2px);
}

.loginBenefits span {
  align-items: center;
  background: linear-gradient(135deg, #2467ff, #8327dc);
  border-radius: 14px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
  color: #fff;
  display: flex;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.loginBenefits svg,
.loginSecurity svg,
.loginInfoCard svg,
.loginInputIcon svg,
.loginCardIcon svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.loginBenefits svg {
  height: 30px;
  width: 30px;
}

.loginBenefits p {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.5;
}

.loginBenefits strong {
  color: #fff;
  display: block;
  font-size: 17px;
  margin-bottom: 4px;
}

.loginSecurity {
  align-items: center;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 18px;
  margin-top: auto;
  padding-top: 44px;
}

.loginSecurity span {
  color: #5ea1ff;
}

.loginSecurity svg {
  height: 64px;
  width: 64px;
}

.loginSecurity p {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.55;
}

.loginSecurity strong {
  color: #fff;
}

.loginAccessPane {
  align-content: center;
  display: grid;
  gap: 24px;
  justify-items: center;
  min-height: 100vh;
  padding: 44px clamp(28px, 6vw, 90px);
}

.loginPanel {
  display: none;
}

.loginCard {
  border: 1px solid #dfe7f4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(25, 39, 82, 0.1);
  display: grid;
  gap: 20px;
  justify-items: stretch;
  max-width: 680px;
  padding: clamp(34px, 4vw, 56px);
  width: 100%;
}

.loginCardIcon {
  background: transparent;
  box-shadow: none;
  color: #6427ec;
  height: 54px;
  justify-self: center;
  width: 54px;
}

.loginCardIcon svg {
  height: 44px;
  width: 44px;
}

.loginCard h2 {
  color: #0d1b44;
  font-size: 30px;
  text-align: center;
}

.loginCard > p {
  color: #627090;
  font-size: 17px;
  margin-bottom: 14px;
  text-align: center;
}

.loginCard label {
  color: #101936;
  font-weight: 900;
}

.loginInputIcon {
  align-items: center;
  border: 1px solid #d8e1f0;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  min-height: 54px;
  padding: 0 12px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.loginInputIcon:focus-within {
  border-color: #7c4dff;
  box-shadow: 0 0 0 4px rgba(124, 77, 255, 0.1);
}

.loginInputIcon svg {
  color: #6d7da3;
  height: 22px;
  width: 22px;
}

.loginInputIcon input {
  border: 0;
  box-shadow: none;
  min-height: 50px;
  padding: 0;
}

.loginInputIcon button {
  background: transparent;
  color: #6d7da3;
  min-height: 36px;
  padding: 0;
  width: 36px;
}

.loginOptions {
  align-items: start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.remember {
  align-items: center;
  display: flex;
  flex-direction: row;
  font-weight: 500 !important;
  gap: 9px;
}

.remember input {
  accent-color: #6427ec;
  min-height: 18px;
  width: 18px;
}

.loginOptions a {
  color: #6427ec;
  display: block;
  text-align: right;
}

.loginOptions small {
  color: #627090;
  display: block;
  margin-top: 6px;
}

.loginSubmit {
  align-items: center;
  background: linear-gradient(135deg, #245dff, #8c16f4);
  border-radius: 10px;
  box-shadow: 0 16px 30px rgba(91, 60, 239, 0.26);
  color: #fff;
  display: flex;
  font-size: 17px;
  font-weight: 900;
  justify-content: center;
  min-height: 58px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.loginSubmit:hover {
  background: linear-gradient(135deg, #1d4fff, #7c12e4);
  box-shadow: 0 20px 38px rgba(91, 60, 239, 0.34);
  transform: translateY(-1px);
}

.loginSubmit span {
  font-size: 28px;
  margin-left: 18px;
}

.loginInfoCard {
  align-items: center;
  border: 1px solid #cfe0ff;
  border-radius: 14px;
  display: grid;
  gap: 18px;
  grid-template-columns: 58px 1fr auto;
  max-width: 680px;
  padding: 22px 26px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  width: 100%;
}

.loginInfoCard.blue {
  background: #eff7ff;
}

.loginInfoCard.violet {
  background: #f7efff;
  border-color: #dfc9ff;
}

.loginInfoCard > span {
  align-items: center;
  border-radius: 50%;
  color: #2467ff;
  display: flex;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.loginInfoCard.blue > span {
  background: #d7ecff;
}

.loginInfoCard.violet > span {
  background: #ead9ff;
  color: #7c25df;
}

.loginInfoCard svg {
  height: 28px;
  width: 28px;
}

.loginInfoCard strong {
  color: #0d1b44;
  display: block;
  margin-bottom: 5px;
}

.loginInfoCard p {
  color: #314060;
  line-height: 1.45;
}

.requestAccess {
  border: 1px solid #8b35ff;
  border-radius: 9px;
  color: #6d21e6;
  padding: 12px 20px;
  text-decoration: none;
  white-space: nowrap;
}

.loginFooter {
  color: #61708f;
  display: grid;
  gap: 6px;
  justify-items: center;
  margin-top: 2px;
  text-align: center;
}

.stack,
.view,
.editor {
  display: grid;
  gap: 15px;
}

.appShell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  background: #f7faff;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 18px 12px;
  background: linear-gradient(180deg, #081a3b 0%, #061228 100%);
  color: #f8fafc;
  box-shadow: 18px 0 45px rgba(9, 24, 54, 0.18);
  overflow: hidden;
}

.sidebarTop {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
  min-height: 86px;
}

.brandMark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffd15c;
  font-size: 1.25rem;
}

.sidebar h1 {
  margin-top: 2px;
  font-size: 1.25rem;
  line-height: 1.1;
}

.sidebar small {
  color: #b9c8e6;
  display: block;
  line-height: 1.35;
  margin-top: 6px;
}

.sidebarNav {
  display: grid;
  align-content: start;
  gap: 6px;
  overflow-y: auto;
  padding: 2px 2px 8px;
  min-height: 0;
  scrollbar-width: thin;
}

.sidebarBottom {
  display: grid;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
}

.nav,
.ghost {
  text-align: left;
  background: transparent;
  color: inherit;
}

.nav {
  border: 1px solid transparent;
  border-radius: 10px;
  display: flex;
  align-items: center;
  font-weight: 750;
  min-height: 40px;
  padding: 9px 10px;
  font-size: 0.93rem;
  gap: 9px;
}

.nav span {
  display: inline-grid;
  place-items: center;
  width: 20px;
  color: #d7e3ff;
}

.nav:hover,
.nav.active {
  background: linear-gradient(135deg, #284de0, #6041d8);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 30px rgba(49, 87, 232, 0.28);
}

.ghost {
  border: 1px solid #365063;
  min-height: 40px;
  text-align: center;
}

.content {
  padding: 24px 28px;
  min-width: 0;
}

.dashboardPro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: start;
}

.dashboardFocused {
  max-width: 100%;
}

.mainDashboard {
  display: grid;
  gap: 18px;
}

.heroHeader {
  display: flex;
  align-items: center;
  gap: 14px;
}

.heroHeader h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.heroHeader p {
  color: var(--muted);
  margin-top: 4px;
}

.sunMark {
  font-size: 2.3rem;
  color: #ffbd2f;
}

.kpiGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 14px;
}

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

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

.view {
  gap: 22px;
}

.eyebrow {
  color: #1f6f8b;
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar .eyebrow {
  color: #8bc4d6;
}

.statsGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
}

.stat,
.editor,
.tablePanel,
.panelBand {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 40px rgba(35, 50, 91, 0.07);
}

.stat {
  display: grid;
  gap: 8px;
  padding: 16px;
  min-height: 112px;
}

.uiIcon {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

.uiIcon svg {
  fill: none;
  height: 24px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 24px;
}

.stat .uiIcon {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  border-radius: 13px;
  box-shadow: 0 12px 22px rgba(72, 91, 220, 0.24);
  color: #fff;
  height: 40px;
  width: 40px;
}

.stat span {
  color: #5d6875;
  font-weight: 700;
}

.stat strong {
  font-size: 2.25rem;
}

.panelBand,
.editor,
.tablePanel {
  padding: 18px;
}

.apiList,
.row,
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.apiList {
  flex-wrap: wrap;
  margin-top: 14px;
}

code {
  border-radius: 7px;
  background: #eef3f6;
  color: #1a5165;
  padding: 8px 10px;
}

.twoColumn {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  align-items: start;
}

.twoColumn.wide {
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
}

.viewHeader,
.detailHeader,
.caseTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.casesPanel {
  min-width: 0;
}

.caseGrid,
.clientGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.caseCard,
.clientCard {
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.caseCard h3,
.clientCard h3 {
  font-size: 1.1rem;
}

.caseCard p,
.clientCard p,
.muted {
  color: #5d6875;
  line-height: 1.5;
}

.caseTop span {
  border-radius: 999px;
  background: #eef3f6;
  color: #1f6f8b;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 5px 8px;
}

dl {
  margin: 0;
}

.caseCard dl,
.clientCard dl,
.infoGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.miniCards {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

dt {
  color: #6b7682;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 3px 0 0;
  color: #17202a;
  overflow-wrap: anywhere;
}

.emptyState {
  border: 1px dashed #cfd8e3;
  border-radius: 8px;
  color: #6b7682;
  padding: 18px;
  background: #fff;
}

.detailHeader {
  align-items: flex-start;
  border-bottom: 1px solid #dbe3ea;
  padding-bottom: 18px;
}

.detailGrid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.timelinePanel {
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.timeline {
  display: grid;
  gap: 0;
  margin-top: 16px;
}

.timelineItem {
  position: relative;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 0 0 20px;
}

.timelineItem::before {
  content: "";
  position: absolute;
  left: 138px;
  top: 8px;
  bottom: -8px;
  width: 2px;
  background: #dbe3ea;
}

.timelineItem::after {
  content: "";
  position: absolute;
  left: 132px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1f6f8b;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px #1f6f8b;
}

.timelineItem time {
  color: #1f6f8b;
  font-weight: 900;
}

.timelineItem > div {
  border: 1px solid #e5ebf0;
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.timelineItem h4 {
  margin: 0 0 7px;
}

.timelineItem small {
  color: #6b7682;
  display: block;
  margin: 8px 0;
}

.privateNote {
  border-left: 3px solid #ad4f39;
  background: #f8e9e5;
  color: #7f2d1e;
  padding: 10px;
}

.sideStack {
  display: grid;
  gap: 18px;
}

.agendaLayout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.segmented {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.segmented button {
  border: 1px solid #dbe3ea;
  background: #fff;
}

.segmented button.active {
  background: #1f6f8b;
  color: #fff;
}

.todayGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.todayGrid div {
  border: 1px solid #e5ebf0;
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.todayGrid strong,
.todayGrid span {
  display: block;
}

.todayGrid strong {
  font-size: 1.55rem;
}

.todayGrid span {
  color: #5d6875;
  font-weight: 700;
}

.calendarList {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.calendarItem {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  border: 1px solid #e5ebf0;
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.calendarItem time {
  color: #1f6f8b;
  font-weight: 900;
}

.eventBadge {
  display: inline-flex;
  border-radius: 999px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 4px 8px;
}

.eventBadge.rojo {
  background: #b93d30;
}

.eventBadge.azul {
  background: #1f6f8b;
}

.eventBadge.naranja {
  background: #c66a1d;
}

.eventBadge.verde {
  background: #2b7a4b;
}

.eventBadge.morado {
  background: #7049a8;
}

.eventBadge.turquesa {
  background: #0f8f8f;
}

.compact {
  gap: 10px;
}

.miniList {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.miniList p {
  border-top: 1px solid #e5ebf0;
  color: #5d6875;
  padding-top: 10px;
}

.tablePanel {
  min-width: 0;
  overflow-x: auto;
}

.tablePanel h2 {
  margin-bottom: 10px;
  font-size: 1.35rem;
}

.actions {
  justify-content: flex-end;
  min-width: 150px;
}

.primary {
  background: linear-gradient(135deg, #3157e8, #7c4dff);
  color: #fff;
  font-weight: 800;
}

.primary:hover {
  background: linear-gradient(135deg, #294bd0, #693fe8);
}

.realDonut {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 24px;
  align-items: center;
  min-height: 220px;
}

.realDonut > div {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  position: relative;
}

.realDonut > div::after {
  content: "";
  position: absolute;
  inset: 46px;
  border-radius: 50%;
  background: #fff;
}

.realDonut ul,
.planCard ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
  color: var(--muted);
}

.realDonut li {
  align-items: center;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
}

.realDonut li span {
  border-radius: 50%;
  height: 10px;
  width: 10px;
}

.realDonut li small {
  color: #667085;
  grid-column: 2 / -1;
}

.realBars {
  height: 220px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  align-items: end;
  padding-top: 20px;
}

.realBars div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  align-items: end;
}

.realBars span,
.realBars b {
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #8a5cff, #6846e8);
}

.realBars b {
  background: linear-gradient(180deg, #65a8ff, #3e82f5);
}

.realBars small {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
}

.quickActions {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
}

.quickActions button {
  min-height: 68px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 800;
}

.subscriptionRail {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 24px;
}

.compactRail {
  align-self: start;
}

.planCurrent,
.plansMini,
.planCard {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 16px 40px rgba(35, 50, 91, 0.07);
}

.planHero {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  border-radius: 14px;
  padding: 18px;
  color: #fff;
  background: linear-gradient(135deg, #3157e8, #9b49ff);
}

.compactPlan {
  padding: 16px;
}

.compactPlan .planHero {
  padding: 14px;
}

.compactPlan button {
  width: 100%;
  margin-top: 12px;
}

.subscriptionPage {
  max-width: 1180px;
}

.subscriptionPage .plansMini {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.marketSearch {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 16px;
  display: grid;
  gap: 12px;
  box-shadow: 0 16px 40px rgba(35, 50, 91, 0.07);
}

.categoryChips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.categoryChips button {
  white-space: nowrap;
  border: 1px solid var(--line);
  background: #f7faff;
}

.marketGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.marketCard {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 16px;
  display: grid;
  gap: 12px;
  box-shadow: 0 12px 30px rgba(35, 50, 91, 0.06);
}

.docIcon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #3157e8, #7c4dff);
}

.marketCard h3 {
  margin: 0;
}

.marketCard p {
  color: var(--muted);
  line-height: 1.45;
}

.adminLibrary,
.paymentGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 16px;
}

.libraryPremium {
  gap: 16px;
}

.libraryHero {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(340px, 560px);
  gap: 24px;
  align-items: center;
}

.libraryHero h2 {
  margin: 4px 0 8px;
  font-size: 30px;
}

.libraryHero p {
  color: var(--textSoft);
  line-height: 1.55;
  margin: 0;
  max-width: 760px;
}

.librarySearchBox {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 14px 35px rgba(35, 50, 91, 0.08);
  display: grid;
  grid-template-columns: 26px 1fr 28px;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 14px;
}

.librarySearchBox input {
  border: 0;
  min-height: auto;
  padding: 0;
}

.librarySearchBox input:focus {
  box-shadow: none;
}

.librarySearchBox kbd {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  padding: 2px 7px;
}

.libraryLockNotice {
  align-items: center;
  background: #fff8e6;
  border: 1px solid #ffe1a2;
  border-radius: 10px;
  color: #7a4b00;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  padding: 12px 14px;
}

.libraryMetrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 14px;
}

.libraryMetric {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(35, 50, 91, 0.06);
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  min-height: 108px;
  padding: 16px;
}

.libraryMetric span {
  align-items: center;
  border-radius: 10px;
  display: grid;
  font-size: 26px;
  height: 56px;
  justify-content: center;
}

.libraryMetric strong {
  color: #18214d;
  display: block;
  font-size: 24px;
  line-height: 1.1;
}

.libraryMetric p {
  color: var(--textSoft);
  font-size: 13px;
  line-height: 1.35;
  margin: 5px 0 0;
}

.libraryMetric.violet span,
.docIcon.violet {
  background: #eee8ff;
  color: #6439f5;
}

.libraryMetric.green span,
.docIcon.green,
.formatBadge.green {
  background: #e6f8ef;
  color: #00a85a;
}

.libraryMetric.orange span,
.docIcon.orange {
  background: #fff1df;
  color: #f97316;
}

.libraryMetric.blue span,
.docIcon.blue,
.formatBadge.blue {
  background: #e9f3ff;
  color: #2563eb;
}

.libraryMetric.cyan span,
.docIcon.cyan {
  background: #e8fbff;
  color: #0891b2;
}

.formatBadge.red,
.docIcon.red {
  background: #fee2e2;
  color: #dc2626;
}

.formatBadge.gold,
.docIcon.gold {
  background: #fff3d6;
  color: #c47a00;
}

.formatBadge.violet {
  background: #eee8ff;
  color: #6439f5;
}

.libraryCategories {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(35, 50, 91, 0.08);
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 16px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.libraryCategories::-webkit-scrollbar {
  display: none;
}

.libraryCategories button {
  align-items: center;
  background: #fff;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(35, 50, 91, 0.08);
  color: #24304f;
  display: grid;
  flex: 0 0 120px;
  gap: 10px;
  grid-template-rows: 32px 1fr;
  height: 90px;
  justify-items: center;
  line-height: 1.18;
  min-width: 120px;
  padding: 16px;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  white-space: normal;
  word-break: normal;
}

.libraryCategories button span {
  align-items: center;
  color: #2563eb;
  display: grid;
  font-size: 24px;
  height: 32px;
  justify-content: center;
  line-height: 1;
  width: 32px;
}

.libraryCategories button:hover {
  box-shadow: 0 18px 38px rgba(35, 50, 91, 0.16);
  transform: translateY(-3px);
}

.libraryCategories button.active {
  background: linear-gradient(135deg, #2563eb, #6d4aff);
  box-shadow: 0 18px 42px rgba(86, 56, 230, 0.3);
  color: #fff;
}

.libraryCategories button.active span {
  color: #fff;
}

.libraryDark {
  background: radial-gradient(circle at top left, #2c115e, #07152d 68%);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(4, 15, 37, 0.2);
  color: #fff;
  padding: 18px;
}

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

.librarySectionTitle h3 {
  font-size: 16px;
  margin: 0;
}

.librarySectionTitle button,
.librarySectionTitle span {
  background: transparent;
  border: 0;
  color: #5434d8;
  font-weight: 800;
}

.libraryDark .librarySectionTitle button,
.libraryDark .librarySectionTitle h3 {
  color: #fff;
}

.featuredShelf {
  display: grid;
  grid-template-columns: repeat(5, minmax(190px, 1fr));
  gap: 14px;
}

.libraryMainGrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 16px;
}

.libraryPanel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(35, 50, 91, 0.06);
  padding: 16px;
}

.libraryCardGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.librarySide {
  display: grid;
  gap: 14px;
  align-content: start;
}

.premiumDocCard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 12px;
  min-height: 260px;
  padding: 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.premiumDocCard:hover {
  box-shadow: 0 18px 40px rgba(35, 50, 91, 0.13);
  transform: translateY(-2px);
}

.premiumDocCard.dark {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.premiumDocCard.compact {
  min-height: 232px;
}

.docCardTop,
.docMeta,
.docActions {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.docCardTop button,
.favoriteItem button {
  background: transparent;
  border: 0;
  color: #f4b400;
  padding: 4px;
}

.formatBadge {
  border-radius: 6px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  padding: 5px 8px;
}

.premiumDocCard .docIcon {
  align-items: center;
  border-radius: 12px;
  display: grid;
  font-size: 34px;
  height: 66px;
  justify-content: center;
  justify-self: center;
  width: 66px;
}

.premiumDocCard h3 {
  font-size: 17px;
  line-height: 1.3;
  margin: 0;
  min-height: 44px;
}

.premiumDocCard p {
  color: var(--textSoft);
  line-height: 1.35;
  margin: 0;
}

.premiumDocCard.dark p,
.premiumDocCard.dark .docMeta {
  color: rgba(255, 255, 255, 0.72);
}

.docMeta {
  color: var(--muted);
  font-size: 13px;
}

.docActions button:first-child {
  flex: 1;
}

.iconOnly {
  min-width: 46px;
}

.favoriteList {
  display: grid;
  gap: 8px;
}

.favoriteItem {
  align-items: center;
  border-bottom: 1px solid #edf1f7;
  display: grid;
  grid-template-columns: 38px 1fr 26px;
  gap: 10px;
  padding: 8px 0;
}

.favoriteItem h4 {
  font-size: 14px;
  margin: 0 0 4px;
}

.favoriteItem p,
.requestDoc p,
.libraryBenefits span {
  color: var(--textSoft);
  font-size: 13px;
  margin: 0;
}

.requestDoc {
  align-items: center;
  background: linear-gradient(135deg, #f8f6ff, #fff);
  border: 1px solid #d9d1ff;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 14px;
  padding: 18px;
}

.requestDoc h3 {
  margin: 0 0 5px;
}

.requestDoc button {
  margin-top: 10px;
}

.libraryBenefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 12px;
}

.libraryBenefits div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(35, 50, 91, 0.05);
  display: grid;
  gap: 5px;
  padding: 14px;
}

.miniEmpty {
  color: var(--muted);
  font-weight: 700;
  padding: 14px 0;
}

.libraryAdminPanel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(35, 50, 91, 0.06);
  padding: 16px;
}

.libraryAdminPanel .librarySectionTitle {
  grid-column: 1 / -1;
}

.libraryAdminLists {
  display: grid;
  gap: 12px;
}

.adminMiniList {
  display: grid;
  gap: 10px;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}

.adminMiniList article {
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.adminMiniList article p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 4px 0 0;
}

.buttonLike {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #5434d8;
  display: inline-flex;
  font-weight: 800;
  min-height: 38px;
  padding: 8px 12px;
  text-decoration: none;
}

.premiumModule {
  gap: 16px;
}

.moduleHero {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(420px, 680px);
  gap: 18px;
}

.moduleHero h2 {
  font-size: 30px;
  margin: 4px 0 6px;
}

.moduleHero p {
  color: var(--textSoft);
  margin: 0;
}

.moduleActions,
.agendaTopActions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.moduleSearch {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(35, 50, 91, 0.06);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  min-width: 360px;
  padding: 0 14px;
}

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

.moduleSearch input {
  border: 0;
  min-height: 48px;
  padding: 0;
}

.moduleSearch input:focus {
  box-shadow: none;
}

.moduleKpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.moduleKpi {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(35, 50, 91, 0.06);
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  min-height: 96px;
  padding: 15px;
}

.moduleKpi > span {
  align-items: center;
  border-radius: 12px;
  color: #5638e6;
  display: flex;
  height: 54px;
  justify-content: center;
}

.moduleKpi.violet > span {
  background: #eee8ff;
  color: #5638e6;
}

.moduleKpi.green > span {
  background: #e6f8ef;
  color: #16a34a;
}

.moduleKpi.orange > span {
  background: #fff1df;
  color: #f97316;
}

.moduleKpi.cyan > span {
  background: #e8fbff;
  color: #0891b2;
}

.moduleKpi.blue > span {
  background: #e9f3ff;
  color: #2563eb;
}

.moduleKpi.red > span {
  background: #fee2e2;
  color: #ef4444;
}

.moduleKpi strong {
  color: #142044;
  display: block;
  font-size: 25px;
}

.moduleKpi p {
  color: var(--textSoft);
  font-size: 13px;
  font-weight: 800;
  margin: 0;
}

.moduleKpi small {
  color: #5638e6;
  font-weight: 800;
}

.moduleGrid {
  display: grid;
  gap: 14px;
}

.moduleGrid.withDetail {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.processGrid {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.dataPanel,
.detailRail,
.activityPanel,
.calendarBoard,
.agendaRail > div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(35, 50, 91, 0.06);
}

.dataPanel {
  overflow: hidden;
}

.moduleTabs {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  padding: 12px;
}

.moduleTabs .right {
  margin-left: auto;
}

.moduleTabs button,
.moduleTabs select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #1d2a4d;
  min-height: 38px;
}

.moduleTabs button.active {
  background: #f0edff;
  color: #5638e6;
}

.premiumTable {
  display: grid;
}

.tableHead,
.tableRow {
  align-items: center;
  display: grid;
  gap: 10px;
  padding: 12px 14px;
}

.clientTable .tableHead,
.clientTable .tableRow {
  grid-template-columns: 1.6fr 0.8fr 0.8fr 1.2fr 0.7fr 0.8fr 0.9fr 0.9fr;
}

.caseTable .tableHead,
.caseTable .tableRow {
  grid-template-columns: 0.85fr 1.5fr 1.1fr 0.75fr 0.75fr 0.9fr 1fr;
}

.tableHead {
  background: #f8faff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.tableRow {
  border-top: 1px solid #eef2f7;
  cursor: pointer;
  min-height: 58px;
  transition: background 0.16s ease, transform 0.16s ease;
}

.tableRow:hover,
.tableRow.selected {
  background: #f8f7ff;
}

.tableRow strong,
.tableRow small {
  display: block;
}

.tableRow small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.tableRow a {
  color: #5638e6;
  font-weight: 900;
}

.rowActions {
  display: flex;
  gap: 6px;
}

.rowActions button {
  min-height: 34px;
  padding: 6px 9px;
}

.statusPill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  padding: 4px 8px;
}

.statusPill.green {
  background: #dcfce7;
  color: #168044;
}

.statusPill.orange {
  background: #ffedd5;
  color: #c05600;
}

.statusPill.red {
  background: #fee2e2;
  color: #b91c1c;
}

.statusPill.gray {
  background: #eef2f7;
  color: #64748b;
}

.statusPill.blue {
  background: #e0efff;
  color: #2563eb;
}

.tableFooter {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  padding: 12px 14px;
}

.detailRail {
  align-content: start;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.profileMini {
  align-items: center;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
}

.avatarCircle {
  align-items: center;
  background: linear-gradient(135deg, #6d4aff, #2858ff);
  border-radius: 50%;
  color: #fff;
  display: grid;
  font-weight: 900;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.miniStats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.miniStats div {
  background: #f8faff;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}

.miniStats strong,
.miniStats span {
  display: block;
}

.miniStats span {
  color: var(--muted);
  font-size: 12px;
}

.detailList {
  display: grid;
  gap: 8px;
}

.detailList div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px;
}

.detailList dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.detailList dd {
  margin: 0;
}

.activityPanel {
  padding: 16px;
}

.activityPanel h3 {
  margin: 0 0 12px;
}

.activityLine {
  display: grid;
  gap: 10px;
}

.activityLine article {
  align-items: start;
  display: grid;
  grid-template-columns: 120px 14px 1fr;
  gap: 10px;
}

.activityLine span {
  background: #5638e6;
  border-radius: 50%;
  height: 10px;
  margin-top: 4px;
  width: 10px;
}

.activityLine time,
.activityLine small {
  color: var(--muted);
  font-size: 12px;
}

.activityLine p {
  margin: 0;
}

.modalBackdrop {
  align-items: center;
  background: rgba(7, 18, 42, 0.45);
  display: grid;
  inset: 0;
  justify-items: center;
  padding: 24px;
  position: fixed;
  z-index: 20;
}

.modalCard {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(7, 18, 42, 0.28);
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 48px);
  max-width: 620px;
  overflow: auto;
  padding: 18px;
  width: min(100%, 620px);
}

.wideModal {
  max-width: 980px;
  width: min(100%, 980px);
}

.modalHead,
.modalActions,
.railTop {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.modalHead h2 {
  margin: 0;
}

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

.formGrid.single {
  grid-template-columns: 1fr;
}

.formGrid .span2 {
  grid-column: 1 / -1;
}

.formGrid .full {
  grid-column: 1 / -1;
}

.progressBlock {
  display: grid;
  gap: 8px;
}

.progressBlock div {
  display: flex;
  justify-content: space-between;
}

.progressBlock i {
  background: #edf1f7;
  border-radius: 999px;
  display: block;
  height: 8px;
  overflow: hidden;
}

.progressBlock b {
  background: linear-gradient(90deg, #2858ff, #6d4aff);
  display: block;
  height: 100%;
}

.upcomingPanel {
  border-top: 1px solid var(--line);
  padding: 14px;
}

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

.hearingCards article {
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  padding: 12px;
}

.hearingCards time {
  background: #f0edff;
  border-radius: 8px;
  color: #5638e6;
  display: grid;
  font-size: 22px;
  font-weight: 900;
  justify-items: center;
  padding: 8px 0;
}

.hearingCards time small {
  font-size: 11px;
}

.smartAgendaLayout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
}

.agendaWorkspace {
  align-items: start;
  display: grid;
  grid-template-columns: minmax(560px, 1fr) minmax(330px, 420px);
  gap: 16px;
}

.agendaMonthPanel {
  min-height: 620px;
}

.agendaMonthGrid {
  display: grid;
  grid-template-columns: repeat(7, minmax(76px, 1fr));
  gap: 10px;
  padding: 16px;
}

.monthWeekday {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.monthDay {
  align-content: space-between;
  background: #fff;
  border: 1px solid #e8edf5;
  border-radius: 14px;
  color: #142044;
  display: grid;
  gap: 8px;
  min-height: 92px;
  padding: 11px;
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.monthDay:hover {
  border-color: #b9c5ff;
  box-shadow: 0 14px 28px rgba(35, 50, 91, 0.1);
  transform: translateY(-2px);
}

.monthDay.selected {
  background: linear-gradient(135deg, #f7f4ff, #eef6ff);
  border-color: #6d4aff;
  box-shadow: 0 18px 38px rgba(86, 56, 230, 0.16);
}

.monthDay > span {
  font-size: 18px;
  font-weight: 900;
}

.monthDay small {
  color: #5638e6;
  font-size: 11px;
  font-weight: 900;
}

.eventDots {
  align-items: center;
  display: flex;
  gap: 4px;
  min-height: 10px;
}

.eventDots b {
  border-radius: 50%;
  display: block;
  height: 8px;
  width: 8px;
}

.eventDots .red {
  background: #ef4444;
}

.eventDots .blue {
  background: #2563eb;
}

.eventDots .orange {
  background: #f97316;
}

.eventDots .green {
  background: #22c55e;
}

.eventDots .violet {
  background: #6d4aff;
}

.agendaDayPanel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(35, 50, 91, 0.06);
  display: grid;
  gap: 14px;
  padding: 16px;
}

.dayPanelHead {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
}

.dayPanelHead h3,
.dayPanelHead p {
  margin: 0;
}

.dayPanelHead span {
  color: var(--textSoft);
  font-size: 13px;
  font-weight: 800;
}

.dayEventList {
  display: grid;
  gap: 12px;
}

.agendaEventCard {
  border: 1px solid #edf1f7;
  border-left: 4px solid #6d4aff;
  border-radius: 12px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.agendaEventCard.red {
  border-left-color: #ef4444;
}

.agendaEventCard.blue {
  border-left-color: #2563eb;
}

.agendaEventCard.orange {
  border-left-color: #f97316;
}

.agendaEventCard.green {
  border-left-color: #22c55e;
}

.agendaEventCard header,
.agendaEventCard footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.agendaEventCard header span {
  color: #5638e6;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.agendaEventCard header b {
  background: #f3f5fb;
  border-radius: 999px;
  color: #344054;
  font-size: 11px;
  padding: 5px 9px;
}

.agendaEventCard h3 {
  font-size: 16px;
  margin: 0;
}

.agendaEventCard dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.agendaEventCard dl div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
}

.agendaEventCard dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.agendaEventCard dd {
  margin: 0;
}

.agendaEventCard footer {
  justify-content: flex-start;
}

.agendaEventCard footer button {
  min-height: 34px;
  padding: 0 10px;
}

.calendarBoard {
  overflow: hidden;
}

.calendarToolbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  padding: 12px;
}

.calendarToolbar strong {
  margin-left: 8px;
}

.weekCalendar {
  min-width: 820px;
}

.weekHead,
.weekRow {
  display: grid;
  grid-template-columns: 70px repeat(7, 1fr);
}

.weekHead strong {
  background: #f8faff;
  border-left: 1px solid var(--line);
  color: #24304f;
  padding: 12px;
  text-align: center;
}

.weekRow time,
.calendarCell {
  border-top: 1px solid #edf1f7;
  min-height: 70px;
}

.weekRow time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  padding: 10px;
}

.calendarCell {
  border-left: 1px solid #edf1f7;
  padding: 6px;
}

.calendarEvent {
  border-left: 3px solid #5638e6;
  border-radius: 6px;
  display: grid;
  gap: 3px;
  padding: 7px;
}

.calendarEvent.red,
.dayEvents article.red,
.agendaListPremium article.red {
  background: #fee2e2;
  border-color: #ef4444;
}

.calendarEvent.blue,
.dayEvents article.blue,
.agendaListPremium article.blue {
  background: #e9f3ff;
  border-color: #2563eb;
}

.calendarEvent.orange,
.dayEvents article.orange,
.agendaListPremium article.orange {
  background: #ffedd5;
  border-color: #f97316;
}

.calendarEvent.green,
.dayEvents article.green,
.agendaListPremium article.green {
  background: #e6f8ef;
  border-color: #22c55e;
}

.calendarEvent.violet,
.dayEvents article.violet,
.agendaListPremium article.violet {
  background: #eee8ff;
  border-color: #6d4aff;
}

.calendarEvent strong,
.calendarEvent small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agendaRail {
  display: grid;
  gap: 14px;
  align-content: start;
}

.miniCalendar,
.dayEvents {
  padding: 14px;
}

.miniCalendar > div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.miniCalendar section {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.miniCalendar span {
  border-radius: 50%;
  display: grid;
  height: 30px;
  place-items: center;
}

.miniCalendar span.active {
  background: #5638e6;
  color: #fff;
}

.dayEvents {
  display: grid;
  gap: 10px;
}

.dayEvents h3 {
  margin: 0;
}

.dayEvents article,
.agendaListPremium article {
  border-left: 3px solid;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  padding: 10px;
}

.dayEvents time,
.agendaListPremium time {
  color: #5638e6;
  font-weight: 900;
}

.agendaListPremium {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.supportModule,
.reportsCenter {
  gap: 16px;
}

.supportGrid {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(520px, 1.35fr) 300px;
  gap: 16px;
  align-items: start;
}

.supportList {
  padding: 16px;
}

.supportListHead {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.supportListHead h3 {
  margin: 0;
}

.ticketTable .tableHead,
.ticketTable .tableRow {
  grid-template-columns: 0.75fr 0.9fr 1fr 1.4fr 0.9fr 1fr;
  min-width: 760px;
}

.tagPill {
  background: #eef2ff;
  border-radius: 999px;
  color: #4f46e5;
  display: inline-flex;
  font-size: 11px;
  padding: 4px 8px;
}

.ticketConversation,
.ticketSide {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(35, 50, 91, 0.06);
}

.ticketHeader {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
}

.ticketHeader h2 {
  margin: 0 0 6px;
}

.chatThread {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.chatThread article {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
}

.chatThread article > span {
  align-items: center;
  background: #5b3ff2;
  border-radius: 50%;
  color: #fff;
  display: grid;
  font-weight: 900;
  height: 42px;
  justify-content: center;
}

.chatThread .support > span {
  background: #2563eb;
}

.chatThread article > div {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.chatThread small {
  color: var(--muted);
  margin-left: 8px;
}

.replyBox {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding: 16px;
}

.ticketSide {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.reportCards {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 14px;
}

.reportCard,
.indicatorPanel,
.reportDetail,
.pdfPreview {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(35, 50, 91, 0.06);
}

.reportCard {
  display: grid;
  gap: 10px;
  padding: 16px;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.reportCard:hover {
  box-shadow: 0 18px 42px rgba(35, 50, 91, 0.14);
  transform: translateY(-3px);
}

.reportIcon {
  align-items: center;
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  border-radius: 10px;
  color: #4f46e5;
  display: flex;
  height: 58px;
  justify-content: center;
  justify-self: center;
  width: 58px;
}

.reportIcon svg {
  fill: none;
  height: 32px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 32px;
}

.reportIcon.clientes {
  background: linear-gradient(135deg, #dcfce7, #eff6ff);
  color: #16a34a;
}

.reportIcon.audiencias {
  background: linear-gradient(135deg, #ffedd5, #fff7ed);
  color: #f97316;
}

.reportIcon.tareas {
  background: linear-gradient(135deg, #ede9fe, #eef2ff);
  color: #7c3aed;
}

.reportIcon.ejecutivo {
  background: linear-gradient(135deg, #e0f2fe, #f0fdfa);
  color: #0891b2;
}

.reportActions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.reportActions button:first-child {
  color: #dc2626;
}

.reportActions button:last-child {
  color: #16a34a;
}

.dateRange {
  justify-self: end;
  max-width: 260px;
}

.indicatorPanel {
  padding: 16px;
}

.indicatorGrid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
}

.indicatorCard {
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.indicatorCard strong {
  font-size: 26px;
}

.indicatorCard span {
  font-size: 12px;
  font-weight: 800;
}

.indicatorCard span.green {
  color: #16a34a;
}

.indicatorCard span.red {
  color: #dc2626;
}

.sparkline {
  align-items: end;
  display: flex;
  gap: 5px;
  height: 34px;
}

.sparkline i {
  background: linear-gradient(180deg, #6d4aff, #93c5fd);
  border-radius: 999px;
  flex: 1;
}

.sparkline i:nth-child(1) { height: 28%; }
.sparkline i:nth-child(2) { height: 42%; }
.sparkline i:nth-child(3) { height: 36%; }
.sparkline i:nth-child(4) { height: 58%; }
.sparkline i:nth-child(5) { height: 46%; }
.sparkline i:nth-child(6) { height: 72%; }

.reportDetail {
  padding: 0;
}

.reportTopbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.reportDetailGrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 14px;
  padding: 14px;
}

.reportTable .tableHead,
.reportTable .tableRow {
  grid-template-columns: 0.8fr 1fr 1fr 0.8fr 1fr 0.8fr 1fr 0.9fr 1fr;
  min-width: 1050px;
}

.pdfPreview {
  background: #2b2f3a;
  padding: 12px;
}

.pdfToolbar {
  color: #fff;
  font-size: 12px;
  margin-bottom: 10px;
  text-align: center;
}

.pdfPage {
  background: #fff;
  color: #15213f;
  min-height: 520px;
  padding: 24px;
}

.pdfPage h4,
.pdfPage h5 {
  margin: 0 0 10px;
}

.pdfPage table {
  border-collapse: collapse;
  font-size: 11px;
  margin-top: 14px;
  width: 100%;
}

.pdfPage th,
.pdfPage td {
  border: 1px solid #d8dee9;
  padding: 6px;
}

.pdfPage footer {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
}

.paymentAdmin {
  grid-column: 1 / -1;
}

.qrImage {
  width: min(260px, 100%);
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 12px;
}

.subscriptionPremium {
  display: grid;
  gap: 28px;
  max-width: 1280px;
}

.subHeader h2 {
  font-size: 2rem;
  margin: 0;
}

.subHeader p {
  color: var(--muted);
  margin-top: 6px;
}

.premiumCurrent {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(4, minmax(150px, 1fr));
  gap: 0;
  align-items: center;
  border-radius: 18px;
  padding: 28px;
  color: #fff;
  background: linear-gradient(135deg, #113fae 0%, #3157e8 42%, #884dff 100%);
  box-shadow: 0 24px 60px rgba(49, 87, 232, 0.28);
}

.premiumCurrent > div {
  padding: 0 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.24);
}

.premiumCurrent > div:first-child {
  padding-left: 0;
}

.premiumCurrent > div:last-child {
  border-right: 0;
}

.premiumCurrent h1 {
  font-size: 2.15rem;
  margin: 8px 0;
}

.premiumCurrent h1 span {
  display: inline-flex;
  border-radius: 999px;
  background: #37c978;
  font-size: 0.85rem;
  padding: 5px 10px;
  vertical-align: middle;
}

.premiumCurrent button {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.75);
  margin-top: 16px;
}

.subscriptionCapacity {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 24px;
  padding: 28px;
}

.subscriptionCapacity h2 {
  font-size: 28px;
  margin: 4px 0 10px;
}

.subscriptionCapacity p {
  color: var(--muted);
  line-height: 1.6;
  max-width: 680px;
}

.subscriptionCapacity button {
  margin-top: 18px;
}

.subscriptionCapacity aside {
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}

.subscriptionCapacity ul {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.subscriptionCapacity li::before {
  color: #22c55e;
  content: "✓";
  font-weight: 900;
  margin-right: 8px;
}

.enterpriseUsers {
  max-width: 1500px;
}

.enterpriseKpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
}

.enterpriseLayout {
  align-items: start;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}

.enterpriseMain {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.enterpriseSide {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 18px;
}

.userCreatePanel {
  padding: 18px;
}

.enterpriseTablePanel {
  overflow: hidden;
  padding: 0;
}

.userFilters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(140px, 180px));
  gap: 10px;
}

.usersTable,
.salesTable {
  overflow-x: auto;
}

.usersTable .tableHead,
.usersTable .tableRow {
  grid-template-columns: 1.2fr 1.4fr 1fr 0.9fr 1.1fr 0.8fr 0.9fr 0.9fr 0.9fr 2fr;
  min-width: 1320px;
}

.iaAdminPanel .usersTable .tableHead,
.iaAdminPanel .usersTable .tableRow {
  grid-template-columns: 1fr 1.35fr 0.9fr 0.75fr 0.85fr 0.85fr 0.8fr;
  min-width: 840px;
}

.salesTable .tableHead,
.salesTable .tableRow {
  grid-template-columns: 0.9fr 1.2fr 1.4fr 0.9fr 1fr 0.8fr 0.8fr;
  min-width: 980px;
}

.rowActions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rowActions button {
  border-radius: 8px;
  font-size: 12px;
  min-height: 30px;
  padding: 0 9px;
}

.financialGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}

.financialBars {
  align-items: end;
  display: grid;
  grid-template-columns: repeat(12, minmax(42px, 1fr));
  gap: 12px;
  height: 240px;
  padding-top: 18px;
}

.financialBars div {
  align-items: end;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  height: 100%;
}

.financialBars span,
.financialBars b {
  background: linear-gradient(180deg, #3b82f6, #245dff);
  border-radius: 7px 7px 0 0;
  min-height: 4px;
}

.financialBars b {
  background: linear-gradient(180deg, #8b5cf6, #6d28d9);
}

.financialBars small {
  color: var(--muted);
  grid-column: 1 / -1;
  text-align: center;
}

.demoDataPanel {
  border-color: rgba(124, 58, 237, 0.22);
}

.demoDataStats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
}

.demoDataStats span {
  background: linear-gradient(180deg, #f8fafc, #eef2ff);
  border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: 14px;
  display: grid;
  gap: 2px;
  padding: 12px;
}

.demoDataStats strong {
  color: #312e81;
  font-size: 22px;
}

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

.planComparison {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.planCompareCard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0;
  padding: 16px;
}

.planCompareCard.featured {
  background: linear-gradient(135deg, #1d4ed8, #7c3aed);
  border-color: transparent;
  color: #fff;
}

.planCompareCard h3,
.planCompareCard p,
.planCompareCard ul {
  margin: 0;
}

.planCompareCard strong {
  color: var(--primary);
}

.planCompareCard.featured strong {
  color: #dbeafe;
}

.planCompareCard .planBadge {
  background: rgba(255, 255, 255, .18);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  height: 28px;
  justify-self: start;
  line-height: 18px;
  padding: 5px 9px;
  text-transform: uppercase;
}

.planCompareCard .planBadge.empty {
  opacity: 0;
}

.planCompareCard li {
  line-height: 1.35;
}

.salesSubscription {
  gap: 22px;
}

.salesHero {
  align-items: center;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) 320px;
  text-align: center;
}

.salesHero h2 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  margin: 0;
}

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

.salesQuickBenefits {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  margin-top: 22px;
  text-align: left;
}

.salesQuickBenefits span {
  align-items: center;
  display: flex;
  gap: 10px;
}

.salesQuickBenefits svg {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--primary);
  height: 44px;
  padding: 10px;
  width: 44px;
}

.annualBanner {
  background: linear-gradient(135deg, #fff, #f7f2ff);
  border: 1px solid #ddd6fe;
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px;
  text-align: left;
}

.annualBanner strong {
  color: #6d28d9;
}

.planSalesCard {
  grid-template-rows: 28px 34px 58px 32px 42px 40px minmax(255px, 1fr) auto;
  min-height: 560px;
}

.planSalesCard h3 {
  color: var(--primary);
  font-size: 20px;
  line-height: 1.15;
  padding-top: 6px;
}

.planSalesCard.gold h3,
.planSalesCard.gold .planPrice strong {
  color: #b77900;
}

.planPrice {
  align-items: end;
  display: flex;
  gap: 7px;
  min-height: 58px;
}

.planPrice strong {
  font-size: 36px;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.planPrice small {
  color: var(--muted);
  font-size: 14px;
  padding-bottom: 5px;
  white-space: nowrap;
}

.annualPrice {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  min-height: 32px;
}

.annualPrice.empty {
  opacity: 0;
}

.annualPrice b {
  background: #ede9fe;
  border-radius: 999px;
  color: #6d28d9;
  padding: 4px 8px;
}

.planSalesCard h4 {
  background: #f4f7ff;
  border-radius: 10px;
  color: var(--primary);
  font-size: 12px;
  line-height: 1.2;
  margin: 0;
  padding: 9px 10px;
}

.planSalesCard.featured h4 {
  background: rgba(255, 255, 255, .16);
  color: #fff;
}

.planSalesCard > p:not(.annualPrice) {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  padding-top: 4px;
}

.planSalesCard ul {
  display: grid;
  gap: 7px;
  list-style: none;
  padding: 12px 0 14px;
}

.planSalesCard li {
  color: var(--text);
  font-size: 13.5px;
  padding-left: 22px;
  position: relative;
}

.planSalesCard li::before {
  background: #16a34a;
  border-radius: 999px;
  color: #fff;
  content: "✓";
  font-size: 10px;
  font-weight: 900;
  height: 16px;
  left: 0;
  line-height: 16px;
  position: absolute;
  text-align: center;
  top: 1px;
  width: 16px;
}

.planSalesCard.blue li::before {
  background: #2563eb;
}

.planSalesCard.violet li::before {
  background: #7c3aed;
}

.planSalesCard.gold li::before {
  background: #d97706;
}

.planActions {
  align-self: end;
  display: grid;
  gap: 8px;
}

.planActions button,
.planActions .actionSpacer {
  min-height: 42px;
}

.planActions .ghost {
  background: #fff;
}

.paymentHiddenModule {
  display: grid;
  gap: 18px;
}

.paymentHero {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 280px;
}

.paymentHero > div,
.paymentHero aside,
.qrPaymentBox,
.paymentCheckout {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.paymentHero aside {
  display: grid;
  gap: 6px;
}

.paymentHero aside b {
  color: var(--primary);
  font-size: 34px;
}

.purchaseSummary {
  background: #f8fafc;
  border-radius: 14px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.purchaseSummary p {
  display: flex;
  justify-content: space-between;
  margin: 0;
}

.qrPaymentBox img {
  border: 1px solid var(--line);
  border-radius: 16px;
  display: block;
  max-width: 280px;
  width: 100%;
}

.aiWorkspace {
  display: grid;
  gap: 18px;
}

.aiHero {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: 72px minmax(0, 1fr) 320px;
}

.aiHeroIcon,
.aiPremiumIcon {
  align-items: center;
  animation: aiPulse 3s ease-in-out infinite;
  background: linear-gradient(135deg, #ede9fe, #dbeafe);
  border-radius: 22px;
  color: #6d28d9;
  display: flex;
  height: 64px;
  justify-content: center;
  width: 64px;
}

.aiHeroIcon svg,
.aiPremiumIcon svg {
  height: 34px;
  width: 34px;
}

@keyframes aiPulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 12px 28px rgba(124, 58, 237, .14); }
  50% { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(124, 58, 237, .22); }
}

.aiHero h2 {
  font-size: clamp(30px, 3vw, 46px);
  line-height: 1;
  margin: 0 0 8px;
}

.aiHero h2 span {
  color: #7c3aed;
}

.aiHero p,
.aiHero small {
  color: var(--muted);
}

.aiHero aside,
.aiSidePanel section,
.aiChatPanel,
.aiCapabilities,
.aiQuickCard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.aiHero aside {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.aiQuickGrid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
}

.aiQuickCard {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 6px;
  grid-template-columns: 48px minmax(0, 1fr) 22px;
  min-height: 94px;
  padding: 14px;
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease;
}

.aiQuickCard:hover {
  box-shadow: 0 18px 36px rgba(15, 23, 42, .12);
  transform: translateY(-2px);
}

.aiQuickCard span {
  align-items: center;
  background: #f4f0ff;
  border-radius: 14px;
  color: #7c3aed;
  display: flex;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.aiQuickCard svg {
  height: 24px;
  width: 24px;
}

.aiQuickCard strong,
.aiQuickCard small {
  grid-column: 2;
}

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

.aiQuickCard b {
  background: #f8fafc;
  border-radius: 999px;
  color: var(--primary);
  grid-column: 3;
  grid-row: 1 / span 2;
  height: 24px;
  line-height: 24px;
  text-align: center;
  width: 24px;
}

.aiMainGrid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.aiChatPanel {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.aiMessages {
  background: linear-gradient(180deg, #fbfdff, #fff);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 12px;
  max-height: 430px;
  min-height: 320px;
  overflow: auto;
  padding: 16px;
}

.aiBubble {
  display: grid;
  gap: 12px;
  grid-template-columns: 42px minmax(0, 1fr);
}

.aiBubble > span {
  align-items: center;
  border-radius: 999px;
  display: flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.aiBubble.user > span {
  background: #dbeafe;
  color: #2563eb;
}

.aiBubble.assistant > span {
  background: #ede9fe;
  color: #7c3aed;
}

.aiBubble div {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.aiBubble.user div {
  background: #f8fafc;
}

.aiBubble.assistant div {
  background: #fff;
}

.aiBubble p {
  line-height: 1.55;
  margin: 6px 0;
  white-space: pre-wrap;
}

.aiComposer {
  display: grid;
  gap: 10px;
}

.aiComposer textarea {
  border-radius: 14px;
  min-height: 92px;
}

.aiComposer > div {
  align-items: center;
  display: flex;
  gap: 10px;
}

.fileGhost input {
  display: none;
}

.aiSidePanel {
  display: grid;
  gap: 12px;
}

.aiSidePanel section {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.aiUsage {
  align-items: end;
  display: flex;
  gap: 7px;
}

.aiUsage strong {
  font-size: 22px;
}

.aiRecentList {
  display: grid;
  gap: 8px;
}

.aiRecentList p {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 3px;
  margin: 0;
  padding-bottom: 8px;
}

.aiRecentList span {
  color: var(--muted);
  font-size: 12px;
}

.aiCapabilities {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.aiCapabilities > div {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.aiCapabilities article {
  border-right: 1px solid var(--line);
  display: grid;
  gap: 6px;
  padding-right: 12px;
}

.aiCapabilities article:last-child {
  border-right: 0;
}

.aiCapabilities span {
  color: #7c3aed;
  height: 28px;
  width: 28px;
}

.aiLocked {
  align-content: center;
  background: linear-gradient(135deg, #fff, #f5f3ff);
  border: 1px solid #ddd6fe;
  border-radius: 22px;
  box-shadow: var(--shadow);
  display: grid;
  justify-items: center;
  margin: 30px auto;
  max-width: 760px;
  min-height: 520px;
  padding: 40px;
  text-align: center;
}

.aiLocked h2 {
  font-size: 36px;
  margin-bottom: 0;
}

.aiLockedPlans {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.aiLockedPlans span {
  background: #ede9fe;
  border-radius: 999px;
  color: #6d28d9;
  font-weight: 800;
  padding: 8px 12px;
}

.analizaWorkspace {
  display: grid;
  gap: 18px;
}

.analizaHero .aiHeroIcon,
.analizaLocked .aiPremiumIcon {
  background: linear-gradient(135deg, #fef3c7, #ede9fe);
  color: #b77900;
}

.analizaQuickCard span {
  background: #fff7ed;
  color: #d97706;
}

.analizaMainGrid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.analizaUploadPanel,
.analysisDashboard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  padding: 22px;
}

.dropZone {
  align-items: center;
  background: linear-gradient(135deg, #fffaf0, #f8f7ff);
  border: 1px dashed #d97706;
  border-radius: 18px;
  display: grid;
  justify-items: center;
  min-height: 230px;
  padding: 28px;
  text-align: center;
}

.dropZone span {
  align-items: center;
  background: #fff;
  border-radius: 20px;
  color: #d97706;
  display: flex;
  height: 70px;
  justify-content: center;
  margin-bottom: 8px;
  width: 70px;
}

.dropZone svg {
  height: 34px;
  width: 34px;
}

.dropZone input {
  margin-top: 12px;
  max-width: 280px;
}

.analysisHead {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

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

.analysisActions button {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 36px;
  padding: 0 12px;
}

.analysisBlocks {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.analysisBlocks article {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: 150px;
  padding: 16px;
}

.analysisBlocks h4 {
  margin: 0 0 8px;
}

.analysisBlocks p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.analysisBlocks .riskBlock {
  background: linear-gradient(135deg, #fff7ed, #fff);
  border-color: #fed7aa;
}

.riskMeter {
  background: #ffedd5;
  border-radius: 999px;
  height: 10px;
  margin-top: 18px;
  overflow: hidden;
}

.riskMeter i {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  display: block;
  height: 100%;
  width: 68%;
}

.warningLine {
  background: #fff7ed;
  border-left: 3px solid #f97316;
  border-radius: 8px;
  padding: 10px;
}

.premiumUsage {
  display: grid;
  gap: 8px;
}

.premiumUsage strong {
  font-size: 0.9rem;
  opacity: 0.9;
}

.premiumUsage b {
  font-size: 1.1rem;
}

.valueSection {
  text-align: center;
}

.valueSection h2,
.premiumPlans h2,
.trustSection h2 {
  font-size: 1.55rem;
}

.valueGrid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.valueGrid article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 18px 12px;
  display: grid;
  gap: 10px;
  justify-items: center;
  box-shadow: 0 14px 32px rgba(35, 50, 91, 0.06);
}

.valueGrid span {
  color: #6846e8;
  font-size: 2rem;
}

.billingToggle {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 6px;
}

.billingToggle button {
  border-radius: 999px;
  min-height: 34px;
}

.billingToggle button.active {
  color: #fff;
  background: linear-gradient(135deg, #3157e8, #7c4dff);
}

.billingToggle span {
  color: #2b7a4b;
  font-weight: 800;
  padding: 0 8px;
}

.premiumPlanGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.premiumPlan {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 24px 20px;
  display: grid;
  gap: 14px;
  box-shadow: 0 16px 40px rgba(35, 50, 91, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.premiumPlan:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 55px rgba(35, 50, 91, 0.13);
}

.premiumPlan.popular {
  border-color: #7c4dff;
  box-shadow: 0 24px 60px rgba(124, 77, 255, 0.18);
}

.popularRibbon {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 12px 12px 0 0;
  background: linear-gradient(135deg, #3157e8, #7c4dff);
  color: #fff;
  padding: 8px 22px;
  font-weight: 900;
  font-size: 0.78rem;
}

.premiumPlan h3 {
  text-align: center;
  font-size: 1.3rem;
}

.premiumPlan p {
  color: var(--muted);
  text-align: center;
  min-height: 42px;
}

.price {
  text-align: center;
  font-weight: 800;
}

.price strong {
  font-size: 2rem;
}

.annualNote {
  color: #2b7a4b;
  display: block;
  font-weight: 800;
  text-align: center;
}

.premiumPlan ul {
  list-style: none;
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  color: #26324d;
}

.premiumPlan li::before {
  content: "✓";
  color: #2b7a4b;
  font-weight: 900;
  margin-right: 8px;
}

.trustSection {
  text-align: center;
}

.trustSection > div {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.trustSection article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 16px;
  display: grid;
  gap: 4px;
}

.trustSection strong {
  font-size: 1.15rem;
}

.trustSection span,
.trustSection p {
  color: var(--muted);
}

.usageBar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  overflow: hidden;
}

.usageBar i {
  display: block;
  height: 100%;
  background: #51dc83;
}

.plansMini {
  display: grid;
  gap: 14px;
}

.planCard {
  box-shadow: none;
}

.subscriptionPage {
  max-width: 980px;
}

.danger {
  background: #f3ded9;
  color: #9c3825;
}

.danger:hover {
  background: #edccc4;
}

.check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.check input {
  width: 18px;
  min-height: 18px;
}

.notice,
.error {
  border-radius: 8px;
  margin-bottom: 14px;
  padding: 12px 14px;
  font-weight: 700;
}

.notice {
  background: #dff3e5;
  color: #26643d;
}

.error {
  background: #f8e1de;
  color: #9c3825;
}

@media (max-width: 900px) {
  .loginShell {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .loginBrandPane,
  .loginAccessPane {
    min-height: auto;
  }

  .loginBrandPane {
    padding: 32px;
  }

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

  .loginSecurity {
    margin-top: 28px;
  }

  .loginAccessPane {
    padding: 28px;
  }

  .loginInfoCard {
    grid-template-columns: 54px 1fr;
  }

  .requestAccess {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .appShell,
  .statsGrid,
  .kpiGrid,
  .analyticsGrid,
  .opsGrid,
  .dashboardPro,
  .twoColumn,
  .twoColumn.wide,
  .detailGrid,
  .agendaLayout,
  .todayGrid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

  .ghost {
    margin-top: 0;
  }
}

@media (max-width: 1450px) {
  .appShell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .dashboardPro {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 14px;
  }

  .content {
    padding: 20px 22px;
  }

  .kpiGrid {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
  }

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

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

  .quickActions {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .realDonut {
    grid-template-columns: 145px 1fr;
    min-height: 190px;
    gap: 14px;
  }

  .realDonut > div {
    width: 135px;
    height: 135px;
  }

  .realDonut > div::after {
    inset: 38px;
  }

  .realBars {
    height: 190px;
  }

  .premiumCurrent {
    grid-template-columns: 1.4fr repeat(4, minmax(120px, 1fr));
    padding: 22px;
  }

  .premiumCurrent > div {
    padding: 0 14px;
  }

  .premiumPlanGrid {
    gap: 14px;
  }

  .premiumPlan {
    padding: 22px 16px;
  }

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

  .libraryMainGrid {
    grid-template-columns: minmax(0, 1fr) 330px;
  }

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

  .moduleActions,
  .agendaTopActions {
    justify-content: flex-start;
  }

  .moduleSearch {
    min-width: min(100%, 520px);
  }

  .moduleGrid.withDetail,
  .processGrid,
  .smartAgendaLayout,
  .agendaWorkspace,
  .supportGrid,
  .reportDetailGrid {
    grid-template-columns: minmax(0, 1fr);
  }

  .agendaMonthGrid {
    grid-template-columns: repeat(7, minmax(58px, 1fr));
  }

  .monthDay {
    min-height: 78px;
    padding: 9px;
  }

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

  .detailRail > h3,
  .detailRail .profileMini,
  .detailRail .railTop,
  .detailRail > p,
  .detailRail .stack {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1450px) {
  .aiHero {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .aiHero aside {
    grid-column: 1 / -1;
  }

  .aiQuickGrid,
  .aiCapabilities > div {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .aiMainGrid {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .analizaMainGrid {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .analysisBlocks {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 900px) {
  .aiHero,
  .aiMainGrid,
  .analizaMainGrid,
  .aiQuickGrid,
  .aiCapabilities > div,
  .analysisBlocks {
    grid-template-columns: 1fr;
  }

  .aiHeroIcon {
    height: 58px;
    width: 58px;
  }

  .aiComposer > div {
    align-items: stretch;
    display: grid;
  }

  .aiCapabilities article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
  }
}

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

  .subscriptionRail {
    position: static;
  }

  .compactPlan {
    max-width: none;
  }

  .premiumCurrent,
  .premiumPlanGrid,
  .planComparison,
  .salesHero,
  .salesQuickBenefits,
  .paymentHero,
  .valueGrid,
  .trustSection > div,
  .paymentGrid,
  .libraryHero,
  .libraryMainGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .libraryHero,
  .libraryMainGrid {
    grid-template-columns: 1fr;
  }

  .libraryMetrics,
  .featuredShelf,
  .libraryBenefits,
  .moduleKpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .premiumTable {
    overflow-x: auto;
  }

  .tableHead,
  .tableRow {
    min-width: 980px;
  }

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

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

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

  .premiumCurrent > div {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
    padding: 14px 0;
  }

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

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

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

  .enterpriseSide {
    position: static;
  }

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

@media (max-width: 720px) {
  .loginBrandPane {
    padding: 26px 20px;
  }

  .loginBrand {
    align-items: flex-start;
  }

  .loginLogoMark {
    height: 62px;
    width: 62px;
  }

  .loginBrand h1 {
    font-size: 28px;
  }

  .loginBrand strong {
    font-size: 24px;
  }

  .loginCopy h2 {
    font-size: 28px;
  }

  .loginBenefits article {
    grid-template-columns: 52px 1fr;
  }

  .loginBenefits span {
    height: 50px;
    width: 50px;
  }

  .loginAccessPane {
    padding: 22px 16px;
  }

  .loginCard {
    padding: 28px 20px;
  }

  .loginOptions {
    display: grid;
  }

  .loginOptions a,
  .loginOptions small {
    text-align: left;
  }

  .loginInfoCard {
    padding: 18px;
  }

  .enterpriseKpis,
  .financialGrid,
  .userFilters {
    grid-template-columns: 1fr;
  }

  .financialBars {
    overflow-x: auto;
    min-width: 720px;
  }

  .agendaMonthPanel {
    overflow-x: auto;
  }

  .agendaMonthGrid {
    min-width: 620px;
  }

  .agendaEventCard dl div {
    grid-template-columns: 1fr;
  }

  .premiumCurrent,
  .premiumPlanGrid,
  .valueGrid,
  .trustSection > div,
  .paymentGrid,
  .libraryMetrics,
  .featuredShelf,
  .libraryBenefits,
  .moduleKpis,
  .formGrid {
    grid-template-columns: 1fr;
  }

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

  .moduleActions,
  .agendaTopActions {
    align-items: stretch;
    flex-direction: column;
  }

  .moduleSearch {
    min-width: 0;
    width: 100%;
  }

  .modalBackdrop {
    padding: 10px;
  }

  .weekCalendar {
    min-width: 720px;
  }

  .reportCards,
  .indicatorGrid {
    grid-template-columns: 1fr;
  }

  .ticketHeader,
  .reportTopbar {
    align-items: stretch;
    flex-direction: column;
  }

  .billingToggle {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .content,
  .sidebar {
    padding: 18px;
  }

  .sidebar nav {
    grid-template-columns: 1fr;
  }

  td {
    display: block;
    border-top: 0;
    padding: 9px 0;
  }

  tr {
    display: block;
    border-top: 1px solid #e5ebf0;
    padding: 10px 0;
  }

  .actions {
    justify-content: flex-start;
  }

  .timelineItem {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-left: 20px;
  }

  .timelineItem::before {
    left: 6px;
  }

  .timelineItem::after {
    left: 0;
  }

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

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

  .subscriptionRail {
    position: static;
  }

  .adminLibrary,
  .paymentGrid {
    grid-template-columns: 1fr;
  }
}

.mobileMenuButton,
.drawerBackdrop {
  display: none;
}

@media (max-width: 1024px) {
  body {
    overflow-x: hidden;
  }

  .appShell {
    display: block;
    min-height: 100dvh;
    position: relative;
  }

  .mobileMenuButton {
    align-items: center;
    background: #071a3d;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(5, 18, 42, 0.22);
    display: inline-grid;
    gap: 4px;
    height: 44px;
    justify-content: center;
    left: 14px;
    padding: 0;
    position: fixed;
    top: 14px;
    width: 46px;
    z-index: 1200;
  }

  .mobileMenuButton span {
    background: #fff;
    border-radius: 999px;
    display: block;
    height: 2px;
    width: 20px;
  }

  .drawerBackdrop {
    background: rgba(4, 12, 28, 0.48);
    border-radius: 0;
    inset: 0;
    min-height: 100dvh;
    opacity: 0;
    padding: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity 0.18s ease;
    width: 100%;
    z-index: 1090;
  }

  .sidebar {
    height: 100dvh;
    left: 0;
    max-width: 300px;
    padding: 18px 14px;
    position: fixed;
    top: 0;
    transform: translateX(-106%);
    transition: transform 0.22s ease;
    width: min(84vw, 300px);
    z-index: 1210;
  }

  .sidebarNav,
  .sidebar nav {
    display: grid;
    grid-template-columns: 1fr;
  }

  .appShell.drawerOpen .sidebar {
    transform: translateX(0);
  }

  .appShell.drawerOpen .drawerBackdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .content {
    min-width: 0;
    padding: 74px 18px 24px;
    width: 100%;
  }

  .view,
  .premiumModule,
  .mainDashboard,
  .aiWorkspace {
    gap: 14px;
  }

  .moduleHero,
  .heroHeader,
  .detailHeader {
    align-items: flex-start;
    gap: 12px;
  }

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

  .moduleHero h2 {
    font-size: clamp(24px, 6vw, 30px);
  }

  .moduleActions,
  .agendaTopActions,
  .reportTopbar,
  .ticketHeader,
  .supportListHead {
    align-items: stretch;
    flex-direction: column;
  }

  .moduleActions > *,
  .agendaTopActions > *,
  .reportTopbar > *,
  .ticketHeader > *,
  .supportListHead > * {
    width: 100%;
  }

  .moduleSearch {
    grid-template-columns: 1fr;
    min-width: 0;
    padding: 10px 12px;
    width: 100%;
  }

  .moduleSearch input {
    min-height: 38px;
  }

  .dashboardPro,
  .analyticsGrid,
  .opsGrid,
  .twoColumn,
  .twoColumn.wide,
  .detailGrid,
  .moduleGrid.withDetail,
  .processGrid,
  .smartAgendaLayout,
  .agendaWorkspace,
  .supportGrid,
  .reportDetailGrid,
  .libraryMainGrid,
  .aiMainGrid,
  .analizaMainGrid,
  .enterpriseLayout {
    grid-template-columns: 1fr;
  }

  .kpiGrid,
  .statsGrid,
  .moduleKpis,
  .reportCards,
  .indicatorGrid,
  .libraryMetrics,
  .featuredShelf,
  .libraryBenefits,
  .aiQuickGrid,
  .aiCapabilities > div,
  .analysisBlocks,
  .enterpriseKpis,
  .financialGrid,
  .premiumPlanGrid,
  .valueGrid,
  .trustSection > div,
  .paymentGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subscriptionRail,
  .enterpriseSide,
  .detailRail {
    position: static;
  }

  .premiumCurrent,
  .subscriptionCapacity {
    grid-template-columns: 1fr;
  }

  .premiumCurrent > div {
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
    border-right: 0;
    padding: 14px 0;
  }

  .premiumTable,
  .tablePanel,
  .dataPanel {
    max-width: 100%;
    overflow-x: auto;
  }

  .modalBackdrop {
    align-items: start;
    overflow-y: auto;
    padding: 74px 14px 18px;
  }

  .modalCard,
  .modalCard.wideModal {
    max-height: none;
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .content {
    padding: 72px 12px 18px;
  }

  .loginShell {
    display: block;
    min-height: 100dvh;
  }

  .loginBrandPane {
    min-height: auto;
    padding: 22px 18px;
  }

  .loginBrandPane::before,
  .loginBrandPane::after {
    display: none;
  }

  .loginCopy p {
    font-size: 15px;
    margin-top: 14px;
  }

  .loginBenefits {
    gap: 12px;
    margin-top: 20px;
  }

  .loginSecurity {
    margin-top: 18px;
  }

  .loginAccessPane {
    padding: 18px 12px 24px;
  }

  .loginPanel {
    max-width: none;
  }

  .loginCard {
    border-radius: 16px;
    padding: 22px 16px;
  }

  .loginInfoCard {
    grid-template-columns: 44px 1fr;
    padding: 14px;
  }

  .requestAccess {
    justify-self: stretch;
    text-align: center;
    white-space: normal;
  }

  .heroHeader {
    display: grid;
    grid-template-columns: auto 1fr;
  }

  .heroHeader h2 {
    font-size: 24px;
  }

  .kpiGrid,
  .statsGrid,
  .moduleKpis,
  .reportCards,
  .indicatorGrid,
  .libraryMetrics,
  .featuredShelf,
  .libraryBenefits,
  .aiQuickGrid,
  .aiCapabilities > div,
  .analysisBlocks,
  .enterpriseKpis,
  .financialGrid,
  .premiumPlanGrid,
  .valueGrid,
  .trustSection > div,
  .paymentGrid,
  .formGrid,
  .quickActions {
    grid-template-columns: 1fr;
  }

  .stat,
  .moduleKpi,
  .panelBand,
  .editor,
  .tablePanel,
  .dataPanel,
  .detailRail,
  .activityPanel,
  .calendarBoard,
  .ticketConversation,
  .ticketSide,
  .aiChatPanel,
  .aiCapabilities {
    border-radius: 12px;
  }

  .premiumTable {
    display: grid;
    gap: 10px;
    overflow: visible;
    padding: 10px;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  tr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(35, 50, 91, 0.06);
    margin-bottom: 10px;
    padding: 10px 12px;
  }

  td {
    border-top: 0;
    padding: 8px 0;
  }

  .tableHead {
    display: none;
  }

  .tableRow,
  .clientTable .tableRow,
  .caseTable .tableRow,
  .ticketTable .tableRow,
  .reportTable .tableRow,
  .usersTable .tableRow,
  .salesTable .tableRow {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(35, 50, 91, 0.06);
    display: grid;
    grid-template-columns: 1fr;
    min-height: auto;
    min-width: 0;
    padding: 12px;
  }

  .rowActions,
  .actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .rowActions button,
  .actions button {
    width: 100%;
  }

  .moduleTabs,
  .segmented,
  .billingToggle,
  .categoryChips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
  }

  .moduleTabs::-webkit-scrollbar,
  .segmented::-webkit-scrollbar,
  .billingToggle::-webkit-scrollbar,
  .categoryChips::-webkit-scrollbar {
    display: none;
  }

  .agendaMonthPanel {
    min-height: auto;
    overflow: visible;
  }

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

  .calendarToolbar strong {
    flex: 1 0 100%;
    order: -1;
    text-align: center;
  }

  .agendaMonthGrid {
    gap: 5px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    min-width: 0;
    padding: 8px;
  }

  .monthWeekday {
    font-size: 10px;
  }

  .monthDay {
    border-radius: 9px;
    gap: 4px;
    min-height: 54px;
    padding: 5px 3px;
    text-align: center;
  }

  .monthDay > span {
    font-size: 14px;
  }

  .monthDay small {
    display: none;
  }

  .eventDots {
    justify-content: center;
  }

  .agendaDayPanel {
    padding: 12px;
  }

  .agendaEventCard {
    padding: 12px;
  }

  .agendaEventCard dl {
    display: grid;
    gap: 8px;
  }

  .agendaEventCard footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .weekCalendar,
  .financialBars {
    min-width: 0;
    overflow-x: auto;
  }

  .chatThread article,
  .aiBubble {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .aiChatPanel {
    padding: 14px;
  }

  .aiMessages {
    max-height: none;
    min-height: min(54dvh, 480px);
    padding: 12px;
  }

  .aiBubble div {
    padding: 12px;
  }

  .aiComposer {
    background: #fff;
    bottom: 0;
    margin: 0 -2px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    position: sticky;
    z-index: 5;
  }

  .aiComposer > div {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .aiComposer textarea {
    min-height: 76px;
  }

  .supportGrid {
    gap: 12px;
  }

  .ticketSide {
    order: 3;
  }
}

@media (max-width: 420px) {
  button {
    padding-left: 10px;
    padding-right: 10px;
  }

  .content {
    padding-left: 10px;
    padding-right: 10px;
  }

  .mobileMenuButton {
    left: 10px;
    top: 10px;
  }

  .moduleHero h2,
  .aiHero h2,
  .subscriptionCapacity h2 {
    font-size: 22px;
    line-height: 1.18;
  }

  .loginBrand h1 {
    font-size: 24px;
  }

  .loginBrand strong {
    font-size: 21px;
  }

  .loginBenefits article,
  .loginInfoCard,
  .chatThread article,
  .aiBubble {
    grid-template-columns: 1fr;
  }

  .loginBenefits span,
  .chatThread article > span,
  .aiBubble > span {
    height: 36px;
    width: 36px;
  }

  .sunMark {
    font-size: 1.8rem;
  }

  .quickActions button,
  .moduleKpi,
  .stat {
    min-height: auto;
  }

  .rowActions,
  .actions {
    grid-template-columns: 1fr;
  }

  .agendaMonthGrid {
    gap: 4px;
    padding: 6px 4px;
  }

  .monthDay {
    min-height: 48px;
  }

  .eventDots b {
    height: 6px;
    width: 6px;
  }

  .modalBackdrop {
    padding-left: 8px;
    padding-right: 8px;
  }
}

/* Auditoria responsive movil/tablet: capa final sin afectar escritorio. */
@media (max-width: 1024px) {
  html,
  body,
  #app {
    max-width: 100%;
    overflow-x: hidden;
    width: 100%;
  }

  *,
  *::before,
  *::after {
    min-width: 0;
  }

  body {
    -webkit-text-size-adjust: 100%;
    min-width: 0;
  }

  input,
  select,
  textarea {
    font-size: 16px;
    max-width: 100%;
  }

  button,
  .primary,
  .ghost,
  .nav,
  .requestAccess,
  .reportActions button,
  .rowActions button,
  .actions button {
    min-height: 44px;
    touch-action: manipulation;
  }

  .appShell {
    grid-template-columns: 1fr;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .content {
    max-width: 100vw;
    overflow-x: hidden;
    padding-top: 72px;
  }

  .mobileMenuButton {
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 14px;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.16);
    display: inline-grid;
    height: 46px;
    justify-content: center;
    left: 14px;
    position: fixed;
    top: 14px;
    width: 46px;
    z-index: 120;
  }

  .drawerBackdrop {
    background: rgba(2, 8, 23, 0.58);
    border: 0;
    display: none;
    inset: 0;
    min-height: 100dvh;
    padding: 0;
    position: fixed;
    width: 100%;
    z-index: 100;
  }

  .sidebar {
    bottom: 0;
    left: 0;
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    position: fixed;
    top: 0;
    transform: translateX(-104%);
    transition: transform 0.24s ease;
    width: min(86vw, 300px);
    z-index: 110;
  }

  .appShell.drawerOpen .sidebar {
    transform: translateX(0);
  }

  .appShell.drawerOpen .drawerBackdrop {
    display: block;
  }

  .sidebarNav,
  .sidebar nav {
    grid-template-columns: 1fr;
  }

  .sidebarBottom {
    background: linear-gradient(180deg, rgba(2, 8, 23, 0), rgba(2, 8, 23, 0.72) 18%, rgba(2, 8, 23, 0.96));
    bottom: 0;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
    position: sticky;
  }

  .view,
  .mainDashboard,
  .dashboardPro,
  .twoColumn,
  .detailGrid,
  .moduleGrid,
  .moduleGrid.withDetail,
  .processGrid,
  .agendaLayout,
  .agendaWorkspace,
  .supportGrid,
  .reportDetailGrid,
  .libraryMainGrid,
  .subscriptionPremium,
  .subscriptionCapacity,
  .enterpriseLayout,
  .enterpriseMain,
  .aiMainGrid,
  .analizaMainGrid,
  .aiHero,
  .uploadAnalysisGrid {
    grid-template-columns: 1fr !important;
  }

  .kpiGrid,
  .statsGrid,
  .moduleKpis,
  .enterpriseKpis,
  .financialGrid,
  .reportMetrics,
  .analyticsGrid,
  .opsGrid,
  .quickActions,
  .reportCards,
  .planMetrics,
  .benefitGrid,
  .aiQuickGrid,
  .aiCapabilities > div,
  .analizaFeatureGrid,
  .analysisBlocks,
  .analysisActions,
  .libraryStats,
  .plansMini,
  .demoDataStats,
  .clientGrid,
  .caseGrid,
  .miniCards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .moduleHero,
  .detailHeader,
  .reportTopbar,
  .agendaTopActions,
  .supportListHead,
  .librarySectionTitle,
  .viewHeader,
  .modalHead,
  .modalActions,
  .railTop {
    align-items: stretch;
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .moduleActions,
  .moduleSearch,
  .moduleSearch input,
  .agendaTopActions > *,
  .reportTopbar > *,
  .supportListHead > *,
  .modalActions > *,
  .row,
  .row > *,
  .quickActions button {
    width: 100%;
  }

  .moduleTabs,
  .filtersRow,
  .userFilters {
    align-items: stretch;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    overflow: visible;
  }

  .moduleTabs .right,
  .filtersRow .right {
    margin-left: 0;
  }

  .tablePanel,
  .dataPanel,
  .enterpriseTablePanel,
  .premiumTable,
  .reportDetail,
  .pdfPreview,
  .calendarBoard,
  .agendaMonthPanel,
  .aiChatPanel,
  .analizaUploadPanel,
  .analizaResultPanel,
  .ticketConversation {
    max-width: 100%;
    overflow-x: hidden;
  }

  table {
    min-width: 0;
    width: 100%;
  }

  .tableHead {
    display: none !important;
  }

  .tableRow,
  .clientTable .tableRow,
  .caseTable .tableRow,
  .ticketTable .tableRow,
  .reportTable .tableRow,
  .usersTable .tableRow,
  .salesTable .tableRow {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    display: grid !important;
    gap: 10px;
    grid-template-columns: 1fr !important;
    margin-bottom: 12px;
    padding: 14px !important;
  }

  .tableRow span,
  .tableRow strong,
  .tableRow small,
  .tableRow a,
  .detailList dd,
  .detailList dt,
  .miniList p,
  .aiBubble p,
  .chatThread p {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .rowActions,
  .actions,
  .reportActions {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .formGrid,
  .formGrid.single,
  .infoGrid,
  .detailList,
  .agendaEventCard dl div,
  .modalCard .formGrid {
    grid-template-columns: 1fr !important;
  }

  .span2 {
    grid-column: auto !important;
  }

  .modalBackdrop {
    align-items: end;
    overflow-y: auto;
    padding: 14px;
  }

  .modalCard,
  .modalCard.wideModal {
    border-radius: 22px 22px 0 0;
    max-height: calc(100dvh - 28px);
    max-width: 100%;
    overflow-y: auto;
    width: 100%;
  }

  .agendaMonthGrid {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  }

  .monthDay {
    aspect-ratio: auto;
    min-height: 58px;
    padding: 7px 4px;
  }

  .calendarToolbar {
    display: grid;
    gap: 8px;
    grid-template-columns: 44px 1fr 44px;
  }

  .calendarToolbar strong {
    text-align: center;
  }

  .calendarGrid {
    grid-template-columns: 54px repeat(7, minmax(76px, 1fr));
    overflow-x: auto;
  }

  .calendarEvent,
  .agendaEventCard,
  .agendaListPremium article {
    overflow: hidden;
  }

  .aiMessages {
    min-height: min(58dvh, 520px);
  }

  .aiComposer {
    bottom: 0;
    position: sticky;
    z-index: 8;
  }

  .aiComposer > div {
    grid-template-columns: 1fr !important;
  }

  .aiComposer button,
  .analizaUploadPanel button,
  .analysisActions button {
    width: 100%;
  }

  .pdfPage {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
  }

  .pdfPage table {
    display: block;
    overflow-x: auto;
    width: 100%;
  }

  .loginShell {
    grid-template-columns: 1fr !important;
    min-height: 100dvh;
    overflow-x: hidden;
  }

  .loginBrandPane,
  .loginAccessPane {
    padding-left: clamp(16px, 4vw, 28px);
    padding-right: clamp(16px, 4vw, 28px);
  }

  .loginBrandPane {
    min-height: auto;
  }

  .loginPanel,
  .loginCard,
  .loginInfoCard {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .content {
    padding: 68px 12px 18px;
  }

  h1,
  .moduleHero h2,
  .aiHero h2,
  .subscriptionCapacity h2 {
    font-size: clamp(22px, 7vw, 30px);
    line-height: 1.15;
  }

  .heroHeader {
    align-items: start;
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
  }

  .kpiGrid,
  .statsGrid,
  .moduleKpis,
  .enterpriseKpis,
  .financialGrid,
  .reportMetrics,
  .analyticsGrid,
  .opsGrid,
  .quickActions,
  .reportCards,
  .planMetrics,
  .benefitGrid,
  .aiQuickGrid,
  .aiCapabilities > div,
  .analizaFeatureGrid,
  .analysisBlocks,
  .analysisActions,
  .libraryStats,
  .plansMini,
  .demoDataStats,
  .clientGrid,
  .caseGrid,
  .miniCards,
  .moduleTabs,
  .filtersRow,
  .userFilters,
  .rowActions,
  .actions,
  .reportActions,
  .loginBenefits,
  .loginInfoCard,
  .loginSecurity {
    grid-template-columns: 1fr !important;
  }

  .panelBand,
  .dataPanel,
  .tablePanel,
  .editor,
  .detailRail,
  .calendarBoard,
  .agendaRail > div,
  .aiChatPanel,
  .aiCapabilities,
  .supportList,
  .reportDetail,
  .subscriptionCapacity aside {
    border-radius: 16px;
    padding: 14px;
  }

  .moduleKpi,
  .stat,
  .reportCard,
  .aiQuickCard,
  .clientCard,
  .caseCard {
    min-height: auto;
  }

  .moduleActions,
  .modalActions,
  .row,
  .reportTopbar,
  .agendaTopActions {
    grid-template-columns: 1fr !important;
  }

  .moduleActions button,
  .modalActions button,
  .row button,
  .reportTopbar button,
  .agendaTopActions button,
  .supportListHead button {
    width: 100%;
  }

  .loginBrand {
    grid-template-columns: 54px 1fr;
  }

  .loginLogoMark,
  .loginCardIcon {
    height: 54px;
    width: 54px;
  }

  .loginBrand h1 {
    font-size: 24px;
  }

  .loginBrand strong {
    font-size: 21px;
  }

  .loginCopy h2 {
    font-size: 25px;
  }

  .loginCopy p,
  .loginSecurity p,
  .loginInfoCard p {
    font-size: 14px;
  }

  .loginCard {
    padding: 20px;
  }

  .loginOptions {
    align-items: start;
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
  }

  .agendaMonthGrid {
    gap: 5px;
    padding: 7px;
  }

  .monthDay {
    font-size: 12px;
    min-height: 50px;
  }

  .eventDots {
    gap: 3px;
  }

  .eventDots b {
    height: 6px;
    width: 6px;
  }

  .agendaEventCard footer,
  .ticketActions {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr;
  }

  .aiBubble,
  .chatThread article {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .aiBubble > span,
  .chatThread article > span {
    height: 36px;
    width: 36px;
  }

  .aiBubble div,
  .chatThread article div {
    padding: 12px;
  }

  .aiMessages {
    padding: 12px;
  }

  .aiComposer textarea {
    min-height: 82px;
  }

  .modalBackdrop {
    padding: 10px 8px 0;
  }

  .modalCard,
  .modalCard.wideModal {
    border-radius: 18px 18px 0 0;
    max-height: calc(100dvh - 10px);
    padding: 16px;
  }

  .sidebar {
    width: min(88vw, 286px);
  }
}

@media (max-width: 380px) {
  .content {
    padding-left: 10px;
    padding-right: 10px;
  }

  .panelBand,
  .dataPanel,
  .tablePanel,
  .editor,
  .detailRail,
  .calendarBoard,
  .agendaRail > div,
  .aiChatPanel,
  .supportList,
  .reportDetail {
    padding: 12px;
  }

  .mobileMenuButton {
    height: 42px;
    left: 10px;
    top: 10px;
    width: 42px;
  }

  .monthDay {
    min-height: 44px;
    padding: 5px 2px;
  }

  .loginBrand,
  .loginBenefits article,
  .loginInfoCard,
  .loginSecurity,
  .aiBubble,
  .chatThread article {
    grid-template-columns: 1fr !important;
  }
}
