/* ============================================
   MINZO UI COMPONENTS - Modern Design System
   Bootstrap 5 + Material Icons
   ============================================ */

/* Global Font Settings */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #1c1e21;
    background: #ffffff;
    font-weight: 400;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.3;
    color: #111827;
    letter-spacing: -0.02em;
}

h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.75rem; font-weight: 700; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; font-weight: 600; }

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a {
    color: var(--mz-primary);
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

a:hover {
    color: var(--mz-primary-dark);
    text-decoration: underline;
}

:root {
    /* Primary Colors - Violet Theme */
    --mz-primary: #6200EA;
    --mz-primary-dark: #5300CC;
    --mz-primary-light: #7C4DFF;

    /* Secondary - Orange (uso limitato) */
    --mz-secondary-orange: #FF6B35;

    /* Success Colors */
    --mz-success: #10b981;
    --mz-success-dark: #059669;
    --mz-success-light: #34d399;

    /* Danger Colors */
    --mz-danger: #ef4444;
    --mz-danger-dark: #dc2626;
    --mz-danger-light: #f87171;

    /* Warning Colors */
    --mz-warning: #f59e0b;
    --mz-warning-dark: #d97706;
    --mz-warning-light: #fbbf24;

    /* Info Colors */
    --mz-info: #3b82f6;
    --mz-info-dark: #2563eb;
    --mz-info-light: #60a5fa;

    /* Neutral Colors */
    --mz-gray-50: #f9fafb;
    --mz-gray-100: #f3f4f6;
    --mz-gray-200: #e5e7eb;
    --mz-gray-300: #d1d5db;
    --mz-gray-400: #9ca3af;
    --mz-gray-500: #6b7280;
    --mz-gray-600: #4b5563;
    --mz-gray-700: #374151;
    --mz-gray-800: #1f2937;
    --mz-gray-900: #111827;

    /* Shadows */
    --mz-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --mz-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --mz-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --mz-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --mz-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --mz-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --mz-transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius */
    --mz-radius: 0.5rem;
    --mz-radius-sm: 0.25rem;
    --mz-radius-lg: 0.75rem;
    --mz-radius-xl: 1rem;
    --mz-radius-full: 9999px;
}

/* ============================================
   MZ BUTTON
   ============================================ */

.mz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    border-radius: var(--mz-radius);
    border: none;
    cursor: pointer;
    transition: var(--mz-transition);
    box-shadow: var(--mz-shadow-sm);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.mz-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--mz-shadow-md);
}

.mz-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: var(--mz-shadow-sm);
}

.mz-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.mz-btn .material-icons {
    font-size: 1.25rem;
}

/* Button Variants */
.mz-btn-primary {
    background: var(--mz-primary);
    color: white;
}

.mz-btn-primary:hover:not(:disabled) {
    background: var(--mz-primary-dark);
}

.mz-btn-secondary {
    background: var(--mz-gray-200);
    color: var(--mz-gray-800);
}

.mz-btn-secondary:hover:not(:disabled) {
    background: var(--mz-gray-300);
}

.mz-btn-success {
    background: var(--mz-success);
    color: white;
}

.mz-btn-success:hover:not(:disabled) {
    background: var(--mz-success-dark);
}

.mz-btn-danger {
    background: var(--mz-danger);
    color: white;
}

.mz-btn-danger:hover:not(:disabled) {
    background: var(--mz-danger-dark);
}

.mz-btn-warning {
    background: var(--mz-warning);
    color: white;
}

.mz-btn-warning:hover:not(:disabled) {
    background: var(--mz-warning-dark);
}

.mz-btn-info {
    background: var(--mz-info);
    color: white;
}

.mz-btn-info:hover:not(:disabled) {
    background: var(--mz-info-dark);
}

.mz-btn-light {
    background: white;
    color: var(--mz-gray-700);
    border: 1px solid var(--mz-gray-300);
}

.mz-btn-light:hover:not(:disabled) {
    background: var(--mz-gray-50);
}

.mz-btn-dark {
    background: var(--mz-gray-800);
    color: white;
}

.mz-btn-dark:hover:not(:disabled) {
    background: var(--mz-gray-900);
}

/* Button Icon Only */
.mz-btn-icon {
    padding: 0.5rem;
    gap: 0;
}

.mz-btn-icon .material-icons {
    font-size: 1.25rem;
}

.mz-btn-icon.mz-btn-sm {
    padding: 0.375rem;
}

