/* ── Overrides to make the new backoffice CSS coexist with Radzen/Bootstrap ── */

/* Ensure Radzen dialogs render above the new layout */
.rz-dialog-wrapper {
    z-index: 9999 !important;
}

.rz-dialog-overlay {
    z-index: 9998 !important;
}

/* Radzen notification on top */
.rz-notification {
    z-index: 10000 !important;
}

/* Reset some Bootstrap defaults that conflict with the new design */
.dashboard .main {
    padding: 0;
}

.dashboard a {
    color: inherit;
    text-decoration: none;
}

.dashboard a:hover {
    color: inherit;
    text-decoration: none;
}

/* Ensure the sidebar nav links don't get Bootstrap link styles */
.sidebar-nav a,
.sidebar-nav a:hover,
.sidebar-nav a:focus,
.sidebar-nav a:active {
    color: #f0f0f2;
    text-decoration: none;
}

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

.sidebar-nav a.subitem {
    color: #d7d7db;
}

/* Fix button resets from Bootstrap */
.sidebar-group-title,
.hamburger,
.sidebar-close,
.mobile-menu-fab {
    border: none;
    outline: none;
}

.sidebar-group-title:focus,
.hamburger:focus {
    outline: none;
    box-shadow: none;
}

/* Table inside .table-card should not inherit Bootstrap table styles */
.table-card table {
    margin-bottom: 0;
}

/* Status badge sizing fix */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Topbar actions layout */
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-icon-btn {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    color: #555;
    transition: background 0.15s;
}

.topbar-icon-btn:hover {
    background: #eef2ff;
}

/* Menu grid icon (hamburger replacement) */
.menu-grid-icon {
    display: block;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='2' cy='2' r='1.5' fill='%23555'/%3E%3Ccircle cx='8' cy='2' r='1.5' fill='%23555'/%3E%3Ccircle cx='14' cy='2' r='1.5' fill='%23555'/%3E%3Ccircle cx='2' cy='8' r='1.5' fill='%23555'/%3E%3Ccircle cx='8' cy='8' r='1.5' fill='%23555'/%3E%3Ccircle cx='14' cy='8' r='1.5' fill='%23555'/%3E%3Ccircle cx='2' cy='14' r='1.5' fill='%23555'/%3E%3Ccircle cx='8' cy='14' r='1.5' fill='%23555'/%3E%3Ccircle cx='14' cy='14' r='1.5' fill='%23555'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* Pagination buttons */
.secondary-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Filter row inputs inside new table */
.filter-row select {
    width: 100%;
    height: 30px;
    border: 1px solid #e2e5ec;
    border-radius: 3px;
    padding: 4px 6px;
    background: white;
    font-size: 12px;
}

.filter-row select:focus {
    outline: none;
    border-color: #1455d9;
    box-shadow: 0 0 0 3px rgba(20, 85, 217, 0.12);
}

/* Deployed version / build badge in sidebar */
.deployment-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    font-weight: 500;
    color: #4ade80 !important; /* bright light-green */
    background: rgba(74, 222, 128, 0.08);
    padding: 2px 6px;
    border-radius: 9999px;
    border: 1px solid rgba(74, 222, 128, 0.15);
    margin-top: 4px;
    white-space: nowrap;
    width: max-content;
}

.pulse-dot {
    width: 5px;
    height: 5px;
    background-color: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    animation: pulse-green 1.5s infinite;
}

@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(74, 222, 128, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
    }
}

/* Custom Dropdown / Popover for Status Filtering */
.custom-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0; /* Align right or left */
    z-index: 1000;
    margin-top: 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    width: 150px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.custom-dropdown-item {
    border: none;
    background: transparent;
    text-align: left;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.custom-dropdown-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.custom-dropdown-item.active {
    background: #f3e8ff !important; /* light purple background */
    color: #6b21a8 !important; /* dark purple text */
    font-weight: 600;
}

/* List / Card Toggle Button Group */
.active-toggle {
    background: #6b21a8 !important; /* premium purple */
    color: #ffffff !important;
}

.inactive-toggle {
    background: transparent !important;
    color: #64748b !important;
}

.inactive-toggle:hover {
    color: #334155 !important;
}
