/* =========================================================
   1. RESET + DESIGN TOKENS
   ========================================================= */

:root {

		/* Blue */
    --org-blue: #175684;
    --org-blue-light: #e2eef7;
    --org-blue-dark: #11476b;
    --org-blue-fg-on-bg: #ffffff;
    --org-blue-fg-on-light: #175684;

    /* Mint */
    --org-mint: #3BC5A2;
    --org-mint-light: #d9f7ef;
    --org-mint-dark: #2AA186;
    --org-mint-fg-on-bg: #ffffff;
    --org-mint-fg-on-light: #256e5e;

    /* Orange / CTA */
    --org-orange: #D9651A;
    --org-orange-light: #fde9df;
    --org-orange-dark: #b45014;
    --org-orange-fg-on-bg: #ffffff;
    --org-orange-fg-on-light: #8a3b0f;

    --mint: var(--org-mint);
    --mint-hover: var(--org-mint-dark);
    --cta: var(--org-orange);
    --danger: #d63b32;
    --warning: #c37e17;
    --success: #3e8b58;
    --info: #1f74b6;
		
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
}

/* =========================================================
   2. APP SHELL
   ========================================================= */

.app-shell {
    display: flex;
    min-height: 100vh;
    background: var(--bg);
}

.flash {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.flash-error {
    background: #5b1b1b;
    color: #ffd2d2;
}

.flash-success {
    background: #1b5b2f;
    color: #d2ffe0;
}

.mint {
    color: var(--org-mint);
}

.theme-toggle {
    margin-left: 8px;
    background: var(--bg-elevated);
    color: var(--text-soft);
    border-radius: 4px;
    border: 1px solid var(--bg-elevated);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.theme-toggle.fading {
    opacity: 0;
    transform: rotate(120deg);
}

/* =========================================================
   3. DASHBOARD
   ========================================================= */

    .dashboard-home {
        padding: 40px 20px;
        max-width: 1000px;
        margin: 0 auto;
    }

.health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.health-grid .panel {
    padding: 20px;
}

.ok { color: var(--success-color, #3bc5a2); }
.error { color: var(--danger-color, #d9651a); }


    /* Welcome banner */
.dashboard-welcome {
    text-align: center;
    background: var(--panel-bg);
    padding: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    margin-bottom: 30px;
}

/* Tile grid below the welcome message */
.dashboard-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

/* Tile item */
.dash-tile {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.15s, border-color 0.15s, background 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.dash-tile:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    background: var(--bg-elevated);
}

.dash-tile svg {
    width: 38px;
    height: 38px;
    stroke: var(--accent);
}

.dash-tile span {
    font-size: 1.1rem;
    font-weight: 500;
}


    /* Hover state */
    .dash-tile:hover {
        background: var(--bg-elevated);
        border-color: var(--accent);
        transform: translateY(-2px);
    }


    .dashboard-panel {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin: 30px 0;
}

.dashboard-panel h2 {
    margin-bottom: 15px;
}

.expiry-row {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border-soft);
    text-decoration: none;
    color: var(--text);
}

.expiry-row:last-child {
    border-bottom: none;
}

.expiry-row:hover {
    background: var(--bg-elevated);
}

.expiry-icon svg {
    width: 20px;
    height: 20px;
}

.expiry-info {
    display: flex;
    flex-direction: column;
}

.expiry-name {
    font-weight: 500;
}

.expiry-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.expiry-date {
    font-weight: 500;
}

.status-expired .expiry-date {
    color: #ff4f4f;
}

.status-soon .expiry-date {
    color: #ffb347;
}

/* optional */
.status-ok {
    opacity: 0.6;
}

.topbar-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: none;
    border: none;
    color: inherit;
    padding: 0 8px;
    font: inherit;
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 6px 0;
    min-width: 140px;
    top: 100%;
    left: 0;
    z-index: 40;
}

.topbar-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 6px 12px;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: var(--bg-input);
}

.health-sub {
    margin: 6px 0 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.health-msg {
    margin-top: 8px;
    font-weight: 500;
}


/* ================================
   USER DROPDOWN (TOP RIGHT)
================================ */

.user-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 12px;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border-soft);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.user-dropdown-toggle:hover {
    background: var(--bg-action);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--panel-bg);
    border-radius: 6px;
    padding: 8px 0;
    min-width: 180px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 120ms ease, transform 120ms ease;
}

.user-dropdown:hover .user-dropdown-menu {
    display: block;
}

.user-dropdown-menu a,
.user-dropdown-menu span {
    display: block;
    padding: 8px 14px;
    color: var(--text);
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}

.user-dropdown-menu a:hover {
    background: var(--bg-input);
}

.user-dropdown.open .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.login-page {
	  height: 100%;
    display: flex;
    align-content: center;
    align-items: center;
}

.login-panel {
    max-width: 900px;
		width: 100%;
    margin: 0 auto;
}

.dropdown-muted {
    opacity: 0.6;
    cursor: default;
}

.logout-link {
    color: var(--org-mint);
    font-weight: 500;
}
.logout-link:hover {
    background: var(--bg-input);
    color: var(--org-mint-light);
}


/* ============================================
   Dashboard – Expiring Items Status Bar
   ============================================ */

.expiry-row {
    position: relative;
    border-left: 4px solid transparent;
    border-radius: 6px;
    padding-left: 14px; /* slight space for the bar */
}

/* Expired = Red */
.status-expired, .status-danger {
    border-left-color: #ff4f4f;
}

/* Expiring Soon = Amber */
.status-soon, .status-warning {
    border-left-color: #ffb347;
}

/* OK = Green-ish (muted for dark theme) */
.status-ok {
    border-left-color: #5fbf72;
    opacity: 0.8; /* optional subtle fade */
}

.expiry-row:hover {
    transition: all 0.4s ease;
}

.status-expired:hover {
    box-shadow: 0 0 10px rgba(255, 79, 79, 0.25);
}
.status-soon:hover {
    box-shadow: 0 0 10px rgba(255, 179, 71, 0.25);
}
.status-ok:hover {
    box-shadow: 0 0 10px rgba(95, 191, 114, 0.25);
}

/* ============================================
   Dashboard Stats Row
   ============================================ */

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-item {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-item svg {
    width: 28px;
    height: 28px;
    margin-bottom: 10px;
    stroke: var(--accent);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* =========================================================
   4. MAIN AREA + TOPBAR
   ========================================================= */
.global-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--sidebar-border);
    z-index: 2000;

    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

.topbar-left img {
    height: 36px;
    display: block;
}

.layout-wrapper {
    display: flex;
    margin-top: 56px; /* push content below global top bar */
    height: calc(100vh - 56px);
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-y: auto;
}

/* Top bar inside main area */
.topbar {
    height: 52px;
    border-bottom: 1px solid var(--border);
    background: #10161e;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    gap: 24px;
}

.topbar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-soft);
    align-items: center;
    padding: 0 12px;
}

.topbar-title img {
    max-height: 36px;
    padding-right: 32px;
}

.topbar-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;   
    padding-left: 20px; 
}

