:root {
    --bg-primary: #07080b;
    --bg-secondary: #101218;
    --bg-tertiary: #171a22;
    --bg-elevated: rgba(21, 24, 32, 0.92);

    --red-primary: #ff3557;
    --red-hover: #ff5570;
    --red-dark: #d81f40;
    --red-soft: rgba(255, 53, 87, 0.12);

    --text-primary: #f7f7f8;
    --text-secondary: #a6aab4;
    --text-muted: #767c89;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);

    --success: #37d69b;
    --warning: #f4c95d;
    --danger: #ff6075;

    --sidebar-width: 280px;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;

    --shadow-card:
        0 1px 2px rgba(0, 0, 0, 0.25),
        0 18px 48px rgba(0, 0, 0, 0.22);
}

html {
    color-scheme: dark;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 88% -10%,
            rgba(255, 53, 87, 0.12),
            transparent 34rem
        ),
        radial-gradient(
            circle at 15% 110%,
            rgba(95, 76, 255, 0.07),
            transparent 38rem
        ),
        var(--bg-primary) !important;

    color: var(--text-primary) !important;
    font-family:
        Inter,
        ui-sans-serif,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif !important;

    letter-spacing: -0.01em;
}

/* TESTI */

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

p,
small,
label,
span {
    color: inherit;
}

.text-muted,
.text-secondary {
    color: var(--text-secondary) !important;
}

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

a:hover {
    color: var(--red-hover);
}

/* SIDEBAR */

.sidebar {
    width: var(--sidebar-width) !important;
    padding: 18px 14px !important;
    background:
        linear-gradient(
            180deg,
            rgba(18, 20, 27, 0.98),
            rgba(10, 11, 15, 0.98)
        ) !important;

    border-right: 1px solid var(--border-color) !important;
    box-shadow: 18px 0 55px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(20px);
}

.sidebar-logo {
    min-height: 94px;
    margin: 0 4px 18px !important;
    padding: 16px 14px 24px !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.sidebar-logo h3 {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 7px;
    color: var(--text-primary) !important;
    font-size: 25px !important;
    font-weight: 750 !important;
    letter-spacing: -0.04em;
}

.sidebar-logo h3::before {
    content: "";
    width: 13px;
    height: 13px;
    border-radius: 4px;
    background: var(--red-primary);
    box-shadow: 0 0 22px rgba(255, 53, 87, 0.55);
    transform: rotate(45deg);
}

.sidebar-logo small {
    display: block;
    padding-left: 24px;
    color: var(--text-muted) !important;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-menu {
    padding: 0 3px !important;
}

.sidebar-menu li {
    margin-bottom: 4px;
}

.sidebar-menu a {
    position: relative;
    min-height: 46px;
    padding: 11px 13px !important;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--text-secondary) !important;
    font-size: 14px;
    font-weight: 540;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

.sidebar-menu a:hover {
    color: var(--text-primary) !important;
    background: rgba(255, 255, 255, 0.045) !important;
    border-color: rgba(255, 255, 255, 0.055);
    transform: translateX(2px);
}

.sidebar-menu a.active {
    color: var(--text-primary) !important;
    background:
        linear-gradient(
            90deg,
            rgba(255, 53, 87, 0.16),
            rgba(255, 53, 87, 0.05)
        ) !important;

    border: 1px solid rgba(255, 53, 87, 0.22);
    box-shadow: inset 3px 0 0 var(--red-primary);
}

.sidebar-menu i {
    display: inline-flex;
    width: 22px;
    margin-right: 10px !important;
    justify-content: center;
    color: currentColor;
    font-size: 17px !important;
}

.sidebar-menu .badge {
    margin-left: auto !important;
}

/* CONTENUTO */

.main-content {
    margin-left: var(--sidebar-width) !important;
}

.top-bar {
    min-height: 76px;
    padding: 14px 28px !important;
    background: rgba(7, 8, 11, 0.76) !important;
    border-bottom: 1px solid var(--border-color) !important;
    backdrop-filter: blur(22px);
}

.top-bar h5 {
    font-size: 18px;
    font-weight: 650;
}

.content-area {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 30px !important;
}

/* CARD */

.card {
    overflow: hidden;
    background:
        linear-gradient(
            145deg,
            rgba(24, 27, 36, 0.94),
            rgba(15, 17, 23, 0.94)
        ) !important;

    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-card);
    color: var(--text-primary) !important;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.card:hover {
    border-color: var(--border-strong) !important;
}

.card-header {
    min-height: 58px;
    padding: 17px 20px !important;
    background: rgba(255, 255, 255, 0.025) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.card-header h5,
.card-header h6 {
    color: var(--text-primary) !important;
    font-weight: 620;
}

.card-body {
    padding: 21px !important;
}

.card-body.text-center {
    position: relative;
    min-height: 135px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card-body.text-center h3 {
    margin-bottom: 8px;
    font-size: clamp(27px, 3vw, 37px);
    font-weight: 750;
    letter-spacing: -0.055em;
}

.card-body.text-center p {
    margin-bottom: 0;
    color: var(--text-secondary) !important;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

/* FORM */

.form-label {
    margin-bottom: 7px;
    color: var(--text-secondary) !important;
    font-size: 13px;
    font-weight: 600 !important;
}

.form-control,
.form-select {
    min-height: 46px;
    padding: 10px 13px;
    background: rgba(255, 255, 255, 0.045) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text-primary) !important;
}

textarea.form-control {
    min-height: 120px;
}

.form-control::placeholder {
    color: var(--text-muted) !important;
}

.form-control:focus,
.form-select:focus {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 53, 87, 0.65) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 0 0 4px rgba(255, 53, 87, 0.12) !important;
}

.form-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-check-input {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: var(--border-strong);
}

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

/* BOTTONI */

.btn {
    min-height: 40px;
    padding: 8px 15px;
    border-radius: 10px !important;
    font-size: 14px;
    font-weight: 620;
    transition:
        transform 0.15s ease,
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: #fff !important;
    background:
        linear-gradient(
            135deg,
            var(--red-primary),
            var(--red-dark)
        ) !important;

    border-color: transparent !important;
    box-shadow: 0 8px 22px rgba(255, 53, 87, 0.18);
}

.btn-primary:hover,
.btn-primary:focus {
    background:
        linear-gradient(
            135deg,
            var(--red-hover),
            var(--red-primary)
        ) !important;

    box-shadow: 0 10px 28px rgba(255, 53, 87, 0.26) !important;
}

.btn-secondary {
    color: var(--text-primary) !important;
    background: rgba(255, 255, 255, 0.055) !important;
    border-color: var(--border-color) !important;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.09) !important;
    border-color: var(--border-strong) !important;
}

.btn-danger {
    background: rgba(255, 96, 117, 0.14) !important;
    border-color: rgba(255, 96, 117, 0.28) !important;
    color: #ff8798 !important;
}

.btn-warning {
    background: rgba(244, 201, 93, 0.14) !important;
    border-color: rgba(244, 201, 93, 0.26) !important;
    color: #f8d97f !important;
}

.btn-outline-light {
    border-color: var(--border-strong);
    color: var(--text-primary);
}

/* TABELLE */

.table-responsive {
    border: 1px solid var(--border-color);
    border-radius: 13px;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-primary);
    --bs-table-border-color: var(--border-color);
    margin-bottom: 0 !important;
    color: var(--text-primary) !important;
    background: transparent !important;
}

.table > :not(caption) > * > * {
    padding: 14px 16px;
    color: var(--text-primary) !important;
    background: transparent !important;
    border-bottom-color: var(--border-color) !important;
    vertical-align: middle;
}

.table thead th {
    background: rgba(255, 255, 255, 0.035) !important;
    color: var(--text-secondary) !important;
    font-size: 12px;
    font-weight: 650 !important;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.table tbody tr {
    background: transparent !important;
    transition: background 0.15s ease;
}

.table-hover tbody tr:hover > * {
    background: rgba(255, 255, 255, 0.028) !important;
}

/* BADGE */

.badge {
    padding: 6px 9px;
    border-radius: 999px;
    font-weight: 650;
    letter-spacing: 0.01em;
}

.badge.bg-secondary {
    color: var(--text-secondary) !important;
    background: rgba(255, 255, 255, 0.075) !important;
    border: 1px solid var(--border-color);
}

.badge.bg-success {
    color: #70e7bd !important;
    background: rgba(55, 214, 155, 0.12) !important;
}

.badge.bg-danger {
    color: #ff8798 !important;
    background: rgba(255, 96, 117, 0.13) !important;
}

.badge.bg-warning {
    color: #f7d77d !important;
    background: rgba(244, 201, 93, 0.14) !important;
}

/* ALERT */

.alert {
    padding: 14px 16px;
    border-radius: 12px !important;
    font-size: 14px;
}

.alert-success {
    color: #70e7bd !important;
    background: rgba(55, 214, 155, 0.10) !important;
    border-color: rgba(55, 214, 155, 0.25) !important;
}

.alert-danger {
    color: #ff8798 !important;
    background: rgba(255, 96, 117, 0.10) !important;
    border-color: rgba(255, 96, 117, 0.25) !important;
}

/* CODICE E LICENZE */

code {
    padding: 7px 9px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #ff7890;
}

/* LOGIN */

.login-card {
    position: relative;
    overflow: hidden;
    max-width: 430px !important;
    padding: 42px !important;

    background:
        linear-gradient(
            145deg,
            rgba(25, 28, 37, 0.96),
            rgba(13, 15, 20, 0.96)
        ) !important;

    border: 1px solid var(--border-color) !important;
    border-radius: 24px !important;
    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.02);
}

.login-card::before {
    content: "";
    position: absolute;
    width: 210px;
    height: 210px;
    top: -125px;
    right: -110px;
    border-radius: 999px;
    background: rgba(255, 53, 87, 0.18);
    filter: blur(18px);
    pointer-events: none;
}

.login-card .logo {
    position: relative;
    margin-bottom: 34px !important;
    color: var(--text-primary) !important;
    font-size: 33px !important;
    font-weight: 780 !important;
    letter-spacing: -0.055em;
}

.login-card .logo::after {
    content: "CONTROL PANEL";
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.22em;
}

/* RESPONSIVE */

@media (max-width: 991px) {
    .content-area {
        padding: 22px !important;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: min(86vw, 290px) !important;
        transform: translateX(-105%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
    }

    .top-bar {
        min-height: 66px;
        padding: 11px 15px !important;
    }

    .top-bar .gap-3 {
        gap: 8px !important;
    }

    .top-bar .gap-3 > span {
        display: none;
    }

    .content-area {
        padding: 16px !important;
    }

    .card-body {
        padding: 17px !important;
    }

    .login-card {
        width: calc(100% - 28px) !important;
        padding: 30px 23px !important;
        border-radius: 20px !important;
    }
}

/* REDGEN DASHBOARD V1 START */

.page-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.page-eyebrow,
.panel-kicker {
    display: block;
    margin-bottom: 7px;
    color: var(--red-primary);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-intro h2 {
    margin: 0;
    font-size: clamp(25px, 3vw, 36px);
    font-weight: 750;
    letter-spacing: -0.045em;
}

.page-intro p {
    max-width: 690px;
    margin: 9px 0 0;
    color: var(--text-secondary) !important;
    line-height: 1.65;
}

.page-date {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    flex: 0 0 auto;
    padding: 10px 13px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-color);
    border-radius: 11px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}

.metrics-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(205px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.metric-panel {
    position: relative;
    min-height: 176px;
    padding: 19px;
    overflow: hidden;
    background:
        linear-gradient(
            145deg,
            rgba(24, 27, 36, 0.96),
            rgba(14, 16, 22, 0.96)
        );
    border: 1px solid var(--border-color);
    border-radius: 17px;
    box-shadow: var(--shadow-card);
    transition:
        transform 0.18s ease,
        border-color 0.18s ease;
}

.metric-panel::after {
    content: "";
    position: absolute;
    width: 110px;
    height: 110px;
    right: -54px;
    bottom: -62px;
    background: rgba(255, 53, 87, 0.10);
    border-radius: 999px;
    filter: blur(2px);
}

.metric-panel:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 53, 87, 0.25);
}

.metric-panel-success::after {
    background: rgba(55, 214, 155, 0.10);
}

.metric-panel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.metric-icon,
.transaction-icon,
.quick-action-icon,
.empty-state-icon,
.master-banner-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.metric-icon {
    width: 42px;
    height: 42px;
    color: #ff7890;
    background: var(--red-soft);
    border: 1px solid rgba(255, 53, 87, 0.18);
    border-radius: 12px;
    font-size: 18px;
}

.metric-panel-success .metric-icon {
    color: #72e7bd;
    background: rgba(55, 214, 155, 0.10);
    border-color: rgba(55, 214, 155, 0.18);
}

.metric-chip {
    padding: 5px 8px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.metric-value {
    position: relative;
    z-index: 1;
    color: var(--text-primary);
    font-size: clamp(29px, 3vw, 39px);
    font-weight: 760;
    letter-spacing: -0.055em;
    line-height: 1;
}

.metric-label {
    position: relative;
    z-index: 1;
    margin-top: 9px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 560;
}

.panel-section {
    padding: 21px;
    background:
        linear-gradient(
            145deg,
            rgba(23, 26, 34, 0.94),
            rgba(14, 16, 21, 0.94)
        );
    border: 1px solid var(--border-color);
    border-radius: 17px;
    box-shadow: var(--shadow-card);
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 19px;
}

.panel-heading h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 680;
}

.panel-heading .panel-kicker {
    margin-bottom: 4px;
}

.dashboard-columns {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 20px;
}

.modern-table-wrap {
    border-radius: 12px;
}

.table-date {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-weight: 580;
}

.table-date small {
    color: var(--text-muted);
    font-size: 11px;
}

.amount-value {
    color: #ff7890;
    font-weight: 700;
}

.status-pill {
    display: inline-flex;
    padding: 6px 9px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 650;
}

.quick-actions {
    display: grid;
    gap: 11px;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 73px;
    padding: 13px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
    border-radius: 13px;
    text-decoration: none;
    transition:
        transform 0.17s ease,
        background 0.17s ease,
        border-color 0.17s ease;
}

.quick-action:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.045);
    border-color: var(--border-strong);
    transform: translateX(3px);
}

