/*******************************************************************************
 * Team Portal chrome. Scoped to body.PortalBody so start.php is unchanged.
 *******************************************************************************/
html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body.PortalBody {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: var(--ot-paper);
    color: var(--ot-ink);
    font-family: var(--ot-font);
    font-size: 16px;
    line-height: 1.45;
}

body.PortalBody .pageheader,
body.PortalBody .bodydiv {
    position: static;
    width: auto;
    min-width: 0;
    min-height: 0;
    height: auto;
    margin: 0;
    background: transparent;
    overflow: visible;
}

body.PortalBody h1,
body.PortalBody h2,
body.PortalBody h3,
body.PortalBody h4,
body.PortalBody h5,
body.PortalBody h6 {
    background: transparent;
    color: var(--ot-navy);
    font-family: var(--ot-font);
    text-align: left;
}

.PortalHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 72px;
    padding: 12px 20px;
    background: var(--ot-navy);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

body.PortalBody .PortalHeader h1,
body.PortalBody .PortalHeader p {
    margin: 0;
    background: transparent;
    color: #fff;
    text-align: left;
    font-family: var(--ot-font);
}

body.PortalBody .PortalHeader h1 {
    font-size: 1.85rem;
    font-weight: bold;
}

body.PortalBody .PortalHeader p {
    margin-top: 2px;
    font-size: .95rem;
    color: #d5e4f2;
}

.PortalHeaderAction {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 16px;
    border: 2px solid rgba(255, 255, 255, .55);
    border-radius: 999px;
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
}

.PortalHeaderAction:hover,
.PortalHeaderAction:focus {
    border-color: var(--ot-teal);
    background: rgba(46, 196, 182, .18);
    color: #fff;
}

.PortalHeaderActions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

body.PortalBody .FbChip,
body.PortalBody .FbDrawer {
    bottom: 88px;
}
body.PortalBody .FbScoreBt,
body.PortalBody .FbChipScore,
body.PortalBody .FbChipSkip,
body.PortalBody .FbFld,
body.PortalBody .FbArea {
    min-height: 44px;
}

.PortalSession {
    color: #d5e4f2;
    font-size: .85rem;
    white-space: nowrap;
}

.PortalPanel {
    display: none;
}

.PortalPanel.is-active {
    display: block;
}

.PortalPanel h2 {
    margin: 0 0 10px;
    font-size: 1.2rem;
}

.PortalStepUp {
    position: fixed;
    inset: 0;
    background: rgba(23, 56, 95, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 20;
}

.PortalStepUp[hidden] {
    display: none;
}

.PortalStepUp .PortalCard {
    width: 100%;
    max-width: 28rem;
}

.PortalGate {
    margin: 0 0 12px;
    color: #17385f;
}

.PortalBottomNav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 14px;
}

.PortalBottomNav button {
    flex: 1 1 4.2rem;
    min-height: 44px;
    padding: 0 4px;
    border: 2px solid #c5d0de;
    border-radius: 10px;
    background: #fff;
    color: var(--ot-navy);
    font-family: var(--ot-font);
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
}

.PortalBottomNav button.is-active {
    border-color: #2EC4B6;
    background: #17385f;
    color: #fff;
}

.PortalMain {
    flex: 1;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 18px 16px 28px;
}

.PortalCard {
    margin-bottom: 18px;
    padding: 22px 20px;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--ot-card-shadow);
}

.PortalCard h1,
.PortalCard h2 {
    margin: 0 0 .6rem;
    font-size: 1.35rem;
}

.PortalLead {
    margin: 0 0 1rem;
    color: var(--ot-muted);
}

.PortalNavRow {
    margin: 0 0 1rem;
    font-size: .95rem;
}

.PortalNavRow a {
    color: var(--ot-blue);
}

.PortalForm label,
body.PortalBody .PortalForm .RegistrationLabel {
    display: block;
    width: auto;
    margin: .85rem 0 .35rem;
    padding: 0;
    color: var(--ot-navy);
    font-size: 1rem;
    font-weight: bold;
    line-height: 1.3;
    text-align: left;
}

