:root {
    --blue: #123d78;
    --blue-dark: #0c2853;
    --red: #b72d37;
    --gold: #d5ab43;
    --ink: #1d2c40;
    --muted: #66768c;
    --line: #e3e9f1;
    --bg: #f4f7fb;
    --radius: 16px;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font:
        15px/1.6 system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}
a {
    color: var(--blue);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
button,
input,
select,
textarea {
    font: inherit;
}
button,
a,
input,
select,
textarea {
    touch-action: manipulation;
}
button {
    cursor: pointer;
}
img {
    max-width: 100%;
}
h1,
h2,
h3,
p {
    margin-top: 0;
}
h1 {
    font-size: clamp(24px, 3vw, 32px);
    letter-spacing: -0.7px;
    line-height: 1.25;
    margin-bottom: 8px;
}
h2 {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 12px;
}
h3 {
    font-size: 17px;
    line-height: 1.4;
    margin-bottom: 8px;
}
small {
    font-size: 12px;
    color: var(--muted);
}
.muted {
    color: var(--muted);
}
.eyebrow {
    font-size: 11px;
    letter-spacing: 1.7px;
    font-weight: 750;
    color: var(--blue);
    margin-bottom: 8px;
}
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 256px;
    z-index: 30;
    background: white;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    padding: 28px 18px 18px;
    overflow-y: auto;
}
.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 0 8px 24px;
    color: var(--blue);
    font-size: 19px;
    font-weight: 800;
}
.brand:hover {
    text-decoration: none;
}
.brand img {
    width: 47px;
    height: 47px;
    object-fit: contain;
}
.brand small {
    display: block;
    font-size: 9px;
    letter-spacing: 1.3px;
}
.nav-caption {
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 1.5px;
    margin: 16px 14px 12px;
}
.nav-link {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 11px;
    margin-bottom: 5px;
    color: #53627a;
    font-size: 13px;
    font-weight: 600;
}
.nav-link > span {
    font-size: 20px;
    line-height: 1;
    width: 22px;
    text-align: center;
}
.nav-link:hover {
    background: #f1f5fa;
    text-decoration: none;
}
.nav-link.active {
    background: #eaf0fa;
    color: var(--blue);
    box-shadow: inset 3px 0 var(--gold);
}
.sidebar-bottom {
    margin-top: auto;
    padding: 26px 12px 0;
    overflow-wrap: anywhere;
}
.sidebar-bottom strong {
    display: block;
    font-size: 13px;
}
.sidebar-bottom small {
    display: block;
    font-size: 11px;
}
.logout {
    margin-top: 16px;
    background: transparent;
    border: 0;
    padding: 0;
    color: var(--red);
    font-size: 13px;
    font-weight: 650;
}
.workspace {
    margin-left: 256px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.topbar {
    height: 72px;
    padding: 0 36px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--line);
}
.topbar > span:first-of-type {
    font-size: 10px;
    letter-spacing: 1.3px;
    font-weight: 700;
    color: var(--muted);
}
.role-chip {
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 4px 12px;
    color: var(--blue);
    font-size: 11px;
    font-weight: 750;
}
.workspace main {
    width: 100%;
    max-width: 1560px;
    margin: auto;
    padding: 28px 36px 40px;
    flex: 1;
    min-width: 0;
}
.page-heading {
    margin-bottom: 25px;
}
.card {
    padding: 26px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 4px 18px #122f5905;
    margin-bottom: 24px;
    min-width: 0;
    overflow-wrap: anywhere;
}
.welcome {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    border-top: 3px solid var(--gold);
    background: linear-gradient(110deg, #fff, #edf3fb);
}
.welcome p:last-child {
    margin-bottom: 0;
}
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 20px;
}
.stat {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.stat > span {
    font-size: 12px;
    color: var(--muted);
}
.stat > strong {
    font-size: 36px;
    line-height: 1;
    color: var(--blue);
}
.stat h3 {
    color: var(--blue);
    margin: 0;
}
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.section-heading h2 {
    margin: 0;
}
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.6;
    text-align: center;
    min-height: 44px;
    white-space: normal;
}
.button:hover {
    text-decoration: none;
    filter: brightness(0.96);
}
.primary {
    color: #fff;
    background: var(--blue);
}
.secondary {
    color: var(--blue);
    background: #f3f6fb;
    border-color: var(--line);
}
.danger-button {
    background: #fff1f1;
    border-color: #efccd0;
    color: var(--red);
}
.compact {
    padding: 7px 12px;
    font-size: 12px;
    min-height: 40px;
}
.full {
    width: 100%;
}
.notice {
    background: #ebf6f0;
    border: 1px solid #cce5d7;
    border-radius: 10px;
    padding: 12px 16px;
    color: #245d44;
    margin-bottom: 20px;
    overflow-wrap: anywhere;
}
.notice.danger {
    background: #fff0f0;
    color: var(--red);
    border-color: #efd0d0;
}
.badge {
    display: inline-block;
    max-width: 100%;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    white-space: normal;
    line-height: 1.5;
}
.badge.approved {
    background: #e7f5ed;
    color: #28714b;
}
.badge.rejected {
    background: #fff0f0;
    color: var(--red);
}
.badge.pending {
    background: #fff6dd;
    color: #816019;
}
.attention {
    color: var(--blue);
    font-weight: 650;
}
.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
th {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    padding: 12px;
    background: #f7f9fc;
    border-bottom: 1px solid var(--line);
}
td {
    padding: 15px 12px;
    font-size: 13px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    overflow-wrap: anywhere;
}
td strong {
    font-size: 13px;
}
td small {
    display: block;
    margin-top: 4px;
}
tbody tr:last-child td {
    border-bottom: 0;
}
.table-wrap table {
    table-layout: fixed;
}
.table-wrap th:nth-child(1) {
    width: 22%;
}
.table-wrap th:nth-child(2) {
    width: 33%;
}
.table-wrap th:nth-child(3) {
    width: 30%;
}
.table-wrap th:nth-child(4) {
    width: 15%;
}
.empty {
    text-align: center;
    padding: 30px;
    color: var(--muted);
}
.form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
}
.span-two {
    grid-column: 1/-1;
}
label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #42516a;
    font-size: 12px;
    font-weight: 650;
    min-width: 0;
}
input,
select,
textarea {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border: 1px solid #d9e1eb;
    background: #fff;
    color: var(--ink);
    border-radius: 9px;
    padding: 10px 12px;
    min-height: 44px;
    font-size: 14px;
    font-weight: 400;
}
select {
    white-space: nowrap;
    text-overflow: ellipsis;
}
input[type="file"] {
    font-size: 12px;
    padding: 9px;
}
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #b5cae9;
    outline-offset: 2px;
    border-color: var(--blue);
}
textarea {
    resize: vertical;
}
label small {
    font-weight: 400;
}
fieldset {
    margin: 24px 0 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px;
    min-width: 0;
}
legend {
    font-size: 12px;
    font-weight: 700;
    padding: 0 8px;
}
.people-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-height: 360px;
    overflow-y: auto;
    padding: 4px;
}
.check {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    background: #f7f9fc;
    padding: 12px;
    border-radius: 8px;
    overflow-wrap: anywhere;
}
.check input {
    width: 18px;
    height: 18px;
    min-height: 18px;
    flex-shrink: 0;
    accent-color: var(--blue);
    margin-top: 3px;
}
.check small {
    display: block;
}
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
    flex-wrap: wrap;
}
.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}
.pagination {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 20px;
}
.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin: 24px 0 0;
}
.details-grid div {
    min-width: 0;
}
dt {
    font-size: 11px;
    color: var(--muted);
    font-weight: 650;
}
dd {
    margin: 5px 0 0;
    font-size: 14px;
    white-space: normal;
    overflow-wrap: anywhere;
}
.timeline article {
    border-left: 3px solid var(--gold);
    padding: 5px 0 5px 16px;
    margin: 14px 0;
}
.timeline article small {
    display: block;
}
.timeline article p {
    font-size: 12px;
    margin: 6px 0 0;
}
.signatory-grid,
.account-grid,
.business-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
}
.signatory-card,
.account-card {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    min-width: 0;
    overflow-wrap: anywhere;
}
.signatory-card h3 {
    margin-top: 12px;
}
.signatory-card p {
    margin-bottom: 6px;
}
.signatory-card small {
    display: block;
}
.signatory-card form {
    margin-top: 16px;
}
.signature-preview {
    display: block;
    width: 100%;
    height: 92px;
    object-fit: contain;
    background: #f9fafc;
    border: 1px dashed var(--line);
    border-radius: 8px;
    margin: 14px 0;
}
.account-card > small {
    display: block;
    margin-bottom: 16px;
}
.account-card form .button {
    margin-top: 16px;
}
.account-card form .form-actions .button {
    margin-top: 0;
}
.workspace-footer {
    padding: 0 36px 20px;
    color: var(--muted);
    font-size: 11px;
}
.narrow {
    max-width: 760px;
}
.menu-button,
.mobile-close {
    display: none;
}
.scrim[hidden] {
    display: none;
}
.scrim {
    position: fixed;
    inset: 0;
    background: #0b1d3e66;
    border: 0;
    z-index: 25;
}
.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 15% 15%, #e5edf8, transparent 50%), var(--bg);
    padding: 20px;
}
.auth-card {
    background: white;
    padding: 36px;
    max-width: 460px;
    width: 100%;
    border-radius: 20px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--gold);
    box-shadow: 0 20px 65px #17386512;
    overflow-wrap: anywhere;
}
.auth-card h1 {
    color: var(--blue);
}
.auth-logo {
    height: 65px;
    width: 65px;
    object-fit: contain;
    margin-bottom: 16px;
}
.auth-card form label {
    margin: 18px 0;
}
.auth-foot {
    display: block;
    text-align: center;
    margin-top: 22px;
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}
:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}
.print-page {
    padding: 20px;
    background: #eef1f5;
}
.print-tools {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.paper {
    background: white;
    max-width: 850px;
    margin: 0 auto;
    padding: 45px;
    overflow-wrap: anywhere;
    box-shadow: 0 4px 20px #0001;
}
.letterhead {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border-bottom: 2px solid var(--blue);
    padding-bottom: 20px;
    text-align: center;
    font-size: 12px;
}
.letterhead img {
    width: 65px;
    height: 65px;
    object-fit: contain;
}
.document-title {
    font-size: 22px;
    text-align: center;
    margin: 25px 0 5px;
    letter-spacing: 1px;
}
.document-number {
    text-align: center;
    font-size: 12px;
}
.draft-label {
    text-align: center;
    color: var(--red);
    font-size: 12px;
    font-weight: 700;
}
.print-details {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 14px;
    margin: 35px 0;
}
.print-details dt {
    color: var(--ink);
    font-size: 13px;
}
.print-details dd {
    margin: 0;
}
.print-table th,
.print-table td {
    background: white;
    border: 1px solid #c8ced7;
    font-size: 12px;
}
.document-signatures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}
.signed-block {
    margin-top: 20px;
    break-inside: avoid;
}
.signed-block img {
    display: block;
    height: 70px;
    width: 210px;
    object-fit: contain;
    object-position: center;
}
.signed-block strong,
.signed-block span,
.signed-block small {
    display: block;
    font-size: 12px;
}
.signed-block p {
    font-size: 12px;
    margin-bottom: 10px;
}
.legacy-note {
    font-size: 11px;
    color: var(--muted);
    margin-top: 30px;
}
.paper-footer {
    margin-top: 40px;
    font-size: 10px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    padding-top: 10px;
}
@media (max-width: 1100px) {
    .workspace main {
        padding: 24px;
    }
    .topbar {
        padding: 0 24px;
    }
    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }
    .stat-grid .stat:last-child {
        grid-column: 1/-1;
    }
    .signatory-grid,
    .account-grid {
        grid-template-columns: 1fr;
    }
    .welcome {
        align-items: flex-start;
        flex-direction: column;
    }
}
@media (max-width: 800px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.18s ease;
        width: min(280px, 86vw);
        visibility: hidden;
    }
    .sidebar.open {
        transform: translateX(0);
        visibility: visible;
    }
    .workspace {
        margin-left: 0;
    }
    .menu-button {
        display: block;
        background: #eef3fa;
        color: var(--blue);
        border: 0;
        border-radius: 8px;
        width: 42px;
        height: 42px;
        font-size: 20px;
        flex-shrink: 0;
    }
    .mobile-close {
        display: block;
        position: absolute;
        right: 10px;
        top: 8px;
        border: 0;
        background: transparent;
        color: var(--blue);
        font-size: 25px;
        width: 40px;
        height: 40px;
    }
    .topbar {
        padding: 0 16px;
        height: 64px;
    }
    .topbar > span:first-of-type {
        font-size: 8px;
        letter-spacing: 0.4px;
    }
    .role-chip {
        font-size: 10px;
        padding: 4px 9px;
    }
    .workspace main {
        padding: 24px 16px;
    }
    .card {
        padding: 20px;
    }
    .page-heading {
        margin-bottom: 20px;
    }
    .workspace-footer {
        padding: 0 16px 20px;
    }
    .business-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 540px) {
    .form-grid,
    .details-grid,
    .stat-grid,
    .people-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .span-two {
        grid-column: auto;
    }
    .stat-grid .stat:last-child {
        grid-column: auto;
    }
    .stat-grid {
        gap: 0;
    }
    .form-actions .button {
        flex: 1;
    }
    .auth-card {
        padding: 26px 22px;
    }
    .card {
        border-radius: 13px;
        padding: 18px;
    }
    .section-heading {
        align-items: flex-start;
    }
    .table-wrap table,
    .table-wrap tbody,
    .table-wrap tr,
    .table-wrap td {
        display: block;
        width: 100%;
        table-layout: auto;
    }
    .table-wrap thead {
        display: none;
    }
    .table-wrap tr {
        padding: 12px 0;
        border-bottom: 1px solid var(--line);
    }
    .table-wrap td {
        padding: 5px 0;
        border: 0;
    }
    .table-wrap td:first-child strong {
        font-size: 14px;
        color: var(--blue);
    }
    .table-wrap td .button {
        width: 100%;
        margin-top: 8px;
    }
    .table-wrap tr:last-child {
        border: 0;
    }
    .search-form {
        flex-wrap: wrap;
    }
    .search-form input {
        flex: 1 1 100%;
    }
    .search-form .button {
        width: 100%;
    }
    .paper {
        padding: 24px 18px;
    }
    .print-page {
        padding: 12px;
    }
    .letterhead {
        font-size: 10px;
        gap: 10px;
    }
    .letterhead img {
        width: 45px;
        height: 45px;
    }
    .print-details {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    .print-details dd {
        margin-bottom: 12px;
    }
    .document-signatures {
        grid-template-columns: 1fr;
    }
    .paper .print-table {
        table-layout: fixed;
    }
    .topbar > span:first-of-type {
        max-width: 165px;
    }
    .check {
        padding: 10px;
    }
    .welcome .button {
        width: 100%;
    }
}
@media (prefers-reduced-motion: reduce) {
    .sidebar {
        transition: none;
    }
}
@page {
    size: A4;
    margin: 15mm;
}
@media print {
    body.print-page {
        padding: 0;
        background: white;
        color: black;
        font-size: 11pt;
    }
    .print-tools {
        display: none;
    }
    .paper {
        padding: 0;
        max-width: none;
        box-shadow: none;
    }
    .letterhead {
        font-size: 10pt;
        border-bottom-color: black;
    }
    .document-title {
        font-size: 16pt;
    }
    .document-signatures {
        grid-template-columns: 1fr 1fr;
    }
    .print-details {
        grid-template-columns: 35mm minmax(0, 1fr);
        gap: 10px;
    }
    .print-details dd {
        margin: 0;
    }
    .print-table thead {
        display: table-header-group;
    }
    .print-table tr {
        break-inside: avoid;
    }
    .letterhead img {
        width: 16mm;
        height: 16mm;
    }
    .signed-block {
        break-inside: avoid;
    }
    .print-details dt,
    .print-details dd {
        font-size: 10pt;
    }
    .draft-label {
        color: black;
    }
    .paper-footer {
        font-size: 8pt;
    }
    a {
        color: black;
    }
}

.registration-card {
    max-width: 650px;
}
.registration-card form label {
    margin: 0;
}
.registration-card .auth-foot {
    font-size: 13px;
}

.traveler-search {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}
.traveler-search label {
    flex: 1;
}
.traveler-search .button {
    flex-shrink: 0;
}
.picker-message {
    font-size: 12px;
    color: var(--blue);
    min-height: 20px;
    margin: 12px 0;
}
.selected-travelers {
    display: grid;
    gap: 10px;
}
.traveler-row {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    background: #f7f9fc;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
}
.traveler-row > div {
    min-width: 0;
    overflow-wrap: anywhere;
}
.traveler-row strong,
.traveler-row small {
    display: block;
}
.traveler-row .button {
    flex-shrink: 0;
}
button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
@media (max-width: 540px) {
    .traveler-search {
        flex-direction: column;
        align-items: stretch;
    }
    .traveler-search .button {
        width: 100%;
    }
    .traveler-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .traveler-row .button {
        margin-left: auto;
    }
}

.account-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}
.account-tabs span {
    padding: 0 7px;
    border-radius: 20px;
    background: #ffffff30;
}
.account-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0;
}
.account-role-form {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.account-role-form label {
    flex: 1;
    min-width: 110px;
}
.accounts-table th:nth-child(1) {
    width: 25%;
}
.accounts-table th:nth-child(2) {
    width: 25%;
}
.accounts-table th:nth-child(3) {
    width: 18%;
}
.accounts-table th:nth-child(4) {
    width: 32%;
}
.account-create-body {
    margin-top: 20px;
}
details summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--blue);
}
@media (max-width: 540px) {
    .account-tabs .button {
        flex: 1 1 100%;
    }
    .account-actions .button {
        flex: 1;
        margin: 0 !important;
    }
    .account-role-form .button {
        width: 100%;
    }
    .account-role-form label {
        flex-basis: 100%;
    }
}

