/* The Tooling family's shell over PayTooling's own styles: ink and yellow, a slim header with
   the mark, plain nav pills. Loaded AFTER dark-mode.css so the header stays ink in both modes;
   everything else about dark mode is untouched. */
:root {
    --primary-color: #161617;
    --primary-dark: #2a2a2c;
    --bg-color: #f6f5f1;
    --header-bg-color: #161617;
    --family-yellow: #e8c547;
}

header { padding: 0.75rem 0; margin-bottom: 1.5rem; box-shadow: none; }
body.dark-mode header { background-color: #0f0f10; }
.header-title { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.family-mark { width: 40px; height: 40px; border-radius: 9px; flex-shrink: 0; }
.family-title { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
header h1 { margin: 0; font-size: 1.125rem; font-weight: 700; }
.title-and-toggle { gap: 0.75rem; }
.title-and-toggle p { margin: 0; font-size: 0.8125rem; color: #bdbbb3; }
#darkModeToggle { font-size: 1.1rem; color: #ecebe4; }

.main-nav ul { gap: 0.4rem; flex-wrap: wrap; }
.main-nav .indent-1, .main-nav .indent-2, .main-nav .indent-3 { margin-left: 0; }
.main-nav a { padding: 0.35rem 0.8rem; border: 1px solid #4a4a4d; border-radius: 999px; background: transparent; box-shadow: none; font-size: 0.875rem; font-weight: 500; letter-spacing: 0; color: #ecebe4; }
.main-nav a::after { display: none; }
.main-nav a:hover { background: #2a2a2c; }
.main-nav a.active { background: var(--family-yellow); border-color: var(--family-yellow); color: #161617; font-weight: 600; }

h2 { border-bottom-color: var(--family-yellow); }
.btn.primary { background-color: #161617; border-color: #161617; color: var(--family-yellow); font-weight: 600; }
.btn.primary:hover { background-color: #2a2a2c; border-color: #2a2a2c; }
body.dark-mode .btn.primary { background-color: var(--family-yellow); border-color: var(--family-yellow); color: #161617; }
input:focus, textarea:focus, select:focus { border-color: #b89b1f; box-shadow: 0 0 0 0.2rem rgba(232, 197, 71, 0.4); outline: none; }

@media (max-width: 640px) { .title-and-toggle p { display: none; } }

/* The pay stub page's helpers (js/stub-helpers.js). */
.week-chips { display: flex; align-items: center; gap: 0.4rem; margin: 0 0 0.5rem; flex-wrap: wrap; }
.week-chips-label { font-size: 0.875rem; color: #6b6a66; }
.week-chip { padding: 0.25rem 0.7rem; border: 1px solid #cfccc2; border-radius: 999px; background: #fff; color: #161617; font: inherit; font-size: 0.8125rem; cursor: pointer; }
.week-chip:hover { border-color: #161617; }
body.dark-mode .week-chip { background: #3d3d3d; color: #f0f0f0; border-color: #555; }
.mileage-calc { margin: 0.5rem 0 0; padding: 0.5rem 0.75rem; border-radius: 8px; background: #faf6e3; color: #3a3936; font-size: 0.875rem; }
.mileage-calc strong { font-size: 1rem; }
body.dark-mode .mileage-calc { background: #3a3620; color: #f0e9c9; }
.company-line { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin: 0 0 1rem; font-size: 0.9375rem; }
.company-line span { flex: 1; min-width: 12rem; }
.company-change { padding: 0.25rem 0.7rem; font-size: 0.8125rem; }

.stub-preview { display: none; }
.stub-caption { margin: 0 0 0.6rem; font-size: 0.8125rem; color: #6b6a66; }
.stub-sheet { background: #fff; color: #222; border: 1px solid #e2dfd6; border-radius: 6px; padding: 1.25rem 1.4rem; font-size: 0.8125rem; line-height: 1.45; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.stub-head { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid #222; margin-bottom: 0.5rem; }
.stub-title { font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.stub-sec { margin: 0.9rem 0 0.25rem; font-weight: 700; }
.stub-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.2rem 0; }
.stub-row.stub-total { font-weight: 700; border-top: 1px solid #ccc; padding-top: 0.4rem; margin-top: 0.2rem; }
.stub-blank { color: #b3261e; }
.stub-fine { margin: 0.5rem 0 0; font-size: 0.6875rem; font-style: italic; color: #666; }
.stub-notes { margin: 0; white-space: pre-wrap; }
@media (min-width: 1100px) {
    main.container.has-stub-preview { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); column-gap: 1.5rem; align-items: start; }
    main.container.has-stub-preview > * { grid-column: 1; }
    main.container.has-stub-preview > .stub-preview { display: block; grid-column: 2; grid-row: 1 / span 3; position: sticky; top: 1rem; }
}
