/* =========================================================
   MQLPro Platform Dashboard
   Full Replacement CSS
   UI / UX ONLY — No execution logic
   ========================================================= */

.mqlpro-dashboard {
    width: 100%;
    min-height: 100vh;
    background: #f5f7fb;
    color: #172033;
    font-family: Arial, Helvetica, sans-serif;
    box-sizing: border-box;
}

.mqlpro-dashboard *,
.mqlpro-dashboard *::before,
.mqlpro-dashboard *::after {
    box-sizing: border-box;
}

/* =========================
   DASHBOARD SHELL
   ========================= */

.mqlpro-dashboard-shell {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* =========================
   SIDEBAR
   ========================= */

.mqlpro-sidebar {
    width: 260px;
    min-width: 260px;
    min-height: 100vh;
    background: #111827;
    color: #ffffff;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.mqlpro-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 10px 24px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mqlpro-brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff9f43, #ff6b00);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
}

.mqlpro-brand-text {
    min-width: 0;
}

.mqlpro-brand-title {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
}

.mqlpro-brand-subtitle {
    margin: 4px 0 0;
    color: #9ca3af;
    font-size: 12px;
    line-height: 1.4;
}

/* =========================
   SIDEBAR NAVIGATION
   ========================= */

.mqlpro-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.mqlpro-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.mqlpro-sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(2px);
}

.mqlpro-sidebar-nav a.active {
    background: linear-gradient(135deg, #ff9f43, #ff6b00);
    color: #ffffff;
}

.mqlpro-sidebar-nav a.active:hover {
    color: #ffffff;
}

.mqlpro-sidebar-footer {
    margin-top: auto;
    padding: 18px 10px 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mqlpro-sidebar-footer-text {
    margin: 0;
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.5;
}

/* =========================
   MAIN AREA
   ========================= */

.mqlpro-main {
    flex: 1;
    min-width: 0;
    min-height: 100vh;
    background: #f5f7fb;
}

.mqlpro-topbar {
    width: 100%;
    min-height: 70px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 28px;
}

.mqlpro-topbar-left,
.mqlpro-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mqlpro-topbar-title {
    margin: 0;
    color: #172033;
    font-size: 16px;
    font-weight: 800;
}

.mqlpro-topbar-subtitle {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
}

.mqlpro-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    color: #374151;
    font-size: 12px;
    font-weight: 700;
}

/* =========================
   CONTENT
   ========================= */

.mqlpro-content {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 28px;
}

.mqlpro-page-header {
    margin-bottom: 24px;
}

.mqlpro-page-header h1 {
    margin: 0;
    color: #111827;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;
}

.mqlpro-page-header p {
    margin: 8px 0 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

/* =========================
   STATUS BANNER
   ========================= */

.mqlpro-status-banner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    margin-bottom: 22px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #eff6ff;
}

.mqlpro-status-banner-left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.mqlpro-status-banner-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    background: #2563eb;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.mqlpro-status-banner h3 {
    margin: 0;
    color: #1e3a8a;
    font-size: 15px;
    font-weight: 800;
}

.mqlpro-status-banner p {
    margin: 4px 0 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.5;
}

/* =========================
   CARDS
   ========================= */

.mqlpro-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.mqlpro-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.mqlpro-card-title {
    margin: 0;
    color: #111827;
    font-size: 16px;
    font-weight: 800;
}

.mqlpro-card-description {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.5;
}

/* =========================
   METRIC GRID
   ========================= */

.mqlpro-metric-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.mqlpro-metric-grid > * {
    width: calc(25% - 12px);
}

.mqlpro-metric-card {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.mqlpro-metric-card::after {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -35px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 159, 67, 0.08);
}

.mqlpro-metric-label {
    margin: 0 0 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.mqlpro-metric-value {
    margin: 0;
    color: #111827;
    font-size: 28px;
    line-height: 1.1;
    font-weight: 800;
}

.mqlpro-metric-note {
    margin: 8px 0 0;
    color: #94a3b8;
    font-size: 11px;
}

/* =========================
   STATUS GRID
   ========================= */

.mqlpro-status-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 24px;
}

.mqlpro-status-grid > * {
    width: calc(33.333% - 10px);
}

.mqlpro-status-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
}

.mqlpro-status-indicator {
    width: 12px;
    height: 12px;
    min-width: 12px;
    margin-top: 4px;
    border-radius: 50%;
    background: #94a3b8;
}