body.PortalBody .PortalForm input[type="email"],
body.PortalBody .PortalForm input[type="password"],
body.PortalBody .PortalForm input[type="text"],
body.PortalBody .PortalForm input[type="date"],
body.PortalBody .PortalForm select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    margin: 0 0 .4rem;
    padding: .55rem .7rem;
    border: 2px solid #c5d0de;
    border-radius: 10px;
    background: #fff;
    color: var(--ot-ink);
    font-family: var(--ot-font);
    font-size: 16px;
}

body.PortalBody .PortalForm input[type="submit"],
.PortalBtn {
    display: block;
    width: 100%;
    min-height: 48px;
    margin: 1rem 0 0;
    padding: .75rem 1.1rem;
    border: 0;
    border-radius: 10px;
    background: var(--ot-teal);
    color: #10293f;
    font-family: var(--ot-font);
    font-size: 1.05rem;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.PortalBtn.secondary {
    background: #e7edf6;
    color: var(--ot-navy);
    border: 1px solid #b8c7de;
}

.PortalHint {
    margin: .85rem 0 0;
    color: var(--ot-muted);
    font-size: .95rem;
}

.PortalHint a {
    color: var(--ot-blue);
}

.PortalActions {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-top: 1.1rem;
}

body.PortalBody .ot-decision {
    width: auto;
    max-width: none;
    margin: 0;
    text-align: left;
}

body.PortalBody .ot-decision h1 {
    font-size: 1.35rem;
}

body.PortalBody .ot-decision .ot-note {
    color: var(--ot-muted);
}

body.PortalBody .ot-decision .ot-actions {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

body.PortalBody .ot-decision a.ot-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: .75rem 1.1rem;
    border-radius: 10px;
    font-weight: bold;
    text-decoration: none;
}

body.PortalBody .ot-decision a.ot-btn.primary {
    background: var(--ot-teal);
    color: #10293f;
}

body.PortalBody .ot-decision a.ot-btn.secondary {
    background: #e7edf6;
    color: var(--ot-navy);
    border: 1px solid #b8c7de;
}

body.PortalBody .ot-decision .ot-warn {
    background: #fff8e6;
    border-left: 4px solid #e0a800;
    border-radius: 8px;
    padding: .75rem 1rem;
    margin-bottom: 1.1rem;
}

body.PortalBody #accordion {
    width: 100% !important;
    margin: 0 !important;
}

body.PortalBody #accordion.ui-accordion .ui-accordion-header {
    margin: 0 0 8px;
    padding: 12px 16px;
    min-height: 48px;
    border: 0;
    border-radius: 10px;
    background: var(--ot-navy);
    color: #fff;
    font-family: var(--ot-font);
    font-size: 1.05rem;
    font-weight: bold;
}

body.PortalBody #accordion.ui-accordion .ui-accordion-header.ui-state-active {
    margin-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: var(--ot-blue);
    color: #fff;
}

body.PortalBody #accordion.ui-accordion .ui-accordion-header .ui-icon {
    display: none;
}

body.PortalBody #accordion.ui-accordion .ui-accordion-content {
    margin: 0 0 8px;
    padding: 14px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 0;
    border-radius: 0 0 10px 10px;
    background: #fff;
    box-shadow: var(--ot-card-shadow);
    color: var(--ot-ink);
    font-family: var(--ot-font);
}

body.PortalBody .FrontPageAccordianDiv {
    max-width: 100%;
}

body.PortalBody .FrontPageAccordianDiv table {
    max-width: 100%;
}

body.PortalBody .Time_Record_TopLine_Menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 12px;
}

body.PortalBody .SelectWeekLabel {
    margin: 0;
    font-weight: bold;
    color: var(--ot-navy);
}

