/* Modern BMV Control Console - Clean & Efficient Design */

/* ============ MODERN TYPOGRAPHY & BASE ============ */
html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
    font-size: 16px;
    color: #1a1a1a;
}

* {
    box-sizing: border-box;
}

/* ============ MODERN LINKS & BUTTONS ============ */
a, .btn-link {
    color: #009B4D;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

a:hover, .btn-link:hover {
    color: #007A3D;
    text-decoration: none;
}

a:hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #009B4D;
    border-radius: 1px;
}

/* ============ MODERN BUTTON SYSTEM ============ */
.btn-primary {
    background: linear-gradient(135deg, #009B4D 0%, #007A3D 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: 0.025em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 155, 77, 0.25);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #007A3D 0%, #006633 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 155, 77, 0.35);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 155, 77, 0.25);
}

.btn-secondary {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    color: #374151;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: #009B4D;
    color: #009B4D;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 155, 77, 0.15);
}

/* ============ MODERN FOCUS STATES ============ */
.btn:focus, 
.btn:active:focus, 
.btn-link.nav-link:focus, 
.form-control:focus, 
.form-check-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 155, 77, 0.2);
}

/* ============ MODERN CONTENT LAYOUT ============ */
.content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 200px);
}

@media (max-width: 768px) {
    .content {
        padding: 1rem;
    }
}

/* ============ MODERN TYPOGRAPHY ============ */
h1, h2, h3, h4, h5, h6 {
    color: #1a1a1a;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #009B4D 0%, #007A3D 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2rem;
    color: #009B4D;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h1:focus {
    outline: none;
}

/* ============ MODERN FORM SYSTEM ============ */
.form-control {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
    color: #1a1a1a;
}

.form-control:focus {
    border-color: #009B4D;
    box-shadow: 0 0 0 3px rgba(0, 155, 77, 0.1);
    background: #fff;
}

.form-control::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

/* ============ MODERN VALIDATION ============ */
.valid.modified:not([type=checkbox]) {
    border-color: #009B4D;
    box-shadow: 0 0 0 3px rgba(0, 155, 77, 0.1);
}

.invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.validation-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.validation-message::before {
    content: "⚠️";
    font-size: 1rem;
}

/* ============ MODERN ERROR BOUNDARY ============ */
.blazor-error-boundary {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-radius: 12px;
    border-left: 4px solid #fff;
    padding: 1.5rem 2rem;
    margin: 1rem 0;
    color: white;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.25);
    position: relative;
}

.blazor-error-boundary::before {
    content: "⚠️";
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

.blazor-error-boundary::after {
    content: "Ha ocurrido un error en la aplicación";
    font-weight: 600;
    font-size: 1rem;
}

/* ============ MODERN CHECKBOXES ============ */
.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    transition: all 0.2s ease;
    cursor: pointer;
}

.form-check-input:checked {
    background: #009B4D;
    border-color: #009B4D;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m13.854 3.646-7.5 7.5a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6 10.293l7.146-7.147a.5.5 0 0 1 .708.708z'/%3e%3c/svg%3e");
}

.darker-border-checkbox.form-check-input {
    border-color: #6b7280;
}

/* ============ MODERN PLACEHOLDERS ============ */
.form-floating > .form-control-plaintext::placeholder, 
.form-floating > .form-control::placeholder {
    color: #9ca3af;
    transition: all 0.2s ease;
    font-weight: 400;
}

.form-floating > .form-control:focus::placeholder {
    color: #d1d5db;
    transform: translateY(-2px);
}

/* ============ MODERN CARDS ============ */
.card {
    border: none;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ============ LOADING STATES ============ */
.loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #009B4D;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    z-index: 10;
}

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

/* ============ ACCESSIBILITY & RESPONSIVE ============ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    .btn-primary {
        background: #007A3D;
        border: 2px solid #000;
    }
    
    .form-control {
        border-width: 3px;
    }
    
    a {
        text-decoration: underline;
    }
}

/* ============ PRINT STYLES ============ */
@media print {
    .btn, .navbar, .sidebar, .alert {
        display: none !important;
    }
    
    .content {
        padding: 0;
        max-width: none;
        box-shadow: none;
    }
}
