/*
    DEMO STYLE
*/
@import "https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700";

body {
    font-family: 'Poppins', sans-serif;
    background: #fafafa;
}

p {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1em;
    font-weight: 300;
    line-height: 1.7em;
    color: #999;
}

a, a:hover, a:focus {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s;
}

.navbar {
    padding: 15px 10px;
    background: #fff;
    border: none;
    border-radius: 0;
    margin-bottom: 40px;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar-btn {
    box-shadow: none;
    outline: none !important;
    border: none;
}

.line {
    width: 100%;
    height: 1px;
    border-bottom: 1px dashed #ddd;
    margin: 40px 0;
}

/* ---------------------------------------------------
    SIDEBAR STYLE - Aqua Security Theme
----------------------------------------------------- */

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    perspective: 1500px;
}


#sidebar {
    min-width: 250px;
    max-width: 250px;
    background: linear-gradient(180deg, #0062E6 0%, #0052cc 50%, #003d99 100%);
    color: #fff;
    transition: all 0.6s cubic-bezier(0.945, 0.020, 0.270, 0.665);
    transform-origin: bottom left;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2);
}

#sidebar.active {
    margin-left: -250px;
    transform: rotateY(100deg);
}

#sidebar .sidebar-header {
    padding: 20px;
    background: linear-gradient(135deg, #0062E6 0%, #33AEFF 100%);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

#sidebar ul.components {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#sidebar ul p {
    color: #fff;
    padding: 10px;
}

#sidebar ul li a {
    padding: 12px 15px;
    font-size: 1.05em;
    display: block;
    color: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

#sidebar ul li a:hover {
    color: #ffffff;
    background: rgba(51, 170, 255, 0.2);
    border-left: 3px solid #33AEFF;
    padding-left: 20px;
}

#sidebar ul li.active > a {
    color: #0062E6;
    background: #ffffff;
    font-weight: 600;
    border-left: 5px solid #33AEFF;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* Expanded dropdown parent (not on a child page) — stay on blue sidebar, not white */
#sidebar ul li:not(.active) > a.dropdown-toggle[aria-expanded="true"] {
    color: #ffffff;
    background: rgba(51, 170, 255, 0.25);
    font-weight: 600;
    border-left: 3px solid #33AEFF;
}

/* Make active menu item VERY visible - Aqua Style */
#sidebar ul li.active > a {
    background: #ffffff !important;
    color: #0062E6 !important;
    font-weight: 700;
}

/* Parent menu with dropdown - keep visible when submenu is active */
#sidebar ul li.active > a.dropdown-toggle {
    background: rgba(51, 170, 255, 0.3) !important;
    color: #ffffff !important;
    font-weight: 600;
    border-left: 3px solid #33AEFF;
    border-left: 5px solid #33AEFF;
    box-shadow: 0 3px 12px rgba(0, 98, 230, 0.3);
    transform: translateX(3px);
}

#sidebar ul li.submenu-item.active > a {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #0062E6 !important;
    font-weight: 600;
    border-left: 4px solid #33AEFF;
    padding-left: 26px !important;
}


a[data-toggle="collapse"],
#sidebar .dropdown-toggle {
    position: relative;
}

.dropdown-toggle::after {
    display: block;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

/* Mark sidebar PARENT items (those that expand a submenu) with a clear chevron
   so it's obvious which menu is a parent. Points right when collapsed, rotates
   down when expanded. Only .dropdown-toggle items get it, so plain links stay bare. */
#sidebar .dropdown-toggle::after {
    content: "";
    width: 7px;
    height: 7px;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    margin: 0;
    vertical-align: 0;
    opacity: 0.85;
    transition: transform 0.2s ease;
    transform: translateY(-50%) rotate(-45deg);
}
#sidebar .dropdown-toggle[aria-expanded="true"]::after {
    transform: translateY(-50%) rotate(45deg);
}

/* Children read as secondary: indent + smaller font already applied via `ul ul a`;
   mute the text slightly so the parent/child hierarchy is obvious at a glance. */