body.PortalBody .SelectWeekInput {
    min-height: 44px;
    min-width: 10rem;
    padding: .45rem .6rem;
    border: 2px solid #c5d0de;
    border-radius: 10px;
    font-size: 16px;
}

body.PortalBody .PortalWeek {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 0 0 16px;
    padding: 12px 14px;
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--ot-card-shadow);
}

body.PortalBody .PortalWeekNavRow {
    display: flex;
    gap: 8px;
}

body.PortalBody .PortalWeekNavRow .PortalWeekNav {
    flex: 1;
}

body.PortalBody .PortalWeekLabel {
    margin: 0;
    font-weight: bold;
    color: var(--ot-navy);
}

body.PortalBody .PortalWeekStrip {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body.PortalBody .PortalWeekDay,
body.PortalBody .PortalWeekNav {
    min-height: 44px;
    padding: .4rem .7rem;
    border: 2px solid #c5d0de;
    border-radius: 10px;
    background: #fff;
    color: var(--ot-ink);
    font-family: var(--ot-font);
    font-size: 14px;
    cursor: pointer;
}

body.PortalBody .PortalWeekDay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 4.4rem;
    line-height: 1.2;
}

body.PortalBody .PortalWeekDow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--ot-muted);
}

body.PortalBody .PortalWeekDay.is-selected {
    border-color: #2EC4B6;
    background: #f3fffd;
}

body.PortalBody .PortalWeekDay.is-today {
    border-color: var(--ot-navy);
    font-weight: bold;
}

.PortalHoursCard {
    position: relative;
    margin: 0 0 16px;
    padding: 16px 16px 14px 28px;
    background-color: #f3d15a;
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(90, 50, 20, 0.035) 0px,
            rgba(90, 50, 20, 0.035) 1px,
            transparent 1px,
            transparent 22px
        ),
        linear-gradient(90deg, rgba(180, 40, 40, 0.28) 0, rgba(180, 40, 40, 0.28) 2px, transparent 2px);
    background-position: 0 0, 18px 0;
    border: 1px solid #5c3a1a;
    box-shadow:
        0 1px 0 rgba(255, 255, 220, 0.5) inset,
        3px 6px 14px rgba(0, 0, 0, 0.18);
    color: #2a2118;
    font-family: Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.PortalHoursCard::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    border-width: 0 16px 16px 0;
    border-style: solid;
    border-color: #f6f8fb #f6f8fb #c9a43a #c9a43a;
}

.PortalHoursHead {
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 3px double #5c3a1a;
}

.PortalHoursBrand {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
}

.PortalHoursSub {
    margin: 2px 0 10px;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
    color: #5c3a1a;
}

.PortalHoursMeta {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 8px 12px;
    margin: 0;
}

.PortalHoursMeta div {
    min-width: 0;
}

.PortalHoursMeta dt {
    margin: 0;
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #5c3a1a;
}

.PortalHoursMeta dd {
    margin: 2px 0 0;
    padding-bottom: 2px;
    border-bottom: 1px solid #5c3a1a;
    font-family: "Courier New", Courier, ui-monospace, monospace;
    font-size: 14px;
}

body.PortalBody .PortalHoursCard > h3 {
    margin: 0 0 6px;
    font-family: Palatino, Georgia, serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #5c3a1a;
}

.PortalHoursCard > ul {
    margin: 0 0 12px;
    padding: 8px 10px 8px 1.3em;
    border: 2px solid #5c3a1a;
    background: rgba(255, 248, 196, 0.35);
    font-family: "Courier New", Courier, ui-monospace, monospace;
    font-size: 13px;
}

.PortalHoursDay {
    margin: 0 0 12px;
    padding-top: 8px;
    border-top: 1px solid #5c3a1a;
}

body.PortalBody .PortalHoursDay h3 {
    margin: 0 0 6px;
    font-family: "Courier New", Courier, ui-monospace, monospace;
    font-size: 14px;
    color: #2a2118;
}

.PortalHoursCols {
    display: grid;
    grid-template-columns: minmax(9rem, 0.7fr) minmax(0, 1.4fr);
    gap: 8px 14px;
}

