:root {
    --bg: #f3f7f8;
    --paper: rgba(255, 255, 255, 0.94);
    --ink: #15313a;
    --muted: #61747b;
    --line: #d7e3e5;
    --brand: #0f7b72;
    --brand-strong: #075e59;
    --accent: #d99816;
    --accent-soft: #fff6df;
    --danger: #b93832;
    --success: #218358;
    --shadow: 0 18px 48px rgba(19, 61, 69, 0.1);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(217, 152, 22, 0.13), transparent 25%),
        radial-gradient(circle at top right, rgba(15, 123, 114, 0.15), transparent 25%),
        linear-gradient(180deg, #f8fbfb 0%, rgba(243, 247, 248, 0.7) 100%),
        var(--bg);
}

.toast-stack {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1000;
    display: grid;
    gap: 10px;
    width: min(320px, calc(100vw - 24px));
}

.toast-message {
    padding: 12px 14px;
    border-radius: 14px;
    box-shadow: 0 18px 34px rgba(31, 41, 55, 0.16);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    background: #fff;
    color: #111827;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast-message.success {
    background: #eaf7ef;
    color: #155724;
    border: 1px solid rgba(21, 127, 59, 0.24);
}

.toast-message.error {
    background: #fdecec;
    color: #7a271a;
    border: 1px solid rgba(180, 35, 24, 0.2);
}

.toast-message.info {
    background: #eef6fb;
    color: #114b73;
    border: 1px solid rgba(17, 75, 115, 0.14);
}

.toast-hide {
    opacity: 0;
    transform: translateY(-6px);
}

a {
    color: var(--brand-strong);
}

h1, h2, h3, h4, p {
    margin-top: 0;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.auth-shell::before,
.auth-shell::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(6px);
    opacity: 0.9;
}

.auth-shell::before {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(217, 152, 22, 0.18), rgba(217, 152, 22, 0));
    top: 5%;
    left: 8%;
}

.auth-shell::after {
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(15, 118, 110, 0.20), rgba(15, 118, 110, 0));
    right: 4%;
    bottom: 2%;
}

.auth-panel,
.hero-card,
.panel,
.card,
.side-nav {
    background: var(--paper);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(215, 227, 229, 0.94);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.auth-panel {
    width: min(560px, 100%);
    padding: 40px 34px 34px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.auth-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 7px;
    background: linear-gradient(90deg, var(--accent), #42a69a, var(--brand-strong));
}

.auth-panel h1 {
    font-size: clamp(34px, 5vw, 48px);
    line-height: 0.98;
    margin-bottom: 12px;
    letter-spacing: -0.04em;
}

.auth-lead {
    max-width: 34rem;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.tutorial-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 13px 14px;
    border: 1px solid rgba(15, 123, 114, 0.18);
    border-radius: 17px;
    color: var(--ink);
    background: linear-gradient(135deg, #eef9f7, #f8fcfb);
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tutorial-link:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 123, 114, 0.38);
    box-shadow: 0 12px 26px rgba(19, 61, 69, 0.09);
}

.tutorial-link__icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    font-weight: 900;
}

.tutorial-link strong,
.tutorial-link small {
    display: block;
}

.tutorial-link small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.tutorial-link__arrow {
    color: var(--brand-strong);
    font-size: 21px;
    font-weight: 800;
}

.auth-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 22px 0 18px;
}

.auth-switch__button.active {
    background: linear-gradient(135deg, #0f766e, #0b5c56);
    color: #fff;
    box-shadow: 0 16px 28px rgba(15, 118, 110, 0.18);
}

.auth-mode-panel {
    display: none;
    gap: 14px;
}

.auth-mode-panel.active {
    display: grid;
}

.auth-mode-copy {
    margin-bottom: 4px;
}

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

.muted {
    color: var(--muted);
}

.stack,
.inline-form {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    padding: 14px 15px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(15, 118, 110, 0.55);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.10);
    transform: translateY(-1px);
}

textarea {
    resize: vertical;
}

.password-field {
    position: relative;
    display: block;
    width: 100%;
}

.password-field input {
    padding-right: 54px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 12px;
    transform: translateY(-50%);
    background: transparent;
    color: var(--ink);
    box-shadow: none;
    font-size: 18px;
}

.password-toggle:hover {
    transform: translateY(-50%);
    background: rgba(15, 118, 110, 0.1);
    box-shadow: none;
}

.forgot-password-link {
    width: fit-content;
    margin: -2px 0 0;
    padding: 4px 0;
    border-radius: 0;
    color: var(--brand-strong);
    background: transparent;
    box-shadow: none;
    text-decoration: underline;
}