/* Style for the nav items */
.topbar-nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    padding: 0 10px;
}

.topbar-nav a:hover {
    color: var(--accent);
}

.topbar-right {
    display: flex;
    font-size: 14px;
    color: var(--text-muted);
    align-items: flex-end;
}

.global-search-bar {
    position: absolute;
    top: 64px; /* height of your topbar */
    left: 0;
    right: 0;

    background: var(--panel-bg-dark);
    padding: 12px 20px;

    display: none;
    z-index: 200; /* high enough, but not insane */

    align-items: center;
    gap: 12px;
}

.search-bar-div {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 60%;
    margin: 0 auto;
    padding: 8px;
    background: var(--bg-elevated);
}

.global-search-bar.active {
    display: flex; /* only visible when active */
}

.global-search-bar input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    padding: 8px 10px;
    color: var(--text);
}

.search-mode-btn, .topbar-search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--text-soft);
}

.gs-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.global-search-results {
    position: absolute;
    top: 64px;
    left: 20px;
    right: 20px;
    max-height: 350px;
    overflow-y: auto;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: none;
    margin: 0 auto;
    max-width: 1024px;
}

.global-search-results.active {
    display: block;
}

.gs-result {
    display: block;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-soft);
    text-decoration: none;
    color: var(--text);
    background: var(--bg-input);
}

.gs-result:hover {
    background: var(--bg-elevated);
}

.gs-label {
    font-weight: 500;
}

.gs-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}


/* =========================================
   CUSTOMER CSS
   ========================================= */

.customer-context-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding: 14px 18px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 6px;
}

.customer-context-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.customer-context-logo {
    width: auto;
    height: 48px;
    object-fit: contain;
    border-radius: 4px;
}

.customer-context-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    background: #2a2a2a;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
}

.customer-context-meta h1 {
    margin: 0;
    padding: 0;
    font-size: 20px;
}

.customer-context-tag {
    display: inline-block;
    background: #444;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 4px;
    font-size: 12px;
}

.customer-context-actions a {
    margin-left: 6px;
}

.breadcrumbs {
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-soft);
    display: flex;
    align-items: center;          /* <— vertical centering */
    transition: 0.4s ease all;
}

.breadcrumbs ul {
    display: flex;               /* <— lay items horizontally */
    align-items: center;         /* <— vertical centering of icons/text */
    gap: 6px;                    /* <— small spacing */
    padding: 0;
    margin: 0;
    list-style: none;
}

.breadcrumbs li {
    display: flex;
    align-items: center;         /* <— ensure links + separators align */
}

.breadcrumbs li::after {
    content: '/';
    margin-left: 6px;
    opacity: 0.5;
}

.breadcrumbs li:last-child::after {
    content: '';
}

.breadcrumbs a,
.breadcrumbs span {
    display: flex;
    align-items: center;         /* <— ensures the home icon is centered too */
    color: var(--text-bright);
    text-decoration: none;
    transition: 0.4s ease all;
}

.breadcrumbs a {
    color: var(--text-bright);
    text-decoration: none;
}

.breadcrumb-sep {
    margin: 0 6px;
    opacity: 0.6;
}


/* ============================
   SIDEBAR LOGO
   ============================ */

.nav-sidebar {
    height: calc(100vh - 56px);
    overflow-y: auto;
}

.nav-sidebar-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px 16px;
    margin-bottom: 6px;
}

.nav-sidebar-logo img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* hide collapsed icon when expanded */
.nav-sidebar.nav-expanded .logo-collapsed {
    display: none;
}

/* hide expanded logo when collapsed */
.nav-sidebar:not(.nav-expanded) .logo-expanded {
    display: none;
}

/* collapsed mode — centre the icon tighter */
.nav-sidebar:not(.nav-expanded) .nav-sidebar-logo {
    padding: 8px 0;
}


/* =========================================================
   5. PAGE WRAPPER
   ========================================================= */

.page-content-wrapper {
    flex: 1;
    padding: 32px 40px;
}

.page-content {
    width: 100%;
}

/* Page header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
}

.page-header h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
}

/* =========================================================
   6. PANELS (cards)
   ========================================================= */

.panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 22px 26px;
    border-radius: 8px;
    margin-bottom: 26px;
}

.panel-header h2 {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 600;
}

/* =========================================================
   7. BUTTONS
   ========================================================= */

.btn-primary {
    padding: 9px 18px;
    border-radius: 6px;
    border: none;
    background: var(--bg-action);
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: 0.4s ease all;
}

.btn-primary:hover {
    background: var(--bg-action-hover);
    border-color: var(--accent);
    color: var(--text);
}

.btn-secondary {
    padding: 9px 16px;
    border-radius: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: #1a222b;
}

.btn-small {
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    color: var(--text-soft);
    font-size: 13px;
    cursor: pointer;
}

.btn-small:hover {
    background: #212831;
    color: var(--text);
}

.btn-danger {
    background: #472323;
    border-color: #7a3b3b;
    color: #ffb3b3;
}

.btn-danger:hover {
    background: #5a2b2b;
    border-color: #a55353;
}

.copy-toast {
    position: fixed;
    left: 24px;
    bottom: 24px;
    background: #1b1f24;
    color: #d5ffd5;
    border-left: 6px solid var(--success);
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 0 14px rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    z-index: 99999;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: auto;
    min-width: 200px;
}

.copy-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.copy-toast-icon {
    color: var(--success);
    font-size: 18px;
}

.copy-toast-close {
    margin-left: auto;
    cursor: pointer;
    opacity: .6;
}

.copy-toast-close:hover {
    opacity: 1;
}

.copy-toast-bar {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    width: 100%;
    background: var(--success);
    animation: toast-bar 3s linear forwards;
    border-radius: 4px;
}

@keyframes toast-bar {
    from { width: 100%; }
    to   { width: 0%; }
}


/* =========================================================
   8. FORMS (Create/Edit pages)
   ========================================================= */

/* Basic form layout */
.form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.form-group {
    margin-bottom: 24px;
}

/* Standard form row */
.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.btn-m365-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;                
    color: var(--org-mint);  
    text-decoration: none;
    font-size: 15px;
    padding: 6px 0;  
    margin-top: 16px;        
}
.btn-m365-login svg {
    flex-shrink: 0;          
    display: block;          
}


.form-row label {
    font-size: 14px;
    color: var(--text-soft);
    font-weight: 500;
}

.required {
    color: #ffb366;
    margin-left: 2px;
}

/* ---- Inline row (multiple inputs in one row) ---- */
.form-row-inline {
    display: flex;
    gap: 22px;
    margin-bottom: 18px;
}

