:root {
    --mstoo-primary: #D93F46;
    --mstoo-primary-dark: #AC2A29;
    --mstoo-primary-soft: #FDECEC;
    --mstoo-accent: #D93F46;
    --mstoo-gradient: linear-gradient(135deg, #D93F46 0%, #AC2A29 100%);
    --mstoo-sidebar: #FFFFFF;
    --mstoo-sidebar-hover: #F7F8FA;
    --mstoo-sidebar-text: #374151;
    --mstoo-sidebar-muted: #9CA3AF;
    --mstoo-sidebar-active: #111827;
    --mstoo-bg: #F7F8FA;
    --mstoo-card: #FFFFFF;
    --mstoo-border: #E5E7EB;
    --mstoo-text: #172033;
    --mstoo-title: #111827;
    --mstoo-muted: #667085;
    --mstoo-success: #16A34A;
    --mstoo-warning: #F59E0B;
    --mstoo-danger: #DC2626;
    --mstoo-info: #2563EB;
    --mstoo-radius: 16px;
    --mstoo-radius-sm: 10px;
    --mstoo-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 8px 24px rgba(17, 24, 39, 0.04);
    --mstoo-transition: 180ms ease;
    --c1: #D93F46;
    --c2: #AC2A29;
    --c1-light-bg: #FDECEC;
    --body-bg: #F7F8FA;
    --bg-color: #F7F8FA;
    --link-color: #D93F46;
    --title-font: "Inter", "Public Sans", sans-serif;
    --body-font: "Inter", "Public Sans", sans-serif;
}

body {
    background: var(--mstoo-bg);
    color: var(--mstoo-text);
    font-family: var(--body-font);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.form-control:focus,
.btn:focus-visible {
    outline: 2px solid var(--mstoo-primary) !important;
    outline-offset: 2px;
}

.main-content {
    padding-top: 1.25rem;
    padding-bottom: 2rem;
}

.page-title {
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--mstoo-title);
    font-size: 1.75rem;
    line-height: 1.2;
}

.page-title-wrap {
    margin-bottom: 1.35rem;
}

.page-title-wrap .text-muted,
.page-kicker {
    color: var(--mstoo-muted);
    font-size: 0.9rem;
}

.card {
    border: 1px solid var(--mstoo-border);
    box-shadow: var(--mstoo-shadow);
    border-radius: var(--mstoo-radius);
    background: var(--mstoo-card);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--mstoo-border);
    padding: 1rem 1.25rem;
}

.card-header h4,
.card-header h5 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 650;
    color: var(--mstoo-title);
}

.card-body {
    padding: 1.25rem 1.35rem;
}

/* Header */
.header {
    background: #FFFFFF;
    border-bottom: 1px solid var(--mstoo-border);
    box-shadow: none;
    min-height: 72px;
}

.header .aside-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #F7F8FA;
    border: 1px solid var(--mstoo-border) !important;
    color: var(--mstoo-title) !important;
}

.header .aside-toggle:hover {
    background: var(--mstoo-primary-soft);
    border-color: #F4C7CA !important;
    color: var(--mstoo-primary) !important;
}

.header .search-form {
    min-width: 280px;
}

.header .search-form__input {
    border-radius: 999px;
    background: #F7F8FA;
    border: 1px solid var(--mstoo-border);
    min-height: 42px;
    padding-inline-start: 2.5rem;
}

.header-icon,
.count-btn,
.header .user-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #F7F8FA;
    border: 1px solid var(--mstoo-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--mstoo-title);
    transition: background var(--mstoo-transition), border-color var(--mstoo-transition);
}

.header-icon:hover,
.count-btn:hover {
    background: var(--mstoo-primary-soft);
    border-color: #F4C7CA;
    color: var(--mstoo-primary);
}