.mz-btn-icon.mz-btn-sm .material-icons {
    font-size: 1.125rem;
}

/* Button Sizes */
.mz-btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.mz-btn-sm .material-icons {
    font-size: 1.125rem;
}

.mz-btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.mz-btn-lg .material-icons {
    font-size: 1.5rem;
}

/* Button Loading State */
.mz-btn-loading {
    position: relative;
    pointer-events: none;
}

.mz-btn-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: mz-spin 0.6s linear infinite;
}

@keyframes mz-spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   FORM CONTROLS
   ============================================ */

.form-control, .form-select {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: #1c1e21;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #dadde1;
    border-radius: 6px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    color: #1c1e21;
    background-color: #fff;
    border-color: var(--mz-primary);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(98, 0, 234, 0.25);
}

.form-control::placeholder {
    color: #65676b;
    opacity: 1;
}

.form-label {
    display: inline-block;
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
    letter-spacing: -0.01em;
}

.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.125rem;
    vertical-align: top;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid #dadde1;
    border-radius: 0.25rem;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-check-input:checked {
    background-color: var(--mz-primary);
    border-color: var(--mz-primary);
}

.form-check-input:focus {
    border-color: var(--mz-primary);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(98, 0, 234, 0.25);
}

.form-check-label {
    font-size: 0.875rem;
    color: #1c1e21;
    margin-left: 0.5rem;
}

/* Spinner/Loading */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: -0.125em;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

.text-primary { color: var(--mz-primary) !important; }
.text-success { color: var(--mz-success) !important; }
.text-danger { color: var(--mz-danger) !important; }
.text-warning { color: var(--mz-warning) !important; }
.text-info { color: var(--mz-info) !important; }
.text-muted { color: #65676b !important; }

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ============================================
   MZ TABLE
   ============================================ */

.mz-table-container {
    background: white;
    border-radius: var(--mz-radius-lg);
    box-shadow: var(--mz-shadow-md);
    overflow: hidden;
}

.mz-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--mz-gray-200);
    gap: 1rem;
    flex-wrap: wrap;
}

.mz-table-search {
    position: relative;
    flex: 1;
    max-width: 400px;
}

    .mz-table-search .material-icons {
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--mz-gray-400);
        font-size: 1.25rem;
    }

    .mz-table-search .form-control {
        padding-left: 2.5rem;
    }

.mz-table-scroll {
    overflow-x: auto;
}

.mz-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

    .mz-table thead {
        background: #f9fafb;
        color: var(--mz-gray-700);
        border-bottom: 2px solid #e5e7eb;
        position: sticky;
        top: 0;
        z-index: 10;
    }

        .mz-table thead th {
            padding: 0.75rem 1rem;
            font-weight: 600;
            text-align: left;
            font-size: 0.6875rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            border: none;
        }

    .mz-table tbody tr {
        border-bottom: 1px solid var(--mz-gray-100);
        transition: var(--mz-transition-fast);
    }

        .mz-table tbody tr:hover {
            background-color: var(--mz-gray-50);
        }

        .mz-table tbody tr:last-child {
            border-bottom: none;
        }

    .mz-table tbody td {
        padding: 0.75rem 1rem;
        vertical-align: middle;
        position: relative;
    }

.mz-table-row-clickable {
    cursor: pointer;
}

    .mz-table-row-clickable:hover {
        background-color: #f5f5f5 !important;
    }

.mz-table-row-draggable {
    cursor: move;
}

.mz-table-row-dragging {
    opacity: 0.5;
    background-color: var(--mz-gray-100) !important;
}

.mz-table-row-dragover {
    border-top: 2px solid var(--mz-primary);
    background-color: rgba(98, 0, 234, 0.05) !important;
}

.mz-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--mz-gray-200);
    flex-wrap: wrap;
    gap: 1rem;
}

.mz-table-info {
    font-size: 0.875rem;
    color: var(--mz-gray-600);
}

.mz-table-pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mz-pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--mz-radius);
    border: 1px solid var(--mz-gray-300);
    background: white;
    color: var(--mz-gray-700);
    cursor: pointer;
    transition: var(--mz-transition-fast);
}

    .mz-pagination-btn:hover:not(:disabled) {
        background: var(--mz-gray-50);
        border-color: var(--mz-primary);
        color: var(--mz-primary);
    }

    .mz-pagination-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

