@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Code:wght@300..800&family=Inter:opsz,wght@14..32,100..900&family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..24,400..600,0..1,0&family=Noto+Sans:ital,wght@0,100..900;1,100..900&family=Noto+Sans+Mono:wght@100..900&display=swap');

@font-face {
    font-family: 'Google Sans';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: local('Google Sans'), local('Product Sans');
}

@font-face {
    font-family: 'Google Sans';
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: local('Google Sans Italic'), local('Product Sans Italic');
}

/* --- Design System: CSS Variables --- */
:root {
    /* Brand Colors */
    --primary-color: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --accent-purple: #7c3aed;

    /* Semantic Colors */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;

    /* Gradients */
    --primary-gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-purple) 100%);
    --primary-gradient-light: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(124, 58, 237, 0.08) 100%);
    --primary-gradient-hover: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(124, 58, 237, 0.15) 100%);
    --dark-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);

    /* Backgrounds */
    --bg-main: #f4f7fe;
    --bg-card: #ffffff;
    --bg-code: #0f172a;
    --bg-highlight: #e7f0ff;
    --code-surface: #0e1b33;
    --code-surface-soft: #10213a;
    --code-text: #dbeafe;
    --code-muted: #7f95b6;
    --code-key: #8fb7ff;
    --code-string: #5eead4;
    --code-number: #f6c76f;
    --code-constant: #c4b5fd;
    --code-tag: #7dd3fc;
    --code-attribute: #a7f3d0;
    --code-operator: #93c5fd;
    --code-variable: #f0abfc;
    --code-comment: #7890af;

    /* Text */
    --text-main: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-link: var(--primary-color);

    /* Borders & Radius */
    --border-color: #e2e8f0;
    --border-light: #e9ecef;
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
    --border-radius-sm: 6px;
    --control-height: 44px;
    --control-padding-x: 15px;
    --control-line-height: 1.35;

    /* Shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 25px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-lg: 0 20px 40px -5px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 4px 12px rgba(37, 99, 235, 0.3);

    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.25s ease-in-out;

    /* Monospace */
    --font-family: 'Inter', 'Noto Sans', 'Aptos', 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-primary: var(--font-family);
    --font-mono: 'Google Sans Code', 'Noto Sans Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, 'Roboto Mono', 'Courier New', monospace;
}

.material-symbols-rounded {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-size: 1em;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-flex;
    overflow: hidden;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-feature-settings: 'liga';
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 20;
}

/* --- General & Layout --- */
html {
    font-size: 14.5px;
}

body {
    font-family: var(--font-family);
    letter-spacing: normal;
    background-color: #f8f9fa;
    color: #212529;
    font-size: 0.92rem;
    line-height: 1.45;
    padding: 20px;
    padding-top: 0; /* start layout from top edge of viewport */
}

button,
input,
select,
textarea,
optgroup {
    font-family: var(--font-family);
    letter-spacing: normal;
}

button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.btn,
[class*="-btn"],
[class*="btn-"],
.button,
[class*="-button"],
[class*="button-"],
.dash-btn,
.account-btn,
.perm-btn,
.blacklist-btn {
    box-shadow: none !important;
}

.dash-action-icon-wrap,
.dash-icon-box,
.users-metric-icon,
.account-icon-wrap,
.auth-mark,
.auth-list-icon,
.perm-group-icon,
.perm-mini-icon,
.blacklist-icon,
.tool-handoff-icon,
.summary-icon,
.verdict-icon,
.check-toggle-icon,
.tool-category-icon,
.recent-tool-icon,
.tab-loading-icon,
.context-menu-item-icon,
.gdpr-toggle-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
}

.dash-action-icon-wrap > svg,
.dash-icon-box > svg,
.users-metric-icon > svg,
.account-icon-wrap > svg,
.auth-mark > svg,
.auth-list-icon > svg,
.perm-group-icon > svg,
.perm-mini-icon > svg,
.blacklist-icon > svg,
.tool-handoff-icon > svg,
.summary-icon > svg,
.verdict-icon > svg,
.check-toggle-icon > svg,
.tool-category-icon > svg,
.recent-tool-icon > svg,
.tab-loading-icon > svg,
.context-menu-item-icon > svg,
.gdpr-toggle-icon > svg {
    display: block !important;
    margin: auto !important;
    flex: 0 0 auto;
}

p {
    font-size: 0.86rem;
}

.container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
}

/* Responsive container spacing */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 20px;
        max-width: calc(100vw - 20px);
    }
}

@media (min-width: 769px) {
    .container {
        margin: 20px auto;
    }
}

.page-header {
    text-align: center; /* center only the top title and quote */
    margin-bottom: 18px;
}

/* keep the request catcher card content left-aligned */
.tool-card.request-catcher { text-align: left; }

/* --- Compact Time Filters --- */
.compact-time-filters {
    display: flex;
    gap: 8px;
    align-items: stretch;
    flex-wrap: wrap;
}

.filter-dropdown {
    position: relative;
    display: inline-block;
}

.filter-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 12px;
    font-size: 1rem;
    min-height: var(--control-height);
    height: var(--control-height);
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #333;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    min-width: 180px;
    justify-content: space-between;
}

.filter-button:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
}

.filter-button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.filter-button .arrow {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.filter-button.open .arrow {
    transform: rotate(180deg);
}

.filter-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 160px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: none;
    margin-top: 2px;
}

.filter-dropdown-menu.show {
    display: block;
}

.filter-dropdown-item {
    display: block;
    padding: 6px 12px;
    font-size: 0.8rem;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.filter-dropdown-item:hover {
    background: #f8f9fa;
}

.filter-dropdown-item.active {
    background: var(--primary-color);
    color: white;
}

.filter-dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 4px 0;
}

.compact-custom-inputs {
    display: flex;
    gap: 4px;
    align-items: center;
}

.compact-input {
    padding: 0 12px;
    font-size: 1rem;
    min-height: var(--control-height);
    height: var(--control-height);
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 80px;
    box-sizing: border-box;
}

.compact-date-input {
    padding: 0 12px;
    font-size: 1rem;
    min-height: var(--control-height);
    height: var(--control-height);
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 130px;
    box-sizing: border-box;
}

.compact-apply-btn {
    padding: 6px 12px;
    font-size: 1rem;
    height: 38px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    background: white;
    color: var(--primary-color);
    cursor: pointer;
    white-space: nowrap;
    min-width: 0;
    width: auto;
}

.compact-apply-btn:hover {
    background: var(--primary-color);
    color: white;
}

.compact-refresh-btn {
    padding: 6px 20px;
    font-size: 1rem;
    height: 38px;
    border: none;
    border-radius: 4px;
    background: var(--primary-gradient);
    color: white;
    cursor: pointer;
    white-space: nowrap;
    width: auto;
    min-width: 100px;
    display: inline-block;
    margin: 0;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.compact-refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

/* Inline layout improvements for search controls with time filters */
.search-controls {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    margin-left: 15px;
    margin-right: 15px;
}

/* Responsive adjustments for search controls inline layout */
@media (max-width: 768px) {
    .search-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .search-controls .input-group {
        max-width: 100% !important;
    }
    
    .search-controls .compact-time-filters {
        order: 1;
    }
    
    .search-controls div[style*="display:inline-flex"] {
        order: 2;
        justify-content: center;
        margin-top: 10px;
    }
}

/* Ensure time filters in inline mode don't have extra margins */
.search-controls .compact-time-filters {
    margin: 0;
}

/* Better alignment for dropdown in inline mode */
.search-controls .filter-dropdown {
    position: relative;
}

/* Responsive design for smaller screens */
@media (max-width: 576px) {
    .compact-time-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .filter-button {
        width: 100%;
        justify-content: space-between;
    }
    
    .compact-refresh-btn {
        width: 100%;
        max-width: none;
    }
}

.compact-cancel-btn {
    padding: 6px 12px;
    font-size: 1rem;
    height: 38px;
    border: 1px solid var(--text-muted);
    border-radius: 4px;
    background: var(--text-muted);
    color: white;
    cursor: pointer;
    white-space: nowrap;
    width: auto;
    min-width: 0;
}

.compact-cancel-btn:hover {
    background: var(--text-main);
    border-color: var(--text-main);
}

.filter-separator {
    color: #666;
    font-size: 0.8rem;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .compact-time-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    
    .filter-dropdown {
        width: 100%;
    }
    
    .filter-button {
        width: 100%;
        min-width: auto;
    }
    
    .compact-custom-inputs {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .compact-input,
    .compact-date-input {
        flex: 1;
        min-width: 80px;
    }
}

/* visual styling for the request-catcher endpoint box */
.tool-card.request-catcher .code-container {
    background-color: #f8fbff;
    padding: 12px 12px;
    border-radius: 8px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    box-shadow: none;
    justify-content: space-between; /* put copy button at the right edge of the grey box */
    max-width: 720px; /* keep it shorter so copy button isn't far right */
    gap: 8px;
    color: #1e3a5f;

}

.tool-card.request-catcher #api-endpoint {
    flex: 1 1 auto; /* allow the URL to grow and push the copy button to the right edge */
    display: block;
    max-width: none; /* allow flex to manage width */
    overflow-wrap: anywhere;
    margin-right: 10px; /* small gap before the copy button */
}

.tool-card.request-catcher .copy-wrapper {
    margin-left: 6px;
    flex-shrink: 0;
    align-self: center;
}

h2 {
    color: #343a40;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.75rem;
}

h4 {
    text-align: left;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 1.1rem;
}

.description {
    color: var(--text-muted);
    margin-bottom: 25px;
    font-size: 0.9rem;
    text-align: left;
}

footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 12px;
}

