html,
body {
    min-height: 100%;
}

body {
    background: #f8fafc;
}

body.auth-shell {
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 34%),
        radial-gradient(circle at right 18%, rgba(29, 78, 216, 0.08), transparent 28%),
        linear-gradient(180deg, #f8fafc 0%, #eef4ff 100%);
}

.auth-shell-main {
    position: relative;
    overflow: hidden;
}

.auth-shell-main::before,
.auth-shell-main::after {
    content: "";
    position: absolute;
    inset: auto;
    border-radius: 999px;
    pointer-events: none;
    background: rgba(59, 130, 246, 0.08);
    filter: blur(4px);
}

.auth-shell-main::before {
    width: 18rem;
    height: 18rem;
    top: -6rem;
    right: -4rem;
}

.auth-shell-main::after {
    width: 14rem;
    height: 14rem;
    left: -4rem;
    bottom: -4rem;
}

.auth-page {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1240px;
}

.auth-grid {
    min-height: clamp(640px, calc(100vh - 8rem), 820px);
}

.auth-card,
.login-hero {
    position: relative;
    overflow: hidden;
}

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

.sidebar {
    width: 290px;
    transition: width 0.2s ease;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    box-shadow: inset -1px 0 0 rgba(148, 163, 184, 0.08);
}

.sidebar-shell {
    min-height: 0;
}

.sidebar-brand-card,
.sidebar-footer-card,
.sidebar-section {
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.92);
}

.sidebar-brand-card,
.sidebar-footer-card {
    padding: 1rem;
}

.sidebar-section {
    padding: 0.75rem;
}

.sidebar-section-title {
    margin-bottom: 0.65rem;
    padding: 0 0.25rem;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sidebar-nav-link {
    color: #64748b;
    border-radius: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.72rem 0.8rem;
    border: 1px solid transparent;
    background: transparent;
}

.sidebar-nav-link.active,
.sidebar-nav-link:hover {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.04));
    color: #1e293b;
    border-color: rgba(59, 130, 246, 0.12);
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.06);
}

.sidebar-brand-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 1rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
}

.conversation-list {
    max-height: calc(100vh - 230px);
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.conversation-list.is-loading {
    opacity: 0.88;
}

.inbox-stage {
    min-height: calc(100vh - 170px);
}

.inbox-page {
    position: relative;
}

.inbox-hero {
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.09), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    border-radius: 1.4rem;
}

.inbox-hero-copy {
    max-width: 54rem;
}

.inbox-hero-badges .badge {
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.inbox-filters .form-label {
    margin-bottom: 0.25rem;
}

.inbox-filters .form-check {
    min-height: 0;
    margin-bottom: 0;
    padding-left: 1.4rem;
}

.inbox-list-panel,
.inbox-chat-panel,
.inbox-contact-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
}

.inbox-list-panel {
    overflow: hidden;
}

.inbox-list-header {
    position: relative;
}

.inbox-list-header::after,
.inbox-chat-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.12), rgba(148, 163, 184, 0.04));
}

.inbox-status-tabs .btn {
    white-space: nowrap;
}

.inbox-search-shell {
    min-width: min(100%, 280px);
}

.inbox-inline-date-filters {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 0.98));
    border-radius: 1rem;
}

.inbox-chat-panel {
    overflow: hidden;
    min-height: 0;
}

.inbox-chat-shell {
    min-height: 0;
}

.inbox-chat-header {
    position: relative;
}

.inbox-chat-stream {
    background:
        radial-gradient(circle at top, rgba(59, 130, 246, 0.03), transparent 28%),
        #f8fafc;
    border-radius: 1.2rem;
    min-height: 0;
}

.inbox-composer-shell {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.85), rgba(255, 255, 255, 0.98));
}

