:root {
    --ink: #14181C;
    --ink-soft: #2D353A;
    --muted: #687176;
    --faint: #98a2b3;
    --line: #D9DEDC;
    --canvas: #EDEFF0;
    --surface: #ffffff;
    --surface-soft: #F5F7F6;
    --sidebar: #14181C;
    --sidebar-raised: #1D2328;
    --sidebar-muted: #9AA5A0;
    --primary: #3E7A4F;
    --primary-dark: #315F3F;
    --primary-soft: #EAF3ED;
    --green: #3E7A4F;
    --green-soft: #EAF3ED;
    --violet: #1FA7A0;
    --violet-soft: #E6F5F4;
    --amber: #a76b16;
    --amber-soft: #fff4df;
    --red: #B4472F;
    --red-soft: #F8ECE8;
    --slate-soft: #eef2f6;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .03);
    --shadow-md: 0 10px 28px rgba(16, 24, 40, .08), 0 2px 6px rgba(16, 24, 40, .04);
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--canvas);
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

button,
input {
    font: inherit;
}

button,
a,
input {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

img,
svg {
    display: block;
}

svg {
    width: 1.2em;
    height: 1.2em;
}

input::placeholder {
    color: #a3adbb;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(62, 122, 79, .22);
    outline-offset: 2px;
}

[hidden] {
    display: none !important;
}

.mono {
    font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

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

.eyebrow,
.section-kicker,
.sidebar-section-label,
.topbar-overline {
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
    line-height: 1.2;
    text-transform: uppercase;
}

.section-kicker {
    color: #7b8798;
}

.eyebrow-rule {
    width: 34px;
    height: 1px;
    background: #BFD4C4;
}

.eyebrow.light {
    color: #B9D7C0;
}

.light-rule {
    background: rgba(126, 171, 138, .45);
}

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.status-dot.online {
    background: #36c98b;
    box-shadow: 0 0 0 3px rgba(54, 201, 139, .14);
}

.status-dot.offline {
    background: #ed7181;
    box-shadow: 0 0 0 3px rgba(237, 113, 129, .14);
}

/* AUTHENTICATION */

.auth-page {
    min-height: 100vh;
    background: #EDEFF0;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(520px, 1.08fr) minmax(440px, .92fr);
}

.auth-identity {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
    padding: 34px clamp(36px, 6vw, 92px) 30px;
    color: #fff;
    background-color: var(--sidebar);
    background-image:
        linear-gradient(125deg, rgba(62, 122, 79, .24), transparent 42%),
        linear-gradient(180deg, transparent 0%, rgba(7, 12, 22, .18) 100%);
}

.auth-identity::before {
    content: "";
    position: absolute;
    right: -130px;
    bottom: 90px;
    width: 440px;
    height: 440px;
    border: 1px solid rgba(124, 171, 136, .12);
    border-radius: 50%;
    box-shadow: 0 0 0 48px rgba(124, 171, 136, .035), 0 0 0 96px rgba(124, 171, 136, .025);
    pointer-events: none;
}

.auth-identity::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .42;
    background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(135deg, rgba(0,0,0,.7), transparent 70%);
}

.auth-topline,
.auth-identity-body,
.auth-footer {
    position: relative;
    z-index: 1;
}

.auth-topline,
.auth-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: #E0EEE3;
    background: #3E7A4F;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 11px;
    box-shadow: 0 6px 16px rgba(0,0,0,.18);
}

.brand-mark svg {
    width: 24px;
    height: 24px;
}

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

.brand-copy strong {
    color: inherit;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    white-space: nowrap;
}

.brand-copy small {
    color: #8492a8;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .12em;
    line-height: 1;
    white-space: nowrap;
}

.brand-auth {
    color: #fff;
}

.auth-reference {
    color: #8593a8;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .16em;
    white-space: nowrap;
}

.auth-identity-body {
    width: min(590px, 100%);
    margin: auto 0;
    padding: 90px 0 74px;
}

.auth-eyebrow-row {
    margin-bottom: 22px;
}

.auth-identity h1 {
    max-width: 580px;
    margin: 0;
    color: #fff;
    font-size: clamp(42px, 5.1vw, 70px);
    font-weight: 720;
    letter-spacing: -.055em;
    line-height: .98;
}

.auth-identity h1 em {
    color: #B9D7C0;
    font-style: normal;
}

.auth-identity-body > p {
    max-width: 500px;
    margin: 23px 0 0;
    color: #aeb9ca;
    font-size: 15px;
    line-height: 1.75;
}

.auth-feature-list {
    display: grid;
    gap: 0;
    max-width: 510px;
    margin-top: 48px;
    border-top: 1px solid rgba(255,255,255,.12);
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.auth-feature-icon {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    color: #B9D7C0;
    background: rgba(62, 122, 79, .14);
    border: 1px solid rgba(126, 171, 138, .17);
    border-radius: 9px;
    flex: 0 0 auto;
}

.auth-feature-icon svg {
    width: 17px;
    height: 17px;
}

.auth-feature span:last-child {
    display: grid;
    gap: 1px;
}

.auth-feature strong {
    color: #EDF5EF;
    font-size: 12px;
    font-weight: 700;
}

.auth-feature small {
    color: #8593a8;
    font-size: 11px;
}

.auth-footer {
    color: #718096;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .14em;
}

.auth-footer-line {
    height: 1px;
    flex: 1;
    background: rgba(255,255,255,.12);
}

.auth-panel {
    display: grid;
    place-items: center;
    padding: 54px clamp(28px, 6vw, 86px);
    background: #F5F7F6;
}

.auth-panel-inner {
    width: min(420px, 100%);
}

.auth-heading {
    margin-bottom: 31px;
}

.auth-heading h2 {
    margin: 10px 0 7px;
    color: var(--ink);
    font-size: 31px;
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1.1;
}

.auth-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.auth-form {
    display: grid;
    gap: 19px;
}

.auth-form label:not(.remember-row) {
    display: grid;
    gap: 8px;
}

.auth-form label > span,
.date-selector label {
    color: #475467;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .02em;
}

.field-control,
.input-with-icon,
.search-field {
    position: relative;
    display: flex;
    align-items: center;
}

.field-control > svg,
.input-with-icon > svg,
.search-field > svg {
    position: absolute;
    left: 13px;
    z-index: 1;
    width: 18px;
    height: 18px;
    color: #98a2b3;
    pointer-events: none;
}

.auth-form input[type="text"],
.auth-form input[type="password"],
.date-selector input,
.search-field input {
    width: 100%;
    height: 45px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid #d7dee8;
    border-radius: 9px;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.auth-form input[type="text"],
.auth-form input[type="password"] {
    padding: 0 14px 0 42px;
}

.date-selector input {
    min-width: 174px;
    padding: 0 12px 0 39px;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.search-field input {
    min-width: 245px;
    padding: 0 14px 0 41px;
    font-size: 12px;
}

.auth-form input:focus,
.date-selector input:focus,
.search-field input:focus {
    border-color: #6B9B77;
    box-shadow: 0 0 0 4px rgba(62, 122, 79, .12);
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 12px;
}

.remember-row input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 17px;
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px solid #d7dee8;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 750;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.btn svg {
    width: 17px;
    height: 17px;
}

.btn:hover {
    border-color: #aebbd0;
    box-shadow: var(--shadow-sm);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 5px 12px rgba(62, 122, 79, .20);
}

.btn-primary:hover {
    color: #fff;
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 7px 17px rgba(62, 122, 79, .26);
}

.btn-block {
    width: 100%;
    min-height: 48px;
    justify-content: space-between;
    padding: 0 17px 0 19px;
    font-size: 13px;
}

.auth-security-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 26px;
    padding-top: 18px;
    color: #98a2b3;
    border-top: 1px solid var(--line);
    font-size: 11px;
}

.auth-security-note svg {
    width: 16px;
    height: 16px;
    color: #6B9B77;
    flex: 0 0 auto;
}

/* APPLICATION SHELL */

.app-body {
    min-height: 100vh;
    background: var(--canvas);
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    width: 250px;
    height: 100vh;
    padding: 24px 15px 16px;
    color: #fff;
    background: var(--sidebar);
    box-shadow: inset -1px 0 rgba(255,255,255,.045);
}

.brand-sidebar {
    padding: 0 10px;
}

.sidebar-section-label {
    margin: 43px 11px 12px;
    color: #687891;
    font-size: 9px;
}

.side-nav {
    display: grid;
    gap: 4px;
}

.side-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 55px;
    padding: 8px 11px;
    color: #98a6ba;
    border: 1px solid transparent;
    border-radius: 10px;
    transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.side-nav-link:hover {
    color: #E7F0E9;
    background: rgba(255,255,255,.045);
}

.side-nav-link.active {
    color: #F7FAF8;
    background: var(--sidebar-raised);
    border-color: rgba(126, 171, 138, .14);
    box-shadow: inset 3px 0 #3E7A4F;
}

.side-nav-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: #8194b2;
    background: rgba(255,255,255,.04);
    border-radius: 8px;
    flex: 0 0 auto;
}