/* Column inside inline row */
.form-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Narrow column (e.g., checkboxes, decimals) */
.form-col.checkbox-col {
    flex: 0 0 120px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* ---- Input elements ---- */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    color: var(--text);
    font-size: 14px;
}

input[type="number"] {
    max-width: 140px;
}

textarea {
    resize: vertical;
}

/* ---- Checkbox rows ---- */
.checkbox-row {
    display: flex;
    align-items: left;
    gap: 10px;
}

.checkbox-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
}

/* ---- Errors ---- */
.form-error {
    color: #ffb3b3;
    font-size: 13px;
    margin-top: 4px;
}

/* ---- Form actions ---- */
.form-actions {
    margin-top: 18px;
    display: flex;
    gap: 10px;
}

/* =========================================================
   RICH TEXT EDITOR (LIGHTWEIGHT)
   ========================================================= */

.rt-wrapper {
    border: 1px solid var(--border);
    background: var(--bg-input);
    border-radius: 4px;
    margin-bottom: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ───────────────────────────────────────────────
   Embedded Passwords – Sidebar Styling
   Matches existing BurtonDocs UI (flat, clean)
   ─────────────────────────────────────────────── */

/* Container list */
.embedded-passwords-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.embedded-password-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.embedded-generate {
	padding: 4px 8px;
}

.password-input-wrapper {
	  display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
    align-content: center;
    flex-wrap: nowrap;
    padding: 14px 0;
}

.embedded-password-item:last-child {
    border-bottom: none;
}

/* Collapsed header row */
.embedded-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Name + username stack */
.embedded-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.embedded-item-name {
    font-weight: 600;
    color: var(--text-color);
}

.embedded-item-username {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Buttons */
.embedded-item-actions {
    display: flex;
    gap: 6px;
}

.embedded-item-actions .btn-icon {
    background: var(--btn-grey-bg);
    border: 1px solid var(--btn-grey-border);
    border-radius: 6px;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Expanded details */
.embedded-password-details {
    margin-top: 8px;
    padding: 8px 0 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hidden {
    display: none !important;
}

/* Field rows inside expanded view */
.embedded-password-details .field-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.embedded-password-details .field-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.embedded-password-details .field-value {
    font-size: 0.95rem;
    color: var(--text-color);
}

/* Password reveal block */
.embedded-password-pass {
    font-family: var(--font-mono, monospace);
    font-size: 0.95rem;
}

.pw-masked {
    letter-spacing: 2px;
}

/* Show/hide button */
.embedded-showpass {
    margin-top: 6px;
    justify-content: center;
}

/* Add Password button → matches other UI buttons */
.embedded-toggle-add {
    margin-bottom: 12px;
}

.embedded-toggle-eye {
    margin-top: 8px;
}

/* Create form */
.embedded-password-create-form .form-row {
    margin-bottom: 10px;
}

.password-flex {
    display: flex;
    gap: 6px;
    width: 100%;
}

.password-flex .btn-icon {
    padding: 4px;
    border-radius: 6px;
    border: 1px solid var(--btn-grey-border);
    background: var(--btn-grey-bg);
}

.form-actions {
    display: flex;
    gap: 8px;
}

.embedded-empty {
    color: var(--text-muted);
    padding: 6px 0;
    font-style: italic;
}


.hidden {
    display: none !important;
}
/* Container for each embedded password row */
.ep-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

/* Name + username group */
.ep-row-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Username styling */
.ep-username {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Actions area */
.ep-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* The action buttons */
.ep-row-actions .btn-icon {
    padding: 4px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
}

/* Expanded details container */
.ep-details {
    padding: 8px 0 12px 0;
}

/* Fix the detail-row layout */
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.detail-label {
    font-weight: 500;
    opacity: 0.7;
}

.detail-value {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ep-details .detail-value {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    max-width: 100%;
		justify-content: flex-end;
}
.ep-plain {
    word-break: break-all;
}


/* ------------------------------
   TOOLBAR
------------------------------ */

.rt-toolbar {
    display: flex;
    gap: 4px;
    padding: 6px;
    background: var(--panel-bg-dark);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.rt-toolbar button {
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    color: var(--text);
    font-size: 13px;
    padding: 3px 6px;
    border-radius: 3px;
    cursor: pointer;
    line-height: 1;
}

.rt-toolbar button:hover {
    background: var(--bg-action-hover);
}

/* Ensure icons appear centred */
.rt-toolbar button svg {
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

.rt-toolbar button.active {
    background: var(--bg-action-hover);
    border-color: var(--accent);
    color: var(--text);
}

.rt-inline-image {
    display: block;
    max-width: 100%;
    margin: 10px 0;
    border-radius: 4px;
}


/* ------------------------------
   EDITABLE AREA
------------------------------ */

.rt-editor {
    min-height: 140px;
    padding: 10px;
    color: var(--text);
    line-height: 1.5;
    outline: none;
    white-space: pre-wrap;
}

/* ------------------------------
   CONTENT FORMATTING
------------------------------ */

.rt-editor ul,
.rt-editor ol {
    margin-left: 1.2rem;
    padding-left: 0.2rem;
}

.rt-editor blockquote {
    margin: 0.6rem 0;
    padding: 0.4rem 0.8rem;
    border-left: 3px solid var(--accent);
    color: var(--text-soft);
}

.rt-editor pre {
    margin: 0.6rem 0;
    padding: 0.6rem;
    background: #11151c;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: Consolas, monospace;
    font-size: 13px;
    overflow-x: auto;
}


/* =========================================================
   9. ASSET TYPE — FIELD BUILDER
   ========================================================= */

/* Wrapper for all field items */
#asset-type-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Each field card */
.asset-type-field {
    background: var(--bg-elevated);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Header row (Field # + remove button) */
.asset-type-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.asset-type-field-header span {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-soft);
}

.asset-type-field-header .btn-small {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    background: #3a2b2b;
    border: 1px solid #5a4040;
    color: #e5b5b5;
    cursor: pointer;
}

.asset-type-field-header .btn-small:hover {
    background: #513636;
}

/* Body container */
.asset-type-field-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Inline row for Name / Required / Hint etc. */
.asset-type-field-body .form-row-inline {
    display: flex;
    gap: 18px;
}

/* Columns inside each inline row */
.asset-type-field-body .form-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Narrow checkbox column */
.asset-type-field-body .checkbox-col {
    flex: 0 0 120px;
    align-items: flex-start;
}

/* Inputs inside field cards */
.asset-type-field-body input[type="text"],
.asset-type-field-body input[type="number"],
.asset-type-field-body select {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;
    border-radius: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    color: var(--text);
}

.asset-type-field-body input[type="number"] {
    max-width: 140px;
}

/* Dropdown */
.asset-type-field-body select {
    appearance: none;
    background-position: right 10px center;
}

/* Panel footer (Add Field button area) */
.panel-footer {
    display: flex;
    justify-content: flex-start;
}

#add-field-btn {
    padding: 7px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
}

#add-field-btn:hover {
    background: #1a222b;
}

.page-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.type-icon i {
    font-size: 36px;
    opacity: 0.9;
}

.panel h2 {
    margin-bottom: 16px;
    font-size: 18px;
}

.field-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    padding: 10px 0;
    border-bottom: 1px solid #2f2f2f;
}

.field-row:last-child {
    border-bottom: none;
}

.field-label {
    font-weight: 500;
    color: var(--text);
}

.field-value {
    color: var(--text-soft);
}

.notes-block {
    white-space: pre-line;
}

.muted {
    opacity: 0.55;
}

/* =========================================================
   ASSET LIST TABLE
   Matches Customers / Passwords list styling
   ========================================================= */

.asset-list-wrapper {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
}

.asset-table {
    width: 100%;
    border-collapse: collapse;
}

.asset-table thead th {
    font-size: 14px;
    padding: 14px 18px;
    text-align: left;
    color: var(--text-soft);
    background: var(--panel-bg-alt);
    border-bottom: 1px solid var(--panel-border);
}

.asset-table tbody tr {
    background: var(--panel-bg);
    border-bottom: 1px solid var(--panel-border);
}

.asset-table tbody tr:hover {
    background: var(--panel-hover);
}

.asset-table td {
    padding: 14px 18px;
    font-size: 15px;
    color: var(--text);
    vertical-align: middle;
}

.asset-table td.actions {
    white-space: nowrap;
    text-align: right;
    padding-right: 18px;
}

.asset-table .btn-secondary {
    margin-right: 6px;
}

.asset-table .btn-danger {
    margin-left: 2px;
}

.password-quick-icons {
    display: flex;
    gap: 10px;
    align-items: center;
    height: 52.5px;
}

.password-quick-icons .quick-icon svg {
    width: 19px;
    height: 19px;
}

.password-quick-icons .quick-icon:not(.icon-disabled) svg {
    stroke: var(--text) !important;
    opacity: 1 !important;
}

.icon-disabled {
    opacity: 0.25;
    pointer-events: none;
}

.quick-icon.copied {
    opacity: 1 !important;
    filter: drop-shadow(0 0 4px var(--accent));
}

.password-action-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1;
}

/* =========================================================
   10. ICON PICKER (Modal + Tiles + Inline Preview)
   ========================================================= */

/* ---------- Modal shell ---------- */
.icon-picker-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9000;
}

.icon-picker-modal.is-open {
    display: flex;
}

/* ---------- Dialog ---------- */
.icon-picker-dialog {
    width: 650px;
    max-height: 80vh;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ---------- Header ---------- */
.icon-picker-dialog .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.icon-picker-dialog .modal-header h2 {
    font-size: 16px;
    margin: 0;
    color: var(--text);
}

#icon-picker-close {
    background: transparent;
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    font-size: 18px;
    cursor: pointer;
    line-height: 28px;
    text-align: center;
}
#icon-picker-close:hover {
    background: var(--bg-input);
    color: var(--text);
}

/* ---------- Search area ---------- */
.icon-picker-search {
    padding: 12px 16px;
    background: var(--bg-elevated);
}

#icon-picker-filter {
    width: 100%;
    padding: 8px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    color: var(--text);
}
#icon-picker-filter:focus {
    outline: none;
    border-color: var(--accent);
}

/* ---------- Grid ---------- */
.icon-picker-grid {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--bg-elevated);

    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

/* ---------- Tiles ---------- */
.icon-picker-tile {
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;

    transition: background 0.2s, border-color 0.2s;
}

.icon-picker-tile:hover {
    background: var(--bg);
    border-color: var(--accent);
}

/* Tile icon (SVG or IMG) */
.icon-picker-tile img,
.icon-picker-tile svg {
    width: 28px;
    height: 28px;

    /* Make dark SVGs turn light without touching the files */
    filter: invert(85%) brightness(1.3);
    opacity: 0.9;

    transition: opacity 0.15s ease;
}

.icon-picker-tile:hover img,
.icon-picker-tile:hover svg {
    opacity: 1;
}

/* Label under icon */
.icon-picker-label {
    font-size: 12px;
    color: var(--text-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Pagination ---------- */
.modal-footer {
    padding: 10px 16px;
    background: var(--bg);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
}

#icon-page-prev,
#icon-page-next {
    padding: 6px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    color: var(--text);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

#icon-page-prev:hover,
#icon-page-next:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
    color: var(--text);
}

.icon-page-info {
    font-size: 13px;
    color: var(--text-muted);
}

/* ---------- Inline preview (main form) ---------- */
.icon-picker-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 400px; /* predictable, expands right */
}

.icon-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
}

