/* DeltaLogística Custom Styles */

:root {
    /* DELTA Corporate Colors */
    --delta-primary: #E40046;       /* Primary Red - PANTONE 192 C */
    --delta-primary-dark: #BA0C2F;  /* Dark Red - PANTONE 200 C */
    --delta-dark: #222223;          /* Corporate Black - PANTONE NEUTRAL BLACK C */
    --delta-light: #E5E1E6;         /* Light Gray - PANTONE 663 C */
    
    /* System Colors */
    --delta-secondary: #6c757d;
    --delta-success: #198754;
    --delta-danger: #dc3545;
    --delta-warning: #ffc107;
    --delta-info: #0dcaf0;
}

/* Body and Layout */
body {
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Navigation Branding */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    font-family: 'Montserrat', sans-serif;
    text-decoration: none !important;
}

.navbar-brand strong {
    color: #ffffff;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.navbar-brand small {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

/* Corporate Navbar */
.navbar-corporate {
    background: linear-gradient(135deg, #E40046 0%, #BA0C2F 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

.navbar-corporate .navbar-brand:hover {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

/* DELTA Logo Styles */
.delta-logo {
    height: 45px;
    width: 45px;
    border-radius: 50%;
    background: white;
    padding: 3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.delta-logo:hover {
    transform: scale(1.05);
}

.delta-logo-large {
    height: 80px;
    width: 80px;
    border-radius: 50%;
    background: white;
    padding: 5px;
    box-shadow: 0 4px 8px rgba(228, 0, 70, 0.3);
}

/* Corporate Text Styles */
.delta-brand-text {
    color: var(--delta-primary);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

.delta-tagline {
    color: var(--delta-dark);
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
}

/* Card Enhancements */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    border-bottom: 1px solid rgba(var(--bs-primary-rgb), 0.2);
    font-weight: 600;
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

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

/* Tables */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table thead th {
    border-bottom: 2px solid var(--delta-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table-hover tbody tr:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

/* Badges */
.badge {
    font-weight: 500;
    border-radius: 0.375rem;
    padding: 0.5em 0.75em;
}

/* Forms */
.form-control, .form-select {
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: var(--delta-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--bs-body-color);
}

/* Input Groups */
.input-group-text {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    border-color: var(--delta-primary);
    color: var(--delta-primary);
    font-weight: 500;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.75rem;
    border-left: 4px solid;
}

.alert-success {
    border-left-color: var(--delta-success);
    background-color: rgba(var(--bs-success-rgb), 0.1);
}

.alert-danger {
    border-left-color: var(--delta-danger);
    background-color: rgba(var(--bs-danger-rgb), 0.1);
}

.alert-warning {
    border-left-color: var(--delta-warning);
    background-color: rgba(var(--bs-warning-rgb), 0.1);
}

.alert-info {
    border-left-color: var(--delta-info);
    background-color: rgba(var(--bs-info-rgb), 0.1);
}

/* Dashboard Cards */
.dashboard-card {
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.2s ease-in-out;
}

.dashboard-card:hover {
    transform: translateY(-2px);
}

.dashboard-card .card-body {
    padding: 2rem;
}

.dashboard-card h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0;
}

/* Statistics Cards */
.stat-card {
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    color: white;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Movement Type Indicators */
.movement-entrada {
    color: var(--delta-success) !important;
}

.movement-despacho {
    color: var(--delta-danger) !important;
}

.movement-traslado {
    color: var(--delta-info) !important;
}

.movement-produccion {
    color: var(--delta-warning) !important;
}

.movement-empaque {
    color: var(--delta-secondary) !important;
}

/* Stock Status */
.stock-available {
    color: var(--delta-success);
    font-weight: 600;
}

.stock-low {
    color: var(--delta-warning);
    font-weight: 600;
}

.stock-empty {
    color: var(--delta-danger);
    font-weight: 600;
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.spinner-border-custom {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Conversion Display */
.conversion-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 1rem 0;
}

.conversion-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    backdrop-filter: blur(5px);
}

.conversion-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.conversion-label {
    opacity: 0.8;
    font-size: 0.875rem;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .dashboard-card .card-body {
        padding: 1.5rem;
    }
    
    .dashboard-card h2 {
        font-size: 2rem;
    }
    
    .table-responsive {
        border-radius: 0.5rem;
    }
    
    .btn-group-vertical .btn {
        margin-bottom: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .card-footer,
    .no-print {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
    
    .table {
        border-collapse: collapse !important;
    }
    
    .table th,
    .table td {
        border: 1px solid #000 !important;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Form Enhancements */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

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

/* Custom Progress Bars */
.progress-custom {
    height: 1rem;
    border-radius: 0.5rem;
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

.progress-bar-custom {
    border-radius: 0.5rem;
    transition: width 0.6s ease;
}

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

.status-active {
    background-color: var(--delta-success);
    box-shadow: 0 0 0 3px rgba(var(--bs-success-rgb), 0.3);
}

.status-inactive {
    background-color: var(--delta-secondary);
}

.status-warning {
    background-color: var(--delta-warning);
    box-shadow: 0 0 0 3px rgba(var(--bs-warning-rgb), 0.3);
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    margin: 1rem 0;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--delta-primary), var(--delta-info));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, var(--delta-primary), var(--delta-info)) border-box;
    border-radius: 0.5rem;
}

.shadow-custom {
    box-shadow: 0 0.5rem 1rem rgba(var(--bs-primary-rgb), 0.15) !important;
}

/* Scrollbar Styling */
.custom-scroll::-webkit-scrollbar {
    width: 8px;
}

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

.custom-scroll::-webkit-scrollbar-thumb {
    background: var(--delta-primary);
    border-radius: 4px;
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* Modal Enhancements */
.modal-content {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.modal-header {
    border-bottom: 1px solid rgba(var(--bs-primary-rgb), 0.2);
    border-radius: 1rem 1rem 0 0;
}

.modal-footer {
    border-top: 1px solid rgba(var(--bs-primary-rgb), 0.2);
    border-radius: 0 0 1rem 1rem;
}

/* Toast Notifications */
.toast {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.toast-header {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    border-bottom: 1px solid rgba(var(--bs-primary-rgb), 0.2);
}

/* Login Page Background */
.login-page {
    min-height: calc(100vh - 120px);
    padding: 40px 0;
}

/* Login Page Enhanced Text Visibility */
.login-page .card-title {
    color: #E40046 !important;
    font-weight: 800 !important;
    font-size: 2.4rem !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3) !important;
    margin-bottom: 12px !important;
    letter-spacing: -0.5px !important;
}

.login-page .login-subtitle {
    color: #333 !important;
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1) !important;
    margin-bottom: 15px !important;
}

.login-page .login-description {
    color: #666 !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    text-shadow: none !important;
}

.login-page .card {
    background: linear-gradient(135deg, #222223 0%, #1a1a1a 100%) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(228, 0, 70, 0.2) !important;
    color: white !important;
}

/* Login form styling for dark background */
.login-page .form-control {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(228, 0, 70, 0.3) !important;
    color: #333 !important;
}

.login-page .form-control:focus {
    background: #ffffff !important;
    border-color: #E40046 !important;
    box-shadow: 0 0 0 0.2rem rgba(228, 0, 70, 0.25) !important;
}

.login-page .form-label {
    color: #ffffff !important;
    font-weight: 500 !important;
}

.login-page .form-check-label {
    color: #ffffff !important;
}

.login-page .btn-primary {
    background: linear-gradient(135deg, #E40046 0%, #BA0C2F 100%) !important;
    border: none !important;
    font-weight: 600 !important;
}

.login-page .btn-primary:hover {
    background: linear-gradient(135deg, #BA0C2F 0%, #8B0921 100%) !important;
    transform: translateY(-1px) !important;
}

.login-page .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* ==========================================
   REDESIGNED REGISTER PAGE STYLING
   ========================================== */

.register-page {
    min-height: calc(100vh - 80px);
    padding: 20px 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #222223 100%);
}

/* Header Section */
.register-header {
    margin-bottom: 2rem;
}

.delta-logo-form {
    height: 80px;
    width: 80px;
    border-radius: 50%;
    background: white;
    padding: 8px;
    box-shadow: 0 8px 24px rgba(228, 0, 70, 0.3);
    transition: transform 0.3s ease;
}

.delta-logo-form:hover {
    transform: scale(1.05) rotate(5deg);
}

.register-title {
    color: #ffffff;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.register-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* Main Form Card */
.register-card {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: 1px solid rgba(228, 0, 70, 0.3);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.register-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #E40046 0%, #BA0C2F 100%);
}

/* Form Sections */
.form-section {
    position: relative;
    padding: 1.5rem 0;
}

.section-title {
    color: #ffffff;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.section-divider {
    height: 2px;
    background: linear-gradient(90deg, #E40046 0%, transparent 100%);
    margin-bottom: 1.5rem;
    border-radius: 2px;
}

/* Floating Labels Enhancement */
.form-floating {
    position: relative;
    margin-bottom: 0.5rem;
}

.form-floating > .form-control,
.form-floating > .form-select {
    background: rgba(52, 58, 64, 0.9) !important;
    border: 2px solid rgba(108, 117, 125, 0.5) !important;
    color: #ffffff !important;
    font-weight: 500;
    border-radius: 12px !important;
    height: calc(3.5rem + 2px);
    padding: 1rem 0.75rem;
    transition: all 0.3s ease;
}

.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
    background: rgba(52, 58, 64, 1) !important;
    border-color: #E40046 !important;
    box-shadow: 0 0 0 0.3rem rgba(228, 0, 70, 0.15) !important;
    transform: translateY(-2px);
}

.form-floating > label {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 1rem 0.75rem;
    transform-origin: 0 0;
    transition: all 0.3s ease;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select:focus ~ label,
.form-floating > .form-select:not([value=""]) ~ label {
    color: #E40046 !important;
    font-weight: 600;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Enhanced Form Text */
.register-page .form-text {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.5rem;
    padding-left: 0.75rem;
}

/* Action Buttons */
.form-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.register-page .btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-transform: none;
}

.register-page .btn-primary {
    background: linear-gradient(135deg, #E40046 0%, #BA0C2F 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(228, 0, 70, 0.3);
}

.register-page .btn-primary:hover {
    background: linear-gradient(135deg, #BA0C2F 0%, #8B0921 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(228, 0, 70, 0.4);
}

.register-page .btn-outline-secondary {
    color: #ffffff !important;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: transparent;
}

.register-page .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* Error Styling Enhancement */
.register-page .invalid-feedback {
    color: #ff6b6b !important;
    font-weight: 600;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    padding-left: 0.75rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.register-page .form-control.is-invalid,
.register-page .form-select.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.3rem rgba(220, 53, 69, 0.15) !important;
    animation: shake 0.5s ease-in-out;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .register-page {
        padding: 15px;
    }
    
    .register-card {
        border-radius: 15px;
        margin: 0 10px;
    }
    
    .delta-logo-form {
        height: 60px;
        width: 60px;
    }
    
    .register-title {
        font-size: 1.5rem;
    }
    
    .register-subtitle {
        font-size: 1rem;
    }
    
    .form-section {
        padding: 1rem 0;
    }
    
    .form-floating > .form-control,
    .form-floating > .form-select {
        height: calc(3rem + 2px);
    }
}

/* Footer Information */
.register-page .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.875rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Remove old register page card styles - replaced with new design */

/* ==========================================
   NUEVO FORMULARIO DE USUARIO - WCAG COMPLIANT
   ========================================== */

.new-user-form-container {
    background: linear-gradient(135deg, #1a1d23 0%, #23272f 100%);
    min-height: 100vh;
    padding: 2rem 0;
}

/* Header Section */
.form-header .header-logo {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 4px 8px rgba(228, 0, 70, 0.3));
}

.form-header .header-title {
    color: #f8f9fa;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    margin-bottom: 0.5rem;
}

.form-header .header-subtitle {
    color: #e0e0e0;
    font-weight: 400;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
}

/* Main Card */
.new-user-card {
    background: #23272f !important;
    border: 2px solid rgba(228, 0, 70, 0.2) !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
                0 0 30px rgba(228, 0, 70, 0.1) !important;
    backdrop-filter: blur(10px);
}

/* Section Titles */
.section-title {
    font-size: 1.2rem !important;
    color: #E40046 !important;
    font-weight: 600 !important;
    margin-bottom: 1rem !important;
    display: flex;
    align-items: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.section-divider {
    height: 3px;
    background: linear-gradient(90deg, #E40046 0%, rgba(228, 0, 70, 0.3) 50%, transparent 100%);
    margin-bottom: 1.5rem;
    border-radius: 2px;
}

/* Form Groups Enhanced */
.form-group-enhanced {
    margin-bottom: 1.5rem;
}

.form-label {
    color: #f8f9fa !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    margin-bottom: 0.5rem !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
    display: flex;
    align-items: center;
}

.required-asterisk {
    color: #E40046 !important;
    margin-left: 4px;
    font-weight: bold;
}

/* Form Controls Enhanced */
.form-control-enhanced, 
.form-control-enhanced:focus,
.form-control-enhanced:active {
    background: #23272f !important;
    color: #f8f9fa !important;
    border: 2px solid #444 !important;
    padding: 0.75rem 1rem !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3) !important;
}

.form-control-enhanced::placeholder {
    color: #bbbbbb !important;
    opacity: 1 !important;
    font-style: italic;
}

.form-control-enhanced:focus {
    border-color: #E40046 !important;
    box-shadow: 0 0 0 0.25rem rgba(228, 0, 70, 0.25) !important;
    background: #2a2e36 !important;
    transform: translateY(-1px);
}

.form-control-enhanced.is-valid {
    border-color: #28a745 !important;
    background: #23272f !important;
    color: #f8f9fa !important;
}

.form-control-enhanced.is-invalid {
    border-color: #dc3545 !important;
    background: #23272f !important;
    color: #f8f9fa !important;
}

/* Form Help Text */
.form-help {
    color: #cccccc !important;
    font-size: 0.85rem !important;
    margin-top: 0.5rem !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
    display: flex;
    align-items: center;
}

/* Password Strength Meter */
.password-strength {
    margin-top: 0.75rem;
}

.strength-meter {
    height: 6px;
    background: #444;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.strength-text {
    color: #e0e0e0 !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
}

/* Password Match Indicator */
.password-match {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.password-match.match-success {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.password-match.match-error {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* Checkbox Enhanced */
.form-check-enhanced {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-check-enhanced .form-check-input {
    background-color: #23272f !important;
    border-color: #E40046 !important;
    width: 1.2rem;
    height: 1.2rem;
}

.form-check-enhanced .form-check-input:checked {
    background-color: #E40046 !important;
    border-color: #E40046 !important;
}

.form-check-enhanced .form-check-label {
    color: #f8f9fa !important;
    font-weight: 500 !important;
    margin-left: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
}

/* Action Buttons */
.form-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(228, 0, 70, 0.2);
}

.btn-create {
    background: linear-gradient(135deg, #E40046 0%, #BA0C2F 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0.875rem 2rem !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    text-transform: none !important;
    box-shadow: 0 4px 12px rgba(228, 0, 70, 0.4) !important;
    transition: all 0.3s ease !important;
    position: relative;
    overflow: hidden;
}

.btn-create:hover {
    background: linear-gradient(135deg, #BA0C2F 0%, #8B0922 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(228, 0, 70, 0.6) !important;
}

.btn-create:active {
    transform: translateY(0) !important;
}

.btn-create::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-create:hover::before {
    left: 100%;
}

.btn-cancel {
    background: rgba(108, 117, 125, 0.8) !important;
    color: #f8f9fa !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    padding: 0.875rem 2rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
}

.btn-cancel:hover {
    background: rgba(108, 117, 125, 1) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

/* Footer Info */
.footer-info {
    color: #cccccc !important;
    font-size: 0.9rem !important;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
}

/* Invalid Feedback Enhanced */
.invalid-feedback {
    color: #ff6b6b !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    margin-top: 0.5rem !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
    display: flex;
    align-items: center;
}

/* Loading Animation */
.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .new-user-form-container {
        padding: 1rem 0;
    }
    
    .form-header .header-logo {
        width: 60px;
        height: 60px;
    }
    
    .form-header .header-title {
        font-size: 1.5rem;
    }
    
    .form-header .header-subtitle {
        font-size: 1rem;
    }
    
    .new-user-card {
        margin: 0 1rem;
    }
    
    .btn-create, .btn-cancel {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.95rem !important;
    }
    
    .section-title {
        font-size: 1.1rem !important;
    }
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none !important;
    border: none !important;
    color: #bbbbbb !important;
    cursor: pointer;
    padding: 4px 8px !important;
    border-radius: 4px;
    transition: all 0.3s ease;
    z-index: 10;
}

.password-toggle-btn:hover {
    color: #E40046 !important;
    background: rgba(228, 0, 70, 0.1) !important;
}

/* Roles Information Grid */
.roles-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.role-info-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.role-info-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(228, 0, 70, 0.3);
    transform: translateY(-2px);
}

.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.role-badge.super-admin {
    background: linear-gradient(135deg, #dc3545, #b02a37);
    color: #ffffff;
}

.role-badge.admin-local {
    background: linear-gradient(135deg, #ffc107, #d39e00);
    color: #212529;
}

.role-badge.operador {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: #ffffff;
}

.role-badge.consulta {
    background: linear-gradient(135deg, #6c757d, #545b62);
    color: #ffffff;
}

.role-description {
    color: #e0e0e0 !important;
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
}

/* Profile Page Styles */
.profile-field {
    margin-bottom: 1rem;
}

.profile-label {
    color: #f8f9fa !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    margin-bottom: 0.5rem !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
    display: flex;
    align-items: center;
}

.profile-value {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #f8f9fa !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 0.75rem 1rem !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: 1rem !important;
    margin-bottom: 0.5rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3) !important;
}

.profile-help {
    color: #cccccc !important;
    font-size: 0.85rem !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
    display: flex;
    align-items: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.status-badge.active {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: #ffffff;
}

.status-badge.inactive {
    background: linear-gradient(135deg, #dc3545, #b02a37);
    color: #ffffff;
}

/* Modal Styles */
.modal-content {
    background: #23272f !important;
    border: 2px solid rgba(228, 0, 70, 0.2) !important;
    border-radius: 16px !important;
}

.modal-header {
    border-bottom: 1px solid rgba(228, 0, 70, 0.2) !important;
}

.modal-footer {
    border-top: 1px solid rgba(228, 0, 70, 0.2) !important;
}

.modal-title {
    color: #f8f9fa !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    .form-control-enhanced,
    .btn-create,
    .btn-cancel,
    .strength-fill,
    .role-info-card {
        transition: none !important;
    }
    
    .btn-create:hover,
    .role-info-card:hover {
        transform: none !important;
    }
}

/* ==========================================
   UNIVERSAL FORM STYLING - WCAG COMPLIANT
   ========================================== */

/* All form controls with improved contrast */
.form-control, .form-select, .form-control-plaintext, textarea {
    background: #23272f !important;
    border: 1px solid #495057 !important;
    color: #f8f9fa !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

/* Focus states with DELTA red accent */
.form-control:focus, .form-select:focus, textarea:focus {
    background: #2c3138 !important;
    border-color: #E40046 !important;
    box-shadow: 0 0 0 0.2rem rgba(228, 0, 70, 0.25) !important;
    color: #ffffff !important;
    outline: none !important;
}

/* Placeholder styling for better visibility */
.form-control::placeholder, textarea::placeholder {
    color: #adb5bd !important;
    opacity: 1 !important;
    font-weight: 400 !important;
}

/* Disabled form controls */
.form-control:disabled, .form-select:disabled, textarea:disabled {
    background: #343a40 !important;
    color: #6c757d !important;
    border-color: #495057 !important;
    opacity: 0.8 !important;
}

/* Select options styling */
.form-select option {
    background: #23272f !important;
    color: #f8f9fa !important;
    padding: 8px 12px !important;
}

/* Form labels with improved contrast */
.form-label {
    color: #f8f9fa !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5) !important;
}

/* Required field indicators */
.form-label .text-danger, .required::after {
    color: #ff6b6b !important;
    font-weight: 700 !important;
}

/* Form text and help text */
.form-text, .text-muted {
    color: #adb5bd !important;
    font-weight: 500 !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5) !important;
}

/* Invalid feedback styling */
.invalid-feedback {
    color: #ff6b6b !important;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
    display: block !important;
}

.form-control.is-invalid, .form-select.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Valid feedback styling */
.valid-feedback {
    color: #51cf66 !important;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
}

.form-control.is-valid, .form-select.is-valid {
    border-color: #198754 !important;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25) !important;
}

/* Input groups styling */
.input-group-text {
    background: #495057 !important;
    color: #f8f9fa !important;
    border: 1px solid #495057 !important;
    font-weight: 500 !important;
}

/* Search and filter forms */
.search-form .form-control, .filter-form .form-control {
    background: #343a40 !important;
    border: 1px solid #6c757d !important;
    color: #ffffff !important;
}

.search-form .form-control:focus, .filter-form .form-control:focus {
    background: #495057 !important;
    border-color: #E40046 !important;
    color: #ffffff !important;
}

/* Form check (radio/checkbox) styling */
.form-check-input {
    background-color: #495057 !important;
    border: 1px solid #6c757d !important;
}

.form-check-input:checked {
    background-color: #E40046 !important;
    border-color: #E40046 !important;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(228, 0, 70, 0.25) !important;
}

.form-check-label {
    color: #f8f9fa !important;
    font-weight: 500 !important;
}

/* File input styling */
.form-control[type="file"] {
    background: #23272f !important;
    color: #f8f9fa !important;
    border: 1px solid #495057 !important;
}

.form-control[type="file"]:focus {
    background: #2c3138 !important;
    border-color: #E40046 !important;
}

/* Range input styling */
.form-range {
    background: transparent !important;
}

.form-range::-webkit-slider-track {
    background: #495057 !important;
    border-radius: 0.5rem !important;
}

.form-range::-webkit-slider-thumb {
    background: #E40046 !important;
}

.form-range::-moz-range-track {
    background: #495057 !important;
    border-radius: 0.5rem !important;
}

.form-range::-moz-range-thumb {
    background: #E40046 !important;
    border: none !important;
}

/* Override any conflicting styles from login/register pages */
.login-page .form-control, 
.login-page .form-select,
.register-page .form-control, 
.register-page .form-select {
    background: #23272f !important;
    color: #f8f9fa !important;
    border: 1px solid #495057 !important;
}

.login-page .form-control:focus, 
.login-page .form-select:focus,
.register-page .form-control:focus, 
.register-page .form-select:focus {
    background: #2c3138 !important;
    color: #ffffff !important;
    border-color: #E40046 !important;
}

/* Ensure form text is visible on all backgrounds */
.card .form-label,
.modal .form-label,
.offcanvas .form-label {
    color: #f8f9fa !important;
    font-weight: 600 !important;
}

/* Button contrast improvements */
.btn-outline-secondary {
    color: #f8f9fa !important;
    border-color: #6c757d !important;
}

.btn-outline-secondary:hover {
    background: #6c757d !important;
    color: #ffffff !important;
}

/* Table form controls */
.table .form-control,
.table .form-select {
    background: #23272f !important;
    color: #f8f9fa !important;
    border: 1px solid #495057 !important;
    margin: 2px 0 !important;
}
