/* =============================================================================
   MIR OPS Portal — Design System
   Brand: MIRhosting B.V.  |  Primary #026BCA  |  Accent #FBAA19
   ============================================================================= */

/* --- Google Fonts ---------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&family=Roboto:wght@300;400;500;700&display=swap');

/* --- Design Tokens --------------------------------------------------------- */
:root {
    /* Brand colours */
    --ops-primary:          #026BCA;
    --ops-primary-hover:    #0B86F1;
    --ops-primary-dark:     #0153A0;
    --ops-primary-rgb:      2, 107, 202;
    --ops-accent:           #FBAA19;
    --ops-accent-hover:     #e09700;

    /* Sidebar */
    --ops-sidebar-bg:           #1B293E;
    --ops-sidebar-text:         rgba(255, 255, 255, 0.65);
    --ops-sidebar-text-hover:   rgba(255, 255, 255, 0.9);
    --ops-sidebar-text-active:  #ffffff;
    --ops-sidebar-active-bg:    rgba(2, 107, 202, 0.28);
    --ops-sidebar-section:      rgba(255, 255, 255, 0.30);
    --ops-sidebar-border:       rgba(255, 255, 255, 0.07);

    /* Layout */
    --ops-body-bg:      #f4f6f9;
    --ops-card-bg:      #ffffff;
    --ops-border:       #e2e8f0;
    --ops-text:         #1e293b;
    --ops-text-muted:   #64748b;

    /* Typography */
    --ops-font-body:    'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ops-font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Bootstrap overrides */
    --bs-primary:           #026BCA;
    --bs-primary-rgb:       2, 107, 202;
    --bs-link-color:        #026BCA;
    --bs-link-color-rgb:    2, 107, 202;
    --bs-link-hover-color:  #0B86F1;
    --bs-body-bg:           #f4f6f9;
    --bs-body-font-family:  'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* EasyAdmin overrides */
    --color-primary: #026BCA;
}

/* --- Typography ------------------------------------------------------------ */
body {
    font-family: var(--ops-font-body);
    background-color: var(--ops-body-bg);
    color: var(--ops-text);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--ops-font-heading);
    font-weight: 600;
    color: var(--ops-text);
}

/* --- Bootstrap Primary Overrides ------------------------------------------ */
.btn-primary {
    background-color: var(--ops-primary) !important;
    border-color: var(--ops-primary) !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--ops-primary-hover) !important;
    border-color: var(--ops-primary-hover) !important;
}
.btn-outline-primary {
    color: var(--ops-primary) !important;
    border-color: var(--ops-primary) !important;
}
.btn-outline-primary:hover {
    background-color: var(--ops-primary) !important;
    border-color: var(--ops-primary) !important;
}
a { color: var(--ops-primary); }
a:hover { color: var(--ops-primary-hover); }
.text-primary { color: var(--ops-primary) !important; }
.bg-primary { background-color: var(--ops-primary) !important; }
.border-primary { border-color: var(--ops-primary) !important; }

.form-control:focus,
.form-select:focus {
    border-color: var(--ops-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--ops-primary-rgb), 0.18);
}

/* Badge fixes */
.badge.bg-primary { background-color: var(--ops-primary) !important; }
.badge.text-bg-primary { background-color: var(--ops-primary) !important; }

/* --- EasyAdmin Sidebar ----------------------------------------------------- */
.sidebar,
aside.sidebar {
    background-color: var(--ops-sidebar-bg) !important;
    /* Override EasyAdmin's own CSS vars so active-item bg matches our brand */
    --sidebar-menu-active-item-bg:    rgba(2, 107, 202, 0.28);
    --sidebar-menu-active-item-color: #ffffff;
    --sidebar-menu-item-color:        rgba(255, 255, 255, 0.65);
    --sidebar-menu-item-hover-color:  rgba(255, 255, 255, 0.9);
}

/* EasyAdmin menu item links (.menu-item-contents is EasyAdmin's <a> class) */
.sidebar .menu-item .menu-item-contents {
    color: var(--ops-sidebar-text) !important;
}
.sidebar .menu-item .menu-item-contents:hover {
    color: var(--ops-sidebar-text-hover) !important;
    background-color: rgba(255, 255, 255, 0.06) !important;
}
.sidebar .menu-item .menu-item-contents:active,
.sidebar .menu-item .menu-item-contents:focus,
.sidebar .menu-item .menu-item-contents:focus-visible {
    color: var(--ops-sidebar-text-hover) !important;
    background-color: rgba(255, 255, 255, 0.10) !important;
    outline: none !important;
    box-shadow: none !important;
}
/* Active item — class is on the <li>, not the <a> */
.sidebar li.menu-item.active > .menu-item-contents,
.sidebar li.menu-item.active > .menu-item-contents:hover,
.sidebar li.menu-item.active > .menu-item-contents:focus {
    color: var(--ops-sidebar-text-active) !important;
    background-color: var(--ops-sidebar-active-bg) !important;
    font-weight: 500;
}

/* EasyAdmin section dividers / sub-menu toggles */
.sidebar .menu-section .menu-section-label,
.sidebar .nav-divider,
.sidebar [class*="section-title"] {
    color: var(--ops-sidebar-section) !important;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

/* --- Sidebar Toggle Button ------------------------------------------------- */
.ops-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    background: transparent;
    border: 1px solid var(--ops-border);
    border-radius: 6px;
    color: var(--ops-text-muted);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    margin-right: 10px;
}
.ops-sidebar-toggle:hover {
    background-color: var(--ops-primary);
    border-color: var(--ops-primary);
    color: #fff;
}
.ops-sidebar-toggle i {
    font-size: 14px;
    pointer-events: none;
}

