/* Portal de Empleados — estilos propios, independientes del sitio público */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
   --navy:   #0d3350;
   --navy-2: #061a2e;
   --teal:   #17acc6;
   --teal-d: #128ba1;
   --ink:    #33404a;
   --muted:  #6b7785;
   --line:   #e2e8ec;
   --bg:     #eef2f5;
   --ok:     #3ec98a;
   --err:    #d64550;
}

body {
   font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
   background: var(--bg);
   color: var(--ink);
   min-height: 100vh;
}

a { color: var(--teal-d); }

/* ---------- Barra superior ---------- */
.portal-top {
   background: #fff;
   border-bottom: 1px solid var(--line);
   padding: 14px 22px;
   display: flex;
   align-items: center;
   justify-content: space-between;
}
.portal-top img { height: 24px; width: auto; display: block; }
.portal-top .home-logo { line-height: 0; text-decoration: none; }
.portal-top .who { font-size: 13px; color: var(--muted); }
.portal-top .who strong { color: var(--navy); }
.portal-top a.salir {
   font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
   text-decoration: none; color: var(--teal-d); margin-left: 14px;
}

/* ---------- Login ---------- */
.login-wrap {
   min-height: calc(100vh - 53px);
   display: flex; align-items: center; justify-content: center;
   padding: 40px 20px;
}
.login-card {
   width: 100%; max-width: 380px; background: #fff;
   border-radius: 20px; padding: 36px 32px;
   box-shadow: 0 20px 46px rgba(13, 51, 80, .12);
}
.login-card .brand { text-align: center; margin-bottom: 6px; }
.login-card .brand img { height: 26px; }
.login-card h1 {
   font-size: 16px; font-weight: 700; color: var(--navy);
   text-align: center; margin-bottom: 4px;
}
.login-card .sub {
   font-size: 12.5px; color: var(--muted); text-align: center; margin-bottom: 22px;
}
.field { margin-bottom: 14px; }
.field label {
   display: block; font-size: 11px; font-weight: 700; text-transform: uppercase;
   letter-spacing: .6px; color: var(--muted); margin-bottom: 6px;
}
.field input {
   width: 100%; border: 1px solid var(--line); border-radius: 10px;
   padding: 11px 13px; font-size: 14px; color: var(--ink); background: #fff;
}
.field input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(23,172,198,.15); }
.field.code input { letter-spacing: 6px; text-align: center; font-size: 18px; font-weight: 700; }

.btn {
   width: 100%; border: 0; cursor: pointer; background: var(--teal); color: #fff;
   font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
   padding: 13px; border-radius: 50px; transition: background .2s;
}
.btn:hover { background: var(--teal-d); }
a.btn {
   display: block; text-align: center; text-decoration: none;
   box-sizing: border-box;
}

/* ---------- Configuración de 2FA (QR) ---------- */
.qr-box {
   background: #fff; border: 1px solid var(--line); border-radius: 14px;
   padding: 14px; margin: 4px auto 18px; width: max-content; line-height: 0;
}
.qr-box img { width: 220px; height: 220px; image-rendering: pixelated; }
.qr-steps {
   text-align: left; font-size: 13px; color: var(--ink); line-height: 1.7;
   margin: 0 0 16px; padding-left: 20px;
}
.qr-steps strong { color: var(--navy); }
.qr-manual {
   text-align: left; font-size: 12.5px; color: var(--muted);
   border-top: 1px solid var(--line); padding-top: 12px; margin-bottom: 18px;
}
.qr-manual summary { cursor: pointer; font-weight: 700; color: var(--teal-d); }
.qr-manual p { margin: 8px 0 0; }
.qr-manual code {
   background: #f2f6f8; border: 1px solid var(--line); border-radius: 6px;
   padding: 2px 6px; font-size: 12.5px; color: var(--ink); word-break: break-all;
}

.alert {
   background: #fdecee; border: 1px solid #f5c2c7; color: var(--err);
   font-size: 12.5px; border-radius: 10px; padding: 10px 12px; margin-bottom: 16px;
}
.hint { font-size: 11.5px; color: var(--muted); margin-top: 14px; text-align: center; line-height: 1.5; }

/* ---------- Panel ---------- */
.panel-wrap { max-width: 960px; margin: 0 auto; padding: 34px 22px 60px; }
.panel-wrap h1 { font-size: 20px; color: var(--navy); margin-bottom: 4px; }
.panel-wrap .lead { font-size: 13.5px; color: var(--muted); margin-bottom: 26px; }

.apps-grid {
   display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px;
}
.app-card {
   background: #fff; border: 1px solid var(--line); border-radius: 16px;
   padding: 20px; text-decoration: none; color: inherit; display: block;
   transition: box-shadow .2s, transform .2s;
}
.app-card:hover { box-shadow: 0 12px 30px rgba(13,51,80,.10); transform: translateY(-2px); }
.app-card .ic {
   width: 38px; height: 38px; border-radius: 10px; background: #e8f6f9; color: var(--teal-d);
   display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700;
   margin-bottom: 12px;
}
.app-card h3 { font-size: 14.5px; color: var(--navy); margin-bottom: 4px; }
.app-card p { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.app-card .env {
   display: inline-block; margin-top: 10px; font-size: 10.5px; font-weight: 700;
   text-transform: uppercase; letter-spacing: .5px; color: var(--muted);
   border: 1px solid var(--line); border-radius: 50px; padding: 3px 9px;
}
.badge-ok { color: var(--ok); }