.quick-action-primary {
    background:
        linear-gradient(
            90deg,
            rgba(255, 53, 87, 0.11),
            rgba(255, 53, 87, 0.025)
        );
    border-color: rgba(255, 53, 87, 0.18);
}

.quick-action-icon {
    width: 42px;
    height: 42px;
    color: #ff7890;
    background: var(--red-soft);
    border-radius: 11px;
    font-size: 17px;
}

.quick-action-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.quick-action-copy strong {
    color: var(--text-primary);
    font-size: 14px;
}

.quick-action-copy small {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-action-arrow {
    color: var(--text-muted);
    font-size: 13px;
}

.transaction-list {
    display: grid;
    gap: 10px;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.transaction-icon {
    width: 39px;
    height: 39px;
    color: #ff7890;
    background: var(--red-soft);
    border-radius: 10px;
}

.transaction-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.transaction-copy strong {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transaction-copy small {
    color: var(--text-muted);
    font-size: 11px;
}

.transaction-amount {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 720;
}

.empty-state {
    display: flex;
    min-height: 220px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

.empty-state-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 13px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    font-size: 20px;
}

.empty-state h4 {
    margin: 0;
    font-size: 15px;
}

.empty-state p {
    margin: 6px 0 0;
    color: var(--text-muted) !important;
    font-size: 13px;
}

.master-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding: 15px 17px;
    background:
        linear-gradient(
            90deg,
            rgba(244, 201, 93, 0.11),
            rgba(244, 201, 93, 0.025)
        );
    border: 1px solid rgba(244, 201, 93, 0.22);
    border-radius: 14px;
}

.master-banner-icon {
    width: 42px;
    height: 42px;
    color: #f6d574;
    background: rgba(244, 201, 93, 0.12);
    border-radius: 12px;
    font-size: 18px;
}

.master-banner > div {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
}

.master-banner strong {
    color: var(--text-primary);
    font-size: 14px;
}

.master-banner span {
    color: var(--text-secondary);
    font-size: 12px;
}

.master-badge {
    padding: 6px 9px;
    color: #f7d77d !important;
    background: rgba(244, 201, 93, 0.12);
    border-radius: 999px;
    font-size: 10px !important;
    font-weight: 750;
    letter-spacing: 0.09em;
}

@media (max-width: 1050px) {
    .dashboard-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .page-intro {
        flex-direction: column;
    }

    .page-date {
        display: none;
    }

    .metrics-grid {
        grid-template-columns: 1fr 1fr;
    }

    .metric-panel {
        min-height: 155px;
        padding: 16px;
    }

    .metric-panel-top {
        margin-bottom: 17px;
    }

    .panel-section {
        padding: 16px;
    }

    .master-badge {
        display: none;
    }
}

@media (max-width: 440px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* REDGEN DASHBOARD V1 END */

/* REDGEN SHELL PREMIUM START */

/* BRAND */

.sidebar-logo {
    min-height: auto !important;
    margin: 0 4px 14px !important;
    padding: 10px 8px 20px !important;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary) !important;
    text-decoration: none;
}

.brand-link:hover {
    color: var(--text-primary) !important;
}

.brand-mark {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 43px;
    flex: 0 0 auto;
    overflow: hidden;
    color: #ffffff !important;
    background:
        linear-gradient(
            145deg,
            #ff4968,
            #d91e42
        );
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 13px;
    box-shadow:
        0 10px 25px rgba(255, 53, 87, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
    font-size: 18px;
}

.brand-mark::after {
    content: "";
    position: absolute;
    width: 28px;
    height: 28px;
    top: -15px;
    right: -12px;
    background: rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    filter: blur(3px);
}

.brand-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 1px;
}

.brand-copy strong {
    color: var(--text-primary);
    font-size: 21px;
    font-weight: 760;
    letter-spacing: -0.045em;
    line-height: 1.1;
}

.sidebar-logo .brand-copy small {
    display: block;
    padding-left: 0 !important;
    color: var(--text-muted) !important;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.sidebar-role-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 2px 0;
    padding: 9px 11px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 650;
}

.role-status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    background: var(--success);
    border-radius: 999px;
    box-shadow: 0 0 10px rgba(55, 214, 155, 0.55);
}

/* SIDEBAR MENU */

.sidebar-menu {
    margin-top: 6px;
}

.sidebar-menu li + li {
    margin-top: 3px;
}

.sidebar-menu a {
    gap: 1px;
}

.sidebar-menu a.active {
    box-shadow:
        inset 3px 0 0 var(--red-primary),
        0 9px 24px rgba(0, 0, 0, 0.14);
}

.sidebar-menu a.active i {
    color: #ff7890;
}

.sidebar-menu .badge {
    min-width: 25px;
    height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* TOPBAR */

.top-bar {
    min-height: 82px !important;
    padding: 13px 22px 13px 27px !important;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.topbar-title-block {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.topbar-kicker {
    color: var(--text-muted) !important;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.13em;
    line-height: 1;
    text-transform: uppercase;
}

.topbar-title-block h5 {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 680;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 7px 11px 7px 7px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
    border-radius: 13px;
}

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    color: #ffffff !important;
    background:
        linear-gradient(
            145deg,
            var(--red-primary),
            var(--red-dark)
        );
    border-radius: 10px;
    box-shadow: 0 7px 18px rgba(255, 53, 87, 0.18);
    font-size: 14px;
    font-weight: 760;
}

.user-details {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 1px;
}

.user-details strong {
    max-width: 150px;
    overflow: hidden;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 680;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-details small {
    color: var(--text-muted);
    font-size: 10px;
}

.logout-form {
    margin: 0;
}

.logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    padding: 9px 13px;
    color: var(--text-secondary) !important;
    background: rgba(255, 255, 255, 0.035) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}

.logout-button:hover {
    color: #ff8798 !important;
    background: rgba(255, 96, 117, 0.09) !important;
    border-color: rgba(255, 96, 117, 0.20) !important;
}

.logout-button i {
    font-size: 16px;
}

/* MOBILE */

@media (max-width: 900px) {
    .topbar-user {
        padding-right: 7px;
    }

    .user-details {
        display: none;
    }
}

@media (max-width: 768px) {
    .top-bar {
        min-height: 68px !important;
        padding: 10px 13px !important;
    }

    .hamburger {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        flex: 0 0 auto;
        background: rgba(255, 255, 255, 0.04) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 11px;
        font-size: 21px !important;
    }

    .topbar-kicker {
        display: none;
    }

    .topbar-title-block h5 {
        font-size: 15px;
    }

    .topbar-user {
        display: none;
    }

    .logout-button {
        width: 42px;
        height: 42px;
        min-height: 42px;
        padding: 0;
    }

    .logout-button span {
        display: none;
    }
}

/* REDGEN SHELL PREMIUM END */

/* REDGEN MODULES V1 START */

/* TITOLI PAGINA */

.content-area > h2.mb-4,
.content-area > h4.mb-4 {
    margin-bottom: 26px !important;
    color: var(--text-primary);
    font-size: clamp(25px, 3vw, 35px);
    font-weight: 750;
    letter-spacing: -0.045em;
}

.content-area > h2.mb-4::before,
.content-area > h4.mb-4::before {
    content: "Area operativa";
    display: block;
    margin-bottom: 7px;
    color: var(--red-primary);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.content-area >
.d-flex.justify-content-between.align-items-center.mb-4 {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 26px !important;
}

.content-area >
.d-flex.justify-content-between.align-items-center.mb-4 h2,
.content-area >
.d-flex.justify-content-between.align-items-center.mb-4 h4 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 750;
    letter-spacing: -0.045em;
}

/* FORM */

.content-area .form-control,
.content-area .form-select {
    min-height: 48px;
}

.content-area input[type="file"].form-control {
    padding-top: 11px;
}

.content-area .form-check {
    position: relative;
    min-height: 48px;
    padding: 13px 14px 12px 42px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.content-area .form-check-input {
    margin-left: -27px;
}

.content-area .form-check-label {
    color: var(--text-primary) !important;
    font-size: 13px;
    font-weight: 570;
}

.content-area textarea.form-control {
    resize: vertical;
}

.content-area hr {
    border-color: var(--border-color);
    opacity: 1;
}

/* INPUT DI RICERCA */

.content-area .input-group {
    padding: 5px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
    border-radius: 13px;
}

.content-area .input-group .form-control {
    border: 0 !important;
    box-shadow: none !important;
}

.content-area .input-group .btn {
    min-height: 44px;
}

/* BOTTONI AGGIUNTIVI */

.btn-success {
    color: #72e7bd !important;
    background: rgba(55, 214, 155, 0.12) !important;
    border-color: rgba(55, 214, 155, 0.24) !important;
}

.btn-success:hover {
    color: #9af0d0 !important;
    background: rgba(55, 214, 155, 0.18) !important;
}

.btn-info,
.btn-outline-info {
    color: #8ddcff !important;
    background: rgba(65, 184, 235, 0.10) !important;
    border-color: rgba(65, 184, 235, 0.22) !important;
}

.btn-outline-warning {
    color: #f7d77d !important;
    border-color: rgba(244, 201, 93, 0.28) !important;
}

/* TABELLE E PAGINAZIONE */

.content-area .table td:last-child {
    white-space: nowrap;
}

.content-area .table td:last-child .btn {
    margin: 2px;
}

.pagination {
    gap: 5px;
    margin-bottom: 0;
}

.pagination .page-link {
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-color);
    border-radius: 9px !important;
}

.pagination .page-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.065);
}

.pagination .page-item.active .page-link {
    color: #ffffff;
    background: var(--red-primary);
    border-color: var(--red-primary);
}

.pagination .page-item.disabled .page-link {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.015);
}