.mz-pagination-info {
    padding: 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mz-gray-700);
}

/* ============================================
   MZ CARD
   ============================================ */

.mz-card {
    background: white;
    border-radius: var(--mz-radius-lg);
    box-shadow: var(--mz-shadow-md);
    overflow: hidden;
}

.mz-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1.5rem;
    background: white;
    color: var(--mz-gray-900);
    border-bottom: 1px solid var(--mz-gray-200);
}

.mz-card-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    flex: 1;
    letter-spacing: -0.02em;
}

.mz-card-actions {
    display: flex;
    gap: 0.5rem;
}

.mz-card-body {
    padding: 1.5rem;
}

.mz-card-footer {
    padding: 1rem 1.5rem;
    background: var(--mz-gray-50);
    border-top: 1px solid var(--mz-gray-200);
}
/* ============================================
   MZ CARD
   ============================================ */

.mz-card {
    background: white;
    border-radius: var(--mz-radius-lg);
    box-shadow: var(--mz-shadow-md);
    overflow: hidden;
}

.mz-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1.5rem;
    background: white;
    color: var(--mz-gray-900);
    border-bottom: 1px solid var(--mz-gray-200);
}

.mz-card-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    flex: 1;
    letter-spacing: -0.02em;
}

.mz-card-actions {
    display: flex;
    gap: 0.5rem;
}

.mz-card-body {
    padding: 1.5rem;
}

.mz-card-footer {
    padding: 1rem 1.5rem;
    background: var(--mz-gray-50);
    border-top: 1px solid var(--mz-gray-200);
}

/* ============================================
   MZ BADGE
   ============================================ */

.mz-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mz-badge-icon {
    font-size: 1rem !important;
}

.mz-badge-primary {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.mz-badge-secondary {
    background: #f9fafb;
    color: var(--mz-gray-700);
    border: 1px solid #e5e7eb;
}

.mz-badge-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.mz-badge-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.mz-badge-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.mz-badge-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.mz-badge-light {
    background: white;
    color: var(--mz-gray-700);
    border: 1px solid var(--mz-gray-300);
}

.mz-badge-dark {
    background: var(--mz-gray-800);
    color: white;
}

/* ============================================
   MZ MODAL
   ============================================ */

.mz-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mz-modal-backdrop.show {
    opacity: 1;
}

.mz-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mz-modal.show {
    opacity: 1;
    pointer-events: all;
}

.mz-modal-dialog {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.mz-modal-sm {
    max-width: 300px;
}

.mz-modal-lg {
    max-width: 800px;
}

.mz-modal-xl {
    max-width: 1140px;
}

.mz-modal-content {
    background: white;
    border-radius: var(--mz-radius-xl);
    box-shadow: var(--mz-shadow-xl);
    display: flex;
    flex-direction: column;
    max-height: 100%;
    pointer-events: auto;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.mz-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    border-radius: var(--mz-radius-xl) var(--mz-radius-xl) 0 0;
}

.mz-modal-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    color: var(--mz-gray-900);
    gap: 0.5rem;
    letter-spacing: -0.02em;
}

.mz-modal-title .material-icons {
    font-size: 1.25rem;
    color: var(--mz-gray-600);
}

.mz-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    color: var(--mz-gray-600);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.mz-modal-close:hover {
    background: #f3f4f6;
    color: var(--mz-gray-900);
}

.mz-modal-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    color: var(--mz-gray-600);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.mz-modal-back:hover {
    background: #f3f4f6;
    color: var(--mz-gray-900);
}

.mz-modal-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.mz-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--mz-gray-200);
}

/* ============================================
   FORM CONTROLS
   ============================================ */

