:root {
    --admin-radius: 18px;
    --admin-radius-lg: 28px;
    --admin-bg: #f3f2ef;
    --admin-surface: #ffffff;
    --admin-surface-muted: #f6f7f3;
    --admin-border: #e7e8df;
    --admin-sidebar: #f6f6f4;
    --admin-text: #151515;
    --admin-text-muted: #8d948d;
    --admin-green: #2f6b48;
    --admin-green-dark: #1f4f35;
    --admin-green-soft: #8dc49d;
    --admin-shadow: 0 24px 60px rgba(24, 34, 24, 0.08);
}

body {
    background: var(--admin-bg);
    color: var(--admin-text);
    font-family: "Manrope", system-ui, sans-serif;
}

.admin-body {
    min-height: 100vh;
    padding: 1.5rem;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.95), transparent 28%),
        linear-gradient(180deg, #f3f2ef 0%, #eeefea 100%);
}

.admin-shell {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem;
    border-radius: 32px;
    background: #FFFFFF;
}

.admin-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem;
    border-radius: var(--admin-radius-lg);
    background: linear-gradient(180deg, #f8f8f5 0%, #f2f3ef 100%);
    border: 1px solid var(--admin-border);
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.admin-brand-mark {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(47, 107, 72, 0.16), rgba(47, 107, 72, 0.04));
    color: var(--admin-green);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.admin-brand-name {
    font-size: 1.45rem;
    font-weight: 800;
}

.admin-brand-subtitle,
.admin-user-email {
    color: var(--admin-text-muted);
    font-size: 0.88rem;
}

.admin-menu-label {
    color: var(--admin-text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.75rem;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 0.95rem;
    border-radius: 16px;
    color: #7d857d;
    font-weight: 600;
    text-decoration: none;
}

.admin-nav-link:hover {
    background: rgba(47, 107, 72, 0.06);
    color: var(--admin-text);
}

.admin-nav-link.is-active {
    background: #ffffff;
    color: var(--admin-text);
    box-shadow: 0 10px 24px rgba(20, 30, 20, 0.06);
}

.admin-nav-icon {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    background: currentColor;
    opacity: 0.75;
}

.admin-sidebar-card {
    margin-top: auto;
}

.admin-sidebar-card .btn-admin-ghost {
    background: #ffffff;
    border: 1px solid rgba(47, 107, 72, 0.35);
    color: var(--admin-green-dark);
}

.admin-sidebar-card .btn-admin-ghost:hover,
.admin-sidebar-card .btn-admin-ghost:focus {
    background: #f6faf6;
    color: var(--admin-green-dark);
}

.admin-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-x: hidden;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.25rem 0;
}

.admin-search {
    flex: 1;
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border-radius: 20px;
    background: #f8f8f5;
    border: 1px solid var(--admin-border);
}

.admin-search svg,
.admin-icon-button svg {
    width: 18px;
    height: 18px;
    color: #8b918a;
}

.admin-search input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: #9aa09a;
}

.admin-search-shortcut {
    padding: 0.2rem 0.45rem;
    border-radius: 8px;
    background: #eef0ea;
    color: #7d857d;
    font-size: 0.78rem;
}

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-icon-button {
    width: 44px;
    height: 44px;
    border: 1px solid var(--admin-border);
    border-radius: 50%;
    background: #ffffff;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.55rem 0.7rem;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid var(--admin-border);
}

.admin-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #d7b49e, #f4dac7);
    color: #3d2a1e;
    font-weight: 800;
}

.admin-user-name {
    font-weight: 700;
}

.admin-alert {
    border: 0;
    border-radius: 18px;
    box-shadow: none;
}

.admin-page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.admin-page-head > div:first-child {
    display: flex;
    align-items: center;
    min-height: 48px;
}

.admin-page-title {
    font-size: 1.75rem;
    line-height: 1;
    margin: 0;
    font-weight: 800;
}

.admin-page-subtitle {
    margin: 0.6rem 0 0;
    color: var(--admin-text-muted);
}

