

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    margin: 0;
    font-family: "Inter", "Noto-sans", "Poppins", "Segoe UI", sans-serif;
    font-weight: 400;
    background: #fdfdfd;
    color: #000000;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}

:root {
    /* --bg: #f4f5f7; */
    --bg: #fdfdfd;
    --card: #ffffff;
    --text: #000000;
    --muted: #7d7f81ff;
    --accent: #2563eb;
    --primary: #2563eb;
    --secondary: #eb7a25;
    --tertiary: #22c55e;
    --quarternary: #a855f7;
    --radius: 6px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    --padding: 16px;
    --gap: 16px;
    --header-height: 72px;
    --mobile-nav-height: 86px;
}

* { box-sizing: border-box; }

body.page {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.header {
    background: #001a39;
    padding: 12px 20px;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 300;
}

.page-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.page-loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.page-loading-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: white;
    opacity: 0.92;
}

.page-loading-indicator {
    position: relative;
    text-align: center;
    color: var(--text);
    background: rgba(255, 255, 255, 0.92);
    border-radius: var(--radius);
    padding: 16px 24px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.page-loading-spinner {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 4px solid color-mix(in srgb, var(--primary) 40%, white 60%);
    border-top-color: color-mix(in srgb, var(--primary) 80%, white 20%);
    animation: page-loading-spin 0.85s linear infinite;
    margin: 0 auto 8px;
}

.page-loading-overlay:not(.show-spinner) .page-loading-indicator {
    visibility: hidden;
    opacity: 0;
}

@keyframes page-loading-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.footer {
    background: #e2e4e7;
    color: var(--muted);
    padding: 16px 20px;
    margin-top: auto;
    width: 100%;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 3px;
}

.logo img {
    height: 30px;
    width: auto;
    display: block;
}

.main-shell {
    flex: 1;
    width: 100%;
    padding: var(--gap) 20px var(--gap);
    box-sizing: border-box;
    display: flex;
    min-height: 0;
}

.layout {
    flex: 1;
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: var(--gap);
    width: 100%;
    min-height: 0;
    align-items: stretch;
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.1);
    padding: var(--padding);
    border: 1px solid color-mix(in srgb, #ffffff 90%, #2563eb 10%);
}

.section-body.card {
    padding-bottom: calc(var(--padding) * 1.5);
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
}

.section-body.card::-webkit-scrollbar {
    display: none;
}

.section-body.profile-body {
    padding-bottom: calc(var(--padding) * 2.5);
}

.nav-column {
    position: sticky;
    top: var(--gap);
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--card);
}

.nav-mobile {
    display: none;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    padding-bottom: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    font-weight: 400;
    transition: background 0.2s ease, color 0.2s ease;
    background-color: transparent;
}

.nav-item:hover a {
    background: color-mix(in srgb, #2563eb 20%, white 80%);
}

.nav-item.active a {
    color: var(--accent);
    font-weight: 400;
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: block;
    flex-shrink: 0;
    object-fit: contain;
}

.nav-icon-active {
    display: none;
    background: transparent;
}

.nav-item.active .nav-icon-active {
    display: block;
}

.nav-item.active .nav-icon-default {
    display: none;
}

.nav-label {
    line-height: 1.4;
}

.nav-desktop-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-logout {
    margin-top: 8px;
    margin-bottom: 8px;
    padding-left: 16px;
}

.nav-column-meta {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.3;
    padding-left: 12px;
    margin-top: 10px;
}

.nav-column-meta p {
    margin: 0;
}

.nav-column-meta p + p {
    margin-top: 2px;
}

.content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    min-height: 0;
    position: relative;
}

.content-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: relative;
}

.section {
    display: none;
    background: var(--card);
}

.section.active {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    gap: 14px;
}

.section-title {
    margin: 0;
    font-size: 1.6rem;
    color: #2563eb;
    font-weight: 400;
}

.section-title-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #2563eb;
}

.section-title-heading img {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    filter: none;
}

.section-title-card {
    background: #f0f7ff;
}

.section-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-placeholder-list {
    margin: 0;
    padding-left: 20px;
    color: inherit;
}

.section-placeholder-list li + li {
    margin-top: 8px;
}

.home-quick-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gap);
    width: 100%;
    align-items: stretch;
}