.forgot-password-link:hover {
    transform: none;
    color: var(--brand);
    background: transparent;
    box-shadow: none;
}

.password-reset-panel {
    display: none;
    gap: 14px;
    margin-top: 2px;
    padding: 16px;
    border: 1px solid rgba(15, 118, 110, 0.18);
    border-radius: 18px;
    background: linear-gradient(135deg, #f2fbf9, #fff);
}

.password-reset-panel.active {
    display: grid;
}

.password-reset-panel > p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.password-reset-form {
    padding-top: 14px;
    border-top: 1px solid rgba(15, 118, 110, 0.14);
}

.register-photo-preview {
    width: 76px;
    height: 76px;
    object-fit: cover;
    border-radius: 18px;
    border: 2px solid rgba(15, 118, 110, 0.25);
}

button {
    border: 0;
    padding: 14px 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 16px 28px rgba(15, 118, 110, 0.18);
}

button:hover {
    transform: translateY(-2px);
    opacity: 0.96;
    box-shadow: 0 20px 32px rgba(15, 118, 110, 0.22);
}

.button-secondary {
    background: linear-gradient(135deg, #eef2f3, #dde6e8);
    color: var(--ink);
    box-shadow: none;
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, #eef2f3, #dde6e8);
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
}

.button-danger {
    background: var(--danger);
    box-shadow: none;
}

.demo-box,
.flash {
    padding: 14px 16px;
    border-radius: 16px;
    margin-top: 18px;
}

.demo-box {
    background: #f4f7f8;
    border: 1px dashed #bfd1d3;
}

.flash.success {
    background: rgba(21, 127, 59, 0.10);
    border: 1px solid rgba(21, 127, 59, 0.25);
    color: #155724;
}

.flash.error {
    background: rgba(180, 35, 24, 0.10);
    border: 1px solid rgba(180, 35, 24, 0.22);
    color: #7a271a;
}

.topbar {
    margin: 18px 28px 0;
    padding: 18px 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: space-between;
    border: 1px solid rgba(215, 227, 229, 0.9);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 30px rgba(19, 61, 69, 0.07);
    backdrop-filter: blur(12px);
}

.topbar h1 {
    margin-bottom: 6px;
}

.topbar h1 span {
    color: var(--brand-strong);
    font-size: 18px;
}

.app-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 20px;
    padding: 8px 28px 32px;
}

.side-nav {
    position: sticky;
    top: 20px;
    height: fit-content;
    padding: 14px;
    display: grid;
    gap: 12px;
}

.nav-group {
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #f8fbfb;
    overflow: hidden;
}

.nav-group summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 14px;
    font-weight: 800;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.nav-group summary::after {
    content: "+";
    font-size: 18px;
    line-height: 1;
    color: var(--brand-strong);
}

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

.nav-group summary.active {
    background: linear-gradient(135deg, #0f766e, #0b5c56);
    color: #fff;
}

.nav-group summary.active::after {
    color: #fff;
}

.nav-links {
    display: grid;
    gap: 8px;
    padding: 0 12px 12px;
}

.nav-group:not([open]) .nav-links {
    display: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--ink);
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    font-weight: 600;
    border: 1px solid var(--line);
}

.nav-links a.active {
    background: linear-gradient(135deg, #0f766e, #0b5c56);
    color: #fff;
    border-color: rgba(11, 92, 86, 0.92);
}

.content {
    display: grid;
    gap: 20px;
}

.hero-card {
    padding: 24px;
    display: grid;
    gap: 18px;
    color: #f8ffff;
    background: linear-gradient(135deg, #075e59 0%, #0f7b72 58%, #29988b 100%);
    border-color: transparent;
}

.hero-card .eyebrow,
.hero-card p {
    color: rgba(245, 255, 254, 0.78);
}

.hero-card h2 {
    color: #fff;
}

.metric-grid,
.grid.two-col {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-grid article,
.salary-summary div {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 249, 248, 0.96));
    border-radius: 18px;
    padding: 16px;
}

.hero-card .metric-grid article {
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-card .metric-grid span {
    color: rgba(245, 255, 254, 0.74);
}

.hero-card .metric-grid strong {
    color: #fff;
}

.metric-grid span,
.salary-summary span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
    font-size: 13px;
}

.metric-grid strong,
.salary-summary strong {
    font-size: 28px;
}

.panel {
    padding: 20px;
}

.panel-header,
.section-title-row,
.list-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.card {
    padding: 18px;
}

.card h4,
.panel h3,
.hero-card h2 {
    letter-spacing: -0.02em;
}

.list {
    display: grid;
    gap: 12px;
}

.list-item {
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

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

.list-item img {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--line);
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.calendar-head {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    padding-bottom: 6px;
}

.calendar-day {
    min-height: 74px;
    border-radius: 16px;
    border: 1px solid var(--line);
    padding: 10px;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.calendar-day.today {
    border-color: var(--brand);
    background: #ebfbf8;
}

.calendar-day.holiday {
    background: var(--accent-soft);
    border-color: #edca7a;
}

.calendar-day.empty {
    background: transparent;
    border-style: dashed;
}

.calendar-day small {
    color: var(--accent);
    font-weight: 700;
}

.inline-form {
    margin-top: 16px;
}

.button-row {
    display: flex;
    gap: 10px;
}

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

.camera-toggle.active {
    background: linear-gradient(135deg, #0f766e, #0b5c56);
    color: #fff;
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.16);
}

.location-panel {
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(235, 251, 248, 0.72), rgba(255, 248, 238, 0.82));
    border: 1px solid rgba(15, 118, 110, 0.14);
}

.location-status {
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 700;
}

.location-status.waiting {
    background: rgba(201, 106, 27, 0.10);
    border: 1px solid rgba(201, 106, 27, 0.25);
    color: #8b4a16;
}

.location-status.ready {
    background: rgba(21, 127, 59, 0.10);
    border: 1px solid rgba(21, 127, 59, 0.25);
    color: #155724;
}

.location-status.error {
    background: rgba(180, 35, 24, 0.10);
    border: 1px solid rgba(180, 35, 24, 0.22);
    color: #7a271a;
}

.field-help {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    font-weight: 500;
}

.stack button[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.qr-panel {
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(249, 242, 231, 0.88), rgba(255, 255, 255, 0.9));
    border: 1px solid rgba(201, 106, 27, 0.18);
}

.qr-panel h5 {
    margin: 0 0 4px;
    font-size: 16px;
}

.qr-status {
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 700;
}

.qr-status.waiting {
    background: rgba(201, 106, 27, 0.10);
    border: 1px solid rgba(201, 106, 27, 0.25);
    color: #8b4a16;
}

.qr-status.ready {
    background: rgba(21, 127, 59, 0.10);
    border: 1px solid rgba(21, 127, 59, 0.25);
    color: #155724;
}

.qr-status.error {
    background: rgba(180, 35, 24, 0.10);
    border: 1px solid rgba(180, 35, 24, 0.22);
    color: #7a271a;
}

.qr-preview {
    min-height: 160px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    border: 1px dashed #d6c2a8;
    background: linear-gradient(180deg, rgba(255, 252, 247, 0.92), rgba(245, 239, 227, 0.92));
    overflow: hidden;
}

.qr-preview video {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: 16px;
}

.selected-user-card {
    border-radius: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #eadcc8;
}

.selected-user-card p {
    margin: 6px 0 0;
    color: var(--muted);
}

.cocard-layout {
    align-items: start;
}

.self-cocard-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, #eef8f7, #f9fcfc);
    border: 1px solid rgba(15, 123, 114, 0.16);
}

.self-cocard-summary small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.self-cocard-avatar {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    font-weight: 800;
}

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

.profile-photo-editor {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid rgba(15, 123, 114, 0.16);
    border-radius: 18px;
    background: #f9fcfc;
}

.profile-photo-preview,
.profile-photo-fallback {
    width: 88px;
    height: 88px;
    flex: 0 0 88px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-photo-fallback {
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    font-weight: 800;
    font-size: 28px;
}

@media (max-width: 560px) {
    .profile-photo-editor { align-items: flex-start; }
}

.cocard-user-list {
    display: grid;
    gap: 10px;
    max-height: 320px;
    overflow: auto;
    padding: 6px;
    border-radius: 16px;
    border: 1px solid #eadcc8;
    background: rgba(255, 255, 255, 0.86);
}

.cocard-user-option {
    display: flex;
    gap: 12px;
    align-items: start;
    padding: 12px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(249, 242, 231, 0.7), rgba(255, 255, 255, 0.95));
}

.cocard-user-option input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.cocard-user-option small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.cocard-preview-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.access-user-grid {
    display: grid;
    gap: 16px;
}

.access-user-card {
    border-radius: 22px;
    border: 1px solid rgba(221, 207, 187, 0.92);
    background: linear-gradient(180deg, rgba(255, 252, 247, 0.92), rgba(247, 242, 233, 0.92));
    overflow: hidden;
}

.access-user-card summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 20px;
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 14px;
}

.access-user-card summary::-webkit-details-marker {
    display: none;
}

.access-user-card summary p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.access-user-body {
    padding: 0 20px 20px;
    border-top: 1px solid rgba(221, 207, 187, 0.72);
}

.access-user-summary {
    margin: 16px 0;
}

.access-toggle-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.access-toggle {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(221, 207, 187, 0.88);
    background: rgba(255, 255, 255, 0.86);
    font-weight: 600;
}

.access-toggle input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.access-toggle small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.cocard-empty-state {
    min-height: 220px;
    display: grid;
    place-items: center;
    text-align: center;
    border-radius: 20px;
    border: 1px dashed #d6c2a8;
    color: var(--muted);
    background: linear-gradient(180deg, rgba(255, 252, 247, 0.92), rgba(245, 239, 227, 0.88));
    padding: 24px;
}

.print-cocard {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(214, 194, 168, 0.7);
    background: #fff;
    box-shadow: 0 18px 38px rgba(38, 46, 56, 0.14);
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.print-cocard__front,
.print-cocard__back {
    padding: 20px;
}

.print-cocard__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
}

.print-cocard__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 10px;
    font-weight: 700;
    opacity: 0.9;
}