.admin-page-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-admin-primary,
.btn-admin-outline,
.btn-admin-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    min-height: 48px;
    padding-inline: 1.2rem;
    line-height: 1;
    font-weight: 700;
}

.btn-admin-primary {
    background: var(--admin-green);
    border: 1px solid var(--admin-green);
    color: #ffffff;
}

.btn-admin-primary:hover,
.btn-admin-primary:focus {
    background: var(--admin-green-dark);
    border-color: var(--admin-green-dark);
    color: #ffffff;
}

.btn-admin-outline {
    background: #ffffff;
    border: 1px solid rgba(47, 107, 72, 0.35);
    color: var(--admin-green-dark);
}

.btn-admin-outline:hover,
.btn-admin-ghost:hover {
    background: #f6faf6;
}

.btn-admin-table {
    min-height: 38px;
    padding-inline: 0.95rem;
    font-size: 0.88rem;
}

.btn-admin-table.is-danger {
    border-color: rgba(163, 59, 50, 0.28);
    color: #8f342d;
}

.btn-admin-table.is-danger:hover,
.btn-admin-table.is-danger:focus {
    background: #fff6f5;
    border-color: rgba(163, 59, 50, 0.36);
    color: #7a2d27;
}

.btn-admin-ghost {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #ffffff;
}

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.dashboard-stat-card,
.dashboard-panel,
.card,
.table-responsive,
.form-control,
.form-select,
.alert,
.admin-login-card {
    border-radius: 24px;
}

.dashboard-stat-card,
.dashboard-panel {
    min-width: 0;
    padding: 1.35rem;
    background: #ffffff;
    border: 1px solid var(--admin-border);
    box-shadow: 0 14px 34px rgba(20, 30, 20, 0.05);
}

.dashboard-stat-card.is-featured {
    background: linear-gradient(135deg, #2f6b48 0%, #234c34 100%);
    color: #ffffff;
}

.dashboard-stat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
}

.dashboard-stat-arrow {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #233027;
}

.dashboard-stat-value {
    margin-top: 0.7rem;
    font-size: 3.25rem;
    line-height: 1;
    font-weight: 800;
}

.dashboard-stat-note {
    margin-top: 0.5rem;
    color: inherit;
    opacity: 0.68;
    font-size: 0.9rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.95fr 0.95fr;
    gap: 1rem;
    margin-top: 1rem;
}

.dashboard-grid-mentions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.reports-grid {
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
}

.dashboard-panel-large {
    grid-column: span 1;
}

.dashboard-panel-full {
    grid-column: 1 / -1;
}

.dashboard-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dashboard-panel h2 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
}

.dashboard-panel p {
    margin: 0.3rem 0 0;
    color: var(--admin-text-muted);
}

.reports-filter-panel {
    margin-top: 1rem;
}

.reports-filter-summary {
    margin-top: 1rem;
}

.reports-filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.9rem;
    align-items: end;
}

.reports-filter-grid-offcanvas {
    grid-template-columns: 1fr;
}

.reports-filter-actions {
    display: flex;
    gap: 0.75rem;
    align-items: end;
}

.reports-filter-actions .btn {
    min-height: 42px;
}

.reports-sentiment-list,
.reports-mini-list {
    display: grid;
    gap: 0.85rem;
}

.reports-sentiment-item,
.reports-mini-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    border: 1px solid var(--admin-border);
    background: #f8faf7;
}