.side-nav-link.active .side-nav-icon {
    color: #C5DEC9;
    background: rgba(62, 122, 79, .20);
}

.side-nav-icon svg {
    width: 17px;
    height: 17px;
}

.side-nav-text {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.side-nav-text strong {
    font-size: 12px;
    font-weight: 700;
}

.side-nav-text small {
    color: #6f7f97;
    font-size: 10px;
}

.side-nav-link.active .side-nav-text small {
    color: #9EB7A4;
}

.side-nav-chevron {
    margin-left: auto;
    color: #647590;
    font-size: 16px;
}

.sidebar-spacer {
    flex: 1;
    min-height: 40px;
}

.sidebar-connection {
    margin: 0 5px 17px;
    padding: 14px;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
}

.sidebar-connection-head {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #DDE9E0;
    font-size: 11px;
    font-weight: 700;
}

.sidebar-connection p {
    margin: 8px 0 0;
    color: #8190a7;
    font-size: 10px;
    line-height: 1.55;
}

.sidebar-account {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 13px 9px 0;
    border-top: 1px solid rgba(255,255,255,.09);
}

.account-avatar {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    color: #D6E8DA;
    background: #345E40;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 800;
    flex: 0 0 auto;
}

.account-copy {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.account-copy small {
    color: #75849b;
    font-size: 9px;
}

.account-copy strong {
    overflow: hidden;
    color: #DDE7E0;
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-logout {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    margin-left: auto;
    color: #7788a3;
    border-radius: 7px;
    transition: color .16s ease, background .16s ease;
}

.account-logout:hover {
    color: #DDEBE0;
    background: rgba(255,255,255,.07);
}

.account-logout svg {
    width: 16px;
    height: 16px;
}

.app-main {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 20px;
    padding: 0 clamp(22px, 4vw, 53px);
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

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

.topbar-overline {
    color: #8b97a8;
    font-size: 9px;
}

.topbar-divider {
    color: #c1c8d2;
}

.topbar-current {
    overflow: hidden;
    color: #344054;
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-current a {
    color: #667085;
}

.topbar-current a:hover {
    color: var(--primary);
}

.topbar-environment {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667085;
    font-size: 11px;
    white-space: nowrap;
}

.topbar-user {
    padding-left: 15px;
    color: #344054;
    border-left: 1px solid var(--line);
    font-size: 11px;
    font-weight: 700;
}

.topbar-logout {
    color: #7b8798;
    font-size: 11px;
    font-weight: 650;
}

.topbar-logout:hover {
    color: var(--primary);
}

.app-content {
    flex: 1;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 0 clamp(22px, 4vw, 53px) 22px;
    color: #98a2b3;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.workspace {
    width: min(1440px, calc(100% - 76px));
    margin: 0 auto;
    padding: 43px 0 58px;
}

.page-hero,
.person-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 34px;
    margin-bottom: 34px;
}

.page-hero-copy {
    min-width: 0;
}

.page-hero h1,
.person-hero h1 {
    margin: 11px 0 7px;
    color: var(--ink);
    font-size: 42px;
    font-weight: 720;
    letter-spacing: -.055em;
    line-height: 1;
}

.page-hero p {
    max-width: 570px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 26px;
    padding-bottom: 3px;
    flex: 0 0 auto;
}

.hero-health {
    display: flex;
    align-items: center;
    gap: 9px;
}

.hero-health > div {
    display: grid;
    gap: 1px;
}

.hero-health strong {
    color: #344054;
    font-size: 11px;
    font-weight: 750;
}

.hero-health span:last-child {
    color: #98a2b3;
    font-size: 10px;
}

.hero-date {
    padding-left: 24px;
    border-left: 1px solid var(--line);
}

.hero-date span {
    display: block;
    color: #98a2b3;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .14em;
}

.hero-date strong {
    display: block;
    margin-top: 3px;
    color: #344054;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    color: #7b8798;
    font-size: 11px;
    font-weight: 700;
}

.back-link:hover {
    color: var(--primary);
}

.back-link span {
    font-size: 16px;
    line-height: 1;
}

.live-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--green);
    font-size: 10px;
    font-weight: 700;
}

.company-hero {
    align-items: flex-end;
}

.company-tools {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex: 0 0 auto;
}

.date-selector {
    display: grid;
    gap: 7px;
}

.input-with-icon {
    min-width: 174px;
}

.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 21px;
    padding: 12px 14px;
    color: #475467;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 12px;
}

.alert-icon {
    display: grid;
    place-items: center;
    width: 21px;
    height: 21px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 850;
    flex: 0 0 auto;
}

.alert.error {
    color: var(--red);
    background: var(--red-soft);
    border-color: #f4cdd4;
}

.alert.error .alert-icon {
    background: #ffdbe1;
}

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

.alert.success .alert-icon {
    background: #c9efdd;
}

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

.alert.warning .alert-icon {
    background: #ffe8b8;
}

.flash-stack .alert {
    margin-bottom: 12px;
}

/* COMPANIES */

.overview-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 43px;
}