.print-cocard__header h5 {
    margin: 4px 0 0;
    font-size: 22px;
    line-height: 1.1;
    font-weight: 800;
}

.print-cocard__badge {
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.print-cocard__identity {
    padding: 18px 0;
    display: grid;
    justify-items: center;
    text-align: center;
}

.print-cocard__photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 12px;
    border: 4px solid rgba(255, 255, 255, 0.9);
    background: #eef1f4;
}

.print-cocard__photo img,
.print-cocard__photo-fallback {
    width: 100%;
    height: 100%;
}

.print-cocard__photo img {
    object-fit: cover;
}

.print-cocard__photo-fallback {
    display: grid;
    place-items: center;
    font-size: 28px;
    font-weight: 800;
}

.print-cocard__name {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.print-cocard__role,
.print-cocard__meta {
    margin-top: 4px;
}

.print-cocard__role {
    font-size: 14px;
    font-weight: 700;
}

.print-cocard__meta {
    font-size: 13px;
    color: #334155;
    font-weight: 700;
}

.print-cocard__qrrow {
    display: grid;
    grid-template-columns: 156px 1fr;
    gap: 16px;
    align-items: center;
}

.print-cocard__qrcanvas {
    padding: 10px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(29, 36, 48, 0.08);
}

.print-cocard__qrcanvas canvas {
    display: block;
    width: 100%;
    height: auto;
}

.print-cocard__qrtext strong {
    display: block;
    margin-bottom: 7px;
    font-size: 15px;
}

.print-cocard__qrtext p {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
}

.print-cocard__back {
    border-top: 1px dashed rgba(255, 255, 255, 0.35);
}

.print-cocard__backtitle {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
    margin-bottom: 14px;
}

.print-cocard__backgrid {
    display: grid;
    gap: 10px;
}

.print-cocard__backgrid div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.28);
    padding-bottom: 10px;
}

