@import url("../../../global/vendor/datatables/datatables.min.css");

:root {
    --bg: #f5f3ef;
    --panel: #ffffff;
    --ink: #1f2528;
    --muted: #69757c;
    --line: #ded8cf;
    --brand: #5a1f1f;
    --brand-2: #0f5f64;
    --accent: #c69b43;
    --danger: #b42318;
    --shadow: 0 18px 50px rgba(32, 28, 24, .12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: var(--bg);
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
}

.auth-page {
    display: grid;
    place-items: center;
    padding: 32px;
    background:
        linear-gradient(90deg, rgba(20, 17, 14, .68), rgba(20, 17, 14, .18)),
        var(--login-bg-image, url("../../../images/fondo_login.webp")) center/cover fixed;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 420px;
    width: min(1080px, 100%);
    min-height: 620px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(255, 255, 255, .42);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.auth-brand {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    background: linear-gradient(150deg, rgba(90, 31, 31, .88), rgba(15, 95, 100, .78));
    color: #fff;
}

.auth-brand img {
    width: 220px;
    max-width: 70%;
    padding: 16px;
    background: rgba(255, 255, 255, .94);
}

.auth-brand h1 {
    max-width: 620px;
    margin: 12px 0 16px;
    font-size: 48px;
    line-height: 1.02;
}

.lead {
    max-width: 560px;
    color: rgba(255, 255, 255, .82);
    font-size: 18px;
    line-height: 1.55;
}

.auth-panel {
    align-self: center;
    padding: 48px;
}

.auth-panel h2,
.topbar h1,
.work-panel h2 {
    margin: 8px 0 24px;
}

.eyebrow {
    margin: 0;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

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

label span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

input {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line);
    padding: 0 14px;
    font: inherit;
}

input:focus {
    border-color: var(--brand-2);
    outline: 3px solid rgba(15, 95, 100, .14);
}

button,
.user-box a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    padding: 0 18px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.alert {
    margin-bottom: 18px;
    border-left: 4px solid var(--danger);
    padding: 12px 14px;
    background: #fff0ee;
    color: var(--danger);
}

.alert.success {
    border-left-color: #1f7a4b;
    background: #eef8f2;
    color: #145c38;
}

.app-page {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
    min-height: 100vh;
    border-right: 1px solid var(--line);
    padding: 24px;
    background: #fff;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 34px;
    color: var(--brand);
    font-weight: 800;
    text-decoration: none;
}

.brand img {
    width: 64px;
}

.nav-list {
    display: grid;
    gap: 10px;
}

.nav-list a {
    display: block;
    padding: 12px 14px;
    color: var(--muted);
    text-decoration: none;
}

.nav-list a.active,
.nav-list a:hover {
    background: #f0ebe3;
    color: var(--ink);
}

.nav-group {
    border-top: 1px solid var(--line);
    padding-top: 10px;
}

.nav-group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 0 14px;
    color: var(--brand);
    cursor: pointer;
    list-style: none;
}

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

.nav-group summary::after {
    content: "+";
    color: var(--muted);
    font-size: 18px;
    font-weight: 800;
}

.nav-group[open] summary::after {
    content: "-";
}

.nav-group summary span {
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.nav-group-links {
    display: grid;
    gap: 2px;
    padding-bottom: 6px;
}

.nav-group-links a {
    padding-left: 24px;
    font-size: 14px;
}

.workspace {
    padding: 32px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

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

.user-box span {
    color: var(--muted);
    font-weight: 700;
}

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

.department-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.department-chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
}

.department-chip.active {
    background: var(--brand-2);
    border-color: var(--brand-2);
    color: #fff;
}

.metric-card,
.work-panel {
    border: 1px solid var(--line);
    background: #fff;
    padding: 22px;
}

.metric-card span {
    display: block;
    min-height: 36px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.metric-card strong {
    display: block;
    margin-top: 16px;
    color: var(--brand-2);
    font-size: 38px;
    line-height: 1;
}

.metric-card.is-link {
    color: inherit;
    text-decoration: none;
}

.work-panel {
    margin-top: 24px;
    max-width: 860px;
}

.work-panel p:last-child {
    color: var(--muted);
    line-height: 1.65;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 18px;
    margin-top: 24px;
}

.admin-panel,
.module-card {
    border: 1px solid var(--line);
    background: #fff;
    padding: 20px;
}

.admin-person,
.admin-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid var(--line);
    padding: 13px 0;
}

.admin-person:first-of-type,
.admin-row:first-of-type {
    border-top: 0;
}

.admin-person {
    justify-content: flex-start;
}

.admin-person img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #f0ebe3;
    object-fit: cover;
}

.admin-person strong,
.admin-row strong,
.module-card strong {
    display: block;
}

.admin-person span,
.admin-row span,
.module-card span,
.module-card p {
    color: var(--muted);
}

.admin-row b {
    white-space: nowrap;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.module-card {
    color: var(--ink);
    min-height: 156px;
    text-decoration: none;
}

.module-card span {
    display: block;
    margin-bottom: 18px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.module-card strong {
    font-size: 22px;
}

.module-card p {
    margin: 10px 0 0;
    line-height: 1.5;
}

.worker-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-filters {
    display: grid;
    grid-template-columns: 1.4fr .8fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.admin-filters span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.admin-filters input,
.admin-filters select {
    width: 100%;
    height: 44px;
    border: 1px solid var(--line);
    padding: 0 12px;
    background: #fff;
    font: inherit;
}

.admin-filters button {
    min-width: 110px;
    background: var(--brand-2);
}

.attendance-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.attendance-filters .table-action-link {
    min-height: 44px;
}

.vacation-filters {
    grid-template-columns: 1.4fr .9fr 1fr auto;
}

.workers-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.worker-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1.2fr) minmax(220px, .9fr) auto;
    gap: 14px;
    align-items: center;
    border: 1px solid var(--line);
    background: #fff;
    padding: 14px;
}

.worker-card img {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #f0ebe3;
    object-fit: cover;
}

.worker-main {
    min-width: 0;
}

.worker-main span,
.worker-meta span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.worker-main strong {
    display: block;
    margin: 4px 0;
    overflow-wrap: anywhere;
    font-size: 18px;
}

.worker-main p {
    margin: 0;
    color: var(--brand-2);
    font-weight: 800;
}

.worker-meta {
    display: grid;
    gap: 3px;
}

.worker-actions {
    display: flex;
    gap: 8px;
}

.worker-actions a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

.worker-actions a:last-child {
    background: var(--brand-2);
}

.vacation-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.vacation-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px minmax(280px, .9fr);
    gap: 16px;
    align-items: start;
    border: 1px solid var(--line);
    background: #fff;
    padding: 16px;
}

.vacation-card-main {
    min-width: 0;
}

.vacation-card-main span,
.vacation-meta small {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.vacation-card-main strong {
    display: block;
    margin: 5px 0;
    overflow-wrap: anywhere;
    font-size: 19px;
}

.vacation-card-main p {
    margin: 0;
    color: var(--brand-2);
    font-weight: 800;
}

.vacation-meta {
    display: grid;
    gap: 6px;
}

.vacation-meta span {
    width: fit-content;
    padding: 7px 10px;
    background: #f0ebe3;
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.vacation-actions {
    display: grid;
    gap: 10px;
}

.inline-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
}

.inline-action-compact {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}

.inline-action-compact:last-child {
    margin-bottom: 0;
}

.inline-action input {
    height: 40px;
}

.inline-action button {
    min-height: 40px;
    background: var(--brand-2);
}

.reject-action button {
    background: var(--danger);
}

.schedule-filters {
    grid-template-columns: 1.1fr .7fr .7fr auto;
}

.schedule-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

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

.compact-form input,
.compact-form select,
.shift-form input,
.shift-form select {
    width: 100%;
    height: 40px;
    border: 1px solid var(--line);
    padding: 0 10px;
    background: #fff;
    font: inherit;
}

.compact-form button {
    min-height: 40px;
    background: var(--brand-2);
}

.compact-form .form-actions {
    grid-column: 1 / -1;
}

.alert-success {
    background: rgba(48, 120, 87, .12);
    color: #1f5d42;
    border-color: rgba(48, 120, 87, .24);
}

.workers-table td {
    white-space: nowrap;
}

.workers-table thead th {
    background: var(--ink) !important;
    color: #fff !important;
    white-space: nowrap;
}

.attendance-close-table thead th {
    background: var(--ink) !important;
    color: #fff !important;
    white-space: nowrap;
    vertical-align: middle;
}

.attendance-close-table thead input[type="checkbox"] {
    accent-color: #fff;
}

.workers-table td:nth-child(2),
.workers-table td:nth-child(3),
.workers-table td:nth-child(6) {
    white-space: normal;
}

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

.icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    font-size: 16px;
    line-height: 1;
}

.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line);
    color: var(--ink);
    background: #fff;
    text-decoration: none;
    border-radius: 10px;
}

