:root {
    --bg-page: #eef1f6;
    --bg-sidebar: #1f2d4f;
    --bg-sidebar-dark: #192440;
    --bg-card: #ffffff;
    --text-main: #1d2430;
    --text-muted: #6b7486;
    --line: #dde3ef;
    --primary: #2f5be7;
    --primary-soft: #e6ecff;
    --danger: #e03131;
    --success: #2f9e44;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg-page);
    color: var(--text-main);
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif;
}

body:not(.auth-layout) {
    background: radial-gradient(circle at top right, #dde8ff 0%, var(--bg-page) 38%);
}

body.no-scroll {
    overflow: hidden;
}

.guest-layout,
.guest-layout .auth-main {
    margin: 0;
    min-height: 100vh;
}

.auth-main {
    padding: 0;
}

.login-screen {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 100vh;
    width: 100%;
    display: grid;
    place-items: center;
    padding: clamp(18px, 3vw, 32px);
    font-family: "Manrope", "Segoe UI", "Trebuchet MS", sans-serif;
    background:
        radial-gradient(circle at 86% 8%, rgba(0, 175, 255, 0.24), transparent 37%),
        radial-gradient(circle at 9% 92%, rgba(0, 115, 168, 0.36), transparent 44%),
        linear-gradient(155deg, #03111d 0%, #0a2234 48%, #10324a 100%);
}

.login-screen::before,
.login-screen::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(4px);
    pointer-events: none;
    z-index: -1;
}

.login-screen::before {
    width: min(62vw, 780px);
    height: min(62vw, 780px);
    left: -14vw;
    top: -30vh;
    background: radial-gradient(circle, rgba(40, 165, 255, 0.34) 0%, rgba(40, 165, 255, 0.05) 58%, transparent 72%);
    animation: loginGlowDrift 16s ease-in-out infinite;
}

.login-screen::after {
    width: min(44vw, 560px);
    height: min(44vw, 560px);
    right: -8vw;
    bottom: -24vh;
    background: radial-gradient(circle, rgba(4, 141, 201, 0.28) 0%, rgba(4, 141, 201, 0.03) 62%, transparent 76%);
    animation: loginGlowDrift 19s ease-in-out infinite reverse;
}

.login-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 448px;
    border-radius: 24px;
    border: 1px solid rgba(132, 180, 213, 0.34);
    background: linear-gradient(180deg, rgba(18, 43, 60, 0.86) 0%, rgba(15, 39, 57, 0.94) 100%);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.48), 0 3px 14px rgba(13, 118, 178, 0.24);
    backdrop-filter: blur(14px);
    padding: clamp(20px, 3vw, 30px);
    color: #edf7ff;
    animation: loginPanelIn 0.45s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.login-panel::before {
    content: "";
    position: absolute;
    left: 20px;
    right: 20px;
    top: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(117, 210, 255, 0) 0%, rgba(117, 210, 255, 0.88) 50%, rgba(117, 210, 255, 0) 100%);
    opacity: 0.75;
}

.login-panel::after {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 18px;
    border: 1px solid rgba(173, 212, 236, 0.12);
    pointer-events: none;
}

.login-panel-head {
    text-align: center;
    margin-bottom: 14px;
}

.login-brand-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.login-kicker {
    margin: 2px 0 1px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.64rem;
    color: #88a8c2;
    font-weight: 700;
}

.login-brand-logo {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    border: 1px solid rgba(137, 214, 255, 0.72);
    box-shadow: 0 0 28px rgba(30, 168, 255, 0.5), inset 0 0 18px rgba(13, 80, 125, 0.35);
    background: linear-gradient(160deg, rgba(8, 38, 66, 0.95), rgba(6, 31, 56, 0.82));
    display: grid;
    place-items: center;
    overflow: hidden;
}

.login-brand-logo img {
    width: 76%;
    height: 76%;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(43, 168, 255, 0.56));
}

.login-brand-fallback {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    color: #8cd2ff;
}

.login-brand-title {
    margin: 2px 0 0;
    text-align: center;
    font-size: clamp(1.38rem, 2.4vw, 1.78rem);
    font-weight: 700;
    letter-spacing: 0.035em;
    color: #cfe1f3;
    text-transform: none;
    line-height: 1.2;
    text-wrap: balance;
}

.login-brand-subtitle {
    margin: 1px 0 0;
    text-align: center;
    font-size: clamp(0.92rem, 1.8vw, 1.04rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #9ec2df;
    text-transform: uppercase;
    line-height: 1.25;
    text-wrap: balance;
}

.login-brand-copy {
    margin: 10px auto 14px;
    text-align: center;
    color: #b2c8da;
    font-size: 0.95rem;
    max-width: 30ch;
}

.login-form {
    display: grid;
    gap: 12px;
}

.login-field-wrap {
    display: grid;
    gap: 0.4rem;
}

.login-label {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #a3c6de;
    font-weight: 700;
}

.login-field {
    position: relative;
}

.login-field-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #b8e5ff;
    background: rgba(11, 43, 66, 0.86);
    border: 1px solid rgba(100, 165, 203, 0.34);
}

