/* Dashboard Add-in CSS */
:root {
    --primary-orange: #FF6B35;
    --primary-blue: #0C2853;
    --light-blue: #1A4A7A;
    --dark-blue: #0C1E42;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --disabled-bg: #f0f2f5;
    --disabled-text: #adb5bd;
    --font-main: 'Barlow', 'Segoe UI', sans-serif;
    --font-display: 'Barlow Condensed', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

body {
    background: #f0f4f8;
    font-family: var(--font-main);
    margin: 0;
}

/* ── Unified Suite Header ── */
.suite-header {
    background: linear-gradient(135deg, #0C1E42 0%, #0C2853 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

.suite-header__topbar {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    gap: 1rem;
}

.suite-header__left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.header-logo {
    height: 32px;
    width: auto;
    display: block;
}

/* Circular back button */
.btn-back-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.btn-back-circle:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.55);
    transform: translateX(-2px);
}

/* Right-side actions slot */
.suite-header__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

/* Buttons injected into the actions slot inherit this style */
.suite-header__actions .btn-header-action,
.suite-header__actions .btn-refresh,
.suite-header__actions .btn-create-zone,
.suite-header__actions button {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 6px;
    padding: 0.4rem 0.875rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    box-shadow: none;
    /* override any gradient from individual add-in CSS */
    background-image: none !important;
}

.suite-header__actions .btn-header-action:hover,
.suite-header__actions .btn-refresh:hover,
.suite-header__actions .btn-create-zone:hover,
.suite-header__actions button:hover {
    background: rgba(255, 255, 255, 0.28) !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.55);
    color: white;
    transform: none;
    box-shadow: none;
}

/* ── Tab Strip ── */
.suite-header__tabs {
    height: 36px;
    display: flex;
    align-items: stretch;
    padding: 0 1.25rem;
    gap: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
    scrollbar-width: none;
}

.suite-header__tabs::-webkit-scrollbar { display: none; }

.suite-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0 1rem;
    font-family: var(--font-main);
    font-size: 0.775rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.6);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    text-transform: uppercase;
}

.suite-tab:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.06);
}

.suite-tab--active {
    color: white;
    border-bottom-color: var(--primary-orange);
    background: rgba(255, 255, 255, 0.08);
}

.suite-tab i {
    font-size: 0.75rem;
    opacity: 0.85;
}

