/* ============================================
   ENTERPRISE COMMAND CENTER - FORMS & COMPONENTS
   TeKMediApp v2.0 - Professional UI System
   ============================================ */

/* ============================================
   1. SMART FORM - FLOATING LABELS
   ============================================ */

/* Form Container */
.smart-form {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.smart-form:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.smart-form-header {
    padding: 24px 28px 0;
    border-bottom: none;
}

.smart-form-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.smart-form-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.smart-form-body {
    padding: 24px 28px;
}

.smart-form-footer {
    padding: 20px 28px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 16px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Multi-Column Grid */
.form-grid {
    display: grid;
    gap: 20px;
}

.form-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.form-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .form-grid-3, .form-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .form-grid-2, .form-grid-3, .form-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Form Field Container */
.form-field {
    position: relative;
}

.form-field-full {
    grid-column: 1 / -1;
}

/* Floating Label Enhancements */
.e-float-input.e-control-wrapper,
.e-float-input.e-input-group {
    border-radius: 10px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    transition: all 0.3s ease !important;
}

.e-float-input.e-control-wrapper:hover,
.e-float-input.e-input-group:hover {
    border-color: #94a3b8 !important;
    background: #ffffff !important;
}

.e-float-input.e-control-wrapper.e-input-focus,
.e-float-input.e-input-group.e-input-focus {
    border-color: #3b82f6 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1) !important;
}

.e-float-input .e-float-line::before,
.e-float-input .e-float-line::after {
    background: #3b82f6 !important;
}

.e-float-text {
    color: #64748b !important;
    font-size: 14px !important;
}

.e-label-top .e-float-text,
.e-float-input:not(.e-error) input:focus ~ label.e-float-text,
.e-float-input:not(.e-error) input:valid ~ label.e-float-text {
    color: #3b82f6 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

/* Input styling */
.e-float-input input,
.e-float-input textarea {
    padding: 14px 16px !important;
    font-size: 14px !important;
    color: #0f172a !important;
}

/* ============================================
   2. INLINE VALIDATION
   ============================================ */

.validation-message {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    font-size: 12px;
    font-style: italic;
    animation: shake 0.3s ease-in-out;
}

.validation-message.error {
    color: #ef4444;
}

.validation-message.warning {
    color: #f59e0b;
}

.validation-message.success {
    color: #10b981;
}

.validation-message .material-icons {
    font-size: 14px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Error state */
.e-float-input.e-error .e-float-text,
.e-float-input.e-control-wrapper.e-error input ~ label.e-float-text {
    color: #ef4444 !important;
}

.e-float-input.e-error.e-control-wrapper,
.e-float-input.e-error.e-input-group {
    border-color: #ef4444 !important;
}

.e-float-input.e-error.e-input-focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

/* Success state */
.e-float-input.e-success.e-control-wrapper,
.e-float-input.e-success.e-input-group {
    border-color: #10b981 !important;
}

.e-float-input.e-success .e-float-text {
    color: #10b981 !important;
}

/* ============================================
   3. DROPDOWN LIST ENHANCEMENTS
   ============================================ */

.e-ddl.e-control-wrapper {
    border-radius: 10px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

.e-ddl.e-control-wrapper:hover {
    border-color: #94a3b8 !important;
}

.e-ddl.e-control-wrapper.e-input-focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1) !important;
}

.e-dropdownbase .e-list-item {
    padding: 12px 16px !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
}

.e-dropdownbase .e-list-item.e-active,
.e-dropdownbase .e-list-item.e-hover {
    background: #eff6ff !important;
    color: #3b82f6 !important;
}

.e-popup.e-ddl {
    border-radius: 12px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #e2e8f0 !important;
    overflow: hidden;
}

/* ============================================
   4. POWER-USER GRID ENHANCEMENTS
   ============================================ */

/* Grid Container */
.enterprise-grid-wrapper {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.enterprise-grid-wrapper:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Custom Toolbar */
.enterprise-grid-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(to bottom, #ffffff, #f8fafc);
    border-bottom: 1px solid #e2e8f0;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.toolbar-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.toolbar-badge {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Toolbar Buttons */
.toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toolbar-btn-default {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #475569;
}

.toolbar-btn-default:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.toolbar-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.toolbar-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.toolbar-btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.toolbar-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.toolbar-btn .material-icons {
    font-size: 18px;
}

/* Toolbar Divider */
.toolbar-divider {
    width: 1px;
    height: 24px;
    background: #e2e8f0;
    margin: 0 8px;
}

/* Grid Styling */
.e-grid.e-grid-airy {
    border: none !important;
}

.e-grid.e-grid-airy .e-gridheader {
    background: #f8fafc !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

.e-grid.e-grid-airy .e-headercell {
    background: transparent !important;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 14px 16px !important;
}

.e-grid.e-grid-airy .e-rowcell {
    padding: 16px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    font-size: 14px !important;
    color: #334155 !important;
}

.e-grid.e-grid-airy .e-row:hover .e-rowcell {
    background: #f8fafc !important;
}

.e-grid.e-grid-airy .e-row.e-altrow .e-rowcell {
    background: #fafbfc !important;
}

/* Excel Filter Styling */
.e-excelfilter .e-dlg-content {
    padding: 16px !important;
}

.e-excelfilter .e-ftrchk {
    padding: 8px !important;
}

.e-excelfilter .e-checkboxfiltertext {
    font-size: 13px !important;
}

/* Pager Styling */
.e-grid .e-pager {
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 12px 16px !important;
}

.e-pager .e-numericitem,
.e-pager .e-icons {
    border-radius: 6px !important;
    margin: 0 2px !important;
}

.e-pager .e-numericitem.e-currentitem {
    background: #3b82f6 !important;
    color: white !important;
}

/* ============================================
   5. TOAST NOTIFICATIONS
   ============================================ */

.enterprise-toast-container {
    top: 80px !important;
}

.enterprise-toast {
    border-radius: 12px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
    border: none !important;
    overflow: hidden;
    min-width: 360px !important;
}

.enterprise-toast .e-toast-message {
    padding: 16px 20px !important;
}

.enterprise-toast .e-toast-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-bottom: 4px !important;
}

.toast-content-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.toast-icon {
    font-size: 22px !important;
    flex-shrink: 0;
}

.toast-icon-spin {
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.toast-message {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}

/* Toast Type Variants */
.toast-success {
    border-left: 4px solid #10b981 !important;
}

.toast-error {
    border-left: 4px solid #ef4444 !important;
}

.toast-warning {
    border-left: 4px solid #f59e0b !important;
}

.toast-info {
    border-left: 4px solid #3b82f6 !important;
}

.toast-loading {
    border-left: 4px solid #64748b !important;
}

/* Progress Bar */
.enterprise-toast .e-toast-progress {
    height: 3px !important;
}

.toast-success .e-toast-progress {
    background: #10b981 !important;
}

.toast-error .e-toast-progress {
    background: #ef4444 !important;
}

.toast-warning .e-toast-progress {
    background: #f59e0b !important;
}

.toast-info .e-toast-progress {
    background: #3b82f6 !important;
}

/* ============================================
   6. SKELETON LOADER STYLES
   ============================================ */

.skeleton-wrapper {
    position: relative;
}

.skeleton-wrapper.is-loading {
    pointer-events: none;
}

.skeleton-overlay {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
}

/* Shimmer Animation */
.skeleton-animate {
    background: linear-gradient(
        90deg,
        #f1f5f9 0%,
        #e2e8f0 50%,
        #f1f5f9 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Card Skeleton */
.skeleton-card {
    padding: 24px;
}

.skeleton-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.skeleton-title {
    height: 24px;
    width: 180px;
}

.skeleton-badge {
    height: 24px;
    width: 80px;
    border-radius: 20px;
}

.skeleton-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-line-lg {
    height: 20px;
    width: 100%;
}

.skeleton-line-md {
    height: 16px;
    width: 75%;
}

.skeleton-line-sm {
    height: 14px;
    width: 50%;
}

/* Table Skeleton */
.skeleton-table-wrapper {
    overflow: hidden;
}

.skeleton-table-header {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.skeleton-th {
    height: 14px;
}

.skeleton-table-row {
    display: flex;
    gap: 16px;
    padding: 20px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.skeleton-td {
    height: 16px;
}

/* Chart Skeleton */
.skeleton-chart-wrapper {
    padding: 24px;
}

.skeleton-chart-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
}

.skeleton-legend {
    height: 20px;
    width: 200px;
}

.skeleton-chart-area {
    height: 200px;
    width: 100%;
    border-radius: 12px;
}

/* Form Skeleton */
.skeleton-form-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 24px;
}

.skeleton-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-label {
    height: 12px;
    width: 100px;
}

.skeleton-input {
    height: 48px;
    width: 100%;
}

/* KPI Grid Skeleton - already in enterprise-dashboard.css */

/* List Skeleton */
.skeleton-list-wrapper {
    display: flex;
    flex-direction: column;
}

.skeleton-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.skeleton-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    flex-shrink: 0;
}

.skeleton-list-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Content Fade In */
.skeleton-content.animate-fade-in {
    animation: content-fade-in 0.4s ease-out;
}

@keyframes content-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   7. ANALYTICS CARD STYLES
   ============================================ */

.analytics-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
}

.analytics-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.analytics-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.analytics-card-title-section {
    flex: 1;
}

.analytics-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.analytics-card-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.analytics-card-kpi {
    display: flex;
    align-items: center;
    gap: 16px;
}

.kpi-value-container {
    text-align: right;
}

.kpi-main-value {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

.kpi-unit {
    font-size: 14px;
    color: #64748b;
    margin-left: 4px;
}

.sparkline-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.sparkline-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

.sparkline-trend.up {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.sparkline-trend.down {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.sparkline-trend.flat {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}

.analytics-card-body {
    padding: 16px 20px;
}

.analytics-card-footer {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.analytics-card-actions {
    display: flex;
    gap: 8px;
}

/* ============================================
   8. WORKSPACE BACKGROUND HIERARCHY
   ============================================ */

/* Workspace background - Neutral Gray */
.enterprise-workspace {
    background: #f8fafc;
    min-height: 100vh;
}

/* Component cards - Pure White */
.enterprise-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.enterprise-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ============================================
   9. BUTTON STYLES
   ============================================ */

.btn-enterprise {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-enterprise-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.btn-enterprise-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
}

.btn-enterprise-secondary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.btn-enterprise-secondary:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.btn-enterprise-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-enterprise-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

.btn-enterprise-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-enterprise-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
}

.btn-enterprise .material-icons {
    font-size: 18px;
}

/* ============================================
   10. RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 768px) {
    .enterprise-grid-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .toolbar-right {
        flex-wrap: wrap;
    }

    .analytics-card-header {
        flex-direction: column;
        gap: 16px;
    }

    .analytics-card-kpi {
        width: 100%;
        justify-content: space-between;
    }

    .smart-form-body {
        padding: 16px;
    }

    .form-grid-2, .form-grid-3, .form-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   11. ENTERPRISE PAGE HEADER
   Modern Header with Glassmorphism
   ============================================ */

/* Page Portal Wrappers */
.dashboard-portal,
.patients-portal,
.doctors-portal,
.schedule-portal,
.billing-portal,
.pharmacy-portal {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e8f4f8 100%);
}

.enterprise-page-header {
    position: relative;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0;
    margin-bottom: 24px;
    border-radius: 0 0 20px 20px;
    overflow: hidden;
}

/* Ambient Glow Effect */
.header-ambient-glow {
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

.header-ambient-glow.accent-blue {
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
}

.header-ambient-glow.accent-green {
    background: radial-gradient(circle, #10b981 0%, transparent 70%);
}

.header-ambient-glow.accent-purple {
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
}

.header-ambient-glow.accent-orange {
    background: radial-gradient(circle, #f97316 0%, transparent 70%);
}

.header-ambient-glow.accent-teal {
    background: radial-gradient(circle, #14b8a6 0%, transparent 70%);
}

.header-container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 28px;
    gap: 20px;
    flex-wrap: wrap;
}

/* Left Section */
.header-left-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 0 0 auto;
    min-width: 250px;
}

/* Breadcrumb */
.header-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.breadcrumb-item {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.breadcrumb-item:hover:not(.active) {
    color: #3b82f6;
}

.breadcrumb-item.active {
    color: #0f172a;
    font-weight: 600;
}

.breadcrumb-item.home .material-icons {
    font-size: 18px;
}

.breadcrumb-separator {
    color: #cbd5e1;
    font-size: 12px;
}

/* Title Block */
.header-title-block {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header-icon-wrapper .material-icons {
    font-size: 26px;
    color: white;
}

.header-icon-wrapper.accent-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
}

.header-icon-wrapper.accent-green {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
}

.header-icon-wrapper.accent-purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.25);
}

.header-icon-wrapper.accent-orange {
    background: linear-gradient(135deg, #f97316, #ea580c);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.25);
}

.header-icon-wrapper.accent-teal {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
    box-shadow: 0 8px 20px rgba(20, 184, 166, 0.25);
}

.header-title-content {
    min-width: 0;
}

.header-title {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.header-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    max-width: 300px;
}

/* Stats Section */
.header-stats-section {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    flex: 1 1 auto;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Right Section */
.header-right-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Search */
.header-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search-input {
    width: 280px;
    height: 44px;
    padding: 0 44px;
    font-size: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    transition: all 0.3s ease;
}

.header-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.header-search-input::placeholder {
    color: #94a3b8;
}

.header-search-wrapper .search-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 20px;
    pointer-events: none;
}

.search-clear-btn {
    position: absolute;
    right: 8px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-clear-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.search-clear-btn .material-icons {
    font-size: 16px;
}

/* Actions Wrapper */
.header-actions-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Header Action Buttons */
.header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.header-btn .material-icons {
    font-size: 20px;
}

.header-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.header-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
    transform: translateY(-2px);
}

.header-btn-secondary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.header-btn-secondary:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.header-btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.header-btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
    transform: translateY(-2px);
}

.header-btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.header-btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
    transform: translateY(-2px);
}

.header-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.header-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
    transform: translateY(-2px);
}

.header-btn-icon {
    width: 44px;
    padding: 0;
}

/* Tabs Section */
.header-tabs-section {
    display: flex;
    padding: 0 28px 16px;
    gap: 4px;
    border-top: 1px solid #f1f5f9;
    margin-top: 8px;
    padding-top: 16px;
}

.header-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-tab:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.header-tab.active {
    background: #eff6ff;
    color: #3b82f6;
    font-weight: 600;
}

.header-tab .tab-count {
    background: #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.header-tab.active .tab-count {
    background: #3b82f6;
    color: white;
}

/* ============================================
   12. HEADER STAT BADGE
   ============================================ */

.header-stat-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.header-stat-badge:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.header-stat-badge .stat-icon {
    font-size: 20px;
    color: #64748b;
}

.header-stat-badge .stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-stat-badge .stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
}

.header-stat-badge .stat-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.header-stat-badge .stat-trend {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 6px;
}

.header-stat-badge .stat-trend.up {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.header-stat-badge .stat-trend.down {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.header-stat-badge .stat-trend .trend-icon {
    font-size: 14px;
}

/* Stat Badge Variants */
.header-stat-badge.stat-primary .stat-icon {
    color: #3b82f6;
}

.header-stat-badge.stat-success .stat-icon {
    color: #10b981;
}

.header-stat-badge.stat-warning .stat-icon {
    color: #f59e0b;
}

.header-stat-badge.stat-danger .stat-icon {
    color: #ef4444;
}

.header-stat-badge.stat-info .stat-icon {
    color: #06b6d4;
}

/* ============================================
   13. PAGE BODY CONTAINER
   ============================================ */

.enterprise-page-body {
    padding:0 24px 24px;
    padding-left: 50px;
}

.enterprise-page-body-flush {
    padding: 0;
}

/* Content Cards */
.content-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.content-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.content-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.content-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.content-card-body {
    padding: 20px 24px;
}

.content-card-footer {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

/* ============================================
   14. RESPONSIVE HEADER
   ============================================ */

@media (min-width: 1400px) {
    .header-left-section {
        max-width: 450px;
    }
}

@media (max-width: 1200px) {
    .header-left-section {
        max-width: 320px;
    }
    
    .header-container {
        flex-wrap: wrap;
    }
    
    .header-stats-section {
        order: 3;
        width: 100%;
        padding: 16px 0 0;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 768px) {
    .enterprise-page-header {
        margin-bottom: 16px;
    }
    
    .header-container {
        padding: 16px 20px;
        gap: 16px;
    }
    
    .header-title-block {
        gap: 12px;
    }
    
    .header-icon-wrapper {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }
    
    .header-icon-wrapper .material-icons {
        font-size: 22px;
    }
    
    .header-title {
        font-size: 20px;
    }
    
    .header-subtitle {
        font-size: 13px;
    }
    
    .header-right-section {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .header-search-wrapper {
        width: 100%;
    }
    
    .header-search-input {
        width: 100%;
    }
    
    .header-actions-wrapper {
        width: 100%;
        justify-content: flex-end;
    }
    
    .header-btn {
        flex: 1;
        justify-content: center;
    }
    
    .header-btn-icon {
        flex: 0 0 44px;
    }
    
    .header-tabs-section {
        padding: 12px 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .header-tab {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .header-stat-badge {
        padding: 8px 12px;
    }
    
    .header-stat-badge .stat-value {
        font-size: 16px;
    }
}