/* TAB */

.nav-tabs {
    gap: 7px;
    border-bottom: 1px solid var(--border-color);
}

.nav-tabs .nav-link {
    margin-bottom: -1px;
    padding: 10px 14px;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px 10px 0 0;
}

.nav-tabs .nav-link:hover {
    color: var(--text-primary);
    border-color: var(--border-color);
}

.nav-tabs .nav-link.active {
    color: #ffffff;
    background: var(--red-soft);
    border-color:
        rgba(255, 53, 87, 0.25)
        rgba(255, 53, 87, 0.25)
        var(--bg-secondary);
}

/* PRODOTTI ADMIN */

.route-admin-products
.content-area > .row > .col-md-4 {
    display: flex;
}

.route-admin-products
.content-area > .row > .col-md-4 > .card {
    width: 100%;
    min-height: 260px;
}

.route-admin-products
.content-area > .row > .col-md-4 > .card .card-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.route-admin-products .card-title {
    margin-bottom: 12px;
    color: var(--text-primary) !important;
    font-size: 22px;
    font-weight: 720;
    letter-spacing: -0.035em;
}

.route-admin-products .card-text {
    color: var(--text-secondary) !important;
    line-height: 1.65;
}

.route-admin-products .card-body > .mt-3:last-child {
    margin-top: auto !important;
    padding-top: 18px;
}