.home-activity-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--gap);
    margin-bottom: 18px;
}

.home-activity-card {
    border: 1px solid color-mix(in srgb, var(--primary) 20%, white 80%);
    padding: calc(var(--padding) * 0.9);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
}

.home-activity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.home-activity-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text);
}

.home-activity-subtitle {
    margin: 2px 0 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.home-activity-legend {
    display: inline-flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.85rem;
}

.home-activity-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
}

.home-activity-legend-item::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary) 25%, white 75%);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 25%, white 75%);
}

.home-activity-legend-item.greggs::before {
    background: color-mix(in srgb, var(--quarternary) 60%, white 40%);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--quarternary) 70%, white 30%);
}

.home-activity-legend-item.marys::before {
    background: color-mix(in srgb, var(--secondary) 60%, white 40%);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--secondary) 70%, white 30%);
}

.home-activity-chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 6px;
}

.home-activity-bar-wrapper {
    min-width: 42px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.home-activity-bar {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--primary) 4%, white 96%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2px;
    gap: 2px;
    position: relative;
    overflow: hidden;
}

.home-activity-segment {
    width: 100%;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: #000000;
}

.home-activity-segment.greggs {
    background: color-mix(in srgb, var(--quarternary) 55%, white 45%);
}

.home-activity-segment.marys {
    background: color-mix(in srgb, var(--secondary) 55%, white 45%);
}

.home-activity-bar-total {
    display: none;
}

.home-activity-bar-label {
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
    text-align: center;
    color: var(--muted);
    line-height: 1.1;
}

.home-activity-label-day {
    font-weight: 600;
    color: var(--text);
}

.home-activity-label-date {
    font-size: 0.7rem;
}

.home-activity-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    text-align: center;
    border: 1px solid color-mix(in srgb, var(--primary) 20%, white 80%);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
}

.home-activity-summary-text {
    margin: 0;
    font-size: 2.1rem;
    font-weight: 300;
    color: var(--text);
    line-height: 1.3;
}

.home-quick-link-card {
    border: 1px solid color-mix(in srgb, var(--primary) 50%, white 50%);
    border-radius: var(--radius);
    padding: var(--padding);
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: var(--gap);
    background: var(--card);
    box-shadow: var(--shadow);
}

.home-quick-link-card.rosters {
    border-color: color-mix(in srgb, var(--quarternary) 50%, white 50%);
}

.home-quick-link-card.inbox {
    border-color: color-mix(in srgb, var(--tertiary) 50%, white 50%);
}

.home-quick-link-card.profile {
    border-color: color-mix(in srgb, var(--secondary) 50%, white 50%);
}

.home-quick-link-content {
    flex: 1.2;
    background: color-mix(in srgb, var(--primary) 10%, white 90%);
    border-radius: calc(var(--radius) - 2px);
    padding: var(--padding);
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.home-quick-link-content.rosters {
    background: color-mix(in srgb, var(--quarternary) 10%, white 90%);
}

.home-quick-link-content.inbox {
    background: color-mix(in srgb, var(--tertiary) 10%, white 90%);
}

.home-quick-link-content.profile {
    background: color-mix(in srgb, var(--secondary) 10%, white 90%);
}

.home-quick-link-title {
    margin: 0;
    font-size: 1rem;
    color: var(--text);
    font-weight: 600;
}

.home-quick-link-title a {
    color: inherit;
    text-decoration: none;
}

.home-quick-link-title a:hover {
    text-decoration: underline;
}

.home-quick-link-list {
    margin: 0;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--primary);
    flex: 1 1 auto;
    list-style: none;
}

.home-quick-link-content.rosters .home-quick-link-list,
.home-quick-link-content.rosters .home-quick-link-list a {
    color: var(--quarternary);
}

.home-quick-link-content.inbox .home-quick-link-list,
.home-quick-link-content.inbox .home-quick-link-list a {
    color: var(--tertiary);
}

.home-quick-link-content.profile .home-quick-link-list,
.home-quick-link-content.profile .home-quick-link-list a {
    color: var(--secondary);
}

.home-quick-link-list a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.home-quick-link-list a:hover {
    text-decoration: underline;
}