.form-control,
.form-select {
    border-radius: var(--mz-radius);
    border: 1px solid var(--mz-gray-300);
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    transition: var(--mz-transition-fast);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--mz-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.form-label {
    font-weight: 500;
    font-size: 0.8125rem;
    color: var(--mz-gray-700);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

/* ============================================
   INLINE EDITING
   ============================================ */

.inline-edit-form {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    min-width: 100%;
    z-index: 100;
}

.inline-edit-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.375rem 0.5rem;
    border-radius: 6px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 2px solid var(--mz-primary);
    min-width: max-content;
}

.inline-edit-container .form-control {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
    font-size: 0.8125rem;
    padding: 0.375rem 0.625rem;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}

.inline-edit-container .form-control:focus {
    background: white;
    border-color: var(--mz-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.inline-edit-container input[type="number"] {
    min-width: 150px;
    max-width: 200px;
}

.inline-edit-container input[type="date"],
.inline-edit-container input[type="datetime-local"] {
    min-width: 180px;
    max-width: 220px;
}

.inline-edit-container .form-check {
    min-width: auto;
}

.inline-edit-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.inline-edit-actions .mz-btn {
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.editable-field {
    cursor: pointer;
    padding: 0.375rem 0.625rem;
    border-radius: 6px;
    transition: var(--mz-transition-fast);
    background: white;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.editable-field:hover {
    background: #f9fafb;
    border-color: var(--mz-gray-400);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.editable-field .material-icons {
    font-size: 0.875rem;
    opacity: 0.4;
    transition: opacity 0.2s ease;
    color: var(--mz-gray-500);
}

.editable-field:hover .material-icons {
    opacity: 1;
    color: var(--mz-gray-700);
}

.readonly-field {
    padding: 0.375rem 0.625rem;
    border-radius: 6px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--mz-gray-600);
    width: 100%;
}

.readonly-field .material-icons {
    font-size: 0.875rem;
    color: var(--mz-gray-400);
}

/* ============================================
   DROPDOWN MENU
   ============================================ */

.mz-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.25rem;
    background: white;
    border-radius: 6px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    min-width: 150px;
    z-index: 1000;
    overflow: hidden;
}

.mz-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.625rem 1rem;
    border: none;
    background: white;
    color: var(--mz-gray-700);
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
    transition: var(--mz-transition-fast);
}

.mz-dropdown-item:hover {
    background: #f9fafb;
}

.mz-dropdown-item .material-icons {
    font-size: 1.125rem;
    color: var(--mz-gray-600);
}

.mz-dropdown-item-danger {
    color: var(--mz-danger);
}

.mz-dropdown-item-danger:hover {
    background: #fef2f2;
}

.mz-dropdown-item-danger .material-icons {
    color: var(--mz-danger);
}

/* ============================================
   UTILITIES
   ============================================ */

/* ============================================
   DASHBOARD SUMMARY CARDS
   ============================================ */

.mz-summary-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--mz-gray-300);
    border-top: 1px solid var(--mz-gray-200);
    border-right: 1px solid var(--mz-gray-200);
    border-bottom: 1px solid var(--mz-gray-200);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mz-summary-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mz-summary-card-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mz-gray-600);
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mz-summary-card-title .material-icons {
    font-size: 1.125rem;
    color: var(--mz-gray-500);
}

.mz-summary-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--mz-gray-900);
    line-height: 1.1;
}

/* Variant Colors */
.mz-summary-card-primary {
    border-left-color: var(--mz-primary);
}

.mz-summary-card-primary .mz-summary-card-title .material-icons {
    color: var(--mz-primary);
}

.mz-summary-card-primary .mz-summary-card-value {
    color: var(--mz-primary);
}

.mz-summary-card-success {
    border-left-color: var(--mz-success);
}

.mz-summary-card-success .mz-summary-card-title .material-icons {
    color: var(--mz-success);
}

.mz-summary-card-success .mz-summary-card-value {
    color: var(--mz-success);
}

.mz-summary-card-info {
    border-left-color: var(--mz-info);
}

.mz-summary-card-info .mz-summary-card-title .material-icons {
    color: var(--mz-info);
}

.mz-summary-card-info .mz-summary-card-value {
    color: var(--mz-info);
}

.mz-summary-card-warning {
    border-left-color: var(--mz-warning);
}

.mz-summary-card-warning .mz-summary-card-title .material-icons {
    color: var(--mz-warning);
}

.mz-summary-card-warning .mz-summary-card-value {
    color: var(--mz-warning);
}

/* Skeleton Loading */
.mz-summary-card-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: var(--mz-radius-lg);
    height: 120px;
    box-shadow: var(--mz-shadow-md);
}

