@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.content {
    padding-top: 1.1rem;
}

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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.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."
    }

.aspx-page {
    width: 100%;
    padding: 1.5rem;
    background: #f5f7fb;
    min-height: calc(100vh - 70px);
}

.aspx-card {
    background: #fff;
    border: 1px solid #e7ebf1;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(24,39,75,.07);
    overflow: hidden;
}

.aspx-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #edf0f4;
}

.aspx-page-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #202532;
}

.aspx-page-subtitle {
    margin: .2rem 0 0;
    color: #697386;
    font-size: .88rem;
}

.aspx-filter-panel {
    margin: 1.25rem 1.5rem;
    padding: 1rem;
    border: 1px solid #e4e9ef;
    border-radius: 10px;
    background: #fbfcfe;
}

.aspx-filter-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(170px,1fr));
    gap: 1rem;
}

.aspx-form-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 1rem;
}

.aspx-field label {
    display: block;
    margin-bottom: .38rem;
    font-size: .83rem;
    font-weight: 600;
    color: #485163;
}

.aspx-field .form-control, .aspx-field .form-select {
    min-height: 42px;
    border-color: #dbe2e9;
    border-radius: 6px;
    box-shadow: none;
}

.aspx-actions {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
}

.aspx-btn-primary {
    background: #ef3f6f;
    border-color: #ef3f6f;
    color: #fff;
}

    .aspx-btn-primary:hover {
        background: #d92e5d;
        border-color: #d92e5d;
        color: #fff;
    }

.aspx-btn-outline {
    background: #fff;
    border: 1px solid #14a9e4;
    color: #078fc6;
}

.aspx-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.aspx-table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
    font-size: .82rem;
}

    .aspx-table th, .aspx-table td {
        padding: .75rem .7rem;
        border-bottom: 1px solid #e7ebef;
        text-align: left;
        vertical-align: middle;
    }

    .aspx-table th {
        background: #fff;
        color: #3c4554;
        font-size: .76rem;
        font-weight: 700;
        white-space: nowrap;
    }

    .aspx-table tbody tr:hover {
        background: #f8fbfe;
    }

.aspx-status {
    display: inline-flex;
    padding: .35rem .5rem;
    border-radius: 4px;
    font-size: .7rem;
    font-weight: 600;
}

.aspx-status-green {
    background: #23743e;
    color: #fff;
}

.aspx-status-blue {
    background: #1976d2;
    color: #fff;
}

.aspx-status-red {
    background: #d9364f;
    color: #fff;
}

.aspx-status-orange {
    background: #e6921b;
    color: #fff;
}

.aspx-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(19,27,41,.48);
}

.aspx-side-panel {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 1050;
    width: min(1180px,94vw);
    height: 100vh;
    overflow-y: auto;
    background: #fff;
    box-shadow: -14px 0 45px rgba(20,30,48,.22);
}

@media(max-width:1200px) {
    .aspx-filter-grid {
        grid-template-columns: repeat(3,minmax(170px,1fr));
    }

    .aspx-form-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}

@media(max-width:850px) {
    .aspx-page {
        padding: .75rem
    }

    .aspx-page-header {
        align-items: stretch;
        flex-direction: column
    }

    .aspx-filter-grid, .aspx-form-grid {
        grid-template-columns: 1fr
    }

    .aspx-side-panel {
        width: 100vw
    }
}


/* ============================================================
   COMMON RAZOR PAGE DESIGN
   Reusable by converted ASPX pages and existing Razor pages.
   ============================================================ */

:root {
    --app-bg: #f5f7fb;
    --app-card: #ffffff;
    --app-border: #e4e9ef;
    --app-border-light: #edf0f4;
    --app-text: #202532;
    --app-muted: #697386;
    --app-primary: #08a8e8;
    --app-primary-dark: #078fc6;
    --app-accent: #ef3f6f;
    --app-accent-dark: #d92e5d;
    --app-success: #23743e;
    --app-danger: #d9364f;
    --app-warning: #e6921b;
    --app-shadow: 0 8px 28px rgba(24, 39, 75, 0.07);
}

.app-page, .app-page *, .app-page *::before, .app-page *::after {
    box-sizing: border-box;
}

.app-page {
    width: 100%;
    min-width: 0;
    min-height: calc(100vh - 70px);
    padding: 1.5rem;
    background: var(--app-bg);
}

.app-page-card {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    background: var(--app-card);
    border: 1px solid #e7ebf1;
    border-radius: 12px;
    box-shadow: var(--app-shadow);
}

