@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&display=swap');

:root {
    font: 16px/1.5 Lato, system-ui, sans-serif;
    color: #172d25;
    background: #edf2ef;
    --ink: #172d25;
    --green: #13583f;
    --line: #d6e2da;
    --muted: #4d6658;
    --shadow: 0 10px 30px #1835280b;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 62rem; margin: auto; padding: clamp(1rem, 3vw, 2rem); }
h1, h2, h3 { line-height: 1.15; font-weight: 900; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.25rem, 4vw, 2rem); margin: 0; }
h2 { margin: 2rem 0 .8rem; }
h3, p { margin: .25rem 0 .7rem; overflow-wrap: anywhere; }
a { color: var(--green); }
.app-header, .app-brand { display: flex; align-items: center; gap: .75rem; }
.app-header {
    justify-content: space-between;
    background: #133d30;
    color: #fff;
    border-radius: 1.2rem;
    padding: clamp(.8rem, 3vw, 1.5rem);
    box-shadow: var(--shadow);
}
.app-brand img, .signin-brand img { border-radius: .65rem; flex: none; }
.app-brand p { margin: .2rem 0 0; color: #c8e0d3; }
.app-header button { white-space: nowrap; }
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: clamp(1rem, 3vw, 1.4rem);
    margin: .75rem 0;
    box-shadow: var(--shadow);
}
.stack { display: grid; align-content: start; gap: .85rem; }
.stack h3, .stack p { margin: 0; }
.controls {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
    align-items: start;
}
.controls .card { margin: 0; }
input, select, button {
    font: inherit;
    min-height: 44px;
    padding: .55rem .75rem;
    border: 1px solid #98afa0;
    border-radius: .55rem;
}
input, select { display: block; width: 100%; margin-top: .25rem; background: #f8faf8; color: var(--ink); }
label { display: block; font-weight: 700; }
button { background: var(--green); color: #fff; border-color: var(--green); font-weight: 900; cursor: pointer; }
button:hover { filter: brightness(.92); }
button:disabled { opacity: .65; cursor: default; }
.secondary { background: #f5f9f6; color: var(--green); border-color: var(--line); }
:focus-visible { outline: 3px solid #bd7b24; outline-offset: 3px; }
.muted { color: var(--muted); }
.status { margin-left: .5rem; }
[role=alert], .notice { padding: .75rem 1rem; border-radius: .65rem; }
[role=alert] { background: #f9e4df; color: #842723; }
.notice { margin-top: 1rem; background: #d9eee0; }

.signin-page {
    min-height: 100vh;
    display: grid;
    align-items: center;
    position: relative;
    isolation: isolate;
    background: #16362c;
}
.signin-page::before {
    content: "";
    position: fixed;
    inset: -5px;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(120deg, #102b21a6, #142d234d),
        url("signin-background.webp") center / cover no-repeat;
    filter: blur(2px);
}
.signin-page main { position: relative; z-index: 1; width: 100%; }
.signin-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border-radius: 1.4rem;
    border: 1px solid #ffffff45;
    box-shadow: 0 24px 75px #081a1490;
}
.signin-brand, .signin-panel { padding: clamp(1.4rem, 5vw, 3.5rem); }
.signin-brand {
    display: grid;
    align-content: center;
    justify-items: start;
    background: linear-gradient(145deg, #123c2df5, #25654cdb);
    color: #fff;
}
.signin-brand p { margin-top: 1rem; color: #c8e0d3; }
.signin-brand h1 { font-size: clamp(2rem, 5vw, 3.65rem); }
.signin-panel { background: #fbfdfc; }
.signin-panel h2 { margin: 0 0 1.25rem; }
@media (max-width: 620px) {
    .signin-layout { grid-template-columns: 1fr; }
    .app-brand img { width: 36px; height: 36px; }
}

.job-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: 1rem 0;
    padding: .35rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: .85rem;
}
.job-nav a {
    display: grid;
    place-items: center;
    min-height: 44px;
    padding: .4rem .8rem;
    border-radius: .55rem;
    text-decoration: none;
    font-weight: 700;
}
.job-nav a:hover, .job-nav [aria-current="page"] { background: #e2f0e7; }
.task-state {
    display: inline-block;
    padding: .2rem .55rem;
    border-radius: 1rem;
    background: #f8edda;
    color: #694715;
    font-weight: 700;
}
.task-state.complete { background: #dff1e5; color: #19583a; }
.crew-list { list-style: none; margin: 0; padding: 0; }
.crew-list li { display: grid; gap: .1rem; padding: .65rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.checkoff-location { margin: .75rem 0 1rem; }
.checkoff-map {
    width: 250px;
    max-width: 100%;
    height: 250px;
    border: 1px solid #d7dfd8;
    border-radius: 8px;
    overflow: hidden;
}
.checkoff-map iframe { display: block; width: 100%; height: 100%; border: 0; }
.checkoff-address { font-weight: 600; margin-top: .5rem; }

.delete-job { margin-top: .75rem; }
.delete-job summary { cursor: pointer; color: #992b24; }
.delete-job label { margin: .5rem 0; }
.delete-job input[type="checkbox"] { width: auto; min-height: auto; }
button.danger { background: #992b24; }

.clock-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; }
.clock-actions a { padding: .6rem 0; }
.clock-table { overflow-x: auto; }
.clock-table table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.clock-table th, .clock-table td { padding: .55rem; text-align: left; border-bottom: 1px solid var(--line); }
.clock-log { margin-top: 1rem; }
.clock-log li { margin: .65rem 0; overflow-wrap: anywhere; }
.clock-notes { white-space: pre-wrap; }
[data-clock] textarea {
    display: block;
    width: 100%;
    margin-top: .25rem;
    padding: .55rem .75rem;
    border: 1px solid #98afa0;
    border-radius: .55rem;
    background: #f8faf8;
    font: inherit;
    resize: vertical;
}

.clock-delete input[type="checkbox"] {
    display: inline-block;
    width: 1.1rem;
    height: 1.1rem;
    min-height: 0;
    margin: 0 .35rem 0 0;
    vertical-align: middle;
}
.clock-delete button { margin-top: .65rem; }

.time-location { margin: .45rem 0; }
.time-map { width: 150px; height: 150px; margin: .35rem 0; }