/* --- Loader Spinner --- */
.loader {
    border: 5px solid #f3f3f3; /* Light grey */
    border-top: 5px solid var(--primary-color); /* Blue */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* --- Back Button --- */
.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 6px 12px;
    font-size: 12px;
    background-color: var(--primary-color); /* primary blue to match Request Log Viewer */
    color: #fff !important;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s;
    z-index: 1000;
}

.back-button:hover {
    background-color: var(--primary-dark); /* darker primary on hover */
}

/* --- Main Menu (index.php) --- */
.tool-menu a {
    display: block;
    padding: 10px;
    margin: 8px 0;
    background-color: var(--primary-color);
    color: white;
    border-radius: 5px;
    font-size: 14px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}

.tool-menu a:hover {
    background-color: var(--primary-dark);
}

/* --- Info Box (index.php) --- */
.info-box {
    background-color: #f1f1f1;
    padding: 20px;
    border-radius: 8px;
    margin-top: 25px;
    border-left: 5px solid var(--primary-color);
    text-align: left;
}

.info-box h4 {
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.info-box p {
    margin-bottom: 10px;
}

.code-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f8fbff;
    border: 1px solid rgba(37, 99, 235, 0.18);
    padding: 12px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 1rem;
    word-break: break-all;
    max-width: 720px;
    gap: 8px;
    color: #1e3a5f;
}
/* Endpoint sizing adjusted to sit slightly below the description */
#api-endpoint,
#webhook-endpoint {
    font-size: 0.875rem; /* slightly smaller than .description (0.9rem) */
    font-weight: 500;
    word-break: break-all;
    flex: 1 1 auto;
    text-align: left;
    margin-right: 10px;
    display: block;
    color: #1d4ed8 !important;
    font-family: var(--font-mono) !important;
}

/* Ensure the copy control stays aligned and doesn't shrink */
.code-container .copy-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    font-size: 0.95rem;
    color: #10213a;
    background-color: #ffffff;
    border: 1px solid #d1d5da;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.code-container .copy-wrapper:hover {
    background-color: #f3f4f6;
    border-color: #959da5;
}

/* make the inline copy control slightly smaller */
.code-container .copy-wrapper .copy-text {
    font-size: 0.78rem;
    padding: 0 6px;
}
.code-container .copy-wrapper .copy-icon {
    font-size: 13px;
}

/* Visible focus for keyboard users on copy controls */
.copy-wrapper[tabindex="0"]:focus {
    outline: 3px solid rgba(13,110,253,0.25);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Forms & Inputs (All Tools) --- */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}

/* --- HTTP Method Badges (shared with admin) --- */
.method-badge {
    padding: 0.3em 0.6em;
    border-radius: 0.25rem;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    font-size: 0.8em;
}
.method-get { background-color: var(--success-color); }
.method-post { background-color: var(--primary-color); }
.method-put { background-color: var(--warning-color); color: #212529; }
.method-delete { background-color: var(--danger-color); }
.method-head { background-color: #6f42c1; }
.method-other { background-color: var(--text-muted); }

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* --- Custom Checkboxes --- */
.checkbox-container {
    display: flex; align-items: center; gap: 10px;
    margin: 20px 0; padding-left: 5px; text-align: left; cursor: pointer;
}
.checkbox-container label { font-weight: normal; cursor: pointer; margin: 0; }
.checkbox-container input[type="checkbox"] { display: none; }
.checkbox-container .custom-checkbox {
    width: 18px; height: 18px; border: 2px solid var(--primary-color);
    border-radius: 4px; display: inline-block; position: relative;
    transition: background-color 0.2s, border-color 0.2s; flex-shrink: 0;
}
.checkbox-container input[type="checkbox"]:checked + .custom-checkbox {
    background-color: var(--primary-color); border-color: var(--primary-color);
}
.checkbox-container input[type="checkbox"]:checked + .custom-checkbox::after {
    content: '✓'; font-size: 14px; color: white; position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
}

/* --- Buttons (All Tools) --- */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

button {
    flex: 1;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.button-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.button-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Lighter Clear button for search controls: keep scope small so other outline-secondary buttons are unaffected */
.input-group-append .btn-outline-secondary,
#clear-search-btn {
    background-color: #f7f8fa; /* very light grey */
    border-color: #e9ecef;     /* soft border */
    color: #495057;
}
.input-group-append .btn-outline-secondary:hover,
#clear-search-btn:hover,
.input-group-append .btn-outline-secondary:focus,
#clear-search-btn:focus {
    background-color: #eef2f6; /* slightly darker on hover/focus */
    border-color: #e3e7ea;
    color: #343a40;
}

/* Icon-style button similar to AWS console: circular, subtle border, hover/focus states */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 6px;
    border-radius: 50%;
    background-color: transparent;
    border: 1px solid rgba(0,0,0,0.08);
    color: var(--primary-color); /* teal-blue accent for icon */
    cursor: pointer;
}
.btn-icon:hover {
    background-color: rgba(23,162,184,0.06);
}
.btn-icon:active {
    background-color: rgba(23,162,184,0.12);
}
.btn-icon:focus {
    outline: 3px solid rgba(23,162,184,0.15);
    outline-offset: 2px;
}

/* When placed inside Bootstrap input-group-append, make the icon's border slightly tighter
   so it sits flush with the input and other buttons. */
.input-group-append .btn-icon {
    border-radius: 4px;
    width: auto;
    height: auto;
    padding: 6px 10px;
}

.input-group-append .btn-icon {
    /* very light blue based on Bootstrap primary (var(--primary-color)) but much lighter for subtlety */
    background-color: rgba(0,123,255,0.06);
    border-color: rgba(0,123,255,0.12);
}
.input-group-append .btn-icon:hover {
    background-color: rgba(0,123,255,0.12);
}

/* Toast Container for stacking notifications */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 400px;
}