.mz-skeleton-text {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive Summary Cards */
@media (max-width: 768px) {
    .mz-summary-card {
        min-height: 100px;
        padding: 1rem;
    }

    .mz-summary-card-icon {
        width: 48px;
        height: 48px;
    }

    .mz-summary-card-icon .material-icons {
        font-size: 1.5rem;
    }

    .mz-summary-card-title {
        font-size: 0.75rem;
    }

    .mz-summary-card-value {
        font-size: 1.5rem;
    }
}

.mz-shadow-sm {
    box-shadow: var(--mz-shadow-sm);
}

.mz-shadow {
    box-shadow: var(--mz-shadow);
}

.mz-shadow-md {
    box-shadow: var(--mz-shadow-md);
}

.mz-shadow-lg {
    box-shadow: var(--mz-shadow-lg);
}

.mz-shadow-xl {
    box-shadow: var(--mz-shadow-xl);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes mz-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mz-fade-in {
    animation: mz-fade-in 0.3s ease-out;
}

@keyframes mz-slide-in {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.mz-slide-in {
    animation: mz-slide-in 0.3s ease-out;
}

/* ============================================
   TABS
   ============================================ */

.mz-tabs {
    width: 100%;
}

.mz-tabs-nav {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    border-bottom: 2px solid var(--mz-border-color);
}

.mz-tabs-nav-item {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #64748b;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: var(--mz-transition);
    user-select: none;
}

.mz-tabs-nav-item:hover {
    color: var(--mz-primary);
    background: rgba(102, 126, 234, 0.05);
}

.mz-tabs-nav-item.active {
    color: var(--mz-primary);
    border-bottom-color: var(--mz-primary);
    font-weight: 600;
}

.mz-tabs-nav-item .material-icons {
    font-size: 1.25rem;
}

.mz-tabs-content {
    padding: 1rem 0;
}

/* ============================================
   FACEBOOK BUSINESS MANAGER LAYOUT
   ============================================ */

.mz-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: #ffffff;
}

/* Header - FB Style */
.mz-header {
    height: 56px;
    background: white;
    color: #1c1e21;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 .5rem;
    border-bottom: 1px solid #dadde1;
    z-index: 1000;
}

.mz-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mz-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mz-sidebar-toggle {
    background: #ffffff;
    border: none;
    color: #050505;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--mz-transition);
    width: 40px;
    height: 40px;
}

.mz-sidebar-toggle:hover {
    background: #e4e6eb;
}

.mz-header-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.25rem;
    font-weight: 700;
    margin-left: 0.5rem;
}

.mz-header-brand .material-icons {
    font-size: 1.75rem;
    color: var(--mz-primary);
}

.mz-header-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1c1e21;
}

.mz-company-selector {
    position: relative;
    min-width: 160px;
}

.mz-company-selector-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.375rem 0.625rem;
    border-radius: 6px;
    border: 1px solid #dadde1;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.8125rem;
}

.mz-company-selector-trigger:hover {
    border-color: var(--mz-primary);
    box-shadow: 0 0 0 2px rgba(98, 0, 234, 0.1);
}

.mz-company-selector-trigger .material-icons {
    font-size: 1rem;
    color: var(--mz-gray-600);
}

.mz-company-selector-text {
    flex: 1;
    font-weight: 600;
    color: var(--mz-gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.mz-company-selector-arrow {
    font-size: 1rem;
    color: var(--mz-gray-600);
    transition: transform 0.2s ease;
}

.mz-company-selector.open .mz-company-selector-arrow {
    transform: rotate(180deg);
}

.mz-company-selector-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: white;
    border: 1px solid #dadde1;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    width: 260px;
    max-height: 360px;
    overflow: hidden;
    z-index: 1050;
    display: none;
}

.mz-company-selector.open .mz-company-selector-dropdown {
    display: block;
    animation: dropdownFadeIn 0.15s ease;
}

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

.mz-company-selector-search {
    padding: 0.75rem;
    border-bottom: 1px solid #dadde1;
    position: relative;
}

.mz-company-selector-search input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid #dadde1;
    border-radius: 6px;
    font-size: 0.8125rem;
}

.mz-company-selector-search input:focus {
    outline: none;
    border-color: var(--mz-primary);
    box-shadow: 0 0 0 2px rgba(98, 0, 234, 0.1);
}

.mz-company-selector-search input::placeholder {
    color: var(--mz-gray-400);
}

.mz-company-selector-search .material-icons {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--mz-gray-400);
    pointer-events: none;
}

.mz-company-selector-list {
    max-height: 260px;
    overflow-y: auto;
    padding: 0.375rem;
}

.mz-company-selector-list::-webkit-scrollbar {
    width: 6px;
}

.mz-company-selector-list::-webkit-scrollbar-track {
    background: transparent;
}

.mz-company-selector-list::-webkit-scrollbar-thumb {
    background: var(--mz-gray-300);
    border-radius: 3px;
}

