/* CRM Authentication Styles */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --primary-blue: #2752ff;
    --primary-blue-dark: #1a3ed8;
    --bg-soft: #eaf1ff;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --border-radius: 12px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-soft);
    min-height: 100vh;
    overflow-x: hidden;
}

body.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 6vh, 4rem) 1.5rem;
}

.auth-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    min-height: 600px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: slideIn 0.6s ease-out;
}

.auth-container--single {
    max-width: 420px;
    width: 100%;
    min-height: auto;
    background: transparent;
    box-shadow: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-container--single::before {
    display: none;
}

.auth-page-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    text-align: center;
}

.auth-page-logo {
    width: auto;
    height: auto;
    max-width: 216px;
    max-height: 67px;
    display: block;
    object-fit: contain;
}

.auth-page-title {
    font-size: 24px;
    font-weight: 700;
    color: #00005A;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    line-height: 1em;
    letter-spacing: -0.01em;
}

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

.auth-card {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
    min-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header--centered {
    margin-bottom: 1.25rem;
    margin-top: 0;
}

.auth-card--compact .auth-header--centered {
    margin-bottom: 1rem;
    padding-top: 1.5rem;
}

.auth-card--compact .auth-title {
    margin-top: 0;
    margin-bottom: 1rem;
}


.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo i {
    font-size: 2.5rem;
    color: #667eea;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.logo h2 {
    color: var(--dark-color);
    font-weight: 700;
    font-size: 1.8rem;
}

.auth-subtitle {
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.brand-wordmark {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.brand-wordmark__primary {
    font-size: 1.8rem;
    color: #3b52ff;
    text-transform: lowercase;
}

.brand-wordmark__accent {
    font-size: 2rem;
    color: #ff7a1a;
    text-transform: uppercase;
    letter-spacing: 0;
}

.auth-card--compact {
    background: white;
    border-radius: 30px;
    padding: 16px;
    box-shadow: 0 10px 60px rgba(226, 236, 249, 0.5);
    width: 380px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.auth-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2a4b;
    margin-top: 0;
    margin-bottom: 0;
    font-family: 'Poppins', sans-serif;
    line-height: 100%;
    letter-spacing: 0;
}

.auth-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333333;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
}

.brand-wordmark__accent sup {
    font-size: 0.7em;
    vertical-align: super;
    line-height: 0;
}

.auth-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.auth-card--compact .form-group {
    margin-bottom: 0.875rem;
}

.auth-card--compact .form-group:last-of-type {
    margin-bottom: 0.75rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-label i {
    color: #667eea;
    width: 16px;
}

.form-label--inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #4a4f67;
    font-weight: 500;
}

.form-label--inline i {
    color: #a1a8c8;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid #d9deef;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: white;
    box-shadow: 0 0 0 3px rgba(39, 82, 255, 0.15);
    transform: translateY(-1px);
}

.form-control:hover {
    border-color: var(--primary-blue);
}

.form-input-wrapper {
    position: relative;
    width: 100%;
}

.form-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
    width: 16px;
    height: 16px;
    display: block;
    object-fit: contain;
}

.form-input-wrapper img.form-input-icon {
    width: 16px;
    height: 16px;
    display: block;
    object-fit: contain;
}

.form-input-wrapper .form-control {
    padding-left: 2.75rem;
}

.auth-card--compact .form-input-wrapper .form-control {
    height: 40px;
    padding: 0 1rem 0 2.75rem;
    box-sizing: border-box;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.form-options--compact {
    margin-bottom: 1rem;
}

.auth-card--compact .form-options--compact {
    margin-bottom: 0.875rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-me--compact span {
    color: #4a4f67;
    font-size: 0.9rem;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-blue);
}

.auth-card--compact .remember-me input[type="checkbox"] {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    opacity: 0.6;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1.5px solid rgba(74, 79, 103, 0.4);
    position: relative;
    transition: all 0.3s ease;
}

.auth-card--compact .remember-me input[type="checkbox"]:checked {
    background-color: rgba(32, 69, 255, 0.7);
    border-color: rgba(32, 69, 255, 0.7);
    opacity: 0.8;
}

.auth-card--compact .remember-me input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.auth-card--compact .remember-me input[type="checkbox"]:hover {
    opacity: 0.8;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-password--compact {
    color: var(--primary-blue);
    font-weight: 600;
}

.forgot-password:hover {
    color: var(--primary-blue-dark);
    text-decoration: underline;
}

.btn-login, .btn-register {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-login {
    background: var(--primary-gradient);
    color: white;
}

.btn-login--accent {
    background: #2045FF;
    border: 0.5px solid #E0E0E0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    padding: 0;
    width: calc(100% - 32px);
    height: 40px;
    box-shadow: none;
    margin: 0 16px 2.5rem 16px;
    display: block;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-login--accent:hover {
    background: #1a38cc;
    box-shadow: none;
    transform: none;
}

.btn-register {
    background: var(--secondary-gradient);
    color: white;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.auth-container--single .auth-footer {
    margin-top: 1.5rem;
    border-top: none;
    padding-top: 0;
}

.auth-footer p {
    color: #6c757d;
    font-size: 0.9rem;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.auth-bg {
    flex: 1;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.bg-content {
    text-align: center;
    color: white;
    position: relative;
    z-index: 2;
    max-width: 400px;
}

.bg-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.bg-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.feature:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
}

.feature i {
    font-size: 2rem;
    color: white;
    margin-bottom: 0.5rem;
}

.feature span {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Alert styles */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: none;
    font-weight: 500;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-error, .alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
    border-left: 4px solid var(--error-color);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: rgba(23, 162, 184, 0.1);
    color: var(--info-color);
    border-left: 4px solid var(--info-color);
}

.invalid-feedback {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
        max-width: 100%;
        margin: 1rem;
        min-height: auto;
    }

    .auth-card, .auth-bg {
        padding: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .bg-content h3 {
        font-size: 1.5rem;
    }

    .features {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .feature {
        padding: 0.5rem;
    }

    .feature i {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .auth-card, .auth-bg {
        padding: 1.5rem;
    }

    .logo h2 {
        font-size: 1.5rem;
    }

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

/* Loading animation */
.btn-login:disabled, .btn-register:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-login:disabled::after, .btn-register:disabled::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus animations */
.form-control:focus + .form-label::before {
    transform: scaleX(1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* Dashboard Layout */
body.dashboard-body {
    background: #FAFBFF;
    display: flex;
    justify-content: flex-start;
    padding: 0;
    margin: 0;
    width: 100%;
    overflow-x: hidden;
}

.dashboard-shell {
    display: flex;
    width: 100%;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    border: none;
    min-height: 100vh;
}

.dashboard-sidebar {
    width: 260px;
    background: #FFFFFF;
    padding: 2.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.sidebar-logo {
    width: auto;
    height: auto;
    max-width: 216px;
    max-height: 67px;
    display: block;
    object-fit: contain;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    color: #9CA3AF;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    background: transparent;
    position: relative;
}

.sidebar-link i {
    font-size: 1.1rem;
}

.sidebar-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: block;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(65%) sepia(6%) saturate(500%) hue-rotate(182deg) brightness(95%) contrast(88%);
    transition: filter 0.2s ease;
}

.sidebar-chevron {
    width: 16px;
    height: 16px;
    margin-left: auto;
    flex-shrink: 0;
    filter: brightness(0) saturate(100%) invert(65%) sepia(6%) saturate(500%) hue-rotate(182deg) brightness(95%) contrast(88%);
    transition: filter 0.2s ease;
}

.sidebar-link:hover {
    background: rgba(39, 82, 255, 0.05);
    color: #6B7280;
}

.sidebar-link:hover .sidebar-icon,
.sidebar-link:hover .sidebar-chevron {
    filter: brightness(0) saturate(100%) invert(50%) sepia(6%) saturate(500%) hue-rotate(182deg) brightness(95%) contrast(88%);
}

.sidebar-link.active {
    background: linear-gradient(to right, #A78BFA 0%, #7C3AED 100%);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.2);
}

.sidebar-link.active .sidebar-icon,
.sidebar-link.active .sidebar-chevron {
    filter: brightness(0) saturate(100%) invert(100%);
}

.sidebar-footer {
    margin-top: auto;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    color: #ff7a7a;
    background: rgba(255, 122, 122, 0.1);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.sidebar-logout:hover {
    background: rgba(255, 122, 122, 0.18);
}

.dashboard-main {
    flex: 1;
    background: #f5f7fb;
    padding: 3rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    min-height: 100vh;
    box-sizing: border-box;
}

.dashboard-inner {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 0;
}

.dashboard-inner .dashboard-topbar {
    width: calc(100% + 8rem);
    margin-left: -4rem;
    margin-right: -4rem;
    padding-left: 4rem;
    padding-right: 0;
    box-sizing: border-box;
}

.dashboard-inner .dashboard-topbar .topbar-right {
    padding-right: 4rem;
}

.dashboard-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.topbar-left h1 {
    font-size: 1.9rem;
    font-weight: 700;
    color: #1e255e;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #7a7fb0;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.back-link:hover {
    color: #2752ff;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: 0;
    justify-content: flex-end;
}

.topbar-right .btn-add-manager,
.dashboard-inner .btn-add-manager {
    width: auto !important;
    min-width: auto !important;
    max-width: 150px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    display: inline-flex !important;
    align-self: center !important;
    margin-top: -2px !important;
}

.btn-icon {
    min-width: 42px;
    height: 42px;
    border-radius: 12px;
    border: none;
    background: rgba(39, 82, 255, 0.08);
    color: #2752ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    padding: 0 0.75rem;
}

.btn-icon:hover {
    background: rgba(39, 82, 255, 0.18);
}

.btn-icon .refresh-status {
    font-size: 0.75rem;
    font-weight: 600;
    color: #2752ff;
    white-space: nowrap;
    display: none;
    pointer-events: none;
}

.btn-icon:disabled .refresh-status {
    display: inline;
}

.btn-icon .fas {
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.btn-icon:disabled .fas {
    opacity: 0.5;
}

.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px 8px 8px;
    background: white;
    border-radius: 12px;
    border: none;
    height: 48px;
    box-sizing: border-box;
    min-width: 247px;
    width: auto;
    cursor: pointer;
}

.user-initials {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ABA8EF 0%, #5B3DE9 100%);
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.user-avatar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ABA8EF 0%, #5B3DE9 100%);
    flex-shrink: 0;
}

.user-avatar-icon img {
    width: 20px;
    height: 20px;
    display: block;
    object-fit: contain;
}

.user-name {
    font-weight: 500;
    color: #292D32;
    font-size: 14px;
    flex: 1;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-chevron-down {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-left: auto;
}

.user-dropdown-wrapper {
    position: relative;
    flex-shrink: 0;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 344px;
    min-height: 100px;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0px 10px 60px 0px rgba(226, 236, 249, 0.5);
    border: none;
    z-index: 1000;
    overflow: hidden;
    padding: 20px 16px;
    box-sizing: border-box;
}

.user-dropdown-header {
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    width: 100%;
    box-sizing: border-box;
}

.user-dropdown-avatar {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2752ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-dropdown-initials {
    color: white;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0;
    line-height: 1;
}

.user-dropdown-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #292D32;
    line-height: 1.5;
    word-break: break-word;
    min-width: 0;
    margin-left: 0;
    margin-right: auto;
}

.user-dropdown-chevron {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-dropdown-chevron img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 8px;
    margin: 0;
    text-decoration: none;
    color: #292D32;
    transition: background-color 0.2s ease;
    min-height: 48px;
    box-sizing: border-box;
}

.user-dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.user-dropdown-item--logout {
    color: #292D32;
}

.user-dropdown-item-icon {
    flex-shrink: 0;
    width: 21px;
    height: 21px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
}

.user-dropdown-item-icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    border: none;
    outline: none;
    padding: 0;
    margin: 0;
}

.user-dropdown-item-icon--blue img,
.user-dropdown-item-icon--red img {
    width: 20px;
    height: 20px;
}

.user-dropdown-item-icon svg {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
}

.user-dropdown-item-icon--purple {
    background: linear-gradient(135deg, #ABA8EF 0%, #5B3DE9 100%);
    border-radius: 8px;
    width: 32px;
    height: 32px;
}

.user-dropdown-item-icon--purple img {
    width: 20px;
    height: 20px;
}

.user-dropdown-item-icon--blue,
.user-dropdown-item-icon--red {
    background: transparent;
}

.user-dropdown-item-text {
    font-size: 14px;
    font-weight: 400;
    color: #292D32;
    line-height: 1.5;
    flex: 1;
}

.user-dropdown-divider {
    height: 1px;
    background: #EEEEEE;
    margin: 8px 8px;
}

.dashboard-messages .alert {
    border-radius: 14px;
    border-left: 4px solid #2752ff;
    background: rgba(39, 82, 255, 0.1);
    color: #1e255e;
    font-weight: 500;
}

.api-warning {
    margin-bottom: 2rem;
}

.api-warning .alert {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 1px solid #ffeaa7;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.15);
}

.api-warning .alert ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.api-warning .alert li {
    margin-bottom: 0.5rem;
}

.api-warning .alert code {
    background: rgba(255, 255, 255, 0.5);
    padding: 0.125rem 0.25rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.clients-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: stretch;
}

.clients-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-field {
    position: relative;
    width: 271px;
    height: 36px;
}

.search-field .search-icon {
    position: absolute;
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    pointer-events: none;
    z-index: 1;
}

.search-field input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 40px;
    border-radius: 12px;
    border: 0.5px solid #E0E0E0;
    background: #F3F3F5;
    color: #292D32;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5em;
    letter-spacing: -0.01em;
    transition: var(--transition);
    outline: none;
    box-sizing: border-box;
}

.search-field input::placeholder {
    color: #B5B7C0;
}

.search-field input:focus {
    border-color: #E0E0E0;
    background: #F3F3F5;
    box-shadow: none;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: flex-start;
}

.toolbar-actions .form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 0.8rem 3rem 0.8rem 1.2rem;
    border-radius: 16px;
    border: 1px solid #e3e8f4;
    background: #f2f4f9 url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%232752FF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 1.2rem center;
    background-size: 12px 8px;
    color: #4f5782;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.toolbar-actions .form-select:focus {
    outline: none;
    border-color: #c7d2f2;
    background-color: #fff;
    box-shadow: 0 6px 16px rgba(76, 111, 255, 0.08);
}

.toolbar-actions .form-select option {
    font-weight: 500;
    color: #1e255e;
}

.btn-filter,
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    border-radius: 16px;
    padding: 0.85rem 1.4rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
}

.btn-filter {
    background: rgba(39, 82, 255, 0.1);
    color: #2752ff;
}

.btn-filter:hover {
    background: rgba(39, 82, 255, 0.2);
}

.btn-primary {
    background: #2752ff;
    color: white;
    box-shadow: 0 15px 25px rgba(39, 82, 255, 0.25);
}

.btn-primary:hover {
    background: var(--primary-blue-dark);
}

.clients-card {
    background: #FFFFFF;
    border-radius: 30px;
    padding: 24px 24px 0 24px;
    box-shadow: 0px 10px 60px 0px rgba(226, 236, 249, 0.5);
    border: none;
    width: 100%;
    overflow: hidden;
}

.clients-card-search {
    margin-bottom: 20px;
    width: 100%;
    max-width: 271px;
}

.clients-table {
    width: 100%;
    border-collapse: collapse;
    color: #292D32;
    font-family: 'Poppins', sans-serif;
}

.clients-table thead tr {
    color: #B5B7C0;
    font-weight: 500;
    text-transform: none;
    font-size: 14px;
    letter-spacing: -0.01em;
    line-height: 1.5em;
}

.clients-table th:last-child {
    text-align: center;
}

.clients-table thead {
    height: 21px;
}

.clients-table th {
    padding: 0 0 0 38px;
    height: 21px;
    text-align: left;
    vertical-align: top;
}

.clients-table th:first-child {
    padding-left: 38px;
}

.clients-table tbody tr {
    height: 68px;
}

.clients-table td {
    padding: 0 0 0 38px;
    height: 68px;
    border-bottom: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5em;
    letter-spacing: -0.01em;
    color: #292D32;
    vertical-align: middle;
}

.clients-table td:first-child {
    padding-left: 38px;
}

.clients-table td:last-child {
    text-align: center;
    padding-left: 0;
}

.client-id-cell,
.client-department-cell {
    color: rgba(41, 45, 50, 0.5);
}

.clients-table tbody tr {
    transition: background 0.2s ease;
    height: 68px;
}

.clients-table tbody tr:nth-child(even) {
    background: rgba(217, 217, 217, 0.15);
}

.clients-table tbody tr:hover {
    background: rgba(217, 217, 217, 0.15);
}

.text-end {
    text-align: right;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-a {
    background: rgba(39, 196, 143, 0.12);
    color: #1c9f74;
}

.badge-b {
    background: rgba(255, 193, 7, 0.15);
    color: #d38900;
}

.badge-c {
    background: rgba(220, 38, 38, 0.12);
    color: #b61f1f;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

.category-chip .category-bullet {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #E9F7EC;
    color: #43C25C;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    line-height: 1.5em;
    border: none;
    padding: 4px 12px;
}

.category-chip .category-label {
    font-size: 0.9rem;
    color: #4f5782;
    text-transform: capitalize;
}

.category-chip.category-a .category-bullet {
    background: #E9F7EC;
    color: #43C25C;
    border-radius: 85px;
    width: 32px;
    height: 29px;
}

.category-chip.category-b .category-bullet {
    background: #FFF9E3;
    color: #FFD400;
    border-radius: 85px;
    width: 32px;
    height: 29px;
}

.category-chip.category-c .category-bullet {
    background: #FFC5C5;
    color: #DF0404;
    border-radius: 85px;
    width: 32px;
    height: 29px;
}

.category-chip.category-new .category-bullet {
    background: #364AFF;
    color: #FFFFFF;
    border-radius: 10px;
    width: 44px;
    height: 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-dot-active {
    background: #1c9f74;
    box-shadow: 0 0 0 4px rgba(28, 159, 116, 0.1);
}

.status-dot-warning {
    background: #f3b200;
    box-shadow: 0 0 0 4px rgba(243, 178, 0, 0.12);
}

.status-dot-inactive {
    background: #d9534f;
    box-shadow: 0 0 0 4px rgba(217, 83, 79, 0.12);
}

.clients-pagination {
    margin-top: 24px !important;
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    justify-content: center !important;
    height: 24px !important;
    font-family: 'Poppins', sans-serif;
    visibility: visible !important;
    opacity: 1 !important;
}

.page-btn {
    min-width: auto;
    height: 24px;
    border-radius: 36px;
    border: 1px solid #EEEEEE;
    background: #F5F5F5;
    color: #404B52;
    font-weight: 500;
    font-size: 12px;
    line-height: 1em;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: var(--transition);
    padding: 6px 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    margin: 0 2px;
    box-sizing: border-box;
}

.clients-pagination a.page-btn {
    text-decoration: none;
    color: #404B52;
}

.clients-pagination a.page-btn:hover {
    background: #E0E0E0;
    color: #404B52;
}

.page-btn.active {
    background: #2045FF !important;
    color: #FFFFFF !important;
    border: 1px solid #5932EA !important;
    box-shadow: none;
}

.page-btn.disabled {
    opacity: 0.5;
    background: #F5F5F5;
    color: #404B52;
    cursor: not-allowed;
    pointer-events: none;
}

.page-dots {
    color: #000000;
    font-weight: 500;
    font-size: 12px;
    padding: 0;
    margin: 0 0 0 0;
    line-height: 1em;
}

.page-size {
    display: none;
    outline: none;
}

/* Адаптация для больших экранов десктопа */
@media (min-width: 1920px) {
    .dashboard-main {
        padding: 4rem 6rem;
    }
    
    .dashboard-inner {
        max-width: 1800px;
        margin: 0 auto;
    }
}

@media (min-width: 1600px) and (max-width: 1919px) {
    .dashboard-main {
        padding: 3.5rem 5rem;
    }
    
    .dashboard-inner {
        max-width: 1600px;
        margin: 0 auto;
    }
}

@media (min-width: 1400px) and (max-width: 1599px) {
    .dashboard-main {
        padding: 3rem 4rem;
    }
    
    .dashboard-inner {
        max-width: 1400px;
        margin: 0 auto;
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .dashboard-main {
        padding: 3rem 3.5rem;
    }
    
    .dashboard-inner {
        max-width: 1200px;
        margin: 0 auto;
    }
}

@media (max-width: 1200px) {
    .dashboard-main {
        padding: 2.5rem 2rem;
    }

    .dashboard-inner {
        max-width: 100%;
    }
    
    .dashboard-inner .dashboard-topbar {
        width: calc(100% + 4rem);
        margin-left: -2rem;
        margin-right: -2rem;
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (max-width: 992px) {
    body.dashboard-body {
        padding: 1rem;
    }

    .dashboard-main {
        padding: 2rem 1.5rem;
    }

    .dashboard-inner {
        gap: 2rem;
    }
    
    .dashboard-inner .dashboard-topbar {
        width: calc(100% + 3rem);
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

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

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

@media (max-width: 768px) {
    .dashboard-main {
        padding: 1.75rem 1.25rem;
    }

    .dashboard-inner {
        gap: 1.75rem;
    }
    
    .dashboard-inner .dashboard-topbar {
        width: calc(100% + 2.5rem);
        margin-left: -1.25rem;
        margin-right: -1.25rem;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .dashboard-sidebar {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-left h1 {
        font-size: 1.5rem;
    }

    .dashboard-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .topbar-right {
        width: 100%;
        justify-content: flex-end;
        margin-left: 0;
    }

    .clients-card {
        padding: 1rem;
        margin: 0;
        width: 100%;
    }

    .clients-table th,
    .clients-table td {
        padding: 0.75rem;
    }

    .clients-pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Client Detail Page Styles */
.client-detail-body {
    background: #f5f7fb;
    min-height: 100vh;
}

.client-detail-panel {
    margin-top: 0;
    padding: 2rem 0;
    width: 100%;
}

.dashboard-main {
    padding: 2rem 3rem;
    width: 100%;
    max-width: none;
}

.client-info-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 18px 36px rgba(31, 37, 94, 0.08);
    border: 1px solid #e2e8f3;
    border-left: 6px solid #4c6fff;
    margin-bottom: 2rem;
    overflow: hidden;
}

.client-header {
    background: white;
    color: #1e255e;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.client-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #eff2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #4c6fff;
}

.avatar-initials {
    color: #4c6fff;
}

.client-basic-info h2 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: 600;
}

.client-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.client-id {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    backdrop-filter: blur(10px);
}

.client-department {
    font-weight: 500;
}

.client-status {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #1e255e;
}

.client-details-compact {
    padding: 2rem;
    border-left: 4px solid #4c6fff;
    background: #f9fbff;
}

.detail-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f3;
    border-left: 3px solid #4c6fff;
}

.detail-item i {
    color: #4c6fff;
    width: 16px;
}

.detail-item span {
    font-weight: 500;
    color: #111827;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.client-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.client-actions .btn-primary,
.client-actions .btn-secondary,
.client-actions .btn-danger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.client-actions .btn-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
}

.client-actions .btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.client-actions .btn-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.client-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}

.client-actions .btn-secondary:hover {
    background: #e5e7eb;
}

.client-actions .btn-danger:hover {
    background: #fecaca;
}

/* New Client Card Design */
.client-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #E0E0E0;
    padding: 32px 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.client-header-new {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #F0F0F0;
}

.back-link-card {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #292D32;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    transition: var(--transition);
}

.back-link-card:hover {
    color: #2752ff;
}

.client-profile-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.client-avatar-large {
    width: 73px;
    height: 73px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 600;
    color: #292D32;
    flex-shrink: 0;
    overflow: hidden;
}

.avatar-initials-large {
    color: #292D32;
}

.client-name-section {
    flex: 1;
}

.client-name-large {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 600;
    color: #292D32;
    line-height: 1.2;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.01em;
    max-width: 203px;
}

.client-id-badge {
    display: inline-block;
    padding: 0;
    background: transparent;
    border-radius: 0;
    font-size: 14px;
    font-weight: 400;
    color: #B5B7C0;
    font-family: 'Poppins', sans-serif;
    line-height: 1.5;
}

.client-form-card {
    margin-bottom: 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 40px;
}

.form-group-row {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.form-group-row:last-child {
    margin-bottom: 0;
}

.form-label-card {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #292D32;
    font-size: 14px;
    line-height: 1.5;
    font-family: 'Poppins', sans-serif;
}

.form-input-card {
    width: 100%;
    max-width: 339px;
    padding: 8px 12px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    font-size: 14px;
    background: #F3F3F5;
    color: #292D32;
    transition: var(--transition);
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    height: 29px;
    min-height: 29px;
    line-height: 1.5;
}

.form-input-card:focus {
    outline: none;
    border-color: #43C25C;
    box-shadow: 0 0 0 2px rgba(67, 194, 92, 0.1);
}

.form-input-card:read-only {
    cursor: default;
    background: #F3F3F5;
}

.form-input-card::placeholder {
    color: #B5B7C0;
}

.form-textarea-card {
    min-height: 100px;
    resize: vertical;
    overflow-y: auto;
    line-height: 1.6;
    padding-top: 1rem;
    padding-bottom: 1rem;
    height: auto;
    max-height: 400px;
}

.form-group-row-position {
    grid-column: 1 / -1;
}

.category-input-wrapper {
    display: flex;
    align-items: center;
    padding-top: 0;
}

.category-chip {
    width: 32px;
    height: 29px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
}

.category-bullet {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.client-action-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #F0F0F0;
}

.action-btn,
a.action-btn {
    flex: 0 0 auto;
    height: 49px;
    padding: 0 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    color: white;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    white-space: nowrap;
    min-width: fit-content;
}

.action-btn-blue {
    background: #2045FF !important;
}

.action-btn-blue:hover {
    background: #1a3ed8 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(39, 82, 255, 0.3);
}

.action-btn-red {
    background: #dc3545 !important;
}

.action-btn-red:hover {
    background: #c82333 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(220, 53, 69, 0.3);
}

.action-btn-orange {
    background: #EA7532 !important;
}

.action-btn-orange:hover {
    background: #e66a00 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(253, 126, 20, 0.3);
}

.action-btn-green {
    background: #2EBF4F !important;
}

.action-btn-green:hover {
    background: #25a643 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(46, 191, 79, 0.3);
}

.action-btn-purple {
    background: #4496FD !important;
}

.action-btn-purple:hover {
    background: #2d85fc !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(68, 150, 253, 0.3);
}

.action-btn.active {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* Responsive adjustments for client detail */
@media (max-width: 768px) {
    .client-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .client-meta {
        justify-content: center;
    }

    .client-status {
        margin-left: 0;
        justify-content: center;
    }

    .client-details-compact {
        padding: 1rem;
    }

    .detail-row {
        flex-direction: column;
        gap: 1rem;
    }

    .client-actions {
        justify-content: center;
    }

    .client-actions .btn-primary,
    .client-actions .btn-secondary,
    .client-actions .btn-danger {
        flex: 1;
        justify-content: center;
        min-width: 140px;
    }

    .client-card {
        padding: 1.5rem;
    }

    .client-profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .client-action-buttons {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
    }

    .client-form-card {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Departments Page Styles */
.departments-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)) !important;
    gap: 30px !important;
    margin-top: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Кроссбраузерная поддержка для всех браузеров */
@media (max-width: 768px) {
    .departments-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* Адаптивная сетка для десктопа */
@media (min-width: 1400px) {
    .departments-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 30px !important;
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .departments-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 30px !important;
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
    .departments-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 30px !important;
    }
}

/* Дополнительная поддержка для старых браузеров */
.departments-grid {
    -webkit-display: grid !important;
    -ms-display: grid !important;
    display: grid !important;
    -webkit-grid-template-columns: 1fr !important;
    -ms-grid-template-columns: 1fr !important;
    grid-template-columns: 1fr !important;
}

.department-card-new {
    background: #FFFFFF;
    border-radius: 30px;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0px 10px 60px 0px rgba(226, 236, 249, 0.5);
    overflow: hidden;
    min-height: 400px;
    padding-bottom: 38px;
}

.department-card-new > * {
    padding-left: 38px;
    padding-right: 38px;
}

.department-card-new .department-header {
    padding-top: 38px;
    padding-bottom: 0;
    padding-left: 38px;
    padding-right: 38px;
}

.department-card-new .department-client-info {
    padding-top: 20px;
    padding-bottom: 0;
}

.department-card-new .department-client-name {
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.5em !important;
    letter-spacing: -0.01em !important;
    color: rgba(51, 51, 51, 0.8) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    min-width: 100px !important;
    height: auto !important;
    text-align: left !important;
    position: relative !important;
    z-index: 1 !important;
}

.department-card-new .department-categories {
    padding-top: 20px;
    padding-bottom: 0;
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    align-items: flex-start !important;
    width: 100% !important;
}

.department-card-new .department-categories > * {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
}

.department-card-new .department-details-btn {
    margin-top: 20px;
    margin-bottom: 0;
    align-self: flex-start;
    margin-left: 38px;
    margin-right: 38px;
    width: 138px !important;
    height: 49px !important;
}

.department-card-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.department-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    width: 100%;
}

.department-name {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.5em;
    color: #000000;
}

.department-id-info {
    display: none;
}

.department-client-info {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 0;
    margin-top: 20px;
    width: 100%;
}

.department-client-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.client-avatar-icon {
    width: 84px;
    height: 84px;
    display: block;
}

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

.department-client-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.department-client-name {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5em;
    letter-spacing: -0.01em;
    color: rgba(51, 51, 51, 0.8);
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0;
    padding: 0;
}

.department-client-count {
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2em;
    letter-spacing: -0.02em;
    color: #333333;
    display: block;
    margin: 0;
    padding: 0;
}

.department-client-id {
    display: none !important;
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    font-weight: 600;
    line-height: 1em;
    letter-spacing: -0.01em;
    color: #333333;
}

.department-categories {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    align-items: flex-start !important;
    margin-top: 8px;
    width: 100%;
}

.department-card-new .department-categories {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    align-items: flex-start !important;
    width: 100% !important;
}

/* Принудительно делаем каждую категорию отдельной строкой */
.department-card-new .department-categories > * {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Переопределяем любые другие правила */
.department-card-new .department-categories .category-indicator,
.department-card-new .department-categories .category-a-indicator,
.department-card-new .department-categories .category-b-indicator,
.department-card-new .department-categories .category-c-indicator {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    flex-shrink: 0 !important;
}

.category-indicator {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
}

.category-bullet-small {
    width: 32px;
    min-width: 32px;
    height: 32px;
    border-radius: 14.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1em;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    box-sizing: border-box;
}

.category-a-bullet {
    background: #E9F7EC !important;
    color: #43C25C !important;
}

.category-b-bullet {
    background: #FFC5C5 !important;
    color: #DF0404 !important;
}

.category-c-bullet {
    background: #FFDAC1 !important;
    color: #FF6A00 !important;
}

.category-count {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1em;
    letter-spacing: -0.01em;
    color: #333333;
}

.category-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    flex-shrink: 0;
}

.category-clients-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

.department-details-btn {
    background: #FF8A00 !important;
    color: white !important;
    border: 1px solid rgba(234, 117, 50, 0.27);
    padding: 0;
    width: 138px;
    height: 49px;
    border-radius: 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1em;
    letter-spacing: -0.01em;
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.department-details-btn:hover {
    background: #e67a00 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 138, 0, 0.3);
    color: white !important;
}

.clients-count-button {
    width: 101px;
    height: 33px;
    background: #2045FF !important;
    color: white !important;
    border: 1px solid #5932EA !important;
    border-radius: 14px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1em;
    letter-spacing: -0.01em;
    padding: 6px 10px;
    box-sizing: border-box;
    text-align: center;
    white-space: nowrap;
}

.departments-back-link {
    margin-bottom: 20px;
    width: 100%;
}

.back-link-departments {
    color: #B0B0B0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 19.9px;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.5em;
    letter-spacing: -0.01em;
}

.departments-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.departments-title {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.5em;
    color: #000000;
    margin: 0;
}

.departments-clients-count {
    width: auto;
    min-width: 101px;
    height: 33px;
    background: #2045FF !important;
    color: white !important;
    border: 1px solid #5932EA !important;
    border-radius: 14px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1em;
    letter-spacing: -0.01em;
    margin-left: auto;
}

.department-detail-card {
    background: white !important;
    border-radius: 12px !important;
    padding: 24px !important;
    margin-top: 20px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    width: 100%;
    max-width: 100%;
}

.department-detail-header {
    margin-bottom: 24px;
}

.department-detail-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #292D32;
    margin-bottom: 8px;
}

.department-detail-info {
    font-size: 0.875rem;
    color: #B5B7C0;
    font-weight: 500;
}

.department-detail-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    align-items: center;
}

.department-clients-stat {
    display: flex;
    align-items: center;
    gap: 12px;
}

.clients-icon {
    width: 40px;
    height: 40px;
    background: #E8F4FD;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2045FF;
    font-size: 1.2rem;
}

.clients-stat-text {
    font-size: 1rem;
    font-weight: 500;
    color: #292D32;
}

.department-new-client {
    display: flex;
    align-items: center;
    gap: 8px;
}

.new-client-icon {
    width: 32px;
    height: 32px;
    background: #F5F5F5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.875rem;
}

.new-client-text {
    font-size: 0.875rem;
    color: #666;
}

.new-client-badge {
    background: #2045FF;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.department-detail-categories {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.department-detail-buttons {
    display: flex;
    gap: 12px;
}

.department-detail-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.department-list-btn {
    background: #2045FF !important;
    color: white !important;
    border: 1px solid #2045FF !important;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.department-list-btn:hover {
    background: #0039cc !important;
    transform: translateY(-1px);
    color: white !important;
}

.department-analytics-btn {
    background: #FF8A00 !important;
    color: white !important;
    border: 1px solid #FF8A00 !important;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.department-analytics-btn:hover {
    background: #e67a00 !important;
    transform: translateY(-1px);
    color: white !important;
}

/* Department Clients List Page Styles */
.department-clients-list-page .dashboard-main {
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding: 2rem 3rem;
}

.department-clients-list-page .dashboard-inner {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.department-clients-list-header {
    margin-bottom: 20px;
    width: 100%;
}

.department-clients-list-back-link {
    color: #666;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.875rem;
}

.department-clients-list-back-link:hover {
    color: #333;
}

.department-clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 20px;
    width: 100%;
}

/* Адаптация для больших экранов */
@media (min-width: 1920px) {
    .department-clients-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1600px) and (max-width: 1919px) {
    .department-clients-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1400px) and (max-width: 1599px) {
    .department-clients-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .department-clients-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1400px) {
    .department-clients-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .department-clients-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .department-clients-grid {
        grid-template-columns: 1fr;
    }
}

.department-client-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid rgba(234, 117, 50, 0.27);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.department-client-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.department-client-card .department-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 4px;
}

.department-client-card .department-name {
    font-size: 1rem;
    font-weight: 600;
    color: #292D32;
}

.department-client-card .department-id-info {
    font-size: 0.875rem;
    color: #B5B7C0;
    font-weight: 400;
}

.department-client-card .department-client-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.department-client-card .department-client-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.department-client-card .client-avatar-icon {
    font-size: 1.25rem;
    color: #9CA3AF;
}

.department-client-card .department-client-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.department-client-card .department-client-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #292D32;
}

.department-client-card .department-client-id {
    font-size: 0.875rem;
    color: #B5B7C0;
    font-weight: 500;
}

.department-client-card .no-tasks-btn {
    background: #F5F5F5;
    color: #666;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.875rem;
    cursor: pointer;
    width: fit-content;
    margin: 12px 0;
}

.department-client-card .department-categories {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
}

.department-client-card .department-details-btn {
    background: #FF8A00;
    color: white;
    border: 1px solid #FF8A00;
    border-radius: 50px;
    padding: 6px 10px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    transition: all 0.3s ease;
    width: fit-content;
    min-width: 126px;
    box-sizing: border-box;
}

.department-client-card .department-details-btn:hover {
    background: #e67a00;
    transform: translateY(-1px);
    color: white;
}

/* Department Analytics Page Styles */
.department-analytics-page .dashboard-main {
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding: 2rem 3rem;
}

.department-analytics-header {
    margin-bottom: 20px;
    width: 100%;
}

.department-analytics-back-link {
    color: #666;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.875rem;
}

.department-analytics-back-link:hover {
    color: #333;
}

.department-analytics-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    width: 100%;
    margin-top: 24px;
    align-items: start;
}

.department-analytics-main {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.analytics-section {
    width: 100%;
}

.analytics-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #292D32;
    margin-bottom: 1.5rem;
}

.analytics-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
}

.analytics-cards-grid-small {
    grid-template-columns: 1fr;
    gap: 16px;
}

.analytics-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
    min-height: 130px;
    justify-content: flex-start;
}

.analytics-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.analytics-card-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.analytics-card-pink {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(240, 147, 251, 0.3);
}

.analytics-card-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
    color: #292D32;
}

.analytics-card-primary .analytics-card-value,
.analytics-card-pink .analytics-card-value {
    color: white;
}

.analytics-card-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #666666;
    line-height: 1.5;
}

.analytics-card-primary .analytics-card-label,
.analytics-card-pink .analytics-card-label {
    color: rgba(255, 255, 255, 0.95);
    opacity: 0.95;
}

.department-analytics-filters {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.filters-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #292D32;
    margin-bottom: 1.5rem;
}

.filters-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #292D32;
}

.filter-select,
.filter-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #292D32;
    background: white;
    box-sizing: border-box;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #2045FF;
    box-shadow: 0 0 0 3px rgba(32, 69, 255, 0.1);
}

.filter-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.filter-btn {
    width: 100%;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
}

.filter-btn-blue {
    background: #2045FF;
    color: white;
}

.filter-btn-blue:hover {
    background: #0039cc;
    transform: translateY(-1px);
    color: white;
}

.filter-btn-orange {
    background: #FF8A00;
    color: white;
}

.filter-btn-orange:hover {
    background: #e67a00;
    transform: translateY(-1px);
    color: white;
}

@media (max-width: 1200px) {
    .department-analytics-content {
        grid-template-columns: 1fr;
    }
    
    .department-analytics-filters {
        position: static;
    }
    
    .analytics-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-cards-grid-small {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .analytics-cards-grid,
    .analytics-cards-grid-small {
        grid-template-columns: 1fr;
    }
}

/* ПОЛНОЕ СКРЫТИЕ КНОПКИ ОЧИСТИТЬ ПОДБОРКУ - ГЛОБАЛЬНО */
button:contains("Очистить подборку"),
button:contains("Очистить"),
*[onclick*="clearSelection"],
*[onclick*="clear"]:not(*[onclick*="clearInterval"]):not(*[onclick*="clearTimeout"]),
.action-btn-clear,
.btn-clear,
.clear-selection,
.clear-btn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    z-index: -9999 !important;
    pointer-events: none !important;
}

/* Custom Dropdown Styles - Global */
.custom-dropdown {
    position: relative;
    width: 100%;
}

.custom-dropdown-select {
    width: 100%;
    padding: 24px 28px;
    padding-right: 50px;
    border: 0.5px solid #E0E0E0;
    border-radius: 12px;
    font-size: 14px;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    background: #F3F3F5;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    line-height: 1em;
    letter-spacing: -0.01em;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9L12 15L18 9' stroke='%23555555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 16px;
}

.custom-dropdown-select:focus {
    outline: none;
    border-color: #425bf3;
    background: white;
    box-shadow: 0 0 0 3px rgba(66, 91, 243, 0.1);
}

.custom-dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 0.5px solid #E0E0E0;
    border-radius: 12px;
    box-shadow: 0px 10px 30px rgba(226, 236, 249, 0.5);
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.custom-dropdown-options.open {
    display: block;
}

.custom-dropdown-option {
    padding: 16px 24px;
    font-size: 14px;
    color: #000000;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
    line-height: 1em;
    letter-spacing: -0.01em;
    border-radius: 0;
}

.custom-dropdown-option:first-child {
    border-radius: 12px 12px 0 0;
}

.custom-dropdown-option:last-child {
    border-radius: 0 0 12px 12px;
}

.custom-dropdown-option:only-child {
    border-radius: 12px;
}

.custom-dropdown-option:hover:not(.selected) {
    background: #F5F5F5;
}

.custom-dropdown-option.selected {
    background: linear-gradient(135deg, #ABA8EF 0%, #5B3DE9 100%);
    color: #FFFFFF !important;
    font-weight: 400;
}

.custom-dropdown-option.selected:first-child {
    border-radius: 12px 12px 0 0;
}

.custom-dropdown-option.selected:last-child {
    border-radius: 0 0 12px 12px;
}

.custom-dropdown-option.selected:only-child {
    border-radius: 12px;
}

.custom-dropdown-hidden {
    display: none;
}

/* Custom Calendar/Date Picker Styles */
.filter-input[type="date"],
.filter-input[type="text"].date-input {
    width: 100%;
    padding: 24px 28px;
    border: 0.5px solid #E0E0E0;
    border-radius: 12px;
    font-size: 14px;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    background: #F3F3F5;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    line-height: 1em;
    letter-spacing: -0.01em;
    cursor: pointer;
}

.filter-input[type="date"]:focus,
.filter-input[type="text"].date-input:focus {
    outline: none;
    border-color: #425bf3;
    background: white;
    box-shadow: 0 0 0 3px rgba(66, 91, 243, 0.1);
}

/* Flatpickr Calendar Custom Styles */
.flatpickr-calendar {
    font-family: 'Poppins', sans-serif !important;
    border-radius: 12px !important;
    box-shadow: 0px 10px 30px rgba(226, 236, 249, 0.5) !important;
    border: 0.5px solid #E0E0E0 !important;
    padding: 16px !important;
    background: white !important;
    overflow: visible !important;
    min-width: 306px !important;
    width: auto !important;
}

/* Days container - ensure all dates are visible */
.flatpickr-days,
.flatpickr-daysContainer,
.flatpickr-calendar .flatpickr-days,
.flatpickr-calendar .flatpickr-daysContainer {
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
}

/* Week container */
.flatpickr-week {
    display: flex !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Day container - ensure proper sizing */
.flatpickr-dayContainer {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

.flatpickr-months {
    padding: 0 0 16px 0 !important;
    margin-bottom: 16px !important;
}

.flatpickr-month {
    color: #000000 !important;
    font-weight: 500 !important;
    font-size: 14px !important;
}

.flatpickr-weekdays {
    background: transparent !important;
    border-bottom: 1px solid #E0E0E0 !important;
    padding-bottom: 8px !important;
    margin-bottom: 8px !important;
}

.flatpickr-weekday {
    color: #000000 !important;
    font-weight: 500 !important;
    font-size: 12px !important;
    text-transform: none !important;
}

.flatpickr-day {
    border-radius: 12px !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    height: 30px !important;
    line-height: 30px !important;
    margin: 2px !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    z-index: 1 !important;
    width: calc(14.285% - 4px) !important;
    max-width: calc(14.285% - 4px) !important;
    min-width: calc(14.285% - 4px) !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    text-align: center !important;
    flex-shrink: 0 !important;
}

.flatpickr-day:hover:not(.selected):not(.startRange):not(.endRange) {
    background: #F5F5F5 !important;
    border-color: transparent !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: linear-gradient(135deg, #ABA8EF 0%, #5B3DE9 100%) !important;
    border-color: transparent !important;
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    font-weight: 400 !important;
    border-radius: 12px !important;
    z-index: 2 !important;
    position: relative !important;
    text-shadow: none !important;
}

/* Ensure text is always visible in selected dates */
.flatpickr-day.selected > *,
.flatpickr-day.startRange > *,
.flatpickr-day.endRange > * {
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
}

/* Ensure all date numbers are visible */
.flatpickr-day {
    mix-blend-mode: normal !important;
}

.flatpickr-day.inRange {
    mix-blend-mode: normal !important;
}

.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
    background: linear-gradient(135deg, #9B8FDF 0%, #4B2FD9 100%) !important;
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
}

.flatpickr-day.inRange {
    background: rgba(171, 168, 239, 0.1) !important;
    border-color: transparent !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    z-index: 0 !important;
}

.flatpickr-day.today {
    border-color: #425bf3 !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

.flatpickr-day.today:hover {
    background: #F5F5F5 !important;
    border-color: #425bf3 !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: #B5B7C0 !important;
    -webkit-text-fill-color: #B5B7C0 !important;
    opacity: 0.5 !important;
}

/* Force visibility for all date numbers - ensure date 11 and all others are visible */
.flatpickr-day,
.flatpickr-day * {
    visibility: visible !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    visibility: visible !important;
}

.flatpickr-day.inRange,
.flatpickr-day.inRange * {
    visibility: visible !important;
    opacity: 1 !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected *,
.flatpickr-day.startRange,
.flatpickr-day.startRange *,
.flatpickr-day.endRange,
.flatpickr-day.endRange * {
    visibility: visible !important;
    opacity: 1 !important;
}

.flatpickr-prev-month,
.flatpickr-next-month {
    color: #000000 !important;
    fill: #000000 !important;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
    color: #425bf3 !important;
    fill: #425bf3 !important;
}

.flatpickr-current-month {
    color: #000000 !important;
    font-weight: 500 !important;
}

/* Month dropdown styles */
.flatpickr-monthDropdown-months {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background: transparent !important;
    border: none !important;
    color: #000000 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    font-family: 'Poppins', sans-serif !important;
    padding: 4px 8px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    outline: none !important;
}

.flatpickr-monthDropdown-months:hover {
    background: #F5F5F5 !important;
}

.flatpickr-monthDropdown-months:focus {
    background: #F5F5F5 !important;
}

/* Month dropdown options (when using select) */
.flatpickr-monthDropdown-months option {
    padding: 16px 24px !important;
    background: white !important;
    color: #000000 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    font-family: 'Poppins', sans-serif !important;
    border-radius: 0 !important;
}

.flatpickr-monthDropdown-months option:checked,
.flatpickr-monthDropdown-months option:focus,
.flatpickr-monthDropdown-months option:hover {
    background: linear-gradient(135deg, #ABA8EF 0%, #5B3DE9 100%) !important;
    color: #FFFFFF !important;
    font-weight: 400 !important;
}

/* Year input styling */
.flatpickr-current-month .flatpickr-monthDropdown-months,
.numInputWrapper input {
    border: none !important;
    background: transparent !important;
    color: #000000 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    font-family: 'Poppins', sans-serif !important;
    padding: 4px 8px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
}

.numInputWrapper input:hover {
    background: #F5F5F5 !important;
}

.numInputWrapper input:focus {
    background: #F5F5F5 !important;
    outline: none !important;
}

/* Custom month dropdown - if flatpickr creates a custom dropdown */
.flatpickr-monthSelect,
.flatpickr-monthSelect-month {
    border-radius: 12px !important;
}

.flatpickr-monthSelect-month {
    padding: 16px 24px !important;
    font-size: 14px !important;
    color: #000000 !important;
    background: white !important;
    font-family: 'Poppins', sans-serif !important;
    line-height: 1em !important;
    letter-spacing: -0.01em !important;
    border-radius: 0 !important;
    transition: all 0.2s ease !important;
}

.flatpickr-monthSelect-month:first-child {
    border-radius: 12px 12px 0 0 !important;
}

.flatpickr-monthSelect-month:last-child {
    border-radius: 0 0 12px 12px !important;
}

.flatpickr-monthSelect-month:only-child {
    border-radius: 12px !important;
}

.flatpickr-monthSelect-month:hover {
    background: #F5F5F5 !important;
}

.flatpickr-monthSelect-month.flatpickr-monthSelect-month.selected,
.flatpickr-monthSelect-month.curMonth {
    background: linear-gradient(135deg, #ABA8EF 0%, #5B3DE9 100%) !important;
    color: #FFFFFF !important;
    font-weight: 400 !important;
}

.flatpickr-monthSelect-month.flatpickr-monthSelect-month.selected:first-child,
.flatpickr-monthSelect-month.curMonth:first-child {
    border-radius: 12px 12px 0 0 !important;
}

.flatpickr-monthSelect-month.flatpickr-monthSelect-month.selected:last-child,
.flatpickr-monthSelect-month.curMonth:last-child {
    border-radius: 0 0 12px 12px !important;
}

.flatpickr-monthSelect-month.flatpickr-monthSelect-month.selected:only-child,
.flatpickr-monthSelect-month.curMonth:only-child {
    border-radius: 12px !important;
}

.flatpickr-input {
    padding: 24px 28px !important;
    border: 0.5px solid #E0E0E0 !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    color: #000000 !important;
    background: #F3F3F5 !important;
    font-family: 'Poppins', sans-serif !important;
}

.flatpickr-input:focus {
    border-color: #425bf3 !important;
    background: white !important;
    box-shadow: 0 0 0 3px rgba(66, 91, 243, 0.1) !important;
}

/* Date input fields styling */
input[type="date"].form-input,
input[type="date"] {
    padding: 24px 28px !important;
    border: 0.5px solid #E0E0E0 !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    background: #F3F3F5 !important;
    font-family: 'Poppins', sans-serif !important;
    line-height: 1em !important;
    letter-spacing: -0.01em !important;
    cursor: pointer !important;
}

input[type="date"].form-input:focus,
input[type="date"]:focus {
    outline: none !important;
    border-color: #425bf3 !important;
    background: white !important;
    box-shadow: 0 0 0 3px rgba(66, 91, 243, 0.1) !important;
}