.button-primary {
    background: var(--brand-2);
    border-color: var(--brand-2);
    color: #fff;
}

.section-title-with-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

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

.worker-form-panel {
    margin: 18px 0 8px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.danger-button {
    background: var(--danger) !important;
}

.schedule-board {
    margin-top: 16px;
}

.schedule-scroll {
    overflow: auto;
}

.schedule-table,
.data-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

.schedule-table th,
.schedule-table td,
.data-table th,
.data-table td {
    border: 1px solid var(--line);
    padding: 8px;
    text-align: left;
    vertical-align: top;
}

.schedule-table thead th,
.data-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--ink);
    color: #fff;
}

.data-table thead th {
    background: var(--ink) !important;
    color: #fff !important;
    white-space: nowrap;
}

.schedule-table tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 150px;
    background: #fff;
    font-size: 13px;
}

.schedule-table th small {
    display: block;
    margin-top: 3px;
    color: rgba(255, 255, 255, .7);
}

.shift-cell {
    min-width: 104px;
}

.shift-cell select {
    width: 100%;
    height: 34px;
    border: 1px solid rgba(0, 0, 0, .16);
    background: rgba(255, 255, 255, .82);
    font: inherit;
    font-size: 13px;
}

.shift-cell small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.save-status {
    min-height: 14px;
}