#sidebar ul ul a {
    color: rgba(255, 255, 255, 0.82);
}
#sidebar ul ul li.active > a,
#sidebar ul ul a:hover {
    color: inherit;
}

/* Section header label (e.g. "Administrators") — a non-clickable group title that
   sits above its items, after the separator. */
#sidebar .nav-section-header {
    padding: 10px 20px 4px;
    margin: 0;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    pointer-events: none;
    list-style: none;
}

ul ul a {
    font-size: 0.95em !important;
    padding-left: 30px !important;
    background: rgba(0, 82, 204, 0.4);
    border-left: 2px solid rgba(51, 170, 255, 0.3);
}

ul ul a:hover {
    background: rgba(51, 170, 255, 0.3);
    border-left: 2px solid #33AEFF;
}

ul.CTAs {
    padding: 20px;
}

ul.CTAs a {
    text-align: center;
    font-size: 0.95em !important;
    display: block;
    border-radius: 8px;
    margin-bottom: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
}

a.download {
    background: linear-gradient(135deg, #33AEFF 0%, #0062E6 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(51, 170, 255, 0.4);
}

a.download:hover {
    box-shadow: 0 6px 20px rgba(51, 170, 255, 0.6);
    transform: translateY(-2px);
}

a.article, a.article:hover {
    background: #6d7fcc !important;
    color: #fff !important;
}



/* ---------------------------------------------------
    CONTENT STYLE
----------------------------------------------------- */
#content {
    width: 100%;
    /* Flex child inside .wrapper: without min-width:0 a wide, unbreakable child
       (e.g. a long AWS_SESSION_TOKEN in a <pre>) forces the pane past the
       viewport and pushes the page sideways. min-width:0 lets it shrink and
       lets inner elements manage their own overflow/wrapping. */
    min-width: 0;
    padding: 20px;
    min-height: 100vh;
    transition: all 0.3s;
}

#sidebarCollapse {
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    cursor: pointer;
}

#sidebarCollapse span {
    width: 80%;
    height: 2px;
    margin: 0 auto;
    display: block;
    background: #555;
    transition: all 0.8s cubic-bezier(0.810, -0.330, 0.345, 1.375);
    transition-delay: 0.2s;
}

#sidebarCollapse span:first-of-type {
    transform: rotate(45deg) translate(2px, 2px);
}
#sidebarCollapse span:nth-of-type(2) {
    opacity: 0;
}
#sidebarCollapse span:last-of-type {
    transform: rotate(-45deg) translate(1px, -1px);
}


#sidebarCollapse.active span {
    transform: none;
    opacity: 1;
    margin: 5px auto;
}


/* ---------------------------------------------------
    MEDIAQUERIES
----------------------------------------------------- */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -250px;
        transform: rotateY(90deg);
    }
    #sidebar.active {
        margin-left: 0;
        transform: none;
    }
    #sidebarCollapse span:first-of-type,
    #sidebarCollapse span:nth-of-type(2),
    #sidebarCollapse span:last-of-type {
        transform: none;
        opacity: 1;
        margin: 5px auto;
    }
    #sidebarCollapse.active span {
        margin: 0 auto;
    }
    #sidebarCollapse.active span:first-of-type {
        transform: rotate(45deg) translate(2px, 2px);
    }
    #sidebarCollapse.active span:nth-of-type(2) {
        opacity: 0;
    }
    #sidebarCollapse.active span:last-of-type {
        transform: rotate(-45deg) translate(1px, -1px);
    }
}

