/* TGPLibrary Default Styles */

/* CSS Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

h1:focus {
    outline: none;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-muted);
}

/* Preload Spinner */
.preload-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 9999;
}

.preload-content {
    text-align: center;
    color: white;
}

.preload-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 1.5rem;
}

.preload-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.preload-text {
    font-size: 1rem;
    opacity: 0.9;
}

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

/* Alert Styles */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: var(--alert-success-bg);
    border: 1px solid var(--alert-success-border);
    color: var(--alert-success-text);
}

.alert-danger {
    background-color: var(--alert-danger-bg);
    border: 1px solid var(--alert-danger-border);
    color: var(--alert-danger-text);
}

.alert-warning {
    background-color: var(--alert-warning-bg);
    border: 1px solid var(--alert-warning-border);
    color: var(--alert-warning-text);
}

.alert-info {
    background-color: var(--alert-info-bg);
    border: 1px solid var(--alert-info-border);
    color: var(--alert-info-text);
}

/* Form Styles */
.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: var(--bg-white);
    border: 1px solid #ced4da;
    border-radius: 4px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--app-primary);
    outline: 0;
    box-shadow: 0 0 0 3px var(--app-focus-ring);
}

.form-label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: var(--app-primary);
    border-color: var(--app-primary);
}

.btn-primary:hover {
    background-color: var(--app-primary-dark);
    border-color: var(--app-primary-dark);
}

.btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #5a6268;
}

.btn-danger {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #c82333;
}

/* Text Utilities */
.text-danger {
    color: var(--color-danger);
}

.text-muted {
    color: #6c757d;
}

/* Width Utilities */
.w-100 {
    width: 100%;
}

/* Validation Styles */
.validation-message {
    font-size: 0.875rem;
    color: var(--color-danger);
    margin-top: 0.25rem;
}

/* ================================================
   Anonymous Layout (Login, Register, etc.)
   ================================================ */

.anonymous-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.anonymous-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.anonymous-container {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: 0 4px 6px var(--shadow-light);
    padding: 2rem;
    max-width: 400px;
    width: 100%;
}

.anonymous-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.logo-image {
    max-width: 200px;
    height: auto;
}

