:root {
    --color-primary: #2c5f6f;
    --color-primary-dark: #1e4450;
    --color-accent: #e8a33d;
    --color-bg: #f7f5f2;
    --color-border: #ddd6cc;
    --color-text: #262322;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.5;
    font-size: 16px;
}

/* Form controls and buttons don't inherit body font-size by default in
   most browsers — without this, inputs/buttons render noticeably
   smaller than the surrounding text. */
input, textarea, select, button {
    font-family: inherit;
    font-size: 1rem;
}
button {
    cursor: pointer;
}
input[type="date"], input[type="time"] {
    font-size: 1.15rem;
    padding: .65rem .6rem;
    min-height: 2.75rem;
}
.time-field-group { display: flex; align-items: center; gap: .4rem; margin-top: .2rem; }
.time-field-group input[type="time"] { margin-top: 0; flex: 1; }
.time-clear {
    flex-shrink: 0;
    width: 2rem; height: 2rem;
    border-radius: 50%;
    background: #eee;
    color: #666;
    font-size: 1.1rem;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
}
.time-clear:hover { background: #e0d8d0; color: var(--color-text); }

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--color-primary-dark);
    border-bottom: 1px solid var(--color-primary-dark);
}
.site-header .logo { font-weight: 700; font-size: 1.25rem; color: white; text-decoration: none; }
.site-header nav { display: flex; align-items: center; }
.site-header nav a { margin-left: 1.5rem; color: #e8f0f2; text-decoration: none; }
.site-header nav a:hover { color: var(--color-accent); }

.nav-dropdown { position: relative; margin-left: 1.5rem; }
.nav-dropdown summary {
    color: #e8f0f2;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::after { content: " \25BE"; font-size: .75rem; }
.nav-dropdown:hover summary, .nav-dropdown[open] summary { color: var(--color-accent); }
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + .6rem);
    right: 0;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    min-width: 180px;
    padding: .4rem 0;
    z-index: 500;
}
.nav-dropdown-menu a {
    display: block;
    margin-left: 0;
    padding: .5rem 1rem;
    color: var(--color-text) !important;
    white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: var(--color-bg); color: var(--color-primary) !important; }

main { max-width: 1100px; margin: 0 auto; padding: 2rem; }
main.main-wide { max-width: 1600px; }

