/* AdminLTE-Style Internal Admin CRM CSS */
* { box-sizing: border-box; margin: 0; padding: 0; }
body.mz-crm-body {
    font-family: var(--mz-font-sans);
    background-color: #0F172A;
    color: #F8FAFC;
    min-height: 100vh;
}
.mz-crm-wrapper { display: flex; flex-direction: column; min-height: 100vh; }

/* Navbar */
.mz-crm-navbar {
    background: #0B192C;
    border-bottom: 1px solid #1E293B;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 0 270px;
    position: sticky;
    top: 0;
    z-index: 99;
}
.mz-navbar-nav { display: flex; align-items: center; list-style: none; gap: 16px; }
.mz-nav-link { color: #94A3B8; text-decoration: none; font-size: 13px; font-weight: 600; }
.mz-nav-link:hover { color: #FFFFFF; }
.mz-sidebar-toggle { background: transparent; border: none; font-size: 18px; color: #fff; cursor: pointer; }
.mz-badge-staff {
    background: #1E3A8A;
    color: #38BDF8;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: var(--mz-font-mono);
}
.mz-crm-search-input {
    background: #050D1A;
    border: 1px solid #1E293B;
    border-radius: 6px;
    color: #F8FAFC;
    padding: 6px 12px;
    font-size: 13px;
    width: 260px;
}
.mz-crm-search-input:focus { border-color: #2563EB; outline: none; }
.mz-telemetry-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(16,185,129,0.15);
    color: #10B981;
    border: 1px solid #065F46;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-family: var(--mz-font-mono);
}
.mz-pulse-green { width: 6px; height: 6px; background: #10B981; border-radius: 50%; box-shadow: 0 0 6px #10B981; }
.mz-staff-profile-chip {
    background: #1E293B;
    color: #F1F5F9;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
}

/* Sidebar */
.mz-crm-sidebar {
    width: 250px;
    background: #050D1A;
    border-right: 1px solid #1E293B;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
}
.mz-crm-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid #1E293B;
    font-size: 18px;
    font-weight: 800;
}
.mz-brand-symbol { color: #2563EB; font-size: 22px; }
.mz-brand-title span { color: #38BDF8; }
.mz-badge-ops {
    background: #EF4444;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
}
.mz-sidebar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #1E293B;
}
.mz-profile-avatar {
    width: 38px;
    height: 38px;
    background: #1E3A8A;
    color: #38BDF8;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
}
.mz-profile-user { font-size: 13px; font-weight: 700; color: #FFFFFF; }
.mz-profile-role { font-size: 11px; color: #94A3B8; }

.mz-crm-menu { list-style: none; padding: 12px 0; }
.mz-menu-header {
    font-size: 11px;
    font-weight: 700;
    color: #64748B;
    padding: 12px 16px 4px;
    letter-spacing: 0.05em;
}
.mz-menu-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #94A3B8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}
.mz-menu-item.active a, .mz-menu-item a:hover {
    background: #0B192C;
    color: #38BDF8;
    border-left: 3px solid #2563EB;
}

/* Content Area */
.mz-crm-content-wrapper {
    margin-left: 250px;
    padding: 24px;
    flex: 1;
}
.mz-crm-content-header { margin-bottom: 24px; }
.mz-flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.mz-crm-content-header h1 { font-size: 24px; font-weight: 800; color: #FFFFFF; margin: 0; }

/* Grid Layouts */
.mz-grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.mz-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Stat Cards */
.mz-crm-stat-card {
    border-radius: 8px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    color: #FFFFFF;
}
.mz-stat-inner h3 { font-size: 30px; font-weight: 800; margin: 0; letter-spacing: -0.02em; }
.mz-stat-inner p { font-size: 13px; opacity: 0.85; margin-top: 4px; }
.mz-stat-icon { position: absolute; top: 16px; right: 16px; font-size: 36px; opacity: 0.2; }
.mz-stat-footer { margin-top: 14px; font-size: 12px; font-weight: 600; font-family: var(--mz-font-mono); opacity: 0.9; }
.mz-stat-blue { background: #1E3A8A; }
.mz-stat-green { background: #065F46; }
.mz-stat-yellow { background: #854D0E; }
.mz-stat-purple { background: #581C87; }

/* Cards & DataTables */
.mz-crm-card {
    background: #0B192C;
    border: 1px solid #1E293B;
    border-radius: 8px;
}
.mz-card-head {
    padding: 16px 20px;
    border-bottom: 1px solid #1E293B;
}
.mz-card-head h3 { font-size: 15px; font-weight: 700; color: #FFFFFF; margin: 0; }
.mz-card-body { padding: 20px; }
.mz-p-0 { padding: 0 !important; }

.mz-data-table {
    width: 100% !important;
    border-collapse: collapse;
    font-size: 13px;
    color: #E2E8F0;
}
.mz-data-table th, .mz-data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #1E293B;
}
.mz-data-table th { background: #050D1A; color: #94A3B8; font-weight: 700; }
.mz-data-table tbody tr:hover { background: rgba(37,99,235,0.08); }

/* Badges */
.mz-badge-prov, .mz-badge-status, .mz-badge-pri {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    font-family: var(--mz-font-mono);
}
.mz-badge-active { background: #065F46; color: #34D399; }
.mz-badge-provisioning { background: #854D0E; color: #FBBF24; }
.mz-badge-completed { background: #065F46; color: #34D399; }
.mz-pri-med { background: #1E3A8A; color: #60A5FA; }
.mz-pri-high { background: #991B1B; color: #F87171; }
.mz-badge-tri { background: #1E3A8A; color: #38BDF8; font-size: 11px; padding: 2px 6px; border-radius: 4px; }

/* Filter Buttons */
.mz-filter-btns { display: flex; gap: 4px; }
.mz-btn-filter {
    background: #050D1A;
    border: 1px solid #1E293B;
    color: #94A3B8;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.mz-btn-filter.active, .mz-btn-filter:hover { background: #2563EB; color: #fff; }

/* Telemetry Health Rows */
.mz-health-list { display: flex; flex-direction: column; gap: 12px; }
.mz-health-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #050D1A;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
}
.mz-badge-health-ok {
    background: #065F46;
    color: #34D399;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11px;
    font-family: var(--mz-font-mono);
}

/* Buttons */
.mz-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}
.mz-btn-primary { background: #2563EB; color: #fff; }
.mz-btn-primary:hover { background: #1D4ED8; }
.mz-btn-outline { background: transparent; border: 1px solid #334155; color: #E2E8F0; }
.mz-btn-xs { padding: 3px 8px; font-size: 11px; }

/* Footer */
.mz-crm-footer {
    background: #050D1A;
    border-top: 1px solid #1E293B;
    padding: 16px 24px;
    margin-left: 250px;
    color: #64748B;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 900px) {
    .mz-grid-2 { grid-template-columns: 1fr; }
    .mz-crm-sidebar { transform: translateX(-100%); transition: transform 0.3s; }
    .mz-sidebar-open .mz-crm-sidebar { transform: translateX(0); }
    .mz-crm-navbar, .mz-crm-content-wrapper, .mz-crm-footer { margin-left: 0; padding-left: 16px; }
}