.overview-card {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 88px;
    padding: 17px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.overview-icon {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    border-radius: 11px;
    flex: 0 0 auto;
}

.overview-icon svg {
    width: 19px;
    height: 19px;
}

.overview-icon.blue {
    color: var(--primary);
    background: var(--primary-soft);
}

.overview-icon.green {
    color: var(--green);
    background: var(--green-soft);
}

.overview-icon.slate {
    color: #667085;
    background: var(--slate-soft);
}

.overview-copy {
    display: grid;
    gap: 1px;
}

.overview-copy small {
    color: #7b8798;
    font-size: 10px;
    font-weight: 650;
}

.overview-copy strong {
    color: var(--ink);
    font-size: 22px;
    font-weight: 750;
    letter-spacing: -.035em;
    line-height: 1.1;
}

.overview-note {
    margin-left: auto;
    color: #a0aaba;
    font-size: 10px;
    text-align: right;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 17px;
}

.section-header h2 {
    margin: 7px 0 0;
    color: var(--ink);
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -.035em;
}

.section-count {
    color: #8b97a8;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}

.company-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 17px;
}

.company-tile {
    position: relative;
    display: flex;
    min-height: 316px;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform .17s ease, border-color .17s ease, box-shadow .17s ease;
}

.company-tile:hover {
    transform: translateY(-3px);
    border-color: #B9C9BE;
    box-shadow: var(--shadow-md);
}

.company-tile-accent {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--primary);
}

.company-tile-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 23px 22px 0;
}

.company-monogram {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid #DDEBE0;
    border-radius: 13px;
}

.company-monogram span {
    font-size: 20px;
    font-weight: 800;
    line-height: .9;
}

.company-monogram small {
    margin-top: -1px;
    color: #6B9B77;
    font-size: 7px;
    font-weight: 800;
    letter-spacing: .12em;
}

.connection {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 8px;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 750;
}

.connection i,
.photo-status i,
.profile-status i {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.connection.online {
    color: var(--green);
    background: var(--green-soft);
}

.connection.online i,
.photo-status.closed i,
.profile-status.success i {
    background: #1dab78;
}

.connection.offline {
    color: var(--red);
    background: var(--red-soft);
}

.connection.offline i {
    background: #e06072;
}

.company-tile-body {
    padding: 27px 22px 22px;
}

.company-label {
    color: #98a2b3;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .14em;
}

.company-tile-body h2 {
    margin: 8px 0 7px;
    color: var(--ink);
    font-size: 27px;
    font-weight: 720;
    letter-spacing: -.05em;
    line-height: 1.05;
}

.terminal-line {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #7b8798;
    font-size: 12px;
}

.terminal-line svg {
    width: 15px;
    height: 15px;
    color: #9aa7b8;
}

.company-tile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: auto;
    border-top: 1px solid var(--line);
}

.company-tile-stats > div {
    min-width: 0;
    padding: 15px 22px;
}

.company-tile-stats > div + div {
    border-left: 1px solid var(--line);
}

.company-tile-stats span {
    display: block;
    color: #98a2b3;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .13em;
}

.company-tile-stats strong {
    display: block;
    overflow: hidden;
    margin-top: 5px;
    color: #344054;
    font-size: 14px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-enter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    color: #EAF3ED;
    background: var(--sidebar);
    font-size: 11px;
    font-weight: 700;
    transition: background .17s ease;
}

.company-tile:hover .company-enter {
    background: var(--primary);
}

.company-enter b {
    color: #B9D7C0;
    font-size: 17px;
    font-weight: 500;
    line-height: 1;
}

.company-tile:hover .company-enter b {
    color: #fff;
}

/* ATTENDANCE DIRECTORY */

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

.metric-card {
    position: relative;
    min-height: 137px;
    overflow: hidden;
    padding: 18px 18px 17px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.metric-card::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: var(--primary);
}

.metric-card.metric-green::before { background: var(--green); }
.metric-card.metric-violet::before { background: var(--violet); }
.metric-card.metric-slate::before { background: #8492a6; }

.metric-card-top,
.summary-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.metric-label,
.person-summary article > span,
.summary-card-top > span:first-child {
    color: #8b97a8;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .12em;
}

.metric-icon,
.summary-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 8px;
}

.metric-green .metric-icon { color: var(--green); background: var(--green-soft); }
.metric-violet .metric-icon { color: var(--violet); background: var(--violet-soft); }
.metric-slate .metric-icon { color: #667085; background: var(--slate-soft); }

.metric-icon svg {
    width: 16px;
    height: 16px;
}

.metric-card > strong {
    display: block;
    margin-top: 12px;
    color: var(--ink);
    font-size: 30px;
    font-weight: 750;
    letter-spacing: -.055em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.metric-foot {
    display: block;
    margin-top: 10px;
    overflow: hidden;
    color: #98a2b3;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.directory-section {
    margin-top: 3px;
}

.directory-head {
    align-items: flex-end;
    margin-bottom: 17px;
}

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

.search-field {
    min-width: 245px;
}

.employee-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.employee-card {
    display: block;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform .17s ease, border-color .17s ease, box-shadow .17s ease;
}

.employee-card:hover {
    transform: translateY(-3px);
    border-color: #B9C9BE;
    box-shadow: var(--shadow-md);
}

.employee-photo {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e5eaf0;
}

.employee-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(10,18,32,.05), transparent 50%, rgba(10,18,32,.15));
}

.employee-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-status {
    position: absolute;
    top: 11px;
    right: 11px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 7px;
    box-shadow: 0 4px 12px rgba(16,24,40,.12);
    font-size: 9px;
    font-weight: 800;
}

.photo-status.closed {
    color: #0f7654;
    background: #e9f8f1;
}

.photo-status.open {
    color: #92600f;
    background: #fff1cf;
}

.photo-status.open i,
.profile-status.warning i {
    background: #d08a1b;
}

.photo-status.absent {
    color: #667085;
    background: #f1f4f7;
}

.photo-status.absent i,
.profile-status.neutral i {
    background: #98a2b3;
}

.employee-card-body {
    padding: 16px 16px 14px;
}

.employee-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.employee-id {
    display: block;
    color: #98a2b3;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
}

.employee-card h3 {
    min-height: 38px;
    margin: 5px 0 14px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.35;
}

.card-arrow {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    color: #96B69F;
    background: var(--primary-soft);
    border-radius: 8px;
    font-size: 16px;
    line-height: 1;
    transition: color .17s ease, background .17s ease;
}

.employee-card:hover .card-arrow {
    color: #fff;
    background: var(--primary);
}

.employee-times {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
    background: var(--surface-soft);
    border: 1px solid #edf0f4;
    border-radius: 10px;
}

.time-block {
    min-width: 0;
    padding-left: 9px;
    border-left: 2px solid #AECBB5;
}

.time-block.exit {
    border-left-color: #b6b1ed;
}

.time-block span {
    display: block;
    color: #98a2b3;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .11em;
}

.time-block strong {
    display: block;
    overflow: hidden;
    margin-top: 4px;
    color: #344054;
    font-size: 11px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.employee-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 13px;
    color: #8b97a8;
    font-size: 10px;
}

.employee-card-foot > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.activity-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #c7ced8;
    border-radius: 50%;
}

.activity-dot.active {
    background: #2ab47d;
}

.card-link {
    color: var(--primary);
    font-weight: 700;
}

.empty-state {
    padding: 58px 22px;
    text-align: center;
}

.empty-state-wide {
    grid-column: 1 / -1;
    background: var(--surface);
    border: 1px dashed #d5dce6;
    border-radius: var(--radius);
}

.empty-icon {
    display: grid;
    place-items: center;
    width: 45px;
    height: 45px;
    margin: 0 auto 13px;
    color: #8b97a8;
    background: var(--slate-soft);
    border-radius: 12px;
    font-size: 22px;
}

.empty-state h3 {
    margin: 0 0 5px;
    color: var(--ink);
    font-size: 15px;
}

.empty-state p {
    max-width: 390px;
    margin: 0 auto;
    color: #8b97a8;
    font-size: 11px;
}