/* ── Loading ── */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(240, 244, 248, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loading-content { text-align: center; }

.loading-label {
    color: var(--primary-blue);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.spinner-ring {
    width: 52px;
    height: 52px;
    border: 4px solid rgba(12, 30, 66, 0.15);
    border-top-color: var(--primary-orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Dashboard View ── */
.dashboard-view {
    min-height: calc(100vh - 56px);
}

.dashboard-overview {
    display: grid;
    grid-template-columns: minmax(220px, .9fr) minmax(360px, 1.2fr) minmax(220px, .9fr);
    margin-bottom: 1.25rem;
    overflow: hidden;
    border: 1px solid #d0d7de;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(31,35,40,.06);
}

.dashboard-overview__section {
    min-width: 0;
    min-height: 116px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.25rem 1.4rem;
}

.dashboard-overview__section + .dashboard-overview__section { border-left: 1px solid #d8dee4; }
.dashboard-overview__eyebrow { margin-bottom: .42rem; color: #57606a; font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.dashboard-overview__greeting { margin: 0; color: #24292f; font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
.dashboard-overview__status { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
.fleet-status-button { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .7rem; min-height: 66px; padding: .75rem .9rem; border: 1px solid #d0d7de; border-radius: 8px; background: #fff; color: #24292f; text-align: left; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.fleet-status-button:hover { border-color: #8c959f; background: #f6f8fa; }
.fleet-status-button--active { border-color: var(--primary-blue); background: #f0f6fc; box-shadow: inset 0 0 0 1px var(--primary-blue); }
.fleet-status-button__value { min-width: 2.25rem; font-size: 1.55rem; font-weight: 700; line-height: 1; text-align: center; }
.fleet-status-button--alert .fleet-status-button__value { color: #cf222e; }
.fleet-status-button--warning .fleet-status-button__value { color: #9a6700; }
.fleet-status-button__copy { display: grid; gap: .15rem; }
.fleet-status-button__label { font-size: .82rem; font-weight: 700; }
.fleet-status-button__hint { color: #57606a; font-size: .68rem; }
.dashboard-overview__placeholder { color: #57606a; font-size: .8rem; line-height: 1.45; }
.dashboard-overview__placeholder strong { display: block; margin-bottom: .25rem; color: #24292f; font-size: .82rem; }
.dashboard-email-launch { width:100%; display:flex; align-items:center; justify-content:space-between; gap:.8rem; padding:.75rem .85rem; border:1px solid #d0d7de; border-radius:8px; color:#24292f; background:#fff; text-align:left; cursor:pointer; transition:border-color .15s ease,background-color .15s ease; }
.dashboard-email-launch:hover { border-color:#8c959f; background:#f6f8fa; }
.dashboard-email-launch strong { font-size:.82rem; }
.dashboard-email-launch > i { color:var(--primary-blue); }
.dashboard-status-empty { grid-column: 1 / -1; padding: 2.5rem 1rem; border: 1px dashed #d0d7de; border-radius: 10px; color: #57606a; background: #f6f8fa; font-size: .88rem; text-align: center; }

.email-scheduler-modal { position:fixed; inset:var(--email-modal-top, 56px) 0 0; z-index:10000; padding:1.5rem; overflow:auto; background:rgba(31,35,40,.56); backdrop-filter:blur(3px); align-items:center; justify-content:center; }
.email-scheduler-modal__panel { width:min(860px,100%); max-height:calc(100vh - var(--email-modal-top, 56px) - 3rem); display:flex; flex-direction:column; overflow:hidden; border:1px solid #d0d7de; border-radius:12px; background:#fff; box-shadow:0 24px 64px rgba(31,35,40,.28); }
.email-scheduler-modal__header { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; padding:1.35rem 1.5rem 1.1rem; border-bottom:1px solid #d8dee4; }
.email-scheduler-modal__eyebrow { margin-bottom:.22rem; color:#57606a; font-size:.7rem; font-weight:600; letter-spacing:.04em; text-transform:uppercase; }
.email-scheduler-modal__header h2 { margin:0; color:#24292f; font-size:1.35rem; font-weight:600; }
.email-scheduler-modal__header p { margin:.3rem 0 0; color:#57606a; font-size:.82rem; }
.email-scheduler-modal__close { width:34px; height:34px; display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; border:1px solid #d0d7de; border-radius:7px; color:#24292f; background:#fff; cursor:pointer; }
.email-scheduler-modal__close:hover { background:#f6f8fa; }
.email-scheduler-list { overflow-y:auto; padding:.35rem 1.5rem 1.25rem; }
.email-scheduler-loading { padding:3rem 1rem; color:#57606a; font-size:.85rem; text-align:center; }
.email-scheduler-row { padding:1.15rem 0; border-bottom:1px solid #d8dee4; }
.email-scheduler-row:last-child { border-bottom:0; }
.email-scheduler-row__header { display:flex; align-items:center; gap:.65rem; margin-bottom:.75rem; }
.email-scheduler-row__icon { width:30px; height:30px; display:inline-flex; align-items:center; justify-content:center; border-radius:7px; color:var(--primary-blue); background:#ddf4ff; }
.email-scheduler-row__identity { min-width:0; display:grid; gap:.16rem; }
.email-scheduler-row__name { margin:0; color:#24292f; font-size:.92rem; font-weight:600; }
.email-scheduler-row__summary { color:#57606a; font-size:.72rem; }
.email-scheduler-recipients { min-height:34px; display:flex; align-items:center; flex-wrap:wrap; gap:.4rem; margin-bottom:.7rem; }
.email-scheduler-empty { color:#57606a; font-size:.78rem; }
.email-recipient-chip { display:inline-flex; align-items:center; gap:.4rem; max-width:100%; padding:.32rem .45rem .32rem .6rem; border:1px solid #d0d7de; border-radius:999px; color:#24292f; background:#f6f8fa; font-size:.76rem; }
.email-recipient-chip span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.email-recipient-chip button { width:20px; height:20px; display:inline-flex; align-items:center; justify-content:center; border:0; border-radius:50%; color:#57606a; background:transparent; cursor:pointer; }
.email-recipient-chip button:hover { color:#cf222e; background:#ffebe9; }
.email-scheduler-row__controls { display:grid; grid-template-columns:minmax(180px,1fr) auto auto auto; align-items:center; gap:.5rem; }
.email-scheduler-input { min-width:0; height:38px; padding:.55rem .7rem; border:1px solid #d0d7de; border-radius:7px; color:#24292f; background:#fff; font:inherit; font-size:.8rem; }
.email-scheduler-input:focus { border-color:#0969da; outline:0; box-shadow:0 0 0 3px rgba(9,105,218,.12); }
.email-scheduler-button { min-height:38px; padding:.5rem .75rem; border:1px solid #d0d7de; border-radius:7px; color:#24292f; background:#fff; font-size:.76rem; font-weight:600; cursor:pointer; white-space:nowrap; }
.email-scheduler-button:hover { border-color:#8c959f; background:#f6f8fa; }
.email-scheduler-button:disabled { opacity:.6; cursor:wait; }
.email-scheduler-row__status { min-height:1.1rem; margin-top:.45rem; color:#57606a; font-size:.72rem; }
.email-scheduler-row__status--error { color:#cf222e; }
.email-scheduler-row__status--success { color:#1a7f37; }

/* ── Add-ins Grid ── */
.addins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: 1fr;
    gap: 1.5rem;
}

/* ── Filter Bubbles ── */
/* ── Add-in Card ── */
.addin-card {
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    border: 2px solid transparent;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.addin-card--enabled {
    border-color: rgba(12, 40, 83, 0.12);
}

.addin-card--enabled::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-orange), var(--primary-blue));
}

.addin-card--enabled:hover {
    border-color: var(--primary-orange);
    box-shadow: 0 8px 30px rgba(255,107,53,0.18);
    transform: translateY(-3px);
}

.addin-card--disabled {
    background: var(--disabled-bg);
    border-color: #e2e6ea;
    opacity: 0.7;
}

.addin-card__icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
}

.addin-card--enabled .addin-card__icon-wrap {
    background: linear-gradient(135deg, rgba(255,107,53,0.12), rgba(12, 40, 83, 0.1));
}

.addin-card--disabled .addin-card__icon-wrap {
    background: rgba(0,0,0,0.05);
}

.addin-card__icon { font-size: 1.4rem; }
.addin-card--enabled .addin-card__icon { color: var(--primary-blue); }
.addin-card--disabled .addin-card__icon { color: var(--disabled-text); }

.addin-card__category {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.addin-card--enabled .addin-card__category { color: var(--primary-orange); }
.addin-card--disabled .addin-card__category { color: var(--disabled-text); }

.addin-card__name {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.25;
    letter-spacing: 0.01em;
}

.addin-card--enabled .addin-card__name { color: var(--dark-blue); }
.addin-card--disabled .addin-card__name { color: var(--disabled-text); }

.addin-card__desc {
    font-size: 0.85rem;
    line-height: 1.55;
    margin: 0;
    flex-grow: 1;
}

.addin-card--enabled .addin-card__desc { color: #5a6a7a; }
.addin-card--disabled .addin-card__desc { color: var(--disabled-text); }

.addin-card__footer { margin-top: 0.5rem; }

.btn-launch {
    background: linear-gradient(135deg, var(--primary-orange), #e55a2b);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.25rem;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.btn-launch:hover {
    background: linear-gradient(135deg, #e55a2b, #cc4e24);
    box-shadow: 0 4px 15px rgba(255,107,53,0.4);
    transform: translateY(-1px);
}

.addin-card__locked {
    background: rgba(0,0,0,0.06);
    color: var(--disabled-text);
    border-radius: 10px;
    padding: 0.65rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.02em;
}

/* ── Access Denied Banner ── */
/* Driver safety dashboard widget */
.addin-card--widget { gap: 0; padding: 1.25rem; border: 1px solid #d0d7de; border-radius: 12px; box-shadow: 0 1px 3px rgba(31,35,40,.08); }
.addin-card--widget::before { display: none; }
.addin-card--widget:hover { border-color: #afb8c1; box-shadow: 0 3px 10px rgba(31,35,40,.1); transform: none; }
.safety-widget__header { display: flex; align-items: center; gap: .75rem; }
.safety-widget .addin-card__icon-wrap { width: 38px; height: 38px; margin: 0; border: 1px solid #d8dee4; border-radius: 8px; background: #f6f8fa; }
.safety-widget .addin-card__icon { font-size: 1rem; }
.safety-widget__identity { min-width: 0; }
.safety-widget .addin-card__name { font-family: var(--font-main); font-size: .95rem; }
.safety-widget__range { margin-left: auto; padding: .2rem .48rem; border: 1px solid #d0d7de; border-radius: 999px; color: #57606a; background: #f6f8fa; font-size: .68rem; font-weight: 600; white-space: nowrap; }
.safety-widget__label { margin: 1.1rem 0 .55rem; color: #57606a; font-size: .72rem; font-weight: 600; }
.safety-widget__drivers { border-top: 1px solid #d8dee4; }
.safety-widget__driver { width: 100%; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: .6rem; padding: .72rem .15rem; border-bottom: 1px solid #d8dee4; color: #24292f; text-align: left; }
.safety-widget__driver-name { overflow: hidden; font-size: .8rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.safety-widget__score { min-width: 31px; padding: .16rem .38rem; border-radius: 6px; color: #cf222e; background: #ffebe9; font-size: .72rem; font-weight: 700; text-align: center; }
.safety-widget--warning .safety-widget__score { color: #9a6700; background: #fff8c5; }
.safety-widget__state { min-height: 116px; display: flex; align-items: center; justify-content: center; gap: .55rem; color: #57606a; font-size: .9rem; text-align: center; }
.safety-widget__state--clear i { color: #1a7f37; }
.safety-widget__loading { min-height: 116px; display: flex; flex-direction: column; justify-content: center; gap: .55rem; }
.safety-widget__loading span { height: 28px; border-radius: 6px; background: linear-gradient(90deg,#f6f8fa 25%,#eaeef2 50%,#f6f8fa 75%); background-size: 200% 100%; animation: safety-widget-loading 1.2s infinite linear; }
@keyframes safety-widget-loading { to { background-position: -200% 0; } }
.safety-widget__open { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; margin-top: auto; padding: .58rem .8rem; border: 1px solid var(--primary-blue); border-radius: 7px; color: #fff; background: var(--primary-blue); font-size: .78rem; font-weight: 600; cursor: pointer; }
.safety-widget__open:hover { background: var(--light-blue); border-color: var(--light-blue); }
.safety-widget__open i { font-size: .65rem; }
.device-manager-widget__battery { min-width: 42px; white-space: nowrap; }
.device-manager-widget__refreshing { width: 15px; height: 15px; margin-left: auto; border: 2px solid #d0d7de; border-top-color: var(--primary-blue); border-radius: 50%; animation: spin .75s linear infinite; }
.widget-more { padding: .45rem .15rem 0; color: #57606a; font-size: .72rem; font-weight: 600; }
.recipient-widget__row { grid-template-columns: minmax(0,1fr); }
.battery-widget__voltage { min-width: 54px; }
.fuel-widget__share { min-width: 62px; white-space: nowrap; }
.fleet-widget__events { min-width: 60px; color: #9a6700; background: #fff8c5; white-space: nowrap; }

.access-denied-banner {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-left: 4px solid #ffc107;
    color: #856404;
    border-radius: 8px;
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    font-weight: 500;
    font-size: 0.9rem;
}

/* ── Responsive ── */
.preference-notice {
    background: #e8f1fb;
    border: 1px solid #9fc2e6;
    border-left: 4px solid var(--light-blue);
    color: var(--primary-blue);
    border-radius: 8px;
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.preferences-modal {
    position: fixed;
    inset: var(--preferences-modal-top, 56px) 0 0;
    z-index: 10000;
    padding: 1.5rem;
    overflow: auto;
    background: rgba(31, 35, 40, 0.56);
    backdrop-filter: blur(3px);
    align-items: center;
    justify-content: center;
}

.preferences-modal__panel {
    width: min(620px, 100%);
    max-height: calc(100vh - var(--preferences-modal-top, 56px) - 3rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #d0d7de;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(31, 35, 40, 0.28);
}

.preferences-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.5rem 1.1rem;
    border-bottom: 1px solid #d8dee4;
}

.preferences-modal__eyebrow {
    margin-bottom: 0.22rem;
    color: #57606a;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.preferences-modal__header h2 {
    margin: 0;
    color: #24292f;
    font-family: var(--font-main);
    font-size: 1.35rem;
    font-weight: 600;
}

.preferences-modal__header p {
    margin: 0.3rem 0 0;
    color: #57606a;
    font-size: 0.82rem;
}

.preferences-modal__close {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d0d7de;
    border-radius: 7px;
    background: #fff;
    color: #24292f;
    cursor: pointer;
}
.preferences-modal__close:hover { background: #f6f8fa; }

.preference-list {
    overflow-y: auto;
    padding: 0.35rem 1.5rem;
}

.preference-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 0;
    border-bottom: 1px solid #d8dee4;
    cursor: pointer;
}

.preference-option:last-child { border-bottom: 0; }
.preference-option__identity { display: flex; align-items: center; gap: 0.8rem; min-width: 0; }

.preference-option__icon {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    color: var(--primary-blue);
    background: #ddf4ff;
}

.preference-option__name,
.preference-option__category { display: block; }
.preference-option__name { color: #24292f; font-size: 0.9rem; font-weight: 600; line-height: 1.2; }
.preference-option__category {
    margin-top: 0.16rem;
    color: #57606a;
    font-size: 0.7rem;
}

.preference-toggle { position: relative; width: 40px; height: 22px; flex: 0 0 auto; }
.preference-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.preference-toggle__track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #cbd3dc;
    transition: background 0.18s ease;
}

.preference-toggle__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    transition: transform 0.18s ease;
}

.preference-toggle input:checked + .preference-toggle__track { background: var(--primary-blue); }
.preference-toggle input:checked + .preference-toggle__track::after { transform: translateX(18px); }
.preference-toggle input:focus-visible + .preference-toggle__track {
    outline: 3px solid rgba(26, 74, 122, 0.25);
    outline-offset: 2px;
}

.preferences-error {
    margin: 0 1.5rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #ff8182;
    border-radius: 7px;
    color: #cf222e;
    background: #ffebe9;
    font-size: 0.82rem;
    font-weight: 600;
}
.preferences-error:empty { display: none; }

.preferences-modal__footer { display: flex; justify-content: flex-end; padding: 1rem 1.5rem; border-top: 1px solid #d8dee4; }
.preferences-save {
    min-width: 120px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--primary-blue);
    border-radius: 7px;
    color: #fff;
    background: var(--primary-blue);
    font-family: var(--font-main);
    font-weight: 600;
    cursor: pointer;
}
.preferences-save:hover { border-color: var(--light-blue); background: var(--light-blue); }

.preferences-save:disabled { opacity: 0.65; cursor: wait; }

@media (max-width: 768px) {
    .suite-header__topbar { padding: 0 0.75rem; }
    .suite-tab span { display: none; }
    .suite-tab { padding: 0 0.6rem; }
    .addins-grid { grid-template-columns: 1fr; }
    .dashboard-overview { grid-template-columns: 1fr; }
    .dashboard-overview__section + .dashboard-overview__section { border-top: 1px solid #d8dee4; border-left: 0; }
    .preferences-modal { padding: 0.75rem; }
    .preferences-modal__panel { max-height: calc(100vh - var(--preferences-modal-top, 56px) - 1.5rem); }
    .preferences-modal__header,
    .preference-list { padding-left: 1.1rem; padding-right: 1.1rem; }
    .preferences-modal__footer { padding-left: 1.1rem; padding-right: 1.1rem; }
    .email-scheduler-modal { padding:.75rem; }
    .email-scheduler-modal__panel { max-height:calc(100vh - var(--email-modal-top, 56px) - 1.5rem); }
    .email-scheduler-modal__header,
    .email-scheduler-list { padding-left:1rem; padding-right:1rem; }
    .email-scheduler-row__controls { grid-template-columns:1fr auto; }
    .email-scheduler-button--parameters { grid-column:1 / -1; }
}

/* ── Registry-controlled Traxxis AI dashboard guide ── */
.traxxis-ai-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1150;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.7rem 1rem;
    border: 1px solid #0c2853;
    border-radius: 999px;
    color: #fff;
    background: #0c2853;
    box-shadow: 0 10px 30px rgba(12, 40, 83, 0.3);
    font-family: var(--font-main);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.traxxis-ai-launcher:hover { color:#fff; background:#163d70; transform:translateY(-1px); box-shadow:0 12px 34px rgba(12,40,83,.36); }
.traxxis-ai-launcher:focus-visible { outline:3px solid rgba(255,107,53,.35); outline-offset:3px; }
.traxxis-ai-launcher i { color:#ff6b35; }

.traxxis-ai-panel {
    position: fixed;
    right: 24px;
    bottom: 82px;
    z-index: 1160;
    width: min(400px, calc(100vw - 32px));
    height: min(590px, calc(100vh - 120px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #d0d7de;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 52px rgba(31,35,40,.24);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(.98);
    transform-origin: bottom right;
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.traxxis-ai-panel.is-open { opacity:1; visibility:visible; transform:none; }
.traxxis-ai-panel__header {
    min-height: 66px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1rem;
    padding:.8rem 1rem;
    color:#fff;
    background:#0c2853;
}
.traxxis-ai-panel__identity { display:flex; align-items:center; gap:.7rem; min-width:0; }
.traxxis-ai-panel__identity strong { font-size:.98rem; line-height:1.2; }
.traxxis-ai-panel__mark {
    width:34px;
    height:34px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 34px;
    border-radius:9px;
    color:#ff6b35 !important;
    background:rgba(255,255,255,.12);
}
.traxxis-ai-panel__close {
    width:34px;
    height:34px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 34px;
    border:1px solid rgba(255,255,255,.24);
    border-radius:8px;
    color:#fff;
    background:transparent;
    cursor:pointer;
}
.traxxis-ai-panel__close:hover { background:rgba(255,255,255,.12); }
.traxxis-ai-messages { flex:1; min-height:0; overflow:auto; padding:1rem; background:#f6f8fa; }
.traxxis-ai-welcome { display:grid; gap:.75rem; }
.traxxis-ai-welcome h3 { margin:0; color:#24292f; font-size:1rem; font-weight:700; }
.traxxis-ai-welcome p { margin:0; color:#57606a; font-size:.83rem; line-height:1.5; }
.traxxis-ai-suggestions { display:grid; gap:.45rem; margin-top:.15rem; }
.traxxis-ai-suggestion {
    width:100%;
    padding:.65rem .75rem;
    border:1px solid #d0d7de;
    border-radius:8px;
    color:#0c2853;
    background:#fff;
    font:600 .78rem/1.35 var(--font-main);
    text-align:left;
    cursor:pointer;
}
.traxxis-ai-suggestion:hover { border-color:#8c959f; background:#f3f6f9; }
.traxxis-ai-message { display:flex; margin:0 0 .75rem; }
.traxxis-ai-message--user { justify-content:flex-end; }
.traxxis-ai-message__bubble { max-width:88%; padding:.68rem .78rem; border-radius:10px; font-size:.82rem; line-height:1.45; overflow-wrap:anywhere; }
.traxxis-ai-message--assistant .traxxis-ai-message__bubble { border:1px solid #d8dee4; color:#24292f; background:#fff; border-bottom-left-radius:3px; }
.traxxis-ai-message--user .traxxis-ai-message__bubble { color:#fff; background:#0c2853; border-bottom-right-radius:3px; }
.traxxis-ai-message__bubble p { margin:0; }
.traxxis-ai-message__action {
    display:inline-flex;
    align-items:center;
    gap:.42rem;
    margin-top:.65rem;
    padding:.48rem .68rem;
    border:1px solid #0c2853;
    border-radius:7px;
    color:#fff;
    background:#0c2853;
    font:600 .76rem/1.2 var(--font-main);
    cursor:pointer;
}
.traxxis-ai-message__action:hover { background:#163d70; }
.traxxis-ai-typing { display:inline-flex; gap:4px; align-items:center; min-height:18px; }
.traxxis-ai-typing span { width:6px; height:6px; border-radius:50%; background:#8c959f; animation:traxxis-ai-pulse 1s infinite ease-in-out; }
.traxxis-ai-typing span:nth-child(2) { animation-delay:.15s; }
.traxxis-ai-typing span:nth-child(3) { animation-delay:.3s; }
@keyframes traxxis-ai-pulse { 0%,60%,100%{opacity:.35;transform:translateY(0)} 30%{opacity:1;transform:translateY(-2px)} }
.traxxis-ai-composer { display:flex; align-items:flex-end; gap:.5rem; padding:.75rem; border-top:1px solid #d8dee4; background:#fff; }
.traxxis-ai-composer textarea { min-height:42px; max-height:100px; flex:1; resize:none; padding:.65rem .72rem; border:1px solid #d0d7de; border-radius:8px; color:#24292f; background:#fff; font:.82rem/1.35 var(--font-main); }
.traxxis-ai-composer textarea:focus { outline:2px solid rgba(12,40,83,.18); border-color:#0c2853; }
.traxxis-ai-composer button { width:40px; height:40px; display:inline-flex; align-items:center; justify-content:center; flex:0 0 40px; border:1px solid #0c2853; border-radius:8px; color:#fff; background:#0c2853; cursor:pointer; }
.traxxis-ai-composer button:disabled { opacity:.55; cursor:wait; }

@media (max-width: 520px) {
    .traxxis-ai-launcher { right:12px; bottom:12px; }
    .traxxis-ai-launcher span { display:none; }
    .traxxis-ai-launcher { width:48px; padding:0; }
    .traxxis-ai-panel { right:8px; bottom:70px; width:calc(100vw - 16px); height:min(600px, calc(100vh - 86px)); }
}