/* Show selected icon */
.icon-preview-img {
    width: 24px;
    height: 24px;
    filter: invert(85%) brightness(1.3);
    opacity: 0.9;
}

/* The text label (icon name) */
.icon-preview-label {
    font-size: 14px;
    color: var(--text-soft);
    white-space: nowrap;
}

/* Placeholder when no icon chosen */
.icon-preview-placeholder {
    font-size: 14px;
    color: var(--text-muted);
}

/* =========================================================
   11. TABLES & LIST VIEWS (Customer, Assets, Passwords, Types)
   ========================================================= */

/* ---------- Shared table wrapper ---------- */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 24px;
}

/* ---------- Generic table style ---------- */
.table-generic {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

/* Table header */
.table-generic thead th {
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
    position: relative;
    cursor: default; /* sortable tables override this */
}

/* Table body */
.table-generic tbody td {
    padding: 12px 14px;
    font-size: 14px;
    color: var(--text);
    border-bottom: 1px solid var(--border-soft);
}

/* Row hover */
.table-generic tbody tr:hover {
    background: rgba(255,255,255,0.04);
}

/* Remove border on last row */
.table-generic tbody tr:last-child td {
    border-bottom: none;
}

/* ---------- Sortable columns ---------- */
th.sortable {
    cursor: pointer;
}

th.sortable .sort-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: var(--text-muted);
    opacity: 0.4;
}

/* Active sort states */
th.sort-asc .sort-arrow {
    opacity: 1;
}
th.sort-asc .sort-arrow::after {
    content: "▲";
}

th.sort-desc .sort-arrow {
    opacity: 1;
}
th.sort-desc .sort-arrow::after {
    content: "▼";
}

/* ---------- Clickable rows ---------- */
.row-clickable {
    cursor: pointer;
}

.row-clickable td {
    transition: background 0.15s;
}

/* ---------- Inactive rows (soft fade) ---------- */
.row-inactive {
    opacity: 0.55;
}

.row-inactive:hover {
    opacity: 0.75;
    background: rgba(255,255,255,0.04);
}

