/* ProfixCRM Simple - Corporate Styles */

/* ===== CORPORATE COLOR PALETTE ===== */
:root {
    /* Primary Corporate Colors */
    --primary-blue: #1e40af;
    --primary-blue-light: #3b82f6;
    --primary-blue-dark: #1e3a8a;
    
    /* Secondary Colors */
    --secondary-gray: #64748b;
    --secondary-gray-light: #94a3b8;
    --secondary-gray-dark: #475569;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    /* Border Colors */
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --border-dark: #94a3b8;
    
    /* Status Colors */
    --success: #10b981;
    --success-light: #34d399;
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --danger: #ef4444;
    --danger-light: #f87171;
    
    /* Shadow Colors */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Corporate Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

/* ===== PROFESSIONAL TYPOGRAPHY ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

/* Header */
.header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav a:hover, .nav a.active {
    background-color: rgba(255,255,255,0.2);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.card-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #1e3a8a;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.btn-success {
    background: #28a745;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Forms - Enhanced Design */
.form-group {
    margin-bottom: 1.8rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

/* Form Controls - Split Design */
.form-floating {
    position: relative;
    margin-bottom: 2rem;
}

.form-floating input {
    width: 100%;
    padding: 1.5rem 3rem 0.8rem 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #2d3748;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    font-family: 'Inter', sans-serif;
}

.form-floating input:focus {
    border-color: #1e3a8a;
    background: #f7fafc;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
    transform: translateY(-2px);
}

.form-floating input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #e53e3e;
    background: rgba(229, 62, 62, 0.05);
    animation: shake 0.5s ease-in-out;
}

.form-floating input:valid:not(:placeholder-shown) {
    border-color: #38a169;
    background: rgba(56, 161, 105, 0.05);
}

.form-floating label {
    position: absolute;
    top: 1.5rem;
    left: 1.2rem;
    color: #a0aec0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    font-size: 1rem;
    font-weight: 400;
    background: white;
    padding: 0 0.5rem;
    z-index: 1;
}

.form-floating input:focus + label,
.form-floating input:not(:placeholder-shown) + label {
    top: -0.5rem;
    left: 0.8rem;
    font-size: 0.75rem;
    color: #1e3a8a;
    font-weight: 500;
}

.login-icon {
    position: absolute;
    top: 50%;
    right: 1.2rem;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    opacity: 0.5;
    transition: all 0.3s ease;
    color: #a0aec0;
}

.form-floating input:focus ~ .login-icon {
    opacity: 1;
    color: #1e3a8a;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 1.2rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #a0aec0;
    transition: all 0.3s ease;
    z-index: 10;
    padding: 0.25rem;
    border-radius: 4px;
}

.password-toggle:hover {
    color: #1e3a8a;
    background: rgba(30, 58, 138, 0.1);
}

.password-toggle:focus {
    outline: 2px solid #1e3a8a;
    outline-offset: 2px;
}

.form-control {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid rgba(30, 58, 138, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.form-control:focus {
    outline: none;
    border-color: #1e3a8a;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 0 0 4px rgba(30, 58, 138, 0.1),
        0 8px 25px rgba(30, 58, 138, 0.15);
    transform: translateY(-2px);
}

.form-control:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #e53e3e;
    background: rgba(229, 62, 62, 0.05);
    animation: shake 0.5s ease-in-out;
}

.form-control:valid:not(:placeholder-shown) {
    border-color: #38a169;
    background: rgba(56, 161, 105, 0.05);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Validation Icons */
.form-floating::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 3rem;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    opacity: 0;
    transition: all 0.3s ease;
}

.form-floating:has(.form-control:valid:not(:placeholder-shown))::after {
    content: '✓';
    color: #38a169;
    opacity: 1;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-floating:has(.form-control:invalid:not(:focus):not(:placeholder-shown))::after {
    content: '✗';
    color: #e53e3e;
    opacity: 1;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Alert Styles */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid;
    animation: slideInDown 0.5s ease-out;
}

.alert-error {
    background: rgba(229, 62, 62, 0.1);
    border-color: #e53e3e;
    color: #c53030;
}

.alert-success {
    background: rgba(56, 161, 105, 0.1);
    border-color: #38a169;
    color: #2f855a;
}

.alert strong {
    font-weight: 600;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-control::placeholder {
    color: #a0aec0;
    transition: all 0.3s ease;
}

.form-control:focus::placeholder {
    opacity: 0.7;
    transform: translateX(5px);
}

/* Enhanced Button */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 25px rgba(30, 58, 138, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 15px 35px rgba(30, 58, 138, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn:hover::before {
    left: 100%;
}

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

/* Split Login Container */
.split-login-container {
    min-height: 100vh;
    display: flex;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    position: relative;
    overflow: hidden;
    animation: containerFadeIn 1s ease-out;
}

.split-login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    animation: backgroundShift 20s ease-in-out infinite;
}

/* Left Section - Branding */
.login-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem;
    position: relative;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.9) 0%, rgba(30, 64, 175, 0.9) 100%);
    color: white;
    text-align: center;
    animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    animation: patternMove 30s linear infinite;
}

.brand-logo {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: logoFloat 3s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

.brand-logo svg {
    width: 40px;
    height: 40px;
    color: white;
}

.brand-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 2s ease-in-out infinite alternate;
    position: relative;
    z-index: 2;
}

.brand-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-weight: 300;
    animation: fadeInUp 1s ease-out 0.3s both;
    position: relative;
    z-index: 2;
}

.brand-description {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 3rem;
    opacity: 0.8;
    max-width: 400px;
    animation: fadeInUp 1s ease-out 0.6s both;
    position: relative;
    z-index: 2;
}

.brand-features {
    list-style: none;
    padding: 0;
    margin: 0;
    animation: fadeInUp 1s ease-out 0.9s both;
    position: relative;
    z-index: 2;
}

.brand-features li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1rem;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.brand-features li:hover {
    opacity: 1;
    transform: translateX(10px);
}

.brand-features li::before {
    content: '✓';
    margin-right: 1rem;
    color: #4ade80;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Floating Orbs */
.floating-orb {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: floatingOrb 6s ease-in-out infinite;
}

.floating-orb:nth-child(1) {
    width: 60px;
    height: 60px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-orb:nth-child(2) {
    width: 40px;
    height: 40px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
}

.floating-orb:nth-child(3) {
    width: 80px;
    height: 80px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
}

/* Right Section - Form */
.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    background: #ffffff;
    position: relative;
    animation: slideInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 80% 20%, rgba(30, 58, 138, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(30, 64, 175, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.form-container {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 2;
    animation: formFadeIn 1s ease-out 0.5s both;
}

.form-header {
    text-align: center;
    margin-bottom: 3rem;
}

.form-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-subtitle {
    color: #718096;
    font-size: 1rem;
    font-weight: 400;
}

.login-form {
    margin-bottom: 2rem;
}

.form-footer {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.form-footer a {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.form-footer a:hover {
    color: #1e40af;
    text-decoration: underline;
}

/* Button Styles */
.btn-login {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.3);
}

.btn-login:hover::before {
    left: 100%;
}

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

.btn-login.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Button Styles */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border: none;
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

/* ===== KEYFRAME ANIMATIONS ===== */

@keyframes containerFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes backgroundShift {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(10px) translateY(-10px);
    }
    50% {
        transform: translateX(-5px) translateY(10px);
    }
    75% {
        transform: translateX(-10px) translateY(-5px);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes patternMove {
    0% {
        transform: translateX(0) translateY(0);
    }
    100% {
        transform: translateX(100px) translateY(100px);
    }
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

@keyframes titleGlow {
    0% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    }
    100% {
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 255, 255, 0.3);
    }
}

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

@keyframes floatingOrb {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
    }
    33% {
        transform: translateY(-20px) translateX(10px) scale(1.1);
    }
    66% {
        transform: translateY(10px) translateX(-10px) scale(0.9);
    }
}

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

/* Enhanced Alerts */
.alert {
    padding: 1.2rem 1.5rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    border: none;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
}

.alert-success {
    background: rgba(72, 187, 120, 0.1);
    color: #2f855a;
    border-left: 4px solid #48bb78;
}

.alert-error {
    background: rgba(245, 101, 101, 0.1);
    color: #c53030;
    border-left: 4px solid #f56565;
}

/* Animaciones */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes cardFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(0.5deg); }
}

@keyframes titleUnderline {
    0% { width: 60px; opacity: 0.7; }
    100% { width: 100px; opacity: 1; }
}



/* ===== RESPONSIVE DESIGN ===== */

/* Tablets and Small Desktops */
@media (max-width: 1024px) {
    .split-login-container {
        flex-direction: column;
    }
    
    .login-left {
        flex: none;
        min-height: 40vh;
        padding: 3rem 2rem;
    }
    
    .login-right {
        flex: none;
        min-height: 60vh;
        padding: 3rem 2rem;
    }
    
    .brand-title {
        font-size: 2.5rem;
    }
    
    .form-title {
        font-size: 2rem;
    }
    
    .floating-orb {
        display: none;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .split-login-container {
        flex-direction: column;
        min-height: 100vh;
    }
    
    .login-left {
        flex: none;
        min-height: 35vh;
        padding: 2rem 1.5rem;
        animation: slideInDown 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .login-right {
        flex: none;
        min-height: 65vh;
        padding: 2rem 1.5rem;
        animation: slideInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .login-container {
        padding: 1rem;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .login-card {
        width: 100%;
        max-width: 400px;
        margin: 0;
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }
    
    .login-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .brand-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 1.5rem;
    }
    
    .brand-logo svg {
        width: 30px;
        height: 30px;
    }
    
    .brand-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .brand-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .brand-description {
        font-size: 0.9rem;
        margin-bottom: 2rem;
        max-width: 300px;
    }
    
    .brand-features {
        display: none;
    }
    
    .form-container {
        max-width: 100%;
    }
    
    .form-header {
        margin-bottom: 2rem;
    }
    
    .form-title {
        font-size: 1.8rem;
    }
    
    .form-subtitle {
        font-size: 0.9rem;
    }
    
    .form-floating {
        margin-bottom: 1.5rem;
    }
    
    .form-floating input {
        padding: 1.3rem 2.5rem 0.7rem 1rem;
        font-size: 0.9rem;
    }
    
    .form-floating label {
        top: 1.3rem;
        left: 1rem;
        font-size: 0.9rem;
        z-index: 1;
    }
    
    .form-floating input:focus + label,
    .form-floating input:not(:placeholder-shown) + label {
        top: 0.3rem;
        font-size: 0.7rem;
    }
    
    .btn {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .btn-login {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .login-footer {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
    
    .login-footer p {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .floating-orb {
        display: none;
    }
    
    .login-left::before {
        display: none;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .login-left {
        padding: 1.5rem 1rem;
        min-height: 30vh;
    }
    
    .login-right {
        padding: 1.5rem 1rem;
        min-height: 70vh;
    }
    
    .login-card {
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }
    
    .login-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    .brand-title {
        font-size: 1.8rem;
    }
    
    .brand-subtitle {
        font-size: 0.9rem;
    }
    
    .brand-description {
        font-size: 0.85rem;
        max-width: 250px;
    }
    
    .form-title {
        font-size: 1.6rem;
    }
    
    .form-floating {
        margin-bottom: 1.25rem;
    }
    
    .form-floating input {
        padding: 1.2rem 2.5rem 0.6rem 0.9rem;
    }
    
    .form-floating label {
        left: 0.9rem;
        top: 1.2rem;
        z-index: 1;
    }
    
    .form-floating input:focus + label,
    .form-floating input:not(:placeholder-shown) + label {
        left: 0.6rem;
    }
    
    .login-footer p {
        font-size: 0.85rem;
    }
}

@media (min-width: 1200px) {
    .login-card {
        max-width: 450px;
        padding: 3rem;
    }
    
    .login-title {
        font-size: 2.5rem;
        margin-bottom: 2.5rem;
    }
    
    .form-floating {
        margin-bottom: 2.5rem;
    }
    
    .form-floating input {
        padding: 1.7rem 1.4rem 0.7rem 1.4rem;
        font-size: 1.1rem;
    }
    
    .form-floating label {
        top: 1.7rem;
        left: 1.4rem;
        font-size: 1.1rem;
        z-index: 1;
    }
    
    .form-floating input:focus + label,
    .form-floating input:not(:placeholder-shown) + label {
        top: 0.5rem;
        font-size: 0.8rem;
    }
}

/* Additional Mobile Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Landscape Mobile Optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .split-login-container {
        flex-direction: row;
    }
    
    .login-left {
        flex: 0.4;
        min-height: 100vh;
        padding: 2rem 1.5rem;
    }
    
    .login-right {
        flex: 0.6;
        min-height: 100vh;
        padding: 2rem 1.5rem;
    }
    
    .brand-features {
        display: block;
    }
    
    .brand-features li {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

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

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

.d-flex {
    display: flex;
}

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

.align-center {
    align-items: center;
}

.gap-1 {
    gap: 1rem;
}

/* ===== ESTILOS MODERNOS PARA EL CRM INTERNO ===== */

/* Layout Principal */
.crm-layout {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* ===== CORPORATE SIDEBAR STYLES ===== */
.sidebar {
    width: 300px;
    background: #ffffff;
    color: #1f2937;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.08);
    border-right: 1px solid #e5e7eb;
}

.sidebar-header {
    padding: 2rem 1.5rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e3a8a;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-logo:hover {
    color: #1e40af;
    transform: translateX(2px);
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}

.logo-text {
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

.sidebar-nav {
    padding: 1.5rem 0;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin: 0.25rem 1.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: #6b7280;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    border: 1px solid transparent;
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-text {
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

.nav-badge {
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-left: auto;
    min-width: 20px;
    text-align: center;
}

.nav-link:hover {
    color: #1e3a8a;
    background: #f8fafc;
    border-color: #e2e8f0;
    transform: translateX(4px);
}

.nav-link:hover .nav-icon {
    color: #1e40af;
    transform: scale(1.1);
}

.nav-link.active {
    color: #1e3a8a;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: #bfdbfe;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.1);
}

.nav-link.active .nav-icon {
    color: #1e40af;
}

.nav-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 1.5rem 1.5rem;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    border-top: 1px solid #f3f4f6;
    background: #fafbfc;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #374151;
    text-decoration: none;
    padding: 0.75rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    flex: 1;
}

.user-profile:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.user-avatar {
    position: relative;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.2);
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1f2937;
    margin-bottom: 0.125rem;
}

.user-role {
    font-size: 0.8rem;
    color: #6b7280;
}

.logout-btn {
    padding: 0.75rem;
    color: #6b7280;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* Main Wrapper */
/* ===== MAIN WRAPPER CORPORATE STYLES ===== */
.main-wrapper {
    flex: 1;
    margin-left: 300px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.main-content {
    flex: 1;
    padding: 0;
    background: #f8fafc;
    overflow-x: hidden;
}

.content-wrapper {
    max-width: 100%;
    margin: 0;
    padding: 2rem;
    min-height: calc(100vh - 80px);
}

/* ===== ROLES AND PERMISSIONS MODULE STYLES ===== */
.premium-content-area {
    max-width: 100%;
    margin: 0;
    padding: 2rem 1rem;
    background: #f8fafc;
    min-height: calc(100vh - 80px);
}

.roles-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.roles-header {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.roles-header-info h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.roles-header-info p {
    color: #718096;
    margin: 0;
    font-size: 1rem;
}

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

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon.roles {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.stat-icon.permissions {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.stat-icon.modules {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.stat-icon.users {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}
/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .roles-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .roles-header-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .main-wrapper {
        margin-left: 0;
    }
    
    .content-wrapper {
        padding: 1rem;
    }
    
.premium-content-area {
    padding: 1rem 0.5rem;
}
    
    .roles-container {
        padding: 0 0.5rem;
    }
    
    .roles-header {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
    }
    
    .roles-header-info h1 {
        font-size: 1.75rem;
    }
    
    .roles-header-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .roles-header-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
}
.top-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 1.25rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 80px;
    box-sizing: border-box;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #6b7280;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.breadcrumb-item {
    font-weight: 600;
    color: #1e3a8a;
    font-size: 1.1rem;
}

.breadcrumb-separator {
    color: #d1d5db;
    margin: 0 0.5rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 300px;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: #374151;
}

.search-input:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    color: #9ca3af;
    pointer-events: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-btn {
    padding: 0.75rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.header-btn:hover {
    background: #f8fafc;
    border-color: #d1d5db;
    color: #1f2937;
    transform: translateY(-1px);
}

.header-btn.has-notification::after {
    content: '';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #ffffff;
}

.user-dropdown {
    position: relative;
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #374151;
}

.user-dropdown-btn:hover {
    background: #f8fafc;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.user-dropdown-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: white;
}

.user-dropdown-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-dropdown-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1f2937;
}

.user-dropdown-role {
    font-size: 0.75rem;
    color: #6b7280;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: #1f2937;
}

.dropdown-item.text-danger {
    color: #ef4444;
}

.dropdown-item.text-danger:hover {
    background: #fef2f2;
    color: #dc2626;
}

.dropdown-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 0.5rem 0;
}

.header-nav {
    display: flex;
    gap: 2rem;
}

.header-nav a {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.header-nav a:hover,
.header-nav a.active {
    color: #1e3a8a;
    background: rgba(30, 58, 138, 0.1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-dropdown-toggle:hover {
    background: #f1f5f9;
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.3s ease;
}

.user-dropdown-menu a:hover {
    background: #f8fafc;
    color: #1e3a8a;
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 2rem;
    background: #f8fafc;
}

/* Dashboard Específico */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.page-title h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.page-title p {
    color: #6b7280;
    margin: 0;
}

.dashboard-actions .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1e3a8a, #3b82f6);
}

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

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.stat-change {
    font-size: 0.875rem;
    font-weight: 500;
}

.stat-change.positive {
    color: #059669;
}

.stat-change.negative {
    color: #dc2626;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Widget Grid uniforme (premium) */
.widget-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card, .widget-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 6px 16px rgba(2, 6, 23, 0.06);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    min-height: 320px; /* tamaño uniforme */
}

.dashboard-card .card-header, .widget-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: .75rem;
    border-bottom: 1px solid #eef2f7;
}

.chart-card .chart-container { flex: 1; display:flex; align-items:center; justify-content:center; }
.table-responsive, .table-container { flex: 1; overflow-x: auto; }

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

/* Recent Items */
.recent-section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.section-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.section-action {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.section-action:hover {
    color: #1d4ed8;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

/* Unificación de estilos para tablas de datos */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    background: var(--bg-secondary);
    padding: 1rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}

.data-table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: var(--bg-secondary);
}

/* Toolbar y búsqueda rápida para tablas */
.table-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
}

.table-search {
    width: 240px;
    max-width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-primary);
}

.table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
}

.table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    color: #6b7280;
}

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

/* Activity Timeline */
.activity-timeline {
    padding: 1.5rem;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-content h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
}

.activity-content p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 0.25rem 0;
}

.activity-time {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Performance Widget */
.performance-widget {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.performance-metrics {
    padding: 1.5rem;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.metric-item:last-child {
    border-bottom: none;
}

.metric-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.metric-value {
    font-weight: 600;
    color: #1f2937;
}

/* Responsive Design para CRM */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .content-area {
        padding: 1rem;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .top-header {
        padding: 1rem;
    }
    
    .header-nav {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }
}

/* ===== PROFESSIONAL DASHBOARD STYLES ===== */

/* Professional Dashboard Header */
.ultra-luxury-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.2);
    position: relative;
    overflow: hidden;
    animation: headerFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.ultra-luxury-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    animation: backgroundShift 20s ease-in-out infinite;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.ultra-luxury-header .header-left h1 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(45deg, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

.ultra-luxury-header .header-left p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 300;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

.status-indicator.online {
    background: #4ade80;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

.market-status {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.market-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.market-item:hover {
    transform: translateY(-2px);
}

.market-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    font-weight: 400;
}

.market-value {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
}

.market-value.positive {
    color: #4ade80;
}

.market-value.negative {
    color: #f87171;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

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

.btn-luxury {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-luxury::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-luxury:hover::before {
    left: 100%;
}

.btn-luxury.btn-primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-luxury.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.4);
}

.btn-luxury.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-luxury.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.time-display {
    text-align: right;
}

.current-time {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    animation: timeGlow 3s ease-in-out infinite alternate;
}

.market-session {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 300;
}

/* Professional KPI Widgets Grid */
.luxury-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-widget {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(30, 58, 138, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: widgetFadeIn 0.6s ease-out;
}

.kpi-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1e3a8a, #1e40af);
}

.kpi-widget:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(30, 58, 138, 0.15);
}

.kpi-widget.primary-widget {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    grid-column: span 2;
}

.kpi-widget.primary-widget::before {
    background: linear-gradient(90deg, #4ade80, #22c55e);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.widget-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.2);
    font-size: 1.2rem;
}

.kpi-widget.primary-widget .widget-icon {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.2);
}

.widget-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    backdrop-filter: blur(10px);
}

.widget-trend.positive {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.widget-trend.negative {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.kpi-widget.primary-widget .widget-trend {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
}

.widget-content {
    margin-bottom: 1rem;
}

.kpi-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1f2937;
    margin: 0;
    line-height: 1;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.kpi-widget.primary-widget .kpi-value {
    color: white;
}

.kpi-label {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0.5rem 0 0 0;
    font-weight: 500;
}

.kpi-widget.primary-widget .kpi-label {
    color: rgba(255, 255, 255, 0.9);
}

.widget-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.widget-sparkline {
    height: 32px;
    width: 80px;
    position: relative;
    background: rgba(30, 58, 138, 0.05);
    border-radius: 6px;
}

.widget-progress {
    flex: 1;
    margin-right: 1rem;
}

.progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1e3a8a, #1e40af);
    border-radius: 3px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.widget-action {
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.widget-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.mini-chart {
    height: 40px;
    width: 80px;
    position: relative;
    background: rgba(30, 58, 138, 0.05);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #6b7280;
}

.avatar-stack {
    display: flex;
    margin-left: -0.25rem;
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -0.25rem;
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
}

.widget-subtitle {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.25rem;
    font-weight: 400;
}

.kpi-widget.primary-widget .widget-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

/* Professional Animations */
@keyframes headerFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes backgroundShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes titleGlow {
    from {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    }
    to {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    }
}

@keyframes timeGlow {
    from {
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    }
    to {
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    }
}

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

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

@keyframes floatingOrb {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(120deg);
    }
    66% {
        transform: translateY(10px) rotate(240deg);
    }
}

@keyframes patternMove {
    0% {
        transform: translateX(0) translateY(0);
    }
    100% {
        transform: translateX(10px) translateY(10px);
    }
}

@keyframes containerFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes formFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* Responsive Design for Professional Dashboard */
@media (max-width: 1200px) {
    .luxury-kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .kpi-widget.primary-widget {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .ultra-luxury-header {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        border-radius: 12px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .header-left h1 {
        font-size: 1.75rem;
    }
    
    .market-status {
        justify-content: center;
        gap: 1.5rem;
    }
    
    .header-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    
    .btn-luxury {
        justify-content: center;
        width: 100%;
    }
    
    .luxury-kpi-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .kpi-widget {
        padding: 1.25rem;
    }
    
    .kpi-value {
        font-size: 1.8rem;
    }
    
    .widget-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ===== LEADS MODULE STYLES ===== */
.leads-container {
    padding: 2rem;
    max-width: 100%;
    margin: 0 auto;
}

/* ===== USERS MODULE STYLES ===== */
.users-container {
    padding: 2rem;
    max-width: 100%;
    margin: 0 auto;
}

.leads-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 2rem;
}

.header-left {
    flex: 1;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.title-icon {
    color: var(--primary-blue);
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.stat-icon.bg-blue-500 { background: #3b82f6; }
.stat-icon.bg-yellow-500 { background: #eab308; }
.stat-icon.bg-green-500 { background: #22c55e; }
.stat-icon.bg-emerald-500 { background: #10b981; }
.stat-icon.bg-teal-500 { background: #14b8a6; }

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Filters Section */
.filters-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

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

.search-box {
    position: relative;
    flex: 1;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--bg-secondary);
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.filter-select {
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Multiselect dropdown (país) conservando estética de filtros */
.filter-multiselect { position: relative; }
.multiselect-trigger.filter-select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    cursor: pointer;
}
.multiselect-trigger .caret { margin-left: 8px; opacity: 0.7; transition: transform 0.2s ease; }
.multiselect-trigger[aria-expanded="true"] .caret { transform: rotate(180deg); }
.multiselect-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 20;
    min-width: 220px;
    max-height: 240px;
    overflow: auto;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
}
.multiselect-options { display: grid; grid-template-columns: 1fr; gap: 4px; }
.multiselect-option { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; }
.multiselect-option:hover { background: var(--bg-tertiary); }
.multiselect-option input { flex-shrink: 0; }
.multiselect-option span { color: var(--text-primary); }
.multiselect-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-light); }

.filter-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Table Container */
.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
    margin-bottom: 2rem;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

.table-title h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.table-actions {
    display: flex;
    gap: 0.75rem;
}

.table-responsive {
    overflow-x: auto;
}

.leads-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.leads-table th {
    background: var(--bg-secondary);
    padding: 1rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
    position: relative;
}

.leads-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.leads-table th.sortable:hover {
    background: var(--border-light);
}

.leads-table th.sortable.sorted-asc .sort-icon,
.leads-table th.sortable.sorted-desc .sort-icon {
    opacity: 1;
    color: var(--primary-blue);
}

.sort-icon {
    opacity: 0.3;
    margin-left: 0.5rem;
    transition: all 0.2s ease;
}

.leads-table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.lead-row:hover {
    background: var(--bg-secondary);
}

/* Lead Cell Styles */
.name-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.name-info {
    min-width: 0;
}

.full-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.company {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.email-link, .phone-link {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.email-link:hover, .phone-link:hover {
    color: var(--primary-blue-light);
}

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

/* Status and Priority Badges */
.status-badge, .priority-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

/* Status Colors */
.bg-blue-100 { background: #dbeafe; }
.text-blue-800 { color: #1e40af; }
.bg-yellow-100 { background: #fef3c7; }
.text-yellow-800 { color: #92400e; }
.bg-green-100 { background: #dcfce7; }
.text-green-800 { color: #166534; }
.bg-purple-100 { background: #f3e8ff; }
.text-purple-800 { color: #6b21a8; }
.bg-indigo-100 { background: #e0e7ff; }
.text-indigo-800 { color: #3730a3; }
.bg-orange-100 { background: #fed7aa; }
.text-orange-800 { color: #9a3412; }
.bg-emerald-100 { background: #d1fae5; }
.text-emerald-800 { color: #065f46; }
.bg-teal-100 { background: #ccfbf1; }
.text-teal-800 { color: #115e59; }
.bg-gray-100 { background: #f3f4f6; }
.text-gray-800 { color: #374151; }
.bg-red-100 { background: #fee2e2; }
.text-red-800 { color: #991b1b; }

/* Priority Colors */
.text-gray-600 { color: #4b5563; }
.bg-blue-100.text-blue-600 { color: #2563eb; }
.text-orange-600 { color: #ea580c; }
.text-red-600 { color: #dc2626; }

.investment-amount {
    font-weight: 600;
    color: var(--success);
}

/* Score Container */
.score-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.score-bar {
    width: 60px;
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.score-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 30px;
}

.assigned-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
}

.date-info {
    text-align: left;
}

.date {
    font-weight: 500;
    color: var(--text-primary);
}

.time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-action {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 150px;
    z-index: 1000;
    display: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

.dropdown-menu a:hover {
    background: var(--bg-secondary);
}

.dropdown-menu .text-danger {
    color: var(--danger);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 0.5rem 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    margin: 0 auto 1.5rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.empty-state p {
    margin: 0 0 2rem 0;
    color: var(--text-secondary);
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.pagination-size {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-size-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.page-size-label .size-icon {
    color: var(--text-secondary);
}

.page-size-group {
    display: inline-flex;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    padding: 2px;
    gap: 2px;
}

.size-pill {
    appearance: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.size-pill:hover {
    background: white;
}

.size-pill.active {
    background: var(--primary-blue);
    color: white;
}

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

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-blue);
}

.pagination-btn.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}

/* Bulk Actions */
.bulk-actions {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.bulk-info {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
}

.bulk-buttons {
    display: flex;
    gap: 0.75rem;
}

.bulk-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.bulk-close:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

/* Button Styles */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-blue);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-ghost:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Responsive Design for Leads Module */
@media (max-width: 768px) {
    .leads-container {
        padding: 1rem;
    }
    
    .leads-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .header-actions {
        justify-content: stretch;
    }
    
    .header-actions button {
        flex: 1;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .filters-form {
        gap: 1rem;
    }
    
    .filter-group {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .table-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .leads-table {
        font-size: 0.75rem;
    }
    
    .leads-table th,
    .leads-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .pagination-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .bulk-actions {
        left: 1rem;
        right: 1rem;
        transform: none;
        flex-direction: column;
        gap: 1rem;
    }
    
    .bulk-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
}
/* Lead Profile Redesign */
.lead-hero { display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:1rem; border-radius:16px; background: linear-gradient(90deg, rgba(16,185,129,0.08), rgba(59,130,246,0.08)); }
.lead-hero.premium { background: linear-gradient(135deg, rgba(30,58,138,0.08), rgba(16,185,129,0.08)); border:1px solid #e5e7eb; box-shadow: 0 10px 24px rgba(2,6,23,0.06); }
.lead-hero-left { display:flex; align-items:center; gap:1rem; }
.avatar-ring { width:64px; height:64px; border-radius:16px; display:flex; align-items:center; justify-content:center; background: radial-gradient(circle at 30% 30%, #0ea5e9 0%, #22c55e 60%, #111827 100%); box-shadow: 0 6px 16px rgba(2,6,23,0.15); }
.avatar-initials { font-weight:700; color:#fff; letter-spacing:1px; }
.pulse { animation: pulse 2.4s infinite; }
@keyframes pulse { 0%{ box-shadow:0 0 0 3px rgba(34,197,94,0.3);} 50%{ box-shadow:0 0 0 9px rgba(34,197,94,0.12);} 100%{ box-shadow:0 0 0 3px rgba(34,197,94,0.3);} }
.lead-identity { display:flex; flex-direction:column; gap:.25rem; }
.lead-name { font-size:1.8rem; margin:0; }
.title-gradient { background: linear-gradient(90deg, #22c55e, #0ea5e9); -webkit-background-clip:text; background-clip:text; color: transparent; }
.lead-contact { display:flex; gap:.75rem; align-items:center; flex-wrap:wrap; }
.contact-item { display:flex; gap:.25rem; align-items:center; color:#374151; text-decoration:none; }
.contact-item:hover { text-decoration:underline; }
.lead-flags { display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; }
.badge { border-radius:999px; padding:.25rem .6rem; font-size:.85rem; display:flex; gap:.35rem; align-items:center; }
.dot { width:8px; height:8px; border-radius:50%; display:inline-block; }
.dot-online { background:#10b981; animation: blip 1.6s infinite; }
.dot-offline { background:#6b7280; }
@keyframes blip { 0%{ transform:scale(1);} 50%{ transform:scale(1.4);} 100%{ transform:scale(1);} }
.lead-hero-right { display:flex; flex-direction:column; gap:.5rem; align-items:flex-end; }
.quick-actions { display:flex; gap:.5rem; flex-wrap:wrap; }
.qa-btn { display:flex; gap:.35rem; align-items:center; border:1px solid #e5e7eb; background:#fff; padding:.5rem .8rem; border-radius:10px; cursor:pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.qa-btn:hover { transform: translateY(-1px); box-shadow:0 4px 12px rgba(0,0,0,0.06); }
.qa-icon { font-size:1rem; }
.hero-actions { display:flex; gap:.4rem; }

.lead-panels { display:grid; grid-template-columns: 1fr 1fr; gap:1rem; margin-top:1rem; }
.lead-panels.premium { gap:1.25rem; }
.panel { background:#fff; border:1px solid #e5e7eb; border-radius:14px; overflow:hidden; }
.panel-premium { box-shadow: 0 12px 28px rgba(2,6,23,0.06); border-color:#e2e8f0; }
.panel-title { padding:.9rem 1.1rem; margin:0; font-weight:700; border-bottom:1px solid #e5e7eb; display:flex; align-items:center; gap:.5rem; }
.info-grid { display:grid; grid-template-columns: 160px 1fr; gap:.5rem; padding:1rem; }
.info-grid.wide { grid-template-columns: 180px 1fr; }
.text-muted { color:#6b7280; }

.kpi-grid { display:grid; grid-template-columns: repeat(6, 1fr); gap:.75rem; margin:1rem 0; }
.kpi-card { background:#fff; border:1px solid #e5e7eb; border-radius:10px; padding:.75rem; display:flex; flex-direction:column; gap:.35rem; }
.kpi-header { display:flex; gap:.35rem; align-items:center; color:#374151; }
.kpi-title { font-weight:600; }
.kpi-value { font-size:1rem; font-weight:600; color:#111827; display:flex; gap:.5rem; align-items:center; }
.progress { width:100%; height:8px; border-radius:999px; background:#f3f4f6; overflow:hidden; }
.progress-bar { height:100%; background: linear-gradient(90deg, #22c55e, #0ea5e9); }
.progress-bar.alt { background: linear-gradient(90deg, #f59e0b, #ef4444); }

.instruments-panel { background:#fff; border:1px solid #e5e7eb; border-radius:10px; padding:.75rem 1rem; }
.instrument-tags { display:flex; gap:.4rem; flex-wrap:wrap; }
.tag { background:#f9fafb; border:1px solid #e5e7eb; border-radius:999px; padding:.25rem .6rem; font-size:.85rem; color:#374151; }
.fade-in { animation: fadeIn .25s ease; }
@keyframes fadeIn { from{ opacity:0; transform:translateY(4px);} to{ opacity:1; transform:translateY(0);} }

.timeline-card { margin-top:1rem; }
.timeline { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:.6rem; }
.timeline-item { position:relative; padding-left:1.25rem; }
.timeline-dot { position:absolute; left:0; top:.5rem; width:8px; height:8px; border-radius:50%; background:#0ea5e9; box-shadow:0 0 0 4px rgba(14,165,233,0.15); }
.timeline-content { background:#fff; border:1px solid #e5e7eb; border-radius:10px; padding:.6rem .75rem; }
.timeline-header { display:flex; justify-content:space-between; align-items:center; }
.timeline-type { font-weight:600; color:#111827; display:flex; gap:.35rem; align-items:center; }
.timeline-date { color:#6b7280; font-size:.9rem; }
.timeline-subject { font-weight:600; margin-top:.2rem; }
.timeline-desc { color:#374151; margin-top:.2rem; }
.timeline-meta { color:#6b7280; margin-top:.2rem; font-size:.9rem; }

@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .lead-hero { flex-direction:column; align-items:flex-start; }
  .lead-panels { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Modal base styles */
.modal-backdrop { position:fixed; inset:0; background: rgba(15,23,42,0.45); display:flex; align-items:center; justify-content:center; z-index:9999; animation: fadeIn .18s ease; }
.modal { background: var(--bg-primary); border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 420px; max-width: 640px; width: calc(100% - 2rem); overflow: hidden; animation: popIn .18s ease; }
.modal-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-light); display:flex; align-items:center; justify-content:space-between; }
.modal-title { display:flex; align-items:center; gap:.5rem; }
.modal-icon { font-size:1.25rem; }
.modal-body { padding: 1rem 1.25rem; }
.modal-footer { padding: .75rem 1.25rem; border-top: 1px solid var(--border-light); display:flex; gap:.5rem; justify-content:flex-end; }
/* Modal Premium Variants */
.modal-premium .modal-header { background: linear-gradient(135deg, #0ea5e9 0%, #10b981 100%); color:#fff; border-bottom: none; }
.modal-premium .modal-title, .modal-premium .modal-title h3, .modal-premium .modal-icon { color:#fff; }
.modal-premium .btn-ghost, .modal-premium .btn-ghost:hover { color:#fff; opacity: .9; }
.modal-premium .modal-footer { background:#f9fafb; }
.modal-premium .btn.btn-primary { background:#0ea5e9; border-color:#0ea5e9; color:#fff; }
.modal-premium .btn.btn-primary:hover { background:#0284c7; border-color:#0284c7; }
.modal-premium .btn.btn-secondary { background:#ffffff; border:1px solid var(--border-light); color:#111827; }
.modal-premium .btn.btn-secondary:hover { background:#f3f4f6; }

/* Modal Notification Variants */
.modal-notification .modal-body p { font-size: .95rem; color: var(--text-primary); }
.modal-notification.modal-success .modal-header { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); color:#fff; }
.modal-notification.modal-error .modal-header { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color:#fff; }
.modal-notification.modal-warning .modal-header { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color:#fff; }
.modal-notification.modal-info .modal-header { background: linear-gradient(135deg, #0ea5e9 0%, #1e40af 100%); color:#fff; }
.modal-notification .modal-footer { background:#f9fafb; }

@keyframes popIn { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

/* Activity modal form */
.activity-form .form-row { display:flex; gap:.75rem; flex-wrap:wrap; }
.activity-form .flex-1 { flex:1; }
.template-row { display:flex; align-items:center; gap:.5rem; margin-top:.5rem; }
.template-label { color: var(--text-secondary); font-weight:600; }
.chip-group { display:flex; gap:.4rem; flex-wrap:wrap; }
.chip { border:1px solid var(--border-light); background: var(--bg-secondary); padding:.25rem .6rem; border-radius:999px; cursor:pointer; }
.chip:hover { background: var(--bg-tertiary); }

/* Modal lead context */
.modal-lead-context { display:flex; align-items:center; gap:.75rem; padding:.5rem .25rem .75rem; border-bottom:1px dashed var(--border-light); margin-bottom:.75rem; }
.mlc-avatar { width:36px; height:36px; border-radius:10px; background: linear-gradient(135deg, #3b82f6, #1e40af); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; box-shadow: 0 6px 16px rgba(30,64,175,.2); }
.mlc-info { display:flex; flex-direction:column; gap:.25rem; }
.mlc-name { font-weight:700; color: var(--text-primary); }
.mlc-contact { display:flex; gap:.4rem; flex-wrap:wrap; }
.mlc-chip { border:1px solid var(--border-light); background: var(--bg-secondary); color: var(--text-secondary); padding:.2rem .5rem; border-radius:999px; font-size:.85rem; text-decoration:none; }
.mlc-chip:hover { background: var(--bg-tertiary); color: var(--primary-blue); }

/* Panel elevated and title icon */
.panel-elevated { border-radius:12px; box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.panel-title { display:flex; align-items:center; gap:.5rem; }
.panel-title .panel-icon { font-size:1rem; }

/* Activity type switcher inside modal */
.activity-modal .activity-switch { display:flex; gap:.4rem; flex-wrap:wrap; margin-bottom:.5rem; }
.activity-modal .switch-chip { border:1px solid var(--border-light); background: var(--bg-secondary); padding:.25rem .6rem; border-radius:999px; cursor:pointer; font-weight:600; color: var(--text-secondary); }
.activity-modal .switch-chip.active { background: #e0e7ff; border-color: #c7d2fe; color:#1e40af; }
/* Interactive chips and counters */
.chip-toggle { border:1px solid var(--border-light); background: var(--bg-secondary); padding:.25rem .6rem; border-radius:999px; cursor:pointer; font-weight:600; color: var(--text-secondary); }
.chip-toggle:hover { background: var(--bg-tertiary); }
.chip-toggle.active { background:#dbeafe; border-color:#93c5fd; color:#1e3a8a; }
.count-indicator { text-align:right; font-size:.8rem; color: var(--text-muted); margin-top:.25rem; }
.btn.loading { opacity:.85; pointer-events:none; }
.btn.loading::after { content:' …'; }

/* Lead Info + Assignment UI enhancements */
.identity-row { display:inline-flex; align-items:center; gap:8px; }
.id-icon { font-size:16px; }
.id-text { font-weight:600; color:#0f172a; }
.contact-row { display:inline-flex; align-items:center; gap:8px; }
.tag { background:#f1f5f9; color:#334155; border:1px solid #e2e8f0; padding:2px 8px; border-radius:999px; font-size:12px; }
.note-box { background:#f8fafc; border:1px dashed #e2e8f0; border-radius:10px; padding:10px 12px; color:#374151; }
.assign-row { display:flex; align-items:center; gap:12px; }
.assigned-avatar { width:36px; height:36px; border-radius:50%; background:linear-gradient(135deg,#3b82f6,#1e40af); color:#fff; display:flex; align-items:center; justify-content:center; box-shadow:0 6px 16px rgba(30,64,175,0.25); }
.assigned-initial { font-weight:700; }
.assigned-meta { display:flex; flex-direction:column; }
.assigned-name { font-weight:600; color:#0f172a; }
.assigned-desk { font-size:12px; color:#64748b; }
.status-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.priority-pill { display:inline-flex; align-items:center; gap:6px; border-radius:999px; padding:6px 10px; font-weight:600; border:1px solid #e5e7eb; background:#f8fafc; color:#0f172a; }
.meta-pill { display:inline-block; background:#f1f5f9; color:#334155; border:1px solid #e2e8f0; border-radius:999px; padding:4px 10px; font-size:12px; }
.saving-pill { display:inline-flex; align-items:center; gap:6px; color:#64748b; }
.saving-pill .spinner { width:14px; height:14px; border:2px solid #cbd5e1; border-top-color:#1e40af; border-radius:50%; display:inline-block; animation: spin .6s linear infinite; }

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

/* Character Counter */
.character-counter {
    font-size: 0.8rem;
    color: #666;
    text-align: right;
    margin-top: 4px;
}

.character-counter.warning {
    color: #e74c3c;
    font-weight: 500;
}

/* Loading Button State */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Keyboard Shortcuts Hint */
.keyboard-hint {
    font-size: 0.75rem;
    color: #888;
    margin-top: 8px;
    text-align: center;
}

.keyboard-hint kbd {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-family: monospace;
}

/* Quick Schedule Buttons */
.quick-schedule {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.quick-schedule .btn-quick {
    padding: 4px 12px;
    font-size: 0.8rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-schedule .btn-quick:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

/* Enhanced Modal Animations */
.modal-backdrop {
    animation: fadeIn 0.2s ease-out;
}

.modal-premium {
    animation: slideInUp 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== Roles Grid & Cards (Enhanced) ===== */
.roles-table-container { margin-top: 16px; }
.roles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.role-card { background: var(--bg-primary); border: 1px solid var(--border-light); border-radius: 14px; box-shadow: var(--shadow-md); overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.role-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.role-header { display:flex; align-items:flex-start; justify-content:space-between; padding: 14px 16px; background: var(--gradient-secondary); border-bottom: 1px solid var(--border-light); }
.role-info { max-width: 70%; }
.role-name { font-size: 1.05rem; font-weight: 600; color: var(--text-primary); margin: 0; }
.role-description { font-size: .88rem; color: var(--text-muted); margin-top: 4px; }
.role-actions { display:flex; gap:8px; }
.action-btn { display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border-radius:10px; border:1px solid var(--border-light); background:#fff; color: var(--text-secondary); cursor:pointer; transition: background .15s ease, color .15s ease, transform .15s ease; }
.action-btn:hover { background: var(--bg-tertiary); color: var(--primary-blue); transform: translateY(-1px); }
.action-btn.edit svg { stroke: currentColor; }
.action-btn.delete { color: var(--danger); }
.role-stats { display:flex; gap: 16px; padding: 12px 16px; }
.stat-item { display:flex; align-items:center; gap:8px; background: var(--bg-secondary); border:1px solid var(--border-light); border-radius: 10px; padding: 8px 10px; }
.stat-value { font-weight: 700; color: var(--primary-blue); }
.stat-text { color: var(--text-secondary); font-size: .85rem; }
.role-permissions-preview { padding: 8px 16px 16px; }
.permissions-tags { display:flex; flex-wrap:wrap; gap:8px; }
.permission-tag { display:inline-block; padding: 6px 10px; font-size:.82rem; color: var(--primary-blue-dark); background: #eef2ff; border: 1px solid #e0e7ff; border-radius: 999px; }
.more-permissions { color: var(--secondary-gray-dark); font-weight:600; }
.no-permissions { color: var(--text-muted); font-style: italic; }

/* ===== Wizard Stepper Enhancements ===== */
.modal .wizard-steps { position: sticky; top: 0; background: #fff; padding-bottom: 8px; z-index: 2; }
.modal .modal-footer { position: sticky; bottom: 0; background: #fff; }
.muted { color: var(--text-muted); font-size: .9rem; }
.header-actions .btn-primary,
.header-actions .btn-secondary {
    white-space: nowrap;
    height: 44px;
    padding: 0 1.25rem;
    font-size: 0.875rem;
}

.header-actions .btn-icon {
    width: 18px;
    height: 18px;
}

.header-actions .btn-label {
    line-height: 1;
}

/* ===== Uniform Button Sizing Utility (module-wide consistency) ===== */
.btn-size-md { height: 36px; padding: 0 .95rem; font-size: .875rem; border-radius: 8px; }
.btn-size-md svg { width: 18px; height: 18px; }
.header-actions .btn-size-md { height: 36px; padding: 0 .95rem; font-size: .875rem; }