:root {
    --worker-primary: #005293;
    --worker-primary-dark: #00406f;
    --worker-primary-soft: rgba(0, 82, 147, .10);
    --worker-accent: #fecb00;
    --worker-text: #202c4b;
    --worker-muted: #6b7280;
    --worker-border: #ededed;
    --worker-canvas: #f8f9fa;
    --worker-surface: #fff;
    --worker-success: #15803d;
    --worker-danger: #b42318;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    color: var(--worker-muted);
    background: var(--worker-canvas);
    font-family: "Roboto", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}
button, input { font: inherit; }

.worker-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--worker-text);
    text-decoration: none;
}
.worker-brand > span {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 5px;
    color: #fff;
    background: var(--worker-primary);
    box-shadow: none;
    font-size: 17px;
    font-weight: 700;
    place-items: center;
}
.worker-brand strong, .worker-brand small { display: block; line-height: 1.1; }
.worker-brand strong { color: var(--worker-text); font-size: 16px; font-weight: 700; }
.worker-brand small { margin-top: 4px; color: var(--worker-muted); font-size: 10px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }

/* Login and password pages use the same clean column as the SmartHR login. */
.worker-portal-login {
    display: flex;
    min-height: 100vh;
    justify-content: center;
    overflow: auto;
    background: #fff;
}
.worker-login-card {
    width: 100%;
    max-width: 460px;
    min-height: 100vh;
    padding: 32px;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}
.worker-login-card > .worker-brand { display: flex; width: max-content; margin: 0 auto; }
.worker-login-card h1 {
    margin: 150px 0 8px;
    color: #111827;
    font-size: 30px;
    font-weight: 700;
    text-align: center;
}
.worker-login-card > p { margin: 0 0 28px; color: var(--worker-muted); font-size: 15px; text-align: center; }
.worker-login-card label { display: block; margin: 18px 0 8px; color: #344054; font-weight: 500; }
.worker-login-card input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #dfe3e8;
    border-radius: 5px;
    color: var(--worker-text);
    background: #fff;
    outline: 0;
}
.worker-login-card input:focus { border-color: var(--worker-primary); box-shadow: none; }
.worker-login-card form > button {
    width: 100%;
    height: 48px;
    margin-top: 20px;
    border: 1px solid var(--worker-primary);
    border-radius: 5px;
    color: #fff;
    background: var(--worker-primary);
    box-shadow: none;
    font-weight: 500;
    cursor: pointer;
}
.worker-login-card form > button:hover { border-color: var(--worker-primary-dark); background: var(--worker-primary-dark); }
.worker-security-note { display: block; margin-top: 26px; color: #98a2b3; font-size: 12px; text-align: center; }
.worker-back {
    display: flex;
    min-height: 40px;
    margin-top: 10px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--worker-border);
    border-radius: 5px;
    color: #374151;
    background: #f7f7f7;
    font-weight: 500;
    text-decoration: none;
}

/* Worker application header */
.worker-header {
    position: sticky;
    z-index: 1050;
    top: 0;
    display: flex;
    min-height: 50px;
    padding: 0 18px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--worker-border);
    background: #fff;
}
.worker-header .worker-brand > span { width: 32px; height: 32px; flex-basis: 32px; font-size: 15px; }
.worker-header .worker-brand strong { font-size: 14px; }
.worker-link-button {
    min-height: 34px;
    padding: 6px 12px;
    border: 1px solid var(--worker-border);
    border-radius: 5px;
    color: #374151;
    background: #f7f7f7;
    box-shadow: none;
    font-weight: 500;
    cursor: pointer;
}
.worker-link-button:hover { color: var(--worker-primary); background: var(--worker-primary-soft); }