.inbox-chat-panel .message-stream {
    border: 1px solid rgba(148, 163, 184, 0.12);
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.inbox-details-drawer {
    width: min(380px, 100vw);
}

.js-conversation-item {
    display: block;
    width: 100%;
    appearance: none;
    border-width: 1px;
    background: transparent;
    overflow: hidden;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.conversation-item-shell,
.conversation-item-main,
.conversation-name-row {
    min-width: 0;
}

.conversation-preview {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    white-space: normal;
    word-break: break-word;
    line-height: 1.14;
    max-height: 2.4em;
}

.js-conversation-item.bg-primary-subtle {
    background: #ffffff !important;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.js-conversation-item:hover {
    background: #ffffff !important;
    border-color: rgba(59, 130, 246, 0.18) !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.message-stream {
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    gap: 0.22rem;
}

.message-stream.is-loading {
    opacity: 0.88;
}

.message-bubble {
    max-width: min(58%, 40rem);
    border-radius: 0.95rem;
    padding: 0.46rem 0.62rem 0.4rem;
    font-size: 0.875rem;
    line-height: 1.14;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.message-bubble.incoming {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.message-bubble.outgoing {
    background: linear-gradient(180deg, #2f80ff 0%, #1d6ef2 100%);
    color: #ffffff;
    margin-left: auto;
    border-bottom-right-radius: 0.45rem;
}

.message-bubble.outgoing .text-secondary {
    color: rgba(255, 255, 255, 0.72) !important;
}

.message-bubble.incoming {
    border-bottom-left-radius: 0.45rem;
}

.message-stream [data-message-direction="incoming"] + [data-message-direction="incoming"] .message-bubble {
    margin-top: -0.12rem;
    border-top-left-radius: 0.52rem;
}

.message-stream [data-message-direction="outgoing"] + [data-message-direction="outgoing"] .message-bubble {
    margin-top: -0.12rem;
    border-top-right-radius: 0.52rem;
}

.message-bubble-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    margin-bottom: 0.12rem;
    font-size: 0.66rem;
    line-height: 1;
    min-width: 0;
}

.message-meta,
.message-time {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-meta {
    font-weight: 600;
    flex: 1 1 auto;
}

.message-time {
    flex: 0 0 auto;
}

.message-body {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.15;
}

.message-media {
    display: grid;
    gap: 0.24rem;
}

.message-reaction-card {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    padding: 0.3rem 0.45rem;
    border-radius: 0.75rem;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.message-reaction-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    flex: 0 0 auto;
    font-size: 1.2rem;
    line-height: 1;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
}

.message-reaction-copy {
    display: grid;
    min-width: 0;
    gap: 0.12rem;
}

.message-media-preview {
    display: block;
    width: 100%;
    max-width: 220px;
    overflow: hidden;
    border-radius: 0.7rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.7);
}

.message-image-preview img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 210px;
    object-fit: cover;
}

.message-sticker-preview {
    width: 108px;
    height: 108px;
    max-width: 108px;
    max-height: 108px;
    padding: 0;
    background: rgba(255, 255, 255, 0.72);
}

.message-sticker-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.7rem;
}

.message-video-preview {
    display: block;
    width: 100%;
    max-width: 220px;
    max-height: 210px;
    border-radius: 0.7rem;
    background: #000;
}

.message-file-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.38rem 0.52rem;
    color: inherit;
    text-decoration: none;
}

.message-file-meta {
    display: grid;
    min-width: 0;
    gap: 0.1rem;
    flex: 1 1 auto;
}

.message-media-row {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
    font-size: 0.76rem;
    line-height: 1;
}

.message-media-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    font-size: 0.75rem;
    opacity: 0.9;
}

.message-media-label,
.message-media-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-media-label {
    font-weight: 600;
}

.message-file-card .message-media-name {
    display: block;
}

.message-caption {
    font-size: 0.82rem;
    opacity: 0.94;
}

.message-template-pill {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 0.14rem 0.42rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.message-bubble--reaction .message-template-pill {
    background: rgba(148, 163, 184, 0.16);
    color: #475569;
}

.message-status-row {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    align-self: flex-end;
    margin-top: 0.2rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.64rem;
    line-height: 1;
}

.message-bubble.incoming .message-status-row {
    color: #64748b;
}

.message-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0.95rem;
    height: 0.95rem;
    padding: 0 0.1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.58rem;
    font-weight: 800;
}

.message-bubble.incoming .message-status-icon {
    background: rgba(148, 163, 184, 0.12);
}

.message-status-sent,
.message-status-delivered {
    color: rgba(255, 255, 255, 0.92);
}

.message-status-read {
    color: #bfdbfe;
}

.message-status-pending {
    color: rgba(255, 255, 255, 0.72);
}

.message-status-failed {
    color: #fecaca;
}

.message-status-label {
    white-space: nowrap;
}

.message-reply-card {
    margin-bottom: 0.3rem;
    padding: 0.3rem 0.45rem;
    border-radius: 0.68rem;
    background: rgba(59, 130, 246, 0.08);
    border-left: 3px solid rgba(37, 99, 235, 0.36);
}

.message-reply-meta {
    font-size: 0.64rem;
    font-weight: 700;
    color: #1d4ed8;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.message-reply-body {
    font-size: 0.76rem;
    color: #334155;
    line-height: 1.16;
}

.sidebar-nav-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.sidebar-nav-icon {
    background: rgba(148, 163, 184, 0.12);
    color: currentColor;
}

.sidebar-live-badge {
    align-self: flex-start;
    border-radius: 999px;
    padding-inline: 0.6rem;
}

.sidebar-workspace-card {
    padding: 0.85rem 0.95rem;
    border-radius: 0.9rem;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.06), rgba(37, 99, 235, 0.025));
    border: 1px solid rgba(59, 130, 246, 0.12);
}