.inbox-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.inbox-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.inbox-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid color-mix(in srgb, var(--primary) 30%, white 70%);
    background: white;
    color: var(--text);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.inbox-tab.active {
    background: color-mix(in srgb, var(--primary) 10%, white 90%);
    border-color: color-mix(in srgb, var(--primary) 50%, white 50%);
    color: var(--primary);
    box-shadow: var(--shadow);
}

.inbox-tab:not(.active):hover {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 35%, white 65%);
}

.inbox-tab-area-card {
    border-radius: var(--radius);
    padding: calc(var(--padding) * 0.9);
    background: var(--card);
}

.inbox-tab-panel {
    display: none;
}

.inbox-tab-panel.active {
    display: block;
}

.inbox-tab-placeholder {
    padding: 12px 4px;
    color: var(--muted);
}

.inbox-tab-placeholder h4 {
    margin-top: 0;
    color: var(--text);
}

.inbox-tab-placeholder p + p {
    margin-top: 6px;
}

.inbox-conversations-heading {
    margin: 8px 0 6px;
    font-size: 1.1rem;
    font-weight: 600;
}

.inbox-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: var(--gap);
}

.inbox-conversations {
    border: 1px solid color-mix(in srgb, var(--text) 10%, white 90%);
    border-radius: var(--radius);
    background: var(--card);
    padding: calc(var(--padding) * 0.8);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.inbox-conversation-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inbox-conversation-button {
    width: 100%;
    border: 1px solid color-mix(in srgb, var(--text) 12%, white 88%);
    background: transparent;
    color: var(--text);
    border-radius: var(--radius);
    padding: 10px 12px;
    text-align: left;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.inbox-conversation-button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.inbox-conversation-button.active {
    background: color-mix(in srgb, var(--primary) 12%, white 88%);
    border-color: var(--primary);
    color: var(--primary);
}

.inbox-new-conversation {
    margin-top: 10px;
    display: inline-flex;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.inbox-new-conversation:hover {
    color: color-mix(in srgb, var(--primary) 80%, black 20%);
    text-decoration: underline;
}

.inbox-chat-panel {
    border: 1px solid color-mix(in srgb, var(--text) 10%, white 90%);
    border-radius: var(--radius);
    background: var(--card);
    padding: calc(var(--padding) * 0.8);
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.inbox-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 10px;
}

.inbox-chat-header h4 {
    margin: 0;
    font-size: 1.05rem;
}

.inbox-chat-status {
    margin: 2px 0 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.inbox-chat-more {
    border: none;
    background: transparent;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--muted);
}

.inbox-chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 4px;
}

.inbox-message {
    max-width: 70%;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.inbox-message.incoming {
    flex-direction: row;
}

.inbox-message.outgoing {
    flex-direction: row-reverse;
    margin-left: auto;
}

.inbox-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid color-mix(in srgb, var(--primary) 40%, white 60%);
}

.inbox-message-bubble {
    border-radius: var(--radius);
    padding: 10px 14px;
    background: color-mix(in srgb, var(--primary) 12%, white 88%);
    color: var(--text);
    font-size: 0.95rem;
    box-shadow: var(--shadow);
}

.inbox-message.outgoing .inbox-message-bubble {
    background: color-mix(in srgb, var(--secondary) 12%, white 88%);
}

.inbox-message-meta {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 4px;
    text-align: right;
}

.inbox-chat-input {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    margin-top: 14px;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
    align-items: center;
}

.inbox-chat-input input {
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    padding: 10px;
    font-size: 0.95rem;
    background: #f9fafb;
}

.inbox-chat-input button {
    border: none;
    background: color-mix(in srgb, var(--primary) 30%, white 70%);
    color: var(--card);
    border-radius: var(--radius);
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 600;
}

.inbox-chat-input button:disabled {
    opacity: 0.6;
    cursor: default;
}

.inbox-chat-emoji {
    background: transparent;
    border: 1px solid #e5e7eb;
    color: var(--text);
}

.inbox-chat-send {
    background: var(--primary);
    color: white;
}
.shift-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.shift-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.shift-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid color-mix(in srgb, var(--primary) 30%, white 70%);
    background: white;
    color: var(--text);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.shift-tab.active {
    background: color-mix(in srgb, var(--primary) 10%, white 90%);
    border-color: color-mix(in srgb, var(--primary) 50%, white 50%);
    color: var(--primary);
    box-shadow: var(--shadow);
}

.shift-tab:not(.active):hover {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 35%, white 65%);
}

.shift-tab-area-card {
    border-radius: var(--radius);
    padding: calc(var(--padding) * 0.9);
    background: var(--card);
    margin-top: 12px;
}

.shift-tab-panel {
    display: none;
}

.shift-tab-panel.active {
    display: block;
}

.shift-tab-placeholder {
    padding: 12px 4px;
    color: var(--muted);
}

.shift-tab-placeholder h4 {
    margin-top: 0;
    color: var(--text);
}

.shift-tab-placeholder p {
    margin: 6px 0 0;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.profile-tabs {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 16px;
}

.profile-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid color-mix(in srgb, var(--primary) 30%, white 70%);
    background: white;
    color: var(--text);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.profile-tab.active {
    background: color-mix(in srgb, var(--primary) 10%, white 90%);
    border-color: color-mix(in srgb, var(--primary) 50%, white 50%);
    color: var(--primary);
    box-shadow: var(--shadow);
}

.profile-tab:not(.active):hover {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 35%, white 65%);
}

.profile-tab-area-card {
    border-radius: var(--radius);
    padding: calc(var(--padding) * 0.9);
    background: var(--card);
    margin-top: 12px;
}

.profile-tab-panel {
    display: none;
}

.profile-tab-panel.active {
    display: block;
}

.profile-tab-placeholder {
    padding: 12px 4px;
    color: var(--muted);
}

.profile-tab-placeholder h4 {
    margin-top: 0;
    color: var(--text);
}

.profile-tab-placeholder p {
    margin: 6px 0 0;
}

.rosters-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.rosters-tabs {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 16px;
}

.rosters-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid color-mix(in srgb, var(--primary) 30%, white 70%);
    background: white;
    color: var(--text);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.rosters-tab.active {
    background: color-mix(in srgb, var(--primary) 10%, white 90%);
    border-color: color-mix(in srgb, var(--primary) 50%, white 50%);
    color: var(--primary);
    box-shadow: var(--shadow);
}

.rosters-tab:not(.active):hover {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 35%, white 65%);
}