.login-input {
    height: 50px;
    border-radius: 13px;
    border: 1px solid rgba(108, 165, 199, 0.3);
    background: rgba(9, 34, 52, 0.9);
    color: #f3f9ff;
    padding-left: 48px;
    padding-right: 78px;
    font-size: 1rem;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.login-input::placeholder {
    color: #93aec4;
}

.login-input:focus {
    background: rgba(8, 32, 48, 0.95);
    color: #ffffff;
    border-color: #57cbff;
    box-shadow: 0 0 0 0.2rem rgba(35, 176, 255, 0.18), 0 0 0 1px rgba(87, 203, 255, 0.22);
    transform: translateY(-1px);
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 1px solid rgba(118, 171, 205, 0.38);
    border-radius: 9px;
    background: rgba(12, 49, 74, 0.88);
    color: #c6e7ff;
    font-weight: 700;
    font-size: 0.78rem;
    min-width: 70px;
    padding: 6px 10px;
    line-height: 1;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.password-toggle:hover {
    color: #ffffff;
    border-color: rgba(142, 207, 248, 0.62);
    background: rgba(17, 62, 92, 0.95);
}

.login-submit {
    margin-top: 4px;
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    background: linear-gradient(100deg, #0f72f1 0%, #1fa8ff 52%, #0d8fe8 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 1.02rem;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 18px rgba(20, 127, 210, 0.3);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.login-submit-icon {
    display: inline-flex;
    align-items: center;
    opacity: 0.88;
}

.login-submit:hover {
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 14px 25px rgba(14, 119, 197, 0.4);
    filter: saturate(1.08);
}

.login-submit:active {
    transform: translateY(0);
}

.login-footer-note {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(151, 191, 215, 0.24);
    text-align: center;
    color: #9fc2d9;
    font-size: 0.86rem;
}

.login-footer-link {
    color: #d4ebff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.login-footer-link:hover {
    color: #ffffff;
}

@keyframes loginGlowDrift {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(4%, 3%, 0) scale(1.04);
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes loginPanelIn {
    0% {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 575px) {
    .login-panel {
        border-radius: 20px;
        padding: 18px 16px 16px;
    }

    .login-panel::after {
        inset: 9px;
        border-radius: 14px;
    }

    .login-brand-logo {
        width: 82px;
        height: 82px;
        border-radius: 24px;
    }

    .login-brand-copy {
        font-size: 0.93rem;
        margin-bottom: 8px;
    }

    .login-input {
        height: 47px;
        padding-left: 46px;
        padding-right: 74px;
    }

    .password-toggle {
        min-width: 64px;
        font-size: 0.74rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-screen::before,
    .login-screen::after,
    .login-panel {
        animation: none;
    }

    .login-input,
    .login-submit,
    .password-toggle {
        transition: none;
    }
}

.app-shell {
    min-height: 100vh;
    display: flex;
    overflow-x: clip;
}

.app-sidebar {
    width: 248px;
    flex: 0 0 248px;
    background: linear-gradient(180deg, var(--bg-sidebar) 0%, var(--bg-sidebar-dark) 100%);
    color: #f1f4fb;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
}

.sidebar-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.sidebar-logo {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.04em;
}

.sidebar-company-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 14px;
}

.sidebar-user {
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    margin-bottom: 12px;
}

.sidebar-user-name {
    font-weight: 700;
    font-size: 1.2rem;
}

.sidebar-user-role {
    color: #b9c2d9;
    margin-top: 2px;
}

.sidebar-user-subscription {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(131, 157, 210, 0.42);
    background: rgba(13, 33, 74, 0.46);
}

.sidebar-user-subscription-label {
    font-size: 0.64rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #9fb4df;
    font-weight: 700;
}

.sidebar-user-subscription-value {
    margin-top: 7px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #deebff;
}

.sidebar-user-subscription-meta {
    margin-top: 5px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

.sidebar-user-subscription-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 1px 8px;
    border-radius: 999px;
    border: 1px solid rgba(143, 174, 231, 0.5);
    background: rgba(17, 46, 99, 0.45);
    color: #cfe0ff;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.sidebar-user-subscription-chip.is-soft {
    border-color: rgba(163, 190, 240, 0.42);
    background: rgba(70, 108, 180, 0.2);
    color: #d6e4ff;
}

.sidebar-user-subscription.is-warning {
    border-color: rgba(255, 205, 96, 0.7);
    background: rgba(76, 58, 18, 0.48);
}

.sidebar-user-subscription.is-warning .sidebar-user-subscription-label,
.sidebar-user-subscription.is-warning .sidebar-user-subscription-value,
.sidebar-user-subscription.is-warning .sidebar-user-subscription-meta {
    color: #ffd166;
}
.sidebar-user-subscription.is-warning .sidebar-user-subscription-chip {
    border-color: rgba(255, 209, 102, 0.5);
    background: rgba(255, 198, 85, 0.14);
    color: #ffe4a8;
}

.sidebar-user-subscription.is-danger {
    border-color: rgba(255, 107, 107, 0.75);
    background: rgba(88, 25, 25, 0.5);
}

.sidebar-user-subscription.is-danger .sidebar-user-subscription-label,
.sidebar-user-subscription.is-danger .sidebar-user-subscription-value,
.sidebar-user-subscription.is-danger .sidebar-user-subscription-meta {
    color: #ff8f8f;
}
.sidebar-user-subscription.is-danger .sidebar-user-subscription-chip {
    border-color: rgba(255, 142, 142, 0.52);
    background: rgba(255, 120, 120, 0.16);
    color: #ffd3d3;
}

.sidebar-support-mode {
    margin-top: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid rgba(250, 216, 120, 0.62);
    background: rgba(72, 53, 10, 0.5);
}

.sidebar-support-mode-label {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffd978;
    font-weight: 700;
}

.sidebar-support-mode-value {
    margin-top: 2px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #ffe8b2;
}

.sidebar-support-mode-meta {
    margin-top: 3px;
    font-size: 0.76rem;
    color: #ffe2a0;
    opacity: 0.92;
}

.sidebar-nav {
    display: grid;
    gap: 8px;
}

.nav-section {
    margin-top: 12px;
    margin-bottom: 2px;
    padding: 0 10px;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: #95a2c0;
    font-weight: 700;
    text-transform: uppercase;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #edf2ff;
    padding: 11px 12px;
    border-radius: 12px;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.sidebar-link {
    width: 100%;
}

.nav-item .nav-icon {
    width: 18px;
    height: 18px;
    min-width: 18px;
    color: #c4cee3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-item .nav-label {
    font-size: 1.02rem;
    letter-spacing: 0.01em;
}

.nav-link-content {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateX(1px);
}

.nav-item:hover .nav-icon {
    color: #ffffff;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.nav-item.active .nav-icon {
    color: #ffffff;
}

.sidebar-group {
    display: grid;
    gap: 0;
}

.sidebar-group-toggle {
    justify-content: space-between;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.sidebar-group-toggle:focus-visible {
    outline: 2px solid rgba(138, 180, 255, 0.7);
    outline-offset: 1px;
}

.sidebar-chevron {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #b4c2de;
    transition: transform 0.2s ease, color 0.2s ease;
}

.sidebar-group.is-open .sidebar-chevron {
    transform: rotate(180deg);
    color: #d9e4fb;
}

.sidebar-submenu {
    margin: 4px 0 2px 10px;
    padding: 2px 0 2px 16px;
    border-left: 1px solid rgba(206, 217, 240, 0.24);
    display: none;
    gap: 2px;
}

.sidebar-group.is-open .sidebar-submenu {
    display: grid;
}

.submenu-caption {
    margin: 9px 0 2px;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: #8fa0c2;
    font-weight: 700;
    text-transform: uppercase;
}

.submenu-link {
    display: block;
    text-decoration: none;
    color: #d5deef;
    font-size: 0.98rem;
    padding: 8px 10px;
    border-radius: 10px;
    font-weight: 500;
}

.submenu-link:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
}

.submenu-link.active {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-weight: 700;
}

.nav-item.logout {
    margin-top: 10px;
    color: #ff6b6b;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 14px;
}

.nav-item.logout .nav-icon {
    color: #ff6b6b;
}

.nav-item.logout:hover {
    background: rgba(255, 107, 107, 0.13);
    color: #ff8585;
}

.nav-item.logout:hover .nav-icon {
    color: #ff8585;
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    height: 68px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
}

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

.topbar-title {
    font-size: 1.9rem;
    font-weight: 600;
}

.mobile-menu-toggle,
.mobile-sidebar-close {
    display: none;
}

.sidebar-mobile-actions {
    display: none;
}

.mobile-sidebar-backdrop {
    display: none;
}

@media (min-width: 992px) {
    .mobile-menu-toggle,
    .mobile-sidebar-close,
    .sidebar-mobile-actions,
    .mobile-sidebar-backdrop {
        display: none !important;
    }

    .app-shell {
        display: flex !important;
    }

    .app-sidebar {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        bottom: auto !important;
        width: 248px !important;
        max-width: none !important;
        transform: none !important;
        box-shadow: none !important;
    }
}

.topbar-profile {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    color: #4a5a7a;
    font-weight: 600;
    background: #fff;
    overflow: hidden;
}

.topbar-company-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.topbar-user-profile {
    width: auto;
    min-height: 46px;
    height: auto;
    border-radius: 999px;
    padding: 4px 6px 4px 10px;
    gap: 8px;
    display: inline-flex;
    align-items: center;
}

.topbar-user-name {
    color: #304362;
    font-size: 0.83rem;
    font-weight: 600;
    white-space: nowrap;
}

.topbar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2155c9 0%, #1792cc 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.76rem;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
}

.topbar-user-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.topbar-user-trigger {
    border: 1px solid var(--line);
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.topbar-user-trigger:hover,
.topbar-user-trigger:focus-visible {
    border-color: #8ca8df;
    box-shadow: 0 0 0 3px rgba(47, 91, 231, 0.16);
    outline: none;
}

.app-content {
    padding: 16px;
    flex: 1;
    min-height: 0;
}

.app-footer {
    background: #ffffff;
    border-top: 1px solid var(--line);
    padding: 12px 18px;
    color: var(--text-muted);
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
    align-items: center;
    gap: 16px;
    font-size: 0.95rem;
}

.app-footer-col {
    min-width: 0;
    line-height: 1.45;
    word-break: break-word;
}

.app-footer-company strong {
    color: #1f2f52;
    display: block;
    margin-bottom: 2px;
}

.app-footer-center {
    text-align: center;
    display: flex;
    justify-content: center;
}

.app-footer-brand-link {
    color: #234a84;
    font-weight: 600;
    text-decoration: none;
    display: inline;
    border: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
    letter-spacing: 0.01em;
    transition: color 0.15s ease, opacity 0.15s ease;
}

.app-footer-brand-link:hover,
.app-footer-brand-link:focus-visible {
    color: #1a5fc2;
    opacity: 0.95;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.app-footer-legal {
    margin-left: 0;
    justify-self: end;
    text-align: right;
}

.modal-content > form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.modal-content > form .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.modal-content > form .modal-footer {
    flex-shrink: 0;
}

.company-logo-preview {
    width: 220px;
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    background: #f8f9fc;
}

.company-logo-preview img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.company-modern-page .card {
    border: 1px solid #d9e2f6;
}

.company-subscription-card {
    background: linear-gradient(135deg, #f7fafe 0%, #eef4ff 55%, #f8fbff 100%);
}

.company-subscription-status-pill {
    border: 1px solid #b6c9f0;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #123b86;
    background: #edf3ff;
}

.company-branch-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 430px;
    overflow-y: auto;
    padding-right: 2px;
}

.company-branch-item {
    border: 1px solid #dbe5f8;
    border-radius: 12px;
    padding: 10px;
    background: #f8fbff;
}

.card {
    border-radius: 16px;
}

.dashboard-summary {
    display: block;
}

.greeting-card .card-body {
    min-height: 110px;
}

.profile-avatar {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    background: #e8eeff;
    color: #2f5be7;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.module-card {
    min-height: 168px;
    border-radius: 16px;
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.module-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(34, 44, 80, 0.12);
}

.module-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.75);
}

.module-title {
    font-weight: 700;
    font-size: 1.3rem;
    color: #1d2430;
}

.module-subtitle {
    font-size: 0.85rem;
    text-align: center;
    color: #4f5d75;
}

.module-card-blue {
    background: #dfe6f8;
}

.module-card-green {
    background: #dff0e7;
}

.module-card-gray {
    background: #e8ecf3;
}

.module-card-cyan {
    background: #dff1f6;
}

.dashboard-sidebar {
    border-radius: 16px;
    max-height: calc(100vh - 170px);
    overflow-y: auto;
}

.project-list {
    display: grid;
    gap: 0.75rem;
}

.project-item {
    border: 1px solid var(--line);
    background: #f7f9ff;
    border-radius: 12px;
    padding: 0.7rem;
}

.project-item.active {
    border-color: #a8bff8;
    box-shadow: 0 0 0 2px rgba(47, 91, 231, 0.13);
}

.project-link {
    color: inherit;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
}

.project-actions {
    display: flex;
    gap: 0.4rem;
}

.projects-view-toolbar {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d6deeb;
    border-radius: 9px;
    overflow: hidden;
    background: #edf1f7;
}

.projects-view-btn {
    width: 38px;
    height: 34px;
    border: 0;
    border-right: 1px solid #d6deeb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1f2d4f;
    text-decoration: none;
    position: relative;
}

.projects-view-btn:last-child {
    border-right: 0;
}

.projects-view-btn:hover {
    background: #ffffff;
    color: #0f2e74;
}

.projects-view-btn.is-active {
    background: #ffffff;
    color: #0b3f91;
    box-shadow: inset 0 0 0 1px #2f5be7;
}

.projects-view-btn[data-view-label]:hover::after {
    content: attr(data-view-label);
    position: absolute;
    left: 50%;
    bottom: -34px;
    transform: translateX(-50%);
    background: #04070c;
    color: #f8fafc;
    font-size: 0.75rem;
    line-height: 1;
    padding: 0.4rem 0.5rem;
    border-radius: 7px;
    white-space: nowrap;
    z-index: 15;
}

.projects-view-current {
    font-size: 0.8rem;
    color: #5f6b82;
    font-weight: 600;
}

.projects-top-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    flex: 1 1 520px;
    justify-content: flex-end;
    min-width: 320px;
}

.projects-smart-filter {
    position: relative;
    margin: 0;
}

.projects-smart-filter-inline {
    order: 1;
    flex: 1 1 460px;
    max-width: 640px;
    min-width: 320px;
}

.projects-top-actions {
    order: 2;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.projects-view-corner {
    order: 3;
    margin-left: auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.projects-smart-bar {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid #d7e0ef;
    border-radius: 10px;
    padding: 0.38rem 0.44rem;
    background: #ffffff;
}

.projects-smart-search-icon {
    color: #61718d;
    display: inline-flex;
    align-items: center;
}

.projects-smart-search-input {
    border: 0;
    box-shadow: none !important;
    min-width: 180px;
    flex: 1 1 240px;
}

.projects-smart-search-input:focus {
    border: 0;
}

.projects-smart-dropdown-toggle {
    width: 31px;
    height: 31px;
    border: 1px solid #d7e0ef;
    border-radius: 7px;
    background: #f8fafc;
    color: #374761;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.projects-smart-dropdown-toggle:hover {
    background: #eef3ff;
    border-color: #b9c9e9;
}

.projects-smart-dropdown-toggle svg {
    transition: transform 0.15s ease;
}

.projects-smart-dropdown-toggle[aria-expanded="true"] {
    border-color: #2f5be7;
    background: #eaf0ff;
}

.projects-smart-dropdown-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.projects-active-favorite-chip {
    max-width: 220px;
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    border: 1px solid #d5deeb;
    background: #f2f5fa;
    border-radius: 8px;
    color: #22314e;
    font-size: 0.84rem;
    line-height: 1;
    padding: 0.34rem 0.4rem;
}

.projects-active-favorite-icon {
    color: #e0b100;
    font-size: 0.85rem;
}

.projects-active-favorite-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.projects-active-favorite-clear {
    border: 0;
    background: transparent;
    color: #61718d;
    font-size: 1.02rem;
    line-height: 1;
    padding: 0 0.2rem;
}

.projects-active-favorite-clear:hover {
    color: #1a2e5f;
}

.projects-active-group-chip {
    max-width: 250px;
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    border: 1px solid #b9dfeb;
    background: #edf9fc;
    border-radius: 8px;
    color: #173447;
    font-size: 0.84rem;
    line-height: 1;
    padding: 0.34rem 0.4rem;
}

.projects-active-group-icon {
    color: #0b8ca1;
    display: inline-flex;
    align-items: center;
}

.projects-active-group-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.projects-active-group-clear {
    border: 0;
    background: transparent;
    color: #4d6c7d;
    font-size: 1.02rem;
    line-height: 1;
    padding: 0 0.2rem;
}

.projects-active-group-clear:hover {
    color: #102f42;
}

.projects-smart-panel {
    position: absolute;
    left: auto;
    right: 0;
    top: calc(100% + 8px);
    width: min(980px, calc(100vw - 48px));
    max-width: calc(100vw - 48px);
    z-index: 40;
    background: #ffffff;
    border: 1px solid #d7dfed;
    border-radius: 11px;
    box-shadow: 0 16px 30px rgba(17, 34, 68, 0.18);
    padding: 0.8rem 0.85rem 0.75rem;
}

.projects-smart-panel[hidden] {
    display: none !important;
}

.projects-smart-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr;
    gap: 0;
}

.projects-smart-col {
    border-right: 1px solid #e3e9f5;
    background: transparent;
    border-radius: 0;
    padding: 0.5rem 0.9rem;
    min-height: 290px;
}

.projects-smart-col:last-child {
    border-right: 0;
}

.projects-smart-col h3 {
    font-size: 1.05rem;
    margin: 0 0 0.55rem;
}

.projects-quick-filters {
    display: grid;
    gap: 0.4rem;
    margin-bottom: 0.7rem;
}

.projects-quick-filter {
    border: 1px solid #d5deed;
    background: #f3f6fc;
    border-radius: 8px;
    padding: 0.32rem 0.5rem;
    text-align: left;
    font-size: 0.86rem;
    color: #2a3650;
}

.projects-quick-filter.is-active,
.projects-quick-filter:hover {
    border-color: #8fb0f7;
    background: #eaf0ff;
}

.projects-smart-fields {
    display: grid;
    gap: 0.38rem;
}

.projects-group-by {
    display: grid;
    gap: 0.48rem;
}

.projects-group-option {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.9rem;
}

.projects-favorites-list {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.7rem;
    max-height: 170px;
    overflow: auto;
}

.projects-favorite-item {
    border: 1px solid #dae2f0;
    border-radius: 8px;
    background: #f8fafd;
    padding: 0.35rem 0.5rem;
    font-size: 0.86rem;
    color: #22314e;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
}

.projects-favorite-apply {
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0;
    min-width: 0;
    flex: 1 1 auto;
}

.projects-favorite-apply span:last-child {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.projects-favorite-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.projects-favorite-action-btn {
    border: 1px solid #d4ddec;
    background: #ffffff;
    color: #41506d;
    border-radius: 6px;
    font-size: 0.75rem;
    line-height: 1;
    padding: 0.2rem 0.35rem;
}

.projects-favorite-action-btn:hover {
    background: #eef3ff;
    border-color: #adc3ef;
}

.projects-favorite-action-btn.is-danger {
    color: #b42323;
    border-color: #f1c8c8;
    background: #fff7f7;
}

.projects-favorite-action-btn.is-danger:hover {
    background: #ffecec;
    border-color: #e7a6a6;
}

.projects-favorite-item.is-active {
    border-color: #89a8ee;
    background: #edf3ff;
    font-weight: 700;
}

.projects-favorite-save {
    border-top: 1px solid #e4ebf7;
    padding-top: 0.62rem;
    display: grid;
    gap: 0.45rem;
}

.projects-favorite-default {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.84rem;
    color: #4d5c77;
}

@media (max-width: 1199px) {
    .projects-smart-filter-inline {
        flex-basis: 400px;
        max-width: 560px;
    }

    .projects-smart-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }

    .projects-smart-col {
        border-right: 0;
        border-bottom: 1px solid #e3e9f5;
        min-height: 0;
    }

    .projects-smart-col:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 991px) {
    .projects-top-controls {
        min-width: 0;
    }

    .projects-smart-filter-inline {
        flex: 1 1 100%;
        max-width: 100%;
        min-width: 0;
        order: 1;
    }

    .projects-top-actions {
        width: 100%;
        order: 2;
    }

    .projects-view-corner {
        width: 100%;
        order: 3;
    }
}

@media (max-width: 767px) {
    .projects-smart-grid {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .projects-smart-bar {
        flex-wrap: wrap;
    }

    .projects-active-favorite-chip {
        max-width: 100%;
    }

    .projects-active-group-chip {
        max-width: 100%;
    }

    .projects-smart-col {
        border: 1px solid #e3e9f5;
        border-radius: 10px;
        padding: 0.65rem;
    }
}

.projects-overview-board {
    display: grid;
    grid-template-columns: repeat(5, minmax(270px, 1fr));
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.project-overview-column {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 14px;
    min-height: 560px;
    display: flex;
    flex-direction: column;
}

.project-overview-column-header {
    border-bottom: 1px solid var(--line);
    padding: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-overview-column-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.project-column-header-drag,
.lane-column-header-drag {
    cursor: grab;
    user-select: none;
}

.project-column-header-drag.is-dragging,
.lane-column-header-drag.is-dragging {
    cursor: grabbing;
}

.project-column-header-drag .dropdown,
.project-column-header-drag button,
.lane-column-header-drag .dropdown,
.lane-column-header-drag button {
    cursor: pointer;
}

.project-overview-column.is-column-dragging {
    opacity: 0.72;
}

.project-overview-column.is-column-over {
    border-color: #95b5ff;
    box-shadow: 0 0 0 3px rgba(47, 91, 231, 0.12);
}

.project-overview-column.is-collapsed {
    overflow: hidden;
}

.project-overview-column.is-collapsed .project-overview-semaphore-wrap,
.project-overview-column.is-collapsed .project-overview-list {
    display: none;
}

.project-overview-column.is-collapsed .project-overview-column-header {
    border-bottom: 0;
    min-height: 100%;
    height: 100%;
    padding: 0.5rem 0.28rem;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.42rem;
    cursor: pointer;
}

.project-overview-column.is-collapsed .project-overview-column-header h2 {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    margin: 0.2rem 0 0;
    font-size: 1rem;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

.project-overview-column.is-collapsed .project-overview-column-header .dropdown {
    display: none;
}

.project-overview-semaphore-wrap {
    border-bottom: 1px solid #edf2fa;
    padding: 0.5rem 0.72rem 0.42rem;
}

.project-overview-semaphore-bar {
    width: 100%;
    height: 12px;
    background: #d7dee8;
    border-radius: 999px;
    overflow: hidden;
    display: flex;
}

.project-overview-semaphore-segment {
    border: 0;
    padding: 0;
    margin: 0;
    flex: 0 0 var(--segment-size, 0%);
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
}

.project-overview-semaphore-segment.has-count {
    min-width: 10px;
}

.project-overview-semaphore-segment.is-empty {
    display: none;
}

.project-overview-semaphore-segment:hover {
    opacity: 1;
}

.project-overview-semaphore-segment.is-active {
    box-shadow: inset 0 0 0 2px rgba(17, 24, 39, 0.35);
    opacity: 1;
}

.project-overview-semaphore-caption {
    margin-top: 0.3rem;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.74rem;
    color: #5e6c85;
}

.project-overview-semaphore-filter-label {
    font-weight: 700;
}

.project-semaphore-hover-tooltip {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 2600;
    padding: 0.33rem 0.52rem;
    border-radius: 8px;
    background: #04070c;
    color: #f8fafc;
    font-size: 0.79rem;
    font-weight: 600;
    line-height: 1.15;
    white-space: nowrap;
    box-shadow: 0 10px 24px rgba(5, 11, 21, 0.28);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-2px);
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
}

.project-semaphore-hover-tooltip::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 0;
    height: 0;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #04070c;
}

.project-semaphore-hover-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.project-overview-card.is-filter-hidden {
    display: none;
}

.semaphore-segment-otro {
    background: #c4cbd6;
}

.semaphore-segment-a_tiempo {
    background: #2ea043;
}

.semaphore-segment-en_riesgo {
    background: #f59e0b;
}

.semaphore-segment-atrasado {
    background: #ef4444;
}

.semaphore-segment-en_espera {
    background: #0891b2;
}

.semaphore-segment-hecho {
    background: #6d28d9;
}

.project-overview-list {
    padding: 0.7rem;
    display: grid;
    gap: 0.7rem;
    align-content: start;
}

.project-overview-column.is-over {
    border-color: #6ea7ff;
    box-shadow: 0 0 0 3px rgba(47, 91, 231, 0.13);
}

.project-overview-card {
    border: 1px solid #dfe5f2;
    border-radius: 12px;
    padding: 0.7rem;
    background: #f9fbff;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.project-overview-card:hover {
    border-color: #b8c8eb;
    box-shadow: 0 10px 22px rgba(31, 45, 79, 0.1);
    transform: translateY(-1px);
}

.project-overview-card:focus-visible {
    outline: 2px solid #2f5be7;
    outline-offset: 2px;
}

.project-overview-card.is-dragging {
    opacity: 0.62;
    cursor: grabbing;
}

.projects-list-view .table > :not(caption) > * > * {
    padding: 0.62rem 0.75rem;
}

.projects-list-view thead th {
    font-size: 0.85rem;
    color: #42506b;
    background: #f7f9fd;
    border-bottom: 1px solid #dfe6f3;
    white-space: nowrap;
}

.projects-list-group-row td {
    background: #eef2f8;
    border-top: 1px solid #dce3f0;
    font-weight: 700;
    color: #1f2d4f;
}

.projects-list-name a {
    color: #152d57;
    text-decoration: none;
    font-weight: 700;
}

.projects-list-name a:hover {
    text-decoration: underline;
}

.projects-list-stage-badge {
    margin-left: 0.28rem;
}

.projects-list-open-link {
    color: #0e7490;
    text-decoration: none;
    font-weight: 700;
}

.projects-list-open-link:hover {
    text-decoration: underline;
}

.project-overview-title {
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.project-overview-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.15rem;
}

.project-card-menu {
    margin-left: auto;
}

.project-card-menu-btn {
    width: 26px;
    min-width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 8px;
    border: 0;
    background: transparent;
    color: #1d2430;
}

.project-card-menu-btn:hover,
.project-card-menu-btn:focus-visible {
    background: #e9eef9;
    color: #0f1f3c;
}

.project-card-menu-btn:focus-visible {
    box-shadow: 0 0 0 2px rgba(47, 91, 231, 0.2);
}

.project-card-menu-dropdown {
    min-width: 180px;
    padding: 0.28rem;
    border-radius: 11px;
    border: 1px solid #d8e1f3;
    box-shadow: 0 14px 28px rgba(27, 43, 80, 0.14);
}

.project-card-menu-item {
    border-radius: 8px;
    font-size: 0.91rem;
}

.project-card-menu-form {
    margin: 0;
    padding: 0;
}

.project-overview-client {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.project-overview-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    font-size: 0.8rem;
    color: #4a5874;
    margin-bottom: 0.45rem;
}

.project-overview-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
}

.project-overview-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: #41516f;
    margin-bottom: 0.5rem;
}

.project-overview-actions {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.project-semaphore-control {
    display: inline-flex;
}

.project-semaphore-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.15;
    cursor: pointer;
    padding: 0.28rem 0.55rem;
}

.project-semaphore-btn::after {
    content: "\25BE";
    font-size: 0.6rem;
    opacity: 0.85;
}

.project-semaphore-menu {
    min-width: 190px;
    padding: 0.3rem;
}

.project-semaphore-option {
    display: flex;
    align-items: center;
    gap: 0.48rem;
    border-radius: 9px;
    font-size: 0.95rem;
    padding: 0.44rem 0.56rem;
}

.project-semaphore-check {
    margin-left: auto;
    font-weight: 700;
    color: #1f2d4f;
}

.project-semaphore-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.16);
    flex: 0 0 11px;
}

.semaphore-otro {
    background: #e5e7eb;
    color: #475569;
}

.semaphore-a_tiempo,
.semaphore-en_proceso,
.semaphore-aprobado {
    background: #dcfce7;
    color: #166534;
}

.semaphore-en_riesgo,
.semaphore-cambios_solicitados {
    background: #fff3cd;
    color: #8a5b00;
}

.semaphore-atrasado,
.semaphore-cancelado {
    background: #fee2e2;
    color: #991b1b;
}

.semaphore-en_espera {
    background: #dbeafe;
    color: #1d4ed8;
}

.semaphore-hecho {
    background: #ede9fe;
    color: #5b21b6;
}

.semaphore-dot-otro {
    background: #9ca3af;
}

.semaphore-dot-a_tiempo,
.semaphore-dot-en_proceso,
.semaphore-dot-aprobado {
    background: #16a34a;
}

.semaphore-dot-en_riesgo,
.semaphore-dot-cambios_solicitados {
    background: #f59e0b;
}

.semaphore-dot-atrasado,
.semaphore-dot-cancelado {
    background: #ef4444;
}

.semaphore-dot-en_espera {
    background: #0891b2;
}

.semaphore-dot-hecho {
    background: #6d28d9;
}

.stat-pill {
    background: var(--primary-soft);
    border: 1px solid #cad9ff;
    border-radius: 10px;
    padding: 0.45rem 0.8rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 88px;
}

.stat-pill .label {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.stat-pill .value {
    font-size: 1.1rem;
    font-weight: 700;
}

.kanban-column {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 14px;
    min-height: 540px;
    display: flex;
    flex-direction: column;
}

.kanban-flex-board {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(340px, 1fr);
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    align-items: start;
}

.kanban-flex-column {
    min-width: 320px;
}

.kanban-flex-column.is-column-dragging {
    opacity: 0.72;
}

.kanban-flex-column.is-column-over .kanban-column {
    border-color: #95b5ff;
    box-shadow: 0 0 0 3px rgba(47, 91, 231, 0.12);
}

.kanban-column-header {
    border-bottom: 1px solid var(--line);
    padding: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-column[data-status="cancelado"] .kanban-column-header {
    background: #fff5f5;
}

.kanban-flex-column.is-collapsed {
    min-width: 58px;
    max-width: 58px;
}

.kanban-flex-column.is-collapsed .kanban-column {
    overflow: hidden;
}

.kanban-flex-column.is-collapsed .kanban-tasks {
    display: none;
}

.kanban-flex-column.is-collapsed .kanban-column-header {
    border-bottom: 0;
    min-height: 100%;
    height: 100%;
    padding: 0.5rem 0.28rem;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.42rem;
    cursor: pointer;
}

.kanban-flex-column.is-collapsed .kanban-column-header h2 {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    margin: 0.2rem 0 0;
    text-align: center;
    white-space: nowrap;
}

.kanban-flex-column.is-collapsed .kanban-column-header .quick-add-task-btn,
.kanban-flex-column.is-collapsed .kanban-column-header .dropdown {
    display: none;
}

.kanban-tasks {
    padding: 0.8rem;
    display: grid;
    gap: 0.7rem;
    flex: 1;
    align-content: start;
}

.kanban-empty {
    border: 1px dashed #c4cddd;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.86rem;
    padding: 0.75rem;
    text-align: center;
}

.kanban-column.is-over {
    border-color: #6ea7ff;
    box-shadow: 0 0 0 3px rgba(47, 91, 231, 0.13);
}

.task-card {
    background: #fbfdff;
    border: 1px solid #e4e9f3;
    border-left: 4px solid #9aa5b1;
    border-radius: 12px;
    padding: 0.75rem;
    cursor: grab;
}

.task-card.is-dragging {
    opacity: 0.62;
}

.task-card.priority-baja {
    border-left-color: #94d82d;
}

.task-card.priority-media {
    border-left-color: #4dabf7;
}

.task-card.priority-alta {
    border-left-color: #f59f00;
}

.task-card.priority-critica {
    border-left-color: #e03131;
}

.task-card.status-cancelado {
    background: #fff8f8;
    border-style: dashed;
}

.task-card-title {
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.task-card-desc {
    font-size: 0.87rem;
    color: var(--text-muted);
    margin-bottom: 0.55rem;
    min-height: 34px;
}

.task-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
    font-size: 0.82rem;
}

.task-card-actions {
    display: flex;
    gap: 0.35rem;
    justify-content: flex-end;
}

.view-switch .btn {
    min-width: 84px;
}

.icon-action-btn {
    width: 30px;
    min-width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.task-card-owner {
    font-weight: 600;
}

.collaborators-select {
    border-radius: 10px;
    background: #f8fbff;
}

.clear-collaborators-btn {
    --bs-btn-color: #3a4f76;
    --bs-btn-border-color: #cdd9f2;
    --bs-btn-hover-color: #20365d;
    --bs-btn-hover-bg: #e7efff;
    --bs-btn-hover-border-color: #b7c8ed;
    --bs-btn-focus-shadow-rgb: 47, 91, 231;
    --bs-btn-active-color: #20365d;
    --bs-btn-active-bg: #dce8ff;
    --bs-btn-active-border-color: #aabfe8;
    border-radius: 10px;
    padding: 0.16rem 0.6rem;
    font-size: 0.74rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    background: linear-gradient(180deg, #f9fbff 0%, #eff4ff 100%);
}

.clear-collaborators-btn:hover {
    background: #e7efff;
}

.gantt-month-input {
    min-width: 150px;
}

.gantt-header-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 300px;
}

.gantt-month-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.gantt-month-nav .btn {
    flex: 0 0 auto;
}

.gantt-shell {
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: auto;
    background: #ffffff;
}

.gantt-header-row,
.gantt-data-row {
    display: grid;
    grid-template-columns: 290px minmax(840px, 1fr);
}

.gantt-label-head,
.gantt-label-cell {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #ffffff;
    border-right: 1px solid var(--line);
    padding: 0.6rem 0.7rem;
}

.gantt-label-head {
    font-weight: 700;
    border-bottom: 1px solid var(--line);
}

.gantt-label-title {
    font-weight: 700;
    color: #1d2430;
    text-decoration: none;
}

.gantt-label-title:hover {
    text-decoration: underline;
}

.gantt-days-head,
.gantt-track {
    display: grid;
    grid-template-columns: repeat(var(--days), minmax(28px, 1fr));
    position: relative;
}

.gantt-day,
.gantt-cell {
    border-right: 1px solid #e7ebf3;
    border-bottom: 1px solid #edf0f6;
    min-height: 30px;
}

.gantt-day {
    text-align: center;
    font-size: 0.77rem;
    color: #61708e;
    line-height: 30px;
    background: #f8faff;
    border-bottom: 1px solid var(--line);
}

.gantt-day.is-weekend,
.gantt-cell.is-weekend {
    background: #f5f6fb;
}

.gantt-day.is-today,
.gantt-cell.is-today {
    background: #fff9db;
}

.gantt-group-title {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #eef3ff;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 0.45rem 0.7rem;
    font-weight: 700;
    color: #203462;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.gantt-group-name {
    flex: 1;
}

.gantt-toggle-person {
    width: 28px;
    min-width: 28px;
    height: 28px;
    padding: 0;
    line-height: 1;
}

.gantt-person-row.is-collapsed {
    display: none;
}

.gantt-empty-row {
    padding: 0.6rem 0.7rem;
    color: var(--text-muted);
    border-bottom: 1px dashed var(--line);
    font-size: 0.88rem;
}

.gantt-track {
    min-height: 64px;
}

.gantt-bar {
    align-self: center;
    min-height: 26px;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.77rem;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-decoration: none;
    z-index: 2;
}

.gantt-bar-project {
    background: #2f5be7;
}

.gantt-bar-task {
    background: #4f6eb8;
}

.gantt-bar.priority-baja {
    background: #2f9e44;
}

.gantt-bar.priority-media {
    background: #2563eb;
}

.gantt-bar.priority-alta {
    background: #f59f00;
}

.gantt-bar.priority-critica {
    background: #e03131;
}

.dashboard-kpi-tile {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-height: 108px;
    border-radius: 14px;
    padding: 0.9rem 1rem;
    background: linear-gradient(140deg, #ffffff 0%, #f5f8ff 100%);
    border: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(37, 50, 89, 0.08);
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.dashboard-kpi-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(37, 50, 89, 0.12);
}

.dashboard-kpi-tile .kpi-label {
    font-size: 0.82rem;
    color: #5d6b84;
}

.dashboard-kpi-tile .kpi-value {
    font-size: 1.9rem;
    color: #10223f;
    line-height: 1;
}

.dashboard-analytic-card {
    border-radius: 16px;
}

.dashboard-analytic-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.25rem;
}

.dashboard-chart-wrap {
    position: relative;
    min-height: 280px;
    height: 280px;
}

.summary-card .summary-label {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.summary-card .summary-value {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.1;
}

.dashboard-columns .status-column {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 14px;
    min-height: 540px;
    display: flex;
    flex-direction: column;
}

.status-column-header {
    padding: 0.85rem;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-column-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.status-column-body {
    padding: 0.7rem;
    display: grid;
    gap: 0.7rem;
    align-content: start;
}

.status-card {
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    background: #f9fbff;
    padding: 0.7rem;
}

.status-card-title {
    font-weight: 600;
}

.status-card-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
    min-height: 32px;
}

.status-card-meta {
    font-size: 0.8rem;
    color: #4f5d75;
    display: flex;
    justify-content: space-between;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}

.status-empty {
    border: 1px dashed #c4cddd;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.86rem;
    padding: 0.75rem;
    text-align: center;
}

.tasks-registry .table > :not(caption) > * > * {
    vertical-align: middle;
}

.tasks-table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #5d6b84;
}

.tasks-list-group-row td {
    background: #eef2f8;
    border-top: 1px solid #dce3f0;
    font-weight: 700;
    color: #1f2d4f;
}

.task-mobile-list {
    display: grid;
    gap: 0.7rem;
}

.task-mobile-group {
    display: grid;
    gap: 0.55rem;
}

.task-mobile-group-title {
    font-weight: 700;
    color: #1f2d4f;
    background: #eef2f8;
    border: 1px solid #dce3f0;
    border-radius: 10px;
    padding: 0.42rem 0.58rem;
}

.task-mobile-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.75rem;
    background: #fafcff;
}

.task-mobile-title {
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.task-mobile-line {
    color: #4f5d75;
    font-size: 0.87rem;
    margin-bottom: 0.2rem;
}

.task-mobile-meta {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin: 0.35rem 0 0.1rem;
}

.clients-modern-page {
    display: grid;
    gap: 0.9rem;
}

.clients-hero-card {
    border: 1px solid #d7e3f4;
    background:
        radial-gradient(120% 165% at 102% 0%, rgba(27, 89, 201, 0.16) 0%, rgba(27, 89, 201, 0) 58%),
        linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
}

.clients-hero-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
    margin-bottom: 0.82rem;
}

.clients-hero-subtitle {
    color: #526383;
    max-width: 660px;
}

.clients-hero-tags {
    display: inline-flex;
    gap: 0.42rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.clients-hero-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #cadeff;
    background: #eef4ff;
    color: #234a86;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
}

.clients-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 0.56rem;
}

.clients-kpi-card {
    border: 1px solid #d4e1f4;
    border-radius: 11px;
    background: linear-gradient(180deg, #fafdff 0%, #eff6ff 100%);
    padding: 0.55rem 0.64rem;
    display: grid;
    gap: 0.12rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.clients-kpi-label {
    color: #5a6d8e;
    font-size: 0.77rem;
}

.clients-kpi-value {
    color: #16315f;
    font-size: 1.24rem;
    line-height: 1;
}

.clients-list-card {
    border: 1px solid #d8e2f2;
}

.clients-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.8rem;
    margin-bottom: 0.85rem;
}

.clients-toolbar-search {
    width: min(520px, 100%);
}

.clients-toolbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.clients-toolbar-meta {
    font-size: 0.85rem;
    color: #556785;
}

.clients-create-btn {
    font-weight: 700;
    min-width: 152px;
}

.clients-regime-card {
    border: 1px solid #cfe0f7;
    background:
        radial-gradient(120% 160% at 108% -8%, rgba(36, 109, 255, 0.16) 0%, rgba(36, 109, 255, 0) 56%),
        radial-gradient(120% 150% at -8% 112%, rgba(12, 181, 172, 0.1) 0%, rgba(12, 181, 172, 0) 55%),
        linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
    overflow: hidden;
}

.clients-regime-shell {
    margin-bottom: 0.75rem;
}

.clients-regime-intro {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.clients-regime-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(145deg, #1f6ef5 0%, #0cb5ac 100%);
    box-shadow: 0 10px 24px rgba(22, 95, 219, 0.26);
    flex-shrink: 0;
}

.clients-regime-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.clients-regime-action-row {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.clients-regime-open-btn {
    border-radius: 10px;
    font-weight: 700;
}

.clients-regime-title {
    font-size: 1.08rem;
    font-weight: 800;
    color: #13305f;
}

.clients-regime-copy {
    color: #546784;
    font-size: 0.9rem;
    max-width: 820px;
}

.clients-regime-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.clients-regime-count-pill,
.clients-regime-scope-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.22rem 0.55rem;
}

.clients-regime-count-pill {
    background: #e9f2ff;
    border: 1px solid #bfd6ff;
    color: #1f4d8f;
}

.clients-regime-scope-pill {
    background: #e9fdfb;
    border: 1px solid #bceee8;
    color: #0f6f69;
}

.clients-regime-input-label {
    color: #476082;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.clients-regime-create-form {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-bottom: 0.7rem;
}

.clients-regime-create-form .form-control {
    flex: 1 1 340px;
    min-width: 220px;
    border-radius: 12px;
    border-color: #c6d8f4;
    min-height: 44px;
}

.clients-regime-create-form .btn {
    min-height: 44px;
    border-radius: 12px;
    font-weight: 700;
    padding-inline: 1rem;
}

.clients-regime-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
    margin-bottom: 0.72rem;
}

.clients-regime-suggestion-btn {
    border: 1px solid #c9dcf8;
    color: #2b4e83;
    background: rgba(255, 255, 255, 0.78);
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.24rem 0.62rem;
}

.clients-regime-suggestion-btn:hover,
.clients-regime-suggestion-btn:focus-visible {
    color: #13408f;
    border-color: #89b0eb;
    background: #ebf3ff;
}

.clients-regime-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.5rem;
}

.clients-regime-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    border: 1px solid #cfe0f7;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
    padding: 0.48rem 0.55rem 0.48rem 0.48rem;
    box-shadow: 0 6px 18px rgba(31, 69, 127, 0.08);
    transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.clients-regime-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(31, 69, 127, 0.14);
    border-color: #acc8ef;
}

.clients-regime-item-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.clients-regime-item-chip {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: linear-gradient(145deg, #1f6ef5 0%, #0ea5e9 100%);
    box-shadow: 0 6px 12px rgba(31, 92, 225, 0.25);
    flex-shrink: 0;
}

.clients-regime-item-name {
    color: #1f365f;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.clients-regime-item-meta {
    display: inline-block;
    margin-top: 0.18rem;
    color: #5f7394;
    font-size: 0.73rem;
}

.clients-regime-item-actions {
    display: inline-flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.clients-regime-item-edit,
.clients-regime-item-delete {
    white-space: nowrap;
    border-radius: 8px;
}

.clients-regime-popup-list {
    display: grid;
    gap: 0.45rem;
    max-height: min(60vh, 420px);
    overflow: auto;
    padding-right: 0.2rem;
}

.clients-regime-popup-item {
    border: 1px solid #d5e2f6;
    border-radius: 10px;
    background: #f8fbff;
    padding: 0.5rem 0.58rem;
    display: grid;
    gap: 0.1rem;
    text-align: left;
}

.clients-regime-popup-item strong {
    color: #1b3462;
    font-size: 0.88rem;
}

.clients-regime-popup-item span {
    color: #5c6f8f;
    font-size: 0.78rem;
}

.clients-regime-popup-empty {
    border: 1px dashed #cfdae9;
    border-radius: 10px;
    background: #f9fbff;
    color: #61728f;
    text-align: center;
    padding: 0.8rem;
    font-size: 0.88rem;
}

.clients-regime-empty {
    border: 1px dashed #cfdae9;
    border-radius: 10px;
    background: #f9fbff;
    color: #61728f;
    text-align: center;
    padding: 0.6rem;
    font-size: 0.87rem;
}

.clients-table-modern thead th {
    border-bottom: 1px solid #dde6f3;
    color: #526381;
    font-size: 0.77rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.clients-table-modern tbody tr:hover {
    background: #f8fbff;
}

.clients-name-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.62rem;
}

.clients-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(140deg, #255dd0 0%, #20a0d0 100%);
    color: #ffffff;
    font-size: 0.79rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.clients-name {
    font-weight: 800;
    color: #162848;
    line-height: 1.14;
}

.clients-name-meta {
    color: #5d6e89;
    font-size: 0.82rem;
    margin-top: 1px;
}

.clients-contact-lines,
.clients-fiscal-lines,
.clients-location-lines {
    color: #445b81;
    font-size: 0.86rem;
    display: grid;
    gap: 0.1rem;
}

.clients-location-lines > div:last-child {
    max-width: 340px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clients-action-btn {
    border-radius: 9px;
    font-weight: 700;
}

.clients-mobile-list {
    display: grid;
    gap: 0.7rem;
}

.clients-mobile-item {
    border: 1px solid #dde6f3;
    border-radius: 12px;
    background: #fbfdff;
    padding: 0.72rem;
}

.clients-mobile-head {
    margin-bottom: 0.45rem;
}

.clients-mobile-line {
    color: #495f83;
    font-size: 0.87rem;
    margin-bottom: 0.25rem;
}

.clients-mobile-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.clients-empty-state {
    border: 1px dashed #cfd9ea;
    border-radius: 12px;
    background: #f9fbff;
    color: #5b6d8b;
    text-align: center;
    padding: 1.2rem 1rem;
}

.clients-empty-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1e365e;
    margin-bottom: 0.28rem;
}

.clients-empty-search {
    margin-top: 0.85rem;
    border: 1px dashed #cfdae9;
    border-radius: 11px;
    background: #f9fbff;
    color: #61728f;
    text-align: center;
    padding: 0.7rem;
}

.clients-modal-content {
    border: 1px solid #d8e2f2;
}

.clients-modal-header {
    border-bottom: 1px solid #dce5f2;
    background: linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
}

@media (max-width: 1199px) {
    .clients-kpi-grid {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }

    .clients-location-lines > div:last-child {
        max-width: 220px;
    }
}

@media (max-width: 767px) {
    .clients-hero-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .clients-hero-tags {
        justify-content: flex-start;
    }

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

    .clients-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .clients-regime-create-form {
        flex-direction: column;
    }

    .clients-regime-create-form .form-control {
        min-width: 0;
        width: 100%;
    }

    .clients-regime-intro {
        flex-direction: column;
        gap: 0.5rem;
    }

    .clients-regime-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .clients-toolbar-search {
        width: 100%;
    }

    .clients-toolbar-actions {
        justify-content: space-between;
    }

    .clients-create-btn {
        min-width: 0;
    }
}

.users-module {
    display: grid;
    gap: 0.85rem;
}

.users-hero-card {
    border: 1px solid #d9e3f3;
    background:
        radial-gradient(120% 170% at 102% 0%, rgba(30, 89, 202, 0.14) 0%, rgba(30, 89, 202, 0) 62%),
        #ffffff;
}

.users-hero-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

.users-hero-subtitle {
    color: #50617f;
    max-width: 640px;
}

.users-hero-tags {
    display: inline-flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.users-hero-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.58rem;
    border-radius: 999px;
    border: 1px solid #cfe0ff;
    background: #edf4ff;
    color: #1b427c;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
}

.users-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 0.55rem;
}

.users-kpi {
    border: 1px solid #d8e3f4;
    background: #f7faff;
    border-radius: 11px;
    padding: 0.52rem 0.62rem;
    display: grid;
    gap: 0.1rem;
}

.users-kpi-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.users-kpi-link:hover {
    transform: translateY(-1px);
    border-color: #90b1eb;
    box-shadow: 0 10px 20px rgba(28, 57, 103, 0.12);
}

.users-kpi-link.is-active {
    border-color: #78a2ee;
    background: #e9f2ff;
}

.users-kpi-label {
    font-size: 0.76rem;
    color: #526380;
}

.users-kpi-value {
    font-size: 1.24rem;
    line-height: 1;
    color: #1a2f56;
}

.users-create-card,
.users-list-card {
    border: 1px solid #d9e2f0;
}

.users-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding: 1rem 1rem 0;
}

.users-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1c2f54;
}

.users-section-subtitle {
    font-size: 0.85rem;
    color: #5b6e8d;
}

.users-create-card .card-body {
    padding: 1rem;
}

.users-create-card .users-section-header {
    padding: 0;
}

.users-privileges-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.users-privilege-pill {
    border: 1px solid #d4deee;
    background: #f8fbff;
    border-radius: 10px;
    min-height: 42px;
    padding: 0.45rem 0.65rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
}

.users-privilege-pill .form-check-input {
    margin: 0;
}

.users-privilege-pill span {
    color: #213152;
    font-size: 0.9rem;
    font-weight: 600;
}

.users-privilege-pill:has(input:checked) {
    border-color: #96b4ef;
    background: #ebf3ff;
}

.users-list-header {
    border-bottom: 1px solid #e0e7f4;
    margin-bottom: 0;
    padding-bottom: 0.8rem;
}

.users-table-modern thead th {
    border-bottom: 1px solid #dde6f3;
    color: #516383;
    font-size: 0.77rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.users-table-modern tbody tr:hover {
    background: #f8fbff;
}

.users-user-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.62rem;
    min-width: 230px;
}

.users-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(140deg, #285ecf 0%, #21a2cd 100%);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.users-user-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.users-user-name {
    font-weight: 700;
    color: #172846;
    line-height: 1.1;
}

.users-user-username {
    color: #5a6b87;
    font-size: 0.82rem;
}

.users-current-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.1rem 0.42rem;
    border: 1px solid #9ec5ff;
    background: #eaf4ff;
    color: #1a4e93;
    font-weight: 700;
    font-size: 0.7rem;
    margin-left: 0.35rem;
}

.users-privilege-tags {
    display: flex;
    align-items: center;
    gap: 0.34rem;
    flex-wrap: wrap;
}

.users-privilege-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #d6dfec;
    background: #f8fafd;
    color: #22324f;
    font-size: 0.73rem;
    font-weight: 600;
    padding: 0.13rem 0.48rem;
}

.users-privilege-chip.is-empty {
    color: #687a97;
}

.users-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border-radius: 999px;
    padding: 0.2rem 0.58rem;
    font-size: 0.74rem;
    font-weight: 700;
    border: 1px solid #d7e0ee;
    background: #f8fafd;
    color: #4b5f81;
}