.reports-sentiment-item {
    width: 100%;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.reports-sentiment-item:hover,
.reports-sentiment-item:focus {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(20, 30, 20, 0.06);
}

.reports-mini-item {
    width: 100%;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.reports-mini-item:hover,
.reports-mini-item:focus {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(20, 30, 20, 0.06);
}

.reports-sentiment-item strong {
    font-size: 1.4rem;
    line-height: 1;
}

.reports-sentiment-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.reports-sentiment-meta i {
    font-size: 0.95rem;
    color: var(--admin-text-muted);
}

.reports-sentiment-item.is-positive {
    border-color: rgba(89, 182, 122, 0.26);
}

.reports-sentiment-item.is-negative {
    border-color: rgba(215, 96, 96, 0.24);
}

.reports-sentiment-item.is-neutral {
    border-color: rgba(134, 146, 139, 0.28);
}

.reports-mini-title {
    font-weight: 700;
}

.reports-mini-subtitle {
    color: var(--admin-text-muted);
    font-size: 0.9rem;
}

.reports-message-list {
    display: grid;
    gap: 0.85rem;
}

.reports-message-item {
    padding: 1rem 1.05rem;
    border-radius: 20px;
    border: 1px solid var(--admin-border);
    background: #ffffff;
}

.reports-message-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: center;
    color: var(--admin-text-muted);
    font-size: 0.88rem;
}

.reports-message-head strong {
    color: var(--admin-text);
    font-size: 0.96rem;
}

.reports-message-body {
    margin-top: 0.75rem;
    white-space: pre-wrap;
    line-height: 1.55;
}

.analytics-bars {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: end;
    gap: 0.85rem;
    min-height: 220px;
    padding-top: 1rem;
}

.analytics-bars-21 {
    grid-template-columns: repeat(21, minmax(0, 1fr));
}

.reports-analytics-bars {
    grid-template-columns: repeat(var(--reports-bars-count, 7), minmax(0, 1fr));
}

.reports-analytics-bars .analytics-bar-wrap {
    max-width: var(--reports-bar-max-width, 92px);
    width: 100%;
    margin-inline: auto;
}

.analytics-bar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    height: 100%;
}

.analytics-bar {
    width: 100%;
    border-radius: 999px;
    min-height: 0;
    background: repeating-linear-gradient(-45deg,
            #cbd2c8,
            #cbd2c8 3px,
            transparent 3px,
            transparent 8px);
}