body.PortalBody .PortalHoursDay h4 {
    margin: 0 0 4px;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #5c3a1a;
}

.PortalHoursDay ul {
    margin: 0;
    padding-left: 1.1em;
    font-size: 13px;
}

.PortalHoursDay li {
    margin: 0 0 3px;
}

@media (max-width: 640px) {
    .PortalHoursMeta,
    .PortalHoursCols {
        grid-template-columns: 1fr;
    }
}

body.PortalBody .PortalMuted {
    color: var(--ot-muted);
}

body.PortalBody .PortalWeekNav:hover,
body.PortalBody .PortalWeekDay:hover {
    border-color: var(--ot-navy);
}

.PortalFooter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 10px 18px;
    background: var(--ot-footer);
    color: var(--ot-muted);
    font-size: 13px;
}

.PortalByCatontech {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #5a6a80;
}

.PortalByCatontech img {
    height: 22px;
    width: auto;
}

body.PortalBody .err,
.PortalErr {
    background: #fde8e8;
    border-left: 4px solid var(--ot-danger);
    border-radius: 8px;
    padding: .6rem .8rem;
}

.PortalOk {
    background: #e7f8f5;
    border-left: 4px solid #2EC4B6;
    border-radius: 8px;
    padding: .6rem .8rem;
}

body.PortalBody .RCPhrase {
    color: var(--ot-navy);
    font-size: 2.1rem;
}

body.PortalBody .RCCopy,
body.PortalBody .RCHoldBt {
    background: var(--ot-navy);
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: .45rem .85rem;
}

body.PortalBody .RCHoldBt {
    background: #2EC4B6;
    color: #17385f;
}

.KFSetupCodeBox {
    margin: 12px 0 16px;
    padding: 16px 14px;
    text-align: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--ot-card-shadow);
}

.KFSetupUrl {
    margin: 0 0 6px;
    color: #5a6a80;
    font-size: .95rem;
}

.KFSetupUrlValue {
    margin: 0 0 14px;
    color: var(--ot-navy);
    font-size: 1.25rem;
    font-weight: bold;
    word-break: break-all;
}

.KFSetupCode {
    margin: 0;
    color: var(--ot-navy);
    font-size: 2.2rem;
    font-weight: bold;
    letter-spacing: .14em;
}

.KFSetupQrDetails {
    margin: 16px 0 8px;
    color: #5a6a80;
}

.KFSetupQrDetails summary {
    cursor: pointer;
    font-weight: bold;
    color: var(--ot-navy);
}

.KFSetupQr {
    margin: 12px 0 16px;
    padding: 12px;
    text-align: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--ot-card-shadow);
}

.KFSetupQr img {
    display: block;
    width: 240px;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    background: #fff;
}

.KFSetupQr figcaption {
    margin-top: 10px;
    color: #5a6a80;
    font-size: .95rem;
}

.KFSetupSteps {
    margin: 0 0 8px;
    padding-left: 1.3rem;
}

.KFSetupSteps li {
    margin: 0 0 .7rem;
}

@media (max-width: 700px) {
    .PortalHeader {
        min-height: 64px;
        padding: 10px 14px;
    }

    .PortalHeader h1 {
        font-size: 1.45rem;
    }

    .PortalMain {
        padding: 12px 10px 140px;
    }

    .PortalCard {
        padding: 16px 14px;
    }

    .PortalFooter {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }

    .PortalBottomNav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 30;
        margin: 0;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
        background: var(--ot-navy);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, .2);
    }

    .PortalBottomNav button {
        border-color: rgba(255, 255, 255, .35);
        background: transparent;
        color: #fff;
    }

    .PortalBottomNav button.is-active {
        background: #2EC4B6;
        border-color: #2EC4B6;
        color: #17385f;
    }
}