/* CATALOGO CATEGORIE RESELLER */

.route-reseller-categories
.content-area > .row > .col-md-4 {
    display: flex;
}

.route-reseller-categories
.content-area > .row > .col-md-4 > a {
    display: flex;
    width: 100%;
}

.route-reseller-categories
.content-area > .row > .col-md-4 .card {
    width: 100%;
    min-height: 370px;
    border-color: rgba(255, 255, 255, 0.09) !important;
}

.route-reseller-categories
.content-area > .row > .col-md-4 .card:hover {
    transform: translateY(-6px) !important;
    border-color: rgba(255, 53, 87, 0.27) !important;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.30),
        0 0 0 1px rgba(255, 53, 87, 0.07) !important;
}

.route-reseller-categories .card-body.text-center {
    display: flex;
    min-height: 370px !important;
    flex-direction: column;
    align-items: stretch !important;
    justify-content: flex-start !important;
    padding: 25px !important;
    text-align: left !important;
}

.route-reseller-categories .card-body h3 {
    margin-bottom: 12px !important;
    color: var(--text-primary) !important;
    font-size: 24px;
    font-weight: 740;
    letter-spacing: -0.04em;
}

.route-reseller-categories .card-body h3::before {
    content: "";
    display: block;
    width: 48px;
    height: 48px;
    margin-bottom: 21px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 53, 87, 0.22),
            rgba(255, 53, 87, 0.07)
        );
    border: 1px solid rgba(255, 53, 87, 0.22);
    border-radius: 14px;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.route-reseller-categories .card-body > p {
    color: var(--text-secondary) !important;
    line-height: 1.6;
}

.route-reseller-categories
.card-body > div:nth-of-type(1) {
    padding: 13px 14px !important;
    background: rgba(255, 255, 255, 0.035) !important;
    border: 1px solid var(--border-color);
    border-radius: 12px !important;
}

.route-reseller-categories
.card-body > div:nth-of-type(2) {
    padding: 13px 14px !important;
    background: rgba(55, 214, 155, 0.08) !important;
    border: 1px solid rgba(55, 214, 155, 0.18) !important;
    border-radius: 12px !important;
}

.route-reseller-categories .card-body > .btn {
    margin-top: auto !important;
}

/* PRODOTTI PER CATEGORIA */

.route-reseller-products-by-category
.content-area > .row > .col-md-6 {
    display: flex;
}

.route-reseller-products-by-category
.content-area > .row > .col-md-6 > .card {
    width: 100%;
    min-height: 270px;
}

.route-reseller-products-by-category .card h5 {
    color: var(--text-primary) !important;
    font-size: 21px;
    font-weight: 710;
}

.route-reseller-products-by-category
.card-body > .mt-3.mb-3 {
    padding: 14px !important;
    background: rgba(255, 255, 255, 0.035) !important;
    border: 1px solid var(--border-color);
    border-radius: 12px !important;
}

/* DETTAGLIO PRODOTTO E VARIANTI */

.route-reseller-products-show
.card .card.mb-3[style*="var(--bg-tertiary)"] {
    background: rgba(255, 255, 255, 0.025) !important;
    border-color: var(--border-color) !important;
    box-shadow: none;
}

.route-reseller-products-show
.card .card.mb-3[style*="var(--bg-tertiary)"]:hover {
    transform: none;
    border-color: rgba(255, 53, 87, 0.20) !important;
}

.route-reseller-products-show
.card .card.mb-3 h5 {
    color: var(--text-primary) !important;
    font-size: 18px;
}

.route-reseller-products-show
.card .card.mb-3 .col-md-4.text-center h4 {
    color: var(--red-primary) !important;
    font-size: 30px;
    font-weight: 760;
}

.route-reseller-products-show
.content-area > .row > .col-md-4 > .card {
    position: sticky;
    top: 105px;
}

/* LICENZE RESELLER */

.route-reseller-licenses .content-area > h5 {
    margin: 30px 0 15px;
    font-size: 18px;
    font-weight: 680;
}

.route-reseller-licenses
.content-area > .row > .col-md-6 {
    display: flex;
}

.route-reseller-licenses
.content-area > .row > .col-md-6 > .card {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-left: 1px solid var(--border-color) !important;
}

.route-reseller-licenses
.content-area > .row > .col-md-6 > .card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--red-primary);
}

.route-reseller-licenses
.card[style*="var(--success)"]::before {
    background: var(--success) !important;
}

.route-reseller-licenses
.card[style*="var(--warning)"]::before {
    background: var(--warning) !important;
}

.route-reseller-licenses
.card[style*="var(--danger)"]::before {
    background: var(--danger) !important;
}

.route-reseller-licenses .card-body > h6 {
    color: var(--text-primary) !important;
    font-size: 16px;
    line-height: 1.45;
}

.route-reseller-licenses code {
    overflow-wrap: anywhere;
    padding: 12px !important;
    color: #ff8da0;
    background: rgba(0, 0, 0, 0.30);
    border: 1px dashed rgba(255, 255, 255, 0.14);
}

.route-reseller-licenses .renew-options-box .card {
    background: rgba(0, 0, 0, 0.18) !important;
    box-shadow: none;
}

/* LICENZE ADMIN */

.route-admin-licenses-pool
.row.text-center > .col-md-4 {
    padding: 22px;
    border-right: 1px solid var(--border-color);
}

.route-admin-licenses-pool
.row.text-center > .col-md-4:last-child {
    border-right: 0;
}

.route-admin-licenses-pool
.row.text-center h3 {
    margin-bottom: 7px;
    font-size: 37px;
    font-weight: 750;
}

.route-admin-licenses-sold code,
.route-admin-licenses-pool code {
    white-space: nowrap;
}

/* PROFILO */

.route-reseller-profile
.content-area > .row > .col-md-6 {
    display: flex;
}

.route-reseller-profile
.content-area > .row > .col-md-6 > .card {
    width: 100%;
}

.route-reseller-profile
.content-area > .row:nth-of-type(2)
> .col-md-6:last-child
.card-body > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 13px 14px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
    border-radius: 11px;
}

.route-reseller-profile
.content-area > .row:nth-of-type(2)
> .col-md-6:last-child
.card-body span {
    font-size: 21px !important;
    font-weight: 730 !important;
}

.route-reseller-profile ol {
    padding-left: 21px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* NOTIFICHE */

:is(
    .route-admin-notifications,
    .route-reseller-notifications
)
.card-body > .d-flex.flex-column.gap-3 > .card {
    position: relative;
    background: rgba(255, 255, 255, 0.025) !important;
    border: 1px solid var(--border-color) !important;
    border-left: 1px solid var(--border-color) !important;
    box-shadow: none;
}

:is(
    .route-admin-notifications,
    .route-reseller-notifications
)
.card-body > .d-flex.flex-column.gap-3 > .card::before {
    content: "";
    position: absolute;
    inset: 17px auto 17px 0;
    width: 3px;
    background: var(--red-primary);
    border-radius: 0 4px 4px 0;
}

:is(
    .route-admin-notifications,
    .route-reseller-notifications
)
.card-body > .d-flex.flex-column.gap-3 > .card h6 {
    font-size: 16px;
    font-weight: 680;
}

:is(
    .route-admin-notifications,
    .route-reseller-notifications
)
.card-body > .d-flex.flex-column.gap-3 > .card p {
    color: var(--text-secondary) !important;
}

/* INFO E REGOLE */

.route-reseller-info-regole
.content-area > .container {
    max-width: 1120px !important;
}

.route-reseller-info-regole
.container > h2 {
    margin-bottom: 12px !important;
    color: var(--text-primary) !important;
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 770;
    letter-spacing: -0.055em;
}

.route-reseller-info-regole
.container > p:first-of-type {
    max-width: 760px;
    margin-bottom: 30px;
    color: var(--text-secondary) !important;
    font-size: 18px !important;
}

.route-reseller-info-regole
.container > hr {
    display: none;
}

.route-reseller-info-regole
.container > .mb-5 {
    margin-bottom: 16px !important;
    padding: 25px;
    background:
        linear-gradient(
            145deg,
            rgba(23, 26, 34, 0.92),
            rgba(14, 16, 21, 0.92)
        );
    border: 1px solid var(--border-color);
    border-radius: 17px;
    box-shadow: var(--shadow-card);
}

.route-reseller-info-regole
.container > .mb-5 h4 {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary) !important;
    font-size: 19px;
    font-weight: 690;
}