.hero { text-align: center; padding: 3rem 1rem; }
.hero h1 { font-size: 2.4rem; margin-bottom: .5rem; }
.hero .subhead { font-size: 1.15rem; max-width: 640px; margin: 0 auto 1rem; color: #555; }
.hero .since-line { font-size: .9rem; color: #888; margin-bottom: 2rem; }
.cta-row { display: flex; gap: 1rem; justify-content: center; }
.trust-badges { display: flex; gap: 1.5rem; justify-content: center; margin-top: 1.25rem; font-size: .9rem; color: #556; flex-wrap: wrap; }
.trust-badges span { white-space: nowrap; }

.btn { display: inline-block; padding: .75rem 1.5rem; border-radius: 6px; text-decoration: none; font-weight: 600; border: none; line-height: 1.4; text-align: center; }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-secondary { background: white; color: var(--color-primary); border: 1px solid var(--color-primary); }
.btn-danger { background: #a13c3c; color: white; }
.btn-danger:disabled { opacity: .5; cursor: not-allowed; }

.unlock-card-header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.unlock-card-header h1 { margin: 0; font-size: 1.4rem; }
.unlock-card-header .btn-link { white-space: nowrap; font-size: .85rem; }
.btn-demo { background: var(--color-accent); color: #3a2a08; border: 1px solid #c98a2c; }
.btn-demo:hover { background: #dc9530; }

.screenshots { text-align: center; padding: 1rem 0 2rem; }
.screenshots h2 { font-size: 1.75rem; }
.screenshots-intro { color: #666; margin-bottom: 1.5rem; }
.screenshots .demo-preview {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    border-radius: 8px;
    overflow: hidden;
}
.screenshots .demo-preview .employee-name { min-width: 8em; }
.screenshots .demo-preview .entry-cell { min-width: 7em; }
.screenshots-scroll { overflow-x: auto; }
.screenshot-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: start;
    margin-top: 1.5rem;
}
.screenshot-grid figure { margin: 0; background: white; border: 1px solid var(--color-border); border-radius: 10px; padding: .75rem; }
.screenshot-grid img { width: 100%; height: auto; border-radius: 6px; display: block; }
.screenshot-grid figcaption { font-size: .85rem; color: #555; margin-top: .6rem; text-align: left; }
.screenshot-cta { margin-top: 1.5rem; }
@media (max-width: 760px) {
    .screenshot-grid { grid-template-columns: 1fr; }
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    text-align: left;
}
.feature-card {
    background: #eae7e2;
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
}
.feature-card h3 {
    margin: 0 0 .6rem;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.feature-card p { margin: 0; color: #555; font-size: .92rem; line-height: 1.55; }
.feature-dot {
    flex-shrink: 0;
    width: 9px; height: 9px;
    border-radius: 50%;
    display: inline-block;
}
.feature-dot-1 { background: #6b7d5f; }
.feature-dot-2 { background: var(--color-primary); }
.feature-dot-3 { background: var(--color-accent); }
.feature-dot-4 { background: var(--color-primary-dark); }
.feature-dot-5 { background: #8a6d4f; }
.feature-dot-6 { background: #5c7a8a; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

.pricing { text-align: center; padding: 3rem 1rem; }
.features { text-align: center; }
.features h2 { font-size: 1.75rem; margin-bottom: 3rem; }

.pricing h2 { font-size: 1.75rem; margin-bottom: 3rem; }
.price-callout { text-align: center; font-size: 1.1rem; color: #444; margin-bottom: 1.5rem; }
.price-callout-amount { font-size: 2.5rem; font-weight: 800; color: var(--color-primary-dark); vertical-align: middle; margin-right: .25rem; }
.pricing .faq { max-width: 700px; margin: 0 auto; text-align: left; }
.pricing .faq h2 { text-align: center; }
.faq-list p { margin: 0 0 1.5rem; color: #333; font-size: .98rem; line-height: 1.65; }
.faq-list p strong { color: var(--color-primary); display: block; margin-bottom: .25rem; font-size: 1.02rem; }

.week-schedule .week-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    text-align: center;
    font-size: 1.75rem;
}
.week-schedule .week-nav .arrow { font-size: 1.75rem; text-decoration: none; color: var(--color-primary); }
.week-schedule .week-nav .arrow:hover { color: var(--color-primary-dark); }
.week-schedule .week-nav-date { min-width: 14em; }
.location-heading { font-size: 1.3rem; margin: 2rem 0 .25rem; color: var(--color-primary-dark); }
.location-heading:first-of-type { margin-top: 0; }
.location-heading-editable { cursor: pointer; }
.location-heading-editable:hover { text-decoration: underline; }
.location-heading-row { display: flex; align-items: center; gap: .6rem; margin: 2rem 0 .25rem; }
.location-heading-row:first-of-type { margin-top: 0; }
.location-heading-row .location-heading { margin: 0; }
.location-delete-btn {
    background: none; border: none; color: #a13c3c; font-size: 1.2rem;
    line-height: 1; cursor: pointer; padding: 0 .25rem; opacity: .6;
}
.location-delete-btn:hover { opacity: 1; }
.location-date-range { color: #777; font-size: .9rem; margin: 0 0 .75rem; }
.manage-links { font-size: .9rem; color: #777; margin: 0 0 1.25rem; }

.add-buttons-row { margin-top: 1.5rem; display: flex; gap: 1.5rem; }
.btn-add-link {
    background: none;
    border: none;
    color: var(--color-primary);
    font-weight: 600;
    font-size: .92rem;
    cursor: pointer;
    padding: 0;
}
.btn-add-link:hover { color: var(--color-primary-dark); text-decoration: underline; }

table.crew-grid { width: 100%; border-collapse: collapse; background: white; font-size: 1.05rem; }
table.crew-grid th, table.crew-grid td { border: 1px solid var(--color-border); padding: .9rem 1rem; vertical-align: top; }
table.crew-grid th { background: #efe9e1; text-align: left; font-size: .95rem; }
table.crew-grid .employee-name { min-width: 11em; font-size: 1.05rem; }
table.crew-grid .employee-name small { font-size: .8rem; color: #777; }
table.crew-grid .employee-name-editable { cursor: pointer; transition: background-color .12s; }
table.crew-grid .employee-name-editable:hover { background: #f7f5f2; }

.entry-cell { min-width: 10.5em; cursor: pointer; transition: background-color .12s; }
.entry-cell + .entry-cell { margin-top: .5rem; }
.entry-cell:hover { background: #f7f5f2; }
.entry-badge {
    background: #eaf3f6;
    border: 1px solid #cfe1e6;
    border-radius: 5px;
    padding: .4rem .5rem;
    margin-bottom: .35rem;
    font-size: .92rem;
}
.entry-badge:last-child { margin-bottom: 0; }
.entry-badge .entry-time { display: block; font-size: .78rem; color: #55707a; font-weight: 600; }
.entry-badge .entry-loc { display: block; font-weight: 600; color: #1e4450; }
.entry-empty { color: #b3aca0; font-size: .9rem; }

/* Modal */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(38,35,34,.55);
    display: flex; align-items: center; justify-content: center;
    z-index: 2000; padding: 1rem;
}
.modal-box { background: white; border-radius: 10px; padding: 1.75rem; max-width: 640px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-box label { display: block; margin-bottom: 1rem; font-size: .9rem; color: #444; }
.modal-box label input, .modal-box label textarea {
    display: block; width: 100%; padding: .55rem; border: 1px solid var(--color-border); border-radius: 4px; margin-top: .3rem; font-size: .95rem;
}
.modal-close {
    position: absolute; top: .75rem; right: .9rem; border: none; background: none;
    font-size: 1.5rem; line-height: 1; cursor: pointer; color: #888;
}
.modal-close:hover { color: var(--color-text); }
.modal-title { margin-top: 0; font-size: 1.3rem; }
.modal-projects { display: grid; gap: 1.25rem; }
.project-block, .add-project-block { border: 1px solid var(--color-border); border-radius: 8px; padding: 1rem; margin-bottom: 1rem; }
.project-block h3, .add-project-block h3 { margin: 0 0 .75rem; font-size: 1rem; color: var(--color-primary-dark); }
.project-block label, .add-project-block label { display: block; margin-bottom: .6rem; font-size: .85rem; color: #555; }
.project-block input, .project-block textarea, .add-project-block input, .add-project-block textarea {
    width: 100%; padding: .5rem; border: 1px solid var(--color-border); border-radius: 4px; margin-top: .2rem; font-size: .95rem;
}
.btn-link { background: none; border: none; color: #a13c3c; font-size: .85rem; cursor: pointer; padding: 0; text-decoration: underline; }
.modal-actions { display: flex; justify-content: flex-end; align-items: center; margin-top: 1.25rem; gap: 1rem; }
.modal-actions .modal-add-project, .modal-actions #add-another-project-btn { margin-right: auto; }
.modal-error { color: #7a1f1f; background: #fbe3e3; padding: .5rem .75rem; border-radius: 6px; margin-top: 1rem; font-size: .9rem; }
.modal-view hr { border: none; border-top: 1px solid var(--color-border); margin: 1rem 0; }
.lock-notice { background: #fbe3e3; border: 1px solid #c98a2c; color: #7a1f1f; }
.preview-fields { margin: 1.25rem 0; }
.preview-fields p { margin: 0 0 .6rem; color: #333; }
.preview-fields strong { color: var(--color-primary-dark); }
.preview-add label { margin-bottom: .9rem; }

.notice-readonly { background: #f2f0eb; border-color: var(--color-border); }
.exit-demo-link { margin: 0 0 1rem; }
.exit-demo-link a { color: #888; font-size: .9rem; text-decoration: none; }
.exit-demo-link a:hover { color: var(--color-primary); }
.try-edit-link { font-weight: 600; }

.field-hint { font-size: .82rem; color: #777; margin-top: -.5rem; margin-bottom: 1rem; }

.password-checklist {
    list-style: none;
    padding: .5rem .75rem;
    margin: 0 0 1rem;
    font-size: .85rem;
    border-radius: 6px;
    transition: background-color .2s;
}
.password-checklist li {
    color: #888;
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: .3rem;
    transition: color .15s;
}
.password-checklist li:last-child { margin-bottom: 0; }
.password-checklist li::before {
    content: "\2610"; /* ☐ */
    position: absolute;
    left: 0;
    font-size: 1rem;
}
.password-checklist li.met { color: #2e7d32; }
.password-checklist li.met::before {
    content: "\2611"; /* ☑ */
    color: #2e7d32;
}
.password-checklist.all-met { background: #eaf6ea; }
.private-password-box {
    background: #f7f5f2;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem 1.25rem .25rem;
    margin-bottom: 1.25rem;
}
.private-password-box .field-hint { margin-top: 0; }
.settings-subhead { margin-top: 1.75rem; margin-bottom: .5rem; font-size: 1.05rem; color: var(--color-primary-dark); }
.settings-subhead:first-of-type { margin-top: 0; }

.custom-work { max-width: 640px; margin: 4.5rem auto 0; text-align: center; background: white; border: 1px solid var(--color-border); border-radius: 10px; padding: 2rem; }
.custom-work h3 { margin-top: 0; }
.plain-link { color: var(--color-primary); font-weight: 600; text-decoration: underline; }
.plain-link:hover { color: var(--color-primary-dark); }

.notice { background: #fff4e0; border: 1px solid var(--color-accent); padding: .75rem 1rem; border-radius: 6px; }
.notice-demo { background: #eaf3f6; border-color: var(--color-primary); }
.pending-modal-overlay { z-index: 3000; background: rgba(20, 30, 32, .85); }
.pending-modal-box { max-width: 520px; text-align: left; }
.pending-modal-box h1 { margin-top: 0; font-size: 1.5rem; }
.modal-kicker { text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; color: var(--color-accent); font-weight: 700; margin: 0 0 .25rem; }
.pending-checklist { padding-left: 1.2rem; margin: 1.25rem 0; }
.pending-checklist li { margin-bottom: .6rem; color: #444; }
/* Visual-only: the calendar behind the modal is inert to look at, not
   clickable. The real security boundary is server-side — every write
   endpoint independently rejects unapproved orgs regardless of what
   the client does (see schedule/views.py's needs_approval checks). */
.week-schedule.pending-blocked { pointer-events: none; filter: blur(2px) grayscale(40%); user-select: none; }
.demo-toast {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary-dark);
    color: white;
    padding: .75rem 1.25rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    z-index: 1000;
    max-width: 90vw;
}

.auth-form, .employees, .notice-page { max-width: 420px; margin: 0 auto; background: white; padding: 2rem; border-radius: 8px; border: 1px solid var(--color-border); }
.auth-form h1 { margin-top: 0; }
.auth-form-wide { max-width: 640px; }
.auth-form label, .employees label { display: block; margin-bottom: 1rem; }
.auth-form input, .employees input, .auth-form textarea { width: 100%; padding: .5rem; border: 1px solid var(--color-border); border-radius: 4px; margin-top: .25rem; }
.form-actions-right { text-align: right; }
.honeypot-field { position: absolute; left: -9999px; top: -9999px; }
.cta-final { text-align: center; }
.form-actions { display: flex; gap: 1rem; align-items: center; margin-top: 1.5rem; }
.form-actions .btn { flex: 0 0 auto; }
.checkbox-label { display: flex; align-items: center; gap: .5rem; }
.checkbox-label input { width: auto; }

.alert { padding: .75rem 1rem; border-radius: 6px; margin-bottom: 1rem; }
.alert-danger { background: #fbe3e3; color: #7a1f1f; }

ul.messages { list-style: none; padding: 0 2rem; margin: 1rem auto; max-width: 1100px; }
ul.messages li { padding: .6rem 1rem; border-radius: 6px; margin-bottom: .5rem; background: #e5f5e6; }

.site-footer { text-align: center; padding: 2rem; color: #888; font-size: .85rem; }
.site-footer a { color: #888; }
.site-footer a:hover { color: var(--color-primary); }
.footer-free-line { margin-top: .25rem; color: #aaa; font-size: .8rem; }

.legal-page { max-width: 760px; margin: 0 auto; background: white; padding: 2rem 2.5rem; border-radius: 8px; border: 1px solid var(--color-border); }
.legal-page h2 { margin-top: 2rem; font-size: 1.15rem; color: var(--color-primary-dark); }
.legal-page p { color: #444; }

.idle-warning-box { max-width: 420px; text-align: center; }
.idle-warning-box h2 { margin-top: 0; }
#idle-countdown { font-weight: 700; color: var(--color-primary-dark); }

.inline-form { margin-bottom: 1.5rem; }
.inline-form input, .inline-form select {
    display: block;
    width: 100%;
    padding: .55rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    margin-bottom: .75rem;
}
.inline-form .btn { margin-top: .25rem; }