/* PERSON DETAIL */

.person-hero {
    align-items: center;
}

.person-hero-main {
    min-width: 0;
}

.detail-person-row {
    display: flex;
    align-items: center;
    gap: 18px;
}

.detail-avatar {
    width: 96px;
    height: 96px;
    overflow: hidden;
    background: #e5eaf0;
    border: 4px solid #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    flex: 0 0 auto;
}

.detail-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-identity {
    min-width: 0;
}

.person-identity h1 {
    overflow: hidden;
    margin: 9px 0 6px;
    font-size: 34px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.person-submeta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    color: #7b8798;
    font-size: 11px;
}

.submeta-divider {
    color: #c1c8d2;
}

.profile-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 7px;
    font-size: 9px;
    font-weight: 800;
}

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

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

.profile-status.neutral {
    color: #667085;
    background: var(--slate-soft);
}

.person-summary {
    display: grid;
    grid-template-columns: 1.12fr 1.12fr 1fr 1.15fr;
    gap: 12px;
    margin-bottom: 20px;
}

.person-summary article {
    min-width: 0;
    min-height: 128px;
    padding: 17px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.person-summary article.summary-main {
    border-top: 3px solid var(--primary);
}

.person-summary article.summary-main.in {
    border-top-color: var(--green);
}

.person-summary article.summary-main.out {
    border-top-color: var(--violet);
}

.summary-icon {
    width: 25px;
    height: 25px;
    color: #669173;
    background: var(--primary-soft);
    font-size: 13px;
    font-weight: 750;
}

.summary-main.in .summary-icon {
    color: var(--green);
    background: var(--green-soft);
}

.summary-main.out .summary-icon {
    color: var(--violet);
    background: var(--violet-soft);
}

.summary-icon.neutral {
    color: #78869b;
    background: var(--slate-soft);
}

.person-summary article > strong {
    display: block;
    overflow: hidden;
    margin: 14px 0 5px;
    color: var(--ink);
    font-size: 22px;
    font-weight: 750;
    letter-spacing: -.045em;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.person-summary article small {
    color: #98a2b3;
    font-size: 10px;
}

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

.timeline-panel,
.info-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}

.panel-title h2 {
    margin: 6px 0 0;
    color: var(--ink);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -.035em;
}

.panel-date {
    color: #7b8798;
    font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.timeline {
    padding: 9px 25px 9px 55px;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 17px;
    min-height: 128px;
    padding: 17px 0;
    border-bottom: 1px solid var(--line);
}

.timeline-item:last-child {
    border-bottom: 0;
}

.timeline-item::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -28px;
    width: 1px;
    background: #dfe5ed;
}

.timeline-item:first-child::before {
    top: 50%;
}

.timeline-item:last-child::before {
    bottom: 50%;
}

.timeline-marker {
    position: absolute;
    top: 50%;
    left: -40px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    color: #667085;
    background: #f5f7fa;
    border: 1px solid #d7dee8;
    border-radius: 8px;
    transform: translateY(-50%);
    font-size: 9px;
    font-weight: 800;
    box-shadow: 0 0 0 4px var(--surface);
}

.timeline-marker.in {
    color: var(--green);
    background: var(--green-soft);
    border-color: #bde7d2;
}

.timeline-marker.out {
    color: var(--violet);
    background: var(--violet-soft);
    border-color: #d5d1ff;
}

.timeline-marker.single {
    color: var(--amber);
    background: var(--amber-soft);
    border-color: #efd59f;
}

.timeline-photo {
    width: 96px;
    height: 96px;
    overflow: hidden;
    background: #e5eaf0;
    border: 1px solid #e1e6ed;
    border-radius: 11px;
}

.timeline-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-content {
    align-self: center;
    min-width: 0;
}

.timeline-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 17px;
}

.event-type {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 800;
}

.event-type.in {
    color: var(--green);
    background: var(--green-soft);
}

.event-type.out {
    color: var(--violet);
    background: var(--violet-soft);
}

.event-type.mid {
    color: #667085;
    background: var(--slate-soft);
}

.event-type.single {
    color: var(--amber);
    background: var(--amber-soft);
}

.event-description {
    margin: 7px 0 0;
    color: #667085;
    font-size: 11px;
}

.timeline-top > strong {
    color: var(--ink);
    font-size: 17px;
    font-weight: 750;
    letter-spacing: -.035em;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.timeline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 13px;
    color: #98a2b3;
    font-size: 10px;
}

.meta-separator {
    color: #c5ccd5;
}

.detail-aside {
    display: grid;
    gap: 14px;
}

.info-card {
    padding: 19px;
}

.info-card h3 {
    margin: 8px 0 18px;
    color: var(--ink);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.035em;
}

.rule-list {
    display: grid;
    gap: 0;
}

.rule-list > div {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
    padding: 13px 0;
    border-top: 1px solid var(--line);
}

.rule-list > div:first-child {
    padding-top: 0;
    border-top: 0;
}

.rule-list b {
    padding-top: 2px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
}

.rule-list p {
    margin: 0;
}

.rule-list p strong,
.rule-list p span {
    display: block;
}

.rule-list p strong {
    color: #344054;
    font-size: 11px;
    font-weight: 750;
}

.rule-list p span {
    margin-top: 3px;
    color: #8b97a8;
    font-size: 10px;
    line-height: 1.55;
}

.profile-data {
    margin: 16px 0 0;
}

