/* Global Styles */
html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    background: #f5f7fa;
}

* {
    box-sizing: border-box;
}

/* Typography */
h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

h1:focus {
    outline: none;
}

/* Links and Buttons */
a, .btn-link {
    color: #667eea;
    transition: color 0.3s ease;
}

a:hover, .btn-link:hover {
    color: #764ba2;
}

/* Primary Button */
.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #63408a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Success Button */
.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    border: none;
    box-shadow: 0 2px 4px rgba(72, 187, 120, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    transform: translateY(-1px);
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    border: none;
    box-shadow: 0 2px 4px rgba(245, 101, 101, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    transform: translateY(-1px);
}

/* Outline Buttons */
.btn-outline-primary {
    color: #667eea;
    border: 2px solid #667eea;
    background: transparent;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

.btn-outline-danger {
    color: #e53e3e;
    border: 2px solid #e53e3e;
    background: transparent;
    font-weight: 600;
}

.btn-outline-danger:hover {
    background: #e53e3e;
    color: white;
    transform: translateY(-1px);
}

/* Small Buttons */
.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.875rem;
    border-radius: 6px;
}

/* Focus States */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
    outline: none;
}

/* Content Area */
.content {
    padding-top: 1.5rem;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border: none;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Modern Table Styles */
.table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.table thead th {
    border: none;
    padding: 1rem 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #e2e8f0;
}

.table tbody tr:last-child {
    border-bottom: none;
}

.table tbody tr:hover {
    background-color: #f7fafc;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    color: #2d3748;
}

.table code {
    background: #edf2f7;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #667eea;
    font-family: 'Courier New', monospace;
}

/* Striped Tables */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(102, 126, 234, 0.03);
}

.table-striped tbody tr:hover {
    background-color: #f7fafc !important;
}

/* Badge Styles */
.badge {
    padding: 0.4rem 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    font-size: 0.875rem;
}

/* Form Styles */
.form-control, .form-select {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.65rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

/* Validation */
.valid.modified:not([type=checkbox]) {
    border-color: #48bb78;
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.1);
}

.invalid {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.validation-message {
    color: #e53e3e;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Modal Styles */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    padding: 1.25rem 1.5rem;
}

.modal-header .modal-title {
    font-weight: 700;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
}

/* Loading State */
p em {
    color: #718096;
    font-style: italic;
}

/* Error Boundary */
.blazor-error-boundary {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
    font-weight: 600;
}

/* Form Check */
.form-check-input {
    border: 2px solid #cbd5e0;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* Utility Classes */
.mb-3 {
    margin-bottom: 1.5rem;
}

.text-muted {
    color: #718096 !important;
    font-size: 0.875rem;
}

/* Page Header */
.page-header {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem;
    }

    .table {
        font-size: 0.875rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.75rem 0.5rem;
    }
}