.anonymous-footer {
    text-align: center;
    padding: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

/* ================================================
   Auth Page Shared Styles
   ================================================ */

.login-page,
.register-page,
.forgot-password-page,
.reset-password-page,
.confirmation-page {
    text-align: center;
}

.login-title,
.register-title,
.reset-password-title {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.forgot-password-title {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.confirmation-title {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.forgot-password-description {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.confirmation-message {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Auth page link sections */
.login-links,
.register-links,
.forgot-password-links,
.reset-password-links,
.confirmation-links {
    margin-top: 1rem;
}

.login-links a,
.register-links a,
.forgot-password-links a,
.reset-password-links a,
.confirmation-links a {
    color: #667eea;
    text-decoration: none;
}

.login-links a:hover,
.register-links a:hover,
.forgot-password-links a:hover,
.reset-password-links a:hover,
.confirmation-links a:hover {
    text-decoration: underline;
}

.separator {
    margin: 0 0.5rem;
    color: #ccc;
}

/* ================================================
   Error Page
   ================================================ */

.error-page {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
}

.error-title {
    color: var(--color-danger);
    margin-bottom: 0.5rem;
}

.error-subtitle {
    color: var(--text-secondary);
    font-weight: normal;
    margin-bottom: 1.5rem;
}

.error-request-id {
    background: var(--bg-light);
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.error-request-id code {
    color: #e83e8c;
}

/* ================================================
   Site Header
   ================================================ */

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: var(--bg-white);
    border-bottom: 3px solid var(--app-primary);
    box-shadow: 0 1px 3px var(--shadow-light);
    height: var(--header-height);
}

.header-brand {
    display: flex;
    align-items: center;
}

.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.brand-logo {
    height: 40px;
    width: auto;
    margin-right: 0.75rem;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    color: var(--text-secondary);
}

.btn-logout,
.btn-login {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
}

.btn-logout {
    background: var(--bg-light);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
}

.btn-logout:hover {
    background: #e9ecef;
}

.btn-login {
    background: #667eea;
    border: none;
    color: white;
}

.btn-login:hover {
    background: #5a6fd6;
}

/* Header actions (right side) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Profile menu */
.profile-menu-trigger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.header-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.header-avatar-placeholder .sc-icon-display {
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-menu-wrapper {
    position: relative;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow-medium);
    min-width: 180px;
    z-index: 1000;
}

.profile-dropdown-header {
    padding: 0.75rem 1rem;
}

.profile-dropdown-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.profile-dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 0;
}

.profile-dropdown-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.15s;
}

.profile-dropdown-item:hover {
    background: var(--bg-light);
}

.profile-dropdown-logout {
    color: var(--color-danger);
}

.profile-dropdown-logout:hover {
    background: #fff5f5;
}

/* Hamburger button */
.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.hamburger-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.2s;
}

/* Overlay for closing menus */
.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: transparent;
}

/* ================================================
   Site Footer
   ================================================ */

.site-footer {
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.footer-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.build-info-line {
    margin-top: 0.25rem;
    background: none;
    border: none;
    padding: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.75rem;
    color: var(--text-muted, var(--text-secondary));
    cursor: pointer;
    opacity: 0.7;
}

.build-info-line:hover,
.build-info-line:focus {
    opacity: 1;
    text-decoration: underline;
}

.build-info-line .build-info-separator {
    margin: 0 0.35rem;
}

.build-info-dialog .build-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.5rem;
}

.build-info-dialog .build-info-table th {
    text-align: left;
    padding: 0.35rem 0.75rem 0.35rem 0;
    font-weight: 600;
    color: var(--text-secondary);
    width: 8rem;
    white-space: nowrap;
}

.build-info-dialog .build-info-table td {
    padding: 0.35rem 0;
    word-break: break-all;
}

.build-info-dialog .build-info-mismatch {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-left: 3px solid #d97706;
    background: rgba(217, 119, 6, 0.08);
    font-size: 0.875rem;
}

/* ================================================
   Form Styles
   ================================================ */

.tgpl-form-row {
    margin-bottom: 1rem;
    width: 100%;
}

/* ================================================
   Dialog Styles
   ================================================ */

.tgpl-dialog-titlebar {
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.tgpl-dialog-body {
    padding: 0.5rem 0;
}

.tgpl-dialog-loading {
    text-align: center;
    padding: 2rem 0;
}

.tgpl-dialog-loading p {
    margin-top: 0.5rem;
    color: var(--text-muted);
}

.tgpl-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
}

/* Contact Info Dialog */
.contact-info-section {
    padding: 0.25rem 0;
}

.contact-info-section h6 {
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.communication-preference-selector .rz-radiobutton-list:focus,
.communication-preference-selector .rz-radiobutton-list:focus-visible {
    outline: none;
    box-shadow: none;
    border: none;
}

/* Change Password Dialog */
.change-password-dialog .form-check {
    padding-left: 1.75rem;
}

/* ================================================
   Profile Image (SoftCrow component overrides)
   Applied here because the SoftCrow CSS may not include
   these styles until the next package publish.
   ================================================ */

.sc-profile-image {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.sc-profile-image-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sc-profile-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border-light);
    color: var(--text-muted);
}

/* Size variants */
.sc-profile-image-sm {
    width: 32px;
    height: 32px;
}

.sc-profile-image-sm .sc-profile-image-placeholder {
    font-size: 0.875rem;
}

.sc-profile-image-md {
    width: 48px;
    height: 48px;
}

.sc-profile-image-md .sc-profile-image-placeholder {
    font-size: 1.125rem;
}

.sc-profile-image-lg {
    width: 80px;
    height: 80px;
}

.sc-profile-image-lg .sc-profile-image-placeholder {
    font-size: 2rem;
}

.sc-profile-image-xl {
    width: 128px;
    height: 128px;
}

.sc-profile-image-xl .sc-profile-image-placeholder {
    font-size: 3rem;
}

/* ================================================
   Profile Image Editor
   ================================================ */

.profile-image-editor {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.profile-image-editor-current {
    display: flex;
    justify-content: center;
}

.profile-image-editor-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-image-editor-buttons label {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.profile-image-editor-crop-container {
    width: 100%;
    max-width: 320px;
}

.profile-image-editor-crop-wrapper {
    width: 100%;
    height: 280px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--bg-code);
}

.profile-image-editor-source {
    display: block;
    max-width: 100%;
}

.profile-image-editor-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Circular crop mask overlay for Cropper.js */
.profile-image-editor-crop-wrapper .cropper-view-box,
.profile-image-editor-crop-wrapper .cropper-face {
    border-radius: 50%;
}

.profile-image-editor-crop-wrapper .cropper-view-box {
    outline: 0;
    box-shadow: 0 0 0 1px rgba(102, 126, 234, 0.5);
}

/* ================================================
   Sidebar Leaves
   ================================================ */

.sc-sidebar-leaf-group {
    width: 100%;
}

.sc-sidebar-leaf {
    position: relative;
    padding: 0.35rem 2rem 0.35rem 2.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background-image: linear-gradient(var(--border-light), var(--border-light));
    background-size: 1px 100%;
    background-position: 1.5rem 0;
    background-repeat: no-repeat;
}

.sc-sidebar-leaf-link {
    flex: 1;
    min-width: 0;
}

.sc-sidebar-leaf:hover {
    color: var(--text-primary);
    background-color: var(--bg-light);
}

.sc-sidebar-leaf-close {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    opacity: 0;
    transition: opacity 0.15s;
}

.sc-sidebar-leaf:hover .sc-sidebar-leaf-close {
    opacity: 0.5;
}

.sc-sidebar-leaf .sc-sidebar-leaf-close:hover {
    opacity: 1;
}

/* Category header row — nav link plus optional clear-all button */
.nav-category-row {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-category-row .nav-link {
    flex: 1;
    min-width: 0;
}

.nav-category-clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    opacity: 0;
    transition: opacity 0.15s;
}

.nav-category-row:hover .nav-category-clear {
    opacity: 0.5;
}

.nav-category-row .nav-category-clear:hover {
    opacity: 1;
}

/* ===========================================
   Persons List Page — Mobile-First
   =========================================== */

.persons-list-pane {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Filter bar */
.persons-filter-bar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (min-width: 480px) {
    .persons-filter-bar {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 1rem;
    }
}

/* List container */
.persons-list-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.persons-list-loading {
    display: flex;
    justify-content: center;
    padding: 2rem;
}

/* Person card (list item wrapper) — stacked on mobile */
.person-card {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
    padding: 0.875rem 1rem;
}

/* Person display (inside card) */
.person-display {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.person-display-icon {
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 1.25rem;
}

.person-display-content {
    flex: 1;
    min-width: 0;
}

.person-display-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.person-display-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.person-display-pronouns {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-code);
    padding: 0.0625rem 0.375rem;
    border-radius: 4px;
}

.person-display-flags {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--status-warning, #e67e22);
    background: rgba(230, 126, 34, 0.1);
    padding: 0.0625rem 0.375rem;
    border-radius: 4px;
}

/* Detail items row (email, phone, family) */
.person-display-details {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

.person-detail-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.person-detail-item i {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Role badges */
.person-display-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.375rem;
}

.person-role-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.0625rem 0.5rem;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--bg-code);
    color: var(--text-secondary);
}

.person-role-badge.role-admin {
    background: rgba(231, 76, 60, 0.12);
    color: #c0392b;
}

.person-role-badge.role-lead {
    background: rgba(142, 68, 173, 0.12);
    color: #8e44ad;
}

.person-role-badge.role-volunteer {
    background: rgba(46, 204, 113, 0.12);
    color: #27ae60;
}

.person-role-badge.role-patron {
    background: rgba(52, 152, 219, 0.12);
    color: #2980b9;
}

.person-role-badge.role-donor {
    background: rgba(241, 196, 15, 0.15);
    color: #d4a017;
}

/* person-card-actions: uses .entity-card-actions shared class */

/* person-details-btn: uses .entity-details-btn shared class; hover override below */
.person-details-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.person-card-placeholder {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
}

/* Desktop (640px+): card row layout */
@media (min-width: 640px) {
    .person-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    /* person-card-actions: desktop override handled by .entity-card-actions */
}

/* Action bar */
.persons-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    margin: 0 -1rem -1rem -1rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-subtle);
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .persons-action-bar {
        margin: 0 -1.5rem -1.5rem -1.5rem;
        padding: 0.75rem 1.5rem;
        flex-wrap: nowrap;
    }
}

/* ========================================
   Shared Details Page Foundation
   ======================================== */

.details-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem;
    flex: 1;
    min-height: 0;
}