.route-reseller-info-regole
.container > .mb-5 h4 svg {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    padding: 10px;
    background: var(--red-soft);
    border: 1px solid rgba(255, 53, 87, 0.18);
    border-radius: 12px;
}

.route-reseller-info-regole
.container > .mb-5 p,
.route-reseller-info-regole
.container > .mb-5 div {
    color: var(--text-secondary) !important;
}

.route-reseller-info-regole
.container > .mb-5[style*="text-align: center"] {
    padding: 43px 30px !important;
    background:
        radial-gradient(
            circle at 90% 10%,
            rgba(255, 53, 87, 0.20),
            transparent 18rem
        ),
        linear-gradient(
            145deg,
            rgba(28, 23, 31, 0.96),
            rgba(15, 16, 22, 0.96)
        ) !important;
    border: 1px solid rgba(255, 53, 87, 0.27) !important;
}

.route-reseller-info-regole
.container > div[style*="margin-top: 50px"] {
    margin-top: 18px !important;
    padding: 25px !important;
    background: rgba(255, 53, 87, 0.07) !important;
    border: 1px solid rgba(255, 53, 87, 0.17);
    border-radius: 15px !important;
}

/* DETTAGLIO RESELLER */

.route-admin-resellers-show
.row.text-center > [class*="col-"] {
    padding: 18px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
}

.route-admin-resellers-show
.row.text-center > [class*="col-"]:first-child {
    border-radius: 12px 0 0 12px;
}

.route-admin-resellers-show
.row.text-center > [class*="col-"]:last-child {
    border-radius: 0 12px 12px 0;
}

.route-admin-resellers-show
.border.rounded.p-3,
.route-reseller-sub-resellers-show
.border.rounded.p-3 {
    background: rgba(255, 255, 255, 0.025);
    border-color: var(--border-color) !important;
    border-radius: 13px !important;
}

/* PAGINE FORM */

:is(
    .route-admin-products-create,
    .route-admin-products-show,
    .route-admin-categories-create,
    .route-admin-categories-edit,
    .route-admin-resellers-create,
    .route-reseller-sub-resellers-create,
    .route-reseller-service-suggestions
)
.content-area > .card {
    max-width: 1180px;
}

/* MOBILE */

@media (max-width: 768px) {
    .content-area >
    .d-flex.justify-content-between.align-items-center.mb-4 {
        align-items: stretch !important;
        flex-direction: column;
    }

    .content-area >
    .d-flex.justify-content-between.align-items-center.mb-4
    > .btn {
        width: 100%;
    }

    .route-reseller-products-show
    .content-area > .row > .col-md-4 > .card {
        position: static;
    }

    .route-admin-licenses-pool
    .row.text-center > .col-md-4 {
        border-right: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .route-admin-licenses-pool
    .row.text-center > .col-md-4:last-child {
        border-bottom: 0;
    }

    .route-admin-resellers-show
    .row.text-center > [class*="col-"] {
        border-radius: 0 !important;
    }

    .route-admin-resellers-show
    .row.text-center > [class*="col-"]:first-child {
        border-radius: 12px 12px 0 0 !important;
    }

    .route-admin-resellers-show
    .row.text-center > [class*="col-"]:last-child {
        border-radius: 0 0 12px 12px !important;
    }
}

/* REDGEN MODULES V1 END */

/* REDGEN CATALOG PHASE START */

.rg-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.rg-page-header > div:first-child {
    min-width: 0;
}

.rg-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--red-primary);
    font-size: 11px;
    font-weight: 760;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.rg-page-title {
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(30px, 4vw, 43px);
    font-weight: 780;
    letter-spacing: -0.055em;
    line-height: 1.05;
}

.rg-page-description {
    max-width: 680px;
    margin: 11px 0 0;
    color: var(--text-secondary) !important;
    font-size: 15px;
    line-height: 1.65;
}

.rg-page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 11px;
    flex: 0 0 auto;
    flex-wrap: wrap;
}

.rg-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 13px;
    color: var(--text-secondary) !important;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-color);
    border-radius: 11px;
    font-size: 12px;
    font-weight: 650;
}

.rg-back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 19px;
    color: var(--text-secondary) !important;
    font-size: 13px;
    font-weight: 620;
    text-decoration: none;
}

.rg-back-link:hover {
    color: var(--text-primary) !important;
}

.rg-grid {
    display: grid;
    gap: 18px;
}

.rg-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rg-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rg-catalog-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 310px;
    flex-direction: column;
    overflow: hidden;
    padding: 21px;
    color: var(--text-primary) !important;
    background:
        radial-gradient(
            circle at 105% 110%,
            rgba(255, 53, 87, 0.13),
            transparent 13rem
        ),
        linear-gradient(
            145deg,
            rgba(24, 27, 36, 0.97),
            rgba(14, 16, 22, 0.97)
        );
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: var(--shadow-card);
    text-decoration: none;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.rg-catalog-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(
            115deg,
            rgba(255, 255, 255, 0.025),
            transparent 42%
        );
}

.rg-catalog-card:hover {
    color: var(--text-primary) !important;
    transform: translateY(-5px);
    border-color: rgba(255, 53, 87, 0.25);
    box-shadow:
        0 28px 65px rgba(0, 0, 0, 0.32),
        0 0 0 1px rgba(255, 53, 87, 0.05);
}

.rg-card-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 27px;
}

.rg-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    color: #ff7890;
    background:
        linear-gradient(
            145deg,
            rgba(255, 53, 87, 0.19),
            rgba(255, 53, 87, 0.07)
        );
    border: 1px solid rgba(255, 53, 87, 0.21);
    border-radius: 14px;
    font-size: 19px;
}

.rg-card-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 37px;
    height: 37px;
    color: var(--text-secondary) !important;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-color);
    border-radius: 11px;
    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.rg-catalog-card:hover .rg-card-arrow {
    color: #ff7890 !important;
    transform: translate(2px, -2px);
}

.rg-card-content {
    position: relative;
    z-index: 1;
}

.rg-card-title {
    margin: 0 0 10px;
    color: var(--text-primary) !important;
    font-size: 23px;
    font-weight: 740;
    letter-spacing: -0.04em;
}

.rg-card-description {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--text-secondary) !important;
    font-size: 14px;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.rg-card-metrics,
.rg-category-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 22px;
}

.rg-mini-metric,
.rg-category-stats > div,
.rg-product-info > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
    padding: 12px 13px;
    background: rgba(255, 255, 255, 0.032);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.rg-mini-metric span,
.rg-category-stats span,
.rg-product-info span {
    color: var(--text-muted) !important;
    font-size: 10px;
    font-weight: 680;
    letter-spacing: 0.065em;
    text-transform: uppercase;
}

.rg-mini-metric strong,
.rg-category-stats strong,
.rg-product-info strong {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 730;
}

.rg-category-stats .rg-category-stock {
    background: rgba(55, 214, 155, 0.07);
    border-color: rgba(55, 214, 155, 0.17);
}

.rg-category-stats .rg-category-stock strong {
    color: #70e7bd;
}

.rg-product-info {
    position: relative;
    z-index: 1;
    margin-top: 22px;
}

.rg-card-footer {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding-top: 22px;
}

