.mjst-tablet-shell {
    --mjst-orange: #ff5f15;
    --mjst-text: #171922;
    --mjst-muted: #7a83a3;
    --mjst-line: #e3e6ee;
    --mjst-soft: #f7f8fb;
    --mjst-page-x: 46px;
    display: grid;
    grid-template-columns: 1fr;
    min-height: 82vh;
    max-width: 1280px;
    margin: 0 auto;
    overflow: visible;
    color: var(--mjst-text);
    background: #fff;
    border: 1px solid var(--mjst-line);
    border-radius: 8px;
    font-family: "Manrope", Arial, Helvetica, sans-serif;
}

.mjst-tablet-shell *,
.mjst-access-shell * {
    font-family: "Manrope", Arial, Helvetica, sans-serif !important;
    letter-spacing: 0;
}

.mjst-access-shell {
    --mjst-orange: #ff5f15;
    --mjst-text: #171922;
    --mjst-muted: #7a83a3;
    --mjst-line: #e3e6ee;
    --mjst-soft: #f7f8fb;
    display: grid;
    place-items: center;
    min-height: 70vh;
    padding: 28px;
    background: #fff;
}

.mjst-access-form {
    display: grid;
    gap: 18px;
    box-sizing: border-box;
    width: min(390px, 92vw);
    padding: 34px;
    border: 1px solid #e3e6ee;
    border-radius: 8px;
    background: #fff;
    font-family: "Manrope", Arial, Helvetica, sans-serif;
}

.mjst-access-form img {
    width: 210px;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.mjst-access-form h1 {
    margin: 0 !important;
    color: var(--mjst-text) !important;
    text-align: center !important;
    font-size: 30px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
}

.mjst-access-form label {
    display: grid;
    gap: 8px;
    color: var(--mjst-text);
    font-size: 16px;
    font-weight: 800;
}

.mjst-access-form input {
    min-height: 52px;
    border: 1px solid #cfd5e2;
    border-radius: 7px;
    padding: 10px 14px;
    font-size: 18px;
}

.mjst-access-form .button,
.mjst-access-form button {
    min-height: 52px !important;
    border: 1px solid var(--mjst-orange) !important;
    border-radius: 7px !important;
    padding: 10px 20px !important;
    color: #fff !important;
    background: var(--mjst-orange) !important;
    box-shadow: none !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
}

.mjst-tablet-header {
    display: grid;
    grid-template-columns: auto minmax(0, 680px);
    gap: 32px;
    align-items: center;
    justify-content: start;
    padding: 24px var(--mjst-page-x);
    border-bottom: 1px solid var(--mjst-line);
}

.mjst-tablet-header img {
    width: 180px;
    height: auto;
}

.mjst-tablet-header h1 {
    margin: 0 !important;
    font-size: 30px !important;
    line-height: 1.15 !important;
    font-weight: 800 !important;
}

.mjst-tablet-header p {
    margin: 6px 0 0;
    color: var(--mjst-muted);
    font-size: 16px;
    line-height: 1.35;
}

.mjst-tablet-main {
    min-width: 0;
    overflow: visible;
}

.mjst-tablet-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 28px var(--mjst-page-x) 0;
}

.mjst-tablet-tabs button {
    min-height: 54px;
    border: 1px solid var(--mjst-line);
    border-radius: 7px;
    color: var(--mjst-text);
    background: #fff;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
}

.mjst-tablet-tabs button.is-active {
    border-color: var(--mjst-orange);
    color: #fff;
    background: var(--mjst-orange);
}

.mjst-tablet-tabs button:disabled {
    cursor: not-allowed;
    opacity: 0.42;
    color: #9ca3af;
    background: #f3f4f6;
}

.mjst-tablet-panel {
    display: none;
    padding: 34px var(--mjst-page-x) 42px;
    overflow: visible;
}

.mjst-tablet-panel.is-active {
    display: block;
}

.mjst-empty-state {
    border: 1px solid var(--mjst-line);
    border-radius: 8px;
    padding: 28px;
    background: var(--mjst-soft);
}

.mjst-empty-state h2,
.mjst-create-case-form h2,
.mjst-add-participant-form h2,
.mjst-signature-form h2,
.mjst-tablet-panel > h2,
.mjst-contract-box h2 {
    margin: 0 0 14px !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
}