section.pricing {
background: #007bff;
background: linear-gradient(to right, #0062E6, #33AEFF);
}

.pricing .card {
border: none;
border-radius: 1rem;
transition: all 0.2s;
box-shadow: 0 0.5rem 1rem 0 rgba(0, 0, 0, 0.1);
}

.pricing hr {
margin: 1.5rem 0;
}

.pricing .card-title {
margin: 0.5rem 0;
font-size: 2rem;
letter-spacing: .1rem;
font-weight: bold;
}

.pricing .card-subtitle {
	margin: 0;
	font-size: 1rem;
}

.pricing .card-value {
font-size: 3rem;
margin: 0;
}

.pricing ul li {
margin-bottom: 1rem;
}

.pricing .text-muted {
opacity: 0.7;
}

.pricing .btn {
font-size: 80%;
border-radius: 3rem;
letter-spacing: .1rem;
font-weight: bold;
padding: 1rem;
opacity: 0.7;
transition: all 0.2s;
}

/* Hover Effects on Card */

@media (min-width: 992px) {
	.pricing .card:hover {
		margin-top: -.25rem;
		margin-bottom: .25rem;
		box-shadow: 0 0.5rem 1rem 0 rgba(0, 0, 0, 0.3);
	}

	.pricing .card:hover .btn {
		opacity: 1;
	}
}

/* Loading spinner */
.modal.vertical-centered {
    transform: translateY(-50%);
    top: 50%;
}

.spinner-content {
    background-color: rgba(255, 255, 255, 0); /* Set the background color to a transparent white (adjust opacity as needed) */
    border: none; /* Remove the border around the modal content */
    border-radius: 0; /* Remove border-radius if present */
}

.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
}

.spinner {
    border: 5px solid rgba(0, 0, 0, 0.3);
    border-top: 5px solid #007bff; /* Customize the spinner color */
    border-radius: 50%;
    width: 64px;
    height: 64px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Dialog Styling */
.modal {
    display: none;
    z-index: 1050;
    overflow: hidden;
    outline: 0;
}

/* Ensure cluster details modal is always centered vertically */
.modal#clusterDetailsModal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Remove overflow:hidden from .modal to let flex centering work with fixed backdrop */
.modal#clusterDetailsModal {
    overflow: visible !important;
}

.modal-backdrop {
    display: none;
    z-index: 1040;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-dialog {
    width: auto;
    margin: 10px auto;
}

.modal-content {
    position: relative;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.3rem;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.modal-title {
    margin-bottom: 0;
    line-height: 1.5;
    color: red;
}

.modal-body {
    position: relative;
    padding: 1rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 1rem;
    border-top: 1px solid #e9ecef;
}

.close {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 0.5rem;
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

label {
    color: #1904DA
}

/* ===== Aqua Security Active Tests Styling ===== */

/* Hero Header */
.aqua-hero-header {
    background: linear-gradient(135deg, #0062E6 0%, #7B3FF2 50%, #FF006B 100%);
    padding: 40px 0;
    margin: -20px -20px 0 -20px;
    color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.aqua-hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: white;
}

.aqua-hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin: 0;
}

/* Yellow Button (Primary CTA) */
.aqua-btn-yellow {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    font-weight: 700;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
}

.aqua-btn-yellow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
    color: #000;
}

/* Outline Button */
.aqua-btn-outline {
    background: transparent;
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    border: 2px solid white;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.aqua-btn-outline:hover {
    background: white;
    color: #0062E6;
}

/* Stats Cards */
.aqua-stats-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    border-left: 5px solid #0062E6;
}

.aqua-stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.aqua-stats-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0062E6 0%, #33AEFF 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.aqua-icon-success {
    background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
}

.aqua-icon-info {
    background: linear-gradient(135deg, #7B3FF2 0%, #A78BFA 100%);
}

.aqua-stats-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #0062E6;
    margin: 0;
}

.aqua-stats-content p {
    font-size: 0.9rem;
    color: #6B7280;
    margin: 0;
}

/* Table Container */
.aqua-table-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* Aqua Badges */
.aqua-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
}

.aqua-badge-warning {
    background: linear-gradient(135deg, #FFA500 0%, #FFD700 100%);
    color: #000;
}

.aqua-badge-user {
    background: linear-gradient(135deg, #0062E6 0%, #33AEFF 100%);
    color: white;
}

/* Small Buttons */
.aqua-btn-sm {
    padding: 6px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
}

.aqua-btn-gradient {
    background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    color: white;
}

.aqua-btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    color: white;
}

.aqua-btn-primary {
    background: linear-gradient(135deg, #0062E6 0%, #33AEFF 100%);
    color: white;
}

.aqua-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 98, 230, 0.4);
    color: white;
}