.rg-card-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 45px;
    padding: 10px 13px;
    color: var(--text-primary) !important;
    background: rgba(255, 255, 255, 0.042);
    border: 1px solid var(--border-color);
    border-radius: 11px;
    font-size: 13px;
    font-weight: 670;
    text-decoration: none;
    transition:
        background 0.17s ease,
        border-color 0.17s ease;
}

.rg-card-action:hover {
    color: var(--text-primary) !important;
    background: rgba(255, 53, 87, 0.09);
    border-color: rgba(255, 53, 87, 0.20);
}

.rg-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 730;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.rg-status-badge > span {
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    border-radius: 999px;
}

.rg-status-success {
    color: #77e9c0 !important;
    background: rgba(55, 214, 155, 0.08);
    border-color: rgba(55, 214, 155, 0.18);
}

.rg-status-success > span {
    background: var(--success);
    box-shadow: 0 0 8px rgba(55, 214, 155, 0.55);
}

.rg-status-danger {
    color: #ff8b9b !important;
    background: rgba(255, 96, 117, 0.08);
    border-color: rgba(255, 96, 117, 0.18);
}

.rg-status-danger > span {
    background: var(--danger);
    box-shadow: 0 0 8px rgba(255, 96, 117, 0.50);
}

/* DATA PANEL */

.rg-data-panel {
    overflow: hidden;
    padding: 15px;
    background:
        linear-gradient(
            145deg,
            rgba(23, 26, 34, 0.96),
            rgba(14, 16, 21, 0.96)
        );
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: var(--shadow-card);
}

.rg-table-shell {
    border-radius: 13px;
}

.rg-table {
    margin: 0 !important;
}

.rg-table > :not(caption) > * > * {
    padding: 15px 14px !important;
}

.rg-table tbody tr:last-child td {
    border-bottom: 0 !important;
}

.rg-entity {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 170px;
}

.rg-avatar,
.rg-entity-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 39px;
    height: 39px;
    flex: 0 0 auto;
    color: #ffffff !important;
    background:
        linear-gradient(
            145deg,
            var(--red-primary),
            var(--red-dark)
        );
    border-radius: 11px;
    font-size: 13px;
    font-weight: 760;
    box-shadow: 0 8px 19px rgba(255, 53, 87, 0.15);
}

.rg-entity-icon {
    color: #ff7890 !important;
    background: var(--red-soft);
    border: 1px solid rgba(255, 53, 87, 0.17);
    box-shadow: none;
    font-size: 15px;
}

.rg-entity-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.rg-entity-copy strong {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 680;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rg-entity-copy small {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rg-code {
    display: inline-block;
    max-width: 210px;
    overflow: hidden;
    padding: 7px 9px;
    color: #ff8da0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rg-value,
.rg-money {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 720;
}

.rg-value-label {
    color: var(--text-muted);
    font-size: 10px;
}

.rg-money-primary {
    color: #ff7890;
}

.rg-money-success {
    color: #70e7bd;
}

.rg-order-number,
.rg-count-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
}

.rg-table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.rg-table-actions form {
    margin: 0;
}

/* SEARCH */

.rg-search-panel {
    margin-bottom: 16px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
    border-radius: 14px;
}

.rg-search-form {
    display: flex;
    align-items: center;
    gap: 9px;
}

.rg-search-input {
    display: flex;
    min-width: 0;
    min-height: 46px;
    flex: 1;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-color);
    border-radius: 11px;
}

.rg-search-input i {
    color: var(--text-muted);
}

.rg-search-input input {
    width: 100%;
    min-width: 0;
    color: var(--text-primary);
    background: transparent;
    border: 0;
    outline: 0;
}

.rg-search-input input::placeholder {
    color: var(--text-muted);
}

/* EMPTY */

.rg-empty-state {
    display: flex;
    min-height: 390px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 45px 25px;
    background:
        radial-gradient(
            circle at 50% 110%,
            rgba(255, 53, 87, 0.10),
            transparent 20rem
        ),
        rgba(255, 255, 255, 0.018);
    border: 1px dashed var(--border-strong);
    border-radius: 18px;
    text-align: center;
}

.rg-empty-compact {
    min-height: 310px;
    border: 0;
    background: transparent;
}

.rg-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 17px;
    color: #ff7890;
    background: var(--red-soft);
    border: 1px solid rgba(255, 53, 87, 0.18);
    border-radius: 17px;
    font-size: 22px;
}

.rg-empty-state h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 710;
}

.rg-empty-state p {
    max-width: 480px;
    margin: 8px 0 20px;
    color: var(--text-secondary) !important;
}

/* RESPONSIVE */

@media (max-width: 1150px) {
    .rg-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .rg-page-header {
        flex-direction: column;
    }

    .rg-page-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .rg-grid-2,
    .rg-grid-3 {
        grid-template-columns: 1fr;
    }

    .rg-catalog-card {
        min-height: 290px;
    }

    .rg-search-form {
        align-items: stretch;
        flex-direction: column;
    }

    .rg-search-form .btn {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .rg-page-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .rg-page-actions > * {
        width: 100%;
        justify-content: center;
    }

    .rg-card-metrics,
    .rg-category-stats {
        grid-template-columns: 1fr;
    }

    .rg-data-panel {
        padding: 9px;
    }
}

/* REDGEN CATALOG PHASE END */

/* REDGEN OPERATIONS PHASE START */

/* CELLE TABELLE */

.rg-date-cell {
    display: flex;
    min-width: 88px;
    flex-direction: column;
    gap: 2px;
}

.rg-date-cell strong {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 680;
}

.rg-date-cell small {
    color: var(--text-muted);
    font-size: 10px;
}

.rg-person-cell,
.rg-direction-cell,
.rg-reseller-link {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--text-primary) !important;
    text-decoration: none;
}

.rg-small-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    flex: 0 0 auto;
    color: #fff !important;
    background:
        linear-gradient(
            145deg,
            var(--red-primary),
            var(--red-dark)
        );
    border-radius: 9px;
    font-size: 11px;
    font-weight: 750;
}

.rg-direction-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border-radius: 9px;
}

.rg-direction-icon.incoming {
    color: #75e8bf;
    background: rgba(55, 214, 155, 0.10);
}

.rg-direction-icon.outgoing {
    color: #ff8a9c;
    background: rgba(255, 96, 117, 0.10);
}

.rg-type-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 720;
    white-space: nowrap;
}

.rg-type-success {
    color: #75e8bf !important;
    background: rgba(55, 214, 155, 0.08);
    border-color: rgba(55, 214, 155, 0.17);
}

.rg-type-danger {
    color: #ff8a9c !important;
    background: rgba(255, 96, 117, 0.08);
    border-color: rgba(255, 96, 117, 0.17);
}

.rg-type-primary {
    color: #ff8aa0 !important;
    background: rgba(255, 53, 87, 0.09);
    border-color: rgba(255, 53, 87, 0.18);
}

.rg-type-neutral {
    color: var(--text-secondary) !important;
    background: rgba(255, 255, 255, 0.04);
}

.rg-transaction-value {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-size: 14px;
    font-weight: 750;
    white-space: nowrap;
}

.rg-transaction-value small {
    font-size: 9px;
    font-weight: 600;
}

.rg-transaction-value.is-positive {
    color: #70e7bd;
}

.rg-transaction-value.is-negative {
    color: #ff7890;
}

.rg-description-cell {
    display: block;
    max-width: 310px;
    overflow: hidden;
    color: var(--text-secondary) !important;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rg-pagination {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

/* NOTIFICHE */

.rg-notification-stack {
    display: grid;
    gap: 12px;
}

.rg-notification-item {
    position: relative;
    display: flex;
    gap: 15px;
    padding: 19px;
    overflow: hidden;
    background:
        linear-gradient(
            145deg,
            rgba(23, 26, 34, 0.96),
            rgba(14, 16, 21, 0.96)
        );
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
}

.rg-notification-item::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--border-strong);
}

.rg-notification-item.is-unread::before {
    background: var(--red-primary);
}

.rg-notification-item.is-read {
    opacity: 0.82;
}

.rg-notification-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    flex: 0 0 auto;
    color: #ff8196;
    background: var(--red-soft);
    border: 1px solid rgba(255, 53, 87, 0.18);
    border-radius: 13px;
    font-size: 18px;
}

.rg-notification-content {
    min-width: 0;
    flex: 1;
}