/* =========================================================
   11.1. Customer List Specific
   ========================================================= */

.table-customer-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.customer-header {
    display: flex;
    flex-direction: row;
    gap: 24px;
    justify-content: flex-start;
    align-content: center;
    justify-items: start;
    flex-wrap: nowrap;
    align-items: center;
}

/* Initial bubble */
.table-customer-avatar {
    width: 28px;
    height: 28px;
    background: var(--bg-elevated);
    border-radius: 6px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

/* "Pill" styling (for type/status etc.) */
.pill {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
}

.pill-type {
    background: #24334a;
    color: #d9e4f5;
}

.pill-status {
    background: var(--success);
    color: #c2e1c1;
}

.pill-empty {
    color: var(--text-soft);
}

/* Arrow column */
td.td-actions {
    width: 32px;
    text-align: right;
    padding-right: 6px;
}

.row-arrow {
    font-size: 16px;
    color: var(--text-muted);
}

.row-arrow:hover {
    color: var(--text);
}

/* =========================================================
   11.2. Asset Type List
   ========================================================= */

.asset-type-table {
    width: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-elevated);
}

.asset-type-header,
.asset-type-row {
    display: grid;
    grid-template-columns: 50px 2fr 2fr 1fr 120px;
    align-items: center;
    padding: 12px 16px;
    font-size: 14px;
}

.asset-type-header {
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

.asset-type-row {
    border-bottom: 1px solid var(--border-soft);
}

.asset-type-row:last-child {
    border-bottom: none;
}

.asset-type-row:hover {
    background: rgba(255,255,255,0.04);
}

/* Icon column */
.col-icon img {
    width: 22px;
    height: 22px;
    filter: invert(85%) brightness(1.3);
}

.asset-type-table .col-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Small action buttons */
.asset-type-table .btn-small {
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    color: var(--text);
    cursor: pointer;
}

.asset-type-table .btn-small:hover {
    background: var(--bg);
    border-color: var(--accent);
}

/* Search bar above list */
.search-input {
    padding: 8px 12px;
    width: 260px;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    color: var(--text);
}
.search-input:focus {
    outline: none;
    border-color: var(--accent);
}

/* =========================================================
   12. FORMS — Global & Module-Specific
   ========================================================= */

/* ---------- Form wrapper ---------- */
.form {
    width: 100%;
    max-width: 900px;
}

/* ---------- Basic form row ---------- */
.form-row {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ---------- Form labels ---------- */
.form-row label,
.form-col label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-soft);
}

/* Required indicator (automatic when you add .required) */
.form-row.required label::after,
.form-col.required label::after {
    content: " *";
    color: #ffb366;
    font-weight: 600;
}

/* ---------- All inputs ---------- */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    color: var(--text);
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.15s ease;
}

/* Textarea specific */
textarea {
    resize: vertical;
    min-height: 70px;
}

/* Focus states */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
}


/* ---------- Form actions (submit row) ---------- */
.form-actions {
    margin-top: 24px;
    display: flex;
    gap: 10px;
}

/* =========================================================
   12.1. INLINE ROWS (Used heavily in Asset Type fields)
   ========================================================= */

.form-row-inline {
    display: flex;
    gap: 18px;
    margin-bottom: 14px;
}

/* Columns inside inline rows */
.form-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Narrow checkbox columns */
.form-col.checkbox-col {
    flex: 0 0 150px;
}

/* Narrow numeric columns */
.form-col.number-col {
    flex: 0 0 120px;
}

/* =========================================================
   12.2. Error Messages
   ========================================================= */

.form-error {
    margin-top: 4px;
    font-size: 13px;
    color: #ff9c9c;
}

/* =========================================================
   12.3. FIELD BLOCKS (create/edit asset type)
   ========================================================= */

.asset-type-field {
    background: var(--bg-elevated);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 16px;
}

/* Header row */
.asset-type-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.asset-type-field-header span {
    font-weight: 600;
    color: var(--text-soft);
}

/* Remove button inside field blocks */
.asset-type-field-header .btn-small {
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 6px;
    background: #402121;
    color: #f9bdbd;
    border: 1px solid #633;
    cursor: pointer;
}
.asset-type-field-header .btn-small:hover {
    background: #542828;
    border-color: #a55;
}

/* =========================================================
   12.4. ICON ROW (Create/Edit Asset Type)
   ========================================================= */

.icon-picker-row {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 420px;
}

/* Icon preview container */
.icon-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
}

/* Icon inside preview */
.icon-preview-img {
    width: 28px;
    height: 28px;
    filter: invert(85%) brightness(1.3); /* same as grid */
}

.icon-preview-label {
    font-size: 14px;
    color: var(--text-soft);
    white-space: nowrap;
}

/* Placeholder when no icon selected */
.icon-preview-placeholder {
    color: var(--text-muted);
    font-size: 14px;
}

/* Pick Icon button */
#icon-picker-open {
    margin-left: 24px;
    white-space: nowrap;
}

/* =========================================================
   12.5. FORM PANELS (unify spacing)
   ========================================================= */

.panel {
    padding: 20px 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 22px;
}

.panel-header {
    margin-bottom: 18px;
}

.panel-header h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}

/* Panel footer (used for Add Field button) */
.panel-footer {
    margin-top: 16px;
    display: flex;
    justify-content: flex-start;
}

/* =========================================================
   12.6 Buttons inside forms
   ========================================================= */

.btn-small {
    padding: 6px 12px;
    border-radius: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
}

.btn-small:hover {
    background: var(--bg);
    border-color: var(--accent);
}

/* =========================================================
   TABLES — Customer, Passwords, Assets (Unified Fix)
   ========================================================= */

/* Table wrapper */
.table-customers,
.table-passwords {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

/* Header cells */
.table-customers th,
.table-passwords th {
    padding: 14px 14px;
    font-size: 13px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    font-weight: 500;
}

/* Force passwords list to left-align fully */
.password-list-wrapper {
    text-align: left !important;
}


/* Body cells */
.table-customers td,
.table-passwords td {
    padding: 14px 14px;
    font-size: 14px;
    color: var(--text);
    border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
}

/* Hover */
.table-customers tr:hover,
.table-passwords tr:hover {
    background: var(--bg);
}

/* Prevent 'centred' look in passwords table */
.table-passwords td {
    text-align: left;
}

/* ============================================
   ITG-STYLE CUSTOMER LIST PAGE
============================================ */

.customers-page .itg-section {
    margin-bottom: 26px;
}

.customers-page .itg-section-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--text-soft);
}

.customers-page .itg-tile-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.customers-page .itg-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 160px;
    padding: 12px;
    border-radius: 8px;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.customers-page .itg-tile:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
}

.customers-page .itg-tile-logo {
    width: auto;
    height: 72px;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border);
}

