:root {
    --bg: #0f172a;
    --surface: rgba(255, 255, 255, 0.9);
    --accent: #3b82f6;
    --accent-strong: #2563eb;
    --text: #0b1021;
    --muted: #5c6380;
    --border: rgba(15, 23, 42, 0.08);
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; }

html {
    overflow-x: hidden;
}

body {
    font-family: "Manrope", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: clip;
}

body.guest-shell {
    display: flex;
    flex-direction: column;
}

body.app-shell {
    display: flex;
    flex-direction: column;
}

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
}

.hero-bg {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.15), transparent 35%),
                radial-gradient(circle at 80% 0%, rgba(14, 165, 233, 0.12), transparent 30%),
                linear-gradient(135deg, #0f172a 0%, #111827 60%, #0b1021 100%);
    z-index: -1;
}

.glass-nav {
    backdrop-filter: blur(14px);
    background: rgba(15, 23, 42, 0.78);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
}

.glass-nav .container {
    gap: 0.85rem;
}

.glass-nav .navbar-collapse {
    min-width: 0;
    gap: 0.85rem;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: #fff !important;
    letter-spacing: 0.04em;
}

.navbar-brand-logo {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
    border-radius: 0.6rem;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
    flex-shrink: 0;
}

.glass-nav .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.18);
    border-radius: 0.8rem;
    padding: 0.45rem 0.6rem;
}

.glass-nav .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.28);
}

.glass-nav .navbar-toggler-icon {
    filter: invert(1) grayscale(1) brightness(1.8);
}

.app-nav-primary,
.app-nav-account {
    gap: 0.25rem;
}

.app-nav-primary {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    min-width: 0;
}

.app-nav-account {
    flex: 0 0 auto;
}

.glass-nav .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    min-width: 0;
    border-radius: 999px;
    padding: 0.46rem 0.68rem !important;
    color: rgba(255, 255, 255, 0.72) !important;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.glass-nav button.nav-link {
    border: 0;
    background: transparent;
}

.glass-nav .nav-link .bi {
    flex: 0 0 auto;
    font-size: 0.9rem;
    opacity: 0.82;
}

.glass-nav .nav-link:hover,
.glass-nav .nav-link:focus {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08);
}

.glass-nav .nav-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.app-nav-user-link {
    max-width: 12rem;
}

.app-nav-user-link span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-nav-more .dropdown-toggle::after {
    margin-left: 0.05rem;
}

.app-nav-more[hidden] {
    display: none !important;
}

.app-nav-more-menu {
    min-width: 14rem;
    padding: 0.45rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.2);
}

.app-nav-more-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.62rem;
    border-radius: 10px;
    padding: 0.58rem 0.68rem;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 700;
}

.app-nav-more-menu .dropdown-item .bi {
    width: 1rem;
    color: var(--muted);
    text-align: center;
}

.app-nav-more-menu .dropdown-item:hover,
.app-nav-more-menu .dropdown-item:focus,
.app-nav-more-menu .dropdown-item.active {
    color: var(--accent-strong);
    background: rgba(59, 130, 246, 0.1);
}

.app-nav-more-menu .dropdown-item.active .bi,
.app-nav-more-menu .dropdown-item:hover .bi,
.app-nav-more-menu .dropdown-item:focus .bi {
    color: var(--accent-strong);
}

.app-nav-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    border-radius: 999px;
    padding: 0.45rem 0.68rem;
    font-weight: 700;
    line-height: 1;
}

.page-shell {
    background: var(--surface);
    border-radius: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: clamp(1rem, 2vw, 1.5rem);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.app-main {
    flex: 1 0 auto;
    width: 100%;
}

.guest-main {
    flex: 1;
    width: min(100%, 34rem);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.guest-card {
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.guest-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.guest-brand-logo {
    border-radius: 1rem;
    background: rgba(59, 130, 246, 0.08);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    padding: 0.45rem;
}

.guest-brand-kicker {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.guest-brand-title {
    margin: 0.15rem 0 0;
    font-size: clamp(1.9rem, 5vw, 2.4rem);
    font-weight: 800;
    line-height: 1.05;
}

.site-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding: 1.1rem 0 1.35rem;
    color: rgba(255, 255, 255, 0.78);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(8px);
}

.app-shell .site-footer {
    margin-top: 1rem;
}

.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.site-footer-logo {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
    border-radius: 0.65rem;
    padding: 0.18rem;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.site-footer-title {
    color: #fff;
    font-weight: 800;
    line-height: 1.15;
}

.site-footer-subtitle,
.site-footer-meta {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.88rem;
}

.site-footer-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.site-footer-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.site-footer-nav a {
    color: rgba(255, 255, 255, 0.74);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 0.42rem 0.65rem;
    border-radius: 8px;
    transition: background 0.18s ease, color 0.18s ease;
}

.site-footer-nav a:hover,
.site-footer-nav a:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.assistant-widget {
    --assistant-keyboard-offset: 0px;
    position: fixed;
    right: clamp(0.9rem, 2vw, 1.4rem);
    bottom: calc(clamp(0.9rem, 2vw, 1.4rem) + env(safe-area-inset-bottom));
    z-index: 1080;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    pointer-events: none;
}

.assistant-widget > * {
    pointer-events: auto;
}

.assistant-panel {
    width: min(24rem, calc(100vw - 2rem));
    max-height: min(34rem, calc(100vh - 8rem));
    max-height: min(34rem, calc(100dvh - 8rem));
    display: grid;
    grid-template-rows: auto minmax(8rem, 1fr) auto auto;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.24);
}

.assistant-panel[hidden] {
    display: none;
}

.assistant-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.12), rgba(245, 158, 11, 0.14));
}

.assistant-identity {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex: 1 1 auto;
    min-width: 0;
}

.assistant-identity > div {
    min-width: 0;
}

.assistant-panel-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
}

.assistant-avatar {
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 auto;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
}

.assistant-title {
    color: #111827;
    font-weight: 800;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assistant-subtitle {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assistant-icon-btn {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 8px;
    color: #334155;
    background: rgba(255, 255, 255, 0.7);
    touch-action: manipulation;
}

.assistant-icon-btn:hover,
.assistant-icon-btn:focus {
    color: var(--text);
    background: #fff;
}

.assistant-messages {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 0.9rem;
    background: #f8fafc;
}

.assistant-message {
    display: flex;
    margin-bottom: 0.65rem;
}

.assistant-message:last-child {
    margin-bottom: 0;
}

.assistant-message-user {
    justify-content: flex-end;
}

.assistant-message-bot {
    justify-content: flex-start;
}

.assistant-message-bubble {
    max-width: min(19rem, 88%);
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.assistant-message-bot .assistant-message-bubble {
    color: #111827;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.assistant-message-user .assistant-message-bubble {
    color: #fff;
    background: #2563eb;
}

.assistant-reply-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    color: #334155;
}

.assistant-reply-dot {
    width: 0.34rem;
    height: 0.34rem;
    border-radius: 999px;
    background: #16a34a;
    opacity: 0.32;
    animation: assistant-reply-pulse 1s ease-in-out infinite;
}

.assistant-reply-dot:nth-child(3) {
    animation-delay: 0.16s;
}

.assistant-reply-dot:nth-child(4) {
    animation-delay: 0.32s;
}

@keyframes assistant-reply-pulse {
    0%,
    80%,
    100% {
        opacity: 0.32;
        transform: translateY(0);
    }

    40% {
        opacity: 1;
        transform: translateY(-0.12rem);
    }
}

.assistant-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.55rem;
}

.assistant-links a {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 0.28rem 0.45rem;
    border-radius: 7px;
    color: #14532d;
    background: rgba(34, 197, 94, 0.12);
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.assistant-links a:hover,
.assistant-links a:focus {
    color: #052e16;
    background: rgba(34, 197, 94, 0.2);
}

.assistant-suggestions {
    display: flex;
    gap: 0.4rem;
    padding: 0.75rem 0.9rem 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    background: #fff;
}

.assistant-suggestions button {
    flex: 0 0 auto;
    max-width: 13rem;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 8px;
    padding: 0.38rem 0.55rem;
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.08);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
    white-space: normal;
    touch-action: manipulation;
}

.assistant-suggestions button:hover,
.assistant-suggestions button:focus {
    color: #1e3a8a;
    border-color: rgba(37, 99, 235, 0.32);
    background: rgba(37, 99, 235, 0.14);
}

.assistant-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    padding: 0.75rem 0.9rem 0.9rem;
    background: #fff;
}

.assistant-input {
    min-width: 0;
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.46);
    border-radius: 8px;
    padding: 0.62rem 0.7rem;
    color: var(--text);
    background: #fff;
    font-size: 0.9rem;
}

.assistant-input:focus {
    border-color: rgba(37, 99, 235, 0.7);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.16);
}

.assistant-send-btn,
.assistant-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
}

.assistant-send-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    color: #fff;
    background: #16a34a;
    touch-action: manipulation;
}

.assistant-send-btn:hover,
.assistant-send-btn:focus {
    background: #15803d;
}

.assistant-form.is-busy .assistant-send-btn {
    opacity: 0.72;
}

.assistant-toggle {
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 50%;
    padding: 0;
    background: #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.28);
    transition: transform 160ms ease, box-shadow 160ms ease;
    touch-action: manipulation;
}

.assistant-toggle:hover,
.assistant-toggle:focus {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.34);
}

.assistant-toggle-img {
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 50%;
    object-fit: cover;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.page-header > * {
    min-width: 0;
    max-width: 100%;
}

.page-header h1,
.page-header p {
    overflow-wrap: anywhere;
}

.badge-soft {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-strong);
    border-radius: 999px;
    padding: 4px 10px;
    font-weight: 600;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.card-grid .wide {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .card-grid .wide {
        grid-column: span 1;
    }
}

.surface {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    overflow: visible;
    overflow-wrap: anywhere;
}

.changelog-listing {
    display: grid;
    gap: 1rem;
}

.changelog-release {
    display: grid;
    gap: 1rem;
}

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

.changelog-release-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
}