.toast-notification {
    background: var(--primary-color);
    border: none;
    padding: 12px 18px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
    color: white;
    font-weight: 600;
    min-width: 250px;
    max-width: 400px;
    transform: translateX(450px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
    cursor: pointer;
    word-wrap: break-word;
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-notification.hide {
    transform: translateX(450px);
    opacity: 0;
}

.toast-notification.success {
    background: var(--success-color);
    color: white;
}

.toast-notification.error {
    background: var(--danger-color);
    color: white;
}

.toast-notification.info {
    background: var(--primary-color);
    color: white;
}

.toast-notification.warning {
    background: var(--warning-color);
    color: white;
}

/* Make all backgrounds dark enough for white emojis */
.toast-notification {
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Legacy support - hide old toast */
#global-toast {
    display: none;
}

.btn-icon img {
    display: block;
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* If the provided PNG is light/white (as in the screenshot), invert it when placed inside the input group
   so it becomes visible against the light page background. This keeps the original PNG file unchanged. */
.input-group-append .btn-icon img {
    filter: invert(1) contrast(120%);
}

/* --- Enhanced Result Formatting --- */
.output-title {
    text-align: left;
    font-size: 1.1em;
    font-weight: bold;
    color: #343a40;
    margin-top: 30px;
    margin-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.result-card {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: left;
}

.result-card-header {
    background-color: #f8f9fa;
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    font-weight: bold;
    color: var(--primary-color);
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: flex;
    align-items: center;
}

.result-card-header-error {
    background-color: var(--danger-color);
    color: white;
}

.result-card-header-warning {
    background-color: var(--warning-color);
    color: #212529;
}

.result-category {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    position: relative;
}
.result-category:last-child {
    border-bottom: none;
}

.result-category-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e9ecef;
}

.result-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f1f1;
}
.result-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.result-item-label {
    font-weight: bold;
    color: #495057;
    flex-basis: 150px;
    padding-right: 10px;
}

.result-item-value {
    flex-grow: 1;
    flex-basis: 300px;
    word-break: break-all;
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.result-item-status {
    flex-basis: 120px;
    text-align: right;
    margin-left: auto;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-success { background-color: var(--success-color); }
.status-failure { background-color: var(--danger-color); }
.status-info { background-color: var(--primary-color); }
.status-warning { background-color: #fd7e14; }

/* Primary method highlighting */
.result-category.primary-method {
    border: 2px solid var(--primary-color);
    background-color: #f8f9ff;
}

.result-category.primary-method .result-category-title {
    color: var(--primary-color);
    font-weight: bold;
}

.result-item-explanation {
    flex-basis: 100%;
    margin-top: 8px;
    font-size: 0.85em;
    color: var(--text-muted);
    padding-left: 10px;
    border-left: 3px solid #e9ecef;
}

/* Expandable Record Styles */
.expandable-record {
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    cursor: pointer;
}

.expandable-record:hover {
    background-color: #f8f9fa;
    border-left-color: var(--primary-color);
}

.expandable-record .result-item-value::after {
    content: "▼ Click to view details";
    display: block;
    font-size: 0.7em;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.expandable-record.expanded .result-item-value::after {
    content: "▲ Click to hide details";
    color: var(--text-muted);
}

/* --- Raw Output & Copy Button --- */
.result-box {
    position: relative;
    text-align: left;
    margin-top: 10px;
    padding: 15px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    max-height: 450px;
    overflow: auto;
    background-color: var(--code-surface);
    color: var(--code-text);
}
.result-box.raw-output {
    background-color: var(--code-surface);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    font-size: 12px;
    text-align: left;
    color: var(--code-text);
}
.result-box pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Make pre blocks focusable and show visible focus for keyboard users */
.details-cell pre.selectable-pre {
    outline: none;
}
.details-cell pre.selectable-pre:focus {
    outline: 3px solid rgba(13,110,253,0.25);
    outline-offset: 2px;
}
/* Titles and meta inside details cells */
.details-cell h5 { font-size: 0.85rem; margin: 0; font-weight: 600; }
.log-meta { font-size: 0.75rem; }

/* Unified font sizing for all code blocks - using base 13px from pre/code styles above */
.copy-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}
.result-box .copy-wrapper, .result-category .copy-wrapper {
    position: sticky;
    top: 10px;
    right: 15px;
    float: right;
    z-index: 10;
    background-color: #ffffff;
    border: 1px solid #d1d5da;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    transition: all 0.2s;
    color: #586069;
}

.result-box .copy-wrapper:hover, .result-category .copy-wrapper:hover {
    background-color: #f3f4f6;
    border-color: #959da5;
}
.copy-wrapper.inline-copy {
    display: inline-flex;
    margin-left: 6px;
    padding: 0 6px;
    font-size: 0.8em;
    background-color: transparent; /* transparent per request */
    border-radius: 0;
    color: #586069;
}
.copy-icon {
    font-size: 16px;
}

.toolbox-close-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(37, 99, 235, 0.24);
    background: #f3f7ff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    color: #0f172a;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.toolbox-close-button:hover {
    border-color: rgba(37, 99, 235, 0.34);
    background: #ebf2ff;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
    color: #1d4ed8;
}

.toolbox-close-button:focus {
    outline: 3px solid rgba(37, 99, 235, 0.2);
    outline-offset: 2px;
}

.toolbox-close-button--light {
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    color: #f8fbff;
}

.toolbox-close-button--light:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.26);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 10px 24px rgba(15, 23, 42, 0.18);
}

.toolbox-close-icon {
    color: var(--primary-color);
    font-size: 1rem;
    line-height: 1;
}

.toolbox-close-button--light .toolbox-close-icon {
    color: #f8fbff;
}

.toolbox-close-label {
    font-size: 0.74rem;
    text-transform: uppercase;
}

.toolbox-inline-action {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    padding: 0;
    border: none;
    background: transparent;
    color: #1d4ed8;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.15;
    text-transform: uppercase;
    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 0.28em;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s ease, text-decoration-color 0.2s ease, opacity 0.2s ease;
}

.toolbox-inline-action:hover:not([disabled]) {
    color: #1e40af;
    text-decoration-color: currentColor;
}

.toolbox-inline-action:focus {
    outline: 3px solid rgba(37, 99, 235, 0.2);
    outline-offset: 4px;
    border-radius: 6px;
}

.toolbox-inline-action[disabled] {
    opacity: 0.56;
    cursor: default;
    color: var(--text-muted);
}

.toolbox-inline-action-symbol {
    display: inline-block;
    font-size: 0.9rem;
    line-height: 1.15;
    color: currentColor;
    transform: translateY(0.02em);
}

.toolbox-raw-json-panel .technical-summary-title {
    margin-bottom: 0 !important;
}

.toolbox-raw-json-box {
    margin: 0;
}

/* --- Form Scanner --- */
.scan-status {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    font-style: normal;
    font-size: 0.9em;
    color: #495057;
}
.page-list {
    font-family: var(--font-family);
    font-size: 1em;
}
.page-list a {
    font-family: var(--font-family);
    font-size: 1em;
}
.result-card-header .result-item-label {
    font-weight: bold;
    color: var(--primary-color);
    flex-basis: auto;
}
.result-card-header .result-item-value {
    color: #343a40;
}

/* --- Product Explorer --- */
.product-explorer {
    display: flex;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    height: 50vh;
    min-height: 350px;
    overflow: hidden;
    background-color: #fff;
}

.product-list-pane {
    flex: 0 0 40%;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    transition: flex-basis 0.3s ease;
}

.product-list-pane.expanded {
    flex: 0 0 65%;
}

#productSearch {
    padding: 8px;
    font-size: 14px;
}
#productSearch:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

#productList {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex-grow: 1;
}

#productList li {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
    transition: background-color 0.2s;
}

#productList li:hover {
    background-color: #f8f9fa;
}

#productList li.active {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

#productList .product-id {
    font-weight: bold;
    display: block;
    font-size: 0.9em;
    margin-bottom: 2px;
}

#productList .product-name {
    font-size: 0.8em;
    color: var(--text-muted);
    display: block;
}
#productList li.active .product-name {
    color: #e0e0e0;
}

.product-details-pane {
    flex: 1;
    padding: 0;
    overflow-y: auto;
}

.product-details-pane .placeholder-text {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: var(--text-muted);
    font-style: italic;
}

.product-details-pane .result-category {
    padding: 20px;
}

.product-details-pane .result-item {
    text-align: left;
}

.product-details-pane .result-item-label,
.product-details-pane .result-item-value {
    font-size: 0.8em;
    font-family: var(--font-family);
}
.url-link-icon {
    text-decoration: none;
    margin-left: 5px;
}

/* --- Feedback Button & Modal --- */
.feedback-button {
    width: 100%;
    margin-top: 20px;
    background-color: var(--success-color);
    font-size: 16px;
}
.feedback-button:hover {
    background-color: #218838;
}

.body-modal-open > *:not(.modal) {
    filter: blur(5px);
}

.modal {
    display: none; 
    position: fixed; 
    z-index: 1001; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
    animation: fadeIn 0.3s;
    display: flex;
    flex-direction: column;
}
.modal-content .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
}
.modal-content .modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}
.modal-content .modal-header .copy-wrapper {
    position: relative;
    top: auto;
    right: auto;
    font-size: 0.9em;
}
.modal-content .result-box {
    margin: 0;
    border: none;
    border-radius: 0;
    max-height: 60vh;
}
.modal-content .button-group {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
}

@keyframes fadeIn {
    from {opacity: 0; transform: scale(0.95);}
    to {opacity: 1; transform: scale(1);}
}

.honeypot-field {
    display: none;
}

#form-message {
    margin-top: 15px;
    font-weight: bold;
}

/* --- Admin Panel --- */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Time mode two-option switch */
.time-toggle-switch {
    display: inline-flex;
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    padding: 2px;
}
.time-toggle-switch .toggle-option {
    background: transparent;
    border: none;
    color: #e9ecef;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.85rem;
}
.time-toggle-switch .toggle-option.active {
    background: #fff;
    color: var(--primary-color);
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.time-toggle-switch .toggle-option[aria-pressed="false"] { opacity: 0.7; }

/* Shift main content over to account for the fixed sidebar */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.login-error {
    color: var(--danger-color);
    margin-top: 10px;
}
.admin-container {
    max-width: none;
    margin: 0 auto;
    padding: 30px;
    background-color: #fff;
    height: 100%;
}
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.admin-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.admin-controls input[type="text"] {
    max-width: 400px;
}

.admin-overview-panel {
    margin: 0 0 20px 0;
    padding: 16px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    background: #f8fbff;
}

.admin-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.admin-overview-card {
    background: #fff;
    border: 1px solid #dbe7ff;
    border-radius: 8px;
    padding: 10px 12px;
}

.admin-overview-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 3px;
}

.admin-overview-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0d4aa6;
    line-height: 1.1;
}

.admin-overview-actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-user-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    align-items: center;
}

.admin-user-filters input,
.admin-user-filters select {
    max-width: 320px;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th, .admin-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    text-align: left;
    vertical-align: middle;
}

    /* Smaller text for user management table */
    .user-management-table th, .user-management-table td {
        font-size: 0.85rem;
        padding: 8px 10px;
    }

/* Admin dashboard grid - removed since cards were removed */

.dashboard-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.dashboard-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.dashboard-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

.dashboard-card .btn {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s ease;
}