.customers-page .itg-tile-logo img {
    max-width: 100%;
    max-height: 100%;
}

.customers-page .itg-tile-placeholder {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.customers-page .itg-tile-name {
    margin-top: 6px;
    text-align: center;
    font-size: 13px;
    color: var(--text-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* EMPTY ROW (Favorites placeholder) */
.customers-page .itg-empty-row {
    padding: 12px 0;
}

.customers-page .itg-empty-note {
    opacity: 0.5;
    font-size: 13px;
}


/* SEARCH BAR */
.customers-page .customers-search-bar {
    margin: 12px 0 20px;
}

.customers-page .customers-search-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--text);
    font-size: 14px;
}

.customers-page .customers-search-input:focus {
    outline: none;
    border-color: var(--accent);
}

/* ============================================================
   ITG-STYLE TOOLTIP FOR RECENT/FAVOURITE TILES
   ============================================================ */

.itg-tile {
    position: relative;
    transition: 0.4s ease all;
}

.itg-tile:hover::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);

    transform: translateX(-50%);
    padding: 6px 10px;
    font-size: 13px;

    background: var(--bg-elevated);
    border: 1px solid var(--border-soft);
    color: var(--text);

    white-space: nowrap;
    border-radius: 6px;
    pointer-events: none;
    z-index: 9999;

    box-shadow: 0 4px 12px rgba(0,0,0,0.45);
    opacity: 1;
}

.itg-tile::after {
    opacity: 0;
    transition: opacity .15s ease;
}

.itg-tile:hover::after {
    opacity: 1;
}


/* =========================================================
   VIEW LAYOUT — Main content + Right Sidebar
   ========================================================= */

.view-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 300px;
    gap: 32px;
    align-items: start;
}

/* Left main area */
.main-area {
    min-width: 0;
}

/* Right sidebar column */
.detail-sidebar {
    border-left: 1px solid var(--border-soft);
    padding-left: 24px;
    padding-top: 4px;
}

/* Sidebar sections */
.detail-sidebar-section {
    margin-bottom: 26px;
}

.detail-sidebar-section h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 10px;
}

/* =========================================================
   PASSWORD VIEW — Show/copy buttons, layout fixes
   ========================================================= */

/* Use a clean, aligned inline layout */
.password-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

/*>Password field (hidden dots) */
.password-hidden {
    font-size: 16px;
    letter-spacing: 3px;
    color: var(--text);
    padding: 6px 0;
}

/* "Show password" button */
.btn-password-show {
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border-soft);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.btn-password-show:hover {
    background: var(--bg-elevated);
}

/* Copy icon button */
.password-copy-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-copy-btn:hover {
    background: var(--bg-elevated);
}

.detail-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-soft);
}

.detail-label {
    font-size: 14px;
    color: var(--text-soft);
}

.detail-value {
    font-size: 15px;
    color: var(--text);
}

/* =========================================================
   GLOBAL LINK STYLING — no underline, no visited colour
   ========================================================= */

a {
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Prevent browser visited colour */
a:visited {
    color: var(--accent);
}

/* Tables and detail views (more muted by default) */
.detail-value a,
.detail-sidebar a,
.table-customers a,
.asset-type-table a {
    color: var(--accent);
    text-decoration: none;
}

.detail-value a:hover,
.detail-sidebar a:hover,
.table-customers a:hover,
.asset-type-table a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Do NOT apply global link styling to buttons */
.btn-primary,
.btn-primary:visited,
.btn-secondary,
.btn-secondary:visited,
.btn-small,
.btn-small:visited {
    color: inherit !important;
    text-decoration: none !important;
}

/* =========================================================
   GLOBAL SMALL ICON BUTTONS
   ========================================================= */

.icon-btn,
.detail-copy-btn,
.password-toggle,
.related-remove,
.related-clear,
.js-remove-field,
.btn-icon {
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1;
}

.icon-btn:hover,
.detail-copy-btn:hover,
.password-toggle:hover,
.related-remove:hover,
.related-clear:hover,
.js-remove-field:hover,
.btn-icon:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
    color: var(--text);
}

.btn-icon-lt {
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1;
}

.btn-icon-lt img {
    color: var(--text-soft);
}

/* SVGs in small buttons */
.icon-btn svg,
.detail-copy-btn svg,
.password-toggle svg,
.related-remove svg,
.related-clear svg,
.js-remove-field svg,
.btn-icon svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-soft);
    transition: stroke 0.15s ease;
}

.icon-btn:hover svg,
.detail-copy-btn:hover svg,
.password-toggle:hover svg,
.related-remove:hover svg,
.related-clear:hover svg,
.js-remove-field:hover svg,
.btn-icon:hover svg {
    stroke: var(--text);
}

/* =========================================================
   12.3. FIELD BLOCKS (create/edit asset type)
   ========================================================= */

.asset-type-field {
    background: var(--bg-elevated);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 16px;
}

/* Header row */
.asset-type-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.asset-type-field-header span {
    font-weight: 600;
    color: var(--text-soft);
}

/* Remove button inside field blocks */
.asset-type-field-header .btn-small {
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 6px;
    background: #402121;
    color: #f9bdbd;
    border: 1px solid #633;
    cursor: pointer;
}
.asset-type-field-header .btn-small:hover {
    background: #542828;
    border-color: #a55;
}

.draggable-field {
    cursor: move;
}

.draggable-field input,
.draggable-field select,
.draggable-field textarea,
.draggable-field button {
    cursor: default;
}

.draggable-field.dragging {
    opacity: 0.5;
    border: 1px dashed #888;
}

/* -----------------------------------------------------------
   RELATED ITEMS SIDEBAR WIDGET
   ----------------------------------------------------------- */

#related-items-section {
    margin-top: 20px;
}

/* -------------------------------
   Search box layout
--------------------------------*/
.related-search-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.related-mode-btn,
.related-search-clear {
    flex: 0 0 36px;
}

.related-search-input {
    flex: 1 1 auto;
}