.details-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.details-icon {
    font-size: 2rem;
    color: var(--app-primary);
}

.details-title h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.details-header-actions {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

.details-error {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--alert-danger-bg);
    border: 1px solid var(--alert-danger-border);
    border-radius: 6px;
    color: var(--color-danger);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.details-edit-field {
    margin-bottom: 1rem;
}

.details-edit-field label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.details-edit-field .required {
    color: var(--color-danger);
}

.details-edit-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 480px) {
    .details-edit-row {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

.details-tabs {
    margin-top: 2rem;
}

/* Details Splitter — resizable top/bottom panes for detail pages */
.details-splitter {
    flex: 1;
    min-height: 0;
}

.details-splitter-pane-content {
    height: 100%;
    overflow-y: auto;
    padding: 1rem;
}

/* Remove extra top margin on tabs inside a splitter pane */
.details-splitter-pane-content .details-tabs {
    margin-top: 0;
}

.details-description {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-subtle);
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
}

.details-description p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.entity-details-badges {
    display: flex;
    gap: 0.375rem;
    margin-top: 0.375rem;
    flex-wrap: wrap;
}

.entity-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

.entity-details-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    border: 1px solid var(--border-medium);
    background: var(--bg-white);
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    transition: border-color 0.2s, color 0.2s;
}

.entity-details-btn:hover {
    border-color: var(--app-primary);
    color: var(--app-primary);
}

.entity-card-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--bg-code);
}

@media (min-width: 640px) {
    .entity-card-actions {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        margin-left: 1rem;
    }
}

.list-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--bg-code);
    font-size: 0.9375rem;
}

.list-row:hover {
    background: var(--bg-subtle);
}

.list-row-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
    font-weight: 500;
}

.details-properties {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 480px) {
    .details-properties {
        grid-template-columns: 1fr 1fr;
    }
}

.details-property {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.details-property-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
}

.details-property-value {
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.details-identifier {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-code);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.25rem;
}

/* ========================================
   Person Details Page — Entity-Specific
   ======================================== */

.person-details-pronouns {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-code);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.25rem;
}

.person-details-fields {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.person-details-field-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.person-details-field {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 150px;
}

.person-details-field-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
}