.profile-data > div {
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.profile-data dt {
    color: #8b97a8;
    font-size: 10px;
}

.profile-data dd {
    margin: 4px 0 0;
    color: #344054;
    font-size: 12px;
    font-weight: 750;
}

/* RESPONSIVE */

@media (max-width: 1230px) {
    .workspace {
        width: min(1440px, calc(100% - 48px));
    }

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

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

@media (max-width: 1020px) {
    .auth-shell {
        grid-template-columns: minmax(390px, 1fr) minmax(360px, .86fr);
    }

    .auth-identity {
        padding-right: 48px;
        padding-left: 48px;
    }

    .sidebar {
        width: 220px;
    }

    .overview-row {
        grid-template-columns: 1fr 1fr;
    }

    .overview-card:last-child {
        grid-column: 1 / -1;
    }

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

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

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

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

    .auth-identity {
        min-height: auto;
        padding: 26px 28px 28px;
    }

    .auth-identity-body {
        padding: 70px 0 55px;
    }

    .auth-feature-list {
        margin-top: 34px;
    }

    .auth-panel {
        min-height: 580px;
        padding: 44px 28px;
    }

    .app-shell {
        display: block;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        min-height: 66px;
        flex-direction: row;
        align-items: center;
        gap: 18px;
        padding: 13px 16px;
    }

    .brand-sidebar {
        padding: 0;
    }

    .sidebar-section-label,
    .sidebar-spacer,
    .sidebar-connection {
        display: none;
    }

    .side-nav {
        margin-left: auto;
    }

    .side-nav-link {
        min-height: 38px;
        padding: 4px 8px;
    }

    .side-nav-text,
    .side-nav-chevron {
        display: none;
    }

    .side-nav-icon {
        width: 30px;
        height: 30px;
    }

    .sidebar-account {
        padding: 0 0 0 12px;
        border-top: 0;
        border-left: 1px solid rgba(255,255,255,.12);
    }

    .account-copy {
        display: none;
    }

    .topbar {
        min-height: 60px;
        padding: 0 18px;
    }

    .topbar-environment {
        display: none;
    }

    .workspace {
        width: min(100% - 30px, 1440px);
        padding-top: 31px;
    }

    .page-hero,
    .person-hero {
        align-items: stretch;
        flex-direction: column;
        gap: 24px;
    }

    .hero-meta {
        justify-content: flex-start;
        padding-bottom: 0;
    }

    .company-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .date-selector,
    .input-with-icon,
    .company-tools .btn {
        width: 100%;
    }

    .date-selector input {
        min-width: 0;
    }

    .company-tools form:last-child {
        width: 100%;
    }

    .directory-head {
        align-items: stretch;
        flex-direction: column;
    }

    .directory-tools {
        justify-content: space-between;
    }

    .search-field {
        min-width: 0;
        flex: 1;
    }

    .search-field input {
        min-width: 0;
    }

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

    .person-hero {
        gap: 19px;
    }

    .detail-date {
        width: 100%;
    }
}

@media (max-width: 540px) {
    .brand-copy small,
    .topbar-user,
    .topbar-logout,
    .auth-reference,
    .auth-footer {
        display: none;
    }

    .topbar-current {
        font-size: 11px;
    }

    .app-footer {
        padding-right: 15px;
        padding-left: 15px;
    }

    .app-footer span:last-child {
        display: none;
    }

    .workspace {
        width: min(100% - 24px, 1440px);
        padding-top: 26px;
    }

    .page-hero h1,
    .person-hero h1 {
        font-size: 35px;
    }

    .hero-meta {
        gap: 18px;
    }

    .overview-row,
    .metric-strip,
    .employee-grid,
    .detail-aside {
        grid-template-columns: 1fr;
    }

    .overview-card:last-child {
        grid-column: auto;
    }

    .section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .directory-tools {
        align-items: stretch;
        flex-direction: column-reverse;
        gap: 10px;
    }

    .detail-person-row {
        align-items: flex-start;
        gap: 14px;
    }

    .detail-avatar {
        width: 76px;
        height: 76px;
        border-radius: 13px;
    }

    .person-identity h1 {
        font-size: 25px;
        white-space: normal;
    }

    .person-summary {
        grid-template-columns: 1fr 1fr;
    }

    .person-summary article {
        min-height: 116px;
        padding: 15px;
    }

    .person-summary article > strong {
        font-size: 18px;
    }

    .panel-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .timeline {
        padding-right: 15px;
        padding-left: 42px;
    }

    .timeline-item {
        grid-template-columns: 70px minmax(0, 1fr);
        gap: 12px;
    }

    .timeline-photo {
        width: 70px;
        height: 70px;
    }

    .timeline-marker {
        left: -31px;
    }

    .timeline-item::before {
        left: -19px;
    }

    .timeline-top {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .timeline-meta {
        gap: 5px;
    }
}


/* =========================================================
   MPS CONTROL · NAVEGACIÓN DE EMPRESAS
   ========================================================= */

/* La pantalla principal de empresas no necesita menú lateral. */
.companies-home .app-main {
    width: 100%;
    min-width: 0;
}

.companies-home .topbar,
.companies-home .app-content,
.companies-home .app-footer {
    margin-left: 0;
}

/* Selector rápido de empresa dentro del menú lateral. */
.company-switcher-label {
    margin-top: 22px;
}

.company-switcher {
    display: grid;
    gap: 6px;
}

.company-switch-link {
    min-height: 58px;
}

.company-switch-monogram {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.055);
    color: var(--sidebar-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
}

.company-switch-link.active .company-switch-monogram {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.company-switch-link .side-nav-text strong {
    font-size: 12px;
    line-height: 1.25;
}

.company-switch-link .side-nav-text small {
    margin-top: 2px;
    font-size: 9px;
    opacity: .72;
}

@media (max-width: 980px) {
    .companies-home .app-main {
        width: 100%;
    }
}


/* FOTO DE PERFIL MANUAL */

.detail-avatar-stack {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 9px;
}

.profile-photo-upload {
    width: 100%;
    max-width: 150px;
    margin: 0;
    text-align: center;
}

.profile-photo-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.profile-photo-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 32px;
    padding: 0 9px;
    color: var(--primary-dark);
    background: #f3f8f4;
    border: 1px solid rgba(62, 122, 79, .28);
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.15;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.profile-photo-button:hover {
    background: #eaf4ec;
    border-color: rgba(62, 122, 79, .48);
    box-shadow: 0 4px 12px rgba(62, 122, 79, .12);
}

.profile-photo-button svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.manual-photo-badge {
    display: block;
    margin-top: 5px;
    color: #6d7a89;
    font-size: 9px;
    line-height: 1.25;
}

@media (max-width: 720px) {
    .detail-avatar-stack {
        align-items: flex-start;
    }

    .profile-photo-upload {
        max-width: 128px;
    }

    .profile-photo-button {
        min-height: 30px;
        font-size: 9px;
    }
}


/* INFORME DIARIO PERSONALIZABLE */

.report-modal-open {
    overflow: hidden;
}

.report-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 24px;
}

.report-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 17, 21, .56);
    backdrop-filter: blur(4px);
}

.report-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: min(820px, calc(100vh - 48px));
    overflow: hidden;
    background: var(--surface);
    border: 1px solid rgba(255,255,255,.36);
    border-radius: 16px;
    box-shadow: 0 28px 80px rgba(10, 16, 22, .28);
}

.report-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--line);
}

.report-modal-head h2 {
    margin: 5px 0 0;
    font-size: 21px;
    letter-spacing: -.02em;
}

.report-modal-head p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.report-modal-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    padding: 0;
    color: var(--muted);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 9px;
}

.report-modal-close:hover {
    color: var(--ink);
    border-color: #bfc7c4;
}

.report-modal-close svg {
    width: 17px;
    height: 17px;
}

.report-modal-body {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    padding: 20px 24px 22px;
}

.report-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.report-section-head strong {
    display: block;
    font-size: 13px;
}

.report-section-head small,
.report-email-field small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.report-selected-count {
    color: var(--primary-dark);
    background: var(--primary-soft);
    border: 1px solid #cfe0d3;
    border-radius: 999px;
    padding: 5px 8px;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.report-selection-tools {
    display: flex;
    gap: 7px;
    margin-top: 13px;
}

.report-selection-tools button {
    padding: 6px 9px;
    color: var(--ink-soft);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 7px;
    font-size: 10px;
    font-weight: 750;
}

.report-selection-tools button:hover {
    border-color: #b8c2be;
    background: #eef2f0;
}

.report-person-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: 330px;
    margin-top: 12px;
    padding-right: 3px;
    overflow-y: auto;
}

.report-person-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 11px 12px;
    background: #fbfcfb;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.report-person-option:hover {
    border-color: #b9c6bd;
    box-shadow: var(--shadow-sm);
}

.report-person-option:has(input:checked) {
    background: #f0f7f2;
    border-color: #9fc2a8;
}

.report-person-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.report-check-ui {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    background: #fff;
    border: 1.5px solid #b8c1be;
    border-radius: 5px;
}

.report-person-option input:checked + .report-check-ui {
    background: var(--primary);
    border-color: var(--primary);
}

.report-person-option input:checked + .report-check-ui::after {
    content: "";
    width: 8px;
    height: 4px;
    margin-top: -2px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg);
}

