:root,
[data-bs-theme="light"] {
    --giro-primary: #7C3AED;
    --giro-success: #10B981;
    --giro-danger: #EF4444;
    --giro-warning: #F59E0B;

    --bs-primary: #7C3AED;
    --bs-primary-rgb: 124, 58, 237;
    --bs-success: #10B981;
    --bs-success-rgb: 16, 185, 129;
    --bs-danger: #EF4444;
    --bs-danger-rgb: 239, 68, 68;
    --bs-warning: #F59E0B;
    --bs-warning-rgb: 245, 158, 11;
    --bs-link-color: #7C3AED;
    --bs-link-hover-color: #6D28D9;

    --ins-primary: #7C3AED;
    --ins-primary-rgb: 124, 58, 237;
    --ins-primary-text-emphasis: #6D28D9;
    --ins-primary-bg-subtle: #F4EEFA;
    --ins-primary-border-subtle: #E9DDF8;
    --ins-success: #10B981;
    --ins-success-rgb: 16, 185, 129;
    --ins-danger: #EF4444;
    --ins-danger-rgb: 239, 68, 68;
    --ins-warning: #F59E0B;
    --ins-warning-rgb: 245, 158, 11;
    --ins-link-color: #7C3AED;
    --ins-link-hover-color: #6D28D9;
    --ins-nav-pills-link-active-bg: #7C3AED;
    --bs-secondary-color: #5b6573;
    --ins-secondary-color: #5b6573;
    --giro-muted-text: #5b6573;
}

.btn-primary {
    --ins-btn-bg: var(--giro-primary);
    --ins-btn-border-color: var(--giro-primary);
    --ins-btn-hover-bg: #6D28D9;
    --ins-btn-hover-border-color: #6D28D9;
    --ins-btn-active-bg: #5B21B6;
    --ins-btn-active-border-color: #5B21B6;
    --ins-btn-disabled-bg: var(--giro-primary);
    --ins-btn-disabled-border-color: var(--giro-primary);
    --bs-btn-bg: var(--giro-primary);
    --bs-btn-border-color: var(--giro-primary);
    --bs-btn-hover-bg: #6D28D9;
    --bs-btn-hover-border-color: #6D28D9;
    --bs-btn-active-bg: #5B21B6;
    --bs-btn-active-border-color: #5B21B6;
    --bs-btn-disabled-bg: var(--giro-primary);
    --bs-btn-disabled-border-color: var(--giro-primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    background-color: #6D28D9;
    border-color: #6D28D9;
}

.btn-primary:disabled,
.btn-primary.disabled {
    background-color: var(--giro-primary);
    border-color: var(--giro-primary);
    opacity: 0.65;
}

.btn-success {
    --ins-btn-bg: var(--giro-success);
    --ins-btn-border-color: var(--giro-success);
    --ins-btn-hover-bg: #059669;
    --ins-btn-hover-border-color: #059669;
    --ins-btn-active-bg: #047857;
    --ins-btn-active-border-color: #047857;
    --bs-btn-bg: var(--giro-success);
    --bs-btn-border-color: var(--giro-success);
    --bs-btn-hover-bg: #059669;
    --bs-btn-hover-border-color: #059669;
    --bs-btn-active-bg: #047857;
    --bs-btn-active-border-color: #047857;
}

.btn-outline-danger {
    --bs-btn-color: var(--giro-danger);
    --bs-btn-border-color: var(--giro-danger);
    --bs-btn-hover-bg: var(--giro-danger);
    --bs-btn-hover-border-color: var(--giro-danger);
    --bs-btn-active-bg: var(--giro-danger);
    --bs-btn-active-border-color: var(--giro-danger);
}

.btn:focus-visible,
.page-link:focus-visible,
.nav-link:focus-visible,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(124, 58, 237, 0.25);
}