.related-mode-btn:hover,
.related-search-clear:hover {
    background: var(--panel-hover, #2a2a2a);
}

.related-search-input:focus {
    outline: none;
    border-color: var(--accent, #4ea1ff);
}

/* -------------------------------------------
   Dropdown search results (IT Glue style)
------------------------------------------- */
.related-search-results {
    position: relative;
    z-index: 30;
}

.related-search-results ul.related-results-list {
    margin: 0;
    padding: 0;
    list-style: none;

    background: var(--panel-bg, #1f1f1f);
    border: 1px solid var(--border-color, #3a3a3a);
    border-radius: 6px;
    overflow: hidden;

    /* IT Glue-esque shadow */
    box-shadow: 0 4px 12px rgba(0,0,0,0.45);
}

.related-result-item {
    margin: 0;
    padding: 0;
}

.related-result-btn {
    width: 100%;
    text-align: left;

    background: transparent;
    border: none;
    color: var(--text-color, #d3d3d3);

    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
}

.related-result-btn:hover {
    background: var(--panel-hover, #2a2a2a);
}

.related-result-btn:focus {
    outline: none;
    background: var(--panel-hover, #2f2f2f);
}

/* -------------------------------------------
   Existing related items list
------------------------------------------- */
#related-items-list {
    margin-top: 6px;
    padding-left: 18px; /* bullet spacing */
}

#related-items-list li {
    margin: 4px 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}


#related-items-list a:hover {
    text-decoration: underline;
}

/* -------------------------------------------
   Delete button
------------------------------------------- */
.related-delete-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    color: var(--text-soft);

    width: 22px;
    height: 22px;
    border-radius: 4px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    padding: 0;
}

.related-delete-btn:hover {
    background: var(--panel-hover, #2a2a2a);
    border-color: var(--accent, #4ea1ff);
}

/* -------------------------------------------
   Empty state
------------------------------------------- */
.sidebar-empty {
    margin-top: 8px;
    font-size: 13px;
    opacity: 0.7;
}

/* =====================================================================
   ATTACHMENTS SIDEBAR — ITG-STYLE CLEANUP
   ===================================================================== */

/* Section wrapper */
.sidebar-block[data-block="attachments"] {
    margin-bottom: 26px;
}

/* Header */
.sidebar-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.sidebar-block-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
}

.sidebar-block-icon {
    font-size: 15px;
    opacity: 0.85;
}

/* Collapse toggle */
.sidebar-block-toggle {
    background: var(--bg-input);
    color: var(--text-soft);
    border: 1px solid var(--border-soft);
    padding: 3px 8px;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
}
.sidebar-block-toggle:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
    color: var(--text);
}

/* =====================================================================
   Dropzone (IT Glue style)
   ===================================================================== */

.upload-dropzone {
    border: 2px dashed var(--border-soft);
    border-radius: 6px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    background: var(--bg-input);
    color: var(--text-soft);
    transition: 0.15s ease;
    width: 100%;
    min-height: 120px;
    position: relative;
}

.upload-dropzone.dragover {
    border-color: var(--org-accent);
    background: rgba(199,80,0,0.1);
    color: var(--text);
}

.upload-dropzone input[type=file] {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}


.attachment-dropzone:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
}

.dropzone-inner {
    font-size: 14px;
    color: var(--text-soft);
    line-height: 1.5;
}

.dropzone-browse {
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
}

.dropzone-max {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0.8;
}

/* Drag-over state */
.attachment-dropzone.dragover {
    background: #1d2935;
    border-color: var(--accent-hover);
}

/* =====================================================================
   Attachment List
   ===================================================================== */

.attachment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.attachment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 6px 0;
    font-size: 14px;
}

.attachment-item + .attachment-item {
    border-top: 1px solid var(--border-soft);
}

/* Filename link */
.attachment-link {
    color: var(--accent);
    text-decoration: none;
    max-width: 210px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.attachment-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Delete button — unified dark pill style */
.attachment-delete-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1;
}
.attachment-delete-btn:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
    color: var(--text);
}

/* Empty state */
.attachment-empty {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* =====================================================================
   ATTACHMENT UPLOAD — PROGRESS BAR
   ===================================================================== */

.upload-progress {
    margin-top: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    padding: 10px;
    position: relative;
}

.upload-progress.hidden {
    display: none;
}

.upload-progress-bar {
    height: 8px;
    width: 0%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.15s linear;
}

.upload-progress-text {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-soft);
    text-align: center;
}

#related-items-list li.related-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 2px 7px;
    border-bottom: 1px solid var(--sidebar-border);
}

.related-icon svg {
    opacity: 0.9;
}

.related-text {
    flex: 1;
    min-width: 0;
}

.related-type {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.related-name {
    font-size: 13px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.related-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-actions svg {
    opacity: 0.85;
}

.related-mode-icon {
    opacity: 0.85;
    filter: brightness(1.4);
}

/* Shared button styling for the search bar */
.related-search-box button {
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    color: var(--text-soft);
    border-radius: 6px;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}


/* Hover state */
.related-search-box button:hover {
    background: var(--panel-hover);
    border-color: var(--sidebar-border-hover);
}

/* Active (click) */
.related-search-box button:active {
    background: var(--panel-active);
    border-color: var(--accent);
}

/* Remove the ugly browser inner shadow */
.related-search-box button:focus,
.related-search-box button:focus-visible {
    outline: none;
}

/* Ensure inline SVG inherits color correctly */
.related-search-box button svg,
.related-search-box button img {
    opacity: 0.9;
    width: 18px;
    height: 18px;
    filter: brightness(1.15);
}

.ri-icon {
    filter: brightness(1.6);
    opacity: 0.9;
}


.revision-summary {
    color: var(--text-soft);
}

.revision-text {
    color: var(--text-muted);
}

.revision-banner {
    background: #2a323c;
    border-left: 4px solid #c75000;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
}

.revision-banner .date {
    color: #9aa7b7;
    font-size: 13px;
}

.revision-banner .changed-pill {
    background: #c75000;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: auto;
}

.revision-banner .btn-small {
    margin-left: auto;
}

.field-changed .field-value {
    background: #c7500046;
    border-left: 6px solid #c75000;
    border-right: 1px solid #c75000;
    border-top: 1px solid #c75000;
    border-bottom: 1px solid #c75000;
    border-radius: 4px;
    padding: 2px 6px;
}


/* ----------------------------------------
    CUSTOMER ASSET TYPE VIEW
    ------------------------------------- */

/* ============================================
   FLEXIBLE TABLE (CLEAN & PROVEN)
============================================ */

.flex-table-wrapper {
    width: 100%;
    overflow: visible;
    position: relative;
}

/* MAIN SCROLL AREA */
.flex-table-scroll {
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
    z-index: 1;
    padding-bottom: 24px;
    text-align: left; 
    white-space: normal;
}

.flex-table-scroll table {
    margin-left: 0;
}

/* ACTUAL TABLE */
.flex-table {
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;       /* auto-size to content */
    min-width: 100%;          /* but never shrink smaller than container */
    table-layout: auto;       /* IMPORTANT: let columns size naturally */
		margin-right: auto;
}

.flex-table th,
.flex-table td {
    white-space: nowrap;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--panel-bg);
    text-align: left;
}

/* HEADER */
.flex-table thead th {
    background: var(--panel-bg);
    border-bottom: 2px solid var(--border-strong);
    font-weight: 600;
}
.flex-table td.fix-left,
.flex-table th.fix-left {
    position: sticky;
    left: 0;
    background: var(--panel-bg);
    z-index: 5;
		
    text-align: left;
    display: table-cell !important;
    vertical-align: middle;
    height: 100%;
}
.flex-table td.fix-left input[type="checkbox"] {
    margin: 0;
    display: block;
    margin: 3px 4px;
		text-align: left;
}

/* --------------------------------------------
   STICKY LEFT COLUMN (checkbox)
-------------------------------------------- */
.flex-table .fix-left {
    position: sticky;
    left: 0;
    z-index: 10;
    background: var(--panel-bg);
    border-right: 1px solid var(--border-strong);
    display: flex;
    align-items: flex-start;
}

.col-select {
		width: 32px !important;
		min-width: 32px !important;
		max-width: 32px !important;
}

/* --------------------------------------------
   STICKY RIGHT COLUMN (Actions)
-------------------------------------------- */
.flex-table .fix-right {
    position: sticky;
    right: 0;
    z-index: 10;
    background: var(--panel-bg);
    border-left: 1px solid var(--sidebar-border);
}

/* --------------------------------------------
   ELLIPSIS HANDLING
-------------------------------------------- */
.flex-table td.ell span {
    display: block;
    max-width: 240px;        /* adjust per column */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ACTIONS */
.actions-cell, .col-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* --------------------------------------------
   BOTTOM SCROLLBAR (ITG clone)
-------------------------------------------- */
.flex-table-bottom-scroll {
    height: 12px;
    overflow-x: auto;
    background: var(--panel-bg);
    padding-bottom: 8px;
    scrollbar-color: #222641;
}

/* ============================================
   FLEX TABLE SCROLLBAR STYLING
   ============================================ */

/* Main top scroll area */
.flex-table-scroll::-webkit-scrollbar {
    height: 10px;
}

.flex-table-scroll::-webkit-scrollbar-track {
    background: var(--panel-bg);      /* dark track */
    border-radius: 6px;
}

.flex-table-scroll::-webkit-scrollbar-thumb {
    background: var(--border-soft);   /* subtle thumb */
    border-radius: 6px;
}

.flex-table-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);    /* slightly brighter on hover */
}