.print-cocard__backgrid span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.7;
}

.print-cocard__backgrid strong {
    font-size: 13px;
    text-align: right;
}

.print-cocard__policy {
    margin-top: 14px;
    border-radius: 14px;
    padding: 12px;
    font-size: 11px;
    line-height: 1.6;
}

.print-cocard--classic {
    background: linear-gradient(180deg, #1b3a6b 0%, #2a5298 48%, #f7f9fc 48%, #f7f9fc 100%);
}

.print-cocard--classic .print-cocard__front {
    color: #fff;
}

.print-cocard--classic .print-cocard__header h5 {
    color: #ffffff;
}

.print-cocard--classic .print-cocard__badge {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.print-cocard--classic .print-cocard__role {
    color: rgba(255, 255, 255, 0.86);
}

.print-cocard--classic .print-cocard__meta {
    color: rgba(255, 255, 255, 0.92);
}

.print-cocard--classic .print-cocard__back {
    background: #f7f9fc;
    color: #1d2430;
}

.print-cocard--classic .print-cocard__policy {
    background: #e9eff8;
}

.print-cocard--bold {
    background:
        radial-gradient(circle at top right, rgba(255,255,255,0.22), transparent 24%),
        linear-gradient(135deg, #0f766e 0%, #0b5c56 42%, #f6f1e8 42%, #f6f1e8 100%);
}

.print-cocard--bold .print-cocard__front {
    color: #fff;
}

.print-cocard--bold .print-cocard__header h5 {
    color: #ffffff;
}

.print-cocard--bold .print-cocard__badge {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.print-cocard--bold .print-cocard__role {
    color: rgba(255, 255, 255, 0.88);
}

.print-cocard--bold .print-cocard__meta {
    color: rgba(255, 255, 255, 0.9);
}

.print-cocard--bold .print-cocard__back {
    background: #f6f1e8;
    color: #1d2430;
}

.print-cocard--bold .print-cocard__policy {
    background: #f2e7d4;
}

.print-cocard--minimal {
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
}

.print-cocard--minimal .print-cocard__front {
    background:
        linear-gradient(180deg, #f7fafb 0%, #f7fafb 100%);
    color: #1d2430;
}

.print-cocard--minimal .print-cocard__header h5 {
    color: #0f172a;
}

.print-cocard--minimal .print-cocard__header {
    padding-bottom: 14px;
    border-bottom: 1px solid #e7edf0;
}

.print-cocard--minimal .print-cocard__badge {
    background: #eaf7ef;
    color: #157f3b;
}

.print-cocard--minimal .print-cocard__role {
    color: #0f766e;
}

.print-cocard--minimal .print-cocard__back {
    background: #ffffff;
    color: #1d2430;
}

.print-cocard--minimal .print-cocard__policy {
    background: #f3f6f7;
}

.salary-summary,
.component-list {
    display: grid;
    gap: 12px;
}

.component-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eee3d1;
}

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

.pill {
    background: #eaf7ef;
    color: var(--success);
    border-radius: 999px;
    padding: 8px 12px;
    height: fit-content;
    font-size: 12px;
    font-weight: 700;
}

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

    .side-nav {
        position: static;
        display: flex;
        overflow-x: auto;
        gap: 10px;
        scrollbar-width: thin;
    }

    .nav-group {
        min-width: 170px;
        flex: 0 0 auto;
    }

    .metric-grid,
    .grid.two-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .topbar,
    .app-shell {
        padding-left: 16px;
        padding-right: 16px;
    }

    .topbar {
        flex-direction: column;
        margin-left: 16px;
        margin-right: 16px;
    }

    .auth-panel,
    .panel,
    .card,
    .hero-card {
        padding: 16px;
    }

    .auth-panel h1 {
        font-size: 32px;
    }

    .print-cocard__qrrow {
        grid-template-columns: 1fr;
    }

    .access-user-card summary,
    .button-row {
        flex-direction: column;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 10mm;
    }

    body {
        background: #fff;
        color: #111827 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .topbar,
    .side-nav,
    .hero-card,
    #home,
    #attendance,
    #payroll,
    .panel > .panel-header,
    #cocard .card:first-child,
    .flash {
        display: none !important;
    }

    .app-shell,
    .content,
    #cocard,
    .cocard-layout,
    #cocard .card:last-child,
    .cocard-preview-grid {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #fff !important;
        box-shadow: none !important;
        border: 0 !important;
    }

    .cocard-preview-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8mm !important;
    }

    .print-cocard {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #9ca3af;
        border-radius: 18px;
        color: #111827 !important;
        overflow: hidden;
    }

    .print-cocard__front,
    .print-cocard__back {
        padding: 16px;
    }

    .print-cocard__header h5 {
        font-size: 19px;
    }

    .print-cocard__name {
        font-size: 22px;
    }

    .print-cocard__role {
        font-size: 13px;
        color: #0f172a !important;
    }

    .print-cocard__meta,
    .print-cocard__qrtext p,
    .print-cocard__backgrid span,
    .print-cocard__policy {
        color: #374151 !important;
    }

    .print-cocard__header h5 {
        color: #111827 !important;
        font-weight: 800;
    }

    .print-cocard__badge {
        color: #ffffff !important;
        background: #1f4b8f !important;
        border-color: #1f4b8f !important;
    }

    .print-cocard--bold .print-cocard__badge {
        background: #0f766e !important;
        border-color: #0f766e !important;
    }

    .print-cocard--minimal .print-cocard__badge {
        background: #157f3b !important;
        border-color: #157f3b !important;
    }

    .print-cocard__qrcanvas {
        padding: 8px;
        border: 1px solid #cbd5e1;
        background: #ffffff !important;
    }

    .print-cocard__qrcanvas canvas {
        width: 148px !important;
        height: 148px !important;
        image-rendering: pixelated;
    }

    .print-cocard__qrrow {
        grid-template-columns: 148px 1fr;
        gap: 14px;
    }

    .print-cocard__qrtext strong,
    .print-cocard__backtitle,
    .print-cocard__backgrid strong {
        color: #111827 !important;
    }
}