.content-page .text-muted,
.auth-box .text-muted,
.seller-settings-form .text-muted,
.form-text,
small.text-muted,
.table thead th,
.dashboard-stat-card h6.text-muted,
.dashboard-stat-card small.text-muted {
    color: var(--giro-muted-text) !important;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.topbar-link:focus-visible,
.side-nav-link:focus-visible,
.page-link:focus-visible,
.nav-link:focus-visible,
.dropdown-item:focus-visible,
.form-check-input:focus-visible {
    outline: 2px solid var(--giro-primary);
    outline-offset: 2px;
}

.app-topbar .btn:focus-visible,
.app-topbar .topbar-link:focus-visible {
    outline-color: #fff;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.55);
}

.btn-success:focus-visible {
    outline-color: #059669;
}

.form-control:focus-visible,
.form-select:focus-visible {
    outline: 2px solid var(--giro-primary);
    outline-offset: 0;
}

.page-item.active .page-link {
    background-color: var(--giro-primary);
    border-color: var(--giro-primary);
}

.page-link {
    color: var(--giro-primary);
}

.page-link:hover {
    color: #6D28D9;
}

.sidenav-menu .side-nav-link.active,
.sidenav-menu .side-nav-link:hover,
.sidenav-menu .side-nav-item.active > .side-nav-link {
    color: var(--giro-primary);
}

.sidenav-menu .side-nav-item.active > .side-nav-link,
.sidenav-menu .side-nav-link.active {
    background-color: var(--ins-primary-bg-subtle);
}

a {
    color: var(--giro-primary);
}

a:hover {
    color: #6D28D9;
}

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

.bg-primary {
    background-color: var(--giro-primary) !important;
}

.border-primary {
    border-color: var(--giro-primary) !important;
}

.badge.bg-primary {
    background-color: var(--giro-primary) !important;
}

.form-check-input:checked {
    background-color: var(--giro-primary);
    border-color: var(--giro-primary);
}

.progress-bar {
    background-color: var(--giro-primary);
}

.nav-pills .nav-link.active {
    background-color: var(--giro-primary);
}

.panel-empty-state .btn {
    min-width: 10rem;
}

.seller-settings-form {
    padding-bottom: 5.5rem;
}

.settings-save-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1035;
    background: rgba(var(--ins-body-bg-rgb, 255, 255, 255), 0.97);
    border-top: 1px solid var(--ins-border-color, #e9ecef);
    box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.08);
    padding: 0.875rem 0;
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.settings-save-bar.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.settings-save-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 575.98px) {
    .settings-save-bar__inner {
        flex-direction: column;
        align-items: stretch;
    }

    .settings-save-bar__actions {
        width: 100%;
    }

    .settings-save-bar__actions .btn {
        flex: 1 1 auto;
    }
}

.auth-brand-panel {
    background: #3b0764;
    min-height: 100%;
}

.auth-brand-panel__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 28%;
}

.auth-brand-panel__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(49, 16, 80, 0.88), rgba(49, 58, 70, 0.62), rgba(76, 29, 149, 0.38));
    pointer-events: none;
}

.auth-brand-panel__content {
    position: relative;
    z-index: 1;
    height: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    color: #fff;
}

.auth-brand-panel__logo img {
    display: block;
    filter: brightness(0) invert(1);
}

.auth-brand-panel__tagline {
    margin: 1.5rem 0 0;
    max-width: 18rem;
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 600;
    line-height: 1.45;
}

.auth-box-form .btn-primary {
    background-color: var(--giro-primary, #7C3AED);
    border-color: var(--giro-primary, #7C3AED);
}

.auth-box-form .btn-primary:hover,
.auth-box-form .btn-primary:focus {
    background-color: #6D28D9;
    border-color: #6D28D9;
}

.datatable-wrapper table.dataTable thead .sorting:before,
.datatable-wrapper table.dataTable thead .sorting:after,
.datatable-wrapper table.dataTable thead .sorting_asc:before,
.datatable-wrapper table.dataTable thead .sorting_desc:after {
    color: var(--giro-primary);
}
