h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

body {
    font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    color: #1a1a1a;
    background: #f4f5f7;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: #16324f;
    color: white;
}

.app-title {
    font-weight: 600;
}

.user-name {
    margin-right: 1rem;
}

.logout-button {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 4px;
    padding: 0.3rem 0.8rem;
    cursor: pointer;
}

.logout-button:hover {
    background: rgba(255, 255, 255, 0.15);
}

.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-body {
    flex: 1;
    padding: 1.5rem 2rem;
    margin: 0 auto;
}

.profile-summary {
    color: #444;
}

.login-card {
    max-width: 360px;
    margin: 4rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.form-group {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.form-group input {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.login-error {
    color: #b3261e;
}

.login-button {
    width: 100%;
    padding: 0.6rem;
    background: #16324f;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.login-button:disabled {
    opacity: 0.6;
}

.balance-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.balance-table th, .balance-table td {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e0e0e0;
}

.balance-table th {
    background: #eef1f5;
}

.main-nav {
    display: flex;
    gap: 1.25rem;
    margin-right: auto;
    margin-left: 2rem;
}

.main-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
}

.main-nav a:hover {
    color: white;
    text-decoration: underline;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.primary-button, .approve-button, .reject-button, .secondary-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
}

.primary-button {
    background: #16324f;
    color: white;
}

.approve-button {
    background: #1e7d3c;
    color: white;
}

.reject-button {
    background: #b3261e;
    color: white;
}

.secondary-button {
    background: #e0e4e9;
    color: #1a1a1a;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    max-width: 480px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.form-error {
    color: #b3261e;
}

.request-card, .approval-card {
    background: white;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.request-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.request-reason {
    color: #555;
    font-style: italic;
    margin-top: 0.25rem;
}

.status-badge {
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    color: white;
    background: #888;
}

.status-approved { background: #1e7d3c; }
.status-rejected { background: #b3261e; }
.status-step1pending, .status-step2pending, .status-step3pending, .status-pendingapproval { background: #b98900; }

.step-list {
    margin: 0.75rem 0 0 1.25rem;
    padding: 0;
}

.step-list li {
    margin-bottom: 0.35rem;
}

.step-approved { color: #1e7d3c; }
.step-rejected { color: #b3261e; }
.step-forwarded { color: #b98900; }

.step-comment {
    color: #555;
    font-size: 0.9rem;
}

.approval-actions-expanded {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 500px;
}

.approval-actions-expanded textarea, .approval-actions-expanded select {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
}

.approval-buttons {
    display: flex;
    gap: 0.5rem;
}

.notification-bell-wrapper {
    position: relative;
    margin-right: 1rem;
}

.bell-button {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    padding: 0.25rem 0.5rem;
}

.bell-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #b3261e;
    color: white;
    border-radius: 10px;
    font-size: 0.7rem;
    padding: 0 5px;
    line-height: 1.4;
}

.notification-dropdown {
    position: absolute;
    right: 0;
    top: 2.2rem;
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    background: white;
    color: #1a1a1a;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    z-index: 100;
}

.notification-empty {
    padding: 1rem;
    color: #777;
}

.notification-item {
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.notification-item.unread {
    background: #eef4fb;
}

.notification-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.notification-body {
    font-size: 0.85rem;
    color: #444;
}

.notification-time {
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.15rem;
}

.calendar-page:focus {
    outline: none;
}

.calendar-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.calendar-controls select {
    padding: 0.4rem;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.calendar-month-label {
    font-weight: 600;
    min-width: 140px;
    text-align: center;
}

.calendar-day-card {
    background: white;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.calendar-day-header {
    font-weight: 600;
    margin-bottom: 0.4rem;
    text-transform: capitalize;
}

.calendar-entry {
    padding: 0.15rem 0.4rem;
    font-size: 0.8rem;
    border-radius: 3px;
    margin-bottom: 2px;
}

.calendar-entry-duty { background: #cfe2ff; color: #052c65; }
.calendar-entry-approvedleave { background: #d1e7dd; color: #0a3622; }
.calendar-entry-pendingleave { background: #fff3cd; color: #664d03; }
.calendar-entry-eventday { background: #e2d9f3; color: #3d1f6e; }

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: auto repeat(6, 1fr);
    gap: 1px;
    background: #e0e0e0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    min-height: calc(100vh - 180px);
}

.calendar-grid-weekday {
    font-weight: 600;
    text-align: center;
    padding: 0.5rem 0;
    text-transform: capitalize;
    color: #555;
    background: #f8f9fa;
    font-size: 0.8rem;
}

.calendar-grid-cell {
    background: white;
    padding: 0.4rem;
    overflow: hidden;
}

.calendar-grid-cell-muted {
    background: #f8f9fa;
}

.calendar-grid-date {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: #333;
}

.calendar-grid-cell .calendar-entry {
    font-size: 0.75rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    border-radius: 3px;
    padding: 0.15rem 0.4rem;
    margin-bottom: 2px;
    border-left: none;
    cursor: default;
}

.roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.unit-section {
    margin-bottom: 2rem;
}

.unit-heading {
    font-size: 1.1rem;
    font-weight: 700;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #16324f;
    color: #16324f;
}

.roster-card {
    display: block;
    background: white;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: #1a1a1a;
}

.roster-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.roster-card-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.roster-card-detail {
    font-size: 0.85rem;
    color: #555;
}

.tab-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tab-button {
    background: #e0e4e9;
    color: #1a1a1a;
    border: none;
    border-radius: 4px;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.tab-button-active {
    background: #16324f;
    color: white;
}

.schedule-conflict-warning {
    background: #fff4e5;
    color: #8a5300;
    border: 1px solid #f0c98a;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    margin: 0.5rem 0;
}

.app-footer {
    text-align: center;
    padding: 0.75rem;
    font-size: 0.75rem;
    color: #999;
}