body.PortalBody .TOForm,
body.PortalBody .TOPendingList,
body.PortalBody .TOMonthList,
body.PortalBody .TOCal,
body.PortalBody .TOMonthNav {
    margin-left: 0;
    margin-right: 0;
}

body.PortalBody .TOFormRow {
    margin: 10px 0;
}

body.PortalBody .TOFld,
body.PortalBody .TOArea {
    max-width: none;
    min-height: 44px;
    border: 2px solid #c5d0de;
    border-radius: 8px;
    font-family: var(--ot-font);
    font-size: 16px;
}

body.PortalBody .TOArea {
    min-height: 5rem;
}

body.PortalBody .TOCal {
    width: 100%;
    display: block;
    overflow-x: auto;
}

body.PortalBody .TOCal table,
body.PortalBody table.TOCal {
    min-width: 520px;
}

body.PortalBody .TOCancel {
    min-height: 36px;
    border: 0;
    border-radius: 6px;
    background: #c75b5b;
    color: #fff;
    padding: .3rem .7rem;
}

@media (min-width: 701px) {
    body.PortalBody .ot-decision .ot-actions {
        flex-direction: row;
    }

    body.PortalBody .ot-decision a.ot-btn {
        flex: 1;
    }
}

/* Forecast panel (TeamForecast.php): the labor forecast on a phone. */
.TFHoursOnly .TFPay {
    display: none !important;
}

.TFLoc,
.TFSwitch {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-weight: bold;
    color: var(--ot-navy);
}

.TFLoc select {
    flex: 1;
    min-height: 40px;
    font-size: 16px;
}

.TFSwitch input {
    width: 22px;
    height: 22px;
}

.TFCards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin: 12px 0;
}

.TFCard {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--ot-card-shadow);
}

.TFBig {
    font-size: 24px;
    font-weight: bold;
    color: var(--ot-navy);
}

.TFLabel {
    font-weight: bold;
    color: var(--ot-ink);
}

.TFNote,
.TFSmall {
    font-size: 13px;
    color: var(--ot-muted);
}

.TFWarn {
    padding: 10px 12px;
    border-left: 4px solid #d99a00;
    background: #fff7e0;
}

.TFBars {
    list-style: none;
    margin: 0;
    padding: 0;
}

.TFBars li {
    display: grid;
    grid-template-columns: 5.2rem 1fr 4.2rem;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #e3e9f1;
}

.TFWeek {
    font-size: 14px;
}

.TFTrack {
    position: relative;
    height: 18px;
    border-radius: 4px;
    background: #e9eef5;
}

.TFFill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    border-radius: 4px;
    background: var(--ot-navy);
}

.TF-current .TFFill,
.TF-forecast .TFFill,
.TFKeyAhead {
    background: var(--ot-teal);
}

.TF-current .TFWeek {
    font-weight: bold;
}

.TFLy {
    position: absolute;
    top: -3px;
    bottom: -3px;
    width: 3px;
    margin-left: -1px;
    background: var(--ot-danger);
}

.TFNum {
    font-size: 14px;
    text-align: right;
}

.TFKey {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    font-size: 13px;
    color: var(--ot-muted);
}

.TFKey i {
    display: inline-block;
    width: 14px;
    height: 10px;
    margin-right: -6px;
    border-radius: 2px;
}

.TFKeyWorked {
    background: var(--ot-navy);
}

.TFKeyLy {
    width: 3px !important;
    background: var(--ot-danger);
}

.TFTable {
    width: 100%;
    border-collapse: collapse;
}

.TFTable td {
    padding: 8px 4px;
    border-bottom: 1px solid #e3e9f1;
    vertical-align: top;
}

.TFTable td + td {
    text-align: right;
    white-space: nowrap;
}

.TFOt {
    padding: 1px 5px;
    border-radius: 4px;
    background: #fde8e8;
    color: var(--ot-danger);
    font-size: 12px;
    font-weight: bold;
}

.TFPeople summary {
    margin: 16px 0 6px;
    font-weight: bold;
    color: var(--ot-navy);
    cursor: pointer;
}
