/* DuoApp CRM - App Styles */

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* Professional Loading Screen */
.duoapp-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    z-index: 9999;
}

.duoapp-logo-loading {
    width: 60px;
    height: 60px;
    animation: pulse 2s ease-in-out infinite;
}

.duoapp-logo-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    animation: pulse 2s ease-in-out infinite;
}

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

.loading-text {
    margin-top: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e40af;
    letter-spacing: -0.02em;
}

.loading-spinner {
    margin-top: 1rem;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(37, 99, 235, 0.2);
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Validation */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #10b981;
}

.invalid {
    outline: 1px solid #ef4444;
}

.validation-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Error UI */
#blazor-error-ui {
    background: #fee2e2;
    bottom: 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 1rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 10000;
    color: #991b1b;
    font-weight: 500;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 0.5rem;
    font-size: 1.5rem;
}

#blazor-error-ui .reload {
    color: #2563eb;
    text-decoration: underline;
}

.blazor-error-boundary {
    background: #fee2e2;
    padding: 1rem 1rem 1rem 3.5rem;
    color: #991b1b;
    border-left: 4px solid #ef4444;
    margin: 1rem 0;
    border-radius: 0.5rem;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* Focus Styles */
.btn:focus, 
.btn:active:focus, 
.btn-link.nav-link:focus, 
.form-control:focus, 
.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Content Padding */
.content {
    padding-top: 1.5rem;
}

/* Page Headers */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.page-header .subtitle {
    color: #6b7280;
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* Utility Classes */
.text-muted {
    color: #6b7280 !important;
}

.text-primary {
    color: #2563eb !important;
}

.text-success {
    color: #10b981 !important;
}

.text-danger {
    color: #ef4444 !important;
}

.text-warning {
    color: #f59e0b !important;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.5rem;
    }
}


code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}