.app-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--app-border-light);
}

.app-title-wrap {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: .9rem;
}

.app-title-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    flex: 0 0 44px;
    color: var(--app-primary);
    background: #eaf8ff;
    border-radius: 8px;
    font-size: 1.2rem;
}

.app-title-wrap h1 {
    margin: 0;
    color: var(--app-text);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.25;
}

.app-title-wrap p {
    margin: .2rem 0 0;
    color: var(--app-muted);
    font-size: .88rem;
}

.app-header-actions, .app-filter-footer, .app-form-actions, .app-row-actions {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
}

.app-btn-primary, .app-btn-outline, .app-btn-danger-outline, .app-btn-warning-outline, .app-btn-light {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .55rem .95rem;
    border-radius: 6px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

/*.app-btn-primary {
    color: #fff;
    background: var(--app-accent);
    border: 1px solid var(--app-accent);
}

    .app-btn-primary:hover, .app-btn-primary:focus {
        color: #fff;
        background: var(--app-accent-dark);
        border-color: var(--app-accent-dark);
    }*/
.app-btn-primary {
    color: #ffffff;
    background: #2f8f57;
    border: 1px solid #2f8f57;
}

    .app-btn-primary:hover,
    .app-btn-primary:focus {
        color: #ffffff;
        background: #267747;
        border-color: #267747;
    }

/*.app-btn-outline {
    color: var(--app-primary-dark);
    background: #fff;
    border: 1px solid #14a9e4;
}*/
.app-btn-outline {
    color: #2f8f57;
    background: #ffffff;
    border: 1px solid #2f8f57;
}

    .app-btn-outline:hover,
    .app-btn-outline:focus {
        color: #ffffff;
        background: #2f8f57;
    }

    .app-btn-outline:hover, .app-btn-outline:focus {
        color: #fff;
        background: #14a9e4;
    }

.app-btn-danger-outline {
    color: var(--app-accent-dark);
    background: #fff;
    border: 1px solid var(--app-accent);
}

.app-btn-warning-outline {
    color: #b67a00;
    background: #fffaf0;
    border: 1px solid #eab64d;
}

.app-btn-light {
    color: #4f5968;
    background: #f6f8fb;
    border: 1px solid #dbe1e8;
}

.app-filter-panel, .app-editor-section {
    margin: 1.25rem 1.5rem;
    padding: 1rem;
    background: #fbfcfe;
    border: 1px solid var(--app-border);
    border-radius: 10px;
}

.app-editor-section {
    background: #fff;
}

.app-filter-grid, .app-form-grid {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 1rem;
}

.app-grid-1 {
    grid-template-columns: minmax(0,1fr);
}

.app-grid-2 {
    grid-template-columns: repeat(2,minmax(0,1fr));
}

.app-grid-3 {
    grid-template-columns: repeat(3,minmax(0,1fr));
}

.app-grid-4 {
    grid-template-columns: repeat(4,minmax(0,1fr));
}

.app-grid-5 {
    grid-template-columns: repeat(5,minmax(0,1fr));
}

.app-field {
    min-width: 0;
}

.app-field-full {
    grid-column: 1 / -1;
}

.app-field label {
    display: block;
    margin-bottom: .38rem;
    color: #485163;
    font-size: .83rem;
    font-weight: 600;
}

    .app-field label span {
        color: var(--app-accent);
    }

.app-field .form-control, .app-field .form-select, .app-field input, .app-field select, .app-field textarea {
    width: 100%;
    min-height: 42px;
    padding: .55rem .75rem;
    color: #212529;
    background: #fff;
    border: 1px solid #dbe2e9;
    border-radius: 6px;
    box-shadow: none;
}

.app-field textarea {
    min-height: 90px;
    resize: vertical;
}

    .app-field .form-control:focus, .app-field .form-select:focus, .app-field input:focus, .app-field select:focus, .app-field textarea:focus {
        border-color: #44b8e5;
        outline: 0;
        box-shadow: 0 0 0 .2rem rgba(20,169,228,.12);
    }

.app-filter-footer {
    justify-content: flex-end;
    margin-top: 1rem;
}

.app-search-box {
    position: relative;
    width: min(430px,100%);
    margin-right: auto;
}

    .app-search-box i {
        position: absolute;
        top: 50%;
        left: .9rem;
        color: #8b95a5;
        transform: translateY(-50%);
    }

    .app-search-box .form-control {
        min-height: 42px;
        padding-left: 2.45rem;
        border-radius: 22px;
    }

.app-section-heading {
    margin-bottom: 1rem;
}

    .app-section-heading h2 {
        margin: 0;
        color: #252b38;
        font-size: 1.1rem;
        font-weight: 700;
    }

    .app-section-heading p {
        margin: .25rem 0 0;
        color: #7a8494;
        font-size: .85rem;
    }

.app-form-actions {
    align-items: flex-end;
}

    .app-form-actions > div, .app-form-actions .btn {
        width: 100%;
    }

.app-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .2rem 1.5rem 1rem;
}

