html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

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

.validation-message {
    color: #e50000;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    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;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjc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TQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.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;
}

.status-bar-safe-area {
    display: none;
}

@supports (-webkit-touch-callout: none) {
    .status-bar-safe-area {
        display: flex;
        position: sticky;
        top: 0;
        height: env(safe-area-inset-top);
        background-color: #f7f7f7;
        width: 100%;
        z-index: 1;
    }

    .flex-column, .navbar-brand {
        padding-left: env(safe-area-inset-left);
    }
}

/* --- ERP Standard Styles Merged --- */

h1,h2,h3,h4,h5,h6 {
    font-family: 'Montserrat', 'Inter', sans-serif;
    font-weight: 600;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(128, 128, 128, 0.4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(128, 128, 128, 0.6); }

/* Glassmorphism Utilities */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
    background: rgba(20, 26, 38, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Transitions */
.mud-paper, .mud-card, .mud-button, .mud-icon-button { transition: all 0.3s ease-in-out; }
.mud-nav-link:hover { padding-left: 20px !important; }
.mud-nav-link { transition: padding-left 0.2s ease; }

/* Snackbar Fixes */
.mud-snackbar-content, .mud-snackbar-close-button, .mud-snackbar { pointer-events: auto !important; }

/* Login Page and Inputs */
.custom-input .mud-input-outlined-border { border-color: rgba(255, 255, 255, 0.2) !important; }
.custom-input:hover .mud-input-outlined-border { border-color: rgba(255, 255, 255, 0.4) !important; }
.custom-input.mud-input-control.mud-input-input-control.mud-input-focused .mud-input-outlined-border { border-color: #00BCD4 !important; box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.2); }
.custom-input input, .custom-input label, .custom-input .mud-input-adornment-icon { color: rgba(255, 255, 255, 0.9) !important; }


/* --- Unified CRM Glassmorphic Page Layout --- */

.inventory-container {
	padding: 24px;
	width: 100%;
	min-height: calc(100vh - var(--mud-appbar-height) - 48px);
	display: flex;
	flex-direction: column;
	font-family: 'Outfit', sans-serif;
}

.inventory-container .mud-grid-transparent {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

.inventory-container .mud-grid-transparent > .mud-table-container {
	flex-grow: 1;
}


.inventory-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 24px;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-radius: 16px;
	margin-bottom: 24px;
}

.header-info {
	display: flex;
	flex-direction: column;
}

.header-title {
	font-size: 28px;
	font-weight: 700;
	margin: 0;
}

.header-subtitle {
	font-size: 14px;
	margin: 4px 0 0 0;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.filters-panel {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	padding: 20px;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-radius: 16px;
	margin-bottom: 24px;
	align-items: center;
}

.search-box {
	display: flex;
	align-items: center;
	flex: 1;
	min-width: 280px;
	border-radius: 12px;
	padding: 8px 16px;
	gap: 12px;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input {
	flex: 1;
	background: transparent;
	border: none;
	outline: none;
	font-size: 14px;
}

.select-filters {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

.filter-group {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.filter-label {
	font-size: 11px;
	text-transform: uppercase;
	font-weight: 700;
	letter-spacing: 0.5px;
	padding-left: 4px;
}

.filter-select {
	border-radius: 12px;
	padding: 8px 16px;
	font-size: 14px;
	outline: none;
	min-width: 160px;
	cursor: pointer;
	transition: border-color 0.2s;
}

.mud-grid-transparent {
	background: transparent !important;
	border-radius: 16px !important;
	overflow: hidden;
}

/* Dialog Glassmorphic styling */
.custom-glass-dialog {
	background: var(--mud-palette-surface) !important;
	border: 1px solid var(--mud-palette-lines-default) !important;
	border-radius: 16px !important;
}

.dialog-title-text {
	font-weight: 700;
	background: linear-gradient(135deg, var(--mud-palette-text-primary) 0%, var(--mud-palette-primary) 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

/* --- Dark Theme Rules (Inherited) --- */
.dark-theme .inventory-container {
	color: #ffffff;
}

.dark-theme .inventory-header {
	background: rgba(20, 26, 38, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.05);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.dark-theme .header-title {
	background: linear-gradient(135deg, #ffffff 0%, #00BCD4 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.dark-theme .header-subtitle {
	color: rgba(255, 255, 255, 0.6);
}

.dark-theme .filters-panel {
	background: rgba(20, 26, 38, 0.4);
	border: 1px solid rgba(255, 255, 255, 0.05);
}

.dark-theme .search-box {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.dark-theme .search-box:focus-within {
	border-color: #00BCD4;
	box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.15);
}

.dark-theme .search-icon {
	color: rgba(255, 255, 255, 0.4);
}

.dark-theme .search-input {
	color: #ffffff;
}

.dark-theme .search-input::placeholder {
	color: rgba(255, 255, 255, 0.4);
}

.dark-theme .filter-label {
	color: rgba(255, 255, 255, 0.4);
}

.dark-theme .filter-select {
	background: rgba(20, 26, 38, 0.8);
	border: 1px solid rgba(255, 255, 255, 0.08);
	color: #ffffff;
}

.dark-theme .filter-select option {
	background: rgba(20, 26, 38, 0.95);
	color: #ffffff;
}

.dark-theme .filter-select:focus {
	border-color: #00BCD4;
}

.dark-theme .mud-grid-transparent {
	border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* --- Light Theme Rules (Inherited) --- */
.light-theme .inventory-container {
	color: #2D3748;
}

.light-theme .inventory-header {
	background: rgba(255, 255, 255, 0.7);
	border: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.light-theme .header-title {
	background: linear-gradient(135deg, #2D3748 0%, #00ACC1 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.light-theme .header-subtitle {
	color: #718096;
}

.light-theme .filters-panel {
	background: rgba(255, 255, 255, 0.5);
	border: 1px solid rgba(0, 0, 0, 0.08);
}

.light-theme .search-box {
	background: rgba(0, 0, 0, 0.02);
	border: 1px solid rgba(0, 0, 0, 0.1);
}

.light-theme .search-box:focus-within {
	border-color: #00ACC1;
	box-shadow: 0 0 0 2px rgba(0, 172, 193, 0.15);
}

.light-theme .search-icon {
	color: #718096;
}

.light-theme .search-input {
	color: #2D3748;
}

.light-theme .search-input::placeholder {
	color: #a0aec0;
}

.light-theme .filter-label {
	color: #718096;
}

.light-theme .filter-select {
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.1);
	color: #2D3748;
}

.light-theme .filter-select option {
	background: #ffffff;
	color: #2D3748;
}

.light-theme .filter-select:focus {
	border-color: #00ACC1;
}

.light-theme .mud-grid-transparent {
	background: #ffffff !important;
	border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.light-theme .mud-grid-transparent .mud-table-row {
	color: #2D3748 !important;
}

.light-theme .mud-grid-transparent .mud-table-cell {
	color: #2D3748 !important;
}

.loading-state, .empty-state {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 80px 24px;
	background: rgba(20, 26, 38, 0.4);
	backdrop-filter: blur(8px);
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, 0.05);
	text-align: center;
}

.loading-text {
	font-size: 16px;
	color: rgba(255, 255, 255, 0.6);
}

.empty-icon {
	font-size: 64px !important;
	color: rgba(255, 255, 255, 0.1) !important;
	margin-bottom: 16px;
}

.empty-title {
	font-size: 20px;
	font-weight: 600;
	margin: 0 0 8px 0;
}

.empty-subtitle {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.5);
	max-width: 360px;
	margin: 0;
}

/* --- Browser Autofill Custom Styling --- */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
	-webkit-box-shadow: 0 0 0 1000px var(--mud-palette-surface) inset !important;
	-webkit-text-fill-color: var(--mud-palette-text-primary) !important;
	caret-color: var(--mud-palette-text-primary) !important;
	transition: background-color 5000s ease-in-out 0s;
}

/* ======================================================= */
/* PREMIUM DRAWER FOR DETAILS PANELS                      */
/* ======================================================= */
.crm-premium-drawer {
	background-color: rgba(20, 26, 38, 0.95) !important;
	backdrop-filter: blur(12px) !important;
	color: #f8fafc !important;
	border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.drawer-header-glass {
	background: linear-gradient(135deg, #0A0D14 0%, #141A26 100%) !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Overrides para cabeceras de tablas en modo oscuro */
.dark-theme .mud-table-head .mud-table-cell {
	background-color: transparent !important;
}

.drawer-content {
	max-height: calc(100vh - 70px) !important;
	overflow-y: auto !important;
}

/* Custom Scrollbar for premium feeling */
.drawer-content::-webkit-scrollbar {
	width: 6px !important;
}
.drawer-content::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.02) !important;
}
.drawer-content::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.15) !important;
	border-radius: 3px !important;
}
.drawer-content::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 255, 255, 0.3) !important;
}

.profile-card {
	padding: 1.5rem 1rem !important;
	background: rgba(255, 255, 255, 0.03) !important;
	border: 1px solid rgba(255, 255, 255, 0.05) !important;
	border-radius: 12px !important;
}

.profile-name {
	font-weight: 700 !important;
	color: #ffffff !important;
	letter-spacing: -0.5px !important;
}

.profile-title {
	color: #94a3b8 !important;
	font-weight: 500 !important;
}

.section-title {
	font-weight: 600 !important;
	color: #f1f5f9 !important;
	margin-bottom: 12px !important;
	text-transform: uppercase !important;
	letter-spacing: 0.5px !important;
	font-size: 0.8rem !important;
}

.section-content {
	color: #cbd5e1 !important;
	line-height: 1.6 !important;
}

.info-list {
	display: flex !important;
	flex-direction: column !important;
	gap: 12px !important;
}

.info-item {
	display: flex !important;
	align-items: flex-start !important;
	gap: 12px !important;
}

.info-icon {
	color: #60a5fa !important;
	margin-top: 2px !important;
}

.info-details {
	display: flex !important;
	flex-direction: column !important;
}

.info-label {
	font-size: 0.75rem !important;
	color: #94a3b8 !important;
}

.info-value {
	font-size: 0.875rem !important;
	color: #f8fafc !important;
	font-weight: 500 !important;
}

.crm-tag {
	background-color: rgba(59, 130, 246, 0.1) !important;
	border: 1px solid rgba(59, 130, 246, 0.2) !important;
	color: #60a5fa !important;
	font-weight: 500 !important;
}
