@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600&family=DM+Sans:wght@400;500&display=swap');

h1:focus {
    outline: none;
}

html, body {
    height: 100%;
    margin: 0;
}

.os-desktop {
    min-height: 100vh;
    padding-bottom: 48px;
    box-sizing: border-box;
    display: flow-root;
    background: url('images/background_color1.webp') center center / cover no-repeat fixed;
}

.taskbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 48px;
    display: flex;
    align-items: stretch;
    background: #232F3B;
    border-top: 1px solid #46586A;
    color: #ECE5D6;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    z-index: 1000;
}

.taskbar-start {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 0.85rem;
}

    .taskbar-start:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .taskbar-start:active {
        background: rgba(255, 255, 255, 0.18);
    }

.taskbar-tray {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    overflow-x: auto;
}

.taskbar-clock {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    padding: 0 16px;
    line-height: 1.2;
    font-size: 0.8rem;
    white-space: nowrap;
}

.taskbar-time {
    font-size: 0.85rem;
}

.taskbar-date {
    font-size: 0.75rem;
    opacity: 0.85;
}

.taskbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border-left: 1px solid #46586A;
    font-size: 0.8rem;
    white-space: nowrap;
}

.taskbar-logout-form {
    display: inline;
}

.taskbar-logout {
    background: transparent;
    border: 1px solid #46586A;
    border-radius: 4px;
    color: inherit;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 4px 10px;
}

    .taskbar-logout:hover {
        background: rgba(255, 255, 255, 0.1);
    }

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('images/background_color1.webp') center center / cover no-repeat fixed;
    font-family: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

.auth-card {
    background: #232F3B;
    border: 1px solid #46586A;
    color: #ECE5D6;
    border-radius: 8px;
    padding: 32px 40px;
    width: 360px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

    .auth-card h1 {
        font-family: "Space Grotesk", sans-serif;
        margin: 0 0 20px;
        font-size: 1.5rem;
    }

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

    .auth-form label {
        display: flex;
        flex-direction: column;
        gap: 4px;
        font-size: 0.85rem;
    }

    .auth-form input,
    .auth-form select {
        background: #ECE5D6;
        border: 1px solid #CDBFA3;
        border-radius: 4px;
        color: #232F3B;
        padding: 8px 10px;
        font-size: 0.9rem;
        font-family: inherit;
    }

.auth-btn {
    display: block;
    text-align: center;
    background: #46586A;
    border: 1px solid #46586A;
    border-radius: 4px;
    color: #ECE5D6;
    cursor: pointer;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-family: inherit;
    text-decoration: none;
}

    .auth-btn:hover {
        background: #56697d;
        color: #ECE5D6;
    }

.auth-btn-google {
    background: transparent;
    border-color: #8D9A8C;
}

    .auth-btn-google:hover {
        background: rgba(141, 154, 140, 0.2);
    }

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #8D9A8C;
    font-size: 0.75rem;
    margin: 16px 0;
}

    .auth-divider::before,
    .auth-divider::after {
        content: "";
        flex: 1;
        border-bottom: 1px solid #46586A;
    }

    .auth-divider span {
        padding: 0 10px;
    }

.auth-error {
    color: #E57373;
    font-size: 0.85rem;
}

.auth-success {
    color: #8D9A8C;
    font-size: 0.85rem;
}

.auth-info {
    color: #ECE5D6;
    font-size: 0.9rem;
    line-height: 1.5;
}

    .auth-info a {
        color: #8D9A8C;
    }

.auth-footer {
    margin-top: 18px;
    font-size: 0.8rem;
    text-align: center;
}

    .auth-footer a {
        color: #ECE5D6;
    }

.apps-dialog-backdrop {
    position: fixed;
    inset: 0;
    bottom: 48px;
    background: transparent;
    z-index: 999;
}

.apps-dialog {
    position: fixed;
    left: 50%;
    bottom: 48px;
    width: 75vw;
    max-width: 900px;
    height: 70vh;
    max-height: 640px;
    display: flex;
    flex-direction: column;
    background: #232F3B;
    border: 1px solid #46586A;
    border-radius: 8px 8px 0 0;
    color: #ECE5D6;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 1001;
    overflow: hidden;
    transform: translate(-50%, 100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(.16, .84, .44, 1), opacity 0.2s ease, visibility 0s linear 0.28s;
}

    .apps-dialog.open {
        transform: translate(-50%, 0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition: transform 0.28s cubic-bezier(.16, .84, .44, 1), opacity 0.2s ease;
    }

.apps-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 8px 10px 16px;
    border-bottom: 1px solid #46586A;
}

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

.apps-dialog-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: inherit;
    cursor: pointer;
}

    .apps-dialog-close:hover {
        background: rgba(255, 255, 255, 0.12);
    }

    .apps-dialog-close:active {
        background: rgba(255, 255, 255, 0.2);
    }

