:root {
    --page-bg: #f3f6f9;
    --panel: #ffffff;
    --surface-soft: #f8fafc;
    --surface-subtle: #eef3f8;
    --ink: #172033;
    --muted: #667085;
    --line: #d9e1ea;
    --line-soft: #e7edf4;
    --nav: #202832;
    --green: #17856f;
    --blue: #2563eb;
    --amber: #d97706;
    --red: #dc2626;
    --radius: 8px;
    --shadow: 0 14px 34px rgba(22, 31, 49, 0.08);
    --shadow-sm: 0 8px 20px rgba(22, 31, 49, 0.06);
    --shadow-lift: 0 18px 38px rgba(22, 31, 49, 0.12);
    --focus-ring: 0 0 0 3px rgba(23, 133, 111, 0.18);
}

body {
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(180deg, #f8fafc 0%, var(--page-bg) 42%, #eef3f8 100%);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
}

.app-shell,
.content,
.topbar,
.mobile-section-rail,
.mobile-nav {
    max-width: 100vw;
}

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

.btn {
    border-radius: var(--radius);
    font-weight: 800;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-1px);
}

.btn:focus-visible,
.form-control:focus,
.form-select:focus {
    border-color: rgba(23, 133, 111, 0.45);
    box-shadow: var(--focus-ring);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-icon i {
    flex: 0 0 auto;
}

.btn-brand {
    color: #ffffff;
    background: var(--green);
    border-color: var(--green);
    box-shadow: 0 10px 22px rgba(23, 133, 111, 0.18);
}

.btn-brand:hover {
    color: #ffffff;
    background: #116d5b;
    border-color: #116d5b;
}

.btn-soft {
    color: var(--ink);
    background: #ffffff;
    border-color: var(--line-soft);
}

.btn-soft:hover,
.btn-soft:focus-visible {
    color: var(--ink);
    background: var(--surface-soft);
    border-color: #cfd9e6;
}

.site-navbar {
    position: sticky;
    z-index: 30;
    top: 0;
    min-height: 74px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
}

.brand-mark,
.service-icon,
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: var(--green);
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    font-size: 1.3rem;
    box-shadow: 0 10px 22px rgba(23, 133, 111, 0.2);
}

.navbar-brand small {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.site-hero {
    padding: 72px 0 44px;
    background: linear-gradient(135deg, rgba(23, 133, 111, 0.12), rgba(37, 99, 235, 0.08)), #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--green);
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
}

.site-title,
.hero-title {
    margin: 0;
    font-weight: 900;
    line-height: 1.08;
}

.site-title {
    max-width: 860px;
    font-size: clamp(2rem, 4vw, 4rem);
}

.hero-title {
    font-size: clamp(1.45rem, 2.6vw, 2.4rem);
}

.site-copy,
.hero-copy,
.text-muted-soft {
    color: var(--muted);
}

.site-copy,
.hero-copy {
    margin-top: 10px;
    font-size: 1rem;
}

.site-section {
    padding: 54px 0;
}

.service-card,
.login-card,
.hero-panel,
.metric-card,
.module-card,
.feed-composer,
.feed-post,
.section-tile,
.soft-box {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.service-card,
.login-card,
.hero-panel,
.module-body,
.feed-composer,
.feed-post,
.soft-box {
    padding: 16px;
}

.service-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    font-size: 1.35rem;
    box-shadow: 0 10px 22px rgba(23, 133, 111, 0.14);
}

.login-wrap {
    min-height: calc(100vh - 74px);
    display: flex;
    align-items: center;
    padding: 48px 0;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 284px;
    min-width: 284px;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
    color: #f8fafc;
    background: linear-gradient(180deg, #18212b 0%, #202a35 58%, #151d26 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 14px 0 34px rgba(15, 23, 42, 0.14);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
}

.sidebar-backdrop,
.sidebar-close-button,
.sidebar-toggle-button {
    display: none;
}

.side-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    transition: background-color 0.16s ease, border-color 0.16s ease;
}

.side-brand:hover,
.side-brand:focus-visible {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.1);
}

.side-brand p,
.side-profile p {
    margin: 0;
    color: rgba(248, 250, 252, 0.66);
    font-size: 0.78rem;
}

.side-profile {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.075);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.side-label {
    margin: 0 0 8px;
    color: rgba(248, 250, 252, 0.55);
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.side-nav {
    display: grid;
    gap: 6px;
}

.side-link,
.mobile-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: var(--radius);
    font-weight: 800;
}

.side-link {
    position: relative;
    min-height: 44px;
    padding: 10px 12px;
    color: rgba(248, 250, 252, 0.78);
    overflow: hidden;
    transition: color 0.16s ease, background-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.side-link::before {
    content: "";
    position: absolute;
    top: 9px;
    bottom: 9px;
    left: 0;
    width: 3px;
    border-radius: 999px;
    background: var(--role-accent, var(--green));
    opacity: 0;
    transform: scaleY(0.5);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.side-link i {
    width: 24px;
    height: 24px;
    display: inline-grid;
    flex: 0 0 24px;
    place-items: center;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.92rem;
    transition: color 0.16s ease, background-color 0.16s ease;
}

.side-link.active,
.side-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.11);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transform: translateX(2px);
}

.side-link.active::before,
.side-link:hover::before {
    opacity: 1;
    transform: scaleY(1);
}

.side-link.active i,
.side-link:hover i {
    color: #ffffff;
    background: var(--role-accent, var(--green));
}

.content {
    width: 100%;
    min-width: 0;
    padding: 22px;
    padding-bottom: 96px;
}

.topbar {
    position: sticky;
    z-index: 10;
    top: 0;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -22px -22px 18px;
    padding: 12px 22px;
    border-bottom: 1px solid rgba(217, 225, 234, 0.78);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 26px rgba(22, 31, 49, 0.055);
    backdrop-filter: blur(14px);
}

.topbar-heading {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-heading > div {
    min-width: 0;
}

.topbar-subtitle {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.status-toggle-form {
    align-items: center;
}

.status-toggle-control {
    cursor: pointer;
    user-select: none;
}

.status-toggle-track {
    position: relative;
    width: 196px;
    min-height: 38px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 3px;
    border: 1px solid #d8e1ec;
    border-radius: 999px;
    background: var(--surface-subtle);
    box-shadow: inset 0 1px 2px rgba(22, 31, 49, 0.06), 0 8px 18px rgba(22, 31, 49, 0.04);
}

.status-toggle-thumb {
    position: absolute;
    z-index: 0;
    top: 3px;
    left: 3px;
    width: calc(50% - 3px);
    height: calc(100% - 6px);
    border-radius: 999px;
    background: #475569;
    box-shadow: 0 8px 18px rgba(22, 31, 49, 0.16);
    transition: transform 0.18s ease, background 0.18s ease;
}

.status-toggle-option {
    position: relative;
    z-index: 1;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    transition: color 0.18s ease;
}

.status-toggle-option i {
    font-size: 0.86rem;
}

.status-toggle-control input:not(:checked) + .status-toggle-track .status-offline,
.status-toggle-control input:checked + .status-toggle-track .status-online {
    color: #ffffff;
}

.status-toggle-control input:checked + .status-toggle-track .status-toggle-thumb {
    transform: translateX(100%);
    background: var(--green);
}

.status-toggle-control input:focus-visible + .status-toggle-track {
    outline: 3px solid rgba(23, 133, 111, 0.18);
    outline-offset: 2px;
}

.status-toggle-form[aria-busy="true"] .status-toggle-track {
    opacity: 0.78;
    pointer-events: none;
}

.hero-panel {
    position: relative;
    overflow: hidden;
    border-left: 6px solid var(--role-accent, var(--green));
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 58%, #f3f8fb 100%);
    box-shadow: var(--shadow-sm);
}

.hero-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--role-accent, var(--green)), transparent 72%);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.metric-card {
    position: relative;
    min-height: 112px;
    padding: 15px;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--role-accent, var(--green)), rgba(37, 99, 235, 0.18));
}