.rg-notification-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.rg-notification-heading > div {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.rg-notification-heading h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 690;
}

.rg-notification-heading time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 10px;
    white-space: nowrap;
}

.rg-notification-content > p,
.rg-notification-message {
    margin: 10px 0 13px;
    color: var(--text-secondary) !important;
    font-size: 13px;
    line-height: 1.7;
}

.rg-notification-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rg-notification-actions form,
.rg-page-actions form {
    margin: 0;
}

.rg-new-pill,
.rg-read-pill {
    display: inline-flex;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.rg-new-pill {
    color: #ff8498;
    background: rgba(255, 53, 87, 0.11);
}

.rg-read-pill {
    color: #70e7bd;
    background: rgba(55, 214, 155, 0.09);
}

/* BROADCAST */

.rg-compose-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.55fr);
    gap: 19px;
}

.rg-compose-panel,
.rg-info-panel,
.rg-settings-panel,
.rg-upload-panel {
    padding: 22px;
    background:
        linear-gradient(
            145deg,
            rgba(23, 26, 34, 0.96),
            rgba(14, 16, 21, 0.96)
        );
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: var(--shadow-card);
}

.rg-panel-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 23px;
}

.rg-panel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    flex: 0 0 auto;
    color: #ff8196;
    background: var(--red-soft);
    border: 1px solid rgba(255, 53, 87, 0.18);
    border-radius: 13px;
    font-size: 17px;
}

.rg-panel-icon.telegram {
    color: #66c9f2;
    background: rgba(0, 136, 204, 0.11);
    border-color: rgba(0, 136, 204, 0.19);
}

.rg-panel-heading > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rg-panel-heading span:not(.rg-panel-icon) {
    color: var(--text-muted) !important;
    font-size: 9px;
    font-weight: 720;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.rg-panel-heading h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 690;
}

.rg-recipient-box {
    padding: 14px;
    background: rgba(255, 255, 255, 0.022);
    border: 1px solid var(--border-color);
    border-radius: 14px;
}

.rg-recipient-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 13px;
    margin-bottom: 12px;
}

.rg-recipient-header > div:first-child {
    display: flex;
    flex-direction: column;
}

.rg-recipient-header strong {
    color: var(--text-primary);
    font-size: 13px;
}

.rg-recipient-header small {
    color: var(--text-muted);
    font-size: 10px;
}

.rg-recipient-buttons {
    display: flex;
    gap: 7px;
}

.rg-recipient-list {
    display: grid;
    max-height: 310px;
    gap: 7px;
    overflow-y: auto;
    padding-right: 4px;
}

.rg-recipient-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 9px 11px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
    border-radius: 11px;
}

.rg-recipient-item:hover {
    background: rgba(255, 255, 255, 0.045);
}

.rg-recipient-item input {
    accent-color: var(--red-primary);
}

.rg-recipient-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.rg-recipient-copy strong {
    color: var(--text-primary);
    font-size: 12px;
}

.rg-recipient-copy small {
    color: var(--text-muted);
    font-size: 10px;
}

.rg-info-panel {
    position: relative;
    overflow: hidden;
}

.rg-info-panel::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: -130px;
    bottom: -130px;
    background: rgba(255, 53, 87, 0.13);
    border-radius: 999px;
}

.rg-info-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 22px;
    color: #ff8298;
    background: var(--red-soft);
    border: 1px solid rgba(255, 53, 87, 0.19);
    border-radius: 16px;
    font-size: 21px;
}

.rg-info-panel h2 {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--text-primary);
    font-size: 25px;
    font-weight: 740;
    letter-spacing: -0.04em;
}

.rg-info-panel > p {
    position: relative;
    z-index: 1;
    margin: 12px 0 23px;
    color: var(--text-secondary) !important;
    font-size: 13px;
    line-height: 1.7;
}

.rg-delivery-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
}

.rg-delivery-list > div {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.rg-delivery-list > div > i {
    width: 32px;
    color: #ff8196;
    font-size: 19px;
    text-align: center;
}

.rg-delivery-list span {
    display: flex;
    flex-direction: column;
}

.rg-delivery-list strong {
    color: var(--text-primary);
    font-size: 12px;
}

.rg-delivery-list small {
    color: var(--text-muted);
    font-size: 10px;
}

/* PROFILO */

.rg-profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 21px;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 95% 0,
            rgba(255, 53, 87, 0.17),
            transparent 22rem
        ),
        linear-gradient(
            145deg,
            rgba(24, 27, 36, 0.97),
            rgba(14, 16, 22, 0.97)
        );
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: var(--shadow-card);
}

.rg-profile-identity {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rg-profile-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    flex: 0 0 auto;
    color: #fff !important;
    background:
        linear-gradient(
            145deg,
            #ff4f6e,
            #d71d41
        );
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 20px;
    box-shadow: 0 17px 38px rgba(255, 53, 87, 0.22);
    font-size: 25px;
    font-weight: 780;
}

.rg-profile-identity h1 {
    margin: 0;
    color: var(--text-primary);
    font-size: 29px;
    font-weight: 760;
    letter-spacing: -0.045em;
}

.rg-profile-identity p {
    margin: 5px 0 0;
    color: var(--text-muted) !important;
    font-size: 12px;
}

.rg-profile-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.rg-profile-stats article,
.rg-license-metrics article {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    background:
        linear-gradient(
            145deg,
            rgba(23, 26, 34, 0.96),
            rgba(14, 16, 21, 0.96)
        );
    border: 1px solid var(--border-color);
    border-radius: 15px;
    box-shadow: var(--shadow-card);
}

.rg-profile-stat-icon,
.rg-license-metric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 41px;
    height: 41px;
    flex: 0 0 auto;
    color: #ff8196;
    background: var(--red-soft);
    border-radius: 12px;
}

.rg-profile-stat-icon.success,
.rg-license-metric-icon.success {
    color: #70e7bd;
    background: rgba(55, 214, 155, 0.09);
}

.rg-license-metric-icon.danger {
    color: #ff8196;
    background: rgba(255, 96, 117, 0.09);
}

.rg-profile-stats article > div,
.rg-license-metrics article > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

.rg-profile-stats small,
.rg-license-metrics small {
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 690;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.rg-profile-stats strong,
.rg-license-metrics strong {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 19px;
    font-weight: 740;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rg-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.rg-connected-account {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 17px;
    padding: 13px;
    color: #70e7bd;
    background: rgba(55, 214, 155, 0.08);
    border: 1px solid rgba(55, 214, 155, 0.18);
    border-radius: 12px;
}

.rg-connected-account > span {
    font-size: 20px;
}

.rg-connected-account > div {
    display: flex;
    flex-direction: column;
}

.rg-connected-account strong {
    color: var(--text-primary);
    font-size: 12px;
}

.rg-connected-account small {
    color: #70e7bd;
    font-size: 10px;
}

.rg-notification-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 14px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.rg-notification-toggle > span {
    display: flex;
    flex-direction: column;
}

.rg-notification-toggle strong {
    color: var(--text-primary);
    font-size: 12px;
}

.rg-notification-toggle small {
    color: var(--text-muted);
    font-size: 10px;
}

.rg-notification-toggle input {
    width: 38px;
    height: 20px;
    accent-color: var(--red-primary);
}

.rg-telegram-empty p {
    color: var(--text-secondary) !important;
    line-height: 1.65;
}

.rg-telegram-code {
    display: flex;
    margin: 17px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    padding: 16px;
    background: rgba(0, 136, 204, 0.08);
    border: 1px solid rgba(0, 136, 204, 0.18);
    border-radius: 13px;
}

.rg-telegram-code small,
.rg-telegram-code span {
    color: var(--text-secondary);
    font-size: 10px;
}

.rg-telegram-code strong {
    color: #70cff4;
    font-size: 24px;
    letter-spacing: 0.10em;
}

.rg-setup-steps {
    margin: 18px 0 0;
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.9;
}

.rg-security-note {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 15px 0 0;
    color: var(--text-muted) !important;
    font-size: 10px;
}

.rg-summary-list {
    display: grid;
    gap: 9px;
}

.rg-summary-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
    border-radius: 11px;
}

.rg-summary-list span {
    color: var(--text-secondary) !important;
    font-size: 12px;
}

.rg-summary-list strong {
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 730;
}

.rg-summary-list strong.primary {
    color: #ff7890;
}

.rg-summary-list strong.success {
    color: #70e7bd;
}

/* LICENZE */

.rg-license-code {
    display: inline-block;
    max-width: 300px;
    overflow: hidden;
    padding: 8px 10px;
    color: #ff8ca0;
    background: rgba(0, 0, 0, 0.29);
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 9px;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rg-status-warning {
    color: #f7d77d !important;
    background: rgba(244, 201, 93, 0.09);
    border-color: rgba(244, 201, 93, 0.18);
}

.rg-status-warning > span {
    background: var(--warning);
}

.rg-status-neutral {
    color: var(--text-secondary) !important;
    background: rgba(255, 255, 255, 0.04);
}

.rg-status-neutral > span {
    background: var(--text-muted);
}

.rg-license-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 18px;
}

.rg-upload-panel {
    margin-bottom: 18px;
}

.rg-upload-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.rg-license-textarea {
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;
    line-height: 1.7;
}

.rg-helper-text {
    display: block;
    margin-top: 7px;
    color: var(--text-muted) !important;
    font-size: 10px;
}

.rg-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 17px;
}