.shift-cell.is-saving {
    outline: 2px solid rgba(15, 95, 100, .45);
    outline-offset: -2px;
}

.shift-cell.save-error {
    outline: 2px solid rgba(180, 35, 24, .55);
    outline-offset: -2px;
}

.shift-cell.save-error .save-status {
    color: var(--danger);
}

.shift-success {
    background: #dff5d8;
}

.shift-warning,
.shift-yellow {
    background: #fff1b8;
}

.shift-danger {
    background: #ffd8d2;
}

.shift-info {
    background: #d9ecff;
}

.shift-empty {
    background: #faf9f6;
}

.shift-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
}

.shift-form button {
    min-height: 40px;
    background: var(--brand-2);
}

.shift-admin-card {
    grid-template-columns: 220px minmax(0, 1fr);
}

.inline-shift-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.table-inline-form {
    display: grid;
    grid-template-columns: 150px 120px auto;
    gap: 8px;
    align-items: center;
}

.table-inline-form input,
.table-inline-form select {
    height: 38px;
    border: 1px solid var(--line);
    padding: 0 10px;
    font: inherit;
}

.table-inline-form button,
.data-table button {
    min-height: 38px;
    background: var(--brand-2);
}

.data-table input {
    height: 38px;
    min-width: 90px;
}

.delivery-lines-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}

.delivery-lines-table th,
.delivery-lines-table td {
    border: 1px solid var(--line);
    padding: 8px;
    text-align: left;
    vertical-align: middle;
}

.delivery-lines-table thead th {
    background: var(--ink);
    color: #fff;
}

.delivery-lines-table td:first-child,
.delivery-lines-table th:first-child {
    width: 72px;
    text-align: center;
    font-weight: 800;
}

.delivery-lines-table select,
.delivery-lines-table input {
    width: 100%;
    height: 38px;
    border: 1px solid var(--line);
    padding: 0 10px;
    background: #fff;
    font: inherit;
}

.shifts-table input,
.shifts-table select {
    width: 100%;
    min-width: 0;
    height: 34px;
    border: 1px solid var(--line);
    padding: 0 8px;
    background: #fff;
    font: inherit;
    font-size: 13px;
}

.shifts-table button {
    min-height: 34px;
    padding: 0 12px;
}