.dashboard-card .btn:hover {
    background: var(--primary-dark);
    text-decoration: none;
    color: white;
}
.admin-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}
.admin-table .feedback-text {
    white-space: pre-wrap;
    word-break: break-word;
    max-width: 400px;
}
.status-select {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ced4da;
}
.hide-button {
    padding: 4px 10px;
    font-size: 12px;
}
.admin-table tr.status-row-completed { background-color: #e9f7ef; }
.admin-table tr.status-row-in-progress { background-color: #fff8e1; }
.admin-table tr.status-row-rejected { background-color: #fbe9e7; }
.archive-indicator {
    background-color: #e9ecef;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}
.table-wrapper {
    margin-top: 20px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    overflow-y: auto;
    max-height: 70vh;
}
.admin-table .highlighted {
    background-color: #ffebee !important;
}

/* dark mode CSS removed (toggle UI was removed) */
html.dark-mode .modal-content .modal-header { border-color: #444; }
html.dark-mode .login-container { background-color: #1e1e1e; }
html.dark-mode .admin-table th, html.dark-mode .admin-table td { border-color: #444; }
html.dark-mode .admin-table th { background-color: #3a3a3a; }
html.dark-mode .admin-table tr.status-row-completed { background-color: #1c3a27; }
html.dark-mode .admin-table tr.status-row-in-progress { background-color: #3d3623; }
html.dark-mode .admin-table tr.status-row-rejected { background-color: #422625; }
html.dark-mode .admin-toggle-btn { background: rgba(255,255,255,0.06); color: #fff; border: 1px solid rgba(255,255,255,0.04); }
html.dark-mode .back-button { background-color: #0d6efd; color: #fff !important; }
html.dark-mode .action-button { background-color: #0d6efd; color: #fff; }
html.dark-mode .admin-container { background-color: #1e1e1e; }
html.dark-mode .archive-indicator { background-color: #3a3a3a; color: #e0e0e0; }
html.dark-mode .result-box.raw-output { background-color: var(--code-surface); color: var(--code-text); }
html.dark-mode .copy-wrapper { background-color: #ffffff; border-color: #d1d5da; }
html.dark-mode .table-wrapper { border-color: #444; }
html.dark-mode .admin-table .highlighted { background-color: #4a1e1e !important; }
html.dark-mode .scan-status { background-color: #3a3a3a; }

/* Admin toggle button: hidden by default, visible only on narrow viewports */
.admin-toggle-btn { display: none; }
@media (max-width: 900px) {
    .admin-toggle-btn { display: inline-block !important; z-index: 4000; position: fixed; left: 12px; top: 12px; background: rgba(255,255,255,0.95); border-radius: 6px; padding: 6px 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
}
@media (min-width: 901px) {
    .admin-toggle-btn { display: none !important; }
}

/* screen-reader only helper */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Responsive sidebar behaviour: hide sidebar by default on small screens and show via .open */
@media (max-width: 900px) {
    /* Remove left margin for main content so it fills the viewport when sidebar is hidden */

    .admin-user-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-user-filters input,
    .admin-user-filters select {
        max-width: none;
        width: 100%;
    }
    /* Add a light overlay when sidebar is open (using body class set by JS) */
    body.sidebar-open::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.35);
        z-index: 2500;
        pointer-events: auto;
    }
}

/* Make status badges more obviously clickable when they have record details */
.status-badge[onclick] {
    position: relative;
}

.status-badge[onclick]:after {
    content: " 👁";
    font-size: 10px;
    opacity: 0.7;
}

/* Unified Button System */
button,
.btn,
input[type="button"],
input[type="submit"] {
    font-family: var(--font-family);
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    padding: 10px 20px;
    max-width: 300px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    line-height: 1.5;
    outline: none;
}

/* Remove default focus outline and add custom one */
button:focus,
.btn:focus,
input[type="button"]:focus,
input[type="submit"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

/* Primary Button (Blue) */
button:not([class]),
.btn-primary,
input[type="submit"] {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

button:not([class]):hover,
.btn-primary:hover,
input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

button:not([class]):active,
.btn-primary:active,
input[type="submit"]:active {
    transform: translateY(0);
}

/* Secondary Button (Outline) */
.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Success Button (Green) */
.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

/* Danger Button (Red) */
.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
}

/* Small Button Variant */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    max-width: 200px;
}

/* Large Button Variant */
.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    max-width: 400px;
}

/* Disabled State */
button:disabled,
.btn:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none !important;
}

/* Unified Input System */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select,
textarea {
    font-family: var(--font-family);
    font-size: 14px;
    padding: 10px 14px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    color: #212529;
    transition: all 0.2s ease;
    max-width: 500px;
    width: 100%;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="url"]::placeholder,
textarea::placeholder {
    color: #adb5bd;
}

/* Input Groups */
.input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.input-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 6px;
    display: block;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
}

/* Unified Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family);
    font-weight: 700;
    color: #212529;
    margin-top: 0;
}

h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 0.875rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #495057;
}

/* Unified Card System */
.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.card-header {
    font-weight: 700;
    font-size: 1.1rem;
    color: #495057;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f8f9fa;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    button,
    .btn {
        width: 100%;
        max-width: none;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="url"],
    input[type="number"],
    select,
    textarea {
        max-width: none;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    h1 {
        font-size: 1.75rem;
    }
}

/* ALL tooltips appear above the hovered element with blue background */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
    z-index: 9999999;
}

[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--primary-color);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
    z-index: 9999999;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
    opacity: 1;
}

html.tooltip-js-enabled [data-tooltip]::after,
html.tooltip-js-enabled [data-tooltip]::before,
html.tooltip-js-enabled [title]::after,
html.tooltip-js-enabled [title]::before {
    display: none !important;
}

.app-tooltip-layer {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 2147483000;
    max-width: min(360px, calc(100vw - 24px));
    padding: 8px 11px;
    border-radius: 8px;
    background: #1558e8;
    color: #fff;
    font-family: var(--font-family);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
    text-align: center;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.24);
    opacity: 0;
    pointer-events: none;
    transform: translate3d(-9999px, -9999px, 0);
    transition: opacity 0.12s ease;
    will-change: opacity;
    overflow-wrap: anywhere;
}

.app-tooltip-layer.is-visible {
    opacity: 1;
}

.app-tooltip-layer::after {
    content: '';
    position: absolute;
    left: var(--tooltip-arrow-left, 50%);
    width: 10px;
    height: 10px;
    background: #1558e8;
    transform: translateX(-50%) rotate(45deg);
}

.app-tooltip-layer[data-placement="top"]::after {
    bottom: -5px;
}

.app-tooltip-layer[data-placement="bottom"]::after {
    top: -5px;
}

/* Disable tooltips on copy buttons */
.copy-wrapper[data-tooltip]::after,
.copy-wrapper[data-tooltip]::before {
    display: none !important;
}

/* Support for title attribute fallback */
[title]:not([data-tooltip]) {
    position: relative;
}

[title]:not([data-tooltip])::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
    z-index: 9999999;
}

[title]:not([data-tooltip])::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--primary-color);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
    z-index: 9999999;
}

[title]:not([data-tooltip]):hover::after,
[title]:not([data-tooltip]):hover::before {
    opacity: 1;
}

/* --- Code Syntax Highlighting --- */
pre {
    background-color: var(--code-surface) !important;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    padding: 14px 16px;
    overflow-x: auto;
    color: var(--code-text);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.55;
    margin: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

code {
    background-color: transparent;
    color: inherit;
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 0;
    border: none;
}

/* Inline code gets subtle background */
:not(pre) > code {
    background-color: rgba(175, 184, 193, 0.2);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    color: #24292e;
}

/* JSON syntax highlighting */
pre code {
    display: block;
    white-space: pre-wrap;
    background-color: transparent;
    padding: 0;
    border: none;
}

/* JSON/XML syntax colors — modern soft palette */
.json-key {
    color: var(--code-key);
    font-weight: 600;
}

.json-string {
    color: var(--code-string);
}

.json-number {
    color: var(--code-number);
}

.json-boolean,
.json-null {
    color: var(--code-constant);
    font-weight: 600;
}

.json-punctuation {
    color: var(--code-muted);
}

/* XML/HTML syntax colors */
.xml-tag {
    color: var(--code-tag);
}

.xml-attribute {
    color: var(--code-attribute);
}

.xml-value {
    color: var(--code-string);
}

.xml-text {
    color: var(--code-text);
}

/* PHP/Code syntax colors */
.code-keyword {
    color: var(--code-constant);
    font-weight: 600;
}

.code-string {
    color: var(--code-string);
}

.code-comment {
    color: var(--code-comment);
    font-style: italic;
}

.code-function {
    color: var(--code-tag);
}

.code-number {
    color: var(--code-number);
}

.code-operator {
    color: var(--code-operator);
}

.code-variable {
    color: var(--code-variable);
}

/* Syntax highlighting — dark mode */
[data-theme="dark"] .json-key { color: var(--code-key); }
[data-theme="dark"] .json-string { color: var(--code-string); }
[data-theme="dark"] .json-number { color: var(--code-number); }
[data-theme="dark"] .json-boolean,
[data-theme="dark"] .json-null { color: var(--code-constant); }
[data-theme="dark"] .json-punctuation { color: var(--code-muted); }
[data-theme="dark"] .xml-tag { color: var(--code-tag); }
[data-theme="dark"] .xml-attribute { color: var(--code-attribute); }
[data-theme="dark"] .xml-value { color: var(--code-string); }
[data-theme="dark"] .xml-text { color: var(--code-text); }
[data-theme="dark"] .code-keyword { color: var(--code-constant); }
[data-theme="dark"] .code-string { color: var(--code-string); }
[data-theme="dark"] .code-comment { color: var(--code-comment); }
[data-theme="dark"] .code-function { color: var(--code-tag); }

/* Emoji Styling - For white emojis on dark backgrounds */
.emoji-white {
    filter: grayscale(100%) brightness(2);
}

/* Emoji Styling - Flat blue for emojis on light backgrounds */
.emoji-blue {
    filter: grayscale(100%) brightness(0.8) sepia(100%) hue-rotate(190deg) saturate(500%) contrast(1.2);
}

/* Solid blue for copy icons on light backgrounds */
.copy-icon {
    color: var(--primary-color);
}

/* White for dark backgrounds (toasts, dark sidebars, etc) */
.toast-notification .copy-icon,
[style*="background: var(--primary-color)"] .copy-icon,
[style*="background:var(--primary-color)"] .copy-icon {
    color: #ffffff !important;
}

/* Adaptive emoji coloring: white on dark, grey on light */
.emoji-on-dark {
    filter: grayscale(100%) brightness(2);
    display: inline-block;
    line-height: 1;
}

.emoji-on-light {
    filter: grayscale(100%) brightness(0.6);
    display: inline-block;
    line-height: 1;
}

/* Data Manipulation Tools */
.data-tools .card-header {
    background: var(--primary-gradient);
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    margin: -24px -24px 0 -24px;
}

.data-tools .card-header h3 {
    color: white;
}

.tools-tabs {
    flex-wrap: wrap;
}

.tool-tab {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
}

.tool-tab:hover {
    color: var(--primary-color);
    background: #f8f9fa;
}

.tool-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tool-panel {
    display: none;
    animation: fadeIn 0.3s;
}

.tool-panel.active {
    display: block;
}

.tool-panel h4 {
    color: #495057;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 600;
}

.tool-panel label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 500;
    color: #495057;
}

.tool-panel .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.tool-panel .btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tool-panel .btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.tool-panel .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.tool-panel .btn-secondary {
    background: var(--text-muted);
    color: white;
}

.tool-panel .btn-secondary:hover {
    background: var(--text-main);
}

.tool-panel .btn-danger {
    background: var(--danger-color);
    color: white;
}

.tool-panel .btn-danger:hover {
    background: #c82333;
}

.tool-panel .btn-warning {
    background: var(--warning-color);
    color: #212529;
}

.tool-panel .btn-warning:hover {
    background: #e0a800;
}

#validationResults {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid var(--primary-color);
}

.validation-item {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.validation-item:last-child {
    border-bottom: none;
}

.validation-valid {
    color: var(--success-color);
}

.validation-invalid {
    color: var(--danger-color);
}

.validation-warning {
    color: var(--warning-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- UX Enhancement: Help Icons & Popovers --- */
.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #e9ecef;
    color: var(--text-muted);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 6px;
    vertical-align: middle;
    transition: all 0.2s ease;
    border: none;
}

.help-icon:hover, .help-icon:focus {
    background: var(--primary-color);
    color: white;
    outline: none;
}

.help-popover {
    position: absolute;
    z-index: 9999;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    max-width: 320px;
    animation: popoverFadeIn 0.2s ease;
}

.help-popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
}

.help-popover-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.help-popover-close:hover {
    color: var(--danger-color);
}

.help-popover-body {
    padding: 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
}

@keyframes popoverFadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- UX Enhancement: Example Button --- */
.input-with-example {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.input-with-example input {
    flex: 1;
}

.example-btn {
    padding: 8px 16px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.example-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* --- UX Enhancement: Input Hints --- */
.input-hint {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.input-hint a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 3px;
    background: #e7f1ff;
    margin: 0 2px;
    transition: all 0.2s;
}

.input-hint a:hover {
    background: var(--primary-color);
    color: white;
}

/* --- UX Enhancement: Traffic Light Summary --- */
.quick-summary {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

/* Technical Details Accordion */
.technical-details-accordion {
    margin-top: 10px;
    margin-bottom: 25px;
    background: #ffffff;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: calc(var(--border-radius-md) + 4px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}
.technical-summary-title {
    list-style: none;
    cursor: pointer;
    font-weight: 700;
    color: var(--primary-color);
    padding: 14px 18px;
    background: #eff6ff;
    user-select: none;
    transition: background 0.2s ease, color 0.2s ease;
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.technical-summary-title::-webkit-details-marker {
    display: none;
}
.technical-summary-title::after {
    content: '';
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-top: -2px;
}
.technical-summary-title:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(239, 246, 255, 0.98) 100%);
}
.technical-details-accordion[open] .technical-summary-title {
    color: #1d4ed8;
}
.technical-details-accordion[open] .technical-summary-title::after {
    transform: rotate(225deg);
}
.technical-details-body {
    padding: 18px;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.summary-pass {
    border-left-color: var(--success-color);
}

.summary-fail {
    border-left-color: var(--danger-color);
}

.summary-warn {
    border-left-color: var(--warning-color);
}

.summary-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

.summary-pass .summary-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
}

.summary-fail .summary-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

.summary-warn .summary-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
}

.summary-content {
    flex: 1;
    min-width: 0;
}

.summary-label {
    font-weight: 600;
    font-size: 14px;
    color: #212529;
}

.summary-detail {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

@media (max-width: 576px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .input-with-example {
        flex-direction: column;
    }
    
    .example-btn {
        width: 100%;
    }
}

/* --- Spinner --- */

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

/* --- Feed Builder: Preview Panel --- */

.result-box.raw-output,
.code-display {
    background: var(--code-surface) !important;
    color: var(--code-text) !important;
}

/* ===================== End Admin Panel Shared Styles ===================== */

.container {
    background-color: var(--bg-card) !important;
    border-radius: var(--border-radius-lg) !important;
    box-shadow: var(--shadow-md) !important;
    border: 1px solid rgba(255,255,255,0.5);
}

button.btn-primary, .btn-primary {
    background: var(--primary-gradient) !important;
    border: none !important;
    color: white !important;
    border-radius: var(--border-radius-md) !important;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2) !important;
    transition: all var(--transition-normal) !important;
}

button.btn-primary:hover, .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.35) !important;
    filter: brightness(110%);
}

.card, .tool-card, .analytics-card, .admin-overview-card {
    background: var(--bg-card) !important;
    border-radius: var(--border-radius-lg) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-sm) !important;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal) !important;
}

.card:hover, .tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md) !important;
}

.sidebar-link.active, .beta-tab-btn.active {
    background: var(--primary-gradient) !important;
    color: white !important;
    border-radius: var(--border-radius-sm) !important;
    font-weight: 600;
}

.page-header h2, h1, h2, h3, h4 {
    font-weight: 600 !important;
    color: var(--text-main) !important;
}

.form-control,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="search"],
input[type="tel"],
select:not([multiple]):not([size]),
textarea {
    border-radius: var(--border-radius-sm) !important;
    border: 1px solid var(--border-color) !important;
    transition: all var(--transition-fast) !important;
    width: 100%;
    box-sizing: border-box;
}

.form-control,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="search"],
input[type="tel"],
select:not([multiple]):not([size]) {
    padding: 0 var(--control-padding-x) !important;
    min-height: var(--control-height) !important;
    height: var(--control-height) !important;
    line-height: var(--control-line-height) !important;
    max-width: 500px;
}

textarea {
    padding: 12px 15px !important;
    min-height: 120px;
    line-height: 1.5 !important;
}

.form-control:focus, input[type="text"]:focus, select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
    outline: none !important;
}

table.table {
    border-radius: var(--border-radius-md) !important;
    overflow: hidden !important;
    box-shadow: var(--shadow-sm) !important;
    border: 1px solid var(--border-color) !important;
}

table.table th {
    background: #f8fafc !important;
    color: var(--text-muted) !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 0.8rem;
    border-bottom: 2px solid var(--border-color) !important;
}

table.table td {
    vertical-align: middle !important;
    border-bottom: 1px solid var(--border-color) !important;
}

/* Modern unified scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: var(--border-radius-lg);
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Modals & Toasts Unification */
.toast, .modal-content, .custom-modal {
    border-radius: var(--border-radius-lg) !important;
    border: none !important;
    box-shadow: var(--shadow-lg) !important;
    background: var(--bg-card) !important;
}

.toast-header, .modal-header {
    border-bottom: 1px solid var(--border-color) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0 !important;
    font-weight: 600;
}

/* Sidebar and Navigation Enhancements */

.sidebar-link {
    margin-bottom: 8px !important;
    padding: 12px 18px !important;
    border-radius: var(--border-radius-md) !important;
    transition: all var(--transition-fast) !important;
    color: var(--text-muted) !important;
    font-weight: 500;
}

.sidebar-link:hover {
    background: #f1f5f9 !important;
    color: var(--primary-color) !important;
    transform: translateX(4px);
}

.sidebar-link.active {
    background: var(--primary-gradient) !important;
    color: white !important;
    box-shadow: var(--shadow-md) !important;
    transform: none; /* Don't translate active items */
}

/* Admin Grid Layout specific overrides */
.admin-overview-grid {
    gap: 20px !important;
    margin-bottom: 30px !important;
}

.admin-overview-card {
    padding: 25px !important;
    background: #ffffff !important;
    border-radius: var(--border-radius-lg) !important;
    border-top: 4px solid var(--primary-color) !important;
}

.admin-overview-label {
    color: var(--text-muted) !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 0.85rem !important;
}

.admin-overview-value {
    color: var(--text-main) !important;
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    margin-top: 10px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Tool Cards */
.tool-card {
    padding: 25px !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tool-card h4 {
    margin-top: 0 !important;
}

/* Clean up button hover states in the interface */
.beta-tab-btn {
    padding: 12px 20px !important;
    border-radius: var(--border-radius-md) !important;
    font-weight: 500 !important;
    transition: all var(--transition-fast) !important;
    border: none !important;
    background: transparent !important;
    color: var(--text-muted) !important;
}
.beta-tab-btn:hover {
    background: #f1f5f9 !important;
    color: var(--primary-color) !important;
}
.beta-tab-btn.active {
    background: var(--bg-card) !important;
    color: var(--primary-color) !important;
    box-shadow: var(--shadow-sm) !important;
    position: relative;
}
.beta-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 10%;
    width: 80%;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 3px;
}

/* Fix previously dark-themed sidebar elements for new light UI */
.sidebar-time-label,
.sidebar-unix-label {
    color: var(--text-muted) !important;
}
.time-toggle-switch {
    background: #e2e8f0 !important;
}
.time-toggle-switch .toggle-option {
    color: var(--text-muted) !important;
}
.time-toggle-switch .toggle-option.active {
    background: #ffffff !important;
    color: var(--primary-color) !important;
    box-shadow: var(--shadow-sm) !important;
}

/* Badges & Status */
.badge, .status-badge {
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
}
.badge-success, .status-clean { background: #dcfce7 !important; color: #166534 !important; border: 1px solid #bbf7d0 !important; }
.badge-danger, .status-listed { background: #fee2e2 !important; color: #991b1b !important; border: 1px solid #fecaca !important; }
.badge-warning { background: #fef9c3 !important; color: #854d0e !important; border: 1px solid #fef08a !important; }
.badge-info { background: #e0f2fe !important; color: #075985 !important; border: 1px solid #bae6fd !important; }
.badge-primary, .status-removal-requested { background: #dbeafe !important; color: #075985 !important; border: 1px solid #bfdbfe !important; }

/* Filter & Action Buttons */
.btn-apply, .btn-apply-sm, .quick-filter-btn {
    background: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    border-radius: var(--border-radius-sm) !important;
    padding: 6px 14px !important;
    font-weight: 500 !important;
    transition: all var(--transition-fast) !important;
    box-shadow: var(--shadow-sm) !important;
}
.btn-apply:hover, .btn-apply-sm:hover, .quick-filter-btn:hover {
    background: #f8fafc !important;
    border-color: var(--primary-light) !important;
    color: var(--primary-color) !important;
    transform: translateY(-1px);
}

.quick-filter-btn.active {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
}

.btn-clear, .btn-cancel-sm, .clear-filters-btn {
    background: #f1f5f9 !important;
    border: 1px solid transparent !important;
    color: var(--text-muted) !important;
    border-radius: var(--border-radius-sm) !important;
    padding: 6px 14px !important;
    font-weight: 500 !important;
    transition: all var(--transition-fast) !important;
}
.btn-clear:hover, .btn-cancel-sm:hover, .clear-filters-btn:hover {
    background: #e2e8f0 !important;
    color: var(--text-main) !important;
}

/* Secondary & Danger Buttons overrides (for SweetAlert/Bootstrap) */
.btn-secondary {
    background: #64748b !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(100, 116, 139, 0.2) !important;
    border-radius: var(--border-radius-md) !important;
}
.btn-secondary:hover { background: #475569 !important; }

.btn-danger {
    background: #ef4444 !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2) !important;
    border-radius: var(--border-radius-md) !important;
}
.btn-danger:hover { background: #dc2626 !important; }

.btn-success {
    background: #10b981 !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2) !important;
    border-radius: var(--border-radius-md) !important;
}
.btn-success:hover { background: #059669 !important; }

.btn-outline-primary {
    border: 1px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    background: transparent !important;
    border-radius: var(--border-radius-md) !important;
}
.btn-outline-primary:hover {
    background: var(--primary-color) !important;
    color: white !important;
}

/* Tables in Admin Tools */
.table-card {
    background: var(--bg-card) !important;
    border-radius: var(--border-radius-lg) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-md) !important;
    overflow: hidden; /* round table corners */
    padding: 0 !important;
    margin-bottom: 25px;
}
.table-card .table {
    margin-bottom: 0 !important;
    border: none !important;
}
.table-card table.table th {
    background: #f8fafc !important;
    padding: 15px 20px !important;
    border-top: none !important;
}
.table-card table.table td {
    padding: 12px 20px !important;
}

/* Common form containers / search bars */
.search-controls, .filter-controls, .admin-controls {
    background: var(--bg-card) !important;
    border-radius: var(--border-radius-lg) !important;
    border: 1px solid var(--border-color) !important;
    padding: 15px 20px !important;
    box-shadow: var(--shadow-sm) !important;
    margin-bottom: 20px !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

/* Time range dropdown fix (to match the inputs) */
.time-dropdown-menu {
    border-radius: var(--border-radius-md) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 8px !important;
}
.time-dropdown-item {
    border-radius: var(--border-radius-sm) !important;
    margin-bottom: 2px !important;
}

/* Admin Data Tables - Pagination Restyling */
.pagination {
    margin: 15px 0 !important;
    gap: 5px;
    display: flex;
    justify-content: center;
}
.paginationControls {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin: 15px 0;
}
.page-item .page-link {
    border: none !important;
    border-radius: var(--border-radius-sm) !important;
    color: var(--text-muted) !important;
    font-weight: 500 !important;
    padding: 8px 14px !important;
    background: transparent !important;
    transition: all var(--transition-fast) !important;
}
.page-item .page-link:hover {
    background: #f1f5f9 !important;
    color: var(--primary-color) !important;
}
.page-item.active .page-link {
    background: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2) !important;
}
.page-item.disabled .page-link {
    color: #cbd5e1 !important;
    background: transparent !important;
}
.pagination-controls button {
    border: 1px solid var(--border-color) !important;
    background: white !important;
    border-radius: var(--border-radius-sm) !important;
    padding: 6px 12px !important;
    color: var(--text-main) !important;
    font-weight: 500;
    transition: all var(--transition-fast);
}
.pagination-controls button:hover:not(:disabled) {
    background: #f8fafc !important;
    border-color: var(--primary-light) !important;
    color: var(--primary-color) !important;
}
.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: default;
}
.pagination-controls span {
    font-weight: 600;
    color: var(--text-muted);
}

/* Shared product shell for redesigned public tools */
body.tool-product-page {
    background: #ffffff;
    color: #10213a;
}

body.tool-product-page > .container,
body.tool-product-page > .container.tool-page,
body.tool-product-page > .tool-page,
body.tool-product-page > .main-container.tool-page {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    max-width: 1640px !important;
    margin: 0 auto !important;
    padding: 34px 20px 80px !important;
}

.tool-page-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tool-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.9fr);
    gap: 22px;
    align-items: stretch;
}

.tool-hero-copy,
.tool-hero-panel,
.tool-section-card,
.tool-surface-card {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    padding: 28px;
}

.tool-input-card {
    margin-top: 20px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.tool-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

.tool-link-btn {
    display: none;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.tool-link-btn:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.tool-hero-copy {
    position: relative;
    overflow: hidden;
}

.tool-hero-copy::before {
    display: none;
}

.tool-hero-copy > * {
    position: relative;
}

.tool-kicker,
.tool-panel-kicker,
.tool-section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #1d4ed8;
    margin-bottom: 14px;
}

.tool-kicker::before,
.tool-panel-kicker::before,
.tool-section-kicker::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.tool-hero-copy h1,
.tool-page h1.tool-page-title {
    margin: 0 0 10px 0;
    font-size: clamp(1.55rem, 3vw, 2.15rem);
    line-height: 1.12;
    color: var(--primary-color) !important;
}

.tool-hero-text,
.tool-subtitle {
    max-width: 760px;
    font-size: 1.02rem;
    line-height: 1.7;
    color: #475569;
    margin: 0 0 18px 0;
}

.tool-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tool-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(37, 99, 235, 0.12);
    color: #1e3a8a;
    font-size: 0.82rem;
    font-weight: 600;
}

.tool-hero-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tool-hero-panel h3,
.tool-section-title {
    margin: 0;
    color: #10213a;
    font-size: 1.05rem;
    font-weight: 600;
}

.tool-hero-panel p,
.tool-section-copy {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
    font-size: 0.92rem;
}

.tool-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.tool-metric-card {
    padding: 16px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.tool-metric-card strong {
    display: block;
    font-size: 1.35rem;
    color: #0f172a;
    margin-bottom: 4px;
}

.tool-metric-card span {
    display: block;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.45;
}

.tool-input-card .input-group,
.tool-action-row {
    gap: 10px;
    flex-wrap: wrap;
}

.tool-product-page .result-box.raw-output,
.tool-product-page .quick-summary,
.tool-product-page .friendly-result-wrapper,
.tool-product-page .scan-status,
.tool-product-page .stats-header,
.tool-product-page .filter-section,
.tool-product-page .table-card,
.tool-product-page .data-browser-container,
.tool-product-page .stats-panel,
.tool-product-page .removed-chars,
.tool-product-page .info-section,
.tool-product-page .form-info,
.tool-product-page #generated-code-container,
.tool-product-page #form-preview-container {
    border-radius: 24px !important;
}

.tool-product-page footer {
    margin-top: 0;
    padding-bottom: 28px;
}

.tool-results-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.tool-results-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
}

.tool-results-head .tool-section-copy {
    max-width: 760px;
    margin-bottom: 0;
}

.tool-results-shell .unified-loader,
.tool-results-shell .quick-summary,
.tool-results-shell .friendly-result-wrapper,
.tool-results-shell .technical-details-accordion,
.tool-results-shell .result-box.raw-output {
    margin: 0;
}

.unified-loader,
.quick-summary,
.friendly-result-wrapper,
.tool-scroll-anchor,
#results,
#result {
    scroll-margin-top: 14px;
}

.tool-results-empty {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px 20px;
    border-radius: 20px;
    border: 1px dashed rgba(37, 99, 235, 0.22);
    background: #ffffff;
    color: #334155;
}

.tool-results-empty::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 999px;
    flex-shrink: 0;
    margin-top: 6px;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.12);
}

.tool-results-empty strong {
    display: block;
    margin-bottom: 4px;
    color: #0f172a;
    font-size: 0.95rem;
}

.tool-results-empty span {
    display: block;
    line-height: 1.6;
    font-size: 0.9rem;
}

.tool-handoff-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.tool-handoff-button {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    background: #ffffff;
    color: var(--text-main);
    text-decoration: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.tool-handoff-button:hover,
.tool-handoff-button:focus-visible {
    border-color: rgba(37, 99, 235, 0.42);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.11);
    color: var(--text-main);
    text-decoration: none;
    transform: translateY(-1px);
}

.tool-handoff-button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.2);
    outline-offset: 2px;
}

.tool-handoff-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-size: 1.22rem;
}

.tool-handoff-copy {
    min-width: 0;
}

.tool-handoff-copy strong {
    display: block;
    color: var(--text-main);
    font-size: 0.86rem;
    font-weight: 850;
    line-height: 1.25;
}

.tool-handoff-copy span {
    display: block;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-table-card {
    overflow: hidden;
}

.tool-table-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.tool-table-shell {
    overflow-x: auto;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
}

.tool-table-card table {
    min-width: 860px;
    margin-bottom: 0;
}

.tool-table-card thead {
    background: #f8fafc;
}

.tool-table-card th {
    color: var(--text-secondary);
    font-size: 0.76rem;
    text-transform: uppercase;
}

.tool-table-card td {
    vertical-align: middle;
    padding: 10px 14px;
    font-size: 0.88rem;
}

.tool-table-truncate {
    display: block;
    max-width: 540px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 650;
}

.tool-table-time {
    color: var(--text-main);
    font-size: 0.86rem;
    font-weight: 650;
}

.tool-table-muted {
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.35;
}

.tool-table-details-cell {
    background: #f8fafc;
}

.tool-table-details-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
}

.tool-table-details-panel {
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: #ffffff;
}

.tool-table-details-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.tool-table-details-panel h5 {
    margin: 0;
    color: var(--text-main);
    font-size: 0.92rem;
    font-weight: 850;
}

.tool-table-details-cell pre {
    margin: 0;
    background: var(--code-surface);
    color: var(--code-text);
    border: 0;
    border-radius: 12px;
    max-height: 430px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.55;
}

.tool-scroll-anchor {
    scroll-margin-top: 92px;
}

@media (max-width: 1240px) {
    .tool-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    body.tool-product-page > .container,
    body.tool-product-page > .container.tool-page,
    body.tool-product-page > .tool-page,
    body.tool-product-page > .main-container.tool-page {
        padding: 24px 14px 60px !important;
    }

    .tool-hero-copy,
    .tool-hero-panel,
    .tool-section-card {
        padding: 20px;
        border-radius: 20px;
    }

    .tool-input-card,
    .tool-surface-card {
        border-radius: 20px;
    }

    .tool-results-empty {
        padding: 16px;
    }

    .tool-metric-grid {
        grid-template-columns: 1fr;
    }
}

/* Advanced Detail Cards */
.advanced-detail-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 10px 14px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.advanced-detail-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.adc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.adc-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.adc-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.adc-value-wrap {
    padding: 5px 8px;
    background: var(--bg-card);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-mono);
    font-size: 13px;
    word-break: break-all;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.adc-explanation {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Expandable specific tweaks */
.advanced-detail-card.expandable-record {
    cursor: pointer;
    border-left: 4px solid var(--border-color);
}

.advanced-detail-card.expandable-record:hover {
    border-left-color: var(--primary-color);
}

.advanced-detail-card.expandable-record .adc-value-wrap::after {
    content: "\25BC Click to view raw details";
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    text-align: right;
    font-family: var(--font-family);
}

.advanced-detail-card.expandable-record.expanded .adc-value-wrap::after {
    content: "\25B2 Click to hide raw details";
}

/* Raw Record Rollout Details */
.raw-record-details {
    margin-top: 10px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    border-left: 3px solid var(--primary-color);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.raw-record-container h4 {
    margin: 0 0 10px 0;
    color: var(--text-color);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.raw-record-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
}

.raw-record-item {
    display: flex;
    gap: 10px;
    align-items: baseline;
}

.raw-record-item strong {
    color: var(--text-muted);
    min-width: 130px;
    flex-shrink: 0;
    font-weight: 600;
}

.raw-record-value {
    color: var(--text-color);
    word-break: break-all;
    flex: 1;
    background: var(--bg-main);
    padding: 4px 8px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    font-family: var(--font-mono);
}

.raw-record-actions {
    margin-top: 12px;
    text-align: right;
}

.btn-copy-record {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 5px 10px;
    font-size: 11px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-weight: 600;
}

.btn-copy-record:hover {
    background: var(--primary-hover);
}

/* Verdict Banner - the big pass/fail hero at the top */
.verdict-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}
.verdict-banner.verdict-pass {
    border-color: var(--success-color);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, rgba(16, 185, 129, 0.02) 100%);
}
.verdict-banner.verdict-fail {
    border-color: var(--danger-color);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.06) 0%, rgba(239, 68, 68, 0.02) 100%);
}
.verdict-banner.verdict-warn {
    border-color: var(--warning-color);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, rgba(245, 158, 11, 0.02) 100%);
}
.verdict-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.verdict-pass .verdict-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
}
.verdict-fail .verdict-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}
.verdict-warn .verdict-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
}
.verdict-text h3 {
    margin: 0 0 4px 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-color);
}
.verdict-text p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.verdict-domain {
    color: var(--primary-color);
    font-weight: 600;
}