.traveler-suggestions {
    display: grid;
    gap: 4px;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 6px;
    background: #fff;
}
.traveler-suggestions[hidden] {
    display: none;
}
.traveler-suggestion {
    text-align: left;
    border: 0;
    border-radius: 7px;
    background: #f3f6fb;
    color: var(--blue);
    padding: 10px;
    font-size: 13px;
    white-space: normal;
    overflow-wrap: anywhere;
}
.traveler-suggestion:hover,
.traveler-suggestion:focus {
    background: #e4edf9;
}

.account-role-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}
.account-role-form .button {
    justify-self: start;
}
.account-role-form label {
    min-width: 0;
}

.floating-menu {
    display: none;
}
@media screen and (max-width: 800px) {
    .floating-menu {
        display: flex;
        position: fixed;
        right: calc(18px + env(safe-area-inset-right, 0px));
        bottom: calc(18px + env(safe-area-inset-bottom, 0px));
        z-index: 24;
        align-items: center;
        gap: 8px;
        border: 1px solid #ffffff55;
        border-radius: 30px;
        background: var(--blue);
        color: #fff;
        box-shadow: 0 5px 20px #0c285344;
        padding: 12px 18px;
        font-size: 13px;
        font-weight: 700;
        min-height: 48px;
    }
    .floating-menu > span:first-child {
        font-size: 22px;
        line-height: 1;
    }
    .navigation-open .floating-menu {
        display: none;
    }
    .workspace-footer {
        padding-bottom: 90px;
    }
}
@media print {
    .floating-menu {
        display: none !important;
    }
}