.rosters-tab-area-card {
    border-radius: var(--radius);
    padding: calc(var(--padding) * 0.9);
    background: var(--card);
    margin-top: 12px;
}

.rosters-tab-panel {
    display: none;
}

.rosters-tab-panel.active {
    display: block;
}

.rosters-tab-placeholder {
    padding: 12px 4px;
    color: var(--muted);
}

.rosters-tab-placeholder h4 {
    margin-top: 0;
    color: var(--text);
}

.shift-roster-heading {
    margin: 6px 0 16px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}

.shift-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: var(--gap);
}

.shift-roster-panel {
    border: 1px solid color-mix(in srgb, var(--text) 12%, white 88%);
    border-radius: var(--radius);
    background: var(--card);
    padding: calc(var(--padding) * 0.9);
}

.shift-roster-panel h4 {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 600;
}

.shift-roster-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shift-roster-edit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    margin-top: 14px;
    padding: 6px 0;
    transition: color 0.15s ease;
}

.shift-roster-edit:hover,
.shift-roster-edit:focus {
    color: color-mix(in srgb, var(--primary) 80%, black 20%);
}

.shift-roster-button {
    width: 100%;
    border: 1px solid color-mix(in srgb, var(--primary) 40%, white 60%);
    background: transparent;
    color: var(--primary);
    border-radius: var(--radius);
    padding: 10px 12px;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.shift-roster-button.active,
.shift-roster-button:hover {
    background: color-mix(in srgb, var(--primary) 10%, white 90%);
    color: var(--primary);
    border-color: var(--primary);
}

.shift-roster-button-greggs {
    border-color: color-mix(in srgb, var(--quarternary) 40%, white 60%);
    color: var(--quarternary);
}

.shift-roster-button-greggs.active,
.shift-roster-button-greggs:hover {
    background: color-mix(in srgb, var(--quarternary) 12%, white 88%);
    color: var(--quarternary);
    border-color: var(--quarternary);
}

.shift-roster-button-marys {
    border-color: color-mix(in srgb, var(--secondary) 40%, white 60%);
    color: var(--secondary);
}

.shift-roster-button-marys.active,
.shift-roster-button-marys:hover {
    background: color-mix(in srgb, var(--secondary) 12%, white 88%);
    color: var(--secondary);
    border-color: var(--secondary);
}

.shift-week-panel {
    border: 1px solid color-mix(in srgb, var(--text) 12%, white 88%);
    border-radius: var(--radius);
    background: var(--card);
    padding: calc(var(--padding) * 0.9);
    overflow-x: auto;
}

.shift-week-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.shift-week-grid {
    display: grid;
    grid-template-columns: 80px repeat(7, minmax(100px, 1fr));
    border: 1px solid color-mix(in srgb, var(--primary) 30%, white 70%);
    border-radius: var(--radius);
    overflow: hidden;
}

.shift-week-cell {
    border-bottom: 1px solid color-mix(in srgb, var(--primary) 20%, white 80%);
    border-right: 1px solid color-mix(in srgb, var(--primary) 20%, white 80%);
    padding: 2px 6px;
    font-size: 0.75rem;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--card);
    line-height: 1.2;
}