.users-status-pill.is-active {
    border-color: #9cd7b7;
    background: #e9f8ef;
    color: #13673d;
}

.users-status-pill.is-inactive {
    border-color: #d9dfea;
    background: #f5f7fb;
    color: #5d6b83;
}

.users-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.users-action-btn {
    border-radius: 8px;
    font-weight: 600;
}

.users-mobile-list {
    display: grid;
    gap: 0.65rem;
}

.users-mobile-item {
    border: 1px solid #dde5f1;
    border-radius: 12px;
    background: #fafcff;
    padding: 0.7rem;
}

.users-mobile-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.55rem;
    margin-bottom: 0.45rem;
}

.users-mobile-line {
    color: #4f6282;
    font-size: 0.86rem;
    margin-bottom: 0.35rem;
}

.users-modal-content {
    border: 1px solid #d7e0ef;
}

.users-modal-header {
    border-bottom: 1px solid #dce5f2;
    background: linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
}

.profile-subscription-card {
    border: 1px solid #d4e0f4;
    border-radius: 12px;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(32, 92, 214, 0.12) 0%, rgba(32, 92, 214, 0) 58%),
        linear-gradient(180deg, #f8fbff 0%, #f1f6ff 100%);
    padding: 0.75rem 0.85rem;
}

.profile-subscription-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.profile-subscription-title {
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 700;
    color: #33598f;
}