.changelog-groups {
    display: grid;
    gap: 1rem;
}

.changelog-group {
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.changelog-group:first-child {
    padding-top: 0;
    border-top: 0;
}

.changelog-group-title {
    margin-bottom: 0.75rem;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.changelog-items {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding-left: 1.15rem;
}

.changelog-items li {
    padding-left: 0.15rem;
}

.table thead th {
    color: var(--muted);
    font-weight: 700;
    border-bottom: 1px solid var(--border);
}

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

.table th,
.table td {
    overflow-wrap: anywhere;
}

.table-responsive {
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
}

.table-responsive .table {
    margin-bottom: 0;
    min-width: 32rem;
}

form .form-control, form .form-select, form textarea {
    border-radius: 10px;
    width: 100%;
    max-width: 100%;
}

form .btn-primary {
    background: var(--accent);
    border: none;
}

form p {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

form label {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

form .helptext {
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.form-check-input {
    flex: 0 0 auto;
    float: none;
    margin: 0;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding-left: 0;
}

.form-check .form-check-label {
    margin-bottom: 0;
}

form ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

form ul li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.checkbox-list {
    display: grid;
    gap: 10px;
    max-height: 220px;
    overflow: auto;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
}

.checkbox-list > div {
    margin: 0;
}

.checkbox-list label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.checkbox-list label:hover {
    border-color: rgba(59, 130, 246, 0.32);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

.checkbox-list input[type="checkbox"] {
    margin: 0.15rem 0 0;
    flex-shrink: 0;
}

.task-form-context-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.task-form-context-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.8rem 0.95rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(248, 250, 252, 0.9);
    font-weight: 600;
}

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

.document-context-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.document-context-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 0.95rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(248, 250, 252, 0.9);
    font-weight: 600;
}

.document-context-chip a {
    color: var(--text);
    text-decoration: none;
}

.document-context-chip a:hover {
    color: var(--accent-strong);
}

.document-type-panel {
    display: grid;
    gap: 0.5rem;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.14);
    background: linear-gradient(160deg, rgba(239, 246, 255, 0.92), rgba(248, 250, 252, 0.98));
}

.document-type-meta-hint {
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    border: 1px dashed rgba(59, 130, 246, 0.24);
    background: rgba(255, 255, 255, 0.7);
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.document-metadata-grid {
    display: grid;
    gap: 1rem;
}

.document-metadata-grid > [hidden] {
    display: none !important;
}

.document-current-file {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    border: 1px dashed rgba(148, 163, 184, 0.32);
    background: rgba(248, 250, 252, 0.8);
}

.document-current-file-label {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.2rem;
}

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

.document-form-check {
    align-items: flex-start;
    gap: 0.75rem;
}

.document-form-check .form-check-input {
    margin-top: 0.25rem;
}

.document-form-check .form-check-label {
    margin-bottom: 0;
}

.document-boolean-card {
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(248, 250, 252, 0.82);
}

.checkbox-picker {
    display: grid;
    gap: 1rem;
}

.checkbox-picker-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.checkbox-picker-body {
    display: grid;
    gap: 1rem;
}

.checkbox-picker.is-collapsed {
    gap: 0.85rem;
}

.phone-editor {
    display: grid;
    gap: 0.9rem;
}

.phone-editor-list {
    display: grid;
    gap: 0.75rem;
}

.phone-editor-row {
    display: grid;
    grid-template-columns: minmax(11rem, 13rem) minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: start;
    padding: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.72);
}

.phone-editor-type,
.phone-editor-number {
    min-width: 0;
}

.checkbox-picker-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.checkbox-picker-search {
    flex: 1 1 18rem;
}

.checkbox-picker-search .input-group-text {
    background: rgba(248, 250, 252, 0.96);
}

.checkbox-picker-selection {
    display: grid;
    gap: 0.6rem;
    padding: 0.9rem 1rem;
    border: 1px dashed rgba(59, 130, 246, 0.26);
    border-radius: 14px;
    background: rgba(239, 246, 255, 0.6);
}

.checkbox-picker-selection-label {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.checkbox-picker-selection-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.checkbox-picker-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(59, 130, 246, 0.18);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
}

.checkbox-picker .checkbox-list {
    max-height: 18rem;
}

.checkbox-picker .checkbox-list > div[hidden] {
    display: none !important;
}

.checkbox-picker .checkbox-list > div.is-selected label {
    border-color: rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.9), rgba(248, 250, 252, 0.98));
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.08);
}

.checkbox-picker-empty {
    padding: 0.85rem 1rem;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.72);
}

.requirement-group-list {
    display: grid;
    gap: 1rem;
}

.requirement-group {
    display: grid;
    gap: 0.75rem;
}

.requirement-group-title {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.requirement-option-list {
    display: grid;
    gap: 0.75rem;
}

.requirement-option-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.9));
}

.requirement-option-main {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin: 0;
    flex: 1;
    cursor: pointer;
}

.requirement-option-name {
    display: block;
    font-weight: 700;
    color: var(--text);
}

.requirement-option-description {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.88rem;
    color: var(--muted);
}

.requirement-option-quantity {
    width: 8rem;
    flex-shrink: 0;
}

.requirement-quantity-input {
    text-align: center;
}

.requirement-editor {
    display: grid;
    gap: 1rem;
}

.requirement-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.requirement-editor-search {
    flex: 1 1 18rem;
}

.requirement-editor-search .input-group-text {
    background: rgba(248, 250, 252, 0.96);
}

.requirement-editor-selection {
    display: grid;
    gap: 0.6rem;
    padding: 0.9rem 1rem;
    border: 1px dashed rgba(59, 130, 246, 0.26);
    border-radius: 14px;
    background: rgba(239, 246, 255, 0.6);
}

.requirement-editor-selection-label {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.requirement-editor-selection-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.requirement-selection-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(59, 130, 246, 0.18);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
}

.requirement-selection-pill small {
    color: var(--muted);
    font-weight: 700;
}

.requirement-editor .requirement-group-list {
    gap: 0.9rem;
}

.requirement-editor .requirement-group {
    display: block;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.94));
    overflow: hidden;
}

.requirement-editor .requirement-group-summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem 1rem;
    cursor: pointer;
    user-select: none;
}

.requirement-editor .requirement-group-summary::-webkit-details-marker {
    display: none;
}

.requirement-editor .requirement-group-summary:hover {
    background: rgba(248, 250, 252, 0.82);
}

.requirement-group-meta {
    margin-top: 0.2rem;
    font-size: 0.88rem;
    color: var(--muted);
}

.requirement-group-chevron {
    color: var(--muted);
    transition: transform 0.18s ease;
}

.requirement-editor .requirement-group[open] .requirement-group-chevron {
    transform: rotate(180deg);
}

.requirement-editor .requirement-option-list {
    padding: 0 1rem 1rem;
}

.requirement-editor .requirement-option-card {
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}

.requirement-editor .requirement-option-card:hover {
    border-color: rgba(59, 130, 246, 0.28);
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.07);
    transform: translateY(-1px);
}

.requirement-editor .requirement-option-card.is-selected {
    border-color: rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.9), rgba(248, 250, 252, 0.98));
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.08);
}

.requirement-option-check {
    display: inline-flex;
    padding-top: 0.1rem;
}

.requirement-editor .requirement-option-main {
    min-width: 0;
}

.requirement-editor .requirement-option-quantity[hidden] {
    display: none !important;
}

.requirement-editor .requirement-option-quantity .form-control:disabled {
    background: rgba(226, 232, 240, 0.45);
    cursor: not-allowed;
}

.icon-picker {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.icon-picker > label {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0;
}

.icon-picker-preview {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.9));
}

.icon-picker-preview-badge {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(59, 130, 246, 0.16);
    background: #fff;
    color: var(--accent-strong);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    flex-shrink: 0;
}

.icon-picker-preview-badge .bi {
    font-size: 1.25rem;
}

.icon-picker-preview-label {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.icon-picker-preview-value {
    font-weight: 700;
}

.icon-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    max-height: 360px;
    overflow: auto;
    padding: 0.1rem;
}

.icon-picker-option {
    appearance: none;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: #fff;
    display: grid;
    gap: 0.32rem;
    justify-items: start;
    text-align: left;
    padding: 0.85rem 0.9rem;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background-color 0.16s ease;
}

.icon-picker-option:hover,
.icon-picker-option:focus {
    border-color: rgba(59, 130, 246, 0.34);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.icon-picker-option.is-selected {
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.08);
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.12);
}

.icon-picker-option .bi {
    font-size: 1.1rem;
    color: var(--accent-strong);
}

.icon-picker-option span {
    font-weight: 700;
    color: var(--text);
}

.icon-picker-option small {
    color: var(--muted);
    word-break: break-word;
}

.icon-picker .form-control[data-icon-input] {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.read-more {
    max-width: 100%;
}

.read-more-content {
    position: relative;
    overflow: hidden;
    transition: max-height 0.2s ease;
}

.read-more-content.is-collapsed {
    max-height: 10.5rem;
}

.read-more-content.is-collapsed::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 78%);
    pointer-events: none;
}

.read-more-content > :last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .document-current-file,
    .document-section-head {
        align-items: stretch;
    }

    .phone-editor-row {
        grid-template-columns: 1fr;
    }

    .checkbox-picker-toolbar,
    .requirement-editor-toolbar {
        align-items: stretch;
    }

    .checkbox-picker-search,
    .requirement-editor-search {
        flex-basis: 100%;
    }

    .requirement-option-card {
        flex-direction: column;
    }

    .requirement-option-quantity {
        width: 100%;
    }

    .icon-picker-preview {
        align-items: flex-start;
    }

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