.mqlpro-status-indicator.success {
    background: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.mqlpro-status-indicator.warning {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.mqlpro-status-indicator.danger {
    background: #dc2626;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.mqlpro-status-card h4 {
    margin: 0;
    color: #111827;
    font-size: 13px;
    font-weight: 800;
}

.mqlpro-status-card p {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.5;
}

/* =========================
   TWO COLUMN
   ========================= */

.mqlpro-two-column {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.mqlpro-two-column > * {
    flex: 1 1 0;
    min-width: 0;
}

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

.mqlpro-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.mqlpro-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    background: #ffffff;
}

.mqlpro-table th {
    padding: 12px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    color: #64748b;
    text-align: left;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.mqlpro-table td {
    padding: 13px 14px;
    border-bottom: 1px solid #eef2f7;
    color: #334155;
    font-size: 12px;
    vertical-align: middle;
}

.mqlpro-table tr:last-child td {
    border-bottom: 0;
}

.mqlpro-table tr:hover td {
    background: #fafafa;
}

/* =========================
   BADGES
   ========================= */

.mqlpro-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
}

.mqlpro-badge-success {
    background: #dcfce7;
    color: #166534;
}

.mqlpro-badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.mqlpro-badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.mqlpro-badge-neutral {
    background: #f1f5f9;
    color: #475569;
}

.mqlpro-badge-info {
    background: #dbeafe;
    color: #1d4ed8;
}

/* =========================
   BUTTONS
   ========================= */

.mqlpro-button-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.mqlpro-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 14px;
    border: 0;
    border-radius: 9px;
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.mqlpro-button:hover {
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.18);
}

.mqlpro-button-secondary {
    background: #475569;
}

.mqlpro-button-success {
    background: #16a34a;
}

.mqlpro-button-warning {
    background: #f59e0b;
    color: #111827;
}

.mqlpro-button-danger {
    background: #dc2626;
}

.mqlpro-button-blocked {
    background: #e5e7eb;
    color: #94a3b8;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

/* =========================
   EMPTY / LOADING
   ========================= */

.mqlpro-empty {
    padding: 32px 20px;
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
}

.mqlpro-empty-title {
    margin: 0;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
}

.mqlpro-empty-text {
    margin: 6px 0 0;
    color: #94a3b8;
    font-size: 12px;
}

.mqlpro-loading {
    padding: 24px;
    text-align: center;
    color: #64748b;
    font-size: 12px;
}

/* =========================
   SYSTEM STATUS MINI
   ========================= */

.mqlpro-system-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    color: #94a3b8;
    font-size: 11px;
}

.mqlpro-system-mini-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    background: #16a34a;
}

/* =========================
   RESPONSIVE 1180
   ========================= */

@media screen and (max-width: 1180px) {
    .mqlpro-metric-grid > * {
        width: calc(50% - 8px);
    }

    .mqlpro-status-grid > * {
        width: calc(50% - 7px);
    }

    .mqlpro-content {
        padding: 24px;
    }
}

/* =========================
   RESPONSIVE 820
   ========================= */

@media screen and (max-width: 820px) {
    .mqlpro-sidebar {
        width: 220px;
        min-width: 220px;
    }

    .mqlpro-topbar {
        padding: 12px 20px;
    }

    .mqlpro-content {
        padding: 20px;
    }

    .mqlpro-two-column {
        flex-direction: column;
    }

    .mqlpro-page-header h1 {
        font-size: 24px;
    }
}

/* =========================
   RESPONSIVE 560
   ========================= */

@media screen and (max-width: 560px) {
    .mqlpro-dashboard-shell {
        display: block;
    }

    .mqlpro-sidebar {
        width: 100%;
        min-width: 100%;
        min-height: auto;
        padding: 16px;
    }

    .mqlpro-brand {
        padding-bottom: 16px;
    }

    .mqlpro-sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .mqlpro-sidebar-nav a {
        min-height: 40px;
        padding: 8px 9px;
        font-size: 12px;
    }

    .mqlpro-sidebar-footer {
        display: none;
    }

    .mqlpro-main {
        min-height: auto;
    }

    .mqlpro-topbar {
        min-height: auto;
        padding: 14px 16px;
    }

    .mqlpro-topbar-subtitle {
        display: none;
    }

    .mqlpro-content {
        padding: 16px;
    }

    .mqlpro-metric-grid {
        display: block;
    }

    .mqlpro-metric-grid > * {
        width: 100%;
        margin-bottom: 16px;
    }

    .mqlpro-metric-grid > *:last-child {
        margin-bottom: 0;
    }

    .mqlpro-status-grid {
        display: block;
    }

    .mqlpro-status-grid > * {
        width: 100%;
    }

    .mqlpro-status-card {
        margin-bottom: 14px;
    }

    .mqlpro-status-card:last-child {
        margin-bottom: 0;
    }

    .mqlpro-page-header {
        margin-bottom: 18px;
    }

    .mqlpro-page-header h1 {
        font-size: 22px;
    }

    .mqlpro-card {
        padding: 16px;
    }

    .mqlpro-status-banner {
        padding: 15px;
    }
}