.shift-week-cell span {
    display: block;
}

.shift-week-cell.time-label {
    background: color-mix(in srgb, var(--primary) 6%, white 94%);
    font-weight: 600;
}

.shift-week-cell.day-label {
    background: color-mix(in srgb, var(--primary) 10%, white 90%);
    font-weight: 600;
    flex-direction: column;
    gap: 2px;
}

.shift-week-cell:nth-child(8n) {
    border-right: none;
}

.shift-week-cell:last-child,
.shift-week-cell:nth-last-child(-n+8) {
    border-bottom: none;
}

.shift-week-legend {
    font-size: 0.9rem;
    color: var(--muted);
}

.home-quick-link-illustration {
    width: 120px;
    max-width: 30%;
    height: auto;
    object-fit: contain;
    align-self: center;
}

.profile-overview-card {
    border: none;
    border-radius: var(--radius);
    padding: 0;
    background: var(--card);
    display: flex;
    flex-direction: column;
    gap: calc(var(--gap) * 0.85);
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.profile-card {
    background: #ffffff;
    border-radius: calc(var(--radius) + 4px);
    padding: calc(var(--padding) * 1.1);
    width: 100%;
}

.profile-card-row {
    display: flex;
    gap: var(--gap);
    width: 100%;
}

.profile-card + .profile-card {
    margin-top: calc(var(--gap) * 0.85);
}

.profile-card-row .profile-card + .profile-card {
    margin-top: 0;
}

.profile-card-row + .profile-card {
    margin-top: calc(var(--gap) * 0.85);
}

.profile-card.info {
    position: relative;
    background: #ffffff;
    border: 1px solid #efeeee;
}

.profile-card.photo {
    display: flex;
    justify-content: flex-start;
    background: #ffffff;
    border: 1px solid #efeeee;
}

.profile-avatar-wrapper {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0;
    position: relative;
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.4);
}

.profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-avatar-edit {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    text-align: center;
    padding: 6px 0;
    font-size: 0.85rem;
    text-decoration: none;
}

.profile-card.name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #efeeee;
}

.profile-name-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
}

.profile-name {
    margin: 0;
    font-size: 2.6rem;
    font-weight: 500;
    line-height: 1.1;
    text-align: left;
}

.profile-name-row {
    width: 100%;
}

.profile-name-line {
    display: inline;
}

.profile-edit-button {
    color: #9ca3af;
    text-decoration: none;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    border: none;
    background: transparent;
    cursor: pointer;
}

.profile-edit-button:hover {
    color: #6b7280;
}

.profile-name-edit {
    margin-left: auto;
}

.profile-card.info {
    position: relative;
    background: #ffffff;
    border: 1px solid #efeeee;
    box-shadow: var(--shadow);
}

.profile-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.profile-card-heading-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.profile-card-heading .profile-edit-button {
    position: static;
}

