:root {
    --paper: #ffffff;
    --paper-line: #2f3437;
    --paper-soft-line: rgba(47, 52, 55, 0.24);
    --paper-bg: #d8d2c4;
    --ink: #182126;
    --muted: #59656c;
    --green: #2f9f42;
    --green-dark: #1d6f2d;
    --accent: #111111;
    --shadow: 0 28px 70px rgba(19, 26, 31, 0.28);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.bg-light {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.36), transparent 22%),
        radial-gradient(circle at bottom right, rgba(0, 0, 0, 0.1), transparent 26%),
        linear-gradient(160deg, #d5cec0 0%, #c9c1b2 100%);
}

body.auth-standalone-page .floating-chat-btn,
body.auth-standalone-page .navbar,
body.auth-standalone-page .mobile-sidebar-toggle {
    display: none !important;
}

main,
.auth-page {
    min-height: 100vh;
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 14px;
}

.workorder-auth-shell {
    width: min(1080px, 100%);
}

.paper-sheet {
    background:
        linear-gradient(to bottom, transparent 0, transparent 34px, rgba(47, 52, 55, 0.06) 35px),
        linear-gradient(to right, transparent 0, transparent 34px, rgba(47, 52, 55, 0.04) 35px),
        var(--paper);
    background-size: 100% 36px, 36px 100%, auto;
    border: 2px solid var(--paper-line);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.paper-sheet-minimal {
    max-width: 500px;
    margin: 0 auto;
}

.paper-sheet::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(47, 159, 66, 0.06), transparent 28%),
        linear-gradient(315deg, rgba(0, 0, 0, 0.03), transparent 24%);
    pointer-events: none;
}

.sheet-header-grid,
.sheet-row.duo,
.closing-meta {
    display: grid;
    grid-template-columns: 2.3fr 1fr;
}

.sheet-cell,
.brand-box {
    min-height: 72px;
    padding: 10px 14px 8px;
    border-right: 1px solid var(--paper-line);
    border-bottom: 1px solid var(--paper-line);
}

.sheet-header-grid > :last-child,
.sheet-row.duo > :last-child,
.closing-meta > :last-child {
    border-right: 0;
}

.brand-box {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 247, 247, 0.9));
}

.moto-logo {
    display: flex;
    align-items: baseline;
    gap: 0;
    font-style: italic;
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 0.95;
    font-size: clamp(1.35rem, 2.8vw, 2.05rem);
}

.moto-logo-moto {
    color: #2f3437;
}

.moto-logo-world {
    color: var(--green);
    margin-left: 4px;
}

.brand-subtitle {
    margin-top: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cell-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #232b31;
    margin-bottom: 6px;
    text-transform: none;
}

.cell-value {
    display: block;
    min-height: 26px;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--ink);
}

.meta-cell .cell-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2546a8;
    letter-spacing: 0.02em;
}

.job-cell {
    min-height: 96px;
}

.job-copy {
    max-width: 40rem;
}