:root {
    --blue: #1556a6;
    --blue-dark: #123e78;
    --gold: #1556a6;
    --line: #dce8f6;
    --bg: #f3f7fc;
    --ink: #163459;
    --muted: #5c7391;
}
.nav-link.active {
    background: var(--blue);
    color: white;
    box-shadow: none;
}
.nav-link.active > span {
    color: white;
}
.logout {
    color: var(--blue);
}
.welcome,
.auth-card {
    border-top-color: var(--blue);
}
.record-intro {
    font-size: 13px;
    margin: 6px 0 0;
    line-height: 1.6;
}
.records-panel {
    border-top: 4px solid var(--blue);
}
.records-panel .table-wrap {
    border: 1px solid var(--line);
    border-radius: 12px;
}
.records-panel th {
    background: var(--blue);
    color: white;
    padding: 15px 16px;
}
.records-panel td {
    padding: 18px 16px;
}
.records-panel tbody tr:nth-child(even) {
    background: #f7faff;
}
.records-panel tbody tr:hover {
    background: #eef5ff;
}
.search-form input {
    flex: 1;
    min-width: 0;
}
.search-form .button {
    flex: 0 0 auto;
    min-width: 94px;
    white-space: nowrap;
}
.badge {
    border: 1px solid #c9def6;
}
.badge.approved {
    background: var(--blue);
    color: white;
    border-color: var(--blue);
}
.badge.pending {
    background: #eaf3ff;
    color: #1956a2;
}
.badge.rejected {
    background: white;
    color: #173e72;
    border: 1px dashed #7695b9;
}
.notice {
    background: #edf5ff;
    border-color: #c9ddf5;
    color: #184f91;
}
.danger-button {
    background: white;
    border-color: #86a7ce;
    color: #174d8b;
}
.danger-button:hover {
    background: #edf4ff;
}
.record-total,
.record-mark {
    background: #eaf3ff;
    color: var(--blue);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 750;
}
.record-mark {
    font-size: 20px;
    letter-spacing: 1px;
}
.business-record {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 22px;
    overflow-wrap: anywhere;
    min-width: 0;
    box-shadow: 0 3px 12px #1556a607;
    border-top: 3px solid var(--blue);
}
.business-record-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.record-reference {
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.7px;
    color: var(--muted);
}
.business-record h3 {
    font-size: 16px;
    color: var(--blue-dark);
    margin-bottom: 4px;
}
.record-date {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 16px;
}
.itinerary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    background: #f0f6ff;
    padding: 14px;
    border-radius: 10px;
}
.itinerary strong {
    display: block;
    font-size: 13px;
    font-weight: 650;
}
.itinerary small,
.record-purpose > small {
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.7px;
    color: var(--blue);
}
.itinerary > span {
    font-size: 22px;
    color: var(--blue);
}
.record-purpose {
    padding: 16px 0;
    flex: 1;
}
.record-purpose p {
    font-size: 13px;
    color: var(--muted);
    margin: 5px 0 0;
}
.record-actions {
    border-top: 1px solid var(--line);
    padding-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.record-actions form {
    margin: 0;
}
.record-decisions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
}
.workspace-alert {
    border-radius: 18px !important;
    border: 1px solid var(--line) !important;
    font-family: inherit !important;
}
.workspace-alert .swal2-title {
    color: var(--blue-dark);
    font-size: 23px;
}
.workspace-alert .swal2-html-container {
    font-size: 14px;
    color: var(--muted);
}
.workspace-alert .swal2-actions {
    gap: 10px;
}
.workspace-alert .swal2-icon {
    color: var(--blue);
    border-color: #bfd5f0;
}
.workspace-alert .swal2-success-ring {
    border-color: #d2e3f8 !important;
}
.workspace-alert [class^="swal2-success-line"] {
    background: var(--blue) !important;
}
.workspace-alert .swal2-icon.swal2-info,
.workspace-alert .swal2-icon.swal2-question {
    color: var(--blue);
    border-color: #bfd5f0;
}
.swal2-popup {
    max-width: calc(100vw - 32px) !important;
}
@media (max-width: 540px) {
    .records-panel .table-wrap {
        border: 0;
    }
    .records-panel tbody tr {
        padding: 16px;
        border: 1px solid var(--line);
        border-left: 4px solid var(--blue);
        border-radius: 12px;
        margin-bottom: 12px;
        background: white;
    }
    .records-panel tbody tr:last-child {
        border: 1px solid var(--line);
        border-left: 4px solid var(--blue);
    }
    .records-panel td {
        padding: 5px 0;
    }
    .records-panel td[data-label="Status"]::before {
        content: "STATUS";
        display: block;
        font-size: 9px;
        letter-spacing: 1px;
        color: var(--muted);
        margin: 5px 0;
    }
    .search-form .button {
        flex: 1 1 100%;
    }
    .business-record {
        padding: 16px;
    }
    .itinerary {
        gap: 8px;
        padding: 12px;
    }
    .record-actions > .button,
    .record-actions > form {
        flex: 1 1 100%;
    }
    .record-actions > form > .button {
        width: 100%;
    }
    .record-decisions .button {
        flex: 1;
    }
    .business-record-heading {
        flex-wrap: wrap;
    }
    .workspace-alert .swal2-title {
        font-size: 20px;
    }
}