.dataTables_wrapper {
    margin-top: 8px;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: var(--muted);
    font-size: 13px;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 12px;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    height: 36px;
    border: 1px solid var(--line);
    padding: 0 10px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

.dataTables_wrapper .dataTables_length select {
    min-width: 72px;
    margin: 0 6px;
}

.dataTables_wrapper .dataTables_filter input {
    min-width: 220px;
}

.dataTables_wrapper .dataTables_paginate {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 10px;
    padding-top: 0;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    min-width: 36px;
    min-height: 36px;
    border: 1px solid var(--line) !important;
    padding: 7px 10px !important;
    background: #fff !important;
    color: var(--ink) !important;
    font-weight: 700;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    border-color: var(--brand-2) !important;
    background: rgba(15, 95, 100, .1) !important;
    color: var(--brand-2) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    border-color: var(--brand) !important;
    background: rgba(90, 31, 31, .08) !important;
    color: var(--brand) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    opacity: .45;
    background: #fff !important;
    color: var(--muted) !important;
}

.dataTables_wrapper .dataTables_info {
    padding-top: 12px;
}

.table-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 12px;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

.admin-inline-actions {
    margin-top: 14px;
}

.contract-admin-card {
    grid-template-columns: 260px minmax(0, 1fr) 120px;
}

.contract-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.contract-side {
    display: grid;
    gap: 10px;
}

.card-action-stack form,
.card-action-stack button {
    width: 100%;
}

.card-action-stack button {
    min-height: 38px;
    background: var(--brand-2);
}

.contract-side span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.status-pill {
    display: inline-flex !important;
    width: fit-content;
    min-height: 30px;
    align-items: center;
    padding: 0 10px;
    background: #f0ebe3;
    color: var(--ink) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
}

.status-pill.ready_to_sign {
    background: #dff5d8;
}

.status-pill.missing_file {
    background: #ffd8d2;
}

.status-pill.signed {
    background: #d9ecff;
}

.panel-note {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.signature-pad {
    width: 100%;
    max-width: 900px;
    height: auto;
    border: 1px solid var(--line);
    background: #fff;
    touch-action: none;
}

.signature-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.admin-profile-head {
    display: flex;
    align-items: center;
    gap: 18px;
    border: 1px solid var(--line);
    background: #fff;
    padding: 20px;
}

.admin-profile-head img {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: #f0ebe3;
    object-fit: cover;
}

.admin-profile-head span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.admin-profile-head strong {
    display: block;
    margin: 6px 0;
    font-size: 28px;
}

.admin-profile-head p {
    margin: 0;
    color: var(--brand-2);
    font-weight: 800;
}

.admin-tabs {
    margin-bottom: 2px;
}

textarea {
    width: 100%;
    border: 1px solid var(--line);
    padding: 12px;
    resize: vertical;
    font: inherit;
}

@media (max-width: 880px) {
    .auth-page {
        padding: 0;
    }

    .auth-shell,
    .app-page {
        grid-template-columns: 1fr;
    }

    .auth-shell {
        min-height: 100vh;
    }

    .auth-brand,
    .auth-panel {
        padding: 28px;
    }

    .auth-brand h1 {
        font-size: 34px;
    }

    .sidebar {
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

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

    .admin-grid,
    .module-grid,
    .worker-summary {
        grid-template-columns: 1fr;
    }

    .admin-filters,
    .worker-card {
        grid-template-columns: 1fr;
    }

    .vacation-card,
    .inline-action,
    .schedule-tools,
    .compact-form,
    .shift-form,
    .shift-admin-card,
    .inline-shift-form,
    .table-inline-form {
        grid-template-columns: 1fr;
    }

    .worker-card img {
        width: 72px;
        height: 72px;
    }

    .worker-actions a {
        flex: 1;
    }

    .admin-profile-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar,
    .user-box {
        align-items: flex-start;
        flex-direction: column;
    }
}

.employee-page {
    background: #f3f0ea;
}

.employee-shell {
    width: min(760px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    padding: 14px;
}

.employee-hero {
    overflow: hidden;
    border-radius: 18px;
    padding: 18px;
    background:
        linear-gradient(140deg, rgba(52, 25, 22, .92), rgba(15, 95, 100, .82)),
        url("../../../images/fondo_login.webp") center/cover;
    color: #fff;
}

.employee-topline,
.employee-identity,
.presence-card,
.document-row,
.plain-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.employee-topline img {
    width: 132px;
    padding: 8px;
    background: rgba(255, 255, 255, .95);
}

.employee-topline a,
.row-actions a {
    min-height: 36px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.employee-identity {
    justify-content: flex-start;
    margin-top: 34px;
}

.employee-identity h1 {
    margin: 5px 0 6px;
    font-size: 30px;
    line-height: 1.1;
}

.employee-identity p:last-child {
    margin: 0;
    color: rgba(255, 255, 255, .78);
}

.employee-photo {
    width: 78px;
    height: 78px;
    border: 3px solid rgba(255, 255, 255, .72);
    border-radius: 50%;
    background: #fff;
    object-fit: cover;
}

.mobile-alert,
.presence-card,
.mobile-section {
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(40, 34, 26, .08);
}

.mobile-alert {
    padding: 13px 14px;
    border-color: #f1c7c1;
    color: #8f1d14;
}

.mobile-alert.success {
    border-color: #b9dccb;
    color: #0f6842;
}

.presence-card {
    padding: 18px;
}

.presence-card-entry {
    flex-direction: row;
}

.presence-card-exit {
    flex-direction: row-reverse;
}

.presence-card > div,
.presence-card .geo-form {
    flex: 1 1 0;
}

.presence-card-entry .geo-form {
    display: flex;
    justify-content: flex-end;
}

.presence-card-exit .geo-form {
    display: flex;
    justify-content: flex-start;
}

.presence-card-exit > div {
    text-align: right;
}

.presence-card span,
.document-row span,
.plain-row span,
.message-card span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.presence-card strong {
    display: block;
    margin: 4px 0;
    font-size: 22px;
}

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

.presence-card button {
    min-width: 108px;
    background: var(--brand-2);
}

.presence-card .button-entry {
    background: #0f6842;
}

.presence-card .button-exit {
    background: var(--danger);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 14px;
}

.quick-actions a {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.quick-actions b {
    display: inline-flex;
    min-width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: 12px;
}

.mobile-section {
    padding: 18px;
}

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

.section-title h2 {
    margin: 4px 0 0;
    font-size: 22px;
}

.shift-list {
    display: grid;
    gap: 10px;
}

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

.shift-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-left: 6px solid #9aa3a7;
    border-radius: 14px;
    padding: 12px;
    background: #fff;
}

.shift-date {
    display: grid;
    place-items: center;
    min-height: 58px;
    border-radius: 12px;
    background: #f3f0ea;
}

.shift-date strong,
.shift-card b {
    font-size: 20px;
}

.shift-date span,
.shift-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.shift-success {
    border-left-color: #208754;
}

.shift-warning,
.shift-yellow {
    border-left-color: #c58a19;
}

.shift-danger {
    border-left-color: #b42318;
}

.shift-info {
    border-left-color: #2373a7;
}

.document-row,
.plain-row,
.message-card {
    border-top: 1px solid var(--line);
    padding: 14px 0;
}

.document-row:first-of-type,
.plain-row:first-of-type,
.message-card:first-of-type {
    border-top: 0;
}

.row-actions {
    display: flex;
    gap: 8px;
}

.row-actions a {
    background: var(--brand);
}

.row-actions a:first-child {
    background: var(--brand-2);
}

.empty-state {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.message-card p {
    margin: 8px 0;
    color: var(--muted);
    line-height: 1.55;
}

.employee-hero.compact {
    padding-bottom: 22px;
}

.employee-hero.compact .employee-topline {
    justify-content: flex-end;
}

.profile-tabs {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.profile-tabs a {
    flex: 0 0 auto;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 14px;
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

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

.profile-grid article {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    background: #faf9f6;
}

.profile-grid span,
.contract-card span,
.contract-docs span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.profile-grid strong {
    display: block;
    margin-top: 5px;
    overflow-wrap: anywhere;
}

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

.contract-card:first-of-type {
    border-top: 0;
}

.contract-card strong {
    display: block;
    margin-top: 4px;
}

.contract-docs {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.contract-docs a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 11px 12px;
    background: #faf9f6;
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}

.schedule-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.schedule-summary article {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(40, 34, 26, .08);
}

.schedule-summary span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.schedule-summary strong {
    display: block;
    margin-top: 8px;
    color: var(--brand-2);
    font-size: 30px;
}

.mobile-form {
    display: grid;
    gap: 12px;
}

.mobile-form input {
    border-radius: 10px;
    background: #fff;
}

.mobile-form button {
    width: 100%;
    margin-top: 4px;
    background: var(--brand-2);
}

.pdf-preview-wrap {
    margin-top: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f7f4ef;
}

.pdf-preview-frame {
    width: 100%;
    height: 680px;
    border: 0;
    background: #ffffff;
}

.is-extra {
    display: none;
}

.show-more {
    width: 100%;
    margin-top: 12px;
    border: 1px solid var(--line);
    background: #f7f4ef;
    color: var(--ink);
}

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

.management-filters {
    grid-template-columns: 1.3fr 1fr .8fr .8fr auto;
}

.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.sitemap-card {
    border: 1px solid var(--line);
    background: #fff;
    padding: 18px;
}

.sitemap-card h2 {
    margin: 8px 0 12px;
    font-size: 22px;
}

.sitemap-card ul {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
}

.sitemap-card li {
    color: var(--muted);
}

.sitemap-card a {
    color: var(--ink);
    text-decoration: none;
}

@media (max-width: 560px) {
    .employee-shell {
        padding: 10px;
    }

    .employee-hero,
    .mobile-alert,
    .presence-card,
    .mobile-section {
        border-radius: 14px;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .employee-identity h1 {
        font-size: 26px;
    }

    .document-row,
    .plain-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .row-actions {
        width: 100%;
    }

    .row-actions a {
        flex: 1;
        justify-content: center;
        text-align: center;
    }

    .profile-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

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

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

    .pdf-preview-frame {
        height: 520px;
    }
}

@media (max-width: 380px) {
    .management-filters,
    .schedule-grid {
        grid-template-columns: 1fr;
    }

    .pdf-preview-frame {
        height: 420px;
    }
}