.metric-card:hover {
    border-color: #cfd9e6;
    box-shadow: var(--shadow-lift);
    transform: translateY(-2px);
}

.metric-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 900;
}

.metric-label i {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    color: var(--role-accent, var(--green));
    background: #eef8f4;
}

.metric-value {
    margin-top: 12px;
    font-size: 1.45rem;
    font-weight: 900;
}

.module-card {
    margin-top: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.module-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line-soft);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.module-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.04rem;
    font-weight: 900;
}

.module-title i {
    width: 30px;
    height: 30px;
    display: inline-grid;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 9px;
    color: var(--role-accent, var(--green));
    background: #eef8f4;
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
    background: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
}

.badge-green { color: #116d5b; background: #e8f7f2; border-color: #b9e7da; }
.badge-blue { color: #1d4ed8; background: #e9f0ff; border-color: #c7d7fe; }
.badge-amber { color: #a55b00; background: #fff3dc; border-color: #f8d49b; }
.badge-red { color: #b91c1c; background: #ffebeb; border-color: #fecaca; }

.profile-menu-toggle {
    cursor: pointer;
    font-weight: 900;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.profile-menu-toggle:hover,
.profile-menu-toggle:focus-visible {
    box-shadow: 0 10px 22px rgba(22, 31, 49, 0.08);
    transform: translateY(-1px);
}

.profile-dropdown {
    min-width: 230px;
    padding: 8px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.profile-dropdown-head {
    display: grid;
    gap: 2px;
    padding: 8px 10px 10px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 6px;
}

.profile-dropdown-head small {
    color: var(--muted);
    font-weight: 700;
}

.profile-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: var(--radius);
    font-weight: 800;
    transition: color 0.16s ease, background-color 0.16s ease;
}

.profile-dropdown .dropdown-item:hover,
.profile-dropdown .dropdown-item:focus {
    color: var(--ink);
    background: var(--surface-soft);
}

.dropdown-status-pill {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 900;
    white-space: nowrap;
}

.topbar-account-cluster {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-toggle {
    position: relative;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #b9e7da;
    border-radius: 999px;
    color: #116d5b;
    background: #e8f7f2;
    font-weight: 900;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.notification-toggle:hover,
.notification-toggle:focus-visible {
    border-color: #8fd8c3;
    box-shadow: 0 12px 24px rgba(23, 133, 111, 0.16);
    transform: translateY(-1px);
}

.notification-toggle span {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #ffffff;
    border-radius: 999px;
    color: #ffffff;
    background: #dc2626;
    font-size: 0.68rem;
    line-height: 1;
}

.notification-dropdown {
    width: min(390px, calc(100vw - 24px));
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.notification-dropdown-head,
.notification-dropdown-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    background: var(--surface-soft);
}

.notification-dropdown-head {
    border-bottom: 1px solid var(--line);
}

.notification-dropdown-head strong,
.notification-page-head h3 {
    display: block;
    color: var(--ink);
    font-weight: 900;
}

.notification-dropdown-head small {
    display: block;
    color: var(--muted);
    font-weight: 800;
}

.notification-list {
    max-height: 360px;
    overflow-y: auto;
    background: #ffffff;
}

.notification-item,
.notification-row {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid var(--line-soft);
}

.notification-row {
    grid-template-columns: 12px minmax(0, 1fr) auto;
    align-items: start;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(22, 31, 49, 0.045);
}

.notification-item.unread,
.notification-row.unread {
    background: #f3faf8;
}

.notification-dot {
    width: 10px;
    height: 10px;
    margin-top: 7px;
    border-radius: 999px;
    background: #2563eb;
}

.notification-dot.badge-green { background: #17856f; }
.notification-dot.badge-blue { background: #2563eb; }
.notification-dot.badge-amber { background: #d97706; }
.notification-dot.badge-red { background: #dc2626; }

.notification-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.notification-title-row strong {
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 900;
}

.notification-title-row span,
.notification-row-meta {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.notification-item p,
.notification-row p,
.notification-page-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.4;
}

.notification-actions,
.notification-row-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.notification-actions form {
    display: inline-flex;
}

.notification-actions button,
.notification-actions span {
    border: 0;
    padding: 0;
    color: #1d4ed8;
    background: transparent;
    font-size: 0.76rem;
    font-weight: 900;
}

.notification-dropdown-foot {
    border-top: 1px solid var(--line);
}

.notification-permission-note {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 900;
}

.notification-empty {
    min-height: 120px;
    display: grid;
    place-items: center;
    gap: 6px;
    color: var(--muted);
    font-weight: 900;
}

.notification-page-head,
.notification-page-actions,
.notification-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.notification-system-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid #c7d7fe;
    border-left: 5px solid var(--blue);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #ffffff 0%, #f3f7ff 100%);
    box-shadow: var(--shadow-sm);
}

.notification-system-card strong {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-weight: 900;
}

.notification-system-card p,
.notification-system-card small {
    display: block;
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.notification-system-card small {
    color: #1d4ed8;
    font-size: 0.76rem;
}

.notification-page-head {
    justify-content: space-between;
    margin-bottom: 14px;
}

.notification-page-head h3 {
    margin: 0;
}

.notification-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.notification-summary-card {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
}

.notification-summary-card span,
.notification-summary-card small {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
}

.notification-summary-card strong {
    display: block;
    margin: 6px 0;
    color: var(--ink);
    font-size: 1.55rem;
    font-weight: 900;
}

.notification-page-list {
    max-height: 620px;
    display: grid;
    gap: 10px;
    overflow-y: auto;
    padding-right: 4px;
}

.notification-row-actions {
    justify-content: flex-end;
}

.notification-empty-page {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
}

.section-tile {
    position: relative;
    min-height: 104px;
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 12px;
    padding: 14px;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.section-tile::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--role-accent, var(--green));
    opacity: 0;
    transition: opacity 0.16s ease;
}

.section-tile:hover,
.section-tile:focus-visible {
    border-color: #cfd9e6;
    box-shadow: var(--shadow-lift);
    transform: translateY(-2px);
}

.section-tile:hover::before,
.section-tile:focus-visible::before {
    opacity: 1;
}

.section-tile > .bi {
    color: var(--muted);
    transition: color 0.16s ease, transform 0.16s ease;
}

.section-tile:hover > .bi,
.section-tile:focus-visible > .bi {
    color: var(--role-accent, var(--green));
    transform: translateX(2px);
}

.section-tile small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    line-height: 1.35;
}

.avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 999px;
    font-weight: 900;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(22, 31, 49, 0.08);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-xs {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
    font-size: 0.72rem;
}

.avatar-sm {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 0.78rem;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
    font-size: 1.1rem;
}

.profile-image-field {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.profile-gate-banner,
.profile-completion-summary,
.document-upload-row,
.document-upload-info,
.document-upload-fields,
.document-upload-actions,
.bid-lock {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-gate-banner {
    justify-content: space-between;
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #f8d49b;
    border-left: 5px solid var(--amber);
    border-radius: var(--radius);
    background: #fff9ec;
}

.profile-gate-banner strong,
.profile-completion-summary strong,
.document-upload-info strong {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
}

.profile-gate-banner p,
.profile-completion-summary p,
.document-upload-info small {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.profile-completion-summary {
    justify-content: space-between;
    margin-bottom: 10px;
}

.completion-meter {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf2f7;
}

.completion-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--green), var(--blue));
}

.document-upload-list {
    display: grid;
    gap: 0;
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: #ffffff;
}

.document-upload-row {
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid var(--line);
}

.document-upload-row:last-of-type {
    border-bottom: 0;
}

.document-upload-info {
    min-width: 260px;
    align-items: flex-start;
}

.document-upload-info a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    color: #1d4ed8;
    font-size: 0.8rem;
    font-weight: 900;
}

.document-upload-fields {
    flex: 1 1 560px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.document-upload-fields .form-control {
    min-width: 150px;
    max-width: 210px;
}

.document-upload-fields input[type="file"] {
    max-width: 240px;
}

.document-upload-actions {
    justify-content: flex-end;
    padding: 12px;
    border-top: 1px solid var(--line);
    background: #f8fafc;
}

.bid-lock {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.vehicle-listing-form {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.vehicle-listing-detail {
    grid-column: span 2;
}

.vehicle-condition-lock {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius);
    color: #047857;
    background: #ecfdf5;
    font-size: 0.88rem;
    font-weight: 900;
}

.vehicle-listing-form .btn {
    min-height: 42px;
}

.vehicle-market-note {
    margin: 0 0 14px;
}

.vehicle-market-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.vehicle-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(22, 31, 49, 0.06);
}

.vehicle-card-media {
    position: relative;
    min-height: 170px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #195b52, #2563eb);
    font-size: 3rem;
}

.vehicle-card-media img {
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.vehicle-card-media .badge-soft {
    position: absolute;
    top: 10px;
    right: 10px;
}

.vehicle-card-body {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.vehicle-card-head,
.vehicle-offer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.vehicle-offer-head small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-weight: 800;
}

.vehicle-card-head h3 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 900;
}

.vehicle-card-head p,
.vehicle-detail {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.vehicle-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.vehicle-info-grid span {
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    background: #f8fafc;
    font-size: 0.82rem;
    font-weight: 900;
}

.vehicle-offer-form,
.vehicle-chat-form,
.seller-status-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vehicle-qty-input {
    max-width: 96px;
}

.vehicle-offer-panel,
.seller-offer-list,
.seller-offer-card {
    display: grid;
    gap: 10px;
}

.vehicle-offer-panel,
.seller-offer-card {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.seller-offer-list {
    margin-top: 4px;
}

.seller-offer-title {
    font-weight: 900;
}

.vehicle-chat-list {
    max-height: 170px;
    display: grid;
    gap: 8px;
    overflow-y: auto;
    padding-right: 3px;
}

.vehicle-chat-message {
    width: fit-content;
    max-width: 88%;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
}

.vehicle-chat-message.mine {
    justify-self: end;
    color: #ffffff;
    border-color: var(--green);
    background: var(--green);
}

.vehicle-chat-message strong {
    display: block;
    font-size: 0.76rem;
    font-weight: 900;
}

.vehicle-chat-message p {
    margin: 2px 0 0;
    font-size: 0.84rem;
    line-height: 1.35;
}

.seller-status-form {
    align-items: stretch;
    flex-wrap: wrap;
}

.seller-status-form .form-select {
    max-width: 130px;
}

.seller-status-form .form-control {
    flex: 1 1 140px;
}

.chat-product-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.chat-product-summary span {
    min-height: 72px;
    display: grid;
    align-content: center;
    gap: 2px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(22, 31, 49, 0.06);
}

.chat-product-summary strong {
    color: var(--ink);
    font-size: 1.35rem;
    font-weight: 900;
}

.chat-product-summary small {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.service-chat-shell {
    display: grid;
    grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.chat-member-panel,
.service-chat-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(22, 31, 49, 0.06);
}

.chat-member-panel {
    position: sticky;
    top: 86px;
    display: grid;
    gap: 12px;
    padding: 12px;
}

.service-chat-form {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.service-chat-form .btn {
    min-height: 42px;
}

.chat-form-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.chat-form-head strong,
.chat-conversation-toolbar strong {
    color: var(--ink);
    font-weight: 900;
}

.chat-form-head small,
.chat-conversation-toolbar small,
.chat-head-meta small,
.service-chat-message time {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
}

.service-chat-message-input {
    resize: vertical;
}

.chat-compose-tools,
.chat-reply-main,
.chat-emoji-row,
.chat-image-preview {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-compose-tools {
    flex-wrap: wrap;
    justify-content: space-between;
}

.chat-emoji-row {
    flex: 1 1 170px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.chat-emoji-row::-webkit-scrollbar {
    display: none;
}

.chat-emoji-button,
.chat-icon-button {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    line-height: 1;
}

.chat-emoji-button:hover,
.chat-icon-button:hover,
.chat-attach-button:hover {
    border-color: var(--green);
    color: var(--green);
}

.chat-image-preview {
    display: none;
    align-items: flex-start;
    width: 100%;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
}

.chat-image-preview.active {
    display: flex;
}

.chat-image-preview img {
    width: 86px;
    height: 68px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.chat-image-preview span {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-remove-image {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    color: #dc2626;
    background: #fff7f7;
}

.chat-member-list,
.service-chat-layout {
    display: grid;
    gap: 10px;
}

.chat-member-list {
    max-height: 560px;
    overflow-y: auto;
    padding-right: 2px;
}

.chat-member-list-head,
.chat-member-row,
.chat-member-chip,
.service-chat-participants {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-member-list-head {
    justify-content: space-between;
    padding: 0 2px;
}

.chat-search-box {
    position: relative;
}

.chat-search-box i {
    position: absolute;
    top: 50%;
    left: 10px;
    z-index: 1;
    color: var(--muted);
    transform: translateY(-50%);
}

.chat-search-box .form-control {
    min-height: 38px;
    padding-left: 34px;
    font-weight: 800;
}

.chat-search-box-wide {
    min-width: min(320px, 100%);
}

.chat-member-row {
    min-height: 64px;
    width: 100%;
    text-align: left;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.chat-member-row:hover,
.chat-member-row.active {
    border-color: rgba(23, 133, 111, 0.5);
    background: #ecfdf5;
}

.chat-member-row:focus-visible {
    outline: 3px solid rgba(23, 133, 111, 0.18);
    outline-offset: 2px;
}

.chat-member-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: var(--radius);
    font-size: 1rem;
}

.chat-member-main {
    min-width: 0;
    flex: 1 1 auto;
}

.chat-member-main strong,
.chat-member-main small,
.chat-member-meta small,
.chat-last-message {
    display: block;
}

.chat-member-main strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-member-main small,
.chat-member-meta small,
.chat-member-chip small,
.chat-last-message {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.chat-member-meta {
    display: grid;
    gap: 3px;
    justify-items: end;
}

.service-chat-card {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.chat-conversation-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(22, 31, 49, 0.06);
}

.chat-conversation-toolbar small {
    display: block;
    margin-top: 2px;
}

.service-chat-head,
.service-chat-actions,
.service-chat-reply,
.service-chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-chat-head {
    align-items: flex-start;
    justify-content: space-between;
}

.chat-head-meta {
    display: grid;
    gap: 4px;
    justify-items: end;
}

.service-chat-head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 900;
}

.service-chat-head p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.service-chat-participants {
    align-items: stretch;
    flex-wrap: wrap;
}

.chat-member-chip,
.chat-last-message {
    min-height: 34px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.chat-member-chip {
    max-width: 240px;
}

.chat-member-chip strong {
    overflow: hidden;
    font-size: 0.8rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-member-chip small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-last-message {
    flex: 1 1 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.service-chat-messages {
    max-height: 320px;
    display: grid;
    gap: 8px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.service-chat-message {
    width: fit-content;
    max-width: min(620px, 88%);
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
}

.service-chat-message.mine {
    justify-self: end;
    color: #ffffff;
    border-color: var(--green);
    background: var(--green);
}

.service-chat-message strong {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 900;
}

.service-chat-message strong small {
    opacity: 0.74;
    font-size: 0.72rem;
}

.service-chat-message p {
    margin: 3px 0 0;
    font-size: 0.88rem;
    line-height: 1.38;
}

.service-chat-message time {
    display: block;
    margin-top: 5px;
    opacity: 0.8;
    text-align: right;
}

.service-chat-message.mine time,
.service-chat-message.mine strong small {
    color: rgba(255, 255, 255, 0.78);
}

.chat-no-results {
    display: none;
    padding: 10px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    background: #f8fafc;
    font-size: 0.84rem;
    font-weight: 900;
    text-align: center;
}

.chat-no-results.show {
    display: block;
}

.service-chat-image-link {
    display: block;
    margin-top: 8px;
}

.service-chat-message strong + .service-chat-image-link {
    margin-top: 7px;
}

.service-chat-image {
    width: min(280px, 100%);
    max-height: 240px;
    object-fit: cover;
    border: 1px solid rgba(217, 225, 234, 0.86);
    border-radius: var(--radius);
    background: #ffffff;
}

.service-chat-message.mine .service-chat-image {
    border-color: rgba(255, 255, 255, 0.5);
}

.service-chat-actions {
    align-items: stretch;
    justify-content: space-between;
    flex-wrap: wrap;
}

.service-chat-reply {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    flex: 1 1 420px;
}

.chat-reply-main {
    align-items: stretch;
}

.chat-reply-main .form-control {
    min-height: 38px;
    resize: vertical;
}

.service-chat-reply > .chat-compose-tools {
    grid-column: 1 / -1;
}

.service-chat-reply > .btn {
    min-width: 70px;
}

.service-chat-status {
    flex: 0 0 auto;
}

.service-chat-status .form-select {
    min-width: 118px;
}

.parts-listing-form,
.parts-market-tools,
.parts-search-form,
.parts-required-form,
.part-order-form,
.part-chat-form,
.part-pay-form,
.part-status-form,
.part-card-head,
.part-order-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.parts-listing-form {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.parts-description-input {
    grid-column: span 2;
}

.parts-market-tools {
    align-items: stretch;
    margin-bottom: 14px;
}

.parts-search-form,
.parts-required-form {
    flex: 1 1 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.parts-market-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.part-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(22, 31, 49, 0.06);
}

.part-card-media {
    position: relative;
    min-height: 150px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #263241, #17856f);
    font-size: 3rem;
}

.part-card-media img {
    width: 100%;
    height: 170px;
    object-fit: cover;
}

.part-card-media .badge-soft {
    position: absolute;
    top: 10px;
    right: 10px;
}

.part-card-body {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.part-card-head {
    align-items: flex-start;
    justify-content: space-between;
}

.part-card-head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 900;
}

.part-card-head p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.part-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.part-info-grid span {
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
    font-size: 0.82rem;
    font-weight: 900;
}

.part-order-form,
.part-pay-form,
.part-status-form,
.part-chat-form {
    align-items: stretch;
    flex-wrap: wrap;
}

.part-order-form .form-control,
.part-order-form .form-select,
.part-status-form .form-control,
.part-status-form .form-select {
    flex: 1 1 130px;
}

.part-order-panel,
.part-seller-orders {
    display: grid;
    gap: 10px;
}

.part-order-panel {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.part-order-head {
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
}

.part-order-head strong {
    font-weight: 900;
}

.part-order-head small {
    display: block;
    color: var(--muted);
    font-weight: 800;
}

.part-chat-list {
    max-height: 170px;
    display: grid;
    gap: 8px;
    overflow-y: auto;
    padding-right: 3px;
}

.part-chat-message {
    width: fit-content;
    max-width: 88%;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
}

.part-chat-message.mine {
    justify-self: end;
    color: #ffffff;
    border-color: var(--green);
    background: var(--green);
}

.part-chat-message strong {
    display: block;
    font-size: 0.76rem;
    font-weight: 900;
}

.part-chat-message p {
    margin: 2px 0 0;
    font-size: 0.84rem;
    line-height: 1.35;
}

.insurance-workspace {
    display: grid;
    gap: 14px;
}

.insurance-expiry-form,
.insurance-offer-form,
.insurance-response-form,
.insurance-chat-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.insurance-expiry-form,
.insurance-offer-form {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.insurance-expiry-form .form-control,
.insurance-expiry-form .form-select,
.insurance-offer-form .form-control,
.insurance-offer-form .form-select {
    min-width: 170px;
    flex: 1 1 170px;
}

.insurance-message-input {
    flex-basis: 280px !important;
}

.insurance-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 14px;
}

.insurance-panel {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    overflow: hidden;
}

.insurance-expiry-list,
.insurance-offer-list {
    display: grid;
    gap: 10px;
    padding: 12px;
}

.insurance-expiry-card,
.insurance-offer-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
}

.insurance-card-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.insurance-card-head strong {
    display: block;
    color: var(--ink);
    font-weight: 900;
}

.insurance-card-head small {
    display: block;
    color: var(--muted);
    font-weight: 700;
}

.insurance-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.insurance-meta-grid span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    background: #f8fafc;
    font-size: 0.84rem;
    font-weight: 800;
}

.insurance-meta-grid i {
    color: var(--green);
}

.insurance-expiry-actions {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

.insurance-response-form .form-control,
.insurance-response-form .form-select,
.insurance-chat-form .form-control {
    min-width: 140px;
    flex: 1 1 140px;
}

.insurance-chat-list {
    display: grid;
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 3px;
}

.insurance-chat-message {
    width: fit-content;
    max-width: 88%;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.insurance-chat-message.mine {
    justify-self: end;
    color: #ffffff;
    border-color: var(--green);
    background: var(--green);
}

.insurance-chat-message strong {
    display: block;
    font-size: 0.76rem;
    font-weight: 900;
}

.insurance-chat-message p {
    margin: 2px 0 0;
    font-size: 0.84rem;
    line-height: 1.35;
}

.gps-workspace {
    display: grid;
    gap: 14px;
}

.gps-listing-form,
.gps-offer-form,
.gps-market-tools,
.gps-search-form,
.gps-ask-form,
.gps-response-form,
.gps-chat-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.gps-listing-form,
.gps-offer-form,
.gps-market-tools {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.gps-listing-form .form-control,
.gps-listing-form .form-select,
.gps-offer-form .form-control,
.gps-offer-form .form-select,
.gps-search-form .form-control,
.gps-ask-form .form-control {
    min-width: 170px;
    flex: 1 1 170px;
}

.gps-detail-input {
    flex-basis: 280px !important;
}

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

.gps-panel {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    overflow: hidden;
}

.gps-card-list,
.gps-offer-list {
    display: grid;
    gap: 10px;
    padding: 12px;
}

.gps-product-card,
.gps-offer-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
}

.gps-product-media {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 150px;
    border-radius: var(--radius);
    color: #ffffff;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    overflow: hidden;
}

.gps-product-media img {
    width: 100%;
    height: 170px;
    object-fit: cover;
}

.gps-product-media i {
    font-size: 2.2rem;
}

.gps-product-media .badge-soft {
    position: absolute;
    top: 10px;
    right: 10px;
}

.gps-card-body {
    display: grid;
    gap: 9px;
}

.gps-card-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.gps-card-head h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 900;
}

.gps-card-head p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.gps-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.gps-info-grid span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    background: #f8fafc;
    font-size: 0.84rem;
    font-weight: 800;
}

.gps-info-grid i {
    color: var(--green);
}

.gps-response-form .form-control,
.gps-response-form .form-select,
.gps-chat-form .form-control {
    min-width: 140px;
    flex: 1 1 140px;
}

.gps-chat-list {
    display: grid;
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 3px;
}

.gps-chat-message {
    width: fit-content;
    max-width: 88%;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.gps-chat-message.mine {
    justify-self: end;
    color: #ffffff;
    border-color: var(--green);
    background: var(--green);
}

.gps-chat-message strong {
    display: block;
    font-size: 0.76rem;
    font-weight: 900;
}

.gps-chat-message p {
    margin: 2px 0 0;
    font-size: 0.84rem;
    line-height: 1.35;
}

.facebook-feed,
.feed-list {
    display: grid;
    gap: 14px;
}

.feed-composer-top,
.post-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.feed-composer textarea {
    min-height: 64px;
    border-radius: 22px;
    background: #f3f6f9;
}

.composer-actions,
.post-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.composer-action,
.post-actions button {
    min-height: 38px;
    border: 0;
    border-radius: var(--radius);
    color: var(--muted);
    background: #f8fafc;
    font-weight: 900;
}

.composer-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
}

.post-text {
    margin: 10px 0;
    color: #273247;
}

.post-meta,
.post-stats {
    color: var(--muted);
    font-size: 0.82rem;
}

.post-media {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: #ffffff;
    background: linear-gradient(135deg, #2f4858, #17856f 46%, #2563eb);
    text-align: center;
    font-weight: 900;
}

.feed-image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.feed-image-preview {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.feed-image-preview img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.feed-image-preview-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
    padding: 8px;
}

.feed-image-preview-name {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-gallery {
    display: grid;
    gap: 4px;
    overflow: hidden;
    border-radius: var(--radius);
}

.post-gallery-1 {
    grid-template-columns: 1fr;
}

.post-gallery-2,
.post-gallery-3,
.post-gallery-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-gallery figure {
    position: relative;
    margin: 0;
    min-height: 160px;
    background: #e5e7eb;
}

.post-gallery-button,
.post-uploaded-image-button {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.post-gallery-button:focus-visible,
.post-uploaded-image-button:focus-visible,
.post-gallery-more:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.45);
    outline-offset: 2px;
}

.post-gallery-button:hover img,
.post-uploaded-image-button:hover img {
    transform: scale(1.02);
}

.post-gallery img {
    width: 100%;
    height: 100%;
    min-height: 160px;
    object-fit: cover;
    transition: transform 0.18s ease;
}

.post-gallery-1 img {
    max-height: 460px;
}

.post-gallery figcaption,
.post-gallery-more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: rgba(23, 32, 51, 0.66);
    font-size: 1.8rem;
    font-weight: 900;
    cursor: pointer;
}

.crop-workspace {
    display: flex;
    justify-content: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #111827;
}

.crop-canvas {
    width: 100%;
    max-width: 720px;
    height: auto;
    border-radius: var(--radius);
    background: #111827;
}

.crop-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 12px;
    margin-top: 12px;
}

.crop-controls label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
}

.map-shell {
    display: grid;
    gap: 10px;
}

.map-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.map-canvas {
    width: 100%;
    min-height: 360px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    background: #e5e7eb;
}

.map-loading {
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 900;
}

.nearby-map-panel {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
}

.nearby-map-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.nearby-map-head strong {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-weight: 900;
}

.nearby-map-head small,
.nearby-result-status {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.nearby-search-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.nearby-search-row::-webkit-scrollbar {
    display: none;
}

.nearby-search-row .btn {
    flex: 0 0 auto;
}

.nearby-custom-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.nearby-result-list {
    display: grid;
    gap: 8px;
    max-height: 430px;
    overflow-y: auto;
}

.nearby-result-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.nearby-result-card strong {
    display: block;
    color: var(--ink);
    font-weight: 900;
}

.nearby-result-card p,
.nearby-result-card small {
    display: block;
    margin: 3px 0 0;
    color: var(--muted);
}

.nearby-result-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.post-uploaded-image {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
    transition: transform 0.18s ease;
}

.feed-viewer-content {
    overflow: hidden;
    border: 0;
    border-radius: var(--radius);
}

.feed-viewer-body {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: min(70vh, 640px);
    padding: 16px;
    background: #111827;
}

.feed-viewer-frame {
    display: grid;
    gap: 10px;
    min-width: 0;
    margin: 0;
    place-items: center;
}

.feed-viewer-frame img {
    max-width: 100%;
    max-height: 68vh;
    object-fit: contain;
    border-radius: var(--radius);
    background: #0f172a;
}

.feed-viewer-frame figcaption {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
    font-weight: 800;
    text-align: center;
}

.feed-viewer-nav {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    font-size: 1.35rem;
}

.feed-viewer-nav:hover {
    background: rgba(23, 133, 111, 0.92);
}

.feed-viewer-thumbnails {
    display: flex;
    justify-content: center;
    gap: 8px;
    overflow-x: auto;
    border-top: 1px solid var(--line);
}

.feed-viewer-thumbnail {
    width: 70px;
    height: 54px;
    flex: 0 0 auto;
    overflow: hidden;
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--radius);
    background: #e5e7eb;
}

.feed-viewer-thumbnail.active {
    border-color: var(--green);
}

.feed-viewer-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-stats {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
}

.post-stat-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    color: var(--muted);
    background: transparent;
    font-size: 0.9rem;
}

.post-stat-button:hover {
    color: var(--green);
    text-decoration: underline;
}

.post-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-actions form,
.post-actions button {
    width: 100%;
}

.feed-comments {
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

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

.feed-comment {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    padding: 8px 10px;
    border-radius: var(--radius);
    background: #f8fafc;
}

.feed-comment span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

.feed-comment small {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-weight: 700;
}

.profile-list-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.profile-list-item:last-child {
    border-bottom: 0;
}

.profile-list-item span,
.profile-list-item small {
    display: block;
    color: var(--muted);
    font-size: 0.86rem;
}

.comment-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: 8px;
}

.action-panel {
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.sos-dialer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    background: #fff5f5;
}

.sos-dialer span,
.sos-dialer small {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
}

.sos-dialer strong {
    display: block;
    color: #b91c1c;
    font-size: 1.8rem;
    font-weight: 900;
}

.sos-contact-card {
    border: 1px solid var(--line);
    color: var(--ink);
    background: #ffffff;
    text-align: center;
}

.sos-contact-card:hover,
.sos-contact-card:focus-visible {
    border-color: #fecaca;
    background: #fff7f7;
}

.sos-contact-card:disabled {
    opacity: 0.64;
    cursor: not-allowed;
}

.inline-action,
.compact-form,
.work-status-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inline-action .form-control,
.inline-action .form-select,
.compact-form .form-control,
.work-status-form .form-select {
    min-width: 0;
}

.form-control,
.form-select {
    border-color: var(--line-soft);
    border-radius: var(--radius);
    background-color: #ffffff;
    box-shadow: inset 0 1px 2px rgba(22, 31, 49, 0.035);
}

.form-control::placeholder {
    color: #8a96a8;
}

.compact-form {
    align-items: stretch;
}

.compact-form .form-control {
    flex: 1 1 auto;
}

.table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.module-subhead {
    margin: 18px 0 10px;
}

.module-subhead h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 900;
}

.table thead th {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.table > :not(caption) > * > * {
    padding: 0.84rem 0.75rem;
    border-bottom-color: var(--line-soft);
    vertical-align: middle;
}

.table tbody tr {
    transition: background-color 0.16s ease;
}

.table tbody tr:hover {
    background: var(--surface-soft);
}

.soft-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--surface-soft);
    box-shadow: 0 6px 16px rgba(22, 31, 49, 0.04);
}

.soft-row + .soft-row {
    margin-top: 10px;
}

.mobile-nav,
.mobile-section-rail {
    display: none;
}

@media (max-width: 1199px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .insurance-grid {
        grid-template-columns: 1fr;
    }

    .gps-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    body.panel-sidebar-open {
        overflow: hidden;
    }

    .sidebar {
        position: fixed;
        z-index: 90;
        inset: 0 auto 0 0;
        width: min(320px, calc(100vw - 48px));
        min-width: 0;
        max-width: 320px;
        height: 100dvh;
        padding-top: calc(18px + env(safe-area-inset-top));
        transform: translateX(-105%);
        transition: transform 0.22s ease;
        box-shadow: 20px 0 40px rgba(15, 23, 42, 0.22);
    }

    #panel-sidebar.is-open,
    .sidebar.is-open,
    .app-shell.sidebar-open .sidebar {
        transition: none !important;
        transform: translateX(0) !important;
    }

    .sidebar-backdrop {
        position: fixed;
        z-index: 80;
        inset: 0;
        display: block;
        border: 0;
        opacity: 0;
        pointer-events: none;
        background: rgba(15, 23, 42, 0.48);
        transition: opacity 0.22s ease;
    }

    .sidebar-backdrop.is-open,
    .app-shell.sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar-close-button {
        position: absolute;
        top: calc(12px + env(safe-area-inset-top));
        right: 12px;
        width: 38px;
        height: 38px;
        display: inline-grid;
        place-items: center;
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: var(--radius);
        color: #ffffff;
        background: rgba(255, 255, 255, 0.1);
    }

    .side-brand {
        padding-right: 46px;
    }

    .sidebar-toggle-button {
        width: 42px;
        height: 42px;
        flex: 0 0 auto;
        display: inline-grid;
        place-items: center;
        border: 1px solid var(--line-soft);
        border-radius: var(--radius);
        color: var(--ink);
        background: #ffffff;
        box-shadow: 0 8px 18px rgba(22, 31, 49, 0.08);
        font-size: 1.25rem;
        transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
    }

    .sidebar-toggle-button:hover,
    .sidebar-toggle-button:focus-visible {
        border-color: #cfd9e6;
        box-shadow: 0 12px 24px rgba(22, 31, 49, 0.12);
        transform: translateY(-1px);
    }

    .content {
        padding: 14px;
        padding-bottom: 92px;
    }

    .topbar {
        margin: -14px -14px 14px;
        padding: 10px 14px;
        align-items: flex-start;
        flex-direction: column;
    }

    .mobile-nav {
        position: fixed;
        z-index: 40;
        left: 10px;
        right: 10px;
        bottom: 10px;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 4px;
        padding: 6px;
        border: 1px solid rgba(217, 225, 234, 0.9);
        border-radius: var(--radius);
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 16px 32px rgba(22, 31, 49, 0.18);
    }

    .mobile-nav a {
        min-height: 48px;
        flex-direction: column;
        justify-content: center;
        gap: 2px;
        color: var(--muted);
        font-size: 0.66rem;
        transition: color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
    }

    .mobile-nav a.active {
        color: #ffffff;
        background: var(--role-accent, var(--green));
    }
}

@media (max-width: 767px) {
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .soft-row,
    .topbar .d-flex {
        align-items: stretch;
        flex-direction: column;
    }

    .inline-action,
    .compact-form,
    .work-status-form,
    .table-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .inline-action .btn,
    .compact-form .btn,
    .work-status-form .btn,
    .table-actions .btn,
    .table-actions form,
    .profile-menu,
    .profile-menu-toggle {
        width: 100%;
    }

    .post-media {
        min-height: 168px;
    }

    .map-canvas,
    .map-loading {
        min-height: 280px;
    }

    .nearby-map-head,
    .nearby-custom-search,
    .nearby-result-card,
    .nearby-result-actions {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .composer-action,
    .composer-actions .btn {
        flex: 1 1 120px;
    }

    .notification-summary-grid {
        grid-template-columns: 1fr;
    }

    .notification-page-head,
    .notification-page-actions,
    .notification-system-card,
    .notification-row,
    .notification-row-actions,
    .insurance-card-head,
    .insurance-expiry-actions,
    .insurance-expiry-form,
    .insurance-offer-form,
    .insurance-response-form,
    .insurance-chat-form,
    .gps-card-head,
    .gps-listing-form,
    .gps-offer-form,
    .gps-market-tools,
    .gps-search-form,
    .gps-ask-form,
    .gps-response-form,
    .gps-chat-form,
    .profile-gate-banner,
    .profile-completion-summary,
    .document-upload-row,
    .document-upload-info,
    .document-upload-fields,
    .document-upload-actions,
    .bid-lock,
    .vehicle-card-head,
    .vehicle-offer-head,
    .vehicle-offer-form,
    .vehicle-chat-form,
    .seller-status-form {
        align-items: stretch;
        flex-direction: column;
    }

    .vehicle-listing-form,
    .vehicle-market-grid,
    .service-chat-shell,
    .service-chat-form,
    .vehicle-info-grid,
    .insurance-meta-grid,
    .gps-info-grid,
    .parts-listing-form,
    .parts-market-grid,
    .part-info-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-listing-detail,
    .parts-description-input {
        grid-column: auto;
    }

    .vehicle-card-media,
    .vehicle-card-media img,
    .part-card-media,
    .part-card-media img {
        min-height: 150px;
        height: 160px;
    }

    .chat-member-panel {
        position: static;
    }

    .chat-product-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .chat-product-summary span {
        min-height: 62px;
        padding: 10px;
    }

    .chat-product-summary strong {
        font-size: 1.08rem;
    }

    .chat-conversation-toolbar,
    .chat-form-head,
    .chat-head-meta {
        align-items: stretch;
        flex-direction: column;
    }

    .chat-head-meta {
        justify-items: start;
    }

    .chat-member-list {
        max-height: 340px;
    }

    .chat-member-row,
    .service-chat-participants,
    .chat-compose-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .service-chat-reply {
        grid-template-columns: 1fr;
    }

    .service-chat-reply > .btn,
    .chat-attach-button {
        width: 100%;
    }

    .chat-reply-main {
        align-items: stretch;
    }

    .chat-reply-main .form-control {
        min-width: 0;
    }

    .chat-emoji-row {
        width: 100%;
    }

    .chat-member-meta {
        justify-items: start;
    }

    .chat-member-chip,
    .chat-last-message {
        max-width: none;
        width: 100%;
    }

    .document-upload-info {
        min-width: 0;
    }

    .document-upload-fields .form-control,
    .document-upload-fields input[type="file"],
    .document-upload-actions .btn,
    .profile-gate-banner .btn,
    .bid-lock .btn,
    .vehicle-offer-form .form-control,
    .vehicle-offer-form .btn,
    .vehicle-chat-form .form-control,
    .vehicle-chat-form .btn,
    .seller-status-form .form-select,
    .seller-status-form .form-control,
    .seller-status-form .btn,
    .service-chat-form .form-control,
    .service-chat-form .form-select,
    .service-chat-form .btn,
    .insurance-expiry-form .form-control,
    .insurance-expiry-form .form-select,
    .insurance-expiry-form .btn,
    .insurance-offer-form .form-control,
    .insurance-offer-form .form-select,
    .insurance-offer-form .btn,
    .insurance-response-form .form-control,
    .insurance-response-form .form-select,
    .insurance-response-form .btn,
    .insurance-chat-form .form-control,
    .insurance-chat-form .btn,
    .gps-listing-form .form-control,
    .gps-listing-form .form-select,
    .gps-listing-form .btn,
    .gps-offer-form .form-control,
    .gps-offer-form .form-select,
    .gps-offer-form .btn,
    .gps-search-form,
    .gps-search-form .form-control,
    .gps-search-form .btn,
    .gps-ask-form,
    .gps-ask-form .form-control,
    .gps-ask-form .btn,
    .gps-response-form .form-control,
    .gps-response-form .form-select,
    .gps-response-form .btn,
    .gps-chat-form .form-control,
    .gps-chat-form .btn,
    .service-chat-reply,
    .service-chat-reply .form-control,
    .service-chat-reply .btn,
    .service-chat-status,
    .service-chat-status .form-select,
    .service-chat-status .btn,
    .parts-listing-form .form-control,
    .parts-listing-form .form-select,
    .parts-listing-form .btn,
    .parts-search-form,
    .parts-search-form .form-control,
    .parts-search-form .btn,
    .parts-required-form,
    .parts-required-form .form-control,
    .parts-required-form .btn,
    .part-order-form .form-control,
    .part-order-form .form-select,
    .part-order-form .btn,
    .part-chat-form .form-control,
    .part-chat-form .btn,
    .part-pay-form .form-select,
    .part-pay-form .btn,
    .part-status-form .form-control,
    .part-status-form .form-select,
    .part-status-form .btn {
        width: 100%;
        max-width: none;
    }

    .service-chat-head,
    .service-chat-actions,
    .insurance-card-head,
    .insurance-expiry-actions,
    .insurance-expiry-form,
    .insurance-offer-form,
    .insurance-response-form,
    .insurance-chat-form,
    .gps-card-head,
    .gps-listing-form,
    .gps-offer-form,
    .gps-market-tools,
    .gps-search-form,
    .gps-ask-form,
    .gps-response-form,
    .gps-chat-form,
    .service-chat-reply,
    .service-chat-status,
    .parts-market-tools,
    .parts-search-form,
    .parts-required-form,
    .part-card-head,
    .part-order-head,
    .part-order-form,
    .part-chat-form,
    .part-pay-form,
    .part-status-form {
        align-items: stretch;
        flex-direction: column;
    }

    .service-chat-message {
        max-width: 96%;
    }

    .insurance-chat-message {
        max-width: 96%;
    }

    .gps-chat-message {
        max-width: 96%;
    }

    .notification-row {
        display: flex;
    }

    .notification-dot {
        display: none;
    }

    .notification-title-row {
        flex-direction: column;
        gap: 2px;
    }

    .sos-dialer {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 991px) {
    body {
        background: #f4f7fa;
    }

    .content {
        padding: 12px;
        padding-bottom: calc(96px + env(safe-area-inset-bottom));
    }

    .topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        row-gap: 10px;
        margin: -12px -12px 10px;
        padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
        border-bottom: 1px solid rgba(217, 225, 234, 0.88);
        border-radius: 0 0 18px 18px;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 8px 24px rgba(22, 31, 49, 0.08);
    }

    .topbar > div:first-child {
        min-width: 0;
    }

    .topbar .eyebrow {
        max-width: 100%;
        margin: 0;
        overflow: hidden;
        color: var(--ink);
        font-size: 0.78rem;
        text-overflow: ellipsis;
        text-transform: none;
        white-space: nowrap;
    }

    .topbar-subtitle {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .topbar .d-flex {
        display: contents !important;
    }

    .topbar-account-cluster {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        justify-self: end;
        width: auto;
    }

    .topbar-account-cluster .profile-menu {
        width: auto;
    }

    .profile-menu-toggle {
        min-height: 38px;
        max-width: 148px;
        justify-content: center;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .profile-menu-name {
        display: none;
    }

    .profile-menu-toggle {
        gap: 4px;
        min-width: 42px;
        padding: 6px 8px;
    }

    .profile-dropdown {
        max-width: calc(100vw - 24px);
    }

    .notification-dropdown {
        max-width: calc(100vw - 24px);
    }

    .notification-dropdown-head,
    .notification-dropdown-foot {
        align-items: stretch;
        flex-direction: column;
    }

    .work-status-form {
        grid-column: 1 / -1;
        grid-row: 2;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        width: 100%;
        padding: 8px;
        border: 1px solid var(--line-soft);
        border-radius: 14px;
        background: #ffffff;
        box-shadow: 0 8px 18px rgba(22, 31, 49, 0.045);
    }

    .status-toggle-track {
        width: 100%;
    }

    .work-status-form .status-toggle-control {
        min-height: 42px;
    }

    .topbar .soft-box {
        display: none;
    }

    .mobile-section-rail {
        display: flex;
        gap: 8px;
        margin: 0 0 12px;
        padding: 0 0 4px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-section-rail::-webkit-scrollbar {
        display: none;
    }

    .mobile-section-rail a {
        min-width: 78px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 8px 10px;
        border: 1px solid var(--line-soft);
        border-radius: 999px;
        color: var(--muted);
        background: #ffffff;
        font-size: 0.74rem;
        font-weight: 900;
        white-space: nowrap;
        box-shadow: 0 8px 18px rgba(22, 31, 49, 0.055);
        transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
    }

    .mobile-section-rail a.active {
        color: #ffffff;
        border-color: var(--role-accent, var(--green));
        background: var(--role-accent, var(--green));
        box-shadow: 0 12px 24px rgba(23, 133, 111, 0.16);
    }

    .mobile-section-rail a:hover,
    .mobile-section-rail a:focus-visible {
        border-color: #cfd9e6;
        transform: translateY(-1px);
    }

    .hero-panel,
    .module-card,
    .metric-card,
    .feed-composer,
    .feed-post,
    .soft-box {
        box-shadow: 0 8px 20px rgba(22, 31, 49, 0.06);
    }

    .hero-panel {
        padding: 14px;
        border-left-width: 4px;
    }

    .hero-title {
        font-size: 1.35rem;
        line-height: 1.16;
    }

    .hero-copy {
        margin-top: 6px;
        font-size: 0.92rem;
    }

    .module-head {
        padding: 12px;
    }

    .module-title {
        min-width: 0;
        font-size: 0.98rem;
    }

    .module-title i {
        flex: 0 0 auto;
    }

    .module-body,
    .feed-composer,
    .feed-post,
    .soft-box {
        padding: 12px;
    }

    .section-tile {
        min-height: 86px;
        grid-template-columns: 44px minmax(0, 1fr) 20px;
        padding: 12px;
    }

    .section-tile .service-icon {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .section-tile small {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .mobile-nav {
        left: 12px;
        right: 12px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        gap: 6px;
        padding: 7px;
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 18px 38px rgba(22, 31, 49, 0.22);
        max-width: calc(100vw - 24px);
    }

    .mobile-nav a {
        min-height: 54px;
        border-radius: 16px;
        font-size: 0.68rem;
    }

    .mobile-nav a:hover,
    .mobile-nav a:focus-visible {
        background: var(--surface-soft);
        transform: translateY(-1px);
    }

    .mobile-nav a.active:hover,
    .mobile-nav a.active:focus-visible {
        color: #ffffff;
        background: var(--role-accent, var(--green));
    }

    .mobile-nav a i {
        font-size: 1.08rem;
    }
}

@media (max-width: 767px) {
    .content .btn:has(> i.bi) {
        font-size: 0;
    }

    .content .btn:has(> i.bi) > i.bi {
        margin: 0;
        font-size: 1rem;
    }

    .content .btn:has(> i.bi) .btn-label {
        display: none;
    }

    .metric-grid {
        display: flex;
        grid-template-columns: none;
        gap: 10px;
        margin: 12px 0 0;
        padding: 0 0 4px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .metric-grid::-webkit-scrollbar {
        display: none;
    }

    .metric-card {
        min-width: 158px;
        min-height: 104px;
        scroll-snap-align: start;
    }

    .metric-value {
        margin-top: 8px;
        font-size: 1.3rem;
    }

    .module-card {
        margin-top: 14px;
    }

    .module-head {
        align-items: flex-start;
    }

    .module-head > .badge-soft {
        max-width: 112px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .action-panel {
        padding: 10px;
    }

    .action-panel .form-control,
    .action-panel .form-select,
    .action-panel .btn,
    .comment-form .form-control,
    .comment-form .btn {
        min-height: 44px;
    }

    .feed-composer-top,
    .post-head {
        gap: 9px;
    }

    .feed-composer textarea {
        min-height: 54px;
        border-radius: 18px;
    }

    .post-media {
        min-height: 154px;
    }

    .feed-image-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .post-gallery figure,
    .post-gallery img {
        min-height: 132px;
    }

    .crop-controls {
        grid-template-columns: 1fr;
    }

    .post-uploaded-image {
        max-height: 280px;
    }

    .feed-viewer-body {
        grid-template-columns: 1fr;
        min-height: 60vh;
        padding: 12px;
    }

    .feed-viewer-frame img {
        max-height: 60vh;
    }

    .feed-viewer-nav {
        position: absolute;
        top: 50%;
        z-index: 2;
        width: 38px;
        height: 38px;
        transform: translateY(-50%);
        font-size: 1.1rem;
    }

    [data-feed-viewer-prev] {
        left: 14px;
    }

    [data-feed-viewer-next] {
        right: 14px;
    }

    .feed-viewer-thumbnails {
        justify-content: flex-start;
    }

    .post-stats {
        align-items: center;
        flex-wrap: wrap;
    }

    .post-actions {
        gap: 6px;
    }

    .post-actions button {
        min-height: 42px;
        font-size: 0.82rem;
    }

    .comment-form {
        grid-template-columns: 1fr;
    }

    .soft-row {
        align-items: flex-start;
    }

    .table-responsive {
        margin: 0 -12px;
        padding: 0 12px;
    }

    .table {
        min-width: 680px;
    }

    .modal-dialog {
        margin: 12px;
    }
}

@media (max-width: 420px) {
    .content {
        padding-inline: 10px;
    }

    .topbar {
        margin-inline: -10px;
        padding-inline: 10px;
    }

    .notification-toggle {
        width: 36px;
        height: 36px;
    }

    .profile-menu-toggle {
        max-width: 124px;
        padding-inline: 7px;
    }

    .profile-menu-toggle .avatar-xs {
        display: none;
    }

    .mobile-nav {
        left: 8px;
        right: 8px;
        max-width: calc(100vw - 16px);
    }

    .mobile-nav a span {
        max-width: 54px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