.report-person-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.report-person-copy strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 11px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-person-copy small {
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-email-field {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.report-email-field label {
    display: block;
    font-size: 12px;
    font-weight: 800;
}

.report-email-field textarea {
    width: 100%;
    min-height: 86px;
    margin-top: 9px;
    padding: 11px 12px;
    resize: vertical;
    color: var(--ink);
    background: #fff;
    border: 1px solid #cfd6d3;
    border-radius: 9px;
    font: 12px/1.5 "Cascadia Mono", Consolas, monospace;
}

.report-email-field textarea:focus {
    border-color: #8cb096;
    outline: 3px solid rgba(62, 122, 79, .12);
}

.report-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding: 15px 24px;
    background: var(--surface-soft);
    border-top: 1px solid var(--line);
}

.report-modal-foot .btn:disabled {
    cursor: not-allowed;
    opacity: .45;
    box-shadow: none;
}

@media (max-width: 720px) {
    .report-modal {
        padding: 10px;
    }

    .report-modal-dialog {
        max-height: calc(100vh - 20px);
    }

    .report-modal-head,
    .report-modal-body,
    .report-modal-foot {
        padding-left: 16px;
        padding-right: 16px;
    }

    .report-modal-body {
        max-height: calc(100vh - 220px);
    }

    .report-person-list {
        grid-template-columns: 1fr;
        max-height: 300px;
    }

    .report-section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}


/* ==========================================================
   MODULO ADMINISTRATIVO
   ========================================================== */

.companies-hero-actions {
    gap: 18px;
}

.admin-entry-button {
    white-space: nowrap;
}

.administrative-workspace {
    max-width: 1540px;
}

.admin-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 34px;
    margin-bottom: 28px;
}

.admin-hero-copy {
    min-width: 0;
}

.admin-hero h1 {
    margin: 11px 0 8px;
    color: var(--ink);
    font-size: 42px;
    font-weight: 720;
    letter-spacing: -.055em;
    line-height: 1;
}

.admin-hero p {
    max-width: 690px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.admin-hero p strong {
    color: #344054;
}

.admin-hero-side {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
}

.admin-updated {
    min-width: 112px;
    padding-right: 18px;
    border-right: 1px solid var(--line);
    text-align: right;
}

.admin-updated span {
    display: block;
    color: #98a2b3;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .13em;
}

.admin-updated strong {
    display: block;
    margin-top: 4px;
    color: #344054;
    font-size: 12px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.admin-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 19px;
}

.admin-stat-card {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 92px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .025);
}

.admin-stat-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    flex: 0 0 auto;
}

.admin-stat-icon svg {
    width: 21px;
    height: 21px;
}

.admin-stat-icon.total {
    color: #3f5f8b;
    background: #edf3fb;
}

.admin-stat-icon.administrators {
    color: #855d21;
    background: #fff6e7;
}

.admin-stat-icon.employees {
    color: #3e7a4f;
    background: #edf6ef;
}

.admin-stat-icon.companies {
    color: #5d6470;
    background: #f2f4f7;
}

.admin-stat-card > div:last-child {
    display: grid;
    min-width: 0;
}

.admin-stat-card small {
    color: #98a2b3;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .12em;
}

