:root {
    --erp-primary: #3157d5;
    --erp-primary-dark: #223d98;
}

body {
    min-height: 100vh;
}

.btn-primary {
    --bs-btn-bg: var(--erp-primary);
    --bs-btn-border-color: var(--erp-primary);
    --bs-btn-hover-bg: var(--erp-primary-dark);
    --bs-btn-hover-border-color: var(--erp-primary-dark);
}

.text-primary {
    color: var(--erp-primary) !important;
}

.auth-shell {
    align-items: center;
    background:
        radial-gradient(circle at 15% 10%, rgb(49 87 213 / 24%), transparent 32rem),
        linear-gradient(145deg, #f8f9fc, #e9edf7);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.auth-card {
    max-width: 30rem;
    width: 100%;
}

.brand-mark {
    align-items: center;
    background: var(--erp-primary);
    border-radius: 0.8rem;
    color: #fff;
    display: inline-flex;
    font-size: 1rem;
    font-weight: 700;
    height: 3rem;
    justify-content: center;
    letter-spacing: 0.08em;
    width: 3rem;
}

.navbar .nav-link.active {
    font-weight: 600;
}

code {
    color: var(--erp-primary-dark);
}

.table > :not(caption) > * > * {
    padding: 0.9rem 1rem;
}

fieldset {
    min-width: 0;
}

.configuration-card {
    background:
        linear-gradient(145deg, rgb(49 87 213 / 5%), transparent 48%),
        var(--bs-body-bg);
    color: inherit;
    transition: box-shadow 160ms ease, transform 160ms ease;
}

.configuration-card:hover {
    box-shadow: 0 1rem 2.5rem rgb(15 23 42 / 12%) !important;
    transform: translateY(-2px);
}

.configuration-card__arrow {
    align-items: center;
    background: rgb(49 87 213 / 12%);
    border-radius: 50%;
    color: var(--erp-primary);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.25rem;
    height: 2.5rem;
    justify-content: center;
    width: 2.5rem;
}

.configuration-details dt,
.configuration-details dd {
    border-bottom: 1px solid var(--bs-border-color);
}

.configuration-details dt:last-of-type,
.configuration-details dd:last-of-type {
    border-bottom: 0;
}

.configuration-empty {
    background:
        radial-gradient(circle at 50% 0%, rgb(49 87 213 / 12%), transparent 24rem),
        var(--bs-body-bg);
}

.configuration-sort {
    color: inherit;
    text-decoration: none;
}

.configuration-sort:hover {
    color: var(--erp-primary);
}

.dashboard-catalogue {
    background:
        linear-gradient(135deg, rgb(49 87 213 / 8%), transparent 45%),
        var(--bs-body-bg);
}

.dashboard-catalogue__empty {
    background: rgb(49 87 213 / 6%);
    border: 1px dashed rgb(49 87 213 / 30%);
    border-radius: 0.75rem;
    color: var(--bs-secondary-color);
    padding: 1rem;
}

.dashboard-empty {
    background:
        radial-gradient(circle at 50% 0%, rgb(49 87 213 / 12%), transparent 24rem),
        var(--bs-body-bg);
    min-height: 23rem;
}

.dashboard-empty__icon,
.dashboard-widget__icon {
    align-items: center;
    background: rgb(49 87 213 / 12%);
    border-radius: 1rem;
    color: var(--erp-primary);
    display: flex;
    justify-content: center;
}

.dashboard-empty__icon {
    height: 4.5rem;
    width: 4.5rem;
}

.dashboard-empty__message {
    max-width: 34rem;
}

.dashboard-widget {
    background:
        linear-gradient(145deg, rgb(49 87 213 / 5%), transparent 42%),
        var(--bs-body-bg);
    min-height: 19rem;
    transition: box-shadow 160ms ease, transform 160ms ease;
}

.dashboard-widget:hover {
    box-shadow: 0 1rem 2.5rem rgb(15 23 42 / 12%) !important;
    transform: translateY(-2px);
}

.dashboard-widget__icon {
    flex: 0 0 auto;
    height: 3.25rem;
    width: 3.25rem;
}

.dashboard-widget-editor {
    border: 1px dashed rgb(49 87 213 / 45%);
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    padding: 0.65rem;
}

.dashboard-widget-editor__toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.15rem 0.15rem 0.75rem;
}

.dashboard-widget-editor__preview {
    flex: 1;
    min-height: 0;
    pointer-events: none;
}

.dashboard-widget-editor__size {
    min-width: 6.75rem;
}

.erp-dialog .modal-dialog {
    max-width: 34rem;
}

.erp-dialog .modal-content {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 1.5rem 4rem rgb(15 23 42 / 28%);
    overflow: hidden;
}

.erp-dialog__accent {
    background: var(--erp-primary);
    height: 0.3rem;
}

.erp-dialog__icon {
    align-items: center;
    background: rgb(49 87 213 / 12%);
    border-radius: 50%;
    color: var(--erp-primary);
    display: inline-flex;
    height: 3.25rem;
    justify-content: center;
    width: 3.25rem;
}

.erp-dialog__eyebrow {
    color: var(--erp-primary);
    letter-spacing: 0.06em;
}

.erp-dialog[data-tone="danger"] .erp-dialog__accent {
    background: var(--bs-danger);
}

.erp-dialog[data-tone="danger"] .erp-dialog__icon {
    background: rgb(220 53 69 / 12%);
    color: var(--bs-danger);
}

.erp-dialog[data-tone="danger"] .erp-dialog__eyebrow {
    color: var(--bs-danger);
}

.erp-dialog[data-tone="warning"] .erp-dialog__accent {
    background: var(--bs-warning);
}

.erp-dialog[data-tone="warning"] .erp-dialog__icon {
    background: rgb(255 193 7 / 18%);
    color: #8a6500;
}

.erp-dialog[data-tone="warning"] .erp-dialog__eyebrow {
    color: #755700;
}

.erp-dialog[data-tone="success"] .erp-dialog__accent {
    background: var(--bs-success);
}

.erp-dialog[data-tone="success"] .erp-dialog__icon {
    background: rgb(25 135 84 / 12%);
    color: var(--bs-success);
}

.erp-dialog[data-tone="success"] .erp-dialog__eyebrow {
    color: var(--bs-success);
}

.modal-backdrop.show {
    backdrop-filter: blur(3px);
    background-color: #0f172a;
    opacity: 0.68;
}

@media (max-width: 575.98px) {
    .dashboard-widget-editor__toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-widget-editor__toolbar > div {
        justify-content: flex-start;
    }

    .erp-dialog .modal-dialog {
        margin: 1rem;
    }

    .erp-dialog .modal-footer {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .erp-dialog .modal-footer .btn {
        margin: 0;
        width: 100%;
    }
}
