/* Global styles for SMC Elevators CRM - Professional Theme */
html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* SMC Elevators Brand Colors */
:root {
    --smc-primary: #1e3a5f;
    --smc-secondary: #2c5aa0;
    --smc-accent: #4a90c2;
    --smc-light: #e8f4fd;
    --smc-dark: #0f1c2e;
    --smc-success: #28a745;
    --smc-warning: #ffc107;
    --smc-danger: #dc3545;
    --smc-gray-light: #f8f9fa;
    --smc-gray-medium: #6c757d;
    --smc-gray-dark: #495057;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--smc-dark);
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.1rem; }

/* Links */
a, .btn-link {
    color: var(--smc-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover, .btn-link:hover {
    color: var(--smc-primary);
    text-decoration: underline;
}

/* Buttons */
.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--smc-secondary), var(--smc-primary));
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(30, 58, 95, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--smc-primary), var(--smc-dark));
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(30, 58, 95, 0.3);
}

.btn-secondary {
    color: var(--smc-primary);
    background-color: var(--smc-light);
    border: 1px solid var(--smc-accent);
    border-radius: 6px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--smc-accent);
    color: white;
    border-color: var(--smc-primary);
}

/* Form Controls */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--smc-accent);
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 194, 0.25);
}

.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(74, 144, 194, 0.25);
}

/* Content Area */
.content {
    padding-top: 1.5rem;
    background-color: var(--smc-gray-light);
    min-height: calc(100vh - 70px);
}

/* Cards and Panels */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.card-header {
    background: linear-gradient(135deg, var(--smc-light), white);
    border-bottom: 1px solid var(--smc-accent);
    font-weight: 600;
    color: var(--smc-primary);
}

/* Tables */
.table {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.table thead th {
    background-color: var(--smc-primary);
    color: white;
    font-weight: 600;
    border: none;
    padding: 1rem;
}

.table tbody tr:hover {
    background-color: var(--smc-light);
}

/* Focus states */
h1:focus {
    outline: none;
}

/* Form validation */
.valid.modified:not([type=checkbox]) {
    outline: 2px solid var(--smc-success);
}

.invalid {
    outline: 2px solid var(--smc-danger);
}

.validation-message {
    color: var(--smc-danger);
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Error boundary */
.blazor-error-boundary {
    background: var(--smc-danger);
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    border-radius: 6px;
    margin: 1rem 0;
    position: relative;
}

.blazor-error-boundary::before {
    content: "⚠️";
    position: absolute;
    left: 1rem;
    top: 1rem;
    font-size: 1.5rem;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* Form styling improvements */
.darker-border-checkbox.form-check-input {
    border-color: var(--smc-gray-medium);
}

.form-floating > .form-control-plaintext::placeholder, 
.form-floating > .form-control::placeholder {
    color: var(--smc-gray-medium);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, 
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Utility classes for professional spacing */
.section-header {
    border-bottom: 3px solid var(--smc-accent);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.content-wrapper {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

/* Professional loading spinner */
.loading-spinner {
    border: 3px solid var(--smc-light);
    border-top: 3px solid var(--smc-primary);
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}