/* Checklist Section */
.check-section {
    margin-bottom: 18px;
}
.check-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-left: 6px;
}

/* Check Row - single pass/fail item */
.check-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: calc(var(--border-radius-md) + 2px);
    margin-bottom: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.check-row:last-child {
    margin-bottom: 0;
}
.check-row:hover {
    border-color: rgba(37, 99, 235, 0.26);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.1);
}
.check-row.expandable {
    cursor: pointer;
}
.check-row.expandable:hover {
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.86) 0%, rgba(248, 250, 252, 0.98) 100%);
    transform: translateY(-1px);
}
.check-row.expandable:focus-visible {
    outline: none;
    border-color: rgba(37, 99, 235, 0.42);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14), 0 18px 32px rgba(37, 99, 235, 0.12);
}
.check-row.expanded {
    border-color: rgba(37, 99, 235, 0.3);
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.94) 0%, rgba(248, 250, 252, 0.98) 100%);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.12);
}

/* Status indicator circle */
.check-status {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.check-status svg {
    width: 16px;
    height: 16px;
}
.check-status.check-pass {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
}
.check-status.check-fail {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}
.check-status.check-warn {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
}
.check-status.check-info {
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary-color);
}

/* Check content */
.check-content {
    flex: 1;
    min-width: 0;
}
.check-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}
.check-label-group {
    flex: 1;
    min-width: 0;
}
.check-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.check-label .badge {
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}
.badge-pass { background: rgba(16, 185, 129, 0.15); color: var(--success-color); }
.badge-fail { background: rgba(239, 68, 68, 0.15); color: var(--danger-color); }
.badge-warn { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.badge-info { background: rgba(37, 99, 235, 0.12); color: var(--primary-color); }
.check-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.check-value {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.06);
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    margin-top: 10px;
    display: inline-block;
    overflow-wrap: anywhere;
}
.check-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    background: rgba(37, 99, 235, 0.06);
    color: var(--primary-color);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.check-toggle-text {
    white-space: nowrap;
}
.check-toggle-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(37, 99, 235, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.check-toggle-icon::before {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    margin-top: -1px;
}
.check-row.expandable:hover .check-toggle {
    border-color: rgba(37, 99, 235, 0.24);
    background: rgba(37, 99, 235, 0.1);
}
.check-row.expanded .check-toggle {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}
.check-row.expanded .check-toggle-icon {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.24);
}
.check-row.expanded .check-toggle-icon::before {
    transform: rotate(225deg);
}