.admin-stat-card strong {
    margin-top: 2px;
    color: var(--ink);
    font-size: 25px;
    font-weight: 740;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.admin-stat-card span:last-child {
    margin-top: 4px;
    color: #98a2b3;
    font-size: 9px;
}

.admin-toolbar {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(220px, 290px) auto;
    align-items: end;
    gap: 12px;
    margin-bottom: 12px;
    padding: 13px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.admin-search {
    position: relative;
}

.admin-search svg {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 17px;
    height: 17px;
    color: #98a2b3;
    transform: translateY(-50%);
    pointer-events: none;
}

.admin-search input,
.admin-company-filter select {
    width: 100%;
    height: 42px;
    color: #344054;
    background: #fbfcfd;
    border: 1px solid #d7dee8;
    border-radius: 9px;
    outline: none;
    font: inherit;
    font-size: 11px;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.admin-search input {
    padding: 0 14px 0 42px;
}

.admin-company-filter {
    display: grid;
    gap: 5px;
}

.admin-company-filter label {
    color: #667085;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.admin-company-filter select {
    padding: 0 34px 0 12px;
}

.admin-search input:focus,
.admin-company-filter select:focus {
    background: #fff;
    border-color: #6b9b77;
    box-shadow: 0 0 0 4px rgba(62, 122, 79, .10);
}

.admin-view-note {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    min-height: 42px;
    padding: 0 8px;
    color: #667085;
    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
}

.admin-info-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 10px 13px;
    color: #667085;
    background: #f8fafb;
    border: 1px solid #e7ebf0;
    border-radius: 9px;
}

.admin-info-icon {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    color: #3e7a4f;
    background: #eaf4ec;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 900;
    flex: 0 0 auto;
}

.admin-info-strip p {
    margin: 0;
    font-size: 10px;
    line-height: 1.55;
}

.admin-info-strip strong {
    color: #344054;
}

.admin-columns {
    display: grid;
    grid-template-columns: minmax(350px, .82fr) minmax(480px, 1.18fr);
    gap: 16px;
    align-items: start;
}

.admin-category-panel {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 13px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(16, 24, 40, .025);
}

.admin-category-panel--administrators {
    border-top: 3px solid #b78231;
}

.admin-category-panel--employees {
    border-top: 3px solid #3e7a4f;
}

.admin-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 20px 12px;
}

.admin-category-title {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.admin-category-title h2 {
    margin: 2px 0 0;
    color: var(--ink);
    font-size: 20px;
    font-weight: 720;
    letter-spacing: -.03em;
}

.admin-category-mark {
    width: 9px;
    height: 38px;
    border-radius: 5px;
    flex: 0 0 auto;
}

.admin-category-mark.administrators {
    background: #b78231;
}

.admin-category-mark.employees {
    background: #3e7a4f;
}

.admin-category-count {
    display: grid;
    place-items: center;
    min-width: 36px;
    height: 30px;
    padding: 0 10px;
    color: #344054;
    background: #f2f4f7;
    border: 1px solid #e4e7ec;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.admin-category-description {
    margin: 0 20px 15px;
    padding: 10px 12px;
    color: #7a8698;
    background: #fafbfc;
    border: 1px solid #edf0f3;
    border-radius: 8px;
    font-size: 9px;
    line-height: 1.55;
}

.admin-person-list {
    display: grid;
    gap: 8px;
    padding: 0 12px 13px;
}

.admin-person-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 88px;
    padding: 11px 12px;
    background: #fff;
    border: 1px solid #e7ebf0;
    border-radius: 10px;
    transition: opacity .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.admin-person-card:hover {
    border-color: #d4dbe5;
    box-shadow: 0 5px 14px rgba(16, 24, 40, .05);
}

.admin-person-card.is-saving {
    opacity: .55;
    pointer-events: none;
}

.admin-person-card.just-moved {
    border-color: rgba(62, 122, 79, .45);
    box-shadow: 0 0 0 4px rgba(62, 122, 79, .09);
}

.admin-person-main {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.admin-person-avatar {
    width: 55px;
    height: 55px;
    overflow: hidden;
    background: #edf0f4;
    border: 1px solid #dde3ea;
    border-radius: 11px;
    flex: 0 0 auto;
}

.admin-person-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-person-identity {
    min-width: 0;
}

.admin-person-topline {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin-bottom: 5px;
}

.admin-role-badge,
.admin-company-pill {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .035em;
    white-space: nowrap;
}

.admin-role-badge[data-category="ADMINISTRADOR"] {
    color: #855d21;
    background: #fff4df;
    border: 1px solid #f3ddbb;
}

.admin-role-badge[data-category="EMPLEADO"] {
    color: #376d47;
    background: #edf6ef;
    border: 1px solid #d3e7d8;
}

.admin-company-pill {
    max-width: 155px;
    overflow: hidden;
    color: #667085;
    background: #f2f4f7;
    border: 1px solid #e4e7ec;
    text-overflow: ellipsis;
}

.admin-person-identity h3 {
    overflow: hidden;
    margin: 0;
    color: #263244;
    font-size: 12px;
    font-weight: 780;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-person-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    margin-top: 5px;
    color: #98a2b3;
    font-size: 8px;
    font-weight: 700;
}

.admin-person-meta i {
    width: 3px;
    height: 3px;
    background: #c8ced7;
    border-radius: 50%;
    flex: 0 0 auto;
}

.admin-person-meta span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-person-actions {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.admin-role-form label {
    display: grid;
    gap: 4px;
}

.admin-role-form label > span {
    color: #98a2b3;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.admin-role-select {
    min-width: 126px;
    height: 33px;
    padding: 0 27px 0 9px;
    color: #344054;
    background: #fbfcfd;
    border: 1px solid #d9e0e8;
    border-radius: 8px;
    outline: none;
    font-size: 9px;
    font-weight: 750;
}

.admin-role-select:focus {
    border-color: #6b9b77;
    box-shadow: 0 0 0 3px rgba(62, 122, 79, .09);
}

.admin-person-detail-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 33px;
    padding: 0 9px;
    color: #526071;
    background: #fff;
    border: 1px solid #d9e0e8;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

.admin-person-detail-link:hover {
    color: var(--primary);
    border-color: #b8c9bd;
    background: #f8fbf9;
}

.admin-category-empty {
    margin: 0 12px 13px;
    padding: 26px 16px;
    text-align: center;
    background: #fafbfc;
    border: 1px dashed #dce2e9;
    border-radius: 10px;
}

.admin-category-empty strong {
    display: block;
    color: #667085;
    font-size: 10px;
}

.admin-category-empty span {
    display: block;
    max-width: 310px;
    margin: 5px auto 0;
    color: #98a2b3;
    font-size: 9px;
    line-height: 1.5;
}

.admin-global-empty {
    margin-top: 18px;
}

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

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

@media (max-width: 820px) {
    .admin-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-hero-side {
        width: 100%;
        justify-content: space-between;
    }

    .admin-toolbar {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .admin-view-note {
        justify-content: flex-start;
    }

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

    .admin-person-actions {
        justify-content: space-between;
        padding-top: 9px;
        border-top: 1px solid #eef1f4;
    }

    .admin-role-form {
        flex: 1;
    }

    .admin-role-form label {
        width: 100%;
    }

    .admin-role-select {
        width: 100%;
    }
}

@media (max-width: 580px) {
    .admin-overview {
        grid-template-columns: 1fr;
    }

    .admin-hero h1 {
        font-size: 34px;
    }

    .admin-person-topline {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-company-pill {
        max-width: 190px;
    }
}


/* ==========================================================
   ELIMINAR PERSONA SOLO DE LA EMPRESA ACTUAL
   ========================================================== */

.person-delete-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-top: 14px;
}

.person-delete-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 12px;
    color: #9f2f2f;
    background: #fff8f8;
    border: 1px solid #efcaca;
    border-radius: 9px;
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    font-weight: 800;
    transition:
        background .16s ease,
        border-color .16s ease,
        transform .16s ease;
}

.person-delete-button svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}

.person-delete-button:hover {
    background: #fff0f0;
    border-color: #dfa8a8;
    transform: translateY(-1px);
}

.person-delete-button:active {
    transform: translateY(0);
}

.person-delete-form small {
    color: #98a2b3;
    font-size: 9px;
    font-weight: 650;
    line-height: 1.35;
}

@media (max-width: 680px) {
    .person-delete-form {
        align-items: stretch;
        flex-direction: column;
    }

    .person-delete-button {
        width: 100%;
    }
}


/* ==========================================================
   LOGIN - SELECTOR DE USUARIO MPS
   ========================================================== */

.auth-form select[name="usuario"] {
    width: 100%;
    height: 45px;
    padding: 0 38px 0 42px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid #d7dee8;
    border-radius: 9px;
    outline: none;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    appearance: auto;
    transition:
        border-color .16s ease,
        box-shadow .16s ease,
        background .16s ease;
}

.auth-form select[name="usuario"]:focus {
    border-color: #6B9B77;
    box-shadow: 0 0 0 4px rgba(62, 122, 79, .12);
}


/* ==========================================================
   LOGIN TÉCNICO - MPS CONTROL
   ========================================================== */

.auth-tech-page {
    min-height: 100vh;
    margin: 0;
    color: #dfe7ee;
    background: #0b1118;
}

.tech-login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(540px, 1.18fr) minmax(430px, .82fr);
    background: #0b1118;
}

.tech-system-panel {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 30px clamp(34px, 5.5vw, 82px) 26px;
    overflow: hidden;
    border-right: 1px solid rgba(143, 169, 191, .13);
    background:
        linear-gradient(rgba(63, 88, 107, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(63, 88, 107, .07) 1px, transparent 1px),
        radial-gradient(circle at 22% 18%, rgba(62, 122, 79, .14), transparent 34%),
        #0b1118;
    background-size: 34px 34px, 34px 34px, auto, auto;
}

.tech-system-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(110deg, transparent 0 67%, rgba(74, 111, 90, .035) 67% 68%, transparent 68% 100%);
}

.tech-panel-header,
.tech-system-content,
.tech-panel-footer {
    position: relative;
    z-index: 1;
}

.tech-panel-header {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 12px;
    min-height: 48px;
}

.tech-brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #cfe4d4;
    border: 1px solid rgba(126, 171, 138, .34);
    background: rgba(62, 122, 79, .12);
    border-radius: 6px;
}

.tech-brand-mark svg {
    width: 24px;
    height: 24px;
}

.tech-brand-title {
    color: #f1f5f7;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .13em;
}

.tech-brand-subtitle {
    margin-top: 3px;
    color: #607386;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .16em;
}

.tech-node-id {
    padding: 7px 9px;
    color: #71859a;
    border: 1px solid rgba(113, 133, 154, .18);
    border-radius: 4px;
    background: rgba(9, 15, 22, .52);
    font-family: Consolas, "Courier New", monospace;
    font-size: 9px;
    letter-spacing: .08em;
}

.tech-system-content {
    width: min(700px, 100%);
    margin: auto 0;
    padding: 58px 0 46px;
}

.tech-command-line {
    display: flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    max-width: 100%;
    margin-bottom: 25px;
    padding: 8px 11px;
    color: #778a9b;
    border: 1px solid rgba(114, 137, 157, .15);
    border-radius: 4px;
    background: rgba(5, 10, 15, .5);
    font-family: Consolas, "Courier New", monospace;
    font-size: 10px;
    white-space: nowrap;
}

.tech-prompt {
    color: #7cad88;
}

.tech-cursor {
    width: 6px;
    height: 12px;
    background: #7cad88;
    animation: tech-blink 1.05s steps(1) infinite;
}

@keyframes tech-blink {
    50% { opacity: 0; }
}

.tech-title-block {
    max-width: 650px;
}

.tech-overline {
    display: inline-block;
    margin-bottom: 13px;
    color: #759681;
    font-family: Consolas, "Courier New", monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .15em;
}

.tech-title-block h1 {
    margin: 0;
    color: #eef3f5;
    font-size: clamp(34px, 4.6vw, 58px);
    font-weight: 610;
    letter-spacing: -.045em;
    line-height: 1.02;
}

.tech-title-block p {
    max-width: 560px;
    margin: 18px 0 0;
    color: #8293a3;
    font-size: 13px;
    line-height: 1.7;
}

.tech-diagram {
    display: grid;
    grid-template-columns: minmax(125px, 1fr) 52px minmax(125px, 1fr) 52px minmax(125px, 1fr);
    align-items: center;
    gap: 8px;
    max-width: 650px;
    margin-top: 36px;
}

.tech-device {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 12px;
    border: 1px solid rgba(116, 140, 159, .16);
    border-radius: 5px;
    background: rgba(9, 15, 22, .52);
}

.tech-device.active {
    border-color: rgba(109, 157, 120, .35);
    background: rgba(62, 122, 79, .10);
}

.tech-device-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.tech-device-dot.online,
.tech-led {
    background: #6ca878;
    box-shadow: 0 0 0 3px rgba(108, 168, 120, .10);
}

.tech-device div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.tech-device strong {
    color: #c9d4dc;
    font-family: Consolas, "Courier New", monospace;
    font-size: 9px;
    letter-spacing: .08em;
}

.tech-device small {
    overflow: hidden;
    color: #5f7181;
    font-family: Consolas, "Courier New", monospace;
    font-size: 8px;
    letter-spacing: .06em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tech-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.tech-link span {
    width: 5px;
    height: 5px;
    border: 1px solid #4d6257;
    transform: rotate(45deg);
}

.tech-spec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 650px;
    margin-top: 20px;
    border-top: 1px solid rgba(112, 134, 151, .14);
    border-left: 1px solid rgba(112, 134, 151, .14);
}

.tech-spec {
    min-width: 0;
    padding: 12px 14px;
    border-right: 1px solid rgba(112, 134, 151, .14);
    border-bottom: 1px solid rgba(112, 134, 151, .14);
    background: rgba(7, 13, 19, .35);
}

.tech-spec span,
.tech-spec strong {
    display: block;
    font-family: Consolas, "Courier New", monospace;
}

.tech-spec span {
    margin-bottom: 5px;
    color: #586b7b;
    font-size: 8px;
    letter-spacing: .12em;
}

.tech-spec strong {
    overflow: hidden;
    color: #aab7c1;
    font-size: 10px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tech-panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #516474;
    font-family: Consolas, "Courier New", monospace;
    font-size: 8px;
    letter-spacing: .11em;
}

.tech-panel-footer span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #789680;
}