.apps-dialog-body {
    flex: 1 1 auto;
    padding: 16px;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 8px;
}

.app-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 76px;
    padding: 10px 4px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: inherit;
    cursor: pointer;
    font-size: 0.75rem;
}

    .app-tile:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .app-tile:active {
        background: rgba(255, 255, 255, 0.18);
    }

.taskbar-window-button {
    display: flex;
    align-items: center;
    height: 32px;
    margin: 8px 4px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    border-radius: 4px;
    color: inherit;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: inherit;
}

    .taskbar-window-button:hover {
        background: rgba(255, 255, 255, 0.14);
    }

    .taskbar-window-button.active {
        background: rgba(255, 255, 255, 0.2);
        border-bottom: 2px solid #ffffff;
    }

.app-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75vw;
    height: 75vh;
    display: flex;
    flex-direction: column;
    background: #232F3B;
    border: 1px solid #46586A;
    border-radius: 8px;
    color: #ECE5D6;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 500;
}

    .app-window.maximized {
        top: 0;
        left: 0;
        transform: none;
        width: 100vw;
        height: calc(100vh - 48px);
        border-radius: 0;
        border: none;
    }

    .app-window.minimized {
        display: none;
    }

.app-window-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
}

.app-window-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 8px 10px 16px;
    border-bottom: 1px solid #46586A;
    cursor: move;
    touch-action: none;
    user-select: none;
}

.app-window-title-group {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

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

.app-window-controls {
    display: flex;
    gap: 4px;
}

.app-window-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: inherit;
    cursor: pointer;
}

    .app-window-btn:hover {
        background: rgba(255, 255, 255, 0.12);
    }

    .app-window-btn:active {
        background: rgba(255, 255, 255, 0.2);
    }

    .app-window-btn-close:hover {
        background: rgba(220, 50, 50, 0.6);
    }

.app-window-menubar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px 8px;
    border-bottom: 1px solid #46586A;
    user-select: none;
}

.app-window-menu {
    position: relative;
}

.app-window-menu-btn {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
}

    .app-window-menu-btn:hover,
    .app-window-menu-btn.open {
        background: rgba(255, 255, 255, 0.12);
    }

.app-window-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    min-width: 160px;
    margin-top: 2px;
    background: #232F3B;
    border: 1px solid #46586A;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    padding: 4px;
}

.app-window-menu-item {
    text-align: left;
    background: transparent;
    border: none;
    color: inherit;
    font-size: 0.85rem;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
}

    .app-window-menu-item:hover {
        background: rgba(255, 255, 255, 0.12);
    }

.app-window-body {
    position: relative;
    flex: 1 1 auto;
    padding: 16px;
    overflow: auto;
}

.resize-handle {
    position: absolute;
    z-index: 10;
    touch-action: none;
}

.resize-handle-n, .resize-handle-s {
    left: 8px;
    right: 8px;
    height: 8px;
    cursor: ns-resize;
}

.resize-handle-n {
    top: 0;
}

.resize-handle-s {
    bottom: 0;
}

.resize-handle-e, .resize-handle-w {
    top: 8px;
    bottom: 8px;
    width: 8px;
    cursor: ew-resize;
}

.resize-handle-e {
    right: 0;
}

.resize-handle-w {
    left: 0;
}

.resize-handle-ne, .resize-handle-nw, .resize-handle-se, .resize-handle-sw {
    width: 14px;
    height: 14px;
}

.resize-handle-ne {
    top: 0;
    right: 0;
    cursor: nesw-resize;
}

.resize-handle-nw {
    top: 0;
    left: 0;
    cursor: nwse-resize;
}

.resize-handle-se {
    bottom: 0;
    right: 0;
    cursor: nwse-resize;
}

.resize-handle-sw {
    bottom: 0;
    left: 0;
    cursor: nesw-resize;
}

.app-window.maximized .resize-handle {
    display: none;
}

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

.invalid {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4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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;
}