/* Bottom mirrored scrollbar */
.flex-table-bottom-scroll::-webkit-scrollbar {
    height: 10px;
}

.flex-table-bottom-scroll::-webkit-scrollbar-track {
    background: var(--panel-bg);
    border-radius: 6px;
}

.flex-table-bottom-scroll::-webkit-scrollbar-thumb {
    background: var(--border-soft);
    border-radius: 6px;
}

.flex-table-bottom-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}


/* ============================================
   FLEX-TABLE — TRUNCATE + BELOW HOVER BUBBLE
   ============================================ */

.flex-table td.ell {
    position: relative;
}

.flex-table td.ell span {
    display: inline-block;
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* The bubble is rendered by the WRAPPER (above scrollbar) */
.flex-table-wrapper::after {
    opacity: 0;
    transition: opacity 0.5s;
		transition-timing-function: linear;
    content: attr(data-bubble);
    position: absolute;
    left: var(--bubble-left, -9999px);
    top: var(--bubble-top, -9999px);

    background: var(--bg-elevated);
    border: 1px solid var(--border-soft);
    padding: 6px 10px;
    border-radius: 4px;
    line-height: 1.8;
    /* MULTI-LINE WRAP FIX */
    white-space: normal;          /* allow wrapping */
    width: max-content;
    max-width: 420px;
    overflow-wrap: break-word;    /* modern, better */
    word-break: break-word;       /* fallback */

    font-size: 13px;
    color: var(--text);
    pointer-events: none;
    z-index: 999999;
}

.flex-table-wrapper[data-bubble-active="1"]::after {
    opacity: 1;
}

.expiry-red span {
    color: #ff4d4d;
    font-weight: 600;
}

.expiry-amber span {
    color: #ffb84d;
    font-weight: 600;
}

/* Expiration colouring for list view */
.status-expired {
    color: var(--danger);
    font-weight: 600;
}

.status-warning a, .status-amber a {
    color: var(--warning);
    font-weight: 600;
}

.expiry-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 500;
}

.expiry-banner.status-warning, .expiry-banner.status-amber {
    background: rgba(255, 170, 51, 0.18);
    border: 1px solid rgba(255, 170, 51, 0.35);
    color: #ffaa33;
}

.expiry-banner.status-danger, .expiry-banner.status-expired {
    background: rgba(255, 80, 80, 0.18);
    border: 1px solid rgba(255, 80, 80, 0.35);
    color: #ff6b6b;
}

.expiry-banner-icon svg {
    display: block;
}

.expiry-banner-text strong {
    margin-right: 4px;
}

/* Activity log badges */
.log-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.action-create {
    background: rgba(59, 197, 162, 0.15);
    color: var(--org-mint);
}

.action-update {
    background: rgba(255, 200, 120, 0.12);
    color: #e9c87b;
}

.action-delete {
    background: rgba(255, 85, 85, 0.12);
    color: #ff8484;
}

/* Module column clean-up */
.log-module {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* Record column formatting */
.log-record {
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Improve table density */
.panel table.table td,
.panel table.table th {
    padding-top: 8px;
    padding-bottom: 8px;
}

/* Hover row effect */
.panel table.table tbody tr:hover {
    background: var(--bg-elevated);
}

.role-matrix {
	text-wrap: nowrap;
	padding: 2px 12px;
}

.table.role-matrix td.perm {
    text-align: center;
    width: 80px;
}

.role-icon {
    vertical-align: middle;
}

.role-icon-yes,
.role-icon-yes {
    stroke: var(--success);
    color: var(--success);
}

.role-icon-no,
.role-icon-no {
    stroke: var(--warning);
    color: var(--warning);
    opacity: 0.85;
}

.perm {
	margin: 0 auto;
}

input#org_limit {
	max-width: 250px;
}

.text-right {
	display: flex;
	flex-direction: row;
}

.dashboard h1.dash-welcome {
    margin-bottom: 30px;
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
}

.dash-block h2 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.fav-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.fav-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: var(--panel-bg);
    border-radius: 8px;
    width: 110px;
    text-align: center;
}

.dash-grid-2 {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr 1fr;
    margin-top: 20px;
}

.dash-list-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
}

.dash-activity-item {
    border-bottom: 1px solid var(--border-soft);
    padding: 8px 0;
}

.dash-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.health-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.health-item label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 3px;
}

@media (min-width: 1200px) {
    .recent-updated-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px 18px;
    }
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.dash-table th {
    text-align: left;
    padding: 8px 0;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 1px solid var(--border-soft);
}

.dash-table td {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-soft);
}

.dash-table tr:hover td {
    background: rgba(255,255,255,0.03);
    border-radius: 4px;
}

.dash-table a {
    color: var(--accent);
}

.dash-col-date, .dash-col-date th {
    text-align: right!important;
    white-space: nowrap;
}


.opcache-reset {
	display: flex;
	flex-direction: row;
}