.doc-preview {
    width: 100%;
    min-height: 420px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.document-preview-surface {
    padding: clamp(0.75rem, 1.6vw, 1rem);
}

.document-preview-frame {
    display: block;
    height: clamp(620px, 78vh, 980px);
    min-height: 0;
    background: #f8fafc;
}

.doc-preview-image {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: block;
}

.event-gallery-preview {
    position: relative;
}

.event-gallery-carousel .carousel-item {
    background: #f8fafc;
}

.event-gallery-carousel,
.event-gallery-static-image {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}

.event-gallery-carousel::after,
.event-gallery-static-image::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 46%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.34));
    pointer-events: none;
    z-index: 1;
}

.event-gallery-carousel img,
.event-gallery-static-image img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #f8fafc;
}

.event-gallery-controls {
    position: absolute;
    right: 0.85rem;
    bottom: 0.85rem;
    left: 0.85rem;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    pointer-events: none;
}

.event-gallery-controls.has-navigation {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem;
    justify-content: stretch;
}

.event-gallery-controls > * {
    pointer-events: auto;
}

.event-gallery-open-link,
.event-gallery-control {
    min-height: 2.5rem;
    color: #0f172a;
    border-color: rgba(255, 255, 255, 0.74);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.event-gallery-open-link {
    display: inline-flex;
    align-items: center;
    justify-self: center;
    gap: 0.45rem;
    max-width: 100%;
    min-height: 2.15rem;
    padding: 0.34rem 0.7rem;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.88);
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(15, 23, 42, 0.36);
    box-shadow: none;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.event-gallery-controls .carousel-control-prev,
.event-gallery-controls .carousel-control-next {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 999px;
    opacity: 1;
}

.event-gallery-control .bi {
    font-size: 1rem;
    line-height: 1;
}

.event-gallery-open-link:hover,
.event-gallery-open-link:focus {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(15, 23, 42, 0.5);
    box-shadow: none;
    transform: none;
}

.event-gallery-control:hover,
.event-gallery-control:focus {
    color: var(--accent-strong);
    border-color: rgba(255, 255, 255, 0.92);
    background: #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.24);
    transform: translateY(-1px);
}

.event-gallery-open-link:focus-visible,
.event-gallery-control:focus-visible,
.event-gallery-indicators [data-bs-target]:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.38);
    outline-offset: 2px;
}

.event-gallery-indicators {
    position: absolute;
    right: 1rem;
    bottom: 3.95rem;
    left: 1rem;
    z-index: 3;
    gap: 0.35rem;
    margin: 0;
    pointer-events: auto;
}

.event-gallery-indicators [data-bs-target] {
    width: 0.45rem;
    height: 0.45rem;
    margin: 0;
    border: 0;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.78);
    opacity: 1;
    transition: background-color 140ms ease, transform 140ms ease, width 140ms ease;
}

.event-gallery-indicators .active {
    width: 1.1rem;
    background-color: #fff;
    transform: none;
}

.min-w-0 {
    min-width: 0;
}

.gallery-list-head,
.gallery-media-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.gallery-card-grid,
.gallery-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-card,
.gallery-media-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.gallery-card:hover,
.gallery-card:focus-within,
.gallery-media-card:hover,
.gallery-media-card:focus-within {
    border-color: rgba(59, 130, 246, 0.24);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.1);
    transform: translateY(-1px);
}

.gallery-card-preview,
.gallery-media-preview {
    display: block;
    position: relative;
    overflow: hidden;
    background: #f8fafc;
}

.gallery-card-preview img,
.gallery-media-preview img,
.gallery-media-preview video,
.gallery-detail-preview img,
.gallery-current-media img,
.gallery-current-media video {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #f8fafc;
}

.gallery-card-placeholder {
    display: grid;
    gap: 0.45rem;
    min-height: 190px;
    place-items: center;
    color: #64748b;
    font-weight: 700;
    text-align: center;
}

.gallery-card-placeholder .bi,
.gallery-detail-placeholder .bi,
.gallery-upload-placeholder .bi,
.gallery-empty-icon .bi {
    font-size: 2.1rem;
}

.gallery-card-event-chip,
.gallery-media-type,
.gallery-media-thumbnail-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(15, 23, 42, 0.58);
    color: #fff;
    backdrop-filter: blur(10px);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.gallery-card-event-chip {
    right: 0.7rem;
    bottom: 0.7rem;
    padding: 0.42rem 0.58rem;
}

.gallery-media-type {
    top: 0.65rem;
    left: 0.65rem;
    padding: 0.42rem 0.58rem;
}

.gallery-media-thumbnail-badge {
    right: 0.65rem;
    bottom: 0.65rem;
    padding: 0.44rem 0.62rem;
    background: rgba(37, 99, 235, 0.82);
}

.gallery-card-body,
.gallery-media-body {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
}

.gallery-card-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
}

.gallery-card-title a {
    color: var(--text);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.gallery-card-title a:hover,
.gallery-card-title a:focus {
    text-decoration: underline;
}

.gallery-card-context {
    color: #64748b;
    font-size: 0.84rem;
    overflow-wrap: anywhere;
}

.gallery-card-context a {
    color: inherit;
}

.gallery-card-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.55rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 800;
}

.gallery-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: #64748b;
    font-size: 0.875rem;
}

.gallery-card-stats span,
.gallery-summary-stats span,
.gallery-media-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.gallery-card-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.1rem;
}

.gallery-detail-summary {
    display: grid;
    grid-template-columns: minmax(14rem, 22rem) minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.gallery-detail-preview,
.gallery-current-media,
.gallery-upload-placeholder {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: #f8fafc;
}

.gallery-detail-placeholder,
.gallery-upload-placeholder {
    display: grid;
    min-height: 100%;
    aspect-ratio: 4 / 3;
    place-items: center;
    gap: 0.45rem;
    color: #64748b;
    font-weight: 800;
    text-align: center;
}

.gallery-detail-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
}

.gallery-description {
    color: #334155;
    overflow-wrap: anywhere;
}

.gallery-description > :last-child {
    margin-bottom: 0;
}

.gallery-summary-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.gallery-summary-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    color: #64748b;
    font-size: 0.88rem;
}

.gallery-media-title {
    font-weight: 800;
    overflow-wrap: anywhere;
}

.gallery-media-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    color: #64748b;
    font-size: 0.82rem;
}

.gallery-media-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.gallery-empty-state {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: clamp(1rem, 2vw, 1.25rem);
    border: 1px dashed rgba(148, 163, 184, 0.4);
    border-radius: 8px;
    background: #f8fafc;
}

.gallery-empty-state h2 {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 800;
}

.gallery-empty-state p {
    margin: 0;
    color: #64748b;
}

.gallery-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-strong);
}

.gallery-form-surface,
.gallery-item-form-surface {
    display: grid;
    gap: 1.1rem;
}

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

.gallery-form-field {
    min-width: 0;
    margin-bottom: 0;
}

.gallery-form-field--wide {
    grid-column: 1 / -1;
}

.gallery-form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 0.25rem;
}

.gallery-item-form-layout {
    display: grid;
    grid-template-columns: minmax(14rem, 22rem) minmax(0, 1fr);
    gap: 1.1rem;
    align-items: start;
}

.gallery-form-fields {
    min-width: 0;
    display: grid;
    gap: 1.1rem;
}

.gallery-form-alert {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .document-preview-frame {
        height: clamp(480px, 72vh, 760px);
    }

    .event-gallery-controls {
        right: 0.5rem;
        bottom: 0.5rem;
        left: 0.5rem;
        gap: 0.5rem;
    }

    .event-gallery-controls.has-navigation {
        grid-template-columns: 2.35rem minmax(0, 1fr) 2.35rem;
    }

    .event-gallery-open-link,
    .event-gallery-control {
        min-height: 2.35rem;
    }

    .event-gallery-controls .carousel-control-prev,
    .event-gallery-controls .carousel-control-next {
        width: 2.35rem;
        min-width: 2.35rem;
        height: 2.35rem;
    }

    .event-gallery-open-link {
        min-height: 2.1rem;
        padding: 0.4rem 0.7rem;
    }

    .event-gallery-indicators {
        right: 0.75rem;
        bottom: 3.45rem;
        left: 0.75rem;
    }

    .gallery-list-head,
    .gallery-media-head,
    .gallery-summary-footer,
    .gallery-form-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .gallery-detail-summary,
    .gallery-item-form-layout,
    .gallery-empty-state {
        grid-template-columns: 1fr;
    }

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

    .gallery-empty-state .page-action-btn,
    .gallery-summary-footer .page-action-btn,
    .gallery-form-actions .btn {
        width: 100%;
    }
}

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

.contact-social-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.88));
    color: var(--text);
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.contact-social-item:hover,
.contact-social-item:focus {
    color: var(--text);
    transform: translateY(-1px);
    border-color: rgba(59, 130, 246, 0.28);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.contact-social-item.is-static {
    cursor: default;
}

.contact-social-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-strong);
    font-size: 1rem;
}

.contact-social-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
}

.contact-social-label {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contact-social-value {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.contact-social-arrow {
    color: var(--muted);
    flex-shrink: 0;
}

.craftworker-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.flatpickr-input {
    width: 100% !important;
    max-width: 100%;
}

.surface form {
    max-width: 840px;
}

.surface form.kanban-filter-form {
    max-width: none;
}

.list-group-item {
    border: 1px solid var(--border);
    border-radius: 10px !important;
    margin-bottom: 8px;
}

.pagination {
    flex-wrap: wrap;
    gap: 0.4rem;
}

.page-link {
    border-radius: 10px !important;
}

.view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.view-toggle .btn {
    border: none;
    min-width: 0;
    border-radius: 999px;
    font-weight: 700;
    color: var(--muted);
    background: transparent;
}

.view-toggle .btn:hover,
.view-toggle .btn:focus {
    color: var(--text);
    background: rgba(59, 130, 246, 0.08);
}

.view-toggle .btn.active {
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
}

.event-list-filters {
    padding: 0.9rem 1rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.88));
}