.person-details-field-value {
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.person-details-link {
    color: var(--color-primary);
    text-decoration: none;
}

.person-details-link:hover {
    text-decoration: underline;
}

.person-details-identifier {
    font-family: var(--font-monospace, monospace);
    font-size: 0.875rem;
    background: var(--bg-code);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

.person-details-edit-inline {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Person Detail Tabs — Content & Empty States */
.person-tab-content {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 0;
}

.person-tab-empty {
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
}

.person-tab-empty p {
    margin: 0;
}

/* ============================================================
   Families — List
   ============================================================ */

.families-list-pane {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    gap: 0;
    padding: 0 0.5rem;
}

.families-filter-bar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

@media (min-width: 480px) {
    .families-filter-bar {
        flex-direction: row;
        align-items: center;
    }
}

.families-list-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.families-list-loading {
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.family-card {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
    border-bottom: 1px solid var(--rz-base-200);
}

.family-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.family-display-icon {
    font-size: 1.25rem;
    color: var(--rz-primary);
    flex-shrink: 0;
}

.family-display-content {
    flex: 1;
    min-width: 0;
}

.family-display-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.family-display-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.family-display-identifier {
    color: var(--rz-text-secondary-color);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.family-display-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--rz-text-secondary-color);
    margin-top: 0.125rem;
}

.family-display-status {
    font-size: 0.75rem;
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

.family-status-pending { background: var(--rz-warning-lighter); color: var(--rz-warning-darker); }
.family-status-verified { background: var(--rz-success-lighter); color: var(--rz-success-darker); }
.family-status-canceled { background: var(--rz-base-200); color: var(--rz-text-secondary-color); }

.family-display-primary {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.family-display-counts {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.family-count {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--rz-text-secondary-color);
}

.family-count-icon {
    font-size: 0.75rem;
}

.family-count-flags {
    color: var(--rz-warning);
}

.family-card-actions {
    flex-shrink: 0;
}

.family-details-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: 1px solid var(--rz-base-300);
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--rz-text-color);
    transition: background-color 0.15s, border-color 0.15s;
}

.family-details-btn:hover {
    background: var(--rz-base-100);
    border-color: var(--rz-primary);
    color: var(--rz-primary);
}

.family-card-placeholder {
    padding: 1rem;
    text-align: center;
    color: var(--rz-text-secondary-color);
}

.families-action-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    flex-wrap: wrap;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .families-action-bar {
        flex-wrap: nowrap;
    }
}

/* ============================================================
   Families — Details
   ============================================================ */

.family-details-status {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

.family-details-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.family-details-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.family-details-field {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.family-details-label {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--rz-text-secondary-color);
}

/* Families — Persons Tab */
.family-persons-list-container {
    padding: 0.5rem 0;
}

.family-person-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--rz-base-200);
    font-size: 0.875rem;
}

.family-person-name {
    font-weight: 500;
}

.family-person-email {
    color: var(--rz-text-secondary-color);
    font-size: 0.8rem;
}

.family-person-placeholder {
    padding: 0.5rem;
    text-align: center;
    color: var(--rz-text-secondary-color);
}

/* Families — Dialogs */
.add-family-dialog {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.add-family-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.add-family-field label {
    font-weight: 600;
    font-size: 0.875rem;
}

.add-family-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.5rem;
}

/* ============================================================
   Entity Dialogs (shared across Add/Edit dialogs for all entities)
   ============================================================ */

.entity-dialog {
    padding: 0.5rem 0;
}

.dialog-field-row {
    display: flex;
    flex-direction: column;
    gap: 0;
}

@media (min-width: 480px) {
    .dialog-field-row {
        flex-direction: row;
        gap: 1rem;
    }

    .dialog-field-row > .dialog-field {
        flex: 1;
        min-width: 0;
    }
}

.dialog-field-inline {
    display: flex;
    gap: 0.5rem;
}

.dialog-field-inline > * {
    flex: 1;
    min-width: 0;
}

.dialog-field {
    margin-bottom: 1rem;
}

.dialog-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.dialog-field .required {
    color: var(--color-danger);
}

.field-validation-error {
    display: block;
    font-size: 0.8125rem;
    color: var(--color-danger);
    margin-top: 0.25rem;
}

.dialog-error {
    font-size: 0.875rem;
    color: var(--color-danger);
    background: var(--alert-danger-bg);
    border: 1px solid var(--alert-danger-border);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--bg-code);
}

/* ================================================
   Main Layout — Mobile-First
   ================================================ */

.main-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Mobile nav overlay */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay-dark);
    z-index: 200;
}

.layout-body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

/* Sidebar: hidden off-screen on mobile, below the header */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: 260px;
    background: var(--bg-light);
    border-right: 1px solid var(--border-light);
    padding: 0;
    z-index: 300;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
}

.sidebar.sidebar-open {
    transform: translateX(0);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.2s;
    font-size: 1rem;
}

.nav-link:hover {
    background: #e9ecef;
}

.nav-link.active {
    background: var(--app-primary);
    color: white;
}

/* Nav icon: works with IconDisplay's .sc-icon-display wrapper */
.nav-icon {
    display: inline-flex;
    width: 1.5rem;
    margin-right: 0.75rem;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.125rem;
}

.nav-text {
    font-weight: 500;
}

/* Main content: full width on mobile */
.main-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: var(--bg-white);
    overflow: hidden;
    width: 100%;
}

/* Mobile: let the page scroll naturally instead of locking to inner-scroll panes */
@media (max-width: 767.98px) {
    .main-content { overflow-y: auto; overflow-x: hidden; }
}

/* Hamburger: visible on mobile */
.hamburger-btn {
    display: flex;
}

/* Navigation separator */
.nav-separator {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin: 0.5rem 0.75rem;
}

/* ================================================
   Desktop Layout (768px+)
   ================================================ */

@media (min-width: 768px) {
    .hamburger-btn {
        display: none;
    }

    .sidebar {
        position: static;
        transform: none;
        width: 220px;
        flex-shrink: 0;
    }

    .sidebar-nav {
        padding-top: 0;
    }

    .mobile-nav-overlay {
        display: none;
    }

    .main-content {
        padding: 1.5rem;
    }
}

