/* CASEY - Professional Forensic Management System */
/* Aligned with Linear.app dark mode (2024 design refresh) */

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter Variable', 'Inter', Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 13px;
}

/* Focus states */
h1:focus {
    outline: none;
}

/* Scrollbar styling — warm gray, 12px */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #1C1E21;
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: #2A2C30;
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* Compact table styling */
.mud-table {
    font-size: 0.8125rem;
    border-radius: 12px;
}

.mud-table-cell {
    padding: 6px 12px !important;
}

.mud-table-head .mud-table-cell {
    font-weight: 500;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6B6F76;
    border-bottom: 1px solid #1C1E21;
}

.mud-table-row {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 100ms ease;
}

.mud-table-row:hover {
    background: rgba(255,255,255,0.03) !important;
}

/* Compact form fields */
.mud-input {
    font-size: 0.8125rem;
}

.mud-input-label {
    font-size: 0.6875rem;
    font-weight: 500;
}

.mud-input-outlined .mud-input-outlined-border {
    border-color: #1C1E21;
    border-radius: 8px;
}

/* Compact buttons */
.mud-button-root {
    font-size: 0.8125rem;
    padding: 6px 16px;
    text-transform: none;
    border-radius: 8px;
}

.mud-button-root.mud-button-size-small {
    font-size: 0.75rem;
    padding: 4px 10px;
}

/* Compact chips */
.mud-chip {
    font-size: 0.6875rem;
    height: 22px;
    border-radius: 4px;
}

.mud-chip.mud-chip-size-small {
    font-size: 0.625rem;
    height: 18px;
}

/* Compact app bar — 48px */
.mud-appbar {
    min-height: 48px !important;
    border-bottom: 1px solid #1C1E21;
}

.mud-appbar .mud-toolbar {
    min-height: 48px !important;
}

/* Card styling — 12px radius, warm border */
.mud-paper {
    transition: all 150ms ease-out;
    border: 1px solid #1C1E21;
    border-radius: 12px;
}

.mud-paper:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

/* Compact navigation — 32px rows, 16px icons */
.mud-nav-link {
    font-size: 0.8125rem;
    padding: 6px 12px;
    min-height: 32px;
}

.mud-nav-link.active {
    font-weight: 500;
    background: rgba(113, 128, 255, 0.12);
}

.mud-nav-link .mud-icon-root {
    font-size: 1rem;
}

/* Professional badge styling */
.mud-badge {
    font-size: 0.6875rem;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
}

/* Utility classes */
.cursor-pointer {
    cursor: pointer;
}

.text-center {
    text-align: center;
}

/* Validation styles */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #30A46C;
    outline-offset: -1px;
}

.invalid {
    outline: 1px solid #E5484D;
    outline-offset: -1px;
}

.validation-message {
    color: #E5484D;
    font-size: 0.6875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Error boundary */
.blazor-error-boundary {
    background: #E5484D;
    padding: 1rem;
    color: white;
    border-radius: 8px;
    margin: 1rem;
    font-size: 0.8125rem;
}

.blazor-error-boundary::after {
    content: "An error has occurred. Please refresh the page.";
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-active {
    background-color: #30A46C;
}

.status-pending {
    background-color: #F76808;
}

.status-inactive {
    background-color: #4E5157;
}

.status-error {
    background-color: #E5484D;
}

/* Dialog — 12px radius */
.mud-dialog {
    max-width: 800px;
    border-radius: 12px;
}

.mud-dialog-title {
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 16px 20px;
}

.mud-dialog-content {
    font-size: 0.8125rem;
    padding: 12px 20px;
}

.mud-dialog-actions {
    padding: 12px 20px;
    border-top: 1px solid #1C1E21;
}

/* Professional snackbar */
.mud-snackbar {
    font-size: 0.8125rem;
    border-radius: 8px;
}

/* Tabs — compact, rounded, smaller */
.mud-tabs .mud-tab {
    font-size: 0.8125rem;
    font-weight: 500;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 8px;
}

.compact-tabs .mud-tab {
    font-size: 0.8125rem !important;
    font-weight: 500;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 8px;
}

.compact-tabs .mud-tab-label {
    font-size: 0.8125rem !important;
}

.compact-tabs .mud-tabs-toolbar {
    min-height: 36px;
}

/* Skeleton loader */
.mud-skeleton {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
}

/* Compact expansion panel */
.mud-expand-panel-header {
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 12px 16px;
}

.mud-expand-panel-content {
    font-size: 0.8125rem;
}

/* Menu items */
.mud-menu .mud-list-item {
    font-size: 0.8125rem;
    padding: 8px 16px;
}

/* Compact pagination */
.mud-pagination .mud-pagination-item {
    font-size: 0.8125rem;
    min-width: 32px;
    height: 32px;
}

/* Progress indicators */
.mud-progress-linear {
    height: 3px;
}

.mud-progress-circular {
    color: #7180FF;
}

/* Dividers — warm gray */
.mud-divider {
    border-color: #1C1E21;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .mud-drawer {
        width: 100% !important;
    }

    html, body {
        font-size: 13px;
    }
}

/* Standardised page header (Design.txt §6) */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.page-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Print styles */
@media print {
    .mud-appbar,
    .mud-drawer {
        display: none !important;
    }

    .mud-main-content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .mud-table {
        font-size: 10pt;
    }
}

/* Highlight the chosen row in the workflow runner's grid pickers (CaseGrid, etc.) */
.mud-table-row.mv-selected-row,
.mud-table-row.mv-selected-row > .mud-table-cell {
    background-color: rgba(113, 128, 255, 0.18) !important;
    border-left: 3px solid #7180FF !important;
}