.event-list-filters-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.surface form.event-list-filter-form {
    max-width: none;
}

.event-list-filter-form {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)) auto;
    gap: 0.85rem;
    align-items: end;
}

.event-list-filter-field {
    min-width: 0;
}

.event-list-filter-field label {
    display: block;
    margin-bottom: 0.38rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
}

.event-list-filter-actions {
    display: flex;
    align-items: end;
    gap: 0.65rem;
    white-space: nowrap;
}

.event-list-filter-actions .btn {
    min-width: 0;
}

.event-calendar-surface {
    padding: 1rem;
}

.event-calendar-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.event-calendar-shell {
    overflow-x: auto;
    padding-bottom: 0.35rem;
}

.event-calendar-weekdays,
.event-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(9rem, 1fr));
    gap: 0.75rem;
    min-width: max(100%, calc(7 * 9rem + 4.5rem));
}

.event-calendar-weekdays {
    margin-bottom: 0.65rem;
}

.event-calendar-weekday {
    padding: 0.4rem 0.55rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.event-calendar-day {
    display: flex;
    flex-direction: column;
    min-height: 13rem;
    padding: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.event-calendar-day.is-outside-month {
    background: rgba(241, 245, 249, 0.72);
}

.event-calendar-day.is-today {
    border-color: rgba(59, 130, 246, 0.42);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.18);
}

.event-calendar-day-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.event-calendar-day-number {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
}

.event-calendar-day-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.55rem;
    height: 1.55rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
    font-size: 0.74rem;
    font-weight: 800;
}

.event-calendar-day-events {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.15rem;
}

.event-calendar-entry {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    padding: 0.58rem 0.64rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-left: 4px solid #64748b;
    background: #fff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
    color: var(--text);
    text-decoration: none;
}

.event-calendar-entry:hover,
.event-calendar-entry:focus {
    color: var(--text);
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.1);
}

.event-calendar-entry--draft {
    border-left-color: #64748b;
}

.event-calendar-entry--planned {
    border-left-color: #3b82f6;
}

.event-calendar-entry--confirmed {
    border-left-color: #22c55e;
}

.event-calendar-entry--done {
    border-left-color: #0f766e;
}

.event-calendar-entry--cancelled {
    border-left-color: #ef4444;
}

.event-calendar-entry-time {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.event-calendar-entry-title {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.35;
}

.event-calendar-entry-title span {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.event-calendar-empty {
    color: var(--muted);
    font-size: 0.78rem;
}

.kanban-toolbar-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.kanban-toolbar-hint {
    max-width: 28rem;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: right;
}

.kanban-filter-form {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)) auto;
    gap: 0.85rem;
    align-items: end;
}

.kanban-filter-field {
    min-width: 0;
}

.kanban-filter-field label {
    display: block;
    margin-bottom: 0.38rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
}

.kanban-filter-actions {
    display: flex;
    gap: 0.65rem;
    align-items: end;
    white-space: nowrap;
}

.kanban-board-shell {
    overflow-x: auto;
    padding-bottom: 0.35rem;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    gap: 1rem;
    align-items: stretch;
    min-width: max(100%, calc(3 * 280px + 2rem));
}

.kanban-column {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    padding: 0.95rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.94));
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
    height: clamp(28rem, calc(100vh - 17rem), 54rem);
}

.kanban-column--open {
    border-top: 4px solid #3b82f6;
}

.kanban-column--in_progress {
    border-top: 4px solid #f59e0b;
}

.kanban-column--done {
    border-top: 4px solid #22c55e;
}

.kanban-column-head {
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.kanban-column-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-width: 0;
    min-height: 0;
    padding-top: 0.9rem;
    padding-right: 0.3rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    border-radius: 14px;
    transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.kanban-column-body.is-drop-target {
    background: rgba(59, 130, 246, 0.06);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.16);
}

.kanban-empty {
    padding: 1rem;
    border: 1px dashed rgba(148, 163, 184, 0.36);
    border-radius: 14px;
    color: var(--muted);
    text-align: center;
    background: rgba(255, 255, 255, 0.72);
}

.kanban-card {
    padding: 0.95rem;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    cursor: grab;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.kanban-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.1);
}

.kanban-card.is-dragging {
    opacity: 0.52;
    transform: rotate(1.5deg);
}

.kanban-card.is-saving {
    opacity: 0.6;
    pointer-events: none;
}

.kanban-card.is-highlighted {
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2), 0 18px 34px rgba(15, 23, 42, 0.12);
}

.kanban-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.8rem;
}

.kanban-priority {
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.62rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.kanban-priority--critical {
    background: rgba(239, 68, 68, 0.14);
    color: #b91c1c;
}

.kanban-priority--high {
    background: rgba(245, 158, 11, 0.16);
    color: #b45309;
}

.kanban-priority--normal {
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
}

.kanban-priority--low {
    background: rgba(100, 116, 139, 0.14);
    color: #475569;
}

.kanban-card-head-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.kanban-substatus {
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.62rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.kanban-substatus--waiting {
    background: rgba(217, 119, 6, 0.14);
    color: #92400e;
}

.kanban-card-event {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.kanban-card-event:hover,
.kanban-card-event:focus {
    color: var(--accent-strong);
}

.kanban-card-event.is-muted {
    color: var(--muted);
}

.kanban-card-title a {
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.kanban-card-title a:hover,
.kanban-card-title a:focus {
    color: var(--accent-strong);
}

.kanban-card-description {
    margin: 0.75rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.kanban-checklist-preview {
    margin-top: 0.85rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.94);
}

.kanban-checklist-preview__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.65rem;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.kanban-checklist-preview__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.kanban-checklist-preview__item {
    display: grid;
    grid-template-columns: 1rem minmax(0, 1fr);
    align-items: start;
    gap: 0.55rem;
}

.kanban-checklist-preview__box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    margin-top: 0.12rem;
    border: 2px solid #64748b;
    border-radius: 0.28rem;
    background: #fff;
    color: #fff;
    font-size: 0.72rem;
    line-height: 1;
}

.kanban-checklist-preview__item.is-checked .kanban-checklist-preview__box {
    border-color: var(--accent-strong);
    background: var(--accent-strong);
}

.kanban-checklist-preview__label {
    color: var(--text);
    font-size: 0.84rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.kanban-checklist-preview__item.is-checked .kanban-checklist-preview__label {
    color: var(--muted);
    text-decoration: line-through;
}

.kanban-checklist-preview__more {
    margin-top: 0.55rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.task-rich-description p:last-child,
.task-checklist:last-child {
    margin-bottom: 0;
}

.task-checklist {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: grid;
    gap: 0.65rem;
}

.task-checklist__item {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.92);
}

.task-checklist__checkbox {
    margin-top: 0.15rem;
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid #64748b;
    border-radius: 0.35rem;
    background-color: #fff;
    accent-color: var(--accent-strong);
    opacity: 1;
}

.task-checklist__checkbox:disabled {
    opacity: 1;
    border-color: #64748b;
    background-color: #fff;
}

.task-checklist__checkbox:checked,
.task-checklist__checkbox:checked:disabled {
    border-color: var(--accent-strong);
    background-color: var(--accent-strong);
}

.task-checklist__label {
    line-height: 1.55;
    color: var(--text);
}

.task-checklist__item.is-checked .task-checklist__label {
    color: var(--muted);
    text-decoration: line-through;
}

.task-comments-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.task-comments-list {
    display: grid;
    gap: 0.9rem;
}

.task-comments-empty {
    padding: 1rem 1.1rem;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    color: var(--muted);
    background: rgba(248, 250, 252, 0.72);
}

.task-comment {
    padding: 1rem 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.88);
}

.task-comment__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.task-comment__meta-side {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.task-comment__author {
    font-weight: 700;
    color: var(--text);
}

.task-comment__timestamp {
    color: var(--muted);
    font-size: 0.84rem;
    white-space: nowrap;
}

.task-comment__body {
    color: var(--text);
    line-height: 1.65;
    white-space: pre-wrap;
}

.task-comment__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.task-comment-form {
    max-width: none;
}

.task-comment-form__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.kanban-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.8rem;
}

.kanban-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    padding: 0.34rem 0.58rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(248, 250, 252, 0.94);
    color: var(--muted);
    font-size: 0.78rem;
}

.kanban-chip.is-overdue {
    background: rgba(254, 242, 242, 0.96);
    border-color: rgba(239, 68, 68, 0.22);
    color: #b91c1c;
}

.kanban-chip.is-muted {
    color: #64748b;
}

.kanban-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 0.9rem;
    margin-top: 0.95rem;
}

.kanban-status-picker {
    display: grid;
    gap: 0.38rem;
    min-width: 0;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.kanban-status-picker .form-select {
    min-width: 0;
    font-size: 0.84rem;
}

.kanban-card-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.7rem;
}

.kanban-card-links a {
    color: var(--accent-strong);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.kanban-card-links a:hover,
.kanban-card-links a:focus {
    color: var(--text);
}

.activity-overview {
    overflow: hidden;
}

.activity-overview-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.activity-overview-controls {
    display: grid;
    gap: 0.4rem;
    min-width: min(100%, 11rem);
}

.activity-overview-controls label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
}

.activity-overview-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.1rem;
}

.activity-overview-stat {
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(248, 250, 252, 0.9);
}

.activity-overview-stat-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--muted);
    text-transform: uppercase;
}

.activity-calendar-shell {
    overflow-x: auto;
    padding-bottom: 0.35rem;
}