.tech-led {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.tech-auth-panel {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 44px clamp(28px, 5vw, 70px);
    background:
        linear-gradient(180deg, rgba(255,255,255,.72), rgba(245,247,248,.95)),
        #f4f6f7;
}

.tech-auth-card {
    width: min(420px, 100%);
}

.tech-auth-header {
    padding-bottom: 25px;
    margin-bottom: 24px;
    border-bottom: 1px solid #d9e0e5;
}

.tech-auth-code {
    margin-bottom: 13px;
    color: #55705d;
    font-family: Consolas, "Courier New", monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .15em;
}

.tech-auth-header h2 {
    margin: 0;
    color: #18222c;
    font-size: 28px;
    font-weight: 660;
    letter-spacing: -.035em;
}

.tech-auth-header p {
    margin: 9px 0 0;
    color: #72808d;
    font-size: 12px;
    line-height: 1.65;
}

.tech-auth-form {
    display: grid;
    gap: 18px;
}

.tech-field {
    display: grid;
    gap: 8px;
}

.tech-field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.tech-field-label > span {
    color: #394955;
    font-family: Consolas, "Courier New", monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
}

.tech-field-label small {
    color: #9aa5ad;
    font-family: Consolas, "Courier New", monospace;
    font-size: 8px;
    letter-spacing: .08em;
}

.tech-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.tech-input-wrap > svg {
    position: absolute;
    left: 13px;
    width: 17px;
    height: 17px;
    color: #7e8c96;
    pointer-events: none;
    z-index: 1;
}

.tech-input-wrap select,
.tech-input-wrap input {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 42px;
    color: #202c35;
    border: 1px solid #cfd8de;
    border-radius: 5px;
    outline: none;
    background: #fff;
    font-family: Consolas, "Courier New", monospace;
    font-size: 11px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.tech-input-wrap select {
    cursor: pointer;
}

.tech-input-wrap select:focus,
.tech-input-wrap input:focus {
    border-color: #71917a;
    box-shadow: 0 0 0 3px rgba(75, 121, 86, .10);
}

.tech-remember {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #72808d;
    font-size: 11px;
}

.tech-remember input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #3e7a4f;
}

.tech-login-button {
    width: 100%;
    min-height: 49px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 17px;
    color: #fff;
    border: 1px solid #315e3f;
    border-radius: 5px;
    background: #3e7a4f;
    box-shadow: 0 7px 16px rgba(41, 75, 51, .15);
    cursor: pointer;
    font-family: Consolas, "Courier New", monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}

.tech-login-button:hover {
    background: #356943;
    box-shadow: 0 9px 20px rgba(41, 75, 51, .20);
}

.tech-login-button:active {
    transform: translateY(1px);
}

.tech-login-button svg {
    width: 18px;
    height: 18px;
}

.tech-auth-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 26px;
    padding-top: 17px;
    color: #9aa4ac;
    border-top: 1px solid #dbe2e7;
    font-family: Consolas, "Courier New", monospace;
    font-size: 8px;
    letter-spacing: .08em;
}

.tech-lock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #74867a;
}

.tech-lock svg {
    width: 13px;
    height: 13px;
}

@media (max-width: 980px) {
    .tech-login-shell {
        grid-template-columns: 1fr;
    }

    .tech-system-panel {
        min-height: auto;
        padding: 24px 28px 30px;
        border-right: 0;
        border-bottom: 1px solid rgba(143, 169, 191, .13);
    }

    .tech-system-content {
        margin: 0;
        padding: 44px 0 18px;
    }

    .tech-title-block h1 {
        font-size: clamp(32px, 8vw, 48px);
    }

    .tech-auth-panel {
        min-height: auto;
        padding: 48px 28px;
    }
}

@media (max-width: 620px) {
    .tech-system-panel {
        padding: 20px;
    }

    .tech-panel-header {
        grid-template-columns: 38px 1fr;
    }

    .tech-node-id {
        display: none;
    }

    .tech-brand-mark {
        width: 38px;
        height: 38px;
    }

    .tech-system-content {
        padding-top: 34px;
    }

    .tech-command-line {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .tech-diagram {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .tech-link {
        height: 17px;
        flex-direction: column;
    }

    .tech-spec-grid {
        grid-template-columns: 1fr;
    }

    .tech-panel-footer {
        margin-top: 26px;
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .tech-auth-panel {
        padding: 38px 20px;
    }

    .tech-auth-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}