/* Empty State */
.aqua-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.aqua-empty-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 48px;
    color: white;
}

.aqua-empty-state h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0062E6;
    margin-bottom: 10px;
}

.aqua-empty-state p {
    font-size: 1.1rem;
    color: #6B7280;
}

/* Modal Styling */
.aqua-modal {
    border-radius: 12px;
    overflow: hidden;
}

.aqua-modal-header {
    background: linear-gradient(135deg, #0062E6 0%, #33AEFF 100%);
    color: white;
    border: none;
}

/* =====================================================================
   MATERIAL LIGHT THEME  (clean, calm, product-grade)
   White surfaces · hairline borders · soft one-step shadows · flat
   primary blue · rounded soft pills · Sora display / Figtree UI /
   JetBrains Mono code. Appended last so it wins by source order over
   Bootstrap + the base/aqua rules above. Structural classes untouched;
   this only recolours, so every page inherits the new look.
   ===================================================================== */
:root {
    --m-bg:            #f5f7fb;   /* app canvas: cool near-white       */
    --m-surface:       #ffffff;
    --m-surface-2:     #f8f9fb;   /* table head, subtle fills          */
    --m-border:        #e6e9ee;   /* hairline card/table borders       */
    --m-border-strong: #d6dbe3;   /* inputs, dividers                  */
    --m-ink:           #1f2733;   /* headings + primary text           */
    --m-ink-2:         #5a6472;   /* body / muted                      */
    --m-ink-3:         #8b95a4;   /* placeholders / subtle             */
    --m-primary:       #1a73e8;   /* Material blue (per approved spec) */
    --m-primary-strong:#1557b0;
    --m-primary-050:   #e8f0fe;   /* tint for active/soft states       */
    --m-success:       #137333;   --m-success-bg: #e6f4ea;
    --m-warning:       #8a6100;   --m-warning-bg: #fef7e0;
    --m-danger:        #c5221f;   --m-danger-bg:  #fce8e6;
    --m-radius:        12px;
    --m-radius-sm:     8px;
    --m-pill:          999px;
    --m-shadow-1:      0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
    --m-shadow-2:      0 6px 16px rgba(16, 24, 40, 0.12);
    --m-sidebar:       #0f2440;   /* deep navy rail (keeps white logo readable) */
    --font-display:    'Sora', system-ui, -apple-system, sans-serif;
    --font-body:       'Figtree', system-ui, -apple-system, sans-serif;
    --font-mono:       'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
    /* legacy aliases so any lingering var(--nb-*) references still resolve */
    --nb-primary: var(--m-primary);
    --nb-ink: var(--m-ink);
    --nb-bg: var(--m-bg);
}

body {
    font-family: var(--font-body) !important;
    color: var(--m-ink);
    background-color: var(--m-bg) !important;
    background-image: none !important;
    -webkit-font-smoothing: antialiased;
}
p { color: var(--m-ink-2); font-family: var(--font-body); font-weight: 400; font-size: 1rem; line-height: 1.6; }
.text-muted, .form-control-plaintext { font-family: var(--font-body); }
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--m-ink);
}
a { color: var(--m-primary); }
::selection { background: var(--m-primary-050); color: var(--m-ink); }

/* Slim, neutral scrollbars */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: #c7cede;
    border: 2px solid var(--m-bg);
    border-radius: 999px;
}