.worker-shell { width: calc(100% - 36px); max-width: 1180px; margin: 18px auto; }
.worker-welcome {
    display: flex;
    min-height: 116px;
    padding: 24px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid var(--worker-border);
    border-radius: 5px;
    background: linear-gradient(105deg, #fff 55%, #eef6fb);
    box-shadow: 0 1px 1px rgba(0,0,0,.2);
}
.worker-welcome span { color: var(--worker-primary); font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.worker-welcome h1 { margin: 3px 0; color: var(--worker-text); font-size: 24px; font-weight: 700; }
.worker-welcome p { margin: 0; color: var(--worker-muted); }
.worker-secondary {
    display: inline-flex;
    min-height: 36px;
    padding: 7px 14px;
    align-items: center;
    border: 1px solid var(--worker-primary);
    border-radius: 5px;
    color: var(--worker-primary);
    background: #fff;
    box-shadow: none;
    font-weight: 500;
    text-decoration: none;
}
.worker-secondary:hover { color: #fff; background: var(--worker-primary); }

.worker-alert { margin: 18px 0; padding: 12px 14px; border: 1px solid transparent; border-radius: 5px; }
.worker-alert.is-error { border-color: #fecdca; color: var(--worker-danger); background: #fef3f2; }
.worker-alert.is-success { border-color: #abefc6; color: var(--worker-success); background: #ecfdf3; }
.worker-grid { display: grid; margin-top: 18px; grid-template-columns: 1fr 1fr; gap: 18px; }
.worker-card {
    overflow: hidden;
    border: 1px solid var(--worker-border);
    border-radius: 5px;
    background: var(--worker-surface);
    box-shadow: 0 1px 1px rgba(0,0,0,.2);
}
.worker-card > header {
    display: flex;
    min-height: 62px;
    padding: 14px 20px;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--worker-border);
    background: #fff;
}
.worker-card > header > span {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 5px;
    color: var(--worker-primary);
    background: var(--worker-primary-soft);
    font-size: 12px;
    font-weight: 700;
    place-items: center;
}
.worker-card h2 { margin: 0; color: var(--worker-text); font-size: 16px; font-weight: 600; }
.worker-card header p { margin: 2px 0 0; color: var(--worker-muted); font-size: 11px; }
.worker-card-body { padding: 24px; }
.worker-amounts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.worker-amounts button {
    min-height: 42px;
    border: 1px solid var(--worker-primary);
    border-radius: 5px;
    color: #fff;
    background: var(--worker-primary);
    box-shadow: none;
    font-weight: 500;
    cursor: pointer;
}
.worker-amounts button:hover { background: var(--worker-primary-dark); }
.worker-pending { display: flex; padding: 16px; flex-direction: column; border: 1px solid #fedf89; border-radius: 5px; color: #92400e; background: #fffaeb; }
.worker-pending strong { color: #7a2e0e; }
.worker-history > div { display: grid; min-height: 46px; padding: 10px 0; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; border-bottom: 1px solid #e9edf4; }
.worker-history > div:last-child { border-bottom: 0; }
.worker-history strong { color: var(--worker-text); font-weight: 500; }
.worker-history em { padding: 4px 8px; border-radius: 4px; font-size: 10px; font-style: normal; font-weight: 500; }
.worker-history em.pending { color: #92400e; background: #fffaeb; }
.worker-history em.paid { color: var(--worker-success); background: #ecfdf3; }

@media (max-width: 700px) {
    .worker-login-card { max-width: none; padding: 24px; }
    .worker-login-card h1 { margin-top: 100px; }
    .worker-header { padding: 0 12px; }
    .worker-shell { width: calc(100% - 36px); margin: 18px auto; }
    .worker-welcome { align-items: flex-start; flex-direction: column; }
    .worker-grid { grid-template-columns: 1fr; }
    .worker-card-body { padding: 18px; }
    .worker-amounts { grid-template-columns: 1fr; }
    .worker-history > div { grid-template-columns: 1fr auto; }
    .worker-history em { grid-column: 1 / -1; width: max-content; }
}
