/* Shared design system — ported from new-design/Perfect HOA Redesign.dc.html tokens.
   Used by any page being migrated to the new design (Vendors, Work Orders, ...).
   Loaded globally via app.js so it's a stable, cacheable stylesheet — never inlined
   per-page, which caused a visible style flash on Turbo Drive navigations. */
.vx-wrap { display: flex; flex-direction: column; gap: 20px; }

.vx-breadcrumb { font-size: 13px; color: #8892A8; display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.vx-breadcrumb a { color: #3B6EF6; font-weight: 600; text-decoration: none; }
.vx-breadcrumb-sep { color: #C2CAD8; }

.vx-page-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.vx-page-title { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; color: #1C2540; margin: 0; }
.vx-page-subtitle { font-size: 13px; color: #8892A8; margin-top: 2px; }
.vx-header-actions { display: flex; align-items: center; gap: 10px; }

.vx-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 42px; padding: 0 18px; border-radius: 10px; font-size: 14px; font-weight: 700;
    cursor: pointer; text-decoration: none; border: none; white-space: nowrap;
}
.vx-btn-primary { background: #3B6EF6; color: #fff; }
.vx-btn-primary:hover { background: #2F5BD8; color: #fff; }
.vx-btn-secondary { background: #fff; border: 1px solid #D9E0EC; color: #3D486A; }
.vx-btn-secondary:hover { border-color: #3B6EF6; color: #3B6EF6; }
.vx-btn-success { background: #E4F6EC; color: #1FA463; }
.vx-btn-success:hover { background: #D5F0E0; color: #1FA463; }
.vx-btn-danger { background: #FDECEC; color: #E5484D; }
.vx-btn-danger:hover { background: #FBDADA; color: #E5484D; }
.vx-btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }

.vx-card { background: #fff; border: 1px solid #E3E8F0; border-radius: 16px; overflow: hidden; }
.vx-card-pad { padding: 24px 26px; }

.vx-filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vx-search-wrap { position: relative; flex: 1; min-width: 220px; }
.vx-search-wrap svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94A0B8; }
.vx-input, .vx-select {
    width: 100%; box-sizing: border-box; height: 42px; padding: 0 14px; border: 1px solid #D9E0EC;
    border-radius: 10px; font-size: 14px; color: #1C2540; outline: none; font-family: inherit; background: #fff;
}
.vx-search-wrap .vx-input { padding-left: 40px; }
.vx-input:focus, .vx-select:focus { border-color: #3B6EF6; box-shadow: 0 0 0 3px rgba(59,110,246,.12); }
.vx-filter-actions { display: flex; gap: 8px; }

.vx-table { width: 100%; border-collapse: collapse; }
.vx-table thead th {
    background: transparent; border: none; border-bottom: 1px solid #EEF1F6;
    font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
    color: #94A0B8; padding: 12px 20px; text-align: left;
}
.vx-table tbody td { padding: 14px 20px; border-top: 1px solid #F2F5FA; vertical-align: middle; font-size: 14px; color: #1C2540; }
.vx-table tbody tr:hover { background: #FaFbFf; }
.vx-table a { text-decoration: none; }

.vx-avatar {
    width: 40px; height: 40px; border-radius: 10px; color: #fff; display: flex; align-items: center;
    justify-content: center; font-size: 13.5px; font-weight: 800; flex-shrink: 0;
}
.vx-avatar-sm { width: 30px; height: 30px; border-radius: 8px; font-size: 11.5px; }
.vx-avatar-lg { width: 56px; height: 56px; border-radius: 12px; font-size: 20px; }
.vx-avatar-0 { background: #3B6EF6; }
.vx-avatar-1 { background: #12A594; }
.vx-avatar-2 { background: #7A4DED; }
.vx-avatar-3 { background: #B47A08; }
.vx-avatar-4 { background: #E5484D; }
.vx-avatar-5 { background: #C0398B; }

.vx-item-name { font-size: 14.5px; font-weight: 700; color: #1C2540; }
.vx-item-sub { font-size: 12.5px; color: #8892A8; margin-top: 2px; }

.vx-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 11px; border-radius: 20px; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.vx-badge-active { color: #1FA463; background: #E4F6EC; }
.vx-badge-inactive { color: #8892A8; background: #F1F4FA; }
.vx-pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px; display: inline-block; white-space: nowrap; }

.vx-icon-btn {
    width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0; text-decoration: none; border: none;
}
.vx-icon-btn-danger { background: #FDE9EC; color: #E5484D; }
.vx-icon-btn-danger:hover { background: #E5484D; color: #fff; }

/* Guards against "ghost clicks": when a Turbo Stream swaps this element in right after a
   form submit, a mouse that hasn't moved can trigger an unintended click on whatever now
   sits under the cursor, since browsers fire click based on mouseup position, not mousedown.
   Blocking pointer-events for a brief window absorbs that stray mouseup. */
.turbo-swap-guard { pointer-events: none; animation: turbo-swap-guard-release .3s step-end forwards; }
@keyframes turbo-swap-guard-release { to { pointer-events: auto; } }

.vx-empty { text-align: center; padding: 60px 20px; }
.vx-empty > i { font-size: 3rem; color: #cbd5e1; }
.vx-empty h4 { font-size: 16px; font-weight: 800; color: #1C2540; margin: 14px 0 6px; }
.vx-empty p { font-size: 13.5px; color: #8892A8; margin: 0 0 18px; }

/* Detail page */
.vx-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px; flex-wrap: wrap; }
.vx-detail-identity { display: flex; align-items: flex-start; gap: 18px; }
.vx-detail-name { font-size: 23px; font-weight: 800; letter-spacing: -0.01em; color: #1C2540; }
.vx-detail-meta { display: flex; align-items: center; gap: 18px; margin-top: 14px; font-size: 13.5px; color: #59647E; flex-wrap: wrap; }
.vx-detail-meta i { color: #94A0B8; margin-right: 6px; }
.vx-detail-actions { display: flex; flex-direction: column; gap: 10px; min-width: 180px; }

.vx-tabs { display: flex; align-items: center; gap: 26px; padding: 0 26px; border-bottom: 1px solid #EEF1F6; overflow-x: auto; }
.vx-tab {
    display: flex; align-items: center; gap: 8px; padding: 16px 0; font-size: 13.5px; font-weight: 700;
    color: #8892A8; border-bottom: 2px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.vx-tab.active { color: #3B6EF6; border-bottom-color: #3B6EF6; }
.vx-tab-panel { padding: 24px 26px; display: none; }
.vx-tab-panel.active { display: block; }

.vx-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.vx-stat-box { border: 1px solid #E8ECF3; border-radius: 12px; padding: 16px; }
.vx-stat-box-value { font-size: 24px; font-weight: 800; color: #1C2540; line-height: 1; }
.vx-stat-box-label { font-size: 12.5px; color: #8892A8; margin-top: 6px; font-weight: 600; }

/* Stat card w/ icon circle (list-page KPI style) */
.vx-stat-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.vx-stat-card { background: #fff; border: 1px solid #E3E8F0; border-radius: 14px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; }
.vx-stat-card-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 800; flex-shrink: 0; }
.vx-stat-card-label { font-size: 13.5px; font-weight: 700; color: #59647E; }

.vx-info-card { background: #fff; border: 1px solid #E3E8F0; border-radius: 16px; overflow: hidden; }
.vx-info-card-head {
    background: #FaFbFe; border-bottom: 1px solid #EEF1F6; padding: 14px 20px;
    font-size: 13px; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; color: #94A0B8;
}
.vx-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 26px; padding: 22px 20px; }
.vx-info-label { font-size: 12.5px; font-weight: 800; color: #94A0B8; text-transform: uppercase; letter-spacing: 0.03em; }
.vx-info-value { font-size: 14.5px; color: #1C2540; margin-top: 6px; }

.vx-contact-card {
    border: 1px solid #E8ECF3; border-radius: 13px; padding: 18px; display: flex; flex-direction: column; gap: 14px;
}
.vx-contact-card:hover { border-color: #C9D6EC; box-shadow: 0 4px 14px rgba(20,30,70,.05); }
.vx-contact-name { font-size: 15px; font-weight: 800; color: #1C2540; }
.vx-contact-role { font-size: 12.5px; color: #8892A8; margin-top: 2px; }
.vx-primary-badge { font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; color: #1FA463; background: #E4F6EC; padding: 4px 9px; border-radius: 20px; white-space: nowrap; }
.vx-contact-detail-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #3D486A; }
.vx-contact-detail-row i { color: #94A0B8; flex-shrink: 0; }

/* Form pages */
.vx-form-grid { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .vx-form-grid { grid-template-columns: 1fr; } }
.vx-form-section-title { font-size: 16px; font-weight: 800; color: #1E2A63; margin-bottom: 20px; }
.vx-form-sidebar-title { font-size: 15px; font-weight: 800; color: #1E2A63; margin-bottom: 6px; }
.vx-form-group { margin-bottom: 18px; }
.vx-form-label { font-size: 13px; font-weight: 700; color: #3D486A; margin-bottom: 7px; display: block; }
.vx-form-label .vx-required { color: #E5484D; }
.vx-form-divider { height: 1px; background: #EEF1F6; margin: 20px 0; }
.vx-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.vx-form-row-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.vx-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vx-toggle-title { font-size: 13.5px; font-weight: 700; color: #3D486A; }
.vx-toggle-desc { font-size: 12px; color: #8892A8; margin-top: 2px; }

/* Toggle switch — checkbox visually hidden, adjacent track styled via :checked sibling selector.
   Avoids fighting Bootstrap's .form-check-input background-image styling entirely. */
.vx-toggle-wrap { position: relative; width: 42px; height: 24px; flex-shrink: 0; display: inline-block; }
.vx-toggle-wrap input[type="checkbox"] {
    position: absolute !important; inset: 0 !important; width: 42px !important; height: 24px !important;
    margin: 0 !important; opacity: 0 !important; cursor: pointer; z-index: 1;
}
.vx-toggle-track {
    position: absolute; inset: 0; border-radius: 20px; background: #D4DBE8; pointer-events: none;
    transition: background-color .15s;
}
.vx-toggle-track::before {
    content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s;
}
.vx-toggle-wrap:has(input[type="checkbox"]:checked) .vx-toggle-track { background: #3B6EF6; }
.vx-toggle-wrap:has(input[type="checkbox"]:checked) .vx-toggle-track::before { transform: translateX(18px); }

.vx-upload-zone {
    display: flex; flex-direction: column; align-items: center; gap: 8px; border: 1.5px dashed #C7D2E6;
    border-radius: 11px; padding: 18px; cursor: pointer; text-align: center;
}
.vx-upload-zone:hover { border-color: #3B6EF6; background: #F7F9FE; }
.vx-upload-zone i { color: #8FA0BE; font-size: 22px; }
.vx-upload-zone-title { font-size: 12.5px; font-weight: 700; color: #3D486A; }
.vx-upload-zone-sub { font-size: 11.5px; color: #94A0B8; }

.vx-input[type="file"] { display: none; }

/* Activity feed (work order / violation / request detail) */
.vx-activity-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px; }
.vx-activity-icon { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vx-activity-text { font-size: 13.5px; color: #2A3352; line-height: 1.5; }
.vx-activity-time { font-size: 12px; color: #94A0B8; margin-top: 3px; }
.vx-activity-composer { padding: 14px 22px; border-top: 1px solid #EEF1F6; display: flex; gap: 10px; align-items: center; }

/* Action drop-up menu */
.vx-action-trigger {
    width: 44px; height: 44px; border-radius: 10px; border: 1px solid #D9E0EC; display: flex; align-items: center;
    justify-content: center; color: #3B6EF6; cursor: pointer; background: #fff; flex-shrink: 0;
}
.vx-action-trigger:hover { background: #F2F6FF; border-color: #B9CCF5; }
.vx-action-menu {
    position: absolute; bottom: calc(100% + 10px); left: 0; z-index: 41; width: 246px; background: #fff;
    border: 1px solid #E7ECF4; border-radius: 13px; box-shadow: 0 18px 44px -12px rgba(20,30,70,.32);
    padding: 6px;
}
.vx-action-menu-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; cursor: pointer; text-decoration: none; color: inherit; }
.vx-action-menu-item:hover { background: #F5F8FF; }
.vx-action-menu-icon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Expanded ChoiceType (radio) rendered as clickable pills, e.g. Priority selector */
/* Symfony wraps the radio group in an extra div (choice_widget_expanded), so the
   flex layout must cascade one level down to reach the individual .form-check pills */
.vx-pill-group, .vx-pill-group > div { display: flex; gap: 8px; flex-wrap: wrap; }
.vx-pill-group .form-check { position: relative; margin: 0; padding: 0; }
.vx-pill-group input[type="radio"] {
    position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important;
    margin: 0 !important; opacity: 0 !important; cursor: pointer; z-index: 1;
}
.vx-pill-group label.required:after { content: '' !important; }
.vx-pill-group label {
    display: flex; align-items: center; justify-content: center; height: 38px; padding: 0 16px;
    border: 1px solid #D9E0EC; border-radius: 9px; font-size: 13.5px; font-weight: 700; color: #59647E;
    cursor: pointer; white-space: nowrap; transition: all .12s ease; margin: 0;
}
.vx-pill-group .form-check:has(input:checked) label { background: #3B6EF6; border-color: #3B6EF6; color: #fff; }