.mechanic-report-band {
    padding: 10px 14px;
    color: #fff;
    background: #1c1e20;
    border-bottom: 1px solid var(--paper-line);
    text-align: center;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.report-grid {
    display: grid;
    grid-template-columns: 2.4fr 0.55fr 0.55fr 0.7fr;
    border-bottom: 1px solid var(--paper-line);
}

.report-column {
    border-right: 1px solid var(--paper-line);
}

.report-column:last-child {
    border-right: 0;
}

.report-head {
    min-height: 42px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--paper-line);
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.report-lines {
    display: grid;
    grid-template-rows: repeat(4, minmax(38px, auto));
}

.report-lines span {
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-bottom: 1px solid var(--paper-soft-line);
    font-size: 0.95rem;
}

.report-lines span:last-child {
    border-bottom: 0;
}

.report-lines.short span {
    justify-content: center;
    padding: 0 6px;
    font-weight: 600;
}

.sheet-bottom-grid {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
}

.login-form-sheet,
.sheet-closing {
    min-height: 420px;
    border-right: 1px solid var(--paper-line);
}

.sheet-closing {
    border-right: 0;
}

.login-form-sheet {
    padding: 20px 18px 18px;
}

.login-form-sheet-centered {
    min-height: auto;
    border-right: 0;
    padding: 26px 22px 18px;
    position: relative;
    z-index: 1;
}

.brand-only-header {
    text-align: center;
}

.brand-kicker {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 10px;
    border: 1px solid rgba(47, 52, 55, 0.18);
    background: rgba(47, 159, 66, 0.08);
    color: var(--green-dark);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.moto-logo-centered {
    justify-content: center;
}

.moto-logo-centered::after {
    content: "";
    display: block;
    width: 84px;
    height: 3px;
    margin: 10px auto 0;
    background: linear-gradient(90deg, var(--green-dark), var(--green));
}

.auth-header {
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(47, 52, 55, 0.22);
}

.auth-header h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.auth-header p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.45;
    font-size: 0.84rem;
}

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

.input-container + .input-container {
    margin-top: 12px;
}

.form-label {
    margin-bottom: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #334046;
}

.input-group {
    border: 1px solid var(--paper-line);
    border-radius: 0;
    background: #fff;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.input-group-text {
    border: 0;
    background: #f5f7f6;
    color: var(--green-dark);
    padding: 0 12px;
    font-size: 0.9rem;
}

.input-group .form-control {
    border: 0;
    min-height: 42px;
    padding: 8px 10px;
    border-left: 1px solid var(--paper-line);
    box-shadow: none;
    border-radius: 0;
    font-size: 0.88rem;
}

.input-group:focus-within {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(47, 159, 66, 0.12);
}

.input-group .form-control:focus {
    box-shadow: none;
}

.footer-actions {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.form-check-input {
    margin-top: 0;
    border-radius: 0;
}

.form-check-label,
.link-forgot {
    font-size: 0.78rem;
}

.link-forgot {
    color: var(--green-dark);
    text-decoration: none;
    font-weight: 700;
}

.link-forgot:hover {
    text-decoration: underline;
}

.btn-login {
    margin-top: 16px;
    min-height: 42px;
    border: 1px solid #0f0f0f;
    border-radius: 0;
    background: linear-gradient(135deg, #2b9f46, #186c2d);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.82rem;
    box-shadow: 3px 3px 0 rgba(17, 17, 17, 0.12);
}

.btn-login:hover,
.btn-login:focus {
    color: #fff;
    background: linear-gradient(135deg, #25883c, #145824);
}

.reset-form-sheet {
    max-width: 100%;
}

.reset-submit {
    margin-top: 18px;
}

.reset-secondary-action {
    margin-top: 14px;
    text-align: center;
}

.auth-messages .alert,
.alert-danger {
    border: 1px solid var(--paper-line);
    border-radius: 0;
}

.copyright-text {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 0.72rem;
    text-align: center;
}

.sheet-closing {
    display: grid;
    grid-template-rows: 1fr 1fr auto;
}

.closing-cell {
    padding: 14px;
    border-bottom: 1px solid var(--paper-line);
}

.closing-cell .cell-value {
    min-height: 72px;
}

.closing-meta .sheet-cell {
    min-height: 92px;
}

@media (max-width: 991.98px) {
    .sheet-bottom-grid,
    .sheet-header-grid,
    .sheet-row.duo,
    .closing-meta {
        grid-template-columns: 1fr;
    }

    .report-grid {
        grid-template-columns: 1.5fr 0.8fr 0.8fr 0.9fr;
    }

    .login-form-sheet,
    .sheet-closing,
    .sheet-cell,
    .brand-box {
        border-right: 0;
    }

    .login-form-sheet {
        border-bottom: 1px solid var(--paper-line);
    }
}

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

    .paper-sheet {
        font-size: 14px;
    }

    .moto-logo {
        font-size: 1.35rem;
    }

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

    .report-column {
        border-right: 0;
        border-bottom: 1px solid var(--paper-line);
    }

    .report-column:last-child {
        border-bottom: 0;
    }

    .footer-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-login {
        box-shadow: none;
    }
}