.mz-company-selector-list::-webkit-scrollbar-thumb:hover {
    background: var(--mz-gray-400);
}

.mz-company-selector-item {
    padding: 0.5rem 0.625rem;
    cursor: pointer;
    border-radius: 5px;
    font-size: 0.8125rem;
    transition: background 0.1s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mz-company-selector-item:hover {
    background: #f5f5f5;
}

.mz-company-selector-item.active {
    background: rgba(98, 0, 234, 0.08);
    color: var(--mz-primary);
    font-weight: 600;
}

.mz-company-selector-item .material-icons {
    font-size: 0.9375rem;
    color: var(--mz-gray-500);
}

.mz-company-selector-item.active .material-icons {
    color: var(--mz-primary);
}

/* Layout Body */
.mz-layout-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar - FB Style */
.mz-sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #dadde1;
    display: flex;
    flex-direction: column;
    transition: width 0.2s ease;
    overflow: hidden;
}

.mz-sidebar.collapsed {
    width: 56px;
}

.mz-sidebar.collapsed .mz-nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.mz-sidebar-nav {
    flex: 1;
    padding: 0.5rem;
    overflow-y: auto;
}

.mz-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.5rem;
    margin-bottom: 2px;
    border-radius: 8px;
    color: #050505;
    text-decoration: none;
    transition: background-color 0.1s ease;
    font-weight: 500;
    font-size: 0.9375rem;
    white-space: nowrap;
}

.mz-nav-item:hover {
    background: #f5f5f5;
    text-decoration: none;
}

.mz-nav-item.active {
    background: rgba(98, 0, 234, 0.08);
    color: var(--mz-primary);
}

.mz-nav-item.active .material-icons {
    color: var(--mz-primary);
}

.mz-nav-item .material-icons {
    font-size: 1.25rem;
    min-width: 24px;
    color: #65676b;
}

.mz-nav-text {
    transition: opacity 0.2s ease, width 0.2s ease;
    white-space: nowrap;
}

.mz-sidebar-footer {
    padding: 0.5rem;
    border-top: 1px solid #dadde1;
}

.mz-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.5rem;
    margin-bottom: 2px;
    border-radius: 8px;
    background: #ffffff;
    font-size: 0.8125rem;
    color: #050505;
    white-space: nowrap;
    overflow: hidden;
}

.mz-user-info .material-icons {
    font-size: 1.25rem;
    color: #65676b;
    min-width: 24px;
}

.mz-logout-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem 0.5rem;
    margin-bottom: 2px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #050505;
    font-weight: 500;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background-color 0.1s ease;
    white-space: nowrap;
}

.mz-logout-btn:hover {
    background: #ffffff;
}

.mz-logout-btn .material-icons {
    font-size: 1.25rem;
    min-width: 24px;
    color: #65676b;
}

.mz-version {
    text-align: center;
    padding: 0.5rem;
    font-size: 0.6875rem;
    color: #65676b;
    white-space: nowrap;
}

/* Main Content - FB Style */
.mz-main {
    flex: 1;
    overflow-y: auto;
    background: #ffffff;
    padding: 1rem;
}

/* FB Page Container */
.mz-page-container {
    max-width: 1440px;
    margin: 0 auto;
}

.mz-page-header {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.mz-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    letter-spacing: -0.02em;
}

.mz-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.mz-card-header {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #dadde1;
}

.mz-card-body {
    padding: 0;
}

.mz-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    letter-spacing: -0.01em;
}

.mz-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.mz-table thead th {
    background: #ffffff;
    color: #65676b;
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dadde1;
    text-align: left;
}

.mz-table tbody td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #e4e6eb;
    color: #050505;
    font-size: 0.9375rem;
}

.mz-table tbody tr:hover {
    background: #f7f8fa;
}

.mz-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background-color 0.1s ease;
    text-decoration: none;
}

.mz-btn-primary {
    background: var(--mz-primary);
    color: white;
}

.mz-btn-primary:hover {
    background: var(--mz-primary-dark);
}

.mz-btn-secondary {
    background: #e4e6eb;
    color: #050505;
}

.mz-btn-secondary:hover {
    background: #d8dadf;
}

.mz-btn-success {
    background: #2e7d32;
    color: white;
}

.mz-btn-success:hover {
    background: #1b5e20;
}

.mz-btn-danger {
    background: #c62828;
    color: white;
}

