/* ===============================================
   ProcMia - Global Styles
   =============================================== */

/* -- Design Tokens -- */
:root {
    --oecl-primary: #1565C0;
    --oecl-primary-dark: #0D47A1;
    --oecl-primary-light: #42A5F5;
    --oecl-secondary: #FF8F00;
    --oecl-success: #2E7D32;
    --oecl-danger: #C62828;
    --oecl-warning: #F57F17;
    --oecl-info: #0277BD;
    --oecl-bg: #F5F7FA;
    --oecl-surface: #FFFFFF;
    --oecl-text-primary: #212121;
    --oecl-text-secondary: #616161;
    --oecl-border: #E0E0E0;
    --oecl-radius: 8px;
    --oecl-shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --oecl-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --oecl-shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
    --oecl-transition: 0.2s ease;
}

/* -- Base -- */
html, body {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--oecl-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1:focus { outline: none; }

/* -- Card Polish -- */
.mud-card {
    transition: box-shadow var(--oecl-transition), transform var(--oecl-transition) !important;
    border-radius: var(--oecl-radius) !important;
    box-shadow: var(--oecl-shadow-sm) !important;
}

.mud-card:hover {
    box-shadow: var(--oecl-shadow-md) !important;
}

.stat-card {
    cursor: pointer;
}

.stat-card:hover {
    box-shadow: var(--oecl-shadow-hover) !important;
    transform: translateY(-2px);
}

/* -- Card Header -- */
.mud-card-header {
    border-bottom: 1px solid var(--oecl-border);
}

/* -- DataGrid / Table Polish -- */
.mud-table-container {
    border-radius: var(--oecl-radius) !important;
}

.mud-table .mud-table-head .mud-table-cell {
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 0.75rem !important;
    letter-spacing: 0.5px;
    color: var(--oecl-text-secondary) !important;
    background: #FAFBFC !important;
    border-bottom: 2px solid var(--oecl-border) !important;
}

.mud-table .mud-table-body .mud-table-row:hover {
    background-color: rgba(21, 101, 192, 0.04) !important;
}

/* -- DataGrid Pagination -- */
.mud-table-pagination {
    border-top: 1px solid var(--oecl-border);
    padding: 8px 16px !important;
}

/* -- Status Chip -- */
.status-chip {
    text-transform: capitalize;
    font-weight: 500 !important;
    letter-spacing: 0.3px;
}

/* -- NavMenu -- */
.mud-nav-group .mud-nav-link {
    padding-left: 2rem !important;
}

/* -- Page Header -- */
.page-header {
    margin-bottom: 1.5rem;
}

/* -- Breadcrumbs -- */
.mud-breadcrumbs {
    padding: 0 !important;
}

.mud-breadcrumbs .mud-breadcrumb-item {
    font-size: 0.8125rem;
}

/* -- Buttons -- */
.mud-button-root {
    border-radius: var(--oecl-radius) !important;
    transition: all var(--oecl-transition) !important;
}

/* -- Form fields -- */
.mud-input-outlined .mud-input-outlined-border {
    border-radius: var(--oecl-radius) !important;
}

.mud-select .mud-input-outlined .mud-input-outlined-border {
    border-radius: var(--oecl-radius) !important;
}

/* -- Dialog -- */
.mud-dialog {
    border-radius: 12px !important;
}

.mud-dialog .mud-dialog-title {
    font-weight: 600;
}

/* -- Scrollbars (webkit) -- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #C0C0C0;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #A0A0A0;
}

/* -- Drawer -- */
.mud-drawer {
    border-right: none !important;
    box-shadow: none !important;
}

/* -- AppBar -- */
.mud-appbar {
    backdrop-filter: blur(8px);
}

/* -- Chip in table cells -- */
.mud-table .mud-chip {
    margin: 0 !important;
}

/* -- Alert -- */
.mud-alert {
    border-radius: var(--oecl-radius) !important;
}

/* -- Tabs -- */
.mud-tabs-header {
    border-bottom: 1px solid var(--oecl-border);
}

/* -- Page Transition -- */
.mud-main-content {
    animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* -- Snackbar -- */
.mud-snackbar {
    border-radius: var(--oecl-radius) !important;
}

/* -- Tooltip -- */
.mud-tooltip {
    border-radius: 6px !important;
}

/* -- Footer spacing -- */
.mud-appbar[style*="border-top"] {
    margin-top: auto;
}

/* -- Error UI -- */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
