:root {
    --backend-ink: #111827;
    --backend-muted: #64748b;
    --backend-card: rgba(255, 255, 255, 0.94);
    --backend-shell: #f4f7fb;
    --backend-accent: #0f766e;
    --backend-accent-2: #2563eb;
}

body.backend-shell {
    min-height: 100vh;
    color: var(--backend-ink);
    background:
        radial-gradient(circle at 18% 10%, rgba(14, 165, 233, 0.14), transparent 28rem),
        radial-gradient(circle at 88% 4%, rgba(20, 184, 166, 0.14), transparent 26rem),
        linear-gradient(135deg, #f8fbff 0%, var(--backend-shell) 45%, #eef6f4 100%);
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

.backend-frame {
    background: transparent !important;
}

.backend-main {
    min-width: 0;
}

.backend-content {
    width: 100%;
    max-width: 1520px;
}

.backend-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 118, 110, 0.34) transparent;
}

.backend-sidebar {
    color: #e5eef8;
    background:
        linear-gradient(155deg, rgba(17, 24, 39, 0.98) 0%, rgba(15, 118, 110, 0.94) 58%, rgba(37, 99, 235, 0.92) 125%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 20px 0 55px rgba(15, 23, 42, 0.18);
}

.backend-sidebar-inner {
    position: relative;
    min-height: 100%;
}

.backend-sidebar-inner::before {
    position: absolute;
    inset: 0;
    pointer-events: none;
    content: "";
    background:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 70%);
}

.backend-brand {
    position: relative;
    z-index: 1;
    gap: 0.9rem;
    margin: 0 1rem 1rem;
    padding: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
}

.backend-brand-logo {
    flex: 0 0 auto;
    padding: 0.35rem;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.24);
}

.backend-brand p:first-child {
    overflow: hidden;
    font-size: 1rem;
    line-height: 1.25rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.backend-sidebar ul.mt-6 {
    position: relative;
    z-index: 1;
    margin-top: 0.75rem;
    padding: 0 0.65rem 1.25rem;
}

.backend-menu-link,
.backend-menu-group-trigger {
    min-height: 2.65rem;
    border-radius: 14px;
    color: rgba(241, 245, 249, 0.82) !important;
}

.backend-menu-link {
    padding: 0.72rem 0.85rem;
}

.backend-menu-link svg,
.backend-menu-group-trigger svg {
    opacity: 0.84;
    transition: transform 160ms ease, opacity 160ms ease;
}

.backend-menu-link:hover,
.backend-menu-group-trigger:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.12);
}

.backend-menu-link:hover svg,
.backend-menu-group-trigger:hover svg {
    opacity: 1;
    transform: translateX(2px);
}

.backend-menu-link.is-active {
    color: #fff !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.11));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 12px 26px rgba(15, 23, 42, 0.18);
}

.backend-menu-active {
    background: #5eead4 !important;
    box-shadow: 0 0 18px rgba(94, 234, 212, 0.8);
}

.backend-menu-group {
    margin: 0.2rem 0;
}

.backend-menu-group-body {
    margin: 0.2rem 0.2rem 0.45rem 0.75rem;
    padding: 0.25rem 0;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 0 14px 14px 0;
    background: rgba(15, 23, 42, 0.18);
}

.backend-topbar {
    margin: 1rem 1rem 0;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

.backend-icon-btn {
    width: 2.35rem;
    height: 2.35rem;
    color: #334155;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.backend-icon-btn:hover {
    color: var(--backend-accent);
    border-color: rgba(15, 118, 110, 0.26);
}

.backend-profile-name {
    max-width: 14rem;
    overflow: hidden;
    color: #334155;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.backend-avatar {
    border: 2px solid #fff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
}

.backend-profile-menu {
    border-radius: 16px !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.16) !important;
}

.backend-page {
    animation: backendFadeIn 220ms ease-out;
}

.backend-page-header {
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.78)),
        linear-gradient(90deg, rgba(20, 184, 166, 0.1), rgba(37, 99, 235, 0.1));
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.backend-page-header h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.45rem, 2vw, 2.15rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0;
}

.backend-eyebrow {
    margin-bottom: 0.25rem;
    color: var(--backend-accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.backend-note {
    display: inline-flex;
    padding: 0.55rem 0.75rem;
    color: #0f766e;
    border: 1px solid rgba(20, 184, 166, 0.24);
    border-radius: 999px;
    background: rgba(240, 253, 250, 0.85);
}

.backend-stat-card,
.backend-panel,
.backend-chart-card {
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 20px !important;
    background: var(--backend-card) !important;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08) !important;
}

.backend-stat-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0.35rem;
    content: "";
    background: linear-gradient(to bottom, var(--backend-accent), var(--backend-accent-2));
}

.backend-stat-title {
    color: var(--backend-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.backend-stat-value {
    margin-top: 0.35rem;
    color: #0f172a;
    font-size: clamp(1.55rem, 2vw, 2.25rem);
    font-weight: 850;
    letter-spacing: 0;
}

.backend-chart-card {
    height: 22rem;
}

.backend-page-header button,
button.bg-primary-600,
a.bg-primary-600 {
    border-radius: 12px !important;
    background: linear-gradient(135deg, #0f766e, #2563eb) !important;
    box-shadow: 0 14px 26px rgba(37, 99, 235, 0.18);
}

.backend-page-header button:hover,
button.bg-primary-600:hover,
a.bg-primary-600:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
}

table {
    border-collapse: separate !important;
    border-spacing: 0;
}

table thead {
    background: #f8fafc;
}

table th {
    color: #475569 !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

table td,
table th {
    border-color: rgba(148, 163, 184, 0.18) !important;
}

table tbody tr {
    transition: background 140ms ease, transform 140ms ease;
}

table tbody tr:hover {
    background: rgba(240, 253, 250, 0.72);
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
select,
textarea,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple,
.choices__inner {
    border-color: rgba(148, 163, 184, 0.32) !important;
    border-radius: 12px !important;
    background-color: rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(15, 118, 110, 0.55) !important;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14) !important;
}

.rounded,
.rounded-md,
.rounded-lg {
    border-radius: 12px;
}

.shadow,
.shadow-md,
.shadow-lg {
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

@keyframes backendFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 767px) {
    .backend-topbar {
        margin: 0.75rem 0.75rem 0;
        border-radius: 16px;
    }

    .backend-page-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 1rem;
    }

    .backend-page-header .mx-auto {
        display: none;
    }
}