.mz-btn-danger:hover {
    background: #b71c1c;
}

.mz-btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.mz-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 12px;
    white-space: nowrap;
}

.mz-badge-success {
    background: #e7f3e7;
    color: #2e7d32;
}

.mz-badge-warning {
    background: #fff4e5;
    color: #ed6c02;
}

.mz-badge-danger {
    background: #ffebee;
    color: #c62828;
}

.mz-badge-info {
    background: #e3f2fd;
    color: #0277bd;
}

.mz-badge-secondary {
    background: #e4e6eb;
    color: #65676b;
}

/* FB Sidebar Overlay (per dettagli, etc) */
.mz-sidebar-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 600px;
    background: white;
    border-left: 1px solid #dadde1;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    z-index: 1100;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mz-sidebar-overlay.show {
    transform: translateX(0);
}

.mz-sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1099;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.mz-sidebar-backdrop.show {
    opacity: 1;
    pointer-events: all;
}

/* Responsive */
@media (max-width: 992px) {
    .mz-sidebar.expanded {
        position: absolute;
        left: 0;
        top: 56px;
        bottom: 0;
        z-index: 999;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .mz-sidebar.collapsed {
        transform: translateX(-100%);
    }

    .mz-header-title {
        display: none;
    }

    .mz-main {
        padding: 0.5rem;
    }

    .mz-sidebar-overlay {
        width: 100%;
    }
}

/* ============================================
   PRODUCTS PAGE LAYOUT
   ============================================ */

.mz-products-layout {
    display: flex;
    height: calc(100vh - 56px);
    background: #ffffff;
    margin: -1rem;
}

@media (max-width: 768px) {
    .mz-products-layout {
        margin: -0.5rem;
    }
}

.mz-products-sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #dadde1;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
}

.mz-products-sidebar.collapsed {
    width: 56px;
}

.mz-products-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #dadde1;
    min-height: 56px;
}

.mz-products-sidebar.collapsed .mz-products-sidebar-header h6 {
    display: none;
}

.mz-products-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.mz-group-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mz-group-item {
    padding: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.mz-group-item:hover {
    background: #ffffff;
}

.mz-group-item.active {
    background: rgba(98, 0, 234, 0.08);
    color: var(--mz-primary);
}

.mz-group-item-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.mz-group-item-name {
    font-size: 0.875rem;
    font-weight: 500;
    flex: 1;
}

.mz-group-item-menu {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: #65676b;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

.mz-group-item:hover .mz-group-item-menu {
    opacity: 1;
}

.mz-group-item-menu:hover {
    background: #e4e6eb;
}

.mz-group-item-menu .material-icons {
    font-size: 1.125rem;
}

.mz-products-main {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.mz-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    text-align: center;
    padding: 3rem 2rem;
}

.mz-empty-state .material-icons {
    font-size: 56px;
    color: #e0e0e0;
    margin-bottom: 1rem;
}

.mz-empty-state h3 {
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
}

.mz-empty-state p {
    margin-bottom: 1.25rem;
    color: #6b7280;
    font-size: 0.875rem;
    max-width: 450px;
    line-height: 1.5;
}

.mz-empty-state .mz-btn {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
}

/* Responsive */
@media (max-width: 768px) {
    .mz-products-sidebar {
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 1000;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    }

    .mz-products-sidebar.collapsed {
        transform: translateX(-100%);
    }
}

/* Breadcrumb */
.mz-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.mz-breadcrumb-item {
    color: var(--mz-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.mz-breadcrumb-item:hover {
    color: var(--mz-primary-dark);
}

.mz-breadcrumb-item.active {
    color: #1c1e21;
    font-weight: 500;
    pointer-events: none;
}

.mz-breadcrumb-separator {
    color: #65676b;
}

/* Tabs */
.mz-tabs {
    display: flex;
    flex-direction: column;
}

.mz-tabs-header {
    display: flex;
    gap: 0.25rem;
    background: white;
    border-radius: 6px 6px 0 0;
    padding: 0.5rem;
    border-bottom: 1px solid #dadde1;
}

.mz-tab-button {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #65676b;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.mz-tab-button:hover {
    background: #ffffff;
    color: #1c1e21;
}

.mz-tab-button.active {
    color: var(--mz-primary);
    background: rgba(98, 0, 234, 0.08);
}

.mz-tabs-content {
    padding-top: 1.5rem;
    min-height: 200px;
}
