:root {
    --bg: #f6f6f4;
    --surface: #ffffff;
    --surface-muted: #eef3f7;
    --line: #dedede;
    --text: #111316;
    --muted: #727887;
    --accent: #2d9a93;
    --accent-strong: #167b75;
    --accent-soft: #e3f4f2;
    --warning: #de7a18;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #d5d2d0;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    position: relative;
    width: min(100%, 420px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 80px 16px 96px;
    background: var(--bg);
}

.home-header,
.screen-header,
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 48px;
}

.screen-header {
    margin-bottom: 32px;
}

.modal-header {
    margin: -56px -16px 20px;
    padding: 24px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    border-radius: 26px 26px 0 0;
}

h1,
h2,
p,
dl {
    margin: 0;
}

h1 {
    font-size: 1.85rem;
    font-weight: 500;
    line-height: 1.05;
}

.screen-header h1,
.modal-header h1 {
    font-size: 1rem;
    font-weight: 800;
}

h2 {
    font-size: 1rem;
    font-weight: 800;
}

.header-actions,
.screen-header form,
.section-title,
.overview-cards {
    display: flex;
    align-items: center;
    gap: 12px;
}

.screen-header form,
.section-title form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.period-input {
    width: 122px;
    min-height: 34px;
    border: 0;
    border-radius: 999px;
    background: #e9e9e7;
    color: var(--text);
    padding: 0 10px;
}

.round-button,
.avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #e2e2e0;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 700;
}

.avatar {
    background: #cfcfcd;
}

.primary-pill,
.period-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border: 0;
    border-radius: 999px;
    padding: 0 14px;
    white-space: nowrap;
    cursor: pointer;
}

.primary-pill {
    background: var(--accent);
    color: #fff;
    font-weight: 800;
}

.period-pill {
    background: #e9e9e7;
    color: var(--text);
}

.section-title {
    justify-content: space-between;
    margin-bottom: 22px;
}

.overview-cards {
    align-items: stretch;
    margin-bottom: 16px;
}

.info-card,
.panel,
.salary-hero,
.form-card,
.calculation-card {
    border-radius: 8px;
    background: var(--surface);
}

.info-card {
    display: grid;
    flex: 1 1 0;
    min-height: 168px;
    padding: 14px 12px;
}

.card-title {
    font-weight: 800;
}

.info-card strong {
    font-size: 1.36rem;
    font-weight: 500;
}

.info-card p,
.salary-hero p {
    color: #8a8a8a;
    font-size: 0.82rem;
}

.info-card a,
.progress-label {
    align-self: end;
    font-size: 0.82rem;
}

.progress-track {
    align-self: end;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #d7eeeb;
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}

.panel {
    padding: 16px 12px;
}

.hours-panel h2 {
    margin-bottom: 14px;
}

.hours-panel dl {
    display: grid;
    gap: 12px;
}

.hours-panel dl div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.hours-panel dd {
    margin: 0;
}

.total-row {
    border-top: 1px solid var(--text);
    color: var(--accent-strong);
    font-weight: 800;
    padding-top: 12px;
}

.week-switcher {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    text-align: center;
}

.week-switcher a {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ececef;
    color: #8b92a0;
    font-size: 2rem;
    line-height: 1;
}

.week-switcher h2 {
    margin-bottom: 4px;
}

.week-switcher button {
    border: 0;
    background: transparent;
    color: var(--accent-strong);
    cursor: pointer;
}

.tabs {
    border-bottom: 1px solid var(--line);
    margin: 0 -16px 10px;
    padding: 0 16px;
}

.tabs a {
    display: inline-block;
    border-bottom: 2px solid var(--text);
    font-weight: 700;
    padding: 0 0 14px;
}

.hint {
    border-radius: 10px;
    margin-bottom: 24px;
    padding: 12px;
    background: var(--surface-muted);
    font-size: 0.8rem;
}

.shift-stack {
    display: grid;
    margin: 0 -16px;
}

.shift-row {
    display: grid;
    grid-template-columns: 48px 1fr 34px;
    align-items: center;
    gap: 16px;
    min-height: 88px;
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
    background: var(--surface);
}

.date-tile {
    display: grid;
    place-items: center;
    width: 48px;
    height: 56px;
    border-radius: 8px;
    background: #f0f0f2;
    color: var(--muted);
    font-weight: 800;
}

.date-tile.selected {
    background: var(--accent);
    color: #fff;
}

.date-tile span {
    font-size: 0.72rem;
}

.date-tile strong {
    font-size: 1rem;
}

.shift-main {
    display: grid;
    gap: 4px;
}

.shift-main strong {
    font-size: 1.05rem;
}

.shift-main span,
.shift-main small,
.muted {
    color: var(--muted);
}

.shift-main small {
    color: var(--warning);
}

.chevron-button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #9aa0aa;
    cursor: pointer;
    font-size: 1.4rem;
}

.salary-hero {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    padding: 20px 16px;
    background: var(--accent-strong);
    color: #fff;
}

.salary-hero span {
    color: #d4efec;
    font-weight: 800;
}

.salary-hero strong {
    font-size: 2.4rem;
    font-weight: 500;
}

.salary-hero p {
    color: #d4efec;
}

.form-screen {
    background: #f4f5f7;
}

.stacked-form {
    display: grid;
    gap: 22px;
}

.stacked-form h2 {
    margin: 0 0 10px 4px;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.form-card,
.calculation-card {
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.09);
}

.form-card label,
.calculation-card label,
.calculation-card > div {
    display: grid;
    gap: 8px;
    border-bottom: 1px solid var(--line);
    padding: 16px;
    color: var(--muted);
    font-size: 0.86rem;
}

.calculation-card > div {
    grid-template-columns: 1fr auto;
    color: var(--muted);
    font-size: 1rem;
}

.calculation-card > div strong {
    color: var(--accent);
}

.form-card label:last-child,
.calculation-card label:last-child {
    border-bottom: 0;
}

.form-card input,
.calculation-card input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 1rem;
}

.notice {
    border-radius: 8px;
    margin-bottom: 16px;
    padding: 12px;
    background: #fff0ed;
    color: #9d3422;
    font-weight: 700;
}

.notice p + p {
    margin-top: 6px;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: min(100%, 420px);
    height: 82px;
    transform: translateX(-50%);
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.bottom-nav a {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    font-size: 0.76rem;
}

.bottom-nav span {
    font-size: 1.45rem;
    line-height: 1;
}

.bottom-nav .active {
    color: var(--accent-strong);
    font-weight: 800;
}

@media (min-width: 860px) {
    .app-shell {
        min-height: 860px;
        margin-top: 24px;
        margin-bottom: 24px;
        border-radius: 28px;
        box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
    }

    .bottom-nav {
        position: sticky;
        margin: 24px -16px -96px;
        transform: none;
        width: calc(100% + 32px);
    }
}

@media (max-width: 390px) {
    .screen-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .screen-header form {
        width: 100%;
    }
}