.mjst-signature-form,
.mjst-create-case-form,
.mjst-add-participant-form {
    display: grid;
    gap: 18px;
}

.mjst-signature-form label,
.mjst-create-case-form label,
.mjst-add-participant-form label {
    display: grid;
    gap: 8px;
    color: var(--mjst-text);
    font-size: 16px;
    font-weight: 800;
}

.mjst-signature-form input[type="text"],
.mjst-signature-form select,
.mjst-create-case-form input,
.mjst-create-case-form textarea,
.mjst-add-participant-form input,
.mjst-add-participant-form select {
    min-height: 52px;
    border: 1px solid #cfd5e2;
    border-radius: 7px;
    padding: 10px 14px;
    color: var(--mjst-text);
    background: #fff;
    font-size: 18px;
}

.mjst-create-case-form textarea {
    min-height: 130px;
}

.mjst-datetime-picker {
    position: relative;
    display: block;
}

.mjst-tour-date-display {
    width: 100%;
    min-height: 52px;
    border: 1px solid #cfd5e2;
    border-radius: 7px;
    padding: 10px 14px;
    color: var(--mjst-text);
    background: #fff;
    text-align: left;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.2;
}

.mjst-calendar {
    position: absolute;
    z-index: 30;
    top: calc(100% + 10px);
    left: 0;
    display: grid;
    gap: 14px;
    width: min(430px, 92vw);
    padding: 18px;
    border: 1px solid #cfd5e2;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.mjst-calendar[hidden] {
    display: none;
}

.mjst-calendar-header {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    gap: 10px;
    align-items: center;
}

.mjst-calendar-header strong {
    text-align: center;
    text-transform: capitalize;
    font-size: 22px;
    font-weight: 800;
}

.mjst-calendar-header button,
.mjst-calendar-grid button {
    min-height: 44px;
    border: 1px solid var(--mjst-line);
    border-radius: 7px;
    color: var(--mjst-text);
    background: #fff;
    font-size: 20px;
    font-weight: 800;
}

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

.mjst-calendar-day-name {
    color: var(--mjst-muted);
    text-align: center;
    font-size: 13px;
    font-weight: 800;
}

.mjst-calendar-grid button {
    min-height: 46px;
    padding: 0;
    font-size: 17px;
}

.mjst-calendar-grid button.is-muted {
    color: #aeb4c5;
    background: #fafbfc;
}

.mjst-calendar-grid button.is-selected {
    border-color: var(--mjst-orange);
    color: #fff;
    background: var(--mjst-orange);
}

.mjst-calendar-time {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mjst-calendar-time label {
    gap: 6px;
    font-size: 13px;
}

.mjst-calendar-time input {
    min-height: 46px;
    font-size: 17px;
}

.mjst-contract-box {
    max-height: 210px;
    overflow: auto;
    border: 1px solid var(--mjst-line);
    border-radius: 8px;
    padding: 18px;
    color: var(--mjst-muted);
    background: var(--mjst-soft);
    font-size: 16px;
    line-height: 1.45;
}

.mjst-open-contract {
    justify-self: start;
}

.mjst-contract-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(17, 24, 39, 0.62);
}

.mjst-contract-modal[hidden] {
    display: none;
}

.mjst-contract-modal-dialog {
    display: grid;
    grid-template-rows: auto 1fr;
    width: min(920px, 94vw);
    max-height: 92vh;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
}

.mjst-contract-modal-dialog header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 28px;
    border-bottom: 1px solid var(--mjst-line);
}

.mjst-contract-modal-dialog h2 {
    margin: 0;
    font-size: 28px;
}

.mjst-close-contract {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 6px;
    color: var(--mjst-text);
    background: var(--mjst-soft);
    font-size: 34px;
    line-height: 1;
}

.mjst-contract-modal-content {
    overflow: auto;
    padding: 28px;
    color: var(--mjst-text);
    font-size: 19px;
    line-height: 1.55;
}

.mjst-signed-list {
    display: grid;
    gap: 12px;
    margin-top: 8px;
}

