/* Server_EMS_FI · Ferrer Ingeniería · UI EMS
   Presentación únicamente: no modifica autenticación, roles ni lógica de aplicación. */
:root {
  color-scheme: light;
  --ink: #13312e;
  --ink-soft: #45635e;
  --muted: #748b86;
  --navy: #082c3b;
  --forest: #0b3935;
  --deep: #071e21;
  --green: #149c74;
  --green-dark: #08795a;
  --lime: #b1d974;
  --mint: #eaf7f0;
  --line: #e3ebe7;
  --surface: #ffffff;
  --background: #f5f9f7;
  --shadow: 0 14px 45px rgba(15, 57, 48, .055);
  --radius: 17px;
  font-family: Inter, "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; color: var(--ink); background: var(--background); }
a { color: var(--green-dark); text-decoration: none; }
a:hover { color: #086347; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid rgba(37, 173, 122, .45); outline-offset: 3px; }
svg { width: 20px; height: 20px; flex-shrink: 0; }

/* HEADER: logo corporativo + navegación de primer nivel */
.ems-app { min-height: 100vh; display: flex; flex-direction: column; }
.ems-header {
  height: 88px; min-height: 88px; display: flex; align-items: center; gap: 28px;
  padding: 0 clamp(22px, 3vw, 46px) 0 24px;
  background: #fff; box-shadow: 0 1px 0 var(--line);
  position: relative; z-index: 3;
}
.ems-brand { display: inline-flex; align-items: center; gap: 13px; min-width: 285px; color: var(--ink); }
.ems-brand:hover { color: var(--ink); }
.ems-brand-symbol {
  display: flex; align-items: center; justify-content: center;
  width: 58px; height: 58px; flex-shrink: 0;
  border: 1px solid #e6eeeb; border-radius: 15px;
  background: linear-gradient(150deg, #fff, #f2faf5);
  box-shadow: 0 5px 16px rgba(2, 81, 63, .06);
}
.ems-brand-symbol img { width: 43px; height: 43px; object-fit: contain; }
.ems-brand-type { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ems-brand-type strong { font-size: 14px; letter-spacing: .035em; white-space: nowrap; color: #0c384a; font-weight: 850; }
.ems-brand-type strong span { font-weight: 440; letter-spacing: .08em; }
.ems-brand-type small { display: flex; align-items: center; gap: 7px; color: #8b9a99; font-size: 9px; white-space: nowrap; font-weight: 750; letter-spacing: .085em; }
.ems-brand-type small i { width: 3px; height: 3px; border-radius: 100%; background: #53b88c; }
.ems-header-divider { height: 30px; width: 1px; background: #e5eeea; flex-shrink: 0; }
.ems-top-nav { align-self: stretch; display: flex; align-items: stretch; gap: 6px; }
.ems-top-link {
  display: inline-flex; align-items: center; gap: 10px; padding: 0 18px;
  color: #637975; border-bottom: 3px solid transparent;
  font-size: 13px; font-weight: 700; transition: color .18s, background .18s;
}
.ems-top-link svg { width: 19px; height: 19px; }
.ems-top-link:hover { color: var(--green-dark); background: #f7fbf8; }
.ems-top-link.active { color: var(--green-dark); border-bottom-color: #22a778; background: linear-gradient(0deg, rgba(33, 174, 119, .055), transparent 70%); }
.ems-header-actions { display: flex; align-items: center; gap: 17px; margin-left: auto; min-width: 0; }
.ems-platform-tag {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 11px; background: #f0f8f3; border: 1px solid #e2f0e6;
  border-radius: 99px; font-size: 10px; color: #357e60;
  font-weight: 800; letter-spacing: .055em; white-space: nowrap;
}
.status-pulse { width: 7px; height: 7px; border-radius: 50%; background: #2eae7e; box-shadow: 0 0 0 4px rgba(46, 174, 126, .11); display: inline-block; flex-shrink: 0; }
.ems-user { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ems-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #e3f2eb; color: #128561; font-size: 14px; font-weight: 800; flex-shrink: 0; }
.ems-user-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; max-width: 165px; }
.ems-user-info strong { color: #1e403a; font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ems-user-info span { color: #8b9c96; font-size: 11px; }
.ems-signout { color: #78918a; border-left: 1px solid var(--line); padding: 8px 0 8px 17px; display: flex; align-items: center; }
.ems-signout:hover { color: var(--green-dark); }

/* BARRA IZQUIERDA CONTEXTUAL Y ÁREA DE TRABAJO */
.ems-workspace { flex: 1; display: grid; grid-template-columns: 257px minmax(0, 1fr); }
.ems-sidebar {
  min-width: 0; display: flex; flex-direction: column;
  background: #fff; border-right: 1px solid var(--line);
  padding: 35px 19px 28px;
}
.ems-side-section-head { padding: 0 11px 25px; border-bottom: 1px solid #edf1ee; }
.ems-side-overline, .ems-side-menu-label { font-size: 9px; color: #8fa29b; font-weight: 850; letter-spacing: .17em; }
.ems-side-title { font-size: 19px; font-weight: 800; color: var(--forest); margin-top: 11px; letter-spacing: -.035em; }
.ems-side-section-head p { font-size: 11px; margin: 8px 0 0; color: #81938d; line-height: 1.6; }
.ems-side-menu { margin-top: 25px; display: flex; flex-direction: column; gap: 6px; }
.ems-side-menu-label { padding-left: 12px; margin: 0 0 11px; }
.ems-side-link {
  display: flex; gap: 12px; align-items: center; padding: 12px 13px; border-radius: 11px;
  color: #6e827c; font-size: 12px; font-weight: 675;
  transition: color .16s, background .16s;
}
.ems-side-link svg { width: 19px; height: 19px; }
.ems-side-link:hover { background: #f3faf6; color: #0d7656; }
.ems-side-link.active { background: #e8f5ed; color: #087951; font-weight: 800; box-shadow: inset 3px 0 0 #22a576; }
.ems-side-bottom { margin-top: auto; padding: 26px 12px 0; color: #9ba9a2; }
.ems-side-decoration { display: flex; height: 27px; gap: 5px; align-items: flex-end; opacity: .58; margin-bottom: 13px; }
.ems-side-decoration span { display: block; width: 5px; background: #50bd8b; border-radius: 5px; }
.ems-side-decoration span:nth-child(1) { height: 10px; }
.ems-side-decoration span:nth-child(2) { height: 24px; }
.ems-side-decoration span:nth-child(3) { height: 14px; }
.ems-side-decoration span:nth-child(4) { height: 20px; }
.ems-side-decoration span:nth-child(5) { height: 7px; }
.ems-side-bottom-title { color: #5b7770; font-size: 9px; font-weight: 800; letter-spacing: .09em; }
.ems-side-bottom p { margin: 6px 0 0; font-size: 11px; }
.ems-main {
  min-width: 0; display: flex; flex-direction: column;
  background:
    radial-gradient(ellipse at 90% -5%, rgba(154, 219, 165, .12), transparent 33%),
    radial-gradient(ellipse at -10% 90%, rgba(9, 156, 122, .055), transparent 44%),
    var(--background);
}
.ems-main-inner { flex: 1; width: min(1320px, 100%); margin: 0 auto; padding: 28px clamp(25px, 4.2vw, 65px) 48px; }
.ems-breadcrumb { color: #9aad9e; display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 700; margin-bottom: 38px; }
.ems-breadcrumb span:first-child { color: var(--green-dark); }
.ems-breadcrumb strong { color: #667f74; font-weight: 700; }
.crumb-separator { color: #c2d3c9; }
.ems-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px clamp(25px, 4.2vw, 65px); border-top: 1px solid #e8eeeb; color: #94a49c; font-size: 10px; letter-spacing: .02em; }

/* ENCABEZADOS Y TARJETAS */
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 31px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 10px; letter-spacing: .155em; font-weight: 850; color: #178a66; }
.eyebrow-dot { width: 7px; height: 7px; display: inline-block; border-radius: 2px; background: #1eb184; transform: rotate(45deg); }
h1 { font-size: clamp(29px, 3.2vw, 42px); line-height: 1.13; letter-spacing: -.052em; color: #133c34; font-weight: 800; margin: 12px 0 13px; }
h2 { margin: 0; font-size: 19px; font-weight: 780; letter-spacing: -.038em; }
p { line-height: 1.65; }
.page-heading p { max-width: 650px; color: #83978d; font-size: 13px; margin: 0; }
.heading-accent { color: #139972; }
.page-heading-tag { background: #ecf7ee; border: 1px solid #d8ecde; color: #4f9170; font-size: 9px; font-weight: 850; letter-spacing: .13em; border-radius: 7px; padding: 11px 14px; white-space: nowrap; margin-bottom: 5px; }
.feature-card, .card {
  background: var(--surface); border: 1px solid #e4ece8; border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.feature-card { padding: 28px 32px; min-width: 0; }
.card { padding: 27px; margin-bottom: 22px; }
.feature-card-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.feature-card-header h2 { margin-top: 7px; }
.card-overline { font-size: 9px; letter-spacing: .15em; color: #8fa6a0; font-weight: 850; }
.card-badge { display: inline-flex; align-items: center; gap: 10px; padding: 8px 11px; color: #3e8d6a; background: #eef8f0; border: 1px solid #dfefe4; border-radius: 6px; font-size: 9px; letter-spacing: .08em; font-weight: 850; white-space: nowrap; }
.card-description { color: #869c92; font-size: 12px; margin-top: 10px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.23fr) minmax(280px, .77fr); gap: 22px; }
.counter-card { min-height: 455px; display: flex; flex-direction: column; }
.counter-stage { flex: 1; display: grid; place-items: center; min-height: 245px; }
.counter-orbit { width: 212px; height: 212px; padding: 16px; border-radius: 50%; position: relative; background: conic-gradient(from -110deg, #0c8a64 0deg, #8aca89 140deg, #d9efe3 200deg, #d9efe3 315deg, #0c8a64 360deg); box-shadow: 0 0 0 11px #f2faf5; }
.counter-orbit::before { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 100%; background: #4ab882; top: 27px; right: 23px; box-shadow: 0 0 0 5px #e5f7e9; }
.counter-orbit-inner { background: #fff; width: 100%; height: 100%; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-direction: column; box-shadow: inset 0 0 35px rgba(10, 123, 86, .05); }
.counter-overline, .counter-unit { color: #88a399; font-size: 9px; font-weight: 850; letter-spacing: .14em; }
.counter-value { font-size: 66px; color: #0b5b46; font-weight: 800; letter-spacing: -.06em; line-height: 1.3; font-variant-numeric: tabular-nums; }
.counter-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 11px; margin-top: 4px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; background: linear-gradient(135deg, #138969, #149d71); color: #fff; box-shadow: 0 7px 19px rgba(11, 127, 87, .15); border-radius: 9px; padding: 12px 19px; font-size: 12px; line-height: 1.2; font-weight: 750; text-decoration: none; transition: background .16s, transform .16s, box-shadow .16s; }
.button svg { width: 16px; height: 16px; }
.button:hover { color: #fff; background: linear-gradient(135deg, #0f795c, #0e8b64); box-shadow: 0 9px 22px rgba(11, 127, 87, .22); transform: translateY(-1px); }
.button.secondary { color: #3c7460; background: #edf6f1; box-shadow: none; border-color: #dcebe2; }
.button.secondary:hover { background: #e0f0e7; color: #1a674c; }
.button.danger { background: #b9444a; color: #fff; box-shadow: none; }
.button.danger:hover { background: #a3323a; }
.button:disabled { opacity: .55; transform: none; box-shadow: none; }
.button.full { width: 100%; }
.overview-card { min-height: 455px; overflow: hidden; position: relative; display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(155deg, #0c3f39 0%, #0b3132 47%, #092b37 100%); border-color: #0a4942; color: white; padding: 35px; }
.overview-card::before { content: ""; position: absolute; width: 360px; height: 360px; right: -210px; top: -220px; border: 1px solid rgba(168, 221, 173, .3); border-radius: 50%; box-shadow: 0 0 0 42px rgba(111, 207, 151, .035), 0 0 0 94px rgba(111, 207, 151, .028); }
.overview-card::after { content: ""; position: absolute; height: 130px; width: 150%; bottom: -60px; left: -55px; background: radial-gradient(ellipse at top, rgba(87, 184, 116, .13), transparent 65%); pointer-events: none; }
.overview-symbol { position: absolute; top: 36px; right: 33px; height: 106px; width: 106px; border: 1px solid rgba(209, 239, 221, .12); border-radius: 19px; display: grid; place-items: center; background: rgba(255,255,255,.075); }
.overview-symbol img { width: 83px; height: 83px; filter: brightness(1.5); }
.overview-card .card-overline { color: #9acdba; }
.overview-card h2 { margin-top: 13px; font-size: clamp(26px, 2.8vw, 33px); line-height: 1.14; letter-spacing: -.05em; max-width: 340px; color: #fff; position: relative; }
.overview-card p { color: #a8c7c1; max-width: 350px; font-size: 12px; line-height: 1.8; margin: 16px 0 0; position: relative; }
.overview-rule { margin: 25px 0 16px; height: 1px; background: rgba(187, 233, 209, .17); position: relative; }
.overview-caption { color: #83bea9; letter-spacing: .17em; font-size: 9px; font-weight: 850; position: relative; }

/* FORMULARIOS DE ADMINISTRACIÓN */
.form-card { max-width: 1040px; margin-bottom: 22px; }
.form-card .feature-card-header { margin-bottom: 23px; }
.form-section-label { border-top: 1px solid #edf1ed; margin: 22px 0 17px; padding-top: 19px; font-size: 10px; font-weight: 850; letter-spacing: .12em; color: #138c66; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 22px; }
label { display: block; margin: 8px 0 16px; color: #536f65; font-size: 12px; font-weight: 730; }
input:not([type=checkbox]), textarea, select { width: 100%; min-width: 0; display: block; color: #163c33; background: #fbfdfc; border: 1px solid #dbe8e1; border-radius: 9px; margin-top: 8px; padding: 12px 14px; outline: 0; transition: border-color .15s, box-shadow .15s, background .15s; }
input:not([type=checkbox]):hover { border-color: #b8d4c3; }
input:not([type=checkbox]):focus, textarea:focus, select:focus { background: #fff; border-color: #36a67d; box-shadow: 0 0 0 3px rgba(50, 177, 119, .105); }
input::placeholder { color: #9cafaa; }
input[type=checkbox] { accent-color: #159a70; vertical-align: middle; margin: 0 8px 0 0; }
.check { display: flex; gap: 4px; align-items: center; font-weight: 500; }
.form-actions { border-top: 1px solid #edf2ee; margin-top: 19px; padding-top: 23px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form-actions span { color: #92a49b; font-size: 11px; }
.error { color: #8e2734; background: #fff1f2; border: 1px solid #f1cbd0; padding: 13px 16px; border-radius: 9px; font-size: 12px; }
.success { color: #116648; background: #e9f7ef; border: 1px solid #cbe6d5; padding: 13px 16px; margin-bottom: 18px; border-radius: 9px; font-size: 12px; }
.validation-message, .validation-summary-errors { color: #b13c45; font-size: 12px; }
.validation-summary-valid { display: none; }
.danger-zone { border-color: #f0dcd9; }
.danger-zone .card-overline, .danger-zone h2 { color: #ac424a; }
.danger-zone p { color: #81928a; font-size: 12px; }
.caption { color: #8a9e93; font-size: 11px; }
.loading-text, .empty-state { color: #80968b; padding: 24px 0; font-size: 13px; }
.users-card { padding-bottom: 18px; }
.table-wrap { overflow-x: auto; margin-top: 25px; border: 1px solid #e7eee8; border-radius: 11px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
th { padding: 16px 17px; background: #f6faf7; color: #71877c; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; font-weight: 850; white-space: nowrap; }
td { padding: 16px 17px; color: #587067; border-top: 1px solid #edf2ed; vertical-align: middle; }
td strong { color: #23483a; font-size: 12px; }
tr:hover td { background: #fbfefb; }
.table-action { display: inline-flex; gap: 8px; font-weight: 800; white-space: nowrap; }
.table-action span { color: #1ca873; }

/* LOGIN, LOGOUT Y ACCESO DENEGADO: mismo lenguaje de marca */
.login-page { min-height: 100vh; padding: 30px; background: #f0f6f2; display: grid; place-items: center; }
.auth-shell { width: min(1130px, 100%); min-height: 650px; display: grid; grid-template-columns: 1fr 1fr; border-radius: 22px; overflow: hidden; background: #fff; box-shadow: 0 28px 90px rgba(9, 48, 38, .12); border: 1px solid #e4ece5; }
.auth-visual { color: white; background: radial-gradient(circle at 95% 14%, #1e745c 0%, transparent 34%), linear-gradient(160deg, #0d4a3f, #0a3434 58%, #092b3b); position: relative; min-height: 600px; overflow: hidden; }
.auth-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(212, 245, 219, .075) 1px, transparent 1px), linear-gradient(90deg, rgba(212,245,219,.075) 1px, transparent 1px); background-size: 45px 45px; mask-image: linear-gradient(120deg, transparent 16%, #000 100%); opacity: .65; }
.auth-visual::after { content: ""; position: absolute; top: -180px; right: -210px; border: 1px solid rgba(174, 241, 175, .25); border-radius: 50%; width: 490px; height: 490px; box-shadow: 0 0 0 85px rgba(151, 232, 167, .033), 0 0 0 165px rgba(151, 232, 167, .028); }
.auth-visual-inner { z-index: 1; position: relative; display: flex; flex-direction: column; min-height: 650px; padding: 39px 43px 32px; }
.auth-logo-card { width: 161px; height: 102px; padding: 7px 10px; border-radius: 14px; background: #fff; box-shadow: 0 12px 25px rgba(5, 32, 23, .10); }
.auth-logo-card img { width: 100%; height: 100%; object-fit: contain; }
.auth-visual-copy { margin-top: auto; margin-bottom: auto; padding: 35px 0; }
.auth-overline { display: inline-flex; align-items: center; gap: 12px; font-size: 10px; letter-spacing: .17em; font-weight: 850; color: #b7debd; }
.auth-visual-copy h1 { color: #fff; margin: 27px 0 18px; font-size: clamp(37px, 3.4vw, 49px); line-height: 1.13; letter-spacing: -.055em; }
.auth-visual-copy h1 em { font-style: normal; color: #a6d97b; }
.auth-visual-copy p { font-size: 13px; max-width: 350px; color: #b7d4cb; line-height: 1.85; }
.auth-visual-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgba(227, 255, 233, .16); padding-top: 22px; font-size: 9px; font-weight: 800; color: #9dcbb7; letter-spacing: .13em; }
.auth-form-side { min-width: 0; display: flex; justify-content: center; flex-direction: column; padding: 43px 60px 30px; }
.auth-form-inner { width: 100%; max-width: 365px; margin: auto; }
.auth-form-inner h2 { color: #123c32; font-size: 40px; line-height: 1.17; letter-spacing: -.058em; margin: 20px 0 13px; }
.auth-lead { color: #84988f; font-size: 13px; line-height: 1.7; margin: 0 0 30px; }
.auth-form label { color: #4e7063; margin-bottom: 16px; }
.auth-form input:not([type=checkbox]) { padding: 14px 15px; background: #fafdfb; }
.auth-form .auth-remember { margin: 10px 0 24px; font-size: 12px; }
.auth-form .button { justify-content: space-between; width: 100%; padding: 15px 19px; }
.auth-form .button span { font-size: 18px; font-weight: 400; }
.auth-form-footer { color: #9aaba1; font-size: 10px; text-align: center; margin-top: 30px; }
.auth-simple-page { background: radial-gradient(circle at 88% 10%, #dcefe3, transparent 35%), #f0f6f2; }
.auth-simple-card { width: min(470px, 100%); padding: 43px; background: white; border-radius: 18px; border: 1px solid #e3ede5; box-shadow: 0 20px 70px rgba(8, 53, 37, .1); }
.auth-simple-logo { display: block; width: 140px; height: 88px; object-fit: contain; margin-bottom: 34px; }
.auth-simple-card h1 { font-size: 34px; margin: 18px 0 12px; }
.auth-simple-card p { font-size: 13px; color: #82968c; margin-bottom: 29px; }
.auth-simple-card .button { margin-top: 4px; }
.auth-back-link { display: block; margin-top: 19px; font-size: 12px; text-align: center; }

/* ACCESIBILIDAD Y ADAPTACIÓN A PANTALLAS MÁS PEQUEÑAS */
@media (max-width: 1280px) {
  .ems-header { gap: 16px; padding-right: 21px; }
  .ems-brand { min-width: 246px; gap: 10px; }
  .ems-brand-type strong { font-size: 12px; }
  .ems-platform-tag { display: none; }
  .ems-top-link { padding: 0 13px; }
  .ems-workspace { grid-template-columns: 230px minmax(0,1fr); }
}
@media (max-width: 920px) {
  .ems-header { height: auto; min-height: 76px; flex-wrap: wrap; gap: 0 18px; padding: 12px 21px 0; }
  .ems-brand { flex: 1; }
  .ems-header-divider { display: none; }
  .ems-top-nav { order: 3; width: 100%; height: 52px; }
  .ems-top-link { padding: 0 16px; }
  .ems-workspace { grid-template-columns: 1fr; }
  .ems-sidebar { padding: 16px 22px; border-right: none; border-bottom: 1px solid var(--line); }
  .ems-side-section-head, .ems-side-bottom { display: none; }
  .ems-side-menu { display: flex; flex-direction: row; flex-wrap: wrap; margin: 0; gap: 8px; }
  .ems-side-menu-label { display: none; }
  .ems-side-link { padding: 10px 14px; }
  .ems-main-inner { padding-top: 21px; }
  .ems-breadcrumb { margin-bottom: 24px; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr); }
  .overview-card { min-height: 300px; }
}
@media (max-width: 650px) {
  .ems-header { padding: 11px 14px 0; }
  .ems-brand { min-width: 0; gap: 9px; }
  .ems-brand-symbol { height: 44px; width: 44px; border-radius: 11px; }
  .ems-brand-symbol img { width: 34px; height: 34px; }
  .ems-brand-type strong { font-size: 11px; }
  .ems-brand-type small { font-size: 7px; }
  .ems-user-info { display: none; }
  .ems-header-actions { gap: 10px; margin-left: 0; }
  .ems-signout { padding-left: 10px; }
  .ems-top-nav { height: 50px; }
  .ems-top-link { padding: 0 13px; font-size: 12px; }
  .ems-sidebar { padding: 11px 14px; }
  .ems-side-link { font-size: 11px; }
  .ems-main-inner { padding: 18px 15px 35px; }
  .ems-breadcrumb { margin-bottom: 25px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 18px; margin-bottom: 21px; }
  .page-heading .button { align-self: flex-start; }
  .page-heading p { font-size: 12px; }
  .feature-card { padding: 20px; border-radius: 14px; }
  .feature-card-header { flex-wrap: wrap; }
  .counter-card { min-height: 415px; }
  .counter-orbit { height: 180px; width: 180px; }
  .counter-value { font-size: 55px; }
  .overview-card { padding: 25px; }
  .fields { grid-template-columns: minmax(0,1fr); gap: 0; }
  .ems-footer { padding: 17px 15px; flex-wrap: wrap; gap: 5px; }
  .login-page { padding: 0; }
  .auth-shell { min-height: 100vh; border-radius: 0; border: 0; display: flex; flex-direction: column; }
  .auth-visual { min-height: 230px; }
  .auth-visual-inner { min-height: 230px; padding: 23px; }
  .auth-logo-card { width: 116px; height: 75px; }
  .auth-visual-copy { padding: 7px 0 0; }
  .auth-visual-copy h1 { margin: 10px 0 8px; font-size: 28px; }
  .auth-visual-copy p { display: none; }
  .auth-visual-footer { display: none; }
  .auth-form-side { padding: 37px 25px 22px; flex: 1; }
  .auth-form-inner h2 { font-size: 33px; }
  .auth-form-footer { margin-top: 30px; }
  .auth-simple-card { border-radius: 0; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Formularios de configuración EMS */
.ems-config-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin:20px 0}
.ems-config-grid label,.ems-config-field{display:flex;flex-direction:column;gap:7px;color:#587366;font-size:12px;font-weight:650}
.ems-config-grid input,.ems-config-grid select,.ems-config-grid textarea,.ems-config-field input,.ems-config-field select,.ems-config-field textarea{width:100%;max-width:100%;padding:11px;border:1px solid #d7e5dd;border-radius:8px;color:#214b3d;background:white;font:inherit}
.ems-config-grid textarea,.ems-config-field textarea{min-height:132px;font:12px/1.6 monospace}
.ems-config-wide{grid-column:1/-1}
.ems-config-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:16px 0}
.ems-config-note{font-size:12px;color:#7b9388;margin:12px 0}
.ems-config-table{width:100%;border-collapse:collapse;margin:18px 0;font-size:12px}
.ems-config-table th,.ems-config-table td{border-bottom:1px solid #e5ede7;padding:11px;text-align:left;vertical-align:top}
.ems-config-table th{color:#668476;font-weight:750}.ems-config-table button{border:0;background:#eaf4ee;border-radius:7px;padding:7px 10px;color:#25634a;cursor:pointer}
.ems-config-links{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px}.ems-config-links a{padding:22px;border:1px solid #dce9e0;border-radius:12px;background:white;color:#195a42;text-decoration:none;font-weight:750}
@media(max-width:740px){.ems-config-grid{grid-template-columns:1fr}.ems-config-table{display:block;overflow-x:auto}}