.analytics-bar.is-solid {
    background: linear-gradient(180deg, #2f6b48, #234c34);
}

.analytics-bar.is-soft {
    background: linear-gradient(180deg, #97cfab, #74b68d);
}

.analytics-bar.is-empty {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: #dfe4dd;
    box-shadow: none;
}

.analytics-bar-wrap span {
    color: var(--admin-text-muted);
    font-size: 0.75rem;
}

.reminder-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.05;
}

.reminder-time {
    margin-top: 0.5rem;
    color: var(--admin-text-muted);
}

.dashboard-pill {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(47, 107, 72, 0.25);
    color: var(--admin-green-dark);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.dashboard-mini-list,
.team-list {
    display: grid;
    gap: 0.9rem;
}

.dashboard-mini-item,
.team-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.dashboard-mini-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(180deg, #8ad2a0, #2f6b48);
    flex: 0 0 auto;
}

.dashboard-mini-title,
.team-name {
    font-weight: 700;
}

.dashboard-mini-subtitle,
.team-role {
    color: var(--admin-text-muted);
    font-size: 0.9rem;
}

.team-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #f7c18e, #e9f1aa);
    font-weight: 800;
}

.team-meta {
    min-width: 0;
    flex: 1;
}

.team-badge {
    padding: 0.32rem 0.6rem;
    border-radius: 999px;
    background: #eef7ef;
    color: #6da37b;
    font-size: 0.78rem;
    font-weight: 700;
}

.progress-ring {
    --size: 220px;
    width: var(--size);
    height: var(--size);
    margin: 0.5rem auto 1rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(closest-side, #ffffff 68%, transparent 69% 100%),
        conic-gradient(var(--admin-green) calc(var(--progress) * 1%), #dfe5dc 0);
}

.progress-ring-value {
    font-size: 2.9rem;
    font-weight: 800;
}

.progress-legend {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--admin-text-muted);
    font-size: 0.88rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    display: inline-block;
    border-radius: 50%;
    margin-right: 0.4rem;
}

.legend-dot.is-dark {
    background: var(--admin-green-dark);
}

.legend-dot.is-mid {
    background: #6ca780;
}

.legend-dot.is-light {
    background: #d5ddd2;
}

.dashboard-panel-accent {
    color: #ffffff;
    background:
        radial-gradient(circle at 30% 20%, rgba(117, 208, 146, 0.18), transparent 25%),
        repeating-radial-gradient(circle at 100% 100%, rgba(79, 151, 102, 0.18) 0 8px, transparent 8px 18px),
        linear-gradient(160deg, #173722 0%, #0f2317 100%);
}

.dashboard-panel-accent p {
    color: rgba(255, 255, 255, 0.74);
}

.tracker-time {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.tracker-actions {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1.25rem;
}

.tracker-btn {
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    font-size: 1rem;
}

.tracker-btn.is-light {
    background: #ffffff;
}

.tracker-btn.is-danger {
    background: #d95050;
    color: #ffffff;
}

.admin-field {
    display: grid;
    gap: 0.5rem;
}

.admin-field span {
    font-size: 0.92rem;
    font-weight: 700;
}

.whatsapp-qr-panel {
    display: grid;
    gap: 1rem;
}

.whatsapp-device-label {
    font-size: 1.25rem;
    font-weight: 800;
}

.whatsapp-status,
.device-badge {
    width: fit-content;
    padding: 0.42rem 0.78rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
}

.whatsapp-status.is-pending,
.device-badge.is-pending {
    background: #fff1d7;
    color: #9a6700;
}

.whatsapp-status.is-paired,
.device-badge.is-paired {
    background: #e8f7ed;
    color: #246041;
}

.whatsapp-qr-box {
    width: min(100%, 280px);
    padding: 1rem;
    border-radius: 28px;
    background: linear-gradient(180deg, #f8faf7 0%, #eef4ee 100%);
    border: 1px solid var(--admin-border);
}

.whatsapp-qr-box svg {
    display: block;
    width: 100%;
    height: auto;
}

.whatsapp-code {
    color: var(--admin-text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.whatsapp-pairing-code {
    display: grid;
    gap: 0.4rem;
    width: min(100%, 360px);
    padding: 1.2rem 1.3rem;
    border-radius: 22px;
    background: #f8faf7;
    border: 1px solid var(--admin-border);
}

.whatsapp-pairing-code span {
    color: var(--admin-text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.whatsapp-pairing-code strong {
    color: var(--admin-green-dark);
    font-size: 2rem;
    letter-spacing: 0.12em;
}

.whatsapp-success-panel {
    display: grid;
    justify-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 24px;
    background: linear-gradient(180deg, #f8faf7 0%, #eef7f0 100%);
    border: 1px solid var(--admin-border);
    text-align: center;
}

.whatsapp-success-panel svg {
    width: min(100%, 280px);
    height: auto;
}

.whatsapp-success-panel div {
    display: grid;
    gap: 0.35rem;
}

.whatsapp-success-panel strong {
    color: var(--admin-green-dark);
    font-size: 1.25rem;
    font-weight: 800;
}

.whatsapp-success-panel span {
    color: var(--admin-text-muted);
}

.whatsapp-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.device-list {
    display: grid;
    gap: 0.85rem;
}

.device-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.device-summary-card {
    display: grid;
    gap: 0.4rem;
    width: 100%;
    padding: 1.1rem 1.15rem;
    border: 1px solid var(--admin-border);
    border-radius: 22px;
    background: #fbfbf8;
    color: inherit;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
}

.device-summary-card strong {
    font-size: 1rem;
}

.device-summary-card span {
    color: var(--admin-text-muted);
}

.device-pairing-grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

.device-detail-list {
    display: grid;
    gap: 1rem;
    margin: 0;
}

.device-detail-list div {
    display: grid;
    gap: 0.35rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--admin-border);
}

.device-detail-list div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.device-detail-list dt {
    color: var(--admin-text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.device-detail-list dd {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.active-device-inline {
    margin-top: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 22px;
    background: #f8faf7;
    border: 1px solid var(--admin-border);
}

.device-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--admin-border);
    border-radius: 20px;
    background: #fbfbf8;
    color: inherit;
    text-decoration: none;
}

.device-item.is-active {
    background: #ffffff;
    border-color: rgba(47, 107, 72, 0.32);
    box-shadow: 0 12px 24px rgba(20, 30, 20, 0.05);
}

.device-phone {
    font-weight: 800;
}

.device-meta {
    margin-top: 0.2rem;
    color: var(--admin-text-muted);
    font-size: 0.88rem;
}

.device-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.device-icon-button {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid var(--admin-border);
    border-radius: 999px;
    background: #ffffff;
    color: #2f6b48;
    text-decoration: none;
    font: inherit;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.device-icon-button:hover {
    transform: translateY(-1px);
    border-color: rgba(47, 107, 72, 0.35);
    box-shadow: 0 10px 18px rgba(20, 30, 20, 0.06);
    color: #234c34;
}

.device-icon-button.is-danger {
    color: #a33b32;
}

.device-icon-button.is-danger:hover {
    border-color: rgba(163, 59, 50, 0.35);
    color: #842f28;
}

.device-actions form {
    margin: 0;
}

.device-icon-button i {
    font-size: 1rem;
}

.empty-state {
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: #f8faf7;
    color: var(--admin-text-muted);
}

.admin-offcanvas {
    --bs-offcanvas-width: 40vw;
    min-width: 420px;
    border-left: 1px solid var(--admin-border);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
}

.admin-offcanvas .offcanvas-header {
    display: none;
}

.admin-offcanvas .offcanvas-body {
    padding: 0;
}

.offcanvas-panel {
    height: 100%;
    padding: 1.5rem;
    overflow-y: auto;
}

.offcanvas-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.offcanvas-head h2 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
}

.offcanvas-head p {
    margin: 0.35rem 0 0;
    color: var(--admin-text-muted);
}

.offcanvas-close {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--admin-border);
    background: #ffffff;
    color: var(--admin-text);
    font-size: 1.6rem;
    line-height: 1;
}

.admin-password-field {
    position: relative;
}

.admin-password-field .form-control {
    padding-right: 5.75rem;
}

.admin-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #3d6b49;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    padding: 0;
}

.admin-check-field {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--admin-text);
    font-weight: 600;
}

.admin-check-field input[type='checkbox'] {
    width: 18px;
    height: 18px;
    accent-color: #3d6b49;
}

.mentions-filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.mentions-filter-actions {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-icon-button {
    width: 48px;
    min-width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(47, 107, 72, 0.35);
    background: #ffffff;
    color: var(--admin-green-dark);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.filter-icon-button:hover,
.filter-icon-button:focus {
    background: #f6faf6;
}

.filter-icon-button svg {
    width: 18px;
    height: 18px;
}

.admin-table-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.admin-table-actions form {
    margin: 0;
}

.chat-link-button {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(47, 107, 72, 0.2);
    background: rgba(47, 107, 72, 0.12);
    color: var(--admin-green-dark);
    box-shadow: none;
}

.chat-link-button:hover,
.chat-link-button:focus {
    background: rgba(47, 107, 72, 0.18);
    border-color: rgba(47, 107, 72, 0.3);
    color: var(--admin-green-dark);
}

.chat-link-button i {
    font-size: 1rem;
    line-height: 1;
}

.chat-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.85fr);
    align-items: start;
    gap: 1rem;
}

.chat-page-head {
    align-items: center;
}

.chat-page-head .admin-page-title {
    font-size: 1.65rem;
}

.chat-page-head .btn {
    min-height: 42px;
    padding-inline: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-thread-panel,
.chat-filter-panel {
    min-width: 0;
}

.chat-filter-panel {
    padding: 1.05rem;
}

.chat-filter-panel .dashboard-panel-header {
    margin-bottom: 0.15rem;
}

.chat-filter-panel .dashboard-panel-header h2 {
    margin: 0;
    font-size: 0.98rem;
}

.chat-filter-panel .admin-field {
    gap: 0.35rem;
}

.chat-filter-panel .admin-field span {
    font-size: 0.88rem;
}

.chat-thread-panel {
    background:
        radial-gradient(circle at top right, rgba(150, 204, 166, 0.16), transparent 28%),
        linear-gradient(180deg, #efeae2 0%, #ece7df 100%);
}

.chat-thread {
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    border-radius: 24px;
    background:
        radial-gradient(circle at 1px 1px, rgba(56, 78, 56, 0.05) 1px, transparent 0);
    background-size: 18px 18px;
}

.chat-message {
    display: grid;
    gap: 0.45rem;
    justify-items: start;
}

.chat-message.is-outgoing {
    justify-items: end;
}

.chat-message-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: var(--admin-text-muted);
    font-size: 0.88rem;
}

.chat-message-head strong {
    color: var(--admin-text);
    font-size: 0.95rem;
}

.chat-bubble {
    width: fit-content;
    max-width: min(90%, 720px);
    padding: 0.95rem 1rem;
    border-radius: 20px 20px 20px 8px;
    background: #ffffff;
    border: 1px solid rgba(42, 58, 42, 0.08);
    box-shadow: 0 8px 18px rgba(35, 47, 35, 0.06);
    white-space: normal;
}

.chat-message-text {
    white-space: pre-wrap;
}

.chat-message.is-outgoing .chat-bubble {
    background: #d9fdd3;
    border-radius: 20px 20px 8px 20px;
}

.chat-tone-positive {
    border-color: rgba(89, 182, 122, 0.32);
    box-shadow: 0 8px 18px rgba(35, 47, 35, 0.06), inset 0 0 0 1px rgba(89, 182, 122, 0.12);
}

.chat-tone-negative {
    border-color: rgba(215, 96, 96, 0.3);
    background: #fff7f7;
    box-shadow: 0 8px 18px rgba(35, 47, 35, 0.06), inset 0 0 0 1px rgba(215, 96, 96, 0.12);
}

.chat-message.is-outgoing .chat-tone-negative {
    background: #ffe9e9;
}

.chat-bubble-sticker {
    padding: 0.65rem 0.8rem;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.chat-sticker {
    font-size: 3rem;
    line-height: 1;
}

.chat-media-card {
    width: min(320px, 100%);
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 18px;
    color: #ffffff;
    overflow: hidden;
}

.chat-media-card.is-image {
    background:
        linear-gradient(180deg, rgba(12, 35, 22, 0.15), rgba(12, 35, 22, 0.55)),
        linear-gradient(135deg, #7dbf8f, #2f6b48 55%, #1f4f35);
}

.chat-media-card.is-video {
    background:
        linear-gradient(180deg, rgba(12, 35, 22, 0.22), rgba(12, 35, 22, 0.68)),
        linear-gradient(135deg, #5f8769, #274d36 60%, #182f22);
}

.chat-media-badge {
    width: fit-content;
    padding: 0.32rem 0.62rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.chat-media-label {
    font-size: 1.05rem;
    font-weight: 700;
}

.chat-media-play {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    font-size: 1.25rem;
}

.chat-caption {
    margin-top: 0.7rem;
    white-space: pre-wrap;
}

.chat-filter-form {
    display: grid;
    gap: 0.75rem;
}

.chat-filter-form .form-control,
.chat-filter-form .form-select {
    min-height: 40px;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.chat-filter-button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
    width: 100%;
    margin-top: 0.1rem;
}

.chat-summary {
    display: grid;
    gap: 1rem;
}

.chat-summary-card {
    padding: 1.1rem 1.15rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(42, 58, 42, 0.08);
}

.chat-summary-card h2 {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
    font-weight: 800;
}

.chat-summary-card p {
    margin: 0;
    line-height: 1.65;
}

.summary-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.summary-chip {
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--admin-border);
    font-size: 0.88rem;
    font-weight: 600;
}

.summary-list {
    display: grid;
    gap: 0.7rem;
}

.summary-list-item {
    padding-left: 1rem;
    position: relative;
    line-height: 1.55;
}

.summary-list-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--admin-green);
}

.admin-form-grid {
    display: grid;
    gap: 1rem;
}

.admin-form-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.35rem;
}

.admin-pagination {
    display: flex;
    justify-content: flex-end;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.admin-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding-inline: 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(47, 107, 72, 0.2);
    background: #ffffff;
    color: var(--admin-green-dark);
    text-decoration: none;
    font-weight: 700;
}

.admin-page-link.is-active {
    background: var(--admin-green);
    border-color: var(--admin-green);
    color: #ffffff;
}

.seo-provider-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.seo-provider-panel {
    gap: 1rem;
}

.seo-provider-metrics {
    display: grid;
    gap: 0.85rem;
}

.seo-provider-metric {
    display: grid;
    gap: 0.25rem;
    padding: 1rem 1.05rem;
    border-radius: 18px;
    background: #f8faf7;
    border: 1px solid var(--admin-border);
}

.seo-provider-label {
    color: var(--admin-text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.seo-provider-value {
    font-size: 1.4rem;
    line-height: 1;
}

.amendment-summary {
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 600;
}

.seo-stat-change {
    width: fit-content;
    padding: 0.32rem 0.62rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
}

.seo-stat-change.is-up {
    background: #e8f7ed;
    color: #246041;
}

.seo-stat-change.is-down {
    background: #fff1ef;
    color: #9a4037;
}

.seo-stat-change.is-neutral {
    background: #f0f2ec;
    color: #667066;
}

.card,
.alert,
.btn,
.form-control,
.form-select,
.table-responsive {
    border-radius: var(--admin-radius);
}

.card {
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    box-shadow: 0 12px 28px rgba(20, 30, 20, 0.04);
}

.card .card-footer,
.card .card-header {
    background: transparent;
}

.table-responsive {
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--admin-border);
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(20, 30, 20, 0.04);
}

.form-control,
.form-select {
    border-color: var(--admin-border);
    min-height: 46px;
    background: #fbfbf8;
    box-shadow: none !important;
}

.btn-primary {
    background-color: var(--admin-green);
    border-color: var(--admin-green);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--admin-green-dark);
    border-color: var(--admin-green-dark);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--admin-border);
}

.table> :not(caption)>*>* {
    padding: 1rem 1.1rem;
}

.table thead th {
    color: var(--admin-text-muted);
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.table tbody td {
    vertical-align: middle;
}

.admin-login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.95), transparent 24%),
        linear-gradient(180deg, #f3f2ef 0%, #eeefea 100%);
}

.admin-login-shell {
    width: min(1120px, 100%);
}

.admin-login-panel {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 1rem;
    padding: 1rem;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--admin-shadow);
}

.admin-login-copy {
    padding: 2rem;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(96, 172, 119, 0.18), transparent 28%),
        linear-gradient(160deg, #f7f6f2 0%, #f1f2ed 100%);
}

.admin-login-title {
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1.02;
    font-weight: 800;
    margin: 0;
}

.admin-login-subtitle {
    margin-top: 1rem;
    max-width: 34rem;
    color: var(--admin-text-muted);
    font-size: 1.05rem;
}

.admin-login-card {
    padding: 2rem;
    background: #ffffff;
    border: 1px solid var(--admin-border);
    box-shadow: 0 16px 40px rgba(20, 30, 20, 0.06);
}

@media (max-width: 1200px) {

    .dashboard-stats-grid,
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-panel-large {
        grid-column: span 2;
    }

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

    .reports-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 991px) {

    .admin-shell,
    .admin-login-panel,
    .dashboard-stats-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-panel-large {
        grid-column: auto;
    }

    .admin-topbar,
    .admin-page-head {
        flex-direction: column;
        align-items: stretch;
    }

    .active-device-inline {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .seo-provider-grid {
        grid-template-columns: 1fr;
    }

    .reports-filter-grid {
        grid-template-columns: 1fr;
    }

    .reports-filter-actions {
        flex-direction: column;
    }

    .reports-filter-actions .btn {
        width: 100%;
    }

    .admin-offcanvas {
        --bs-offcanvas-width: min(100vw, 560px);
        min-width: 0;
    }

}

@media (max-width: 640px) {

    .admin-body,
    .admin-login-body {
        padding: 0.75rem;
    }

    .admin-shell,
    .admin-login-panel {
        border-radius: 24px;
        padding: 0.75rem;
    }

    .admin-page-title {
        font-size: 1.55rem;
    }
}