.sidebar-footer-title {
    font-size: 0.92rem;
}

.sidebar-footer-text {
    line-height: 1.35;
}

.sidebar-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
    flex: 0 0 10px;
}

.sidebar-toggle {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle-icon-expand {
    display: none;
}

.conversation-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 999px;
    font-size: 0.8rem;
}

.conversation-preview {
    max-width: 100%;
}

.conversation-name,
.conversation-preview,
.conversation-time {
    min-width: 0;
}

.conversation-meta {
    width: 84px;
    min-width: 84px;
    flex: 0 0 84px;
}

.inbox-list-shell {
    background: transparent;
}

.inbox-grid .col-xxl-3 .inbox-list-shell {
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.inbox-grid .col-xxl-9 .inbox-chat-panel {
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.inbox-grid > [class*="col-"] {
    display: flex;
}

.inbox-grid .col-xxl-3 .inbox-list-shell,
.inbox-grid .col-xxl-9 .inbox-chat-panel {
    width: 100%;
}

@media (min-width: 1400px) {
    .inbox-grid .col-xxl-3 .inbox-list-shell,
    .inbox-grid .col-xxl-9 .inbox-chat-panel {
        height: clamp(640px, calc(100vh - 250px), 780px);
    }
}

@media (max-width: 1399.98px) {
    .inbox-grid .col-xxl-3 .inbox-list-shell,
    .inbox-grid .col-xxl-9 .inbox-chat-panel {
        height: clamp(580px, calc(100vh - 220px), 740px);
    }
}

@media (max-width: 767.98px) {
    .inbox-grid .col-xxl-3 .inbox-list-shell,
    .inbox-grid .col-xxl-9 .inbox-chat-panel {
        height: auto;
        min-height: 520px;
    }
}

.message-stream #messageHistoryTopSentinel + .d-flex .message-bubble.incoming {
    border-radius: 0.85rem;
}

.inbox-chat-panel .border-bottom {
    border-color: rgba(148, 163, 184, 0.12) !important;
}

.inbox-chat-header-sticky {
    position: sticky;
    top: 0;
    z-index: 3;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    backdrop-filter: blur(12px);
}

.conversation-list-icon,
.conversation-header-icon,
.conversation-composer-icon {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.conversation-header-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    font-size: 0.8rem;
}

.message-date-divider {
    display: flex;
    justify-content: center;
    margin-bottom: 0.25rem;
}

.message-date-divider-sticky {
    position: sticky;
    top: 0.5rem;
    z-index: 2;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(248, 250, 252, 0.78));
    backdrop-filter: blur(8px);
}