/* ================================================
   Home Page
   ================================================ */

.home-page {
    max-width: 1200px;
}

.home-page h1 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.welcome-message {
    background: var(--app-primary-light);
    border-left: 4px solid var(--app-primary);
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0 4px 4px 0;
}

.welcome-message p {
    margin: 0.5rem 0;
    color: var(--text-primary);
}

.quick-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px var(--shadow-subtle);
}

.stat-card h3 {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.stat-card a {
    color: var(--app-primary);
    text-decoration: none;
    font-size: 0.875rem;
}

.stat-card a:hover {
    text-decoration: underline;
}

@media (min-width: 640px) {
    .quick-stats {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

/* ================================================
   Routes (Not Found)
   ================================================ */

.not-found {
    text-align: center;
    padding: 3rem;
}

.not-found h1 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.not-found p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.not-found a {
    color: var(--app-primary);
    text-decoration: none;
}

.not-found a:hover {
    text-decoration: underline;
}

/* ================================================
   ErrorBoundary Fallback
   ================================================ */

.error-content {
    text-align: center;
    padding: 3rem;
}

.error-content h1 {
    color: var(--color-danger);
    margin-bottom: 1rem;
}

.error-content p {
    color: var(--text-secondary);
}

/* ===========================================
   Shared List Item Card
   =========================================== */

.list-item-card {
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-white);
    box-shadow: 0 1px 3px var(--shadow-subtle);
    transition: box-shadow 0.2s;
}

.list-item-card:hover {
    box-shadow: 0 2px 8px var(--shadow-light);
}

/* ===========================================
   Search Bar
   =========================================== */

.search-bar {
    margin-bottom: 1rem;
}

.search-bar-input-group {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-medium);
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-white);
    transition: border-color 0.2s;
}

.search-bar-input-group:focus-within {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--app-primary) 20%, transparent);
}

.search-bar-input {
    flex: 1;
    border: none;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    outline: none;
    background: transparent;
}

.search-bar-clear-btn,
.search-bar-search-btn {
    border: none;
    background: transparent;
    padding: 0.625rem 0.75rem;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.search-bar-clear-btn:hover,
.search-bar-search-btn:hover {
    color: var(--app-primary);
}

.search-bar-search-btn {
    background: var(--app-primary);
    color: #fff;
    padding: 0.625rem 1rem;
}

.search-bar-search-btn:hover {
    background: var(--app-primary-dark);
    color: #fff;
}

/* ===========================================
   Filter Components
   =========================================== */

.filter-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: var(--bg-subtle);
}

.filter-section > .filter-group > i {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-dropdown {
    flex: 1;
    min-width: 0;
}

@media (min-width: 480px) {
    .filter-section {
        flex: initial;
    }

    .filter-dropdown {
        min-width: 180px;
        flex: initial;
    }
}

/* ===========================================
   Action Bar (shared)
   =========================================== */

.action-bar-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    border: 1px solid var(--border-medium);
    background: var(--bg-white);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: border-color 0.2s, color 0.2s;
}

.action-bar-btn:hover {
    border-color: var(--app-primary);
    color: var(--app-primary);
}

.action-bar-status {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ===========================================
   Export Dialog
   =========================================== */

.export-dialog {
    padding: 0.5rem 0;
}

.export-dialog-section {
    margin-bottom: 1.25rem;
}

.export-dialog-section-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.export-dialog-scope {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.export-dialog-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.5rem;
}

.export-dialog-column {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.export-dialog-error {
    font-size: 0.875rem;
    color: var(--color-danger);
    background: #fdf0f0;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
}

.export-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--bg-code);
}

/* ===========================================
   Locations List Page — Mobile-First
   =========================================== */