.profile-subscription-chips {
    display: inline-flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.profile-subscription-chip {
    border: 1px solid #bfd4f8;
    background: #eaf2ff;
    color: #1f4b93;
    border-radius: 999px;
    padding: 0.18rem 0.52rem;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.profile-subscription-chip.is-plan {
    border-color: #9fc0fb;
    background: #dceaff;
    color: #173f80;
}

.profile-subscription-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.55rem;
}

.profile-subscription-item {
    border: 1px solid #d8e4f7;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.82);
    padding: 0.48rem 0.58rem;
}

.profile-subscription-item-label {
    display: block;
    color: #60789f;
    font-size: 0.73rem;
    margin-bottom: 0.1rem;
}

.profile-subscription-item-value {
    color: #143764;
    font-size: 0.95rem;
    line-height: 1.1;
    font-weight: 700;
}

.profile-subscription-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.profile-subscription-status-pill {
    border-radius: 999px;
    border: 1px solid #b8d8c5;
    background: #e9f8ef;
    color: #1a7b47;
    padding: 0.18rem 0.55rem;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
}

.profile-subscription-card.is-warning {
    border-color: #ecd1a4;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(220, 153, 47, 0.16) 0%, rgba(220, 153, 47, 0) 58%),
        linear-gradient(180deg, #fff9ee 0%, #fff4e2 100%);
}

.profile-subscription-card.is-warning .profile-subscription-title {
    color: #8a5c14;
}

.profile-subscription-card.is-warning .profile-subscription-chip {
    border-color: #efcf9c;
    background: #ffefce;
    color: #8f5f15;
}

.profile-subscription-card.is-warning .profile-subscription-item-label {
    color: #8e6a2f;
}

.profile-subscription-card.is-warning .profile-subscription-item-value {
    color: #6f4d17;
}

.profile-subscription-card.is-warning .profile-subscription-status-pill {
    border-color: #efcf9c;
    background: #ffefce;
    color: #8f5f15;
}

.profile-subscription-card.is-danger {
    border-color: #e8c0c0;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(226, 71, 71, 0.15) 0%, rgba(226, 71, 71, 0) 58%),
        linear-gradient(180deg, #fff3f3 0%, #ffebeb 100%);
}

.profile-subscription-card.is-danger .profile-subscription-title {
    color: #8d2d2d;
}

.profile-subscription-card.is-danger .profile-subscription-chip {
    border-color: #efb3b3;
    background: #ffe1e1;
    color: #922f2f;
}

.profile-subscription-card.is-danger .profile-subscription-item-label {
    color: #9a4d4d;
}

.profile-subscription-card.is-danger .profile-subscription-item-value {
    color: #7b2525;
}

.profile-subscription-card.is-danger .profile-subscription-status-pill {
    border-color: #efb3b3;
    background: #ffe1e1;
    color: #922f2f;
}

.saas-licenses-page {
    gap: 1rem;
}

.saas-hero-card {
    border: 1px solid #cfdcf3;
    background:
        radial-gradient(120% 150% at 100% 0%, rgba(24, 96, 215, 0.16) 0%, rgba(24, 96, 215, 0) 56%),
        linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
}

.saas-hero-badges {
    display: inline-flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.saas-hero-badge {
    border: 1px solid #c8dbff;
    background: #ebf3ff;
    color: #184889;
    border-radius: 999px;
    padding: 0.25rem 0.58rem;
    font-size: 0.76rem;
    font-weight: 700;
}

.saas-kpi-grid {
    gap: 0.62rem;
}

.saas-kpi-card {
    border: 1px solid #d2dff4;
    background: linear-gradient(180deg, #f9fbff 0%, #f0f6ff 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.saas-kpi-card.is-warning {
    border-color: #efd2a1;
    background: linear-gradient(180deg, #fff9ed 0%, #fff4db 100%);
}

.saas-kpi-card.is-danger {
    border-color: #e7c0c0;
    background: linear-gradient(180deg, #fff3f3 0%, #ffe9e9 100%);
}

.saas-kpi-card.is-success {
    border-color: #b7dec3;
    background: linear-gradient(180deg, #eefcf3 0%, #e5f8ec 100%);
}

.saas-card-header {
    border-bottom: 1px solid #e0e9f7;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.saas-create-card,
.saas-list-card {
    border: 1px solid #d8e3f3;
}

.saas-form-block {
    border: 1px solid #dce6f5;
    border-radius: 12px;
    background: #fbfdff;
    padding: 0.85rem;
}

.saas-form-block-title {
    font-weight: 700;
    color: #1d3257;
    margin-bottom: 0.6rem;
}

.saas-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.95rem;
}

.saas-primary-action {
    min-width: 200px;
    font-weight: 700;
}

.saas-total-pill {
    border: 1px solid #cfe0ff;
    background: #edf4ff;
    color: #1d4c90;
    border-radius: 999px;
    padding: 0.18rem 0.62rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.saas-tenant-grid {
    display: grid;
    gap: 0.85rem;
}

.saas-tenant-item {
    border: 1px solid #d9e4f4;
    border-radius: 14px;
    background: #ffffff;
    padding: 0.85rem;
    position: relative;
    overflow: hidden;
}

.saas-tenant-item::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: linear-gradient(90deg, #2965dd 0%, #35a5df 100%);
}

.saas-tenant-item.is-warning::before {
    background: linear-gradient(90deg, #ca8b2c 0%, #edb23f 100%);
}

.saas-tenant-item.is-overdue::before {
    background: linear-gradient(90deg, #c64444 0%, #ec6d6d 100%);
}

.saas-tenant-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.7rem;
    margin-bottom: 0.72rem;
}

.saas-tenant-head-actions {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
}

.saas-support-enter-form {
    margin: 0;
}

.saas-support-btn {
    font-weight: 700;
    white-space: nowrap;
}

.saas-tenant-name {
    color: #1b2f51;
    font-size: 1.18rem;
    font-weight: 800;
}

.saas-tenant-meta {
    color: #5c6f8f;
    font-size: 0.86rem;
}

.saas-tenant-meta span {
    margin-left: 0.32rem;
    color: #36598f;
    font-weight: 700;
}

.saas-tenant-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.48rem;
}

.saas-mini-kpi {
    border: 1px solid #dde7f5;
    border-radius: 10px;
    background: #f8fbff;
    padding: 0.5rem 0.55rem;
    min-height: 58px;
    display: grid;
    gap: 0.1rem;
}

.saas-mini-kpi-label {
    color: #5a6c8c;
    font-size: 0.74rem;
}

.saas-mini-kpi-value {
    color: #1d345b;
    font-size: 0.93rem;
    line-height: 1.12;
}

.saas-mini-kpi-value a {
    color: #1e58b0;
    text-decoration: none;
}

.saas-mini-kpi-value a:hover {
    text-decoration: underline;
}

.saas-user-capacity {
    margin-top: 0.58rem;
}

.saas-user-capacity-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #41577d;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.28rem;
}

.saas-user-capacity-head strong {
    color: #1a3d79;
}

.saas-user-capacity-bar {
    border: 1px solid #d8e3f3;
    border-radius: 999px;
    height: 9px;
    background: #eff4fc;
    overflow: hidden;
}

.saas-user-capacity-bar > span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #2f63d4 0%, #2e9fd8 100%);
    transition: width 0.28s ease;
}

.saas-tenant-alert {
    margin-top: 0.58rem;
    border: 1px solid #d6e2f1;
    border-radius: 10px;
    background: #f7faff;
    color: #365483;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.38rem 0.55rem;
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
}

.saas-alert-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.saas-tenant-alert.is-warning {
    border-color: #efcf94;
    background: #fff7e7;
    color: #8b5b07;
}

.saas-tenant-alert.is-overdue {
    border-color: #e5b2b2;
    background: #fff1f1;
    color: #a23d3d;
}

.saas-tenant-details {
    margin-top: 0.68rem;
    border-top: 1px dashed #d4e0f2;
    padding-top: 0.62rem;
}

.saas-tenant-details summary {
    list-style: none;
    cursor: pointer;
    font-weight: 700;
    color: #1b3d72;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.saas-tenant-details summary::-webkit-details-marker {
    display: none;
}

.saas-tenant-details summary::before {
    content: ">";
    display: inline-block;
    transform: rotate(0deg);
    transition: transform 0.18s ease;
    color: #5078b8;
}

.saas-tenant-details[open] summary::before {
    transform: rotate(90deg);
}

.saas-manage-card {
    border: 1px solid #d9e4f4;
    border-radius: 12px;
    background: #fbfdff;
    padding: 0.7rem;
    height: 100%;
}

.saas-manage-title {
    color: #213963;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.55rem;
}

.saas-home-page {
    gap: 1rem;
}

.saas-home-hero-card {
    border: 1px solid #cfdcf3;
    background:
        radial-gradient(120% 150% at 100% 0%, rgba(24, 96, 215, 0.16) 0%, rgba(24, 96, 215, 0) 56%),
        linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
}

.saas-home-filter-form {
    border: 1px solid #d9e5f5;
    border-radius: 12px;
    background: #fbfdff;
    padding: 0.75rem;
}

.saas-home-filter-grid {
    display: grid;
    grid-template-columns: minmax(170px, 220px) minmax(220px, 1fr) minmax(150px, 190px) auto;
    gap: 0.55rem;
    align-items: end;
    margin-bottom: 0.35rem;
}

.saas-home-filter-actions {
    display: inline-flex;
    gap: 0.45rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.saas-home-secondary-kpis {
    margin-top: 0.65rem;
    padding-top: 0.55rem;
    border-top: 1px dashed #d5e2f4;
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    color: #4a5f82;
    font-size: 0.84rem;
}

.saas-home-secondary-kpis strong {
    color: #204178;
}

.saas-home-chart-card {
    border: 1px solid #d7e2f2;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.saas-home-empty {
    border: 1px dashed #cfdae9;
    border-radius: 10px;
    background: #f9fbff;
    color: #61728f;
    text-align: center;
    padding: 0.8rem;
    font-size: 0.87rem;
    margin-top: 0.6rem;
}

.saas-home-expiring-list {
    display: grid;
    gap: 0.48rem;
    margin-top: 0.5rem;
}

.saas-home-expiring-item {
    display: flex;
    justify-content: space-between;
    gap: 0.55rem;
    border: 1px solid #dde7f6;
    border-radius: 11px;
    background: #f8fbff;
    padding: 0.52rem 0.58rem;
}

.saas-home-expiring-main {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
}

.saas-home-expiring-main strong {
    color: #183765;
    font-size: 0.9rem;
    line-height: 1.2;
}

.saas-home-expiring-main span {
    color: #5b6e8e;
    font-size: 0.78rem;
}

.saas-home-expiring-meta {
    display: grid;
    justify-items: end;
    gap: 0.12rem;
    color: #5a6e8f;
    font-size: 0.77rem;
    white-space: nowrap;
}

.saas-home-expiring-days {
    border: 1px solid #efcf94;
    background: #fff7e7;
    color: #8b5b07;
    border-radius: 999px;
    padding: 0.08rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
}

@media (max-width: 1199px) {
    .saas-tenant-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .saas-home-filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .saas-hero-badges {
        justify-content: flex-start;
    }

    .saas-form-actions {
        justify-content: stretch;
    }

    .saas-primary-action {
        width: 100%;
        min-width: 0;
    }

    .saas-tenant-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .saas-tenant-head-actions {
        width: 100%;
        align-items: stretch;
    }

    .saas-support-btn {
        width: 100%;
    }

    .saas-tenant-kpis {
        grid-template-columns: 1fr;
    }

    .saas-home-filter-grid {
        grid-template-columns: 1fr;
    }

    .saas-home-filter-actions {
        width: 100%;
    }

    .saas-home-filter-actions .btn {
        flex: 1 1 auto;
    }

    .saas-home-expiring-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .saas-home-expiring-meta {
        justify-items: flex-start;
    }
}

@media (max-width: 1199px) {
    .topbar-title {
        font-size: 1.35rem;
    }

    .topbar-profile {
        width: 48px;
        height: 48px;
        font-size: 0.9rem;
    }

    .dashboard-sidebar {
        position: static;
        max-height: none;
    }

    .projects-overview-board {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
    }

    .dashboard-chart-wrap {
        min-height: 250px;
        height: 250px;
    }

    .gantt-header-row,
    .gantt-data-row {
        grid-template-columns: 240px minmax(760px, 1fr);
    }
}

@media (max-width: 991px) {
    body.auth-layout {
        background: linear-gradient(180deg, #edf2ff 0%, #f5f7fc 42%, #eef2f8 100%);
    }

    .app-shell {
        display: block;
        position: relative;
        min-height: 100vh;
        overflow-x: hidden;
    }

    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: auto;
        width: min(84vw, 320px);
        max-width: 320px;
        height: 100dvh;
        max-height: 100dvh;
        z-index: 1080;
        transform: translateX(-110%);
        transition: transform 0.28s ease;
        box-shadow: 0 24px 48px rgba(8, 15, 33, 0.44);
        border-right: 1px solid rgba(214, 225, 246, 0.25);
        overflow-y: auto;
        padding-bottom: calc(18px + env(safe-area-inset-bottom));
    }

    .app-shell.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .app-shell.sidebar-open .app-sidebar,
    .app-shell.sidebar-open .mobile-sidebar-backdrop {
        pointer-events: auto;
    }

    .sidebar-mobile-actions {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 8px;
    }

    .mobile-sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border: 1px solid rgba(189, 204, 238, 0.45);
        border-radius: 12px;
        color: #eff5ff;
        background: rgba(255, 255, 255, 0.06);
    }

    .mobile-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        border: 0;
        background: rgba(6, 12, 25, 0.48);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
        z-index: 1070;
    }

    .app-shell.sidebar-open .mobile-sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar-nav {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .nav-item {
        padding: 12px 14px;
        border-radius: 14px;
        font-weight: 600;
    }

    .nav-item .nav-label {
        font-size: 1.05rem;
    }

    .sidebar-submenu {
        margin-left: 12px;
        padding-left: 14px;
    }

    .submenu-link {
        font-size: 0.96rem;
        padding: 8px 10px;
    }

    .app-main {
        min-height: 100vh;
        width: 100%;
        position: relative;
        z-index: 1020;
    }

    .app-topbar {
        position: sticky;
        top: 0;
        z-index: 1040;
        height: auto;
        padding: 10px 12px;
        background: rgba(255, 255, 255, 0.9);
        border-bottom: 1px solid rgba(201, 210, 228, 0.8);
        backdrop-filter: blur(10px);
    }

    .mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border: 1px solid #cfdaef;
        border-radius: 12px;
        background: #ffffff;
        color: #1f325e;
        flex: 0 0 auto;
    }

    .topbar-left {
        max-width: calc(100% - 56px);
    }

    .topbar-title {
        font-size: 1.15rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .topbar-profile {
        width: 44px;
        height: 44px;
    }

    .app-content {
        padding: 12px;
    }

    .app-footer {
        margin: 10px 8px calc(10px + env(safe-area-inset-bottom));
        border: 1px solid #dbe3f1;
        border-radius: 14px;
        border-top: 1px solid #dbe3f1;
        background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
        box-shadow: 0 8px 20px rgba(27, 44, 86, 0.08);
        padding: 12px 14px;
        gap: 10px;
        font-size: 0.88rem;
        grid-template-columns: 1fr;
    }

    .app-footer-col {
        min-width: 100%;
    }

    .app-footer-company {
        padding-bottom: 8px;
        border-bottom: 1px dashed #d8e2f2;
    }

    .app-footer-company strong {
        font-size: 1rem;
        margin-bottom: 4px;
    }

    .app-footer-legal {
        margin-left: 0;
        justify-self: stretch;
        text-align: center;
        color: #5f6f8d;
    }

    .greeting-card .card-body {
        padding: 14px;
    }

    .profile-avatar {
        width: 54px;
        height: 54px;
    }

    .module-card {
        min-height: 134px;
        border-radius: 18px;
    }

    .module-title {
        font-size: 1.12rem;
    }

    .module-subtitle {
        font-size: 0.8rem;
    }

    .projects-overview-board {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 12px;
        -webkit-overflow-scrolling: touch;
    }

    .projects-overview-board > * {
        scroll-snap-align: start;
    }

    .project-overview-column {
        min-width: 86vw;
        max-width: 86vw;
        min-height: 62vh;
        border-radius: 18px;
    }

    .project-overview-column.is-collapsed {
        min-width: 58px;
        max-width: 58px;
    }

    .project-overview-column-header {
        padding: 0.75rem;
    }

    .project-overview-list {
        padding: 0.6rem;
    }

    .kanban-flex-board {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 12px;
        -webkit-overflow-scrolling: touch;
    }

    .kanban-flex-column {
        min-width: 86vw;
        max-width: 86vw;
        scroll-snap-align: start;
    }

    .kanban-flex-column.is-collapsed {
        min-width: 58px;
        max-width: 58px;
    }

    .kanban-column {
        min-height: 62vh;
        border-radius: 18px;
    }

    .kanban-column-header {
        padding: 0.75rem;
    }

    .kanban-tasks {
        padding: 0.65rem;
    }

    .task-card {
        border-radius: 14px;
        padding: 0.68rem;
    }

    .task-card-actions .btn {
        padding: 0.27rem 0.5rem;
        font-size: 0.78rem;
    }

    .dashboard-chart-wrap {
        min-height: 220px;
        height: 220px;
    }

    .gantt-shell {
        border-radius: 16px;
    }

    .gantt-header-row,
    .gantt-data-row {
        grid-template-columns: 200px minmax(640px, 1fr);
    }
}

@media (max-width: 767px) {
    .app-topbar {
        padding: 9px 10px;
    }

    .mobile-menu-toggle {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .topbar-left {
        max-width: calc(100% - 48px);
        gap: 8px;
    }

    .topbar-title {
        font-size: 1rem;
    }

    .topbar-profile {
        width: 38px;
        height: 38px;
    }

    .app-content {
        padding: 10px;
    }

    .sidebar-logo-wrap {
        margin-bottom: 14px;
    }

    .sidebar-user-name {
        font-size: 1.05rem;
    }

    .sidebar-user-role {
        font-size: 0.95rem;
    }

    .projects-overview-board,
    .kanban-flex-board {
        gap: 10px;
    }

    .project-overview-column,
    .kanban-flex-column {
        min-width: 90vw;
        max-width: 90vw;
    }

    .project-overview-column.is-collapsed,
    .kanban-flex-column.is-collapsed {
        min-width: 58px;
        max-width: 58px;
    }

    .module-card {
        min-height: 124px;
        padding: 14px;
    }

    .module-title {
        font-size: 1.02rem;
    }

    .module-subtitle {
        font-size: 0.76rem;
    }

    .dashboard-kpi-tile {
        min-height: 96px;
        padding: 0.75rem 0.85rem;
    }

    .dashboard-kpi-tile .kpi-value {
        font-size: 1.6rem;
    }

    .gantt-month-input {
        min-width: 116px;
    }

    .gantt-header-controls {
        width: 100%;
        min-width: 0;
        align-items: flex-start;
    }

    .gantt-month-nav {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

@media (max-width: 1199px) {
    .modal {
        padding-right: 0 !important;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-dialog.modal-fullscreen-xl-down,
    .modal-dialog.modal-fullscreen-lg-down {
        margin: 0;
        max-width: 100vw;
        width: 100vw;
        height: 100dvh;
        min-height: 100dvh;
        height: 100svh;
        min-height: 100svh;
        padding: 0;
    }

    .modal-dialog.modal-fullscreen-xl-down .modal-content,
    .modal-dialog.modal-fullscreen-lg-down .modal-content {
        height: 100dvh;
        min-height: 100dvh;
        height: 100svh;
        min-height: 100svh;
        border: 0;
        border-radius: 0;
        display: flex;
        overflow: hidden;
    }

    .modal-dialog.modal-fullscreen-xl-down .modal-content > form,
    .modal-dialog.modal-fullscreen-lg-down .modal-content > form {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    .modal-dialog.modal-fullscreen-xl-down .modal-header,
    .modal-dialog.modal-fullscreen-xl-down .modal-footer,
    .modal-dialog.modal-fullscreen-lg-down .modal-header,
    .modal-dialog.modal-fullscreen-lg-down .modal-footer {
        position: sticky;
        z-index: 3;
        background: #ffffff;
    }

    .modal-dialog.modal-fullscreen-xl-down .modal-header,
    .modal-dialog.modal-fullscreen-lg-down .modal-header {
        top: 0;
        border-bottom: 1px solid var(--line);
    }

    .modal-dialog.modal-fullscreen-xl-down .modal-footer,
    .modal-dialog.modal-fullscreen-lg-down .modal-footer {
        bottom: 0;
        border-top: 1px solid var(--line);
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
        box-shadow: 0 -10px 22px rgba(15, 23, 42, 0.08);
    }

    .modal-dialog.modal-fullscreen-xl-down .modal-body,
    .modal-dialog.modal-fullscreen-lg-down .modal-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding-bottom: calc(6rem + env(safe-area-inset-bottom));
    }

.modal .form-control,
.modal .form-select,
.modal textarea {
    font-size: 16px;
}
}

@media (max-width: 1199px) {
    .users-kpi-grid {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }

    .users-privileges-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .topbar-user-profile {
        width: auto;
        height: auto;
        min-height: 38px;
        padding: 2px 4px 2px 6px;
    }

    .topbar-user-name {
        display: none;
    }

    .topbar-user-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.68rem;
    }

    .users-hero-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .users-hero-tags {
        justify-content: flex-start;
    }

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

    .users-section-header {
        padding: 0.85rem 0.85rem 0;
    }

    .users-create-card .card-body {
        padding: 0.85rem;
    }
}

.meetings-module .meetings-hero-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.meetings-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 0.65rem;
}

.meetings-kpi-card {
    border: 1px solid #d9e1f2;
    border-radius: 12px;
    background: #f8faff;
    padding: 0.7rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.meetings-kpi-label {
    font-size: 0.8rem;
    color: #5d6b86;
}

.meetings-kpi-value {
    font-size: 1.22rem;
    line-height: 1;
    color: #10204a;
}

.meetings-project-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.7rem;
}

.meetings-project-summary-card {
    border: 1px solid #d7e0f3;
    border-radius: 12px;
    padding: 0.7rem 0.8rem;
    color: #15213d;
    background: #fbfdff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.meetings-project-summary-card:hover {
    border-color: #9ab5f2;
    box-shadow: 0 10px 22px rgba(28, 57, 126, 0.1);
    transform: translateY(-1px);
}

.meetings-project-summary-top {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.76rem;
    color: #55627b;
}

.meetings-project-summary-name {
    font-weight: 700;
    color: #0f2143;
    margin-top: 0.25rem;
}

.meetings-project-summary-client {
    font-size: 0.8rem;
    color: #677694;
}

.meetings-project-summary-foot {
    margin-top: 0.3rem;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #5a6680;
}

.meetings-mini-progress {
    width: 100%;
    height: 7px;
    border-radius: 999px;
    background: #dfe6f3;
    overflow: hidden;
}

.meetings-mini-progress-bar {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #2f68ff, #22a4f0);
}

.meetings-table th {
    white-space: nowrap;
    font-size: 0.81rem;
    color: #5a6784;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.meetings-table td {
    vertical-align: top;
}

.meetings-status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.19rem 0.56rem;
    font-size: 0.74rem;
    font-weight: 600;
}

.meetings-status-pill.is-draft {
    background: #ffeecf;
    color: #966312;
}

.meetings-status-pill.is-closed {
    background: #dff4e3;
    color: #16693a;
}

.meetings-editor-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.meeting-editor-hero {
    border-radius: 18px;
    overflow: hidden;
}

.meeting-editor-hero .card-body {
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.16), transparent 34%),
        linear-gradient(130deg, #1f5f96 0%, #1a3f78 55%, #1d74b2 100%);
    color: #f2f7ff;
}

.meeting-editor-hero h1,
.meeting-editor-hero .h4 {
    color: #ffffff;
}

.meeting-editor-hero .text-secondary {
    color: rgba(236, 243, 255, 0.9) !important;
}

.meeting-editor-hero .btn-outline-secondary {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.46);
    color: #ffffff;
}

.meeting-editor-hero .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.65);
}

.meeting-editor-hero .btn-outline-primary {
    background: #ffffff;
    color: #1b4e99;
    border-color: #ffffff;
}

.meeting-editor-hero .btn-outline-primary:hover {
    background: #eaf3ff;
    border-color: #eaf3ff;
    color: #163f7f;
}

.meeting-editor-panel {
    border: 1px solid #d6e1f2;
    border-radius: 14px;
    overflow: hidden;
}

.meeting-editor-panel .card-body {
    background: linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%);
}

.meeting-editor-panel h2 {
    color: #0f2958;
}

.meeting-editor-panel .form-control,
.meeting-editor-panel .form-select {
    border-color: #ccd8ea;
}

.meeting-editor-panel .form-control:focus,
.meeting-editor-panel .form-select:focus {
    border-color: #6a95e6;
    box-shadow: 0 0 0 0.15rem rgba(47, 104, 255, 0.16);
}

.meeting-dynamic-list {
    display: grid;
    gap: 0.62rem;
}

.meeting-dynamic-row {
    border: 1px solid #d2deef;
    border-left-width: 3px;
    border-left-color: #4588ff;
    border-radius: 11px;
    padding: 0.56rem;
    background: #ffffff;
    box-shadow: 0 8px 16px rgba(18, 50, 106, 0.07);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.meeting-dynamic-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(18, 50, 106, 0.11);
}

.meeting-remove-row {
    border-radius: 999px;
    font-weight: 600;
    padding-left: 0.7rem;
    padding-right: 0.7rem;
}

.meeting-topic-row .topic-title {
    min-width: 220px;
    flex: 1 1 220px;
}

.meeting-metrics-card {
    position: sticky;
    top: 0.5rem;
    border: 1px solid #cfdcf2;
    border-radius: 15px;
    overflow: hidden;
}

.meeting-metrics-card .card-body {
    background:
        radial-gradient(circle at top right, rgba(47, 104, 255, 0.16), transparent 40%),
        linear-gradient(180deg, #f7fbff 0%, #edf4ff 100%);
}

.meeting-rings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(88px, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.75rem;
}

.meeting-ring-card {
    text-align: center;
}

.meeting-ring {
    --meeting-percent: 0;
    width: 74px;
    height: 74px;
    margin: 0 auto 0.35rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #17336b;
    background:
        radial-gradient(circle closest-side, #ffffff 68%, transparent 69% 100%),
        conic-gradient(#2f6bff calc(var(--meeting-percent) * 1%), #dce4f4 0);
}

.meeting-ring span {
    font-size: 0.86rem;
}

.meeting-metric-row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    border-top: 1px solid #e3e9f5;
    padding-top: 0.45rem;
    margin-top: 0.45rem;
    font-size: 0.86rem;
}

.meeting-kardex-list {
    display: grid;
    gap: 0.55rem;
    max-height: 340px;
    overflow-y: auto;
}

.meeting-kardex-item {
    border: 1px solid #d7dff0;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 0.52rem 0.58rem;
}

.meeting-kardex-head {
    display: flex;
    justify-content: space-between;
    gap: 0.4rem;
    align-items: center;
    margin-bottom: 0.22rem;
}

.meeting-kardex-action {
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    font-weight: 700;
    color: #234b9c;
}

.meeting-kardex-date {
    font-size: 0.72rem;
    color: #61728f;
}

.meeting-kardex-desc {
    font-size: 0.82rem;
    color: #23314d;
}

.meeting-kardex-user {
    margin-top: 0.2rem;
    font-size: 0.74rem;
    color: #63718c;
}

@media (max-width: 1199px) {
    .meetings-kpi-grid {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .meeting-metrics-card {
        position: static;
    }
}

@media (max-width: 767px) {
    .meetings-kpi-grid {
        grid-template-columns: 1fr 1fr;
    }

    .meeting-rings-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.subscription-blocked-screen {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.subscription-blocked-card {
    width: min(100%, 560px);
    background: #ffffff;
    border: 1px solid #d9e1ef;
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    padding: 2rem;
    text-align: center;
}

.subscription-blocked-icon {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    margin: 0 auto 1rem auto;
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: #b91c1c;
    background: #fee2e2;
}

.subscription-blocked-card h1 {
    font-size: 1.9rem;
    margin-bottom: 0.85rem;
}

.subscription-blocked-card p {
    color: #475569;
    margin-bottom: 1.25rem;
}

.subscription-blocked-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}