.signed-block img {
    width: 220px;
    max-width: 100%;
    height: 76px;
    object-fit: contain;
    object-position: center bottom;
    margin-bottom: 2px;
}
.signature-preview {
    object-position: center;
}
.signed-block strong {
    margin-top: 0;
}
@media print {
    .signed-block img {
        width: 55mm;
        height: 19mm;
    }
}

.account-dropdown {
    position: relative;
    margin-left: auto;
}
.account-dropdown summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--blue);
    list-style: none;
}
.account-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 14px);
    width: 260px;
    max-width: 85vw;
    z-index: 40;
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 12px 35px #12335b22;
    display: grid;
    gap: 12px;
}
.account-dropdown-menu a {
    display: block;
    padding: 8px;
    border-radius: 8px;
}
.password-meter {
    display: block;
    width: 100%;
    height: 12px;
    margin: 8px 0;
}
.password-feedback {
    display: block;
    font-size: 12px;
    color: var(--blue);
}
.own-signature {
    width: 230px;
    height: 100px;
    object-fit: contain;
    display: block;
    margin: 12px 0;
}
.travel-modal {
    width: min(920px, calc(100% - 24px));
    max-height: 90dvh;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow-y: auto;
    color: var(--ink);
    background: #f4f8ff;
}
.travel-modal::backdrop {
    background: #122c4c88;
}
.travel-modal .card {
    margin-bottom: 0;
}
.modal-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.modal-heading h2 {
    margin: 0;
}
.travel-modal-open {
    overflow: hidden;
}
.table-date {
    display: block;
    margin-top: 6px;
}
.ob-table {
    width: 100%;
    min-width: 900px;
    table-layout: fixed;
}
.ob-table .ob-reference {
    width: 9%;
}
.ob-table .ob-employees {
    width: 18%;
}
.ob-table .ob-itinerary {
    width: 16%;
}
.ob-table .ob-purpose {
    width: 22%;
}
.ob-table .ob-status {
    width: 16%;
}
.ob-table .ob-actions {
    width: 19%;
}
.table-wrap .ob-table th:nth-child(n) {
    width: auto;
}
.ob-table .badge {
    max-width: none;
    white-space: nowrap;
}
.purpose-preview {
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.purpose-details summary {
    color: var(--blue);
    cursor: pointer;
    font-weight: 600;
}
.purpose-full {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin-top: 8px;
}
.ob-table td {
    vertical-align: top;
    overflow-wrap: anywhere;
}
.ob-table .record-actions {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ob-table td:nth-child(4) {
    max-width: 320px;
}
.swal2-container {
    z-index: 10000;
}
@media (max-width: 600px) {
    .topbar > span {
        font-size: 8px;
        max-width: 40%;
    }
    .account-dropdown summary {
        font-size: 11px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .account-dropdown .role-chip {
        font-size: 9px;
    }
    .travel-modal {
        padding: 10px;
    }
    .travel-modal .card {
        padding: 14px;
    }
    .ob-table colgroup,
    .ob-table thead {
        display: none;
    }
    .ob-table,
    .ob-table tbody,
    .ob-table tr,
    .ob-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }
    .ob-table tr {
        border: 1px solid var(--line);
        border-radius: 12px;
        padding: 10px;
        margin: 10px 0;
    }
    .ob-table td {
        border: 0;
        max-width: none !important;
        padding: 8px !important;
    }
    .ob-table td:before {
        content: attr(data-label);
        display: block;
        font-weight: bold;
        color: var(--blue);
        font-size: 11px;
        margin-bottom: 4px;
    }
    .records-panel .table-wrap {
        overflow: visible;
    }
}

.account-icon {
    display: block;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.account-dropdown summary:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 4px;
}

.account-dropdown summary {
    width: 44px;
    height: 44px;
    justify-content: center;
    flex-wrap: nowrap;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #eef5ff;
    color: var(--blue);
}

.account-dropdown .account-icon {
    display: block;
}

.account-dropdown .account-label,
.account-dropdown .role-chip,
.account-dropdown .account-chevron {
    display: none;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}
.topbar-actions .account-dropdown {
    margin-left: 0;
}
.notification-dropdown {
    position: relative;
}
.icon-menu-button {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #eef5ff;
    color: var(--blue);
    cursor: pointer;
    position: relative;
    list-style: none;
}
.icon-menu-button svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.icon-menu-button:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}
.notification-count {
    position: absolute;
    top: -5px;
    right: -6px;
    min-width: 20px;
    padding: 2px 5px;
    border: 2px solid #fff;
    border-radius: 12px;
    color: #fff;
    background: #bd2939;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
}
.notification-menu {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: 340px;
    max-width: calc(100vw - 28px);
    max-height: 65vh;
    overflow-y: auto;
    z-index: 45;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 16px 42px #12335b24;
    background: #fff;
}
.dropdown-heading {
    padding: 18px;
    border-bottom: 1px solid var(--line);
    background: #f4f8ff;
}
.dropdown-heading strong,
.dropdown-heading small,
.notification-item strong,
.notification-item small {
    display: block;
}
.dropdown-heading small,
.notification-item small {
    font-size: 11px;
    color: var(--muted);
    margin-top: 5px;
    overflow-wrap: anywhere;
}
.notification-item {
    display: block;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
}
.notification-item:hover,
.account-settings-link:hover {
    background: #eef5ff;
}
.dropdown-footer {
    display: block;
    padding: 14px 18px;
    font-size: 12px;
    font-weight: 700;
}
.notification-empty {
    padding: 18px;
    font-size: 12px;
    color: var(--muted);
}
.account-dropdown-menu {
    border-radius: 18px;
    padding: 0;
    gap: 0;
    width: 300px;
    overflow: hidden;
}
.account-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 18px 8px;
    background: #f4f8ff;
}
.account-identity div {
    min-width: 0;
}
.account-identity strong {
    display: block;
    font-size: 13px;
    overflow-wrap: anywhere;
}
.account-identity small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-top: 5px;
}
.account-avatar {
    flex: 0 0 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: var(--blue);
    color: #fff;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
}
.account-office {
    background: #f4f8ff;
    padding: 0 18px 16px;
    margin: 0;
    font-size: 11px;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere;
}
.account-dropdown-menu .account-settings-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    border-radius: 0;
    font-size: 12px;
}
.account-settings-link div {
    flex: 1;
}
.account-settings-link small {
    display: block;
    font-size: 10px;
    color: var(--muted);
    margin-top: 5px;
}
.account-dropdown-menu form {
    border-top: 1px solid var(--line);
    padding: 14px 18px;
}
.account-dropdown-menu form button {
    width: 100%;
    color: var(--red);
}
.approval-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}
.approval-summary > * {
    border: 1px solid var(--line);
    background: #f4f8ff;
    border-radius: 12px;
    padding: 16px;
}
.approval-summary strong {
    display: block;
    font-size: 23px;
    color: var(--blue);
}
.approval-summary span {
    display: block;
    font-size: 11px;
    margin-top: 6px;
    color: var(--muted);
}
.approval-list > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
}
.approval-list > a > span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}
.approval-list > a > span:last-child {
    white-space: nowrap;
}
.approval-list small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
}
@media (max-width: 600px) {
    .notification-menu {
        position: fixed;
        top: 75px;
        right: 14px;
    }
    .topbar-actions {
        gap: 8px;
    }
    .approval-summary {
        grid-template-columns: 1fr;
    }
}

.signature-unavailable { font-size: 11px; color: #a62134; margin: 12px 0; font-weight: normal; }