.rg-section-heading h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
}

.rg-table-note {
    margin: 15px 0 0;
    color: var(--text-muted) !important;
    font-size: 11px;
    text-align: center;
}

/* ULTERIORE RIFINITURA LICENZE RESELLER */

.route-reseller-licenses .content-area > h2 {
    color: var(--text-primary) !important;
    font-size: clamp(29px, 4vw, 41px);
    font-weight: 770;
    letter-spacing: -0.05em;
}

.route-reseller-licenses
.content-area > .d-flex.gap-2.mb-4 {
    padding: 10px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
    border-radius: 13px;
}

.route-reseller-licenses
.content-area > .row > [class*="col-"] {
    display: flex;
}

.route-reseller-licenses
.content-area > .row > [class*="col-"] > .card {
    width: 100%;
}

.route-reseller-licenses .card-body code {
    margin: 10px 0;
    padding: 12px !important;
    color: #ff8ca0;
    background: rgba(0, 0, 0, 0.29);
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 10px;
}

.route-reseller-licenses .renew-options-box {
    padding: 12px;
    background: rgba(255, 255, 255, 0.022);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

/* RESPONSIVE */

@media (max-width: 1100px) {
    .rg-compose-layout {
        grid-template-columns: 1fr;
    }

    .rg-profile-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .rg-profile-grid {
        grid-template-columns: 1fr;
    }

    .rg-license-metrics {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .rg-notification-item {
        flex-direction: column;
    }

    .rg-notification-heading {
        flex-direction: column;
    }

    .rg-profile-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .rg-profile-stats {
        grid-template-columns: 1fr 1fr;
    }

    .rg-recipient-header {
        align-items: stretch;
        flex-direction: column;
    }

    .rg-recipient-buttons {
        flex-direction: column;
    }

    .rg-recipient-buttons .btn {
        width: 100%;
    }

    .rg-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 450px) {
    .rg-profile-stats {
        grid-template-columns: 1fr;
    }

    .rg-profile-identity {
        align-items: flex-start;
        flex-direction: column;
    }

    .rg-profile-avatar {
        width: 58px;
        height: 58px;
        border-radius: 17px;
    }
}

/* REDGEN OPERATIONS PHASE END */

/* REDGEN ERROR PAGES V1 START */

.rg-error-page {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--text-primary);
    background:
        radial-gradient(
            circle at 15% 15%,
            rgba(255, 53, 87, 0.12),
            transparent 28rem
        ),
        radial-gradient(
            circle at 90% 90%,
            rgba(255, 53, 87, 0.07),
            transparent 30rem
        ),
        #090a0e;
}

.rg-error-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.018) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.018) 1px,
            transparent 1px
        );
    background-size: 44px 44px;
    mask-image:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.75),
            transparent
        );
}

.rg-error-shell {
    position: relative;
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 34px 20px;
}

.rg-error-card {
    position: relative;
    z-index: 2;
    width: min(100%, 760px);
    overflow: hidden;
    background:
        linear-gradient(
            145deg,
            rgba(24, 27, 36, 0.98),
            rgba(12, 14, 19, 0.98)
        );
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 23px;
    box-shadow:
        0 38px 100px rgba(0, 0, 0, 0.48),
        0 0 0 1px rgba(255, 53, 87, 0.035);
}

.rg-error-card::after {
    content: "";
    position: absolute;
    width: 330px;
    height: 330px;
    right: -190px;
    bottom: -220px;
    pointer-events: none;
    background: rgba(255, 53, 87, 0.13);
    border-radius: 999px;
    filter: blur(5px);
}

.rg-error-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 19px 22px;
    border-bottom: 1px solid var(--border-color);
}

.rg-error-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 39px;
    height: 39px;
    flex: 0 0 auto;
    color: #ffffff;
    background:
        linear-gradient(
            145deg,
            #ff4d6c,
            #d81e42
        );
    border-radius: 12px;
    box-shadow: 0 9px 23px rgba(255, 53, 87, 0.23);
    font-size: 16px;
}

.rg-error-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.rg-error-brand-copy strong {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 760;
    letter-spacing: -0.04em;
}

.rg-error-brand-copy small {
    color: var(--text-muted);
    font-size: 8px;
    font-weight: 750;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.rg-error-content {
    position: relative;
    z-index: 2;
    padding: 48px 48px 44px;
}

.rg-error-visual {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 29px;
}

.rg-error-code {
    color: transparent;
    background:
        linear-gradient(
            135deg,
            #ffffff,
            #bfc1cb 48%,
            #626672
        );
    background-clip: text;
    -webkit-background-clip: text;
    font-size: clamp(74px, 14vw, 128px);
    font-weight: 820;
    letter-spacing: -0.085em;
    line-height: 0.8;
}

.rg-error-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 75px;
    height: 75px;
    flex: 0 0 auto;
    color: #ff8298;
    background:
        linear-gradient(
            145deg,
            rgba(255, 53, 87, 0.18),
            rgba(255, 53, 87, 0.055)
        );
    border: 1px solid rgba(255, 53, 87, 0.22);
    border-radius: 22px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 16px 35px rgba(255, 53, 87, 0.11);
    font-size: 29px;
}

.rg-error-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--red-primary);
    font-size: 10px;
    font-weight: 760;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.rg-error-content h1 {
    max-width: 600px;
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(29px, 5vw, 44px);
    font-weight: 780;
    letter-spacing: -0.055em;
    line-height: 1.08;
}

.rg-error-content > p {
    max-width: 620px;
    margin: 15px 0 27px;
    color: var(--text-secondary) !important;
    font-size: 14px;
    line-height: 1.75;
}

.rg-error-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.rg-error-actions .btn {
    display: inline-flex;
    min-height: 47px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-right: 17px;
    padding-left: 17px;
}

.rg-error-primary {
    box-shadow: 0 12px 28px rgba(255, 53, 87, 0.19);
}

.rg-error-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 22px;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.13);
    border-top: 1px solid var(--border-color);
}

.rg-error-footer > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 650;
}

.rg-error-footer small {
    font-size: 9px;
}

.rg-error-status-dot {
    width: 7px;
    height: 7px;
    background: var(--success);
    border-radius: 999px;
    box-shadow: 0 0 10px rgba(55, 214, 155, 0.55);
}

.rg-error-background-code {
    position: fixed;
    z-index: 0;
    right: -4vw;
    bottom: -8vw;
    pointer-events: none;
    color: rgba(255, 255, 255, 0.018);
    font-size: clamp(260px, 42vw, 680px);
    font-weight: 850;
    letter-spacing: -0.12em;
    line-height: 0.7;
    user-select: none;
}

@media (max-width: 650px) {
    .rg-error-shell {
        padding: 18px 13px;
    }

    .rg-error-content {
        padding: 35px 22px 31px;
    }

    .rg-error-visual {
        align-items: flex-end;
    }

    .rg-error-icon {
        width: 59px;
        height: 59px;
        border-radius: 18px;
        font-size: 23px;
    }

    .rg-error-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .rg-error-actions .btn {
        width: 100%;
    }

    .rg-error-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* REDGEN ERROR PAGES V1 END */