/* ---- Sidebar (flat navy rail, pill-shaped active item) ---- */
#sidebar {
    background: var(--m-sidebar) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: none;
}
#sidebar .sidebar-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px 20px 18px;
}
#sidebar .sidebar-header h3 {
    font-family: var(--font-display);
    font-weight: 700;
    color: #fff;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    margin-top: 12px;
}
#sidebar ul.components { padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
#sidebar ul li a {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95em;
    color: rgba(255, 255, 255, 0.72);
    border-left: none !important;
    border-radius: 0 var(--m-pill) var(--m-pill) 0;
    margin: 1px 12px 1px 0;
    padding: 9px 16px;
    display: flex;
    align-items: center;
    gap: 9px;
    transition: background .15s ease, color .15s ease;
}
#sidebar ul li a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-left: none !important;
    padding-left: 16px;
    transform: none;
}
#sidebar ul li a i { width: 18px; text-align: center; opacity: 0.85; }
ul ul a {
    font-size: 0.9em !important;
    padding-left: 44px !important;
    background: transparent !important;
    border-left: none !important;
}
ul ul a:hover { background: rgba(255, 255, 255, 0.06) !important; border-left: none !important; }
/* Active leaf = solid primary pill; active parent = subtle highlight */
#sidebar ul li.active > a,
#sidebar ul li.submenu-item.active > a {
    background: var(--m-primary) !important;
    color: #fff !important;
    font-weight: 600;
    border: none !important;
    box-shadow: none;
    border-left: none !important;
    border-radius: 0 var(--m-pill) var(--m-pill) 0;
    transform: none;
}
#sidebar ul li.active > a.dropdown-toggle,
#sidebar ul li:not(.active) > a.dropdown-toggle[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.10) !important;
    color: #fff !important;
    font-weight: 600;
    border: none !important;
    border-left: none !important;
    box-shadow: none;
    transform: none;
    border-radius: 0 var(--m-pill) var(--m-pill) 0;
}
.dropdown-toggle::after { color: inherit; }

/* Sidebar REFRESH CTA + downloads → flat primary button */
ul.CTAs { padding: 16px 18px; }
ul.CTAs a, a.download, a.download:hover {
    background: var(--m-primary) !important;
    color: #fff !important;
    border: none;
    border-radius: var(--m-radius-sm);
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: none !important;
    padding: 10px;
    transition: background .15s ease;
}
a.download:hover { background: var(--m-primary-strong) !important; transform: none; box-shadow: none !important; }
a.download:active { transform: none; box-shadow: none !important; }
a.article, a.article:hover { background: #3a4a63 !important; color: #fff !important; }

/* ---- Hamburger ---- */
#sidebarCollapse {
    border: 1px solid var(--m-border-strong);
    border-radius: var(--m-radius-sm);
    box-shadow: none;
    background: var(--m-surface);
}
#sidebarCollapse span { background: var(--m-ink-2); }