.message-date-divider span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.88);
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    padding: 0.3rem 0.8rem;
    font-size: 0.72rem;
}

.inbox-chat-panel .message-stream {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.inbox-composer-quick-actions .btn {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.92);
}

.inbox-composer-quick-actions .btn:hover {
    border-color: rgba(37, 99, 235, 0.22);
    background: rgba(37, 99, 235, 0.06);
}

.inbox-composer-shell {
    position: sticky;
    bottom: 0;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.conversation-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #cbd5e1;
    flex: 0 0 6px;
}

.conversation-status-dot.is-unread {
    background: #ef4444;
}

.conversation-unread-pill {
    min-width: 1.35rem;
    justify-content: center;
}

.conversation-tags {
    min-width: 0;
    overflow: hidden;
    max-height: 1.55rem;
}

.conversation-tags .badge {
    max-width: 100%;
}

.contact-panel-hero {
    background:
        radial-gradient(circle at top, rgba(37, 99, 235, 0.05), transparent 34%),
        linear-gradient(180deg, rgba(37, 99, 235, 0.03), rgba(255, 255, 255, 0.96));
}

.contact-panel-avatar {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    font-size: 1rem;
}

.contact-panel-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.contact-metric {
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 0.9rem;
    padding: 0.65rem 0.75rem;
    background: rgba(255, 255, 255, 0.92);
}

.contact-metric .fw-semibold {
    font-size: 0.95rem;
}

.inbox-details-drawer .btn {
    white-space: nowrap;
}

.badge-sm {
    font-size: 0.68rem;
    line-height: 1;
    padding: 0.35em 0.5em;
}

.conversation-details-toggle {
    width: 30px;
    height: 30px;
    padding: 0;
}

.inbox-filters {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.inbox-filters .form-control,
.inbox-filters .form-select {
    border-color: rgba(148, 163, 184, 0.18);
    border-radius: 0.85rem;
}

.inbox-filters .form-control:focus,
.inbox-filters .form-select:focus {
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 0 0 0.18rem rgba(37, 99, 235, 0.06);
}

.inbox-filter-bar {
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
}

.inbox-filters-drawer {
    width: min(520px, 100vw);
}

.inbox-filters .offcanvas-body {
    overflow: hidden;
}

.inbox-filters .p-3.d-grid.gap-3.overflow-auto {
    max-height: calc(100vh - 198px);
}

.inbox-filter-section {
    padding: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.92);
}

.inbox-filter-section .section-title {
    margin-bottom: 0.6rem;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.inbox-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-color: rgba(59, 130, 246, 0.16);
}

.inbox-filter-chip:hover {
    border-color: rgba(59, 130, 246, 0.28);
    background: rgba(59, 130, 246, 0.06);
}

.inbox-filters .btn-check:checked + .btn {
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.08);
}

.inbox-contact-panel {
    border-radius: 1.2rem;
}

.inbox-contact-panel .contact-panel-hero {
    background: rgba(255, 255, 255, 0.92);
}

.inbox-contact-actions {
    display: grid !important;
    grid-template-columns: 1fr;
}