.activity-calendar {
    min-width: fit-content;
}

.activity-calendar-months {
    display: grid;
    grid-template-columns: repeat(var(--activity-weeks), 0.82rem);
    gap: 0.35rem;
    margin-bottom: 0.45rem;
    margin-left: 2.2rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.activity-calendar-month {
    white-space: nowrap;
}

.activity-calendar-body {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.activity-calendar-weekdays {
    display: grid;
    grid-template-rows: repeat(7, 0.82rem);
    gap: 0.35rem;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1;
    padding-top: 0.08rem;
}

.activity-calendar-weekday {
    height: 0.82rem;
}

.activity-calendar-weekday.is-placeholder {
    visibility: hidden;
}

.activity-calendar-grid {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(7, 0.82rem);
    grid-template-columns: repeat(var(--activity-weeks), 0.82rem);
    gap: 0.35rem;
}

.activity-cell {
    width: 0.82rem;
    height: 0.82rem;
    border-radius: 3px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: #e2e8f0;
}

.activity-cell--0 {
    background: #e2e8f0;
}

.activity-cell--1 {
    background: #bfdbfe;
}

.activity-cell--2 {
    background: #60a5fa;
}

.activity-cell--3 {
    background: #2563eb;
}

.activity-cell--4 {
    background: #1d4ed8;
}

.activity-cell.is-outside-year {
    opacity: 0.4;
}

.activity-calendar-legend {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.85rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.activity-filters {
    padding: 0.9rem 1rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.88));
}

.activity-filters-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.surface form.activity-filter-form {
    max-width: none;
}

.activity-filter-form {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)) auto;
    gap: 0.85rem;
    align-items: end;
}

.activity-filter-field {
    min-width: 0;
}

.activity-filter-field label {
    display: block;
    margin-bottom: 0.38rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
}

.activity-filter-actions {
    display: flex;
    align-items: end;
    gap: 0.65rem;
    white-space: nowrap;
}

.activity-filter-actions .btn {
    min-width: 0;
}

.event-task-list-item {
    align-items: flex-start;
}

.event-task-progress-label {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.event-task-summary {
    display: grid;
    gap: 0.55rem;
}

.event-task-summary-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.85rem;
}

.event-task-summary-stats {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.event-task-progress-meta {
    color: var(--muted);
    font-size: 0.92rem;
}

.event-task-progress-percent {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
    color: var(--accent-strong);
}

.event-task-progress-bar {
    height: 0.75rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    overflow: hidden;
}

.event-task-progress-bar-fill {
    background: linear-gradient(90deg, #2563eb, #22c55e);
}

.event-task-filters {
    padding: 0.9rem 1rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.88));
}

.event-task-filters-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.event-task-filters-label {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.surface form.event-task-filter-form {
    max-width: none;
}

.event-task-filter-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 0.85rem;
    align-items: end;
}

.event-task-filter-field {
    min-width: 0;
}

.event-task-filter-field label {
    display: block;
    margin-bottom: 0.38rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
}

.event-task-filter-field .form-select {
    min-width: 0;
}

.event-task-filter-actions {
    display: flex;
    align-items: end;
    gap: 0.65rem;
    white-space: nowrap;
    justify-content: flex-end;
}

.event-task-filter-actions .btn {
    min-width: 0;
}

.event-task-main {
    flex: 1 1 18rem;
    min-width: 0;
}

.event-task-main a,
.event-task-main small {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.event-task-list-item .badge {
    flex-shrink: 0;
    align-self: flex-start;
}

@media (max-width: 991.98px) {
    .glass-nav .navbar-collapse {
        padding-top: 0.85rem;
        gap: 0.75rem;
    }

    .glass-nav .app-nav-primary {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
        width: 100%;
    }

    .glass-nav .app-nav-account {
        align-items: stretch !important;
        gap: 0.45rem;
        width: 100%;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .glass-nav .nav-link,
    .app-nav-logout {
        width: 100%;
        justify-content: flex-start;
    }

    .app-nav-more-menu {
        width: 100%;
        margin-top: 0.3rem;
        box-shadow: none;
    }

    .app-nav-user-link {
        max-width: none;
    }

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

    .event-list-filter-field--wide,
    .event-list-filter-actions {
        grid-column: 1 / -1;
    }

    .event-calendar-head {
        flex-direction: column;
    }

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

    .kanban-column {
        height: auto;
    }

    .kanban-column-body {
        overflow-y: visible;
        min-height: 14rem;
        padding-right: 0;
    }

    .kanban-filter-field--wide,
    .kanban-filter-actions {
        grid-column: 1 / -1;
    }

    .kanban-toolbar-hint {
        max-width: none;
        text-align: left;
    }

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

    .event-task-filter-actions {
        grid-column: 1 / -1;
    }

    .activity-overview-stats {
        grid-template-columns: 1fr;
    }

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

    .activity-filter-field--wide,
    .activity-filter-actions {
        grid-column: 1 / -1;
    }

}

@media (max-width: 575.98px) {
    .app-main {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .page-shell {
        padding: 1rem;
        border-radius: 14px;
    }

    .surface {
        padding: 0.95rem;
        border-radius: 14px;
    }

    .guest-main {
        padding: 1.25rem 0.75rem;
    }

    .guest-card {
        padding: 1rem;
        border-radius: 18px;
    }

    .guest-brand {
        align-items: flex-start;
    }

    .glass-nav .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .site-footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-footer-nav {
        justify-content: flex-start;
    }

    .site-footer-nav a {
        padding-left: 0;
    }

    .navbar-brand {
        max-width: calc(100vw - 5.5rem);
        font-size: 0.95rem;
    }

    .navbar-brand span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .glass-nav .app-nav-primary {
        grid-template-columns: 1fr;
    }

    .page-header {
        align-items: flex-start;
    }

    .page-header > .d-flex,
    .page-header > .dropdown,
    .page-header > .action-menu,
    .page-header > .btn,
    .page-header > .page-action-btn {
        width: 100%;
    }

    .page-header > .d-flex {
        align-items: stretch !important;
    }

    .page-header > .d-flex > * {
        flex: 1 1 12rem;
        min-width: 0;
    }

    .page-header .page-action-btn,
    .page-header .action-menu .dropdown-toggle {
        width: 100%;
        min-width: 0;
    }

    .page-header .btn {
        justify-content: center;
        white-space: normal;
    }

    .view-toggle {
        width: 100%;
        justify-content: stretch;
    }

    .view-toggle .btn {
        flex: 1 1 0;
    }

    .event-list-filters-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .event-list-filter-form {
        grid-template-columns: 1fr;
    }

    .event-list-filter-field--wide,
    .event-list-filter-actions {
        grid-column: auto;
    }

    .event-list-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .kanban-toolbar-head {
        flex-direction: column;
    }

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

    .kanban-filter-field--wide,
    .kanban-filter-actions {
        grid-column: auto;
    }

    .kanban-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .kanban-card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .kanban-card-links {
        justify-content: flex-start;
    }

    .activity-overview-head {
        flex-direction: column;
    }

    .activity-overview-controls {
        width: 100%;
    }

    .activity-calendar-months {
        margin-left: 1.8rem;
    }

    .activity-filters-head {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .activity-filter-field--wide,
    .activity-filter-actions {
        grid-column: auto;
    }

    .activity-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .event-task-filters {
        padding: 0.85rem;
    }

    .event-task-filter-form {
        grid-template-columns: 1fr;
    }

    .event-task-summary-head,
    .event-task-summary-stats,
    .event-task-filters-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .event-task-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .table-responsive .table {
        min-width: 28rem;
    }

}

.action-menu .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 9.25rem;
    justify-content: space-between;
    border-radius: 999px;
    padding: 0.72rem 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.page-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 8rem;
    justify-content: center;
    border-radius: 999px;
    padding: 0.72rem 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    border: 1px solid rgba(15, 23, 42, 0.14);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.page-action-btn:hover,
.page-action-btn:focus,
.page-action-btn:active {
    color: #fff;
    background: linear-gradient(135deg, #111f39, #223454) !important;
    border-color: rgba(37, 99, 235, 0.35) !important;
    transform: translateY(-1px);
}

.page-action-btn .bi {
    font-size: 0.95rem;
    opacity: 0.9;
}

.communication-subnav {
    display: flex;
    gap: 0.5rem;
    margin: -0.35rem 0 1rem;
    padding-bottom: 0.3rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.communication-subnav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.35rem;
    padding: 0.48rem 0.78rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.74);
}

.communication-subnav-link:hover,
.communication-subnav-link:focus,
.communication-subnav-link.active {
    color: var(--text);
    background: #fff;
    border-color: rgba(15, 23, 42, 0.24);
}

.communication-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 0.85rem;
}

.communication-stat-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.communication-stat {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-height: 5.25rem;
}

.communication-stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    background: #f8fafc;
    border: 1px solid var(--border);
    flex: 0 0 auto;
}

.communication-stat-value {
    color: var(--text);
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.05;
}

.communication-stat-label,
.communication-summary-label {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.communication-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 1.55rem;
    padding: 0.22rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    background: #f8fafc;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
}

.communication-status .bi {
    font-size: 0.82rem;
}

.communication-status-sent,
.communication-status-active {
    color: #166534;
    background: #ecfdf5;
    border-color: rgba(22, 101, 52, 0.2);
}

.communication-status-failed {
    color: #991b1b;
    background: #fef2f2;
    border-color: rgba(153, 27, 27, 0.2);
}

.communication-status-partial,
.communication-status-skipped {
    color: #92400e;
    background: #fffbeb;
    border-color: rgba(146, 64, 14, 0.22);
}

.communication-status-test,
.communication-status-sending,
.communication-status-pending,
.communication-status-default {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: rgba(29, 78, 216, 0.2);
}

.communication-status-draft,
.communication-status-inactive,
.communication-status-neutral {
    color: var(--muted);
    background: #f8fafc;
    border-color: var(--border);
}

.communication-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.communication-workbench {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.communication-workbench > .communication-section-head {
    margin-bottom: 0;
}

.communication-count-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.9rem;
    padding: 0.28rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    background: #f8fafc;
    font-size: 0.8rem;
    font-weight: 800;
}

.communication-form textarea {
    min-height: 12rem;
}

.communication-side-panel {
    position: sticky;
    top: 1rem;
}

.communication-placeholder-group {
    border-top: 1px solid var(--border);
    padding: 0.75rem 0;
}

.communication-placeholder-group:first-of-type {
    border-top: 0;
}

.communication-placeholder-group summary {
    cursor: pointer;
    font-weight: 800;
}

.communication-placeholder-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.65rem;
}

.communication-placeholder-list code,
.communication-placeholder-token {
    padding: 0.28rem 0.45rem;
    border-radius: 0.45rem;
    color: var(--text);
    background: #f8fafc;
    border: 1px solid var(--border);
}

.communication-placeholder-token {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    cursor: pointer;
    font: inherit;
    line-height: 1.35;
    text-align: left;
}

.communication-placeholder-token:hover,
.communication-placeholder-token:focus-visible {
    background: #eff6ff;
    border-color: rgba(59, 130, 246, 0.42);
}

.communication-placeholder-token code {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
}

.communication-table {
    min-width: 46rem;
}

.communication-record-list {
    display: grid;
    gap: 0.75rem;
}

.communication-record-list-compact {
    gap: 0.55rem;
}

.communication-record {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.8rem;
    padding: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 0.75rem;
    background: #fff;
}

.communication-record-compact {
    padding: 0.75rem;
    border-radius: 0.65rem;
}

.communication-record-marker {
    width: 2.15rem;
    height: 2.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    color: var(--muted);
    background: #f8fafc;
}

.communication-record-marker-sent,
.communication-record-marker-active {
    color: #166534;
    background: #ecfdf5;
    border-color: rgba(22, 101, 52, 0.18);
}

.communication-record-marker-failed {
    color: #991b1b;
    background: #fef2f2;
    border-color: rgba(153, 27, 27, 0.18);
}

.communication-record-marker-partial,
.communication-record-marker-skipped {
    color: #92400e;
    background: #fffbeb;
    border-color: rgba(146, 64, 14, 0.2);
}

.communication-record-marker-test,
.communication-record-marker-sending,
.communication-record-marker-pending {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: rgba(29, 78, 216, 0.18);
}

.communication-record-body {
    min-width: 0;
    display: grid;
    gap: 0.55rem;
}

.communication-record-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
}

