.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
}
.site-body {
    padding-top: 62px;
}

.email-body-viewer {
    color: #1f2937;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    overflow-wrap: anywhere;
    word-break: normal;
}

.email-body-viewer > :first-child {
    margin-top: 0;
}

.email-body-viewer :where(p, div, blockquote, pre, table, ul, ol) {
    margin-bottom: 0.75rem;
}

.email-body-viewer :where(p, div, blockquote, pre, table, ul, ol):last-child {
    margin-bottom: 0;
}

.email-body-viewer :where(h1, h2, h3, h4) {
    color: #111827;
    font-weight: 600;
    line-height: 1.3;
    margin: 0.9rem 0 0.45rem;
}

.email-body-viewer h1 {
    font-size: 1.25rem;
}

.email-body-viewer h2 {
    font-size: 1.125rem;
}

.email-body-viewer h3,
.email-body-viewer h4 {
    font-size: 1rem;
}

.email-body-viewer a {
    color: #2563eb;
    text-decoration: underline;
}

.email-body-viewer blockquote {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #9ca3af;
    border-radius: 0.375rem;
    color: #4b5563;
    margin-top: 0.75rem;
    padding: 0.85rem 1rem;
}

.email-body-viewer blockquote blockquote {
    background: #fff;
    border-left-color: #cbd5e1;
}

.email-body-viewer blockquote::before {
    color: #6b7280;
    content: "Previous message";
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 0.55rem;
    text-transform: uppercase;
}

.email-body-viewer .email-reply-header {
    align-items: center;
    color: #6b7280;
    display: flex;
    font-size: 0.78rem;
    font-weight: 600;
    gap: 0.75rem;
    margin: 1rem 0 0.65rem;
    text-transform: none;
}

.email-body-viewer .email-reply-header::after {
    background: #e5e7eb;
    content: "";
    flex: 1 1 auto;
    height: 1px;
}

.email-body-viewer :where(ul, ol) {
    padding-left: 1.25rem;
}

.email-body-viewer ul {
    list-style: disc;
}

.email-body-viewer ol {
    list-style: decimal;
}

.email-body-viewer pre {
    background: transparent;
    border: 0;
    color: #4b5563;
    font-family: inherit;
    font-size: 0.92em;
    padding: 0;
    white-space: pre-wrap;
}