/* Expand toggle for check rows */
.check-expand-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.73rem;
    font-weight: 600;
    color: #1d4ed8;
    margin-top: 10px;
}
.check-expand-hint::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.75;
}

/* Technical detail panel (hidden by default under check rows) */
.check-details {
    position: relative;
    margin-top: 14px;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: calc(var(--border-radius-md) + 2px);
    display: none;
    animation: slideDown 0.24s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.check-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.9), rgba(96, 165, 250, 0.2));
}
.check-details.visible {
    display: block;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.check-details-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 10px 0;
    font-size: 0.8rem;
}
.check-details-row.check-details-copyable {
    position: relative;
    margin: 0 -8px;
    padding: 10px 8px;
    border-radius: 10px;
    transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.check-details-row.check-details-copyable:hover {
    background: rgba(37, 99, 235, 0.06);
}
.check-details-row.check-details-copyable:focus-visible {
    outline: none;
    background: rgba(37, 99, 235, 0.08);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.check-details-row.check-details-copyable.copied {
    background: rgba(16, 185, 129, 0.1);
}
.check-details-row:not(:last-child) {
    border-bottom: 1px dashed rgba(148, 163, 184, 0.4);
}
.check-details-label {
    color: #64748b;
    min-width: 128px;
    flex-shrink: 0;
    font-weight: 600;
    font-size: 0.68rem;
    text-transform: uppercase;
}
.check-details-value {
    color: var(--text-color);
    overflow-wrap: anywhere;
    flex: 1;
    font-family: var(--font-mono);
    font-size: 0.79rem;
    line-height: 1.5;
    transition: color 0.18s ease;
}
.check-details-row.check-details-copyable:hover .check-details-value,
.check-details-row.check-details-copyable:focus-visible .check-details-value {
    color: var(--primary-color);
}

/* Info callout box */
.info-callout {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: var(--border-radius-md);
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.info-callout svg {
    flex-shrink: 0;
    color: var(--primary-color);
    margin-top: 2px;
}

/* Dark mode adjustments */
body.dark-mode .verdict-banner.verdict-pass { background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.03) 100%); }
body.dark-mode .verdict-banner.verdict-fail { background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.03) 100%); }
body.dark-mode .verdict-banner.verdict-warn { background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.03) 100%); }
body.dark-mode .technical-details-accordion {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.9) 100%);
    border-color: rgba(96, 165, 250, 0.16);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.45);
}
body.dark-mode .technical-summary-title {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.16) 0%, rgba(15, 23, 42, 0.94) 100%);
    border-bottom-color: rgba(96, 165, 250, 0.14);
}
body.dark-mode .technical-summary-title:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, rgba(30, 41, 59, 0.96) 100%);
}
body.dark-mode .check-row {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.88) 100%);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.35);
}
body.dark-mode .check-row.expandable:hover {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.9) 100%);
}
body.dark-mode .check-row.expanded {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.92) 100%);
    border-color: rgba(96, 165, 250, 0.24);
}
body.dark-mode .check-toggle {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(96, 165, 250, 0.22);
    color: #93c5fd;
}
body.dark-mode .check-toggle-icon {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(96, 165, 250, 0.18);
}
body.dark-mode .check-details-row.check-details-copyable:hover {
    background: rgba(59, 130, 246, 0.12);
}
body.dark-mode .check-details-row.check-details-copyable:focus-visible {
    background: rgba(59, 130, 246, 0.16);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}