.communication-record-title-wrap {
    min-width: 0;
}

.communication-record-title {
    display: inline-block;
    max-width: 100%;
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.communication-record-title:hover,
.communication-record-title:focus {
    color: var(--accent-strong);
}

.communication-record-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    color: var(--muted);
    font-size: 0.86rem;
    overflow-wrap: anywhere;
}

.communication-record-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.communication-record-actions form {
    margin: 0;
}

.communication-record-meta {
    display: flex;
    align-items: center;
    gap: 0.45rem 0.75rem;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.84rem;
}

.communication-record-meta span,
.communication-record-meta a {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    max-width: 100%;
}

.communication-record-meta a {
    color: var(--muted);
    text-decoration: none;
}

.communication-record-meta a:hover,
.communication-record-meta a:focus {
    color: var(--accent-strong);
}

.communication-record-error {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(153, 27, 27, 0.18);
    border-radius: 0.55rem;
    color: #991b1b;
    background: #fef2f2;
    font-size: 0.84rem;
}

.communication-empty-state {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px dashed rgba(148, 163, 184, 0.55);
    border-radius: 0.75rem;
    color: var(--muted);
    background: #f8fafc;
}

.communication-empty-state > .bi {
    color: var(--accent-strong);
    font-size: 1.2rem;
}

.communication-pagination {
    padding-top: 0.25rem;
}

.communication-list .list-group-item,
.communication-table tbody tr {
    transition: background-color 0.15s ease;
}

.communication-list .list-group-item:hover,
.communication-table tbody tr:hover {
    background: #f8fafc;
}

.communication-empty {
    color: var(--muted);
    padding: 1rem;
}

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

.communication-summary-wide {
    grid-column: span 2;
}

.communication-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.communication-recipient-list {
    max-height: 32rem;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
}

.communication-test-box {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: #f8fafc;
}

.email-preview-body {
    max-height: 46rem;
    overflow: auto;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: #f8fafc;
}

.communication-security-note {
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--muted);
    background: #f8fafc;
}