.email-body-viewer table {
    border-collapse: collapse;
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.email-body-viewer :where(td, th) {
    border: 1px solid #e5e7eb;
    padding: 0.4rem 0.55rem;
    vertical-align: top;
}

.email-body-viewer th {
    background: #f9fafb;
    font-weight: 600;
}

.email-body-viewer hr {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 1rem 0;
}

.reporting-overview-shell {
    overflow: visible;
}

.reporting-overview-table {
    border-collapse: separate;
    border-spacing: 0;
}

.reporting-overview-table thead th {
    background: #f9fafb;
    position: sticky;
    top: 62px;
    z-index: 30;
}

.reporting-overview-header {
    background: #f9fafb;
    box-shadow: inset 0 -1px 0 #e5e7eb;
}

.reporting-overview-corner {
    top: 62px;
    z-index: 40;
    box-shadow: inset 0 -1px 0 #e5e7eb, 1px 0 0 #e5e7eb;
}

.reporting-overview-customer {
    z-index: 20;
    box-shadow: 1px 0 0 #f3f4f6;
    background: #fff;
}

.reporting-overview-requirements {
    width: 180px;
    min-width: 180px;
    max-width: 180px;
}

.reporting-overview-table tbody tr:hover > td,
.reporting-overview-table tbody tr:hover > .reporting-overview-customer,
.reporting-overview-table tbody tr > .reporting-overview-customer:hover {
    background: #f9fafb !important;
}

/* ── Dark-mode colour scheme ─────────────────────────────────────────── */

html.dark { color-scheme: dark; }

/* Backgrounds */
html.dark .bg-white      { background-color: #1e293b !important; }
html.dark .bg-gray-50    { background-color: #0f172a !important; }
html.dark .bg-gray-100   { background-color: #1e293b !important; }
html.dark .bg-gray-200   { background-color: #334155 !important; }

/* Text */
html.dark .text-gray-900 { color: #f1f5f9 !important; }
html.dark .text-gray-800 { color: #e2e8f0 !important; }
html.dark .text-gray-700 { color: #cbd5e1 !important; }
html.dark .text-gray-600 { color: #94a3b8 !important; }
html.dark .text-gray-500 { color: #94a3b8 !important; }
html.dark .text-gray-400 { color: #64748b !important; }
html.dark .text-gray-300 { color: #64748b !important; }

/* Borders */
html.dark .border-gray-100 { border-color: #1e293b !important; }
html.dark .border-gray-200 { border-color: #334155 !important; }
html.dark .border-gray-300 { border-color: #475569 !important; }
html.dark .divide-gray-100 > :not([hidden]) ~ :not([hidden]) { border-color: #1e293b !important; }
html.dark .divide-gray-200 > :not([hidden]) ~ :not([hidden]) { border-color: #334155 !important; }

/* Hover states */
html.dark .hover\:bg-gray-50:hover  { background-color: #334155 !important; }
html.dark .hover\:bg-gray-200:hover { background-color: #475569 !important; }
html.dark .hover\:text-gray-600:hover { color: #e2e8f0 !important; }
html.dark .hover\:text-gray-700:hover { color: #e2e8f0 !important; }
html.dark .hover\:text-gray-800:hover { color: #f1f5f9 !important; }
html.dark .hover\:text-gray-900:hover { color: #f8fafc !important; }

/* Status/alert backgrounds — keep readable in dark mode */
html.dark .bg-red-50     { background-color: rgba(127, 29, 29, 0.3) !important; }
html.dark .bg-red-100    { background-color: rgba(127, 29, 29, 0.4) !important; }
html.dark .bg-green-50   { background-color: rgba(20, 83, 45, 0.3) !important; }
html.dark .bg-green-100  { background-color: rgba(20, 83, 45, 0.4) !important; }
html.dark .bg-yellow-100 { background-color: rgba(113, 63, 18, 0.3) !important; }
html.dark .bg-amber-50   { background-color: rgba(113, 63, 18, 0.25) !important; }
html.dark .bg-blue-50    { background-color: rgba(30, 58, 138, 0.3) !important; }
html.dark .bg-blue-100   { background-color: rgba(30, 58, 138, 0.4) !important; }
html.dark .border-red-200    { border-color: rgba(153, 27, 27, 0.5) !important; }
html.dark .border-green-200  { border-color: rgba(22, 101, 52, 0.5) !important; }
html.dark .border-amber-200  { border-color: rgba(146, 64, 14, 0.5) !important; }

/* Shadow softening */
html.dark .shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3) !important; }
html.dark .shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3) !important; }

/* Form inputs */
html.dark input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="hidden"]),
html.dark textarea,
html.dark select {
    background-color: #0f172a !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}
html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #64748b !important;
}

/* Navbar */
html.dark .site-nav {
    background-color: #1e293b !important;
    border-color: #702082 !important;
}
html.dark .site-logo { filter: brightness(0) invert(1); }

/* Custom reporting table */
html.dark .reporting-overview-table thead th { background: #1e293b; }
html.dark .reporting-overview-header         { background: #1e293b; box-shadow: inset 0 -1px 0 #334155; }
html.dark .reporting-overview-corner         { box-shadow: inset 0 -1px 0 #334155, 1px 0 0 #334155; }
html.dark .reporting-overview-customer       { background: #1e293b; box-shadow: 1px 0 0 #1e293b; }
html.dark .reporting-overview-table tbody tr:hover > td,
html.dark .reporting-overview-table tbody tr:hover > .reporting-overview-customer,
html.dark .reporting-overview-table tbody tr > .reporting-overview-customer:hover {
    background: #334155 !important;
}

/* Email viewer */
html.dark .email-body-viewer              { color: #e2e8f0; }
html.dark .email-body-viewer :where(h1, h2, h3, h4) { color: #f1f5f9; }
html.dark .email-body-viewer a            { color: #60a5fa; }
html.dark .email-body-viewer blockquote   { background: #1e293b; border-color: #475569; border-left-color: #64748b; color: #94a3b8; }
html.dark .email-body-viewer blockquote blockquote { background: #0f172a; border-left-color: #475569; }
html.dark .email-body-viewer blockquote::before    { color: #94a3b8; }
html.dark .email-body-viewer .email-reply-header   { color: #94a3b8; }
html.dark .email-body-viewer .email-reply-header::after { background: #475569; }
html.dark .email-body-viewer pre          { color: #94a3b8; }
html.dark .email-body-viewer :where(td, th) { border-color: #475569; }
html.dark .email-body-viewer th           { background: #1e293b; }
html.dark .email-body-viewer hr           { border-top-color: #475569; }

/* ── Pink-mode colour scheme ─────────────────────────────────────────── */

html.pink { color-scheme: light; }

html.pink body {
    background-color: #fbcfe8 !important;
}

/* Backgrounds */
html.pink .bg-white      { background-color: #ffe4f1 !important; }
html.pink .bg-gray-50    { background-color: #fbcfe8 !important; }
html.pink .bg-gray-100   { background-color: #f9a8d4 !important; }
html.pink .bg-gray-200   { background-color: #f472b6 !important; }

/* Text */
html.pink .text-gray-900 { color: #3b1d2c !important; }
html.pink .text-gray-800 { color: #4a2436 !important; }
html.pink .text-gray-700 { color: #653046 !important; }
html.pink .text-gray-600 { color: #88445e !important; }
html.pink .text-gray-500 { color: #a35a74 !important; }
html.pink .text-gray-400 { color: #be7890 !important; }
html.pink .text-gray-300 { color: #d7a5b7 !important; }
html.pink .text-brand-purple,
html.pink .hover\:text-brand-purple:hover,
html.pink .hover\:text-blue-600:hover,
html.pink .hover\:text-blue-700:hover,
html.pink .hover\:text-blue-800:hover,
html.pink .hover\:text-blue-900:hover {
    color: #be185d !important;
}

/* Borders */
html.pink .border-gray-100 { border-color: #f9a8d4 !important; }
html.pink .border-gray-200 { border-color: #f472b6 !important; }
html.pink .border-gray-300 { border-color: #ec4899 !important; }
html.pink .border-brand-purple,
html.pink .border-blue-200,
html.pink .border-blue-600 {
    border-color: #db2777 !important;
}
html.pink .divide-gray-100 > :not([hidden]) ~ :not([hidden]) { border-color: #f9a8d4 !important; }
html.pink .divide-gray-200 > :not([hidden]) ~ :not([hidden]) { border-color: #f472b6 !important; }

/* Hover states */
html.pink .hover\:bg-gray-50:hover  { background-color: #f9a8d4 !important; }
html.pink .hover\:bg-gray-200:hover { background-color: #f472b6 !important; }
html.pink .hover\:bg-purple-700:hover,
html.pink .hover\:bg-purple-800:hover {
    background-color: #be185d !important;
}
html.pink .hover\:text-gray-600:hover,
html.pink .hover\:text-gray-700:hover,
html.pink .hover\:text-gray-800:hover,
html.pink .hover\:text-gray-900:hover {
    color: #831843 !important;
}

/* Status/alert backgrounds */
html.pink .bg-red-50     { background-color: #fff1f2 !important; }
html.pink .bg-red-100    { background-color: #ffe4e6 !important; }
html.pink .bg-green-50   { background-color: #ecfdf5 !important; }
html.pink .bg-green-100  { background-color: #d1fae5 !important; }
html.pink .bg-yellow-100 { background-color: #fef3c7 !important; }
html.pink .bg-amber-50   { background-color: #fffbeb !important; }
html.pink .bg-blue-50    { background-color: #fdf2f8 !important; }
html.pink .bg-blue-100   { background-color: #fce7f3 !important; }
html.pink .border-red-200    { border-color: #fecdd3 !important; }
html.pink .border-green-200  { border-color: #a7f3d0 !important; }
html.pink .border-amber-200  { border-color: #fde68a !important; }

/* Brand/action accents */
html.pink .bg-brand-purple,
html.pink .bg-blue-600 {
    background-color: #db2777 !important;
}
html.pink .focus\:ring-brand-purple:focus,
html.pink .focus\:ring-blue-500:focus {
    --tw-ring-color: rgba(219, 39, 119, 0.55) !important;
}

/* Shadows */
html.pink .shadow-sm { box-shadow: 0 1px 4px 0 rgba(190, 24, 93, 0.22) !important; }
html.pink .shadow-lg { box-shadow: 0 14px 28px -10px rgba(190, 24, 93, 0.42), 0 6px 12px -8px rgba(190, 24, 93, 0.32) !important; }

/* Form inputs */
html.pink input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="hidden"]),
html.pink textarea,
html.pink select {
    background-color: #fff1f7 !important;
    border-color: #ec4899 !important;
    color: #3b1d2c !important;
}
html.pink input::placeholder,
html.pink textarea::placeholder {
    color: #be7890 !important;
}

/* Navbar */
html.pink .site-nav {
    background-color: #f9a8d4 !important;
    border-color: #be185d !important;
}
html.pink .site-logo { filter: saturate(1.35) hue-rotate(305deg); }

html.pink table,
html.pink .rounded-lg,
html.pink .rounded-xl {
    border-color: #f472b6;
}

/* Custom reporting table */
html.pink .reporting-overview-table thead th { background: #f9a8d4; }
html.pink .reporting-overview-header         { background: #f9a8d4; box-shadow: inset 0 -1px 0 #ec4899; }
html.pink .reporting-overview-corner         { box-shadow: inset 0 -1px 0 #ec4899, 1px 0 0 #ec4899; }
html.pink .reporting-overview-customer       { background: #ffe4f1; box-shadow: 1px 0 0 #f9a8d4; }
html.pink .reporting-overview-table tbody tr:hover > td,
html.pink .reporting-overview-table tbody tr:hover > .reporting-overview-customer,
html.pink .reporting-overview-table tbody tr > .reporting-overview-customer:hover {
    background: #f472b6 !important;
}

/* Email viewer */
html.pink .email-body-viewer              { color: #4a2436; }
html.pink .email-body-viewer :where(h1, h2, h3, h4) { color: #3b1d2c; }
html.pink .email-body-viewer a            { color: #be185d; }
html.pink .email-body-viewer blockquote   { background: #ffe4f1; border-color: #f9a8d4; border-left-color: #db2777; color: #653046; }
html.pink .email-body-viewer blockquote blockquote { background: #fff1f7; border-left-color: #ec4899; }
html.pink .email-body-viewer blockquote::before    { color: #a35a74; }
html.pink .email-body-viewer .email-reply-header   { color: #88445e; }
html.pink .email-body-viewer .email-reply-header::after { background: #f9a8d4; }
html.pink .email-body-viewer pre          { color: #653046; }
html.pink .email-body-viewer :where(td, th) { border-color: #f9a8d4; }
html.pink .email-body-viewer th           { background: #ffe4f1; }
html.pink .email-body-viewer hr           { border-top-color: #f9a8d4; }

/* Theme toggle transition */
html.dark-transition,
html.dark-transition *,
html.dark-transition *::before,
html.dark-transition *::after {
    transition: background-color 0.2s ease, color 0.15s ease, border-color 0.2s ease !important;
}