.app-page-size {
    display: flex;
    align-items: center;
    gap: .45rem;
    color: #677181;
    font-size: .85rem;
}

    .app-page-size .form-select, .app-page-size select {
        width: 80px;
        min-height: 38px;
    }

.app-table-wrapper {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    border-top: 1px solid var(--app-border-light);
    -webkit-overflow-scrolling: touch;
}

.app-data-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    background: #fff;
    font-size: .82rem;
}

    .app-data-table th, .app-data-table td {
        padding: .75rem 1rem;
        border-bottom: 1px solid #e7ebef;
        text-align: left;
        vertical-align: middle;
    }

    .app-data-table thead th {
        color: #3c4554;
        background: #f8fafc;
        font-size: .76rem;
        font-weight: 700;
        white-space: nowrap;
    }

    .app-data-table tbody tr {
        border-left: 3px solid transparent;
    }

        .app-data-table tbody tr:hover {
            background: #f8fbfe;
        }

.app-table-small {
    min-width: 600px;
}

.app-table-medium {
    min-width: 850px;
}

.app-table-large {
    min-width: 1200px;
}

.app-table-xlarge {
    min-width: 1500px;
}

.app-action-column, .app-actions-column {
    width: 110px;
}

.app-link-button {
    padding: 0;
    color: #168be0;
    background: transparent;
    border: 0;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.app-status-badge {
    display: inline-flex;
    align-items: center;
    padding: .35rem .5rem;
    border-radius: 4px;
    font-size: .7rem;
    font-weight: 600;
    line-height: 1.2;
}

.status-green {
    color: #fff;
    background: var(--app-success);
}

.status-blue {
    color: #fff;
    background: #1976d2;
}

.status-red {
    color: #fff;
    background: var(--app-danger);
}

.status-orange {
    color: #fff;
    background: var(--app-warning);
}

.status-grey {
    color: #4e5867;
    background: #e9edf2;
}

.app-row-actions {
    flex-wrap: nowrap;
}

    /* .app-row-actions button {
        display: inline-flex;
        width: 36px;
        height: 32px;
        align-items: center;
        justify-content: center;
        color: #fff;
        background: #168be0;
        border: 0;
        border-radius: 5px;
        cursor: pointer;
    }*/

    .app-row-actions button {
        display: inline-flex;
        width: 36px;
        height: 32px;
        align-items: center;
        justify-content: center;
        color: #ffffff;
        background: #2f8f57;
        border: 0;
        border-radius: 5px;
        cursor: pointer;
    }

        .app-row-actions button:hover {
            background: #267747;
        }

.app-selected-row {
    background: #eef8ff !important;
    border-left-color: var(--app-primary) !important;
}

.app-empty-state {
    height: 160px;
    color: #8791a0;
    text-align: center !important;
}

    .app-empty-state i, .app-empty-state span {
        display: block;
    }

    .app-empty-state i {
        margin-bottom: .65rem;
        font-size: 2rem;
    }

.app-pagination {
    display: flex;
    justify-content: flex-end;
    gap: .25rem;
    padding: 1rem 1.5rem 1.25rem;
}

    .app-pagination button {
        min-width: 36px;
        min-height: 34px;
        color: #505968;
        background: transparent;
        border: 1px solid transparent;
        border-radius: 5px;
        cursor: pointer;
    }

        .app-pagination button.active {
            color: #fff;
            background: var(--app-primary);
        }

        .app-pagination button:disabled {
            cursor: not-allowed;
            opacity: .45;
        }

.app-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(19,27,41,.48);
}

.app-side-panel {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 1050;
    width: min(1180px,94vw);
    height: 100vh;
    overflow-y: auto;
    background: #fff;
    box-shadow: -14px 0 45px rgba(20,30,48,.22);
}