@media (max-width: 991.98px) {
    .communication-side-panel {
        position: static;
    }

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

@media (max-width: 767.98px) {
    .communication-summary-grid,
    .communication-stat-grid,
    .communication-stat-grid-compact {
        grid-template-columns: 1fr;
    }

    .communication-summary-wide {
        grid-column: span 1;
    }

    .communication-record {
        grid-template-columns: 1fr;
    }

    .communication-record-marker {
        display: none;
    }

    .communication-record-head {
        flex-direction: column;
    }

    .communication-record-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

.action-menu .dropdown-toggle.btn-secondary {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    border-color: rgba(15, 23, 42, 0.14);
}

.action-menu .dropdown-toggle.btn-secondary:hover,
.action-menu .dropdown-toggle.btn-secondary:focus,
.action-menu .dropdown-toggle.btn-secondary:active {
    background: linear-gradient(135deg, #111f39, #223454) !important;
    border-color: rgba(37, 99, 235, 0.35) !important;
}

.action-menu .dropdown-toggle.btn-outline-light {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.action-menu .dropdown-toggle.btn-outline-light:hover,
.action-menu .dropdown-toggle.btn-outline-light:focus,
.action-menu .dropdown-toggle.btn-outline-light:active {
    background: rgba(255, 255, 255, 0.14) !important;
    border-color: rgba(255, 255, 255, 0.28) !important;
}

.action-menu.action-menu-compact .dropdown-toggle {
    min-width: auto;
    padding: 0.32rem 0.72rem;
    gap: 0.45rem;
    font-size: 0.76rem;
    box-shadow: none;
}

.action-menu.action-menu-compact .dropdown-menu {
    min-width: 13rem;
}

.action-menu.action-menu-compact .bi {
    font-size: 0.82rem;
}

.action-menu.section-action-menu .dropdown-toggle {
    min-width: auto;
    border-radius: 0.65rem;
    color: var(--muted);
    background: #f8fafc;
    border-color: var(--border);
    box-shadow: none;
    letter-spacing: 0;
}

.action-menu.section-action-menu .dropdown-toggle:hover,
.action-menu.section-action-menu .dropdown-toggle:focus,
.action-menu.section-action-menu .dropdown-toggle:active,
.action-menu.section-action-menu .dropdown-toggle.show {
    color: var(--text) !important;
    background: #fff !important;
    border-color: rgba(15, 23, 42, 0.24) !important;
    transform: none;
}

.action-menu.section-action-menu .bi {
    opacity: 0.74;
}

.event-action-menu .dropdown-menu {
    width: min(44rem, calc(100vw - 2rem));
    max-height: min(42rem, calc(100vh - 7rem));
    overflow-y: auto;
    padding: 0.7rem;
}

.event-action-menu .dropdown-menu.show {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.event-action-menu-group {
    display: grid;
    align-content: start;
    gap: 0.18rem;
    padding: 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    background: #f8fafc;
}

.event-action-menu-group-danger {
    grid-column: 1 / -1;
    background: #fff;
}

.event-action-menu-heading {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.25rem 0.35rem 0.45rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.event-action-menu-heading .bi {
    font-size: 0.8rem;
    opacity: 0.72;
}

.event-action-menu .dropdown-item {
    gap: 0.62rem;
    min-height: 2.35rem;
    padding: 0.55rem 0.62rem;
    border-radius: 10px;
    font-size: 0.88rem;
    line-height: 1.15;
}

.event-action-menu .dropdown-item:hover,
.event-action-menu .dropdown-item:focus {
    transform: none;
}

.event-action-menu .dropdown-item span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.event-action-menu .dropdown-item .bi {
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    .event-action-menu .dropdown-menu {
        width: calc(100vw - 2rem);
        max-height: calc(100vh - 6rem);
    }

    .event-action-menu .dropdown-menu.show {
        grid-template-columns: 1fr;
    }

    .event-action-menu-group-danger {
        grid-column: auto;
    }
}

.event-section-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    min-width: 2.15rem;
    padding: 0;
    border-radius: 999px;
    color: var(--muted);
    background: #fff;
    border-color: var(--border);
    box-shadow: none;
}

.event-section-toggle:hover,
.event-section-toggle:focus,
.event-section-toggle:active {
    color: var(--text) !important;
    background: #f8fafc !important;
    border-color: rgba(15, 23, 42, 0.24) !important;
}

.event-section-toggle .bi {
    font-size: 0.9rem;
    opacity: 0.8;
    transition: transform 160ms ease;
}

.event-section-toggle.collapsed .bi {
    transform: rotate(180deg);
}

.event-section-toggle .event-section-toggle-label-expanded {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.event-section-toggle .event-section-toggle-label-collapsed {
    display: none;
}

.event-section-toggle.collapsed .event-section-toggle-label-expanded {
    display: none;
}

.event-section-toggle.collapsed .event-section-toggle-label-collapsed {
    display: inline;
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.event-section-body {
    min-width: 0;
}

.action-menu .dropdown-menu {
    min-width: 16.5rem;
    max-width: calc(100vw - 2rem);
    padding: 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.18);
}

.action-menu .dropdown-item {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
    font-weight: 600;
    color: var(--text);
    transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.action-menu .dropdown-item:hover,
.action-menu .dropdown-item:focus {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-strong);
    transform: translateX(2px);
}

.action-menu .dropdown-item.text-danger:hover,
.action-menu .dropdown-item.text-danger:focus {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c !important;
}

.action-menu .dropdown-item.text-success:hover,
.action-menu .dropdown-item.text-success:focus {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d !important;
}

.action-menu .dropdown-divider {
    margin: 0.35rem 0;
    border-top-color: rgba(148, 163, 184, 0.22);
}

.action-menu .bi {
    font-size: 0.98rem;
    opacity: 0.86;
}

.action-menu .dropdown-item .bi {
    width: 1rem;
    text-align: center;
}

.inline-action-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    appearance: none;
    padding: 0.45rem 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: #f8fafc;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.inline-action-link:hover,
.inline-action-link:focus {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.22);
    color: var(--accent-strong);
    transform: translateY(-1px);
}

.inline-action-link.text-danger:hover,
.inline-action-link.text-danger:focus {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.18);
    color: #b91c1c !important;
}

.inline-action-link .bi {
    font-size: 0.82rem;
}

.inline-action-link.compact {
    padding: 0.32rem 0.56rem;
    font-size: 0.76rem;
}

.login-card {
    max-width: 420px;
    margin: 0 auto;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0;
}

.layout-plan-card-grid,
.layout-plan-item-list,
.layout-plan-unplaced-list {
    display: grid;
    gap: 1rem;
}

.layout-plan-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.layout-plan-card,
.layout-plan-item-list-card,
.layout-plan-unplaced-card,
.layout-plan-stat-card {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.92));
}

.layout-plan-card {
    overflow: hidden;
}

.layout-plan-card-preview {
    display: block;
    aspect-ratio: 16 / 9;
    background: #e2e8f0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.layout-plan-card-preview img,
.layout-plan-form-preview img,
.layout-plan-background {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.layout-plan-card-body {
    padding: 1rem;
}

.layout-plan-card-title {
    font-size: 1rem;
    font-weight: 800;
}

.layout-plan-card-title a {
    color: inherit;
    text-decoration: none;
}

.layout-plan-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.84rem;
}

.layout-plan-card-stats span {
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
}

.layout-plan-form-preview {
    display: grid;
    gap: 0.75rem;
}

.layout-plan-form-preview-label {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.layout-plan-form-preview img {
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    max-height: 320px;
    object-fit: contain;
    background: #f8fafc;
}

.layout-plan-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.95fr);
    gap: 1rem;
    align-items: start;
}

.layout-plan-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem;
}

.layout-plan-stat-card {
    padding: 0.95rem 1rem;
}

.layout-plan-stat-label {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.layout-plan-stat-value {
    margin-top: 0.35rem;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
}

.layout-plan-stat-value-small {
    font-size: 1rem;
}

.layout-plan-stage {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.04), rgba(59, 130, 246, 0.05)),
        repeating-linear-gradient(
            0deg,
            rgba(148, 163, 184, 0.08) 0,
            rgba(148, 163, 184, 0.08) 1px,
            transparent 1px,
            transparent 32px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(148, 163, 184, 0.08) 0,
            rgba(148, 163, 184, 0.08) 1px,
            transparent 1px,
            transparent 32px
    );
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.layout-plan-viewport {
    overflow: auto;
    max-height: 78vh;
    border-radius: 18px;
}

.layout-plan-zoom-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.layout-plan-zoom-controls .btn {
    min-width: 2.5rem;
}

.layout-plan-zoom-controls [data-layout-zoom-reset] {
    min-width: 4.8rem;
}

.layout-plan-zoom-value {
    display: inline-block;
    min-width: 3.2rem;
    text-align: center;
    font-weight: 700;
}

.layout-plan-background {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    background: #f8fafc;
}

.layout-plan-overlay {
    position: absolute;
    inset: 0;
    cursor: crosshair;
}

.layout-plan-item {
    position: absolute;
    display: flex;
    align-items: stretch;
    padding: 0.55rem 0.65rem;
    border: 2px solid var(--layout-item-border, #2563eb);
    border-radius: var(--layout-item-radius, 14px);
    background: var(--layout-item-fill, rgba(37, 99, 235, 0.16));
    color: var(--layout-item-text, #0f172a);
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
    touch-action: none;
    backdrop-filter: blur(4px);
}

.layout-plan-item:hover,
.layout-plan-item:focus {
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
}

.layout-plan-item.is-selected,
.layout-plan-item.is-preview {
    outline: 2px dashed rgba(15, 23, 42, 0.55);
    outline-offset: 2px;
}

.layout-plan-item.is-preview {
    z-index: 999;
}

.layout-plan-item.is-layer-muted {
    opacity: 0.38;
}

.layout-plan-item-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.layout-plan-item-label {
    display: -webkit-box;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.1;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.layout-plan-item-subtitle {
    display: block;
    font-size: 0.72rem;
    opacity: 0.88;
    line-height: 1.15;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.layout-plan-item-handle {
    position: absolute;
    right: -0.45rem;
    bottom: -0.45rem;
    width: 0.95rem;
    height: 0.95rem;
    border-radius: 999px;
    background: #fff;
    border: 2px solid var(--layout-item-border, #2563eb);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
    cursor: nwse-resize;
}

.layout-plan-item.is-compact {
    padding: 0.42rem 0.48rem;
}

.layout-plan-item.is-compact .layout-plan-item-copy {
    gap: 0.12rem;
}

.layout-plan-item.is-compact .layout-plan-item-subtitle {
    display: none;
}

.layout-plan-item.is-small .layout-plan-item-copy {
    align-items: center;
    text-align: center;
}

.layout-plan-item.is-small .layout-plan-item-label {
    display: block;
    font-size: 0.72rem;
    line-height: 1.02;
    white-space: nowrap;
}

.layout-plan-item.is-tiny {
    padding: 0.22rem 0.28rem;
}

.layout-plan-item.is-tiny .layout-plan-item-label {
    font-size: 0.62rem;
}

.layout-plan-color-picker {
    display: grid;
    gap: 0.65rem;
}

.layout-plan-color-picker-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.layout-plan-color-input {
    width: 4.25rem;
    min-width: 4.25rem;
    height: 2.9rem;
    padding: 0.3rem;
    border-radius: 12px !important;
}

.layout-plan-color-picker.is-auto .layout-plan-color-input {
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.16);
}

.layout-plan-color-swatch-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.layout-plan-color-swatch {
    width: 1.7rem;
    height: 1.7rem;
    padding: 0;
    border: 2px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    background: var(--layout-color-swatch, #2563eb);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
    transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.layout-plan-color-swatch:hover,
.layout-plan-color-swatch:focus {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
}

.layout-plan-color-swatch.is-active {
    border-color: rgba(15, 23, 42, 0.7);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.layout-plan-layer-list {
    display: grid;
    gap: 0.85rem;
}

.layout-plan-layer-card {
    padding: 0.95rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.92));
    transition: border-color 0.16s ease, opacity 0.16s ease, box-shadow 0.16s ease;
}

.layout-plan-layer-card.is-muted {
    opacity: 0.72;
}

.layout-plan-layer-card-top {
    display: flex;
    align-items: flex-end;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.layout-plan-layer-visibility {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    padding: 0.72rem 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    background: #fff;
    font-weight: 700;
}

.layout-plan-layer-visibility .form-check-input {
    margin: 0;
}

.layout-plan-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.layout-plan-form-span-2 {
    grid-column: 1 / -1;
}

.layout-plan-assignment-panel {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.18);
    background: rgba(59, 130, 246, 0.07);
}

.layout-plan-assignment-title {
    font-weight: 800;
    color: var(--text);
}

.layout-plan-assignment-meta {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.layout-plan-assignment-requirements,
.layout-plan-requirement-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.layout-plan-item-list-card,
.layout-plan-unplaced-card {
    padding: 0.95rem 1rem;
}

@media (max-width: 991px) {
    .layout-plan-editor-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .layout-plan-form-grid {
        grid-template-columns: 1fr;
    }

    .layout-plan-form-span-2 {
        grid-column: auto;
    }

    .layout-plan-item {
        padding: 0.45rem 0.5rem;
    }

    .layout-plan-item-label {
        font-size: 0.72rem;
    }

    .layout-plan-item-subtitle {
        font-size: 0.64rem;
    }
}

.meeting-minute-task-list {
    display: grid;
    gap: 1rem;
}

.meeting-minute-task-card {
    padding: 1rem 1.05rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.92));
}

.meeting-minute-task-card.is-collapsed {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.94), rgba(255, 255, 255, 0.98));
}

.meeting-minute-task-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.meeting-minute-task-card-toggle {
    flex: 1 1 18rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
}

.meeting-minute-task-card-title-wrap {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.meeting-minute-task-card-label {
    font-weight: 800;
    color: var(--text);
}

.meeting-minute-task-card-summary {
    color: var(--muted);
    font-size: 0.9rem;
}

.meeting-minute-task-card-toggle-state {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
}

.meeting-minute-task-card-body {
    margin-top: 0.95rem;
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.profile-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 0.85fr);
    gap: 1rem;
    align-items: start;
}

.profile-overview {
    display: grid;
    gap: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 68%, #eef6ff 100%);
}

.profile-identity-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
}

.profile-avatar {
    width: 4.75rem;
    height: 4.75rem;
    border-radius: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.45rem;
    font-weight: 800;
    background: linear-gradient(135deg, #0f172a 0%, #2563eb 100%);
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.18);
}

.profile-identity-copy {
    min-width: 0;
}

.profile-overline {
    margin-bottom: 0.15rem;
    color: var(--accent-strong);
    font-size: 0.82rem;
    font-weight: 800;
}

.profile-identity-copy h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.profile-identity-copy p {
    margin: 0.2rem 0 0.75rem;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.profile-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.profile-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 1.75rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

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

.profile-summary-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.86);
}

.profile-summary-icon,
.profile-panel-icon {
    width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: #f8fafc;
    color: var(--muted);
    flex: 0 0 auto;
}

.profile-summary-icon-blue,
.profile-panel-icon {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: rgba(29, 78, 216, 0.16);
}

.profile-summary-icon-green,
.profile-panel-icon-mail {
    color: #166534;
    background: #ecfdf5;
    border-color: rgba(22, 101, 52, 0.16);
}

.profile-summary-icon-amber,
.profile-panel-icon-warning {
    color: #92400e;
    background: #fffbeb;
    border-color: rgba(146, 64, 14, 0.18);
}

.profile-summary-icon-neutral {
    color: var(--muted);
    background: #f8fafc;
}

.profile-meta-label {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
}

.profile-summary-item strong,
.profile-assignment-head strong,
.profile-mail-summary strong {
    display: block;
    color: var(--text);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

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

.profile-assignment-block {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.72);
}

.profile-assignment-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.profile-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.profile-tag {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 1.7rem;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(37, 99, 235, 0.15);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.profile-tag-muted {
    color: var(--muted);
    border-color: var(--border);
    background: #f8fafc;
}

.profile-panel {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.profile-panel-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.profile-panel-head-split {
    justify-content: space-between;
    gap: 1rem;
}

.profile-panel-title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.profile-panel h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.18rem;
    font-weight: 800;
    line-height: 1.25;
}

.profile-panel p {
    margin: 0.25rem 0 0;
    color: var(--muted);
}

.profile-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 1.8rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
    background: #f8fafc;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
}

.profile-status-pill-success {
    color: #166534;
    background: #ecfdf5;
    border-color: rgba(22, 101, 52, 0.18);
}

.profile-status-pill-muted {
    color: var(--muted);
    background: #f8fafc;
}

.profile-form {
    min-width: 0;
}

.password-rules {
    margin-top: 0.6rem;
    color: var(--muted);
    font-size: 0.86rem;
}

.password-rules-label {
    margin-bottom: 0.3rem;
    font-weight: 700;
    color: var(--muted);
}

.password-rules-list {
    margin: 0;
    padding-left: 1rem;
    color: var(--muted);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem 1rem;
}

.password-rules-list li {
    display: list-item;
}

.profile-form-section {
    min-inline-size: 0;
    margin-top: 1.15rem;
    padding: 0;
    border: 0;
}

.profile-form-section + .profile-form-section {
    padding-top: 1.15rem;
    border-top: 1px solid var(--border);
}

.profile-form-section-title {
    float: none;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    margin-bottom: 0.85rem;
    padding: 0;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.2;
}

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

.profile-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.profile-form-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.profile-toggle-row {
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: #f8fafc;
}

.profile-mail-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: #f8fafc;
}