/* Locations list pane */
.locations-list-pane {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Filter bar */
.locations-filter-bar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (min-width: 480px) {
    .locations-filter-bar {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 1rem;
    }
}

/* List container */
.locations-list-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.locations-list-loading {
    display: flex;
    justify-content: center;
    padding: 2rem;
}

/* Location card — stacked on mobile */
.location-card {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
    padding: 0.875rem 1rem;
}

.location-display {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.location-display-icon {
    flex-shrink: 0;
    color: var(--app-primary);
    font-size: 1.25rem;
}

.location-display-content {
    flex: 1;
    min-width: 0;
}

.location-display-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.location-display-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.location-display-identifier {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-code);
    padding: 0.0625rem 0.375rem;
    border-radius: 4px;
    font-family: monospace;
}

.location-display-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.location-display-counts {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    padding: 0.25rem 0;
}

.location-count {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.location-count-icon {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* location-card-actions: uses .entity-card-actions shared class */

/* location-details-btn: uses .entity-details-btn shared class (hover matches default) */

.location-card-placeholder {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
}

/* Desktop (640px+): card row layout */
@media (min-width: 640px) {
    .location-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    /* location-card-actions: desktop override handled by .entity-card-actions */

    .location-display-description {
        max-width: 400px;
    }
}

/* Action bar */
.locations-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    margin: 0 -1rem -1rem -1rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-subtle);
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .locations-action-bar {
        margin: 0 -1.5rem -1.5rem -1.5rem;
        padding: 0.75rem 1.5rem;
        flex-wrap: nowrap;
    }
}

/* ========================================
   Location Details Page — Entity-Specific
   ======================================== */

/* location-details-description: uses .details-description shared class */

.location-details-counts {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.location-details-count-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem 1.5rem;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    min-width: 100px;
    text-align: center;
}

.location-details-count-icon {
    font-size: 1.25rem;
    color: var(--app-primary);
}

.location-details-count-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.location-details-count-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Location Items List (Items tab) */
.location-items-list {
    min-height: 200px;
}

/* location-items-row: uses .list-row shared class */
/* location-items-title: uses .list-row-title shared class */

.location-items-year {
    flex-shrink: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.location-items-category {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-code);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

.location-items-placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* ========================================
   Items List Page — Mobile-First
   ======================================== */

.items-list-pane {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Filter bar */
.items-filter-bar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (min-width: 480px) {
    .items-filter-bar {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 1rem;
    }
}

/* List container */
.items-list-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.items-list-loading {
    display: flex;
    justify-content: center;
    padding: 2rem;
}

/* Item card — stacked on mobile */
.item-card {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
    padding: 0.875rem 1rem;
}

/* Item display (inside card) */
.item-display {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.item-display-icon {
    flex-shrink: 0;
    color: var(--app-primary);
    font-size: 1.25rem;
}

.item-display-content {
    flex: 1;
    min-width: 0;
}

.item-display-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.item-display-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-display-identifier {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-code);
    padding: 0.0625rem 0.375rem;
    border-radius: 4px;
    font-family: monospace;
}

.item-display-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

.item-display-category,
.item-display-status,
.item-display-location {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-code);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

.item-display-flags {
    flex-shrink: 0;
    padding: 0.25rem 0;
}

.item-flag-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background: var(--color-danger);
    border-radius: 50%;
    padding: 0 0.25rem;
}

/* item-card-actions: uses .entity-card-actions shared class */

/* item-details-btn: uses .entity-details-btn shared class (hover matches default) */

.item-card-placeholder {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
}

/* Desktop (640px+): card row layout */
@media (min-width: 640px) {
    .item-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    /* item-card-actions: desktop override handled by .entity-card-actions */
}

/* Action bar */
.items-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    margin: 0 -1rem -1rem -1rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-subtle);
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .items-action-bar {
        margin: 0 -1.5rem -1.5rem -1.5rem;
        padding: 0.75rem 1.5rem;
        flex-wrap: nowrap;
    }
}

/* ========================================
   Item Details Page — Entity-Specific
   ======================================== */

/* item-details-badges: uses .entity-details-badges shared class */
/* item-badge: uses .entity-badge shared class */

.item-badge-category {
    color: var(--app-primary);
    background: color-mix(in srgb, var(--app-primary) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--app-primary) 20%, transparent);
}

.item-badge-status {
    color: var(--text-secondary);
    background: var(--bg-code);
}

.item-badge-type {
    color: var(--text-muted);
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
}

/* item-details-description: uses .details-description shared class */

/* Item Loans List (Loans tab) */
.item-loans-list {
    min-height: 200px;
}

/* item-loans-row: uses .list-row shared class; gap override below */
.item-loans-row {
    gap: 0.75rem;
}

/* item-loans-family: uses .list-row-title shared class */