.count-btn .count {
    background: var(--mstoo-primary);
    min-width: 16px;
    height: 16px;
    font-size: 10px;
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.2rem 0.45rem 0.2rem 0.2rem;
    border-radius: 999px;
    border: 1px solid var(--mstoo-border);
    background: #fff;
    text-decoration: none;
    color: inherit;
}

.header-profile:hover {
    border-color: #F4C7CA;
}

.header-profile img {
    width: 34px;
    height: 34px;
    object-fit: cover;
}

.header-profile .meta {
    line-height: 1.15;
    text-align: start;
}

.header-profile .meta strong {
    display: block;
    font-size: 0.82rem;
    color: var(--mstoo-title);
}

.header-profile .meta span {
    font-size: 0.72rem;
    color: var(--mstoo-muted);
    text-transform: capitalize;
}

.header-dropdown {
    min-width: 240px;
    border: 1px solid var(--mstoo-border);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(17, 24, 39, 0.12);
    padding: 0.5rem;
}

.header-dropdown .dropdown-item,
.header-dropdown .dropdown-item-text {
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
}

.header-notify-item {
    display: block;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
}

.header-notify-item:hover {
    background: #F7F8FA;
}

.header-notify-item strong {
    display: block;
    font-size: 0.82rem;
    color: var(--mstoo-title);
}

.header-notify-item span {
    display: block;
    font-size: 0.75rem;
    color: var(--mstoo-muted);
}

/* Sidebar */
.aside {
    background: #FFFFFF;
    box-shadow: 1px 0 0 var(--mstoo-border);
    color: var(--mstoo-sidebar-text);
    border-inline-end: 1px solid var(--mstoo-border);
}