.profile-mail-summary-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.profile-mail-facts {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.profile-mail-facts span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    min-height: 1.65rem;
    padding: 0.25rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    background: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
    white-space: normal;
}

@media (max-width: 991.98px) {
    .profile-detail-grid {
        grid-template-columns: 1fr;
    }

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

    .profile-mail-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-mail-facts {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .profile-identity-row,
    .profile-assignment-grid {
        grid-template-columns: 1fr;
    }

    .profile-avatar {
        width: 4.25rem;
        height: 4.25rem;
        border-radius: 0.8rem;
        font-size: 1.35rem;
    }

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

    .profile-check-grid {
        grid-template-columns: 1fr;
    }

    .profile-panel-head,
    .profile-panel-title-wrap {
        align-items: flex-start;
    }

    .profile-panel-head-split {
        flex-direction: column;
    }
}

@media (max-width: 575.98px) {
    .assistant-widget {
        --assistant-mobile-gap: 0.75rem;
        right: max(var(--assistant-mobile-gap), env(safe-area-inset-right));
        left: max(var(--assistant-mobile-gap), env(safe-area-inset-left));
        bottom: calc(max(var(--assistant-mobile-gap), env(safe-area-inset-bottom)) + var(--assistant-keyboard-offset, 0px));
        align-items: stretch;
    }

    .assistant-widget.is-open {
        top: max(var(--assistant-mobile-gap), env(safe-area-inset-top));
    }

    .assistant-widget.is-open .assistant-toggle {
        display: none;
    }

    .assistant-panel {
        width: 100%;
        height: 100%;
        min-height: 0;
        max-height: none;
        grid-template-rows: auto minmax(0, 1fr) auto auto;
    }

    .assistant-panel-header {
        padding: 0.75rem;
    }

    .assistant-avatar {
        width: 2.5rem;
        height: 2.5rem;
    }

    .assistant-panel-actions {
        gap: 0.25rem;
    }

    .assistant-icon-btn {
        width: 2.5rem;
        height: 2.5rem;
    }

    .assistant-messages {
        padding: 0.75rem;
    }

    .assistant-message-bubble {
        max-width: 94%;
        font-size: 0.92rem;
    }

    .assistant-suggestions {
        padding-top: 0.65rem;
        padding-right: 0.75rem;
        padding-left: 0.75rem;
        scroll-padding-inline: 0.75rem;
    }

    .assistant-suggestions button {
        min-height: 2.5rem;
        max-width: min(78vw, 18rem);
        padding: 0.5rem 0.65rem;
    }

    .assistant-form {
        grid-template-columns: minmax(0, 1fr) 2.75rem;
        padding-top: 0.65rem;
        padding-bottom: 0.75rem;
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }

    .assistant-input {
        min-height: 2.75rem;
        font-size: 1rem;
    }

    .assistant-send-btn {
        width: 2.75rem;
        height: 2.75rem;
    }

    .assistant-toggle {
        align-self: flex-end;
        width: 3.75rem;
        height: 3.75rem;
    }

    .assistant-toggle-img {
        width: 3.75rem;
        height: 3.75rem;
    }

    .profile-form-actions .btn {
        width: 100%;
    }

    .password-rules-list {
        grid-template-columns: 1fr;
    }
}

.profile-layout {
    display: grid;
    grid-template-columns: minmax(16rem, 19rem) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.profile-group-tabs {
    margin-top: -0.15rem;
}

.profile-overview-grid {
    display: grid;
    grid-template-columns: minmax(16rem, 1fr) repeat(2, minmax(14rem, 0.85fr));
    gap: 1rem;
    align-items: start;
}

.profile-overview-identity {
    display: grid;
    gap: 1rem;
    min-height: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 68%, #eef6ff 100%);
}

.profile-overview-card {
    display: grid;
    gap: 0.85rem;
    align-content: start;
    min-height: 100%;
}

.profile-overview-card h2,
.profile-mail-mini-head h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 800;
}

.profile-overview-card-wide {
    grid-column: span 2;
}

.profile-section-page {
    max-width: 64rem;
}

.profile-narrow-page {
    max-width: 42rem;
}

.profile-rail {
    position: sticky;
    top: 1rem;
    display: grid;
    gap: 1rem;
    align-content: start;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.profile-rail-identity {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.85rem;
    align-items: center;
}

.profile-rail-title {
    min-width: 0;
}

.profile-rail-title h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.28rem;
    font-weight: 800;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.profile-rail-title p {
    margin: 0.2rem 0 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.profile-rail-section {
    display: grid;
    gap: 0.65rem;
    min-width: 0;
    padding-top: 0.95rem;
    border-top: 1px solid var(--border);
}

.profile-rail-identity + .profile-rail-section {
    padding-top: 0;
    border-top: 0;
}

.profile-rail-section-last {
    padding-bottom: 0.15rem;
}

.profile-rail-section h3,
.profile-mail-mini-head h3 {
    margin: 0;
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 800;
}

.profile-fact-list {
    display: grid;
    gap: 0.65rem;
    margin: 0;
}

.profile-fact-list div {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.profile-fact-list dt {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
}

.profile-fact-list dd {
    margin: 0;
    color: var(--text);
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.profile-mail-mini-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.profile-mail-mini {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.profile-mail-mini strong,
.profile-mail-mini span {
    display: block;
    overflow-wrap: anywhere;
}

.profile-mail-mini strong {
    color: var(--text);
    line-height: 1.25;
}

.profile-mail-mini span {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.profile-content {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.profile-edit-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
    gap: 1rem;
    align-items: start;
}

.profile-field-grid,
.profile-field-stack {
    display: grid;
    gap: 1rem;
}

.profile-field-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-field-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-field-grid-mail {
    grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 0.75fr));
}

.profile-field-grid-mail .profile-field-wide {
    grid-column: span 1;
}

.profile-field {
    min-width: 0;
}

.profile-panel {
    gap: 1.15rem;
}

.profile-mail-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
    padding: 0.9rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.profile-mail-bar-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.7rem;
    align-items: center;
    min-width: 0;
}

.profile-mail-bar-main strong {
    display: block;
    color: var(--text);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

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

    .profile-layout {
        grid-template-columns: minmax(15rem, 17rem) minmax(0, 1fr);
    }

    .profile-edit-grid,
    .profile-field-grid-three,
    .profile-field-grid-mail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .profile-overview-card-wide {
        grid-column: span 1;
    }

    .profile-layout {
        grid-template-columns: 1fr;
    }

    .profile-rail {
        position: static;
    }

    .profile-edit-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .profile-overview-grid {
        grid-template-columns: 1fr;
    }

    .profile-field-grid-two,
    .profile-field-grid-three,
    .profile-field-grid-mail {
        grid-template-columns: 1fr;
    }

    .profile-mail-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-mail-facts {
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    .profile-rail-identity {
        grid-template-columns: 1fr;
    }

    .profile-mail-mini-head {
        align-items: flex-start;
        flex-direction: column;
    }
}