.mjst-signed-filters {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 150px 150px auto;
    gap: 10px;
    align-items: end;
    margin: 0 0 16px;
    padding: 14px;
    border: 1px solid var(--mjst-line);
    border-radius: 8px;
    background: #fff;
}

.mjst-signed-filters label {
    display: grid;
    gap: 6px;
    color: var(--mjst-text);
    font-size: 13px;
    font-weight: 800;
}

.mjst-signed-filters input {
    box-sizing: border-box;
    height: 44px;
    min-height: 44px;
    border: 1px solid #cfd5e2;
    border-radius: 7px;
    padding: 8px 12px;
    color: var(--mjst-text);
    background: #fff;
    font-size: 15px;
}

.mjst-signed-filters .button {
    font-size: 15px;
}

.mjst-filter-actions {
    display: grid;
    gap: 6px;
    align-self: stretch;
}

.mjst-filter-spacer {
    visibility: hidden;
    color: var(--mjst-text);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
}

.mjst-signed-empty {
    margin: 18px 0 0;
    padding: 18px;
    border: 1px solid var(--mjst-line);
    border-radius: 8px;
    color: var(--mjst-muted);
    background: var(--mjst-soft);
    font-size: 16px;
    font-weight: 700;
}

.mjst-signed-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--mjst-line);
    border-radius: 8px;
    background: var(--mjst-soft);
}

.mjst-signed-card[hidden] {
    display: none !important;
}

.mjst-signed-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 18px 0 0;
}

.mjst-signed-pagination[hidden] {
    display: none !important;
}

.mjst-signed-pagination button {
    min-width: 42px;
    min-height: 42px;
    border: 1px solid var(--mjst-line);
    border-radius: 7px;
    color: var(--mjst-text);
    background: #fff;
    font-size: 15px;
    font-weight: 800;
}

.mjst-signed-pagination button.is-active {
    border-color: var(--mjst-orange);
    color: #fff;
    background: var(--mjst-orange);
}

.mjst-signed-card strong,
.mjst-signed-card span {
    display: block;
}

.mjst-signed-card strong {
    margin-bottom: 4px;
    color: var(--mjst-text);
    font-size: 18px;
}

.mjst-signed-card span {
    color: var(--mjst-muted);
    font-size: 14px;
}

.mjst-signed-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.mjst-check {
    grid-template-columns: auto 1fr;
    align-items: center;
}

.mjst-check input {
    width: 24px;
    height: 24px;
}

.mjst-signature-pad {
    border: 2px solid #cfd5e2;
    border-radius: 8px;
    background: #fff;
}

.mjst-signature-pad canvas {
    display: block;
    width: 100%;
    height: 245px;
    touch-action: none;
}

.mjst-tablet-actions,
.mjst-finished-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
}

.mjst-tablet-shell .button,
.mjst-tablet-actions .button,
.mjst-finished-actions .button {
    min-height: 48px;
    border: 1px solid var(--mjst-line);
    border-radius: 7px;
    padding: 10px 18px;
    color: var(--mjst-text);
    background: #fff;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
}

.mjst-tablet-shell .button-primary,
.mjst-tablet-actions .button-primary,
.mjst-finished-actions .button-primary {
    border-color: var(--mjst-orange);
    color: #fff;
    background: var(--mjst-orange);
}

.mjst-tablet-shell .mjst-signed-filters .button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 8px 18px !important;
    line-height: 1 !important;
}

.mjst-tablet-message {
    min-height: 28px;
    margin: 0;
    color: var(--mjst-orange);
    font-size: 18px;
    font-weight: 800;
}

@media (max-width: 980px) {
    .mjst-tablet-shell {
        --mjst-page-x: 24px;
        grid-template-columns: 1fr;
        border-radius: 0;
    }

    .mjst-tablet-header {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 22px var(--mjst-page-x);
        text-align: center;
    }

    .mjst-tablet-header img {
        width: 190px;
        margin: 0 auto;
    }

    .mjst-tablet-main {
        border-right: 0;
    }

    .mjst-tablet-tabs {
        grid-template-columns: 1fr;
    }

    .mjst-signed-filters {
        grid-template-columns: 1fr;
    }

    .mjst-signed-card {
        grid-template-columns: 1fr;
    }

    .mjst-signed-actions {
        justify-content: stretch;
    }
}