@media (max-width:1200px) {
    .app-grid-5, .app-grid-4 {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }

    .app-grid-3 {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}

@media (max-width:850px) {
    .app-page {
        padding: .75rem;
    }

    .app-page-header, .app-table-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .app-header-actions .btn {
        flex: 1 1 auto;
    }

    .app-grid-5, .app-grid-4, .app-grid-3, .app-grid-2 {
        grid-template-columns: minmax(0,1fr);
    }

    .app-field-full {
        grid-column: auto;
    }

    .app-filter-panel, .app-editor-section {
        margin-right: .75rem;
        margin-left: .75rem;
        padding: .9rem;
    }

    .app-filter-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .app-search-box {
        width: 100%;
    }

    .app-filter-footer .btn {
        width: 100%;
    }

    .app-form-actions label {
        display: none;
    }

    .app-side-panel {
        width: 100vw;
    }
}

/* ============================================================
   Standard action button colours
   Reusable across all Razor pages
   ============================================================ */

.app-btn-view,
.app-btn-new,
.app-btn-save,
.app-btn-edit,
.app-btn-delete,
.app-btn-refresh,
.app-btn-print,
.app-btn-export,
.app-btn-cancel {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 0.95rem;
    border-radius: 6px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

/* View / Search */
.app-btn-view {
    color: #ffffff;
    background: #0d6efd;
    border: 1px solid #0d6efd;
}

    .app-btn-view:hover,
    .app-btn-view:focus {
        color: #ffffff;
        background: #0b5ed7;
        border-color: #0a58ca;
    }

/* New */
.app-btn-new {
    color: #ffffff;
    background: #2f8f57;
    border: 1px solid #2f8f57;
}

    .app-btn-new:hover,
    .app-btn-new:focus {
        color: #ffffff;
        background: #267747;
        border-color: #267747;
    }

/* Save */
.app-btn-save {
    color: #ffffff;
    background: #2f8f57;
    border: 1px solid #2f8f57;
}

    .app-btn-save:hover,
    .app-btn-save:focus {
        color: #ffffff;
        background: #267747;
        border-color: #267747;
    }

/* Edit */
/* Table Edit button */
.app-table-action-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-width: 78px;
    height: 38px;
    padding: 0 14px;
    background: #ffc107; /* Bootstrap warning yellow */
    color: #212529;
    border: 1px solid #e0a800;
    border-radius: 6px;
    font-weight: 600;
    font-size: .95rem;
    transition: all .2s ease;
}

    .app-table-action-edit:hover {
        background: #ffca2c;
        border-color: #d39e00;
        color: #212529;
    }

    .app-table-action-edit i {
        font-size: 15px;
    }
/*.app-btn-edit {
    color: #212529;
    background: #ffc107;
    border: 1px solid #ffc107;
}

    .app-btn-edit:hover,
    .app-btn-edit:focus {
        color: #212529;
        background: #e0a800;
        border-color: #d39e00;
    }*/

/* Delete */
.app-btn-delete {
    color: #ffffff;
    background: #dc3545;
    border: 1px solid #dc3545;
}

    .app-btn-delete:hover,
    .app-btn-delete:focus {
        color: #ffffff;
        background: #bb2d3b;
        border-color: #b02a37;
    }

/* Refresh */
.app-btn-refresh {
    color: #0d6efd;
    background: #ffffff;
    border: 1px solid #0d6efd;
}

    .app-btn-refresh:hover,
    .app-btn-refresh:focus {
        color: #ffffff;
        background: #0d6efd;
    }

/* Print */
.app-btn-print {
    color: #ffffff;
    background: #6c757d;
    border: 1px solid #6c757d;
}

    .app-btn-print:hover,
    .app-btn-print:focus {
        color: #ffffff;
        background: #5c636a;
        border-color: #565e64;
    }

/* Export */
.app-btn-export {
    color: #ffffff;
    background: #2f8f57;
    border: 1px solid #2f8f57;
}

    .app-btn-export:hover,
    .app-btn-export:focus {
        color: #ffffff;
        background: #267747;
        border-color: #267747;
    }

/* Cancel / Close */
.app-btn-cancel {
    color: #495057;
    background: #f8f9fa;
    border: 1px solid #ced4da;
}

    .app-btn-cancel:hover,
    .app-btn-cancel:focus {
        color: #212529;
        background: #e9ecef;
    }

/* Compact action buttons used inside tables */
.app-table-action {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.4rem 0.7rem;
    border-radius: 5px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.app-table-action-edit {
    color: #212529;
    background: #ffc107;
    border: 1px solid #ffc107;
}

    .app-table-action-edit:hover {
        color: #212529;
        background: #e0a800;
    }

.app-table-action-delete {
    color: #ffffff;
    background: #dc3545;
    border: 1px solid #dc3545;
}

    .app-table-action-delete:hover {
        color: #ffffff;
        background: #bb2d3b;
    }

.app-table-action-view {
    color: #ffffff;
    background: #0d6efd;
    border: 1px solid #0d6efd;
}

    .app-table-action-view:hover {
        color: #ffffff;
        background: #0b5ed7;
    }

.app-row-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: nowrap;
}

button:disabled,
.app-btn-view:disabled,
.app-btn-new:disabled,
.app-btn-save:disabled,
.app-btn-edit:disabled,
.app-btn-delete:disabled,
.app-btn-refresh:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* ============================================================
   FINAL TABLE ACTION OVERRIDES
   Keep this at the very bottom of site.css.
   This overrides the older generic .app-row-actions button rule.
   ============================================================ */

.app-row-actions button.app-table-action {
    width: auto;
    min-width: 78px;
    height: 38px;
    padding: 0 14px;
    gap: 0.35rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
}

.app-row-actions button.app-table-action-edit {
    color: #212529;
    background-color: #ffc107;
    border: 1px solid #e0a800;
}

    .app-row-actions button.app-table-action-edit:hover,
    .app-row-actions button.app-table-action-edit:focus {
        color: #212529;
        background-color: #ffca2c;
        border-color: #d39e00;
    }

.app-row-actions button.app-table-action-delete {
    color: #ffffff;
    background-color: #dc3545;
    border: 1px solid #dc3545;
}

.app-row-actions button.app-table-action-view {
    color: #ffffff;
    background-color: #0d6efd;
    border: 1px solid #0d6efd;
}
/* ============================================================
   Reusable layouts for wide data-entry pages
   ============================================================ */

.app-wide-page {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

    .app-wide-page .app-page-card {
        width: 100%;
        min-width: 0;
    }

.app-compact-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.app-filter-action-cell {
    display: flex;
    align-items: end;
    gap: 0.65rem;
}

    .app-filter-action-cell .btn {
        flex: 1 1 0;
    }

.app-tool-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.app-tool-card {
    min-width: 0;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e4e9ef;
    border-radius: 8px;
}

    .app-tool-card h3 {
        margin: 0 0 0.25rem;
        color: #252b38;
        font-size: 0.95rem;
        font-weight: 700;
    }

    .app-tool-card p {
        margin: 0 0 0.8rem;
        color: #7a8494;
        font-size: 0.8rem;
    }

    .app-tool-card .input-group .btn {
        min-width: 72px;
    }

.app-main-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e7ebef;
}

    .app-main-actions .btn {
        min-width: 155px;
    }

.app-contained-table {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

.app-fixed-wide-table {
    width: 100%;
    min-width: 1840px;
    table-layout: fixed;
}

    .app-fixed-wide-table th,
    .app-fixed-wide-table td {
        padding: 0.5rem 0.45rem;
    }

.app-col-check {
    width: 58px;
}

.app-col-id {
    width: 65px;
}

.app-col-small {
    width: 100px;
}

.app-col-medium {
    width: 145px;
}

.app-col-large {
    width: 180px;
}

.app-col-money {
    width: 105px;
}

.app-col-comments {
    width: 180px;
}

.app-fixed-wide-table .form-control,
.app-fixed-wide-table .form-select {
    width: 100%;
    min-width: 0;
    font-size: 0.8rem;
}

.app-readonly-value {
    display: block;
    min-height: 31px;
    padding: 0.4rem 0.5rem;
    background: #f3f6f9;
    border: 1px solid #e2e7ed;
    border-radius: 5px;
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .app-compact-filter-grid,
    .app-tool-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .app-compact-filter-grid,
    .app-tool-card-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-filter-action-cell {
        align-items: stretch;
    }

    .app-main-actions {
        flex-direction: column;
    }

        .app-main-actions .btn {
            width: 100%;
        }
}


/* ============================================================
   Compact Shift Rate Sheet table
   Used by TransactionRateSheet1.razor
   ============================================================ */

.app-rate-sheet1-wrapper {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

.app-rate-sheet1-table {
    width: 100%;
    min-width: 1520px;
    table-layout: fixed;
}

    .app-rate-sheet1-table th,
    .app-rate-sheet1-table td {
        padding: 0.45rem 0.35rem;
    }

    .app-rate-sheet1-table .form-control,
    .app-rate-sheet1-table .form-select {
        width: 100%;
        min-width: 0;
        height: 34px;
        padding: 0.3rem 0.4rem;
        font-size: 0.79rem;
    }

.app-rs1-select {
    width: 65px;
}

.app-rs1-id {
    width: 72px;
}

.app-rs1-client {
    width: 185px;
}

.app-rs1-job {
    width: 125px;
}

.app-rs1-shift {
    width: 165px;
}

.app-rs1-band {
    width: 105px;
}

.app-rs1-money {
    width: 100px;
}

.app-rs1-miles {
    width: 85px;
}

.app-rs1-comments {
    width: 170px;
}

@media (max-width: 850px) {
    .app-rate-sheet1-table {
        min-width: 1450px;
    }
}
/* Employee Details */

.employee-search-row {
    display: flex;
    align-items: end;
    gap: .75rem;
    margin-top: .85rem;
}

.employee-search-box {
    flex: 1 1 auto;
}

.employee-filter-actions {
    display: flex;
    gap: .55rem;
}

.employee-list-wrapper {
    overflow-x: auto;
}

.employee-list-table {
    min-width: 1180px;
    table-layout: fixed;
}

    .employee-list-table th:nth-child(1) {
        width: 60px;
    }

    .employee-list-table th:nth-child(2) {
        width: 90px;
    }

    .employee-list-table th:nth-child(3) {
        width: 180px;
    }

    .employee-list-table th:nth-child(4) {
        width: 150px;
    }

    .employee-list-table th:nth-child(5) {
        width: 130px;
    }

    .employee-list-table th:nth-child(6) {
        width: 130px;
    }

    .employee-list-table th:nth-child(7) {
        width: 95px;
    }

    .employee-list-table th:nth-child(8) {
        width: 115px;
    }

    .employee-list-table th:nth-child(9) {
        width: 180px;
    }

    .employee-list-table th:nth-child(10) {
        width: 95px;
    }

    .employee-list-table th:nth-child(11) {
        width: 90px;
    }

.employee-tabs {
    display: flex;
    gap: .35rem;
    overflow-x: auto;
    margin-bottom: 1rem;
    padding-bottom: .25rem;
}

.employee-tab-button {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-width: max-content;
    padding: .55rem .8rem;
    color: #465266;
    background: #f4f7fa;
    border: 1px solid #dde4eb;
    border-radius: 6px;
    font-size: .82rem;
    font-weight: 600;
}

    .employee-tab-button.active {
        color: #fff;
        background: #2874f0;
        border-color: #2874f0;
    }

.employee-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 1rem;
}

.employee-photo-panel {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: .65rem;
}

.employee-photo-preview,
.employee-photo-placeholder {
    width: 100%;
    height: 270px;
    object-fit: cover;
    border: 1px solid #dce3ea;
    border-radius: 8px;
}

.employee-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: .5rem;
    color: #8a94a3;
    background: #f6f8fa;
    font-size: 2.5rem;
}

    .employee-photo-placeholder span {
        font-size: .8rem;
    }

.employee-related-list {
    display: grid;
    gap: .55rem;
}

.employee-related-row {
    display: grid;
    grid-template-columns: 32px repeat(6, minmax(0, 1fr));
    gap: .45rem;
    align-items: center;
}

.employee-related-wide {
    grid-column: span 5;
}

.employee-related-status {
    grid-column: span 1;
}

.employee-document-list {
    display: grid;
    gap: .5rem;
}

.employee-document-row {
    display: grid;
    grid-template-columns: 35px minmax(0, 1fr) 120px 70px;
    gap: .5rem;
    align-items: center;
    padding: .6rem;
    background: #f8fafc;
    border: 1px solid #e2e7ed;
    border-radius: 6px;
}

.employee-document-upload {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px auto;
    gap: .6rem;
    margin-top: .75rem;
}

@media (max-width: 1000px) {
    .employee-form-layout {
        grid-template-columns: 1fr;
    }

    .employee-photo-panel {
        max-width: 300px;
    }

    .employee-related-row {
        grid-template-columns: 32px repeat(2, minmax(0, 1fr));
    }

    .employee-related-wide {
        grid-column: span 1;
    }
}

@@media (max-width: 700px) {
    .employee-search-row,
    .employee-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

        .employee-filter-actions .btn {
            width: 100%;
        }

    .employee-related-row,
    .employee-document-upload,
    .employee-document-row {
        grid-template-columns: 1fr;
    }
}

@@media print {
    body * {
        visibility: hidden;
    }

    #employee-list-print,
    #employee-list-print * {
        visibility: visible;
    }

    #employee-list-print {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}