.profile-info-list {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-info-item dt {
    margin: 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.profile-info-item dd {
    margin: 4px 0 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
}

.profile-roster-list {
    margin: 6px 0 0 16px;
    padding: 0;
    list-style: disc;
}

.profile-roster-list li + li {
    margin-top: 4px;
}

.profile-avatar-edit:hover {
    text-decoration: underline;
}

.empty-state-wrapper {
    display: flex;
    justify-content: center;
}

.empty-state-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.empty-state-content {
    text-align: center;
}

.empty-state-heading {
    font-weight: 200;
}

.empty-state-illustration {
    width: 80%;
    max-width: 400px;
    height: auto;
    margin: 40px auto;
    display: block;
}

h4 {
    font-weight: 550;
    margin-top: 10px;
    margin-bottom: 10px;
}

.more-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
}

.more-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    padding: 10px 12px;
    border-radius: var(--radius);
    transition: background 0.2s ease;
}

.more-item:hover {
    background: color-mix(in srgb, #2563eb 10%, white 90%);
}

.more-footer {
    margin-top: 12px;
    padding-left: 12px;
}

.more-footer p {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.logout-link {
    display: inline-block;
    margin-top: 6px;
    color: var(--accent);
    font-weight: 400;
    text-decoration: none;
    cursor: pointer;
}

.logout-link:hover {
    text-decoration: underline;
}

/* Auth (login/signup) layout */
.auth-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #fdfdfd;
}

.auth-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 16px;
}

.auth-page .footer {
    margin-top: 0;
}

.login-container {
    background: #ffffff;
    padding: 30px;
    width: 100%;
    max-width: 360px;
    box-sizing: border-box;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.login-container h2 {
    margin-top: 0;
    text-align: center;
    color: #333;
    font-weight: 700;
}

.login-container label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    color: #555;
    font-size: 14px;
}

.login-container input[type="email"],
.login-container input[type="password"],
.login-container input[type="text"] {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
    transition: border-color 0.2s;
}

.login-container input:focus {
    border-color: color-mix(in srgb, var(--accent) 80%, white);
    outline: none;
}