.item-loans-date,
.item-loans-due {
    flex-shrink: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.item-loans-status {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

.item-loans-status-active {
    color: var(--app-primary);
    background: color-mix(in srgb, var(--app-primary) 10%, transparent);
}

.item-loans-status-renewed {
    color: #b45309;
    background: #fef3c7;
}

.item-loans-status-returned {
    color: var(--text-muted);
    background: var(--bg-code);
}

.item-loans-placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* Item Parts List (Parts tab) */
.item-parts-list {
    min-height: 200px;
}

/* item-parts-row: uses .list-row shared class */
/* item-parts-title: uses .list-row-title shared class */

.item-parts-count {
    flex-shrink: 0;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    background: var(--bg-code);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: monospace;
}

.item-parts-placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* Item Externals List (Externals tab) */
.item-externals-list {
    min-height: 200px;
}

/* item-externals-row: uses .list-row shared class; gap override below */
.item-externals-row {
    gap: 0.75rem;
}

.item-externals-catalog {
    flex-shrink: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-code);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

.item-externals-id {
    flex: 1;
    min-width: 0;
    color: var(--text-primary);
    font-weight: 500;
    font-family: monospace;
}

.item-externals-refreshed {
    flex-shrink: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.item-externals-placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* Add Item Dialog */
.add-item-dialog {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.add-item-dialog p {
    margin: 0;
    color: var(--text-secondary);
}

.add-item-dialog-field {
    margin-bottom: 1rem;
}

.add-item-dialog-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.add-item-dialog-error {
    font-size: 0.875rem;
    color: var(--color-danger);
    background: var(--alert-danger-bg);
    border: 1px solid var(--alert-danger-border);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
}

.add-item-dialog-actions {
    display: flex;
    justify-content: flex-end;
}

/* ==========================================================================
   INSTANCES — List & Detail Components
   ========================================================================== */

/* Instance List Cards (Copies tab on Item details) */
.instance-display {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-white);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.instance-display:hover {
    border-color: var(--app-primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.instance-display-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.instance-display-identifier {
    font-family: var(--font-monospace, monospace);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.instance-display-status {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.1rem 0.375rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.instance-display-subtitle {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.instance-display-meta {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.instance-display-location {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.instance-display-flags {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--color-danger);
}

/* Instance Details — Breadcrumb */
.instance-details-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.instance-details-breadcrumb a {
    color: var(--app-primary);
    text-decoration: none;
}

.instance-details-breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--text-muted);
    font-weight: 300;
}

/* Instance Details — Subtitle & Badges */
.instance-details-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

/* instance-details-badges: uses .entity-details-badges shared class */
/* instance-badge: uses .entity-badge shared class */

/* Instance Details — Thumbnail */
.instance-thumbnail {
    max-width: 120px;
    max-height: 120px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid var(--border-light);
}

/* Instance Details — Redirect Page */
.instance-redirect-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-secondary);
}

.instance-redirect-error {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--alert-danger-bg);
    border: 1px solid var(--alert-danger-border);
    border-radius: 6px;
    color: var(--color-danger);
    font-size: 0.9375rem;
}

/* Instance Details — Action Buttons */
.instance-details-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Instance List Container (Copies tab) */
.item-instances-list {
    min-height: 200px;
}

.item-instances-row {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
}

.item-instances-row:hover {
    background: var(--bg-subtle);
}

.item-instances-placeholder {
    color: var(--text-muted);
    font-style: italic;
    cursor: default;
}

.item-instances-placeholder:hover {
    background: transparent;
}

.item-instances-add {
    padding: 0.75rem 0;
}

/* Instance Status Badges */
.instance-status-unknown {
    color: var(--text-muted);
    background: var(--bg-subtle);
}

.instance-status-entered {
    color: var(--text-secondary);
    background: var(--bg-code);
}

.instance-status-labeled {
    color: #1d4ed8;
    background: #dbeafe;
}

.instance-status-active {
    color: #16a34a;
    background: #f0fdf4;
}

.instance-status-loaned {
    color: #b45309;
    background: #fef3c7;
}

.instance-status-returned {
    color: #0d9488;
    background: #f0fdfa;
}

.instance-status-unavailable {
    color: var(--color-danger);
    background: #fef2f2;
}

.instance-status-removed {
    color: #737373;
    background: #f5f5f5;
}

.instance-status-forsale {
    color: #7c3aed;
    background: #f5f3ff;
}

/* ===========================================
   Loans List Page — Mobile-First
   =========================================== */

.loans-list-pane {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    gap: 0;
}

/* Filter bar */
.loans-filter-bar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 480px) {
    .loans-filter-bar {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
}

/* List container */
.loans-list-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.loans-list-loading {
    display: flex;
    justify-content: center;
    padding: 2rem;
}

/* Loan card — stacked on mobile */
.loan-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
}

/* Loan display (inside card) */
.loan-display {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.loan-display-icon {
    flex-shrink: 0;
    color: var(--app-primary);
    font-size: 1.5rem;
}

.loan-display-content {
    flex: 1;
    min-width: 0;
}

.loan-display-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.loan-display-item {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.loan-display-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
}

.loan-status-active {
    background-color: var(--bg-subtle);
    color: var(--text-secondary);
}

.loan-status-overdue {
    background-color: #fef2f2;
    color: var(--color-danger);
}

.loan-status-returned {
    background-color: #f0fdf4;
    color: #16a34a;
}

.loan-status-canceled {
    background-color: #f5f5f5;
    color: #737373;
}

.loan-display-family {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.loan-display-dates {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.loan-display-separator {
    color: var(--text-muted);
}

.loan-overdue {
    color: var(--color-danger);
    font-weight: 600;
}

.loan-display-renew {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    background-color: var(--bg-subtle);
}

/* Card actions (Details button area) */
.loan-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
}

.loan-details-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    border: 1px solid var(--border-default);
    border-radius: 0.375rem;
    background-color: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.loan-details-btn:hover {
    border-color: var(--app-primary);
    color: var(--app-primary);
}

.loan-card-placeholder {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

/* Desktop (640px+): card row layout */
@media (min-width: 640px) {
    .loan-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .loan-card-actions {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
}

/* Action bar */
.loans-action-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin: 0 -1rem -1rem -1rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-subtle);
    flex-wrap: wrap;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .loans-action-bar {
        margin: 0 -1.5rem -1.5rem -1.5rem;
        padding: 0.75rem 1.5rem;
        flex-wrap: nowrap;
    }
}

/* Loan Details Page */
/* ========================================
   Loan Details Page — Entity-Specific
   ======================================== */

.loan-details-status {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    margin-left: 0.5rem;
}

.loan-details-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.loan-details-info-row {
    display: flex;
    gap: 1rem;
    align-items: baseline;
}

.loan-details-info-label {
    font-weight: 500;
    color: var(--text-muted);
    min-width: 140px;
    font-size: 0.875rem;
}

.loan-details-info-value {
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* ==========================================================================
   DONATIONS — List Page
   ========================================================================== */

.donations-list-pane {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    width: 100%;
    gap: 0;
}

.donations-filter-bar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
}

.donations-list-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    width: 100%;
}

.donations-list-loading {
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.donation-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
}

.donation-display {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1;
}

.donation-display-icon {
    color: var(--rz-primary);
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 2rem;
    text-align: center;
}

.donation-display-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.donation-display-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.donation-display-date {
    font-size: 1rem;
    font-weight: 600;
}

.donation-display-flags {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--rz-warning);
    font-size: 0.8rem;
}

.donation-display-donor {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--rz-text-secondary-color);
    font-size: 0.875rem;
}

.donation-display-anonymous {
    font-style: italic;
    color: var(--rz-text-disabled-color);
}

.donation-display-summary {
    display: flex;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.donation-summary-amount {
    font-weight: 600;
    color: var(--rz-success);
}

.donation-summary-items {
    color: var(--rz-text-secondary-color);
}

.donation-card-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.75rem;
    margin-top: 0;
    border-top: 1px solid var(--rz-base-200);
}

.donation-details-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--rz-base-300);
    border-radius: var(--rz-border-radius);
    background: transparent;
    cursor: pointer;
    font-size: 0.813rem;
    color: var(--rz-text-color);
    transition: all 0.15s ease;
}

.donation-details-btn:hover {
    border-color: var(--rz-primary);
    color: var(--rz-primary);
}

.donation-card-placeholder {
    padding: 1rem;
    text-align: center;
    color: var(--rz-text-secondary-color);
}

.donations-action-bar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--rz-base-200);
    border-radius: var(--rz-border-radius);
    flex-shrink: 0;
}