/* --- Custom layout (revenue/billing/margin pages) ------------------------- */
.ops-layout {
    display: flex;
    min-height: 100vh;
}
.ops-sidebar {
    background-color: var(--ops-sidebar-bg);
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 16px 0 24px;
    display: flex;
    flex-direction: column;
}
.ops-sidebar .sidebar-logo {
    padding: 4px 16px 18px;
    border-bottom: 1px solid var(--ops-sidebar-border);
    margin-bottom: 8px;
}
.ops-sidebar .sidebar-logo a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: 0 !important;
    background: none !important;
    color: inherit !important;
}
.ops-sidebar .sidebar-logo span {
    font-family: var(--ops-font-heading);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
}
.ops-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    font-size: 13px;
    color: var(--ops-sidebar-text);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
    line-height: 1.4;
}
.ops-sidebar .nav-link:hover {
    color: var(--ops-sidebar-text-hover);
    background-color: rgba(255, 255, 255, 0.06);
}
.ops-sidebar .nav-link:active,
.ops-sidebar .nav-link:focus,
.ops-sidebar .nav-link:focus-visible {
    color: var(--ops-sidebar-text-hover) !important;
    background-color: rgba(255, 255, 255, 0.10) !important;
    outline: none !important;
    box-shadow: none !important;
}
.ops-sidebar .nav-link.active {
    color: var(--ops-sidebar-text-active);
    background-color: var(--ops-sidebar-active-bg);
    font-weight: 500;
}
/* Also prevent any Bootstrap link colour bleed */
.ops-sidebar a,
.ops-sidebar a:hover,
.ops-sidebar a:focus,
.ops-sidebar a:active {
    text-decoration: none;
    outline: none;
}
.ops-sidebar .nav-link i {
    width: 15px;
    text-align: center;
    font-size: 12px;
    opacity: 0.7;
    flex-shrink: 0;
}
.ops-sidebar .nav-link.active i { opacity: 1; }
.ops-sidebar .section-label {
    padding: 14px 16px 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: var(--ops-sidebar-section);
    border-top: 1px solid var(--ops-sidebar-border);
    margin-top: 4px;
}
.ops-main {
    flex: 1;
    min-width: 0;
    padding: 24px 28px;
    background-color: var(--ops-body-bg);
}

/* --- EasyAdmin Top Bar / Header ------------------------------------------- */
.topbar,
.ea-topbar,
header.navbar {
    border-bottom: 1px solid var(--ops-border) !important;
}

/* --- Cards ----------------------------------------------------------------- */
.card {
    border: 1px solid var(--ops-border);
    border-radius: 8px;
    background-color: var(--ops-card-bg);
}
.card-header {
    font-family: var(--ops-font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--ops-border);
    background-color: #f8fafc;
}
.card-header.bg-success,
.card-header.bg-danger,
.card-header.bg-info,
.card-header.bg-warning,
.card-header.bg-primary {
    border-bottom: none;
    background-color: var(--ops-primary) !important;
    color: #fff !important;
}
.card-header.bg-success { background-color: #16a34a !important; }
.card-header.bg-danger  { background-color: #dc2626 !important; }
.card-header.bg-info    { background-color: var(--ops-primary) !important; }
.card-header.bg-warning { background-color: #d97706 !important; color: #fff !important; }

/* --- Tables --------------------------------------------------------------- */
.table thead th {
    font-family: var(--ops-font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--ops-text-muted);
    border-bottom: 2px solid var(--ops-border);
}

/* --- Breadcrumbs ---------------------------------------------------------- */
.breadcrumb-item a {
    color: var(--ops-primary);
}
.breadcrumb-item a:hover {
    color: var(--ops-primary-hover);
}

/* --- Page / Section Titles ------------------------------------------------ */
.content-title,
.page-title {
    font-family: var(--ops-font-heading) !important;
    font-weight: 600;
}

/* --- Server Configurator -------------------------------------------------- */
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px !important;
    background: rgba(27, 41, 62, 0.08) !important;
    border: 1px solid var(--ops-border) !important;
    border-radius: 6px !important;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--ops-text) !important;
    transition: all 0.15s ease;
}
.filter-pill:hover {
    background: rgba(2, 107, 202, 0.08) !important;
    border-color: var(--ops-primary) !important;
    color: var(--ops-primary) !important;
}
.filter-pill.active {
    background: var(--ops-primary) !important;
    border-color: var(--ops-primary) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(var(--ops-primary-rgb), 0.30);
}
.filter-pill .socket-hint {
    font-weight: 400;
    opacity: 0.55;
    font-size: 11px;
}
.filter-row {
    padding: 0.3rem 0;
}
.filter-row-label {
    min-width: 90px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ops-text-muted);
    font-weight: 600;
}
.spec-badge {
    border: 1px solid var(--ops-border);
    color: var(--ops-text-muted);
    background: #f8fafc;
    font-weight: normal;
    font-size: 0.75rem;
}
.platform-card .card {
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.platform-card .card:hover {
    border-color: var(--ops-primary);
    box-shadow: 0 0 0 1px var(--ops-primary);
}

/* --- KPI / Stat Cards (Quotes, Revenue, etc.) ----------------------------- */
.kpi-card {
    border-radius: 8px;
    border: 1px solid var(--ops-border);
    background: var(--ops-card-bg);
    text-align: center;
    padding: 0.9rem 0.5rem;
}
.kpi-card .kpi-value {
    font-family: var(--ops-font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
}
.kpi-card .kpi-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ops-text-muted);
    margin-top: 2px;
}

/* --- Misc utilities ------------------------------------------------------- */
.text-muted { color: var(--ops-text-muted) !important; }
.body-bg    { background-color: var(--ops-body-bg) !important; }