/* ---- Cards ---- */
.card {
    background: var(--m-surface);
    border: 1px solid var(--m-border) !important;
    border-radius: var(--m-radius) !important;
    box-shadow: var(--m-shadow-1);
    transition: box-shadow .18s ease;
    animation: mFade .35s ease both;
}
.card:hover { transform: none; box-shadow: var(--m-shadow-2); }
.card-header {
    background: var(--m-surface-2);
    border-bottom: 1px solid var(--m-border) !important;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--m-ink);
}
.card-header.bg-primary, .card-header.bg-dark { background: var(--m-primary) !important; color: #fff !important; }
.card.border-primary { border-color: var(--m-primary) !important; }
@keyframes mFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- Buttons ---- */
.btn {
    font-family: var(--font-body);
    font-weight: 600;
    border: 1px solid transparent !important;
    border-radius: var(--m-radius-sm) !important;
    box-shadow: none;
    transition: background .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn:hover { transform: none; box-shadow: var(--m-shadow-1); }
.btn:active { transform: none; box-shadow: none; }
.btn-sm { box-shadow: none; }
.btn-primary { background: var(--m-primary) !important; border-color: var(--m-primary) !important; color: #fff !important; }
.btn-primary:hover { background: var(--m-primary-strong) !important; border-color: var(--m-primary-strong) !important; }
.btn-outline-primary { background: #fff !important; color: var(--m-primary) !important; border-color: var(--m-primary) !important; }
.btn-outline-primary:hover { background: var(--m-primary-050) !important; color: var(--m-primary-strong) !important; }
.btn-secondary { background: #fff !important; color: var(--m-ink) !important; border-color: var(--m-border-strong) !important; }
.btn-secondary:hover { background: var(--m-surface-2) !important; color: var(--m-ink) !important; }
.btn-outline-secondary { background: #fff !important; color: var(--m-ink-2) !important; border-color: var(--m-border-strong) !important; }
.btn-outline-secondary:hover { background: var(--m-surface-2) !important; color: var(--m-ink) !important; }
.btn-danger { background: var(--m-danger) !important; border-color: var(--m-danger) !important; color: #fff !important; }
.btn-outline-danger { background: #fff !important; color: var(--m-danger) !important; border-color: #f1b9b7 !important; }
.btn-outline-danger:hover { background: var(--m-danger-bg) !important; color: var(--m-danger) !important; }
.btn-success { background: var(--m-success) !important; border-color: var(--m-success) !important; color: #fff !important; }
.btn-warning { background: #f9ab00 !important; border-color: #f9ab00 !important; color: #3d2c00 !important; }
.btn-outline-warning { background: #fff !important; color: #8a6100 !important; border-color: #f3d38a !important; }
.btn-outline-warning:hover { background: var(--m-warning-bg) !important; color: #8a6100 !important; }
.btn-info, .btn-outline-info { background: #fff !important; color: var(--m-primary) !important; border-color: #bcd5f7 !important; }
.btn-info:hover, .btn-outline-info:hover { background: var(--m-primary-050) !important; color: var(--m-primary-strong) !important; }

/* ---- Forms ---- */
.form-control, .form-select {
    border: 1px solid var(--m-border-strong) !important;
    border-radius: var(--m-radius-sm) !important;
    box-shadow: none;
    font-family: var(--font-body) !important;
    color: var(--m-ink);
    background-color: #fff;
}
.form-control:focus, .form-select:focus {
    border-color: var(--m-primary) !important;
    box-shadow: 0 0 0 3px var(--m-primary-050) !important;
}
.form-control::placeholder { color: var(--m-ink-3); }
input, textarea, select, .form-control-sm, .form-select-sm { font-family: var(--font-body) !important; }
label, .form-label { color: var(--m-ink) !important; font-family: var(--font-body); font-weight: 600; }
.form-check-input:checked { background-color: var(--m-primary); border-color: var(--m-primary); }
:focus-visible { outline: 2px solid var(--m-primary); outline-offset: 2px; }

/* ---- Alerts ---- */
.alert {
    border: 1px solid var(--m-border) !important;
    border-radius: var(--m-radius-sm) !important;
    box-shadow: none;
    font-weight: 500;
    color: var(--m-ink);
}
.alert-success { background: var(--m-success-bg) !important; border-color: #b7dfc2 !important; color: #0b5228 !important; }
.alert-danger  { background: var(--m-danger-bg) !important;  border-color: #f3c1bf !important; color: #8f1a17 !important; }
.alert-warning { background: var(--m-warning-bg) !important; border-color: #f0dca6 !important; color: #6b4b00 !important; }
.alert-info    { background: var(--m-primary-050) !important; border-color: #c4dbfb !important; color: #174ea6 !important; }

/* ---- Tables (Bootstrap + aqua-table) ---- */
.table > thead th, .table thead th {
    font-family: var(--font-body);
    background: var(--m-surface-2) !important;
    color: var(--m-ink-2) !important;
    font-weight: 600;
    border-top: none !important;
    border-bottom: 1px solid var(--m-border-strong) !important;
    text-transform: none;
    letter-spacing: 0;
}
.table > :not(caption) > * > * { border-color: var(--m-border); }
.table-hover > tbody > tr:hover > * { background: var(--m-surface-2) !important; }
.aqua-table-wrapper {
    background: var(--m-surface) !important;
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius) !important;
    box-shadow: var(--m-shadow-1);
}
.aqua-table-wrapper::after { display: none !important; }
.aqua-table thead { background: var(--m-surface-2) !important; background-image: none !important; }
.aqua-table thead th {
    background: var(--m-surface-2) !important;
    color: var(--m-ink-2) !important;
    font-weight: 600;
    border-bottom: 1px solid var(--m-border-strong) !important;
}
.aqua-table tbody tr:hover { background: var(--m-surface-2) !important; }

/* ---- Badges → soft flat pills ---- */
.badge { font-family: var(--font-body); border: none; border-radius: var(--m-pill); font-weight: 600; }
.metric-badge,
.badge-days-low, .badge-days-medium, .badge-days-high,
.badge-status-running, .badge-status-stopped, .badge-status-starting,
.badge-region, .badge-test {
    display: inline-flex; align-items: center; gap: 6px;
    border: none !important;
    border-radius: var(--m-pill) !important;
    padding: 4px 12px !important;
    font-family: var(--font-body) !important;
    font-weight: 600;
    font-size: 0.8rem;
    box-shadow: none !important;
    background-image: none !important;
    letter-spacing: 0;
}
.metric-badge      { background: #eef1f6 !important; color: #3a4658 !important; }
.metric-badge i    { color: var(--m-primary) !important; }
.badge-days-low    { background: var(--m-primary-050) !important; color: #174ea6 !important; }
.badge-days-medium { background: #fef7e0 !important; color: #8a6100 !important; }
.badge-days-high   { background: #fce8e6 !important; color: #b3261e !important; }
.badge-status-running { background: var(--m-success-bg) !important; color: #0b5228 !important; }
.badge-status-stopped { background: #fce8e6 !important; color: #8f1a17 !important; }
.badge-status-starting{ background: #fef7e0 !important; color: #8a6100 !important; }
.badge-region { background: #eef1f6 !important; color: #3a4658 !important; }
.badge-test   { background: #fef7e0 !important; color: #8a6100 !important; }
.badge.bg-success   { background: var(--m-success-bg) !important; color: #0b5228 !important; }
.badge.bg-secondary { background: #eef1f6 !important; color: #3a4658 !important; }

/* ---- Code / pre ---- */
code {
    font-family: var(--font-mono) !important;
    background: var(--m-primary-050);
    color: #174ea6;
    padding: 1px 6px;
    border-radius: 6px;
    border: none;
}
pre { font-family: var(--font-mono) !important; }
pre code, .bg-dark code, pre > code { background: transparent; border: none; padding: 0; color: inherit; }

/* ---- Modals ---- */
.modal-content {
    border: 1px solid var(--m-border) !important;
    border-radius: var(--m-radius) !important;
    box-shadow: 0 24px 60px rgba(16, 24, 40, 0.24);
}
.modal-title { color: inherit; }

/* ---- Feedback widget ---- */
.feedback-button {
    background: var(--m-primary) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: var(--m-shadow-1);
    font-family: var(--font-body);
    font-weight: 600;
}
.feedback-button:hover { background: var(--m-primary-strong) !important; color: #fff !important; }
.feedback-panel { border: 1px solid var(--m-border); border-radius: var(--m-radius); box-shadow: var(--m-shadow-2); }

/* ---- Recolour the loud aqua-* component classes to flat Material ---- */
.aqua-hero-header, .aqua-page-header {
    background: var(--m-primary) !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #fff;
}
.aqua-stats-card {
    background: var(--m-surface) !important;
    border-radius: var(--m-radius) !important;
    box-shadow: var(--m-shadow-1) !important;
    border-left: 4px solid var(--m-primary) !important;
}
.aqua-stats-card:hover { transform: none !important; box-shadow: var(--m-shadow-2) !important; }
.aqua-stats-icon { background: var(--m-primary) !important; background-image: none !important; border-radius: var(--m-radius-sm) !important; }
.aqua-stats-content h3, .stat-number, .cloud-card-stat .stat-number, .aqua-stat-item i { color: var(--m-primary) !important; }
.aqua-table-container, .aqua-stats-bar, .aqua-filter-bar {
    border-radius: var(--m-radius) !important;
    box-shadow: var(--m-shadow-1) !important;
}
.aqua-cloud-card { border-radius: var(--m-radius) !important; box-shadow: var(--m-shadow-1) !important; }
.aqua-cloud-card:hover { transform: none !important; box-shadow: var(--m-shadow-2) !important; border-color: var(--m-primary) !important; }
.cloud-card-stat { background: var(--m-surface-2) !important; background-image: none !important; border-radius: var(--m-radius-sm) !important; }
.cloud-card-title, .aqua-empty-state h3 { color: var(--m-ink) !important; }
.btn-aqua-build, .aqua-btn-primary {
    background: var(--m-primary) !important; background-image: none !important;
    color: #fff !important; border: none !important; box-shadow: none !important;
    border-radius: var(--m-radius-sm) !important;
}
.btn-aqua-build:hover, .aqua-btn-primary:hover { background: var(--m-primary-strong) !important; transform: none !important; box-shadow: var(--m-shadow-1) !important; color: #fff !important; }
.btn-aqua-grafana, .aqua-btn-gradient {
    background: var(--m-success) !important; background-image: none !important;
    color: #fff !important; border: none !important; box-shadow: none !important;
    border-radius: var(--m-radius-sm) !important;
}
.btn-aqua-grafana:hover, .aqua-btn-gradient:hover { background: #0b5228 !important; transform: none !important; color: #fff !important; }
.btn-cloud-open { background: var(--m-primary) !important; background-image: none !important; border-radius: var(--m-radius-sm) !important; }
.btn-cloud-open:hover { background: var(--m-primary-strong) !important; transform: none !important; }
.aqua-btn-yellow, .btn-sync-cta, .aqua-btn-sync {
    background: #f9ab00 !important; background-image: none !important;
    color: #3d2c00 !important; border: none !important; box-shadow: none !important;
    animation: none !important; border-radius: var(--m-radius-sm) !important;
}
.aqua-btn-yellow:hover, .btn-sync-cta:hover, .aqua-btn-sync:hover { background: #e79600 !important; transform: none !important; box-shadow: var(--m-shadow-1) !important; color: #3d2c00 !important; }
.aqua-btn-outline { border: 1px solid #fff !important; border-radius: var(--m-radius-sm) !important; }
.aqua-btn-info { background: #fff !important; color: var(--m-primary) !important; border-radius: var(--m-radius-sm) !important; }
.aqua-empty-icon { background: var(--m-primary) !important; background-image: none !important; }

/* ---- Table action buttons: calm by default, tint on hover ---- */
#content_table td .btn, .aqua-table td .btn { box-shadow: none !important; font-weight: 600; }
#content_table td .btn:hover, .aqua-table td .btn:hover { box-shadow: var(--m-shadow-1) !important; transform: none; }

/* ---- Actions kebab dropdown menu (secondary row actions) ---- */
.actions-menu .btn-kebab {
    background: #fff !important;
    color: var(--m-ink-2) !important;
    border: 1px solid var(--m-border-strong) !important;
    border-radius: var(--m-radius-sm) !important;
    padding: 4px 10px;
    line-height: 1;
    box-shadow: none !important;
}
.actions-menu .btn-kebab:hover, .actions-menu.show .btn-kebab { background: var(--m-surface-2) !important; color: var(--m-ink) !important; }
.actions-menu .dropdown-menu {
    border: 1px solid var(--m-border) !important;
    border-radius: var(--m-radius-sm) !important;
    box-shadow: var(--m-shadow-2) !important;
    padding: 6px;
    min-width: 190px;
}
.actions-menu .dropdown-item {
    border-radius: 6px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.88rem;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--m-ink);
}
.actions-menu .dropdown-item:hover { background: var(--m-surface-2); }
.actions-menu .dropdown-item.text-danger { color: var(--m-danger) !important; }
.actions-menu .dropdown-item.text-danger:hover { background: var(--m-danger-bg); }
.actions-menu .dropdown-item i { width: 16px; text-align: center; }

/* ---- Accessibility: respect reduced-motion ---- */
@media (prefers-reduced-motion: reduce) {
    *, .card, .btn, a.download { animation: none !important; transition: none !important; }
    .card:hover, .btn:hover, .btn:active { transform: none !important; box-shadow: var(--m-shadow-1) !important; }
}

