﻿:root {
    --site-font-family: "Segoe UI", Arial, sans-serif;
    --site-body-bg: #ffffff;
    --site-surface-bg: #ffffff;
    --site-muted-bg: #f7f8fa;
    --site-text-color: #1f2937;
    --site-muted-color: #6b7280;
    --site-border-color: #e5e7eb;
    --site-primary-color: #1f4f46;
    --site-primary-hover-color: #173e37;
    --site-success-color: #198754;
    --site-success-soft-color: #eaf7ef;
    --site-danger-color: #dc3545;
    --site-danger-soft-color: #fcebed;
    --site-warning-color: #d97706;
    --site-warning-soft-color: #fff5df;
    --site-info-color: #0d6efd;
    --site-info-soft-color: #eaf2ff;
    --site-container-width: 1320px;
    --site-radius-sm: 6px;
    --site-radius-md: 10px;
    --site-radius-lg: 16px;
    --site-shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.06);
    --site-shadow-md: 0 12px 30px rgba(15, 23, 42, 0.12);
    --site-transition: 180ms ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background-color: var(--site-body-bg);
    color: var(--site-text-color);
    font-family: var(--site-font-family);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

    body.is-scroll-locked {
        overflow: hidden;
    }

img {
    display: block;
    max-width: 100%;
    height: auto;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

    a:hover {
        color: inherit;
        text-decoration: none;
    }

button {
    border: 0;
}

.site-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
}

.site-header {
    position: relative;
    width: 100%;
    z-index: 1000;
}

.site-main {
    flex: 1 0 auto;
    width: 100%;
    min-width: 0;
}

.site-footer {
    flex-shrink: 0;
    width: 100%;
}

.site-container {
    width: 100%;
    max-width: var(--site-container-width);
    margin-right: auto;
    margin-left: auto;
    padding-right: 20px;
    padding-left: 20px;
}

.global-spinner {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    z-index: 10000;
    transition: opacity var(--site-transition), visibility var(--site-transition);
}

    .global-spinner.is-visible {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

.global-spinner__backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.global-spinner__panel {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 240px;
    max-width: calc(100% - 40px);
    padding: 18px 22px;
    border: 1px solid var(--site-border-color);
    border-radius: var(--site-radius-md);
    background-color: var(--site-surface-bg);
    box-shadow: var(--site-shadow-md);
}

.global-spinner__icon {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    color: var(--site-primary-color);
}

.global-spinner__message {
    color: var(--site-text-color);
    font-size: 14px;
    font-weight: 600;
}

#appToastContainer {
    position: fixed;
    right: 20px;
    bottom: 20px;
    left: auto;
    top: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    width: auto;
    max-width: calc(100vw - 40px);
    padding: 0;
    z-index: 11000;
    pointer-events: none;
}

.app-toast {
    position: relative;
    width: 370px;
    max-width: calc(100vw - 40px);
    overflow: hidden;
    border: 1px solid var(--site-border-color);
    border-radius: var(--site-radius-md);
    background-color: var(--site-surface-bg);
    box-shadow: var(--site-shadow-md);
    pointer-events: auto;
}

    .app-toast::before {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 4px;
        content: "";
        background-color: var(--site-info-color);
    }

.app-toast--success::before {
    background-color: var(--site-success-color);
}

.app-toast--danger::before {
    background-color: var(--site-danger-color);
}

.app-toast--warning::before {
    background-color: var(--site-warning-color);
}

.app-toast--info::before {
    background-color: var(--site-info-color);
}

.app-toast .toast-header {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 10px 12px 8px 16px;
    border: 0;
    background-color: transparent;
    color: var(--site-text-color);
}

    .app-toast .toast-header strong {
        flex: 1 1 auto;
        min-width: 0;
        margin: 0;
        color: var(--site-text-color);
        font-size: 14px;
        font-weight: 700;
        line-height: 1.3;
    }

.app-toast .toast-body {
    padding: 0 42px 14px 58px;
    color: var(--site-muted-color);
    font-size: 14px;
    line-height: 1.45;
    word-break: break-word;
}

.app-toast__icon {
    display: inline-flex;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--site-info-soft-color);
    color: var(--site-info-color);
    font-size: 16px;
}

.app-toast--success .app-toast__icon {
    background-color: var(--site-success-soft-color);
    color: var(--site-success-color);
}

.app-toast--danger .app-toast__icon {
    background-color: var(--site-danger-soft-color);
    color: var(--site-danger-color);
}

.app-toast--warning .app-toast__icon {
    background-color: var(--site-warning-soft-color);
    color: var(--site-warning-color);
}

.app-toast--info .app-toast__icon {
    background-color: var(--site-info-soft-color);
    color: var(--site-info-color);
}

.app-toast .btn-close {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 6px;
    border-radius: 50%;
    background-size: 10px;
    opacity: 0.55;
    transition: background-color var(--site-transition), opacity var(--site-transition);
}

    .app-toast .btn-close:hover {
        background-color: var(--site-muted-bg);
        opacity: 0.9;
    }

    .app-toast .btn-close:focus {
        box-shadow: 0 0 0 3px rgba(31, 79, 70, 0.15);
        opacity: 1;
    }

.app-toast.showing {
    animation: appToastShow 220ms ease both;
}

.app-toast.hide {
    animation: appToastHide 180ms ease both;
}

@keyframes appToastShow {
    from {
        opacity: 0;
        transform: translate3d(18px, 12px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes appToastHide {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }

    to {
        opacity: 0;
        transform: translate3d(18px, 8px, 0);
    }
}

@media (max-width: 991.98px) {
    .site-container {
        padding-right: 18px;
        padding-left: 18px;
    }

    #appToastContainer {
        right: 16px;
        bottom: 16px;
        max-width: calc(100vw - 32px);
    }

    .app-toast {
        width: 350px;
        max-width: calc(100vw - 32px);
    }
}

@media (max-width: 767.98px) {
    .site-container {
        padding-right: 16px;
        padding-left: 16px;
    }

    .global-spinner__panel {
        width: calc(100% - 32px);
        min-width: 0;
        padding: 16px 18px;
    }

    #appToastContainer {
        right: 12px;
        bottom: 12px;
        left: 12px;
        align-items: stretch;
        width: auto;
        max-width: none;
    }

    .app-toast {
        width: 100%;
        max-width: none;
    }

        .app-toast .toast-header {
            padding-right: 10px;
            padding-left: 14px;
        }

        .app-toast .toast-body {
            padding-right: 38px;
            padding-bottom: 13px;
            padding-left: 56px;
            font-size: 13px;
        }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