.aside-header {
    border-bottom: 1px solid var(--mstoo-border);
    min-height: 64px;
    height: 64px;
    padding: 0.55rem 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.aside .aside-brand,
.aside .logo,
.aside-header > a {
    align-items: center;
    gap: 0 !important;
    min-width: 0;
    display: inline-flex;
    max-width: 100%;
    text-decoration: none;
}

.aside .main-logo {
    display: block;
    max-height: 32px !important;
    height: 32px !important;
    width: auto !important;
    max-width: 110px !important;
    object-fit: contain;
    padding: 0;
}

.aside .mobile-logo {
    display: none;
    max-height: 28px !important;
    height: 28px !important;
    width: auto !important;
    max-width: 28px !important;
    object-fit: contain;
    padding: 0;
}

.aside .logo img,
.aside-header > a img,
.aside-header img {
    mix-blend-mode: normal;
}

.aside .brand-text {
    color: var(--mstoo-title);
    font-weight: 800;
    letter-spacing: 0.12em;
    font-size: 0.9rem;
    line-height: 1;
}

.aside .brand-text small {
    display: block;
    color: var(--mstoo-sidebar-muted);
    font-weight: 500;
    letter-spacing: 0.16em;
    font-size: 0.62rem;
    margin-top: 5px;
}

.aside-header .aside-toggle,
.aside-header .toggle-menu-button {
    color: var(--mstoo-title) !important;
    flex-shrink: 0;
}

.aside-body .user-profile {
    background: #F7F8FA;
    border: 1px solid var(--mstoo-border);
    border-radius: 14px;
    padding: 0.8rem;
    margin-bottom: 1rem;
}

.aside-body .user-profile .card-title {
    color: var(--mstoo-title);
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.aside-body .user-profile .card-text {
    color: var(--mstoo-sidebar-muted);
    text-transform: capitalize;
    font-size: 0.75rem;
}

.aside-body .nav li.nav-category {
    color: var(--mstoo-sidebar-muted);
    letter-spacing: 0.1em;
    padding: 1rem 0.35rem 0.4rem;
    font-size: 0.68rem;
    font-weight: 650;
    text-transform: uppercase;
}

.aside-body .nav li {
    padding: 0.12rem 0;
}

.aside-body .nav li > a {
    color: var(--mstoo-sidebar-text);
    padding: 0.62rem 0.75rem;
    border-radius: 10px;
    align-items: center;
    transition: background var(--mstoo-transition), color var(--mstoo-transition);
}

.aside-body .nav li > a:hover {
    background: var(--mstoo-sidebar-hover);
    color: var(--mstoo-title);
}

.aside-body .nav li > a.active-menu,
.aside-body .nav li.active-menu > a,
.aside-body .nav li .active-menu {
    background: var(--mstoo-gradient);
    color: #fff;
    box-shadow: none;
}

.aside-body .nav li > a.active-menu .material-icons,
.aside-body .nav li .active-menu .material-icons {
    color: #fff !important;
}

.aside-body .nav li > a .material-icons {
    font-size: 1.2rem;
    opacity: 0.92;
}

.aside-body .nav ul.sub-menu {
    background: #F9FAFB;
    border-radius: 10px;
    margin-top: 0.3rem;
}

.aside-body .nav ul.sub-menu a {
    color: var(--mstoo-sidebar-text);
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    display: block;
}

.aside-body .nav ul.sub-menu a.active-menu,
.aside-body .nav ul.sub-menu a:hover {
    color: var(--mstoo-primary);
    background: var(--mstoo-primary-soft);
}

.aside-body .nav li .link-title .count {
    background: var(--mstoo-primary);
    min-width: 1.45rem;
    text-align: center;
    border-radius: 999px;
    font-size: 0.7rem;
}

.aside-body {
    max-block-size: calc(100% - 132px);
}

.aside-body .nav li.has-sub-item:after {
    color: var(--mstoo-sidebar-muted);
}

.aside-footer {
    padding: 1rem 1.15rem 1.2rem;
    border-top: 1px solid var(--mstoo-border);
}

.aside-footer .logout-btn {
    width: 100%;
    color: var(--mstoo-primary);
    background: var(--mstoo-primary-soft);
    border: 0;
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.aside-footer .logout-btn:hover {
    background: #FAD7D9;
    color: var(--mstoo-primary-dark);
}

body.aside-folded:not(.open-aside-folded) .aside .brand-text {
    display: none !important;
}

body.aside-folded.open-aside-folded .aside .brand-text {
    display: inline !important;
}

body.aside-folded .aside .brand-text,
body.aside-folded:not(.open-aside-folded) .aside-footer .logout-btn {
    overflow: hidden;
}

body.aside-folded:not(.open-aside-folded) .aside {
    background: #FFFFFF;
}

body.aside-folded:not(.open-aside-folded) .aside-header {
    justify-content: center;
    padding: 0.5rem 0.35rem;
    min-height: 56px;
    height: 56px;
}

body.aside-folded:not(.open-aside-folded) .aside .main-logo {
    display: none !important;
}

body.aside-folded:not(.open-aside-folded) .aside .mobile-logo {
    display: block !important;
    max-height: 26px !important;
    height: 26px !important;
    max-width: 26px !important;
    margin: 0 auto;
}

body.aside-folded:not(.open-aside-folded) .aside-body .user-profile {
    display: none !important;
}

body.aside-folded:not(.open-aside-folded) .aside-body .nav li {
    padding: 0.2rem 0;
}

body.aside-folded:not(.open-aside-folded) .aside-body .nav li > a {
    justify-content: center;
    padding: 0.55rem 0.35rem;
}

body.aside-folded:not(.open-aside-folded) .aside-body .nav li > a.active-menu {
    color: #fff;
}

body.aside-folded:not(.open-aside-folded) .aside-body .nav li > a.active-menu .material-icons {
    color: #fff !important;
}

body.aside-folded:not(.open-aside-folded) .aside-footer {
    padding: 0.75rem 0.4rem 1rem;
}

body.aside-folded:not(.open-aside-folded) .aside-footer .logout-btn {
    justify-content: center;
    padding-inline: 0.4rem;
}

body.aside-folded:not(.open-aside-folded) .aside-footer .logout-btn span:not(.material-icons) {
    display: none;
}

body.aside-folded.open-aside-folded .aside .main-logo {
    display: block !important;
}

body.aside-folded.open-aside-folded .aside .mobile-logo {
    display: none !important;
}

/* KPI */
.mstoo-kpi {
    background: var(--mstoo-card);
    border: 1px solid var(--mstoo-border);
    border-radius: 16px;
    box-shadow: var(--mstoo-shadow);
    padding: 1.25rem 1.3rem;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.mstoo-kpi .kpi-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.mstoo-kpi .kpi-label {
    color: var(--mstoo-muted);
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.mstoo-kpi .kpi-value {
    font-size: 1.85rem;
    font-weight: 750;
    color: var(--mstoo-title);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.mstoo-kpi .kpi-meta {
    margin-top: 0.45rem;
    font-size: 0.78rem;
    color: var(--mstoo-muted);
}

.mstoo-kpi .kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--mstoo-primary);
    background: var(--mstoo-primary-soft);
    flex: 0 0 auto;
}

.mstoo-kpi .kpi-icon.customers { color: var(--mstoo-primary); background: var(--mstoo-primary-soft); }
.mstoo-kpi .kpi-icon.services { color: #111827; background: #EEF2F6; }
.mstoo-kpi .kpi-icon.upcoming { color: #B45309; background: #FFF7ED; }
.mstoo-kpi .kpi-icon.completed { color: #166534; background: #ECFDF3; }
.mstoo-kpi .kpi-icon.pending { color: #B45309; background: #FFF7ED; }
.mstoo-kpi .kpi-icon.new { color: var(--mstoo-primary); background: var(--mstoo-primary-soft); }
.mstoo-kpi .kpi-icon.revenue { color: #166534; background: #ECFDF3; }
.mstoo-kpi .kpi-icon.canceled { color: #B91C1C; background: #FEF2F2; }

.mstoo-panel {
    border: 1px solid var(--mstoo-border);
    border-radius: 16px;
    box-shadow: var(--mstoo-shadow);
    background: #fff;
    height: 100%;
}

.mstoo-panel .panel-head {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--mstoo-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.mstoo-panel .panel-head h5 {
    margin: 0;
    font-weight: 700;
    color: var(--mstoo-title);
    font-size: 1.05rem;
}

.mstoo-panel .panel-body {
    padding: 0.5rem 0.5rem 0.9rem;
}

.mstoo-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border-radius: 12px;
    cursor: pointer;
}

.mstoo-list-item:hover {
    background: #F7F8FA;
}

.mstoo-list-item h6 {
    margin: 0 0 0.15rem;
    color: var(--mstoo-title);
    font-weight: 650;
}

.mstoo-list-item p {
    margin: 0;
    color: var(--mstoo-muted);
    font-size: 0.78rem;
}

.mstoo-table {
    margin: 0;
}

.mstoo-table thead th {
    background: #F7F8FA;
}

.mstoo-badge,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border-radius: 999px;
    padding: 0.26rem 0.68rem;
    font-size: 0.72rem;
    font-weight: 650;
    text-transform: capitalize;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.mstoo-badge.accepted,
.mstoo-badge.upcoming,
.mstoo-badge.pending { background: #FFF7ED; color: #B45309; }
.mstoo-badge.completed,
.mstoo-badge.approved,
.mstoo-badge.paid,
.mstoo-badge.active { background: #ECFDF3; color: #166534; }
.mstoo-badge.ongoing,
.mstoo-badge.processing { background: #EFF6FF; color: #1D4ED8; }
.mstoo-badge.canceled,
.mstoo-badge.cancelled,
.mstoo-badge.rejected,
.mstoo-badge.unpaid,
.mstoo-badge.expired { background: #FEF2F2; color: #B91C1C; }
.mstoo-badge.inactive,
.mstoo-badge.draft { background: #F3F4F6; color: #4B5563; }

.table {
    --bs-table-bg: transparent;
}

.table thead th {
    background: #F7F8FA;
    color: var(--mstoo-muted);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 700;
    border-bottom: 1px solid var(--mstoo-border);
    white-space: nowrap;
    padding: 0.8rem 0.95rem;
}

.table tbody td {
    vertical-align: middle;
    border-color: #EEF2F6;
    padding: 0.85rem 0.95rem;
    color: var(--mstoo-text);
}

.table tbody tr:hover {
    background: #F8FAFC;
}

.table-responsive {
    border-radius: 12px;
}

.pagination .page-link {
    border-radius: 8px !important;
    margin: 0 0.15rem;
    border-color: var(--mstoo-border);
    color: var(--mstoo-text);
}

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

.nav--tabs {
    gap: 0.35rem;
}

.nav--tabs .nav-link {
    border-radius: 999px;
    padding: 0.45rem 0.95rem;
    color: var(--mstoo-muted);
    font-weight: 600;
}

.nav--tabs .nav-link.active {
    background: var(--mstoo-primary);
    color: #fff;
}

.btn {
    min-height: 40px;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.45rem 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: background var(--mstoo-transition), border-color var(--mstoo-transition), color var(--mstoo-transition), box-shadow var(--mstoo-transition);
}

.btn .material-icons {
    font-size: 1.1rem;
}

.btn--primary,
.btn.btn--primary,
.btn-primary {
    background: var(--mstoo-gradient);
    border-color: transparent;
    color: #fff;
}

.btn--primary:hover,
.btn.btn--primary:hover,
.btn-primary:hover {
    background: var(--mstoo-gradient);
    filter: brightness(0.94);
    border-color: transparent;
    color: #fff;
}

.btn--secondary,
.btn.btn--secondary {
    background: #fff;
    border: 1px solid var(--mstoo-border);
    color: var(--mstoo-title);
}

.btn--secondary:hover,
.btn.btn--secondary:hover {
    background: #F7F8FA;
    color: var(--mstoo-title);
}

.btn--danger,
.btn.btn-danger,
.btn-outline-danger {
    border-radius: 10px;
}

.btn-ghost {
    background: transparent;
    border: 0;
    color: var(--mstoo-muted);
}

.form-control,
.form-select,
.theme-input-style,
.select2-container--default .select2-selection--single {
    border-radius: 10px;
    border-color: var(--mstoo-border);
    min-height: 42px;
}

.form-control:focus,
.theme-input-style:focus,
.form-select:focus {
    border-color: var(--mstoo-primary);
    box-shadow: 0 0 0 0.2rem var(--mstoo-primary-soft);
}

.form-label,
.form-floating > label {
    color: var(--mstoo-title);
    font-weight: 600;
    font-size: 0.82rem;
}

.form-floating > label::after {
    content: none;
}

.required-star {
    color: var(--mstoo-danger);
}

.mstoo-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--mstoo-muted);
}

.mstoo-empty .material-icons {
    font-size: 2.4rem;
    color: #C4C9D2;
    margin-bottom: 0.55rem;
}

.mstoo-empty h4 {
    color: var(--mstoo-title);
    font-weight: 700;
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.mstoo-empty p {
    margin-bottom: 0.9rem;
}

.footer {
    color: var(--mstoo-muted);
    border-top: 1px solid var(--mstoo-border);
    padding-top: 1rem;
}

.modal-content {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 24px 50px rgba(17, 24, 39, 0.16);
}

.modal-header,
.modal-footer {
    border-color: var(--mstoo-border);
}

.swal2-popup {
    border-radius: 16px !important;
}

.swal2-confirm {
    background-color: var(--mstoo-primary) !important;
}

button.is-loading,
.btn.is-loading {
    pointer-events: none;
    opacity: 0.75;
    position: relative;
}

.mstoo-skeleton {
    background: linear-gradient(90deg, #EEF2F6 25%, #F8FAFC 37%, #EEF2F6 63%);
    background-size: 400% 100%;
    animation: mstoo-shimmer 1.2s ease infinite;
    border-radius: 10px;
    min-height: 14px;
}

@keyframes mstoo-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

.login-page {
    min-height: 100vh;
    margin: 0;
    background: #F3F4F6;
    font-family: Inter, "Public Sans", sans-serif;
    overflow-x: hidden;
}

.login-stage {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(380px, 0.95fr) minmax(420px, 1.05fr);
}

.login-brand {
    background:
        radial-gradient(1200px 520px at -10% -10%, rgba(255, 255, 255, 0.22), transparent 52%),
        radial-gradient(800px 420px at 110% 110%, rgba(0, 0, 0, 0.18), transparent 48%),
        linear-gradient(160deg, #D93F46 0%, #C4333A 42%, #AC2A29 100%);
    color: #fff;
    padding: 3.25rem 3.5rem 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.login-brand-art {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
}

.login-orb-a {
    width: 340px;
    height: 340px;
    right: -120px;
    top: -80px;
    background: rgba(255, 255, 255, 0.08);
}

.login-orb-b {
    width: 240px;
    height: 240px;
    left: -90px;
    bottom: 12%;
    background: rgba(0, 0, 0, 0.12);
}

.login-orb-c {
    width: 18px;
    height: 18px;
    right: 18%;
    top: 28%;
    background: rgba(255, 255, 255, 0.35);
    filter: none;
}

.login-ring {
    position: absolute;
    width: 420px;
    height: 420px;
    right: -160px;
    bottom: -180px;
    border: 18px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.login-brand-inner,
.login-brand-foot {
    position: relative;
    z-index: 1;
}

.login-logo-plate {
    width: 188px;
    height: 188px;
    background: #ffffff;
    border-radius: 28px;
    display: grid;
    place-items: center;
    padding: 1.1rem;
    margin-bottom: 2.15rem;
    box-shadow: 0 18px 40px rgba(92, 16, 20, 0.22);
}

.login-logo-img {
    width: 100%;
    height: 100% !important;
    max-width: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
}

.login-kicker {
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 0.55rem;
}

.login-brand h1 {
    font-size: clamp(2rem, 3.2vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.08;
    margin-bottom: 0.85rem;
    color: #fff !important;
    max-width: 12ch;
}

.login-lead {
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.02rem;
    line-height: 1.55;
    max-width: 28rem;
    margin-bottom: 1.85rem;
}

.login-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.55rem;
    max-width: 26rem;
}

.login-points li {
    color: #fff;
    font-size: 0.92rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.login-points li .material-icons {
    font-size: 18px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.16);
    flex-shrink: 0;
}

.login-brand-foot {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.82rem;
    margin: 2rem 0 0;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.75rem;
    background:
        radial-gradient(720px 280px at 80% 0%, rgba(217, 63, 70, 0.06), transparent 60%),
        #F4F5F7;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border: 1px solid #ECEFF3;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(17, 24, 39, 0.08);
    padding: 2.4rem 2.2rem 2.1rem;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--mstoo-gradient);
}

.login-card-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.85rem;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    background: #FDECEC;
    color: #AC2A29;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.login-card h2 {
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 0.3rem;
    color: var(--mstoo-title);
    font-size: 1.7rem;
}

.login-card-copy {
    color: var(--mstoo-muted);
    margin-bottom: 1.55rem;
    font-size: 0.95rem;
}

.login-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #344054;
    margin-bottom: 0.4rem;
}

.login-control {
    position: relative;
}

.login-control > .material-icons:first-child {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #98A2B3;
    font-size: 20px;
    pointer-events: none;
}

.login-control .togglePassword {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #667085;
    font-size: 20px;
    cursor: pointer;
    user-select: none;
}

.login-card .form-control {
    min-height: 52px;
    padding-left: 44px;
    padding-right: 42px;
    border-radius: 12px;
    border-color: #E4E7EC;
    background: #FCFCFD;
}

.login-card .form-control:focus {
    background: #fff;
    border-color: #D93F46;
    box-shadow: 0 0 0 4px rgba(217, 63, 70, 0.12);
}

.login-card .btn--primary,
.login-card .login-submit {
    min-height: 50px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(172, 42, 41, 0.28);
}

.login-back {
    display: inline-block;
    color: var(--mstoo-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

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

@media (max-width: 1199px) {
    .header {
        z-index: 1032;
    }

    .aside {
        inset-block-start: 72px;
        block-size: calc(100% - 72px);
    }
}

@media (max-width: 991px) {
    .login-stage {
        grid-template-columns: 1fr;
        min-height: 100vh;
    }

    .login-brand {
        min-height: auto;
        padding: 1.35rem 1.35rem 1.15rem;
        justify-content: flex-start;
    }

    .login-brand h1 {
        font-size: 1.55rem;
        max-width: none;
        margin-bottom: 0;
    }

    .login-logo-plate {
        width: 84px;
        height: 84px;
        border-radius: 18px;
        padding: 0.45rem;
        margin-bottom: 0.9rem;
    }

    .login-kicker {
        margin-bottom: 0.25rem;
    }

    .login-lead,
    .login-points,
    .login-brand-foot,
    .login-brand-art {
        display: none;
    }

    .login-panel {
        padding: 1.25rem 1rem 2rem;
        align-items: flex-start;
    }

    .login-card {
        padding: 1.6rem 1.2rem 1.4rem;
        max-width: none;
    }

    .header-profile .meta {
        display: none;
    }
}

@media (max-width: 767px) {
    .table-responsive {
        overflow-x: auto;
    }

    .mstoo-kpi .kpi-value {
        font-size: 1.45rem;
    }

    .page-title {
        font-size: 1.35rem;
    }

    .header .search-form {
        min-width: 0;
    }

    .btn, .form-control {
        min-height: 42px;
    }
}

[theme="dark"] {
    --mstoo-bg: #18181A;
    --mstoo-card: #232325;
    --mstoo-border: #3A3A3D;
    --mstoo-text: #D5D8DC;
    --mstoo-title: #fff;
    --body-bg: #18181A;
}

[theme="dark"] .mstoo-kpi,
[theme="dark"] .mstoo-panel,
[theme="dark"] .card,
[theme="dark"] .header {
    background: #232325;
    border-color: #3A3A3D;
}

[theme="dark"] .table thead th,
[theme="dark"] .mstoo-list-item:hover {
    background: #2A2A2C;
}

.mstoo-notify-card .card-header h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--mstoo-title);
}

.mstoo-target-options {
    display: grid;
    gap: 0.75rem;
}

.mstoo-target-option {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.9rem 1rem;
    border: 1px solid var(--mstoo-border);
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 0;
}

.mstoo-target-option input {
    margin-top: 0.2rem;
}

.mstoo-target-option small {
    display: block;
    color: var(--mstoo-muted);
}

.mstoo-target-option:has(input:checked) {
    border-color: var(--mstoo-primary);
    background: var(--mstoo-primary-soft);
}

.mstoo-upload {
    position: relative;
    border: 1px dashed var(--mstoo-border);
    border-radius: 14px;
    padding: 1rem;
    text-align: center;
    background: #F7F8FA;
}

.mstoo-upload-preview {
    position: relative;
}

.mstoo-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.mstoo-upload img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 10px;
}

.mstoo-upload-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    position: relative;
    z-index: 2;
}

.mstoo-stat-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--mstoo-border);
}

.mstoo-stat-row:last-child {
    border-bottom: 0;
}

.blog-content img {
    max-width: 100%;
    height: auto;
}

.blog-content table {
    width: 100%;
    overflow-x: auto;
    display: block;
}

.mstoo-perm-list {
    display: grid;
    gap: 1rem;
}

.mstoo-perm-module {
    border: 1px solid var(--mstoo-border);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.mstoo-perm-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    background: #F7F8FA;
}

.mstoo-perm-toggle {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0;
    flex: 1;
}

.mstoo-perm-caret {
    transition: transform 0.2s ease;
}

.mstoo-perm-module.is-open .mstoo-perm-caret {
    transform: rotate(180deg);
}

.mstoo-perm-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.mstoo-perm-count {
    font-size: 0.85rem;
    color: var(--mstoo-muted);
    font-weight: 600;
}

.mstoo-perm-body {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    padding: 1rem 1.1rem 1.15rem;
    border-top: 1px solid var(--mstoo-border);
}

.mstoo-perm-module.is-open .mstoo-perm-body {
    display: grid;
}

.mstoo-perm-item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--mstoo-border);
    border-radius: 10px;
    cursor: pointer;
}

.mstoo-perm-item:has(input:checked) {
    border-color: var(--mstoo-primary);
    background: var(--mstoo-primary-soft);
}

.mstoo-module-cell {
    max-width: 420px;
}

.settings-sidebar {
    border-radius: 14px 0 0 14px;
    border: 1px solid var(--mstoo-border);
    box-shadow: var(--mstoo-shadow);
}

.settings-toggle-icon {
    background: var(--mstoo-primary);
    color: #fff;
}

.switcher_input:checked + .switcher_control {
    background: var(--mstoo-primary) !important;
}

@media (max-width: 767px) {
    .mstoo-perm-head,
    .mstoo-perm-meta {
        width: 100%;
    }

    .mstoo-perm-body {
        grid-template-columns: 1fr;
    }
}

.nav--tabs .nav-link.active,
.nav-tabs .nav-link.active {
    color: #fff !important;
    background: var(--mstoo-gradient) !important;
    border-color: transparent !important;
}

.page-item.active .page-link,
.pagination .page-item.active .page-link {
    background: var(--mstoo-gradient);
    border-color: transparent;
    color: #fff;
}

.login-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.35rem;
    font-size: 0.88rem;
    color: #475467;
}

.login-toolbar input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #D93F46;
}

.login-toolbar a {
    color: var(--mstoo-primary);
    font-weight: 650;
    text-decoration: none;
}

.login-toolbar a:hover {
    text-decoration: underline;
}

.login-card .btn--primary[disabled] {
    opacity: 0.7;
    pointer-events: none;
}

.mstoo-ad-section {
    border: 1px solid var(--mstoo-border);
    border-radius: 16px;
    padding: 1.15rem 1.2rem;
    margin-bottom: 1.1rem;
    background: #fff;
}

.mstoo-ad-section h5 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.table-actions {
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: center;
}

.table-actions_promo .material-icons,
.table-actions_promo .material-symbols-outlined {
    color: var(--mstoo-primary);
}

.bulk-compact-select,
.bulk-ad-row select.form-select {
    height: 42px !important;
    max-height: 42px !important;
    min-height: 42px !important;
    overflow: hidden !important;
    appearance: auto;
}

.bulk-ad-promos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    padding: 0.9rem;
    border: 1px dashed var(--mstoo-border);
    border-radius: 12px;
    background: #FAFBFC;
}

.bulk-ad-promos .btn {
    width: 100%;
}

.select2-container--open .select2-dropdown,
.select2-results__options {
    max-height: 260px !important;
    overflow-y: auto !important;
}

.select2-container .select2-dropdown {
    width: auto !important;
    min-width: 220px;
}

@media (max-width: 991px) {
    .bulk-ad-promos {
        grid-template-columns: 1fr;
    }
}

.mstoo-channel-matrix table th,
.mstoo-channel-matrix table td {
    vertical-align: middle;
}

@media (max-width: 991px) {
    .table-responsive {
        overflow-x: auto;
    }
}