body.dark-mode .check-details-row.check-details-copyable.copied {
    background: rgba(16, 185, 129, 0.14);
}
body.dark-mode .check-row.expanded .check-toggle {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(96, 165, 250, 0.26);
    color: #dbeafe;
}
body.dark-mode .check-value {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(96, 165, 250, 0.14);
    color: #93c5fd;
}
body.dark-mode .check-expand-hint {
    color: #93c5fd;
}
body.dark-mode .check-details {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.86) 100%);
    border-color: rgba(96, 165, 250, 0.16);
}
body.dark-mode .check-details-row:not(:last-child) {
    border-bottom-color: rgba(148, 163, 184, 0.22);
}
body.dark-mode .check-details-label {
    color: #94a3b8;
}

@media (max-width: 576px) {
    .verdict-banner { flex-direction: column; text-align: center; gap: 10px; padding: 16px; }
    .technical-details-body { padding: 14px; }
    .check-row { padding: 14px; gap: 12px; }
    .check-main { flex-direction: column; align-items: flex-start; }
    .check-toggle { align-self: flex-start; }
    .check-details-row { flex-direction: column; gap: 2px; }
    .check-details-label { min-width: unset; }
}

/* btn-outline-danger */
.btn-outline-danger {
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    background: transparent;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.btn-outline-danger:hover {
    background: var(--danger-color);
    color: white;
}

/* Typography consistency pass */
body :where(
    :not(code):not(pre):not(kbd):not(samp):not(.material-symbols-rounded):not(.blacklist-inline-code):not(.blacklist-query-block):not(.endpoint-box):not([class*="mono"]):not([class*="code"])
) {
    font-family: var(--font-family);
}

body :where(strong, b) {
    font-weight: 600;
}

body :where(h1, h2, h3, h4, h5, h6) {
    font-weight: 600;
}

@media (max-width: 720px) {
    html {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

}

/* Compact title scale and softer emphasis across the toolbox UI. */
body :where(
    h1,
    .tool-hero-copy h1,
    .tool-page h1.tool-page-title,
    .dash-title h1
) {
    font-size: clamp(1.5rem, 2.4vw, 2.1rem) !important;
    font-weight: 600 !important;
    line-height: 1.14 !important;
}

body :where(
    h2,
    .page-header h2,
    .admin-header h2,
    .stats-header h1,
    .feed-builder-header h2,
    .users-hero h2,
    .perm-title h2,
    .blacklist-summary-title
) {
    font-size: clamp(1.12rem, 1.65vw, 1.45rem) !important;
    font-weight: 600 !important;
    line-height: 1.22 !important;
}

body :where(
    h3,
    .tool-hero-panel h3,
    .tool-section-title,
    .section-title,
    .table-card h3,
    .chart-card h3,
    .dash-panel h2,
    .dash-panel h3,
    .perm-panel h3,
    .blacklist-section-header h2,
    .blacklist-provider-title,
    .blacklist-resolved-copy h3,
    .blacklist-provider-card h3,
    .blacklist-resolved-card h3,
    .blacklist-note-card h3
) {
    font-size: clamp(0.94rem, 1.15vw, 1.08rem) !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

body :where(h4, h5, h6) {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

body :where(
    .tool-kicker,
    .tool-panel-kicker,
    .tool-section-kicker,
    .blacklist-summary-kicker,
    .dash-btn,
    .dash-range-btn,
    .dash-kpi-label,
    .dash-kpi-note,
    .dash-chart-card span,
    .dash-health-row,
    .dash-pill,
    .dash-footer-link,
    .users-action-btn,
    .users-metric div span,
    .users-metric strong,
    .users-metric small,
    .users-field label,
    .users-clear,
    .users-count,
    .users-table th,
    .users-avatar,
    .users-name,
    .users-badge,
    .perm-tab,
    .perm-btn,
    .perm-badge,
    .perm-panel-foot,
    .blacklist-summary-card strong,
    .blacklist-target-label,
    .blacklist-target-value,
    .blacklist-section-pill,
    .blacklist-provider-meta-label,
    .blacklist-provider-meta-value,
    .blacklist-section-label,
    .blacklist-delist-card strong,
    .blacklist-chip,
    .blacklist-status
) {
    font-weight: 600 !important;
}

body :where(
    .dash-kpi-value,
    .dash-chart-card strong,
    .blacklist-summary-card strong
) {
    font-size: clamp(1.05rem, 1.5vw, 1.25rem) !important;
}