.login-container button {
    margin-top: 20px;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    background: color-mix(in srgb, var(--accent) 80%, white);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.login-container button:hover {
    background: color-mix(in srgb, var(--accent) 60%, white);
}

.error-box {
    background: #ffdddd;
    color: #a10000;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
    border: 1px solid #cc0000;
}

.signup-link {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #555;
}

.signup-link a {
    color: color-mix(in srgb, var(--accent) 80%, white);
    text-decoration: none;
    font-weight: bold;
    margin-left: 5px;
}

.signup-link a:hover {
    text-decoration: underline;
}

@media (min-width: 1024px) {
    body.page {
        height: 100vh;
        overflow: hidden;
    }

    .header {
        position: sticky;
        top: 0;
        z-index: 200;
    }

    .main-shell {
        height: calc(100vh - var(--header-height));
        overflow: hidden;
    }

    .layout {
        height: 100%;
    }

    .content,
    .section.active {
        height: 100%;
    }

    .section-body.card {
        height: 100%;
        overflow-y: auto;
    }

    .nav-column {
        top: 0;
        position: sticky;
        overflow-y: auto;
        height: auto;
        max-height: none;
    }

    .nav.nav-desktop {
        height: auto;
    }
}

/* Mobile / tablet layout */
@media (max-width: 900px) {
    body.page {
        height: 100vh;
        overflow: hidden;
    }

    .nav-column {
        display: none;
    }

    .section-body-heading {
        font-size: 1.2rem;
    }

    .home-activity-wrapper {
        grid-template-columns: 1fr;
    }

    .home-activity-card {
        display: none;
    }

    .home-activity-chart {
        min-height: 160px;
    }

    .home-activity-bar-wrapper {
        min-width: 48px;
    }

    .home-activity-summary {
        padding: 24px;
        width: 100%;
    }

    .home-activity-summary-text {
        font-size: 1.4rem;
        max-width: 22ch;
        margin: 0 auto;
    }

    .shift-header,
    .profile-header,
    .rosters-header,
    .inbox-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .shift-tabs,
    .profile-tabs,
    .rosters-tabs,
    .inbox-tabs {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }

    .shift-tab,
    .profile-tab,
    .rosters-tab,
    .inbox-tab {
        width: auto;
        flex: 0 0 auto;
        justify-content: flex-start;
    }

    .shift-roster-heading {
        text-align: center;
    }

    .shift-week-panel {
        overflow-x: auto;
        overflow-y: auto;
        max-height: 70vh;
        border-color: color-mix(in srgb, var(--text) 12%, white 88%);
    }

    .shift-week-grid {
        min-width: 720px;
    }

    .inbox-conversations-heading {
        text-align: center;
    }

    .inbox-layout {
        grid-template-columns: 1fr;
    }

    .inbox-message {
        max-width: 100%;
    }

    .home-quick-links {
        grid-template-columns: 1fr;
    }

    .home-quick-link-illustration {
        max-width: 36%;
    }

    .profile-overview-card {
        border: none;
        background: transparent;
        box-shadow: none;
        padding: 0;
        max-width: 100%;
    }

    .profile-card {
        background: #ffffff;
        box-shadow: none;
        border: 1px solid rgba(0, 0, 0, 0.05);
        padding: var(--padding);
    }

    .profile-card + .profile-card {
        margin-top: 12px;
    }

    .profile-card-row {
        flex-direction: column;
        gap: 0;
    }

    .profile-card-row > .profile-card.photo,
    .profile-card-row > .profile-card.name {
        flex: unset;
    }

    .profile-card-row > .profile-card.photo {
        justify-content: center;
        border-bottom: none;
        border-radius: var(--radius) var(--radius) 0 0;
    }

    .profile-card-row > .profile-card.name {
        flex-direction: row;
        gap: 12px;
        border-top: none;
        border-radius: 0 0 var(--radius) var(--radius);
        padding-top: var(--padding);
    }

    .profile-avatar-wrapper {
        margin: 0 auto;
    }

    .profile-name-row {
        align-items: center;
        justify-content: center;
        text-align: center;
        flex: 1;
    }

    .profile-name {
        text-align: center;
    }

    .profile-name-edit {
        align-self: center;
    }

    .shift-grid {
        grid-template-columns: 1fr;
    }

    .main-shell {
        padding: var(--gap);
        padding-bottom: calc(var(--gap) / 2);
        max-height: calc(100vh - var(--header-height) - var(--mobile-nav-height));
        overflow: hidden;
    }

    .layout {
        display: block;
        height: 100%;
    }

    .content,
    .content-body,
    .section.active {
        height: 100%;
    }

    .content-body {
        overflow: hidden;
        padding-bottom: calc(var(--gap) / 2);
    }

    .section-body.card {
        height: calc(100% - 50px);
        overflow-y: auto;
        padding-bottom: calc(var(--padding) + var(--gap));
        box-shadow: none;
    }

    .section-body.card::-webkit-scrollbar {
        display: none;
    }

    .section-body.card {
        scrollbar-width: none;
    }

    .nav-desktop {
        display: none;
    }

    .nav-mobile {
        display: block;
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        right: 0;
        width: 100%;
        padding: 14px 14px;
        border-radius: 0;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
        border-top: 1px solid #e5e7eb;
        background: #fff;
        z-index: 1000;
        min-height: var(--mobile-nav-height);
    }

    .nav-list {
        flex-direction: row;
        gap: 4px;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        flex: initial;
    }

    .nav-item a {
        text-align: center;
        padding: 0px 4px;
        font-size: 0.85rem;
        font-weight: 400;
        flex-direction: column;
        gap: 6px;
        justify-content: center;
        align-items: center;
        background: transparent;
        transition: color 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .nav-mobile .nav-item a:hover,
    .nav-mobile .nav-item a:focus,
    .nav-mobile .nav-item a:active,
    .nav-mobile .nav-item.active a {
        background: transparent;
    }

    .footer {
        display: none;
    }
}
.section-body-heading {
    margin: 8px 0 12px;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
}

.section-helper-text {
    margin: -6px 0 16px;
    font-size: 0.95rem;
    color: var(--muted);
}
.profile-card-row > .profile-card.photo {
    flex: 1;
}

.profile-card-row > .profile-card.name {
    flex: 2;
}
.profile-card.photo,
.profile-card.name,
.profile-card.info {
    border: 1px solid #efeeee;
}
.shift-availability {
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shift-availability-available {
    background: color-mix(in srgb, var(--tertiary) 15%, white 85%);
    color: var(--tertiary);
}

.shift-availability-greggs {
    background: color-mix(in srgb, var(--quarternary) 18%, white 82%);
    color: var(--quarternary);
}

.shift-availability-marys {
    background: color-mix(in srgb, var(--secondary) 18%, white 82%);
    color: var(--secondary);
}