@media (min-width: 480px) {
    .donations-filter-bar {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
}

@media (min-width: 640px) {
    .donation-card {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .donation-card-actions {
        border-top: none;
        padding-top: 0;
        margin-top: 0;
    }

    .donations-action-bar {
        flex-wrap: nowrap;
        border: none;
        border-top: 1px solid var(--rz-base-200);
        border-radius: 0;
    }
}

/* ==========================================================================
   DONATIONS — Details Page
   ========================================================================== */

/* ========================================
   Donation Details Page — Entity-Specific
   ======================================== */

.donation-details-date {
    color: var(--rz-text-secondary-color);
    font-size: 0.875rem;
}

.donation-details-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.donation-details-field {
    display: flex;
    gap: 0.5rem;
}

.donation-details-label {
    font-weight: 600;
    font-size: 0.875rem;
    min-width: 5rem;
}

.donation-details-value {
    font-size: 0.875rem;
}

.donation-details-counts {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.donation-details-count-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--rz-base-200);
    border-radius: var(--rz-border-radius);
    min-width: 6rem;
}

.donation-details-count-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.donation-details-count-label {
    font-size: 0.75rem;
    color: var(--rz-text-secondary-color);
    text-transform: uppercase;
}

/* Donation tab lists */
.donation-amounts-list,
.donation-items-list {
    max-height: 400px;
    overflow-y: auto;
}

.donation-amounts-row,
.donation-items-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--rz-base-100);
    font-size: 0.875rem;
}

.donation-amounts-source {
    font-weight: 600;
    min-width: 5rem;
}

.donation-amounts-gross {
    font-weight: 600;
    color: var(--rz-success);
}

.donation-amounts-identifier {
    color: var(--rz-text-secondary-color);
    font-size: 0.8rem;
}

.donation-items-category {
    font-weight: 600;
    min-width: 4rem;
}

.donation-items-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.donation-items-count {
    color: var(--rz-text-secondary-color);
}

.donation-items-value {
    font-weight: 600;
    color: var(--rz-success);
}

.donation-amounts-placeholder,
.donation-items-placeholder {
    color: var(--rz-text-secondary-color);
}

/* External Change Alert */

.external-change-alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    background-color: var(--rz-warning-lighter);
    border: 1px solid var(--rz-warning);
    border-radius: var(--rz-border-radius);
    font-size: 0.875rem;
    color: var(--rz-warning-darker);
}

/* ==========================================================================
   FLOWHOST — Wizard Nav Defaults
   ==========================================================================
   FlowHost (SoftCrow.Razor.Flow) renders unstyled
   `.flow-nav-bar > .flow-nav-buttons > [Cancel?][Back][Next/Submit]`.
   Defaults:
     - With Cancel (3 buttons):  [Cancel]---------[Back]-[Next]
     - Without Cancel (2 buttons):           ----[Back]-[Next]
   Cancel uses RadzenButton ButtonStyle.Light (`rz-button-light`), so we push
   that one to the far left when present and right-align the rest.
   Apps can override per-context (e.g., add-item-wizard uses sticky bottom
   instead of margin-top spacing).
   ========================================================================== */

.flow-nav-bar {
    margin-top: var(--space-6);
}

.flow-nav-bar .flow-nav-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-3);
}

.flow-nav-bar .flow-nav-buttons > .rz-button-light {
    margin-right: auto;
}

/* Alert Dialog (AlertsCheck popup) */
.alert-dialog {
    padding: 0.5rem 0.25rem;
}

.alert-dialog .alert-agree {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1rem;
    cursor: pointer;
}

.alert-dialog .alert-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.alert-dialog .alert-terms-list {
    padding-left: 1.25rem;
    margin: 0.75rem 0;
}

.alert-dialog .alert-terms-list li {
    margin-bottom: 0.5rem;
}

.alert-dialog .alert-terms-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 1rem;
}