@media (min-width: 992px) {
    .inbox-contact-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.inbox-contact-note textarea {
    min-height: 92px;
    resize: vertical;
}

.inbox-contact-actions .btn,
.inbox-contact-note .btn,
.inbox-contact-tag .btn {
    border-radius: 0.8rem;
}

.inbox-contact-notes .border {
    border-color: rgba(148, 163, 184, 0.12) !important;
    background: rgba(255, 255, 255, 0.92);
}

html.sidebar-collapsed .sidebar {
    width: 96px;
}

html.sidebar-collapsed .sidebar-brand,
html.sidebar-collapsed .sidebar-brand-card,
html.sidebar-collapsed .sidebar-nav-label,
html.sidebar-collapsed .sidebar-section-title,
html.sidebar-collapsed .sidebar-workspace-label,
html.sidebar-collapsed .sidebar-workspace-value,
html.sidebar-collapsed .sidebar-footer-card,
html.sidebar-collapsed .sidebar-toggle-icon-collapse {
    display: none !important;
}

html.sidebar-collapsed .sidebar-toggle-icon-expand {
    display: inline;
}

html.sidebar-collapsed .sidebar .nav-link {
    justify-content: center;
}

html.sidebar-collapsed .sidebar .nav-link {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

html.sidebar-collapsed .sidebar-toggle {
    align-self: center;
    width: 100%;
}

html.sidebar-collapsed .sidebar-workspace {
    text-align: center;
}

html.sidebar-collapsed .sidebar-section {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.login-hero {
    color: #e2e8f0;
    background:
        linear-gradient(160deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.92)),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.22), transparent 36%);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.16);
}

.login-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(59, 130, 246, 0.06), transparent 40%),
        linear-gradient(300deg, rgba(255, 255, 255, 0.04), transparent 30%);
    pointer-events: none;
}

.login-hero > * {
    position: relative;
    z-index: 1;
}

.login-hero-mark {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: #0f172a;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.22);
}

.login-hero-points {
    max-width: 28rem;
}

.login-hero-point {
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.98));
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
}

.auth-card-header h2 {
    letter-spacing: -0.02em;
}

.auth-alert {
    background: #fff1f2;
    color: #9f1239;
}

.auth-control {
    padding-top: 0.88rem;
    padding-bottom: 0.88rem;
    border-radius: 0.9rem;
    border-color: #dbe4f0;
    box-shadow: none;
}

.auth-control:focus {
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.08);
}

.auth-meta-row {
    color: #475569;
}

.auth-link {
    color: #2563eb;
}

.auth-submit {
    border-radius: 0.95rem;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.14);
}

.auth-card-footer {
    color: #64748b;
}

.dashboard-page {
    width: 100%;
}

.dashboard-hero {
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
}

.dashboard-hero-copy {
    max-width: 52rem;
}

.dashboard-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    max-width: 28rem;
}

.dashboard-meta-item,
.dashboard-summary-card,
.dashboard-task-card,
.dashboard-conversation-item,
.dashboard-quick-action,
.dashboard-activity-item {
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 1rem;
    background: #fff;
}

.dashboard-meta-item {
    padding: 0.8rem 0.9rem;
}

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

.dashboard-summary-card {
    min-height: 8rem;
    padding: 1rem;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.dashboard-summary-value {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.dashboard-block {
    overflow: hidden;
}

.dashboard-task-card,
.dashboard-conversation-item,
.dashboard-quick-action {
    display: block;
    color: inherit;
    padding: 1rem;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-task-card:hover,
.dashboard-conversation-item:hover,
.dashboard-quick-action:hover {
    transform: translateY(-1px);
    border-color: rgba(59, 130, 246, 0.24);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.dashboard-task-count {
    min-width: 3rem;
    height: 3rem;
    padding: 0 0.75rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex: 0 0 auto;
}

.dashboard-quick-actions .badge {
    align-self: flex-start;
}

.dashboard-activity-item {
    padding: 0.9rem 1rem;
    background: linear-gradient(180deg, #fff, #fcfdff);
}

@media (max-width: 1199.98px) {
    .dashboard-summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .dashboard-summary-grid,
    .dashboard-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .dashboard-summary-grid,
    .dashboard-meta-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-summary-card {
        min-height: auto;
    }
}
