/* =====================================================
   SHARED PAGE STYLES
   Used by: ClientProfile, PropertyView, and other detail pages
   ===================================================== */

/* ===== PAGE STRUCTURE ===== */
.profile-page {
    display: flex;
    flex-direction: column;
}

/* ===== CENTERED SCROLL PATTERN =====
   Use when you need centered content with scrollbar at far right edge.
   The outer container handles scrolling (full width), inner handles centering.

   Usage:
   <div class="centered-scroll">
       <div class="centered-scroll-inner">
           ...content...
       </div>
   </div>

   Variants:
   - .centered-scroll-inner (default: 800px max-width)
   - .centered-scroll-inner.narrow (600px)
   - .centered-scroll-inner.wide (1000px)
   - .centered-scroll-inner.full (no max-width)
*/
.centered-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 32px 48px;
}

.centered-scroll-inner {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.centered-scroll-inner.narrow {
    max-width: 600px;
}

.centered-scroll-inner.wide {
    max-width: 1000px;
}

.centered-scroll-inner.full {
    max-width: none;
}

.profile-loading,
.profile-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: #64748b;
}

.profile-loading i,
.profile-error i {
    font-size: 32px;
    margin-bottom: 12px;
}

/* ===== CARD THEMING =====
   Context-aware card styles for visual hierarchy.

   Usage:
   - Grey background (#f1f5f9) → use .card (white + shadow)
   - White background → use .card-tinted (grey tint, no shadow)

   Cards always contrast with their container.
*/
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s ease;
}

.card-tinted {
    background: #f8fafc;
    border-radius: 12px;
    /* no shadow - tint provides visual lift */
}

/* Hover states (optional - add .card-hover for interactive cards) */
.card-hover:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-2px);
    cursor: pointer;
}

.card-tinted.card-hover:hover {
    background: #f1f5f9;
}

/* ===== PILLS NAVIGATION ===== */
.profile-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    z-index: 20;
}

.profile-pill {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.profile-pill:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.profile-pill.active {
    background: #1e3a5f;
    color: white;
}

/* ===== TAB NAVIGATION (Underline indicator style) ===== */
/* Clean bar, active tab marked by animated blue underline */
.page-tabs {
    display: flex;
    align-items: stretch;
    align-self: stretch;
    gap: 0;
    padding: 0 28px;
}

.page-tab {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.2s ease;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    position: relative;
}

/* Animated underline - draws in from center */
.page-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #3b82f6;
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

.page-tab:hover {
    color: #1e293b;
}

.page-tab:active {
    color: #3b82f6;
}

.page-tab.active {
    color: #3b82f6;
    font-weight: 600;
    border-bottom-color: transparent;
}

.page-tab.active::after {
    transform: scaleX(1);
}

/* ===== NAV BAR WITH ACTIONS ===== */
.profile-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #eaecf0;
    border-bottom: 1px solid #e2e8f0;
    padding-right: 28px;
}

.profile-nav-bar .profile-pills {
    border-bottom: none;
    flex: 1;
}

/* Nav bar actions button spacing for tabs */
.profile-nav-bar .actions-btn {
    margin: 8px 0;
}

.actions-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px;
    background: #e8f4fc;
    color: #1e3a5f;
    border: 1px solid #c5dff0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.15s ease;
}

.actions-btn:hover {
    background: #d1ebfa;
    border-color: #9ecae8;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.actions-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.actions-btn i {
    font-size: 10px;
}

/* ===== CONTENT ENTRANCE ANIMATION ===== */
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== TWO COLUMN LAYOUT ===== */
.profile-columns {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    padding: 24px 28px 28px 28px;
    animation: fadeSlideIn 0.25s ease-out;
}

/* ===== LEFT: CARD ===== */
.profile-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s ease;
    align-self: start;
}

.profile-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ===== RIGHT: CONTENT AREA ===== */
.profile-content {
    min-width: 0;
}

/* ===== CARD HEADER ===== */
.card-header {
    margin-bottom: 16px;
}

.card-name {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}

.card-type {
    font-size: 13px;
    color: #64748b;
}

/* ===== CARD PHOTO ===== */
.card-photo {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
    cursor: pointer;
}

.card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

.photo-placeholder i {
    font-size: 64px;
    color: #94a3b8;
}

/* Initials fallback when no photo (ClientProfile specific but shared) */
.photo-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
}

/* Hover overlay with camera icon */
.photo-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.photo-hover-overlay i {
    font-size: 32px;
    color: rgba(255, 255, 255, 0.5);
}

.card-photo:hover .photo-hover-overlay {
    opacity: 1;
}

/* Drag-over state for photo drop */
.card-photo.photo-drag-over {
    outline: 3px dashed #3b82f6;
    outline-offset: -3px;
}

.card-photo.photo-drag-over .photo-hover-overlay {
    opacity: 1;
    background: rgba(59, 130, 246, 0.4);
}

/* ===== CARD SECTIONS ===== */
.card-section {
    margin-top: 16px;
}

.card-section-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}

/* Contact Rows */
.card-contact-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 6px 0;
    font-size: 14px;
    color: #1e3a5f;
}

.card-contact-row i {
    width: 16px;
    color: #3b82f6;
    text-align: center;
    margin-top: 2px;
    flex-shrink: 0;
}

.card-contact-row > span {
    flex: 1;
}

.card-contact-row a {
    color: #1e3a5f;
    text-decoration: none;
}

.card-contact-row a:hover {
    text-decoration: underline;
}

.card-copy-btn {
    padding: 4px 6px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.card-copy-btn:hover {
    background: #f1f5f9;
    color: #1e3a5f;
}

/* Address styling */
.card-address {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.card-address span {
    line-height: 1.5;
}

/* Value display (for property values, etc.) */
.card-value {
    font-size: 24px;
    font-weight: 700;
    color: #059669;
}

.card-value-date {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

/* ===== CONTENT GRID ===== */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.profile-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s ease;
}

.profile-section:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.profile-section-full {
    background: white;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 16px;
    transition: box-shadow 0.2s ease;
}

.profile-section-full:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.profile-section-full:last-child {
    margin-bottom: 0;
}

/* ===== TYPOGRAPHY ===== */
.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 12px 0;
}

/* ===== SECTION HEADER WITH ACTIONS ===== */
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.section-header-row .section-title {
    margin: 0;
}

.add-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #1e3a5f;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
}

.add-link:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.add-link i {
    font-size: 11px;
}

/* ===== DATA DISPLAY ===== */
.data-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.data-item {
    display: flex;
    align-items: baseline;
    padding: 10px 0;
}

.data-label {
    font-size: 14px;
    color: #64748b;
    width: 120px;
    flex-shrink: 0;
}

.data-value {
    font-size: 14px;
    font-weight: 400;
    color: #1e293b;
}

.notes-text {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
}

/* ===== PHOTOS TAB - Full width with standard margins ===== */
.photos-tab {
    padding: 24px 20px 28px 28px;
}

/* ===== EMPTY TAB STATE ===== */
.empty-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px;
    text-align: center;
    margin-right: 20px;
}

.empty-tab i {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.empty-tab h4 {
    font-size: 18px;
    color: #475569;
    margin: 0 0 8px;
}

.empty-tab p {
    font-size: 14px;
    color: #94a3b8;
    margin: 0 0 24px;
}

/* ===== BUTTONS ===== */
.btn-primary {
    padding: 10px 20px;
    background: #1e3a5f;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #2d4a6f;
}

/* ===== LIST PAGE PATTERN =====
   Reusable pattern for card list pages: Chattels, Property, Clients, etc.
   ================================ */

/* List page container */
.list-page {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* List toolbar - search, filters, actions */
.list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px 0;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Uniform control height for toolbar elements */
.list-toolbar .search-box,
.list-toolbar .filter-btn,
.list-toolbar .btn-primary {
    height: 40px;
    box-sizing: border-box;
}

/* Search box */
.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-width: 240px;
    height: 40px;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

.search-box:focus-within {
    border-color: #cbd5e1;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.15);
}

.search-box i {
    color: #94a3b8;
    font-size: 14px;
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: none;
    background: none;
    box-shadow: none;
    font-size: 14px;
    font-family: inherit;
    color: #1e293b;
    outline: none;
    padding: 0;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
}

.search-box input::placeholder {
    color: #94a3b8;
}

.search-box input:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

/* Filter button */
.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #475569;
    cursor: pointer;
    height: 40px;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

.filter-btn:hover {
    border-color: #cbd5e1;
}

.filter-btn.active {
    background: #f0f9ff;
    border-color: #cbd5e1;  /* Subtle - matches system, not harsh dark line */
    color: #1e3a5f;
}

.filter-btn i {
    font-size: 10px;
    color: #94a3b8;
}

/* Total value display */
.total-value {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.total-label {
    font-size: 13px;
    color: #64748b;
}

.total-amount {
    font-size: 18px;
    font-weight: 600;
    color: #1e3a5f;
}

/* ===== LIST PAGE HEADER COMPONENT =====
   Consistent banner for all list/card pages
   ================================ */

.list-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 24px;
    background: #eaecf0;
    border-bottom: 1px solid #e2e8f0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Status area - scanning/processing indicators */
.header-status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.scan-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #0369a1;
    animation: scan-fadeIn 0.2s ease;
}

.scan-status.complete {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}

.scan-status.fading {
    animation: scan-fadeOut 0.5s ease forwards;
}

.scan-status i {
    font-size: 0.85rem;
}

.scan-status .hint {
    color: #64748b;
    font-size: 0.75rem;
    margin-left: 4px;
}

@keyframes scan-fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes scan-fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Total pill - the anchor/hero element */
.header-total {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
}

.header-total .total-label {
    display: none; /* Label is noise - value is self-evident */
}

.header-total .total-amount {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1;
}

/* Asset = green */
.header-total.asset .total-amount {
    color: #16a34a;
}

/* Liability = red */
.header-total.liability .total-amount {
    color: #dc2626;
}

/* Neutral = Prussian blue (default) */
.header-total.neutral .total-amount {
    color: #1e3a5f;
}

/* Protection = blue (for insurance/cover amounts) */
.header-total.protection .total-amount {
    color: #2563eb;
}

/* Header count display (optional, separate from pill) */
.header-count {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding-right: 16px;
    border-right: 1px solid #e2e8f0;
}

.header-count .count-number {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e3a5f;
}

.header-count .count-label {
    font-size: 0.875rem;
    color: #64748b;
}

/* Secondary/Soft CTA button - available but not urgent */
.list-page-header .btn-primary {
    height: 40px;
    padding: 0 16px;
    background: #e8f4fc;
    color: #1e3a5f;
    border: 1px solid #c5dff0;
    box-shadow: none;
    box-sizing: border-box;
}

.list-page-header .btn-primary:hover {
    background: #d1ebfa;
    border-color: #9ecae8;
}

.list-page-header .btn-primary:active {
    background: #bae0f7;
}

/* List content area */
.list-content {
    flex: 1;
    padding: 20px 0 24px 24px;  /* No right padding - scrollbar hugs the edge */
    overflow-y: auto;
    animation: fadeSlideIn 0.25s ease-out;
}

/* Card grids inside list-content need right padding for breathing room */
.list-content > .card-grid,
.list-content > .card-grid-visual,
.list-content > .card-grid-compact {
    padding-right: 24px;
}

/* ================================
   DETAIL PAGE PATTERN
   For scrollable detail/view pages (Account View, Client Detail, etc.)
   ================================ */

.detail-page {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.detail-page-content {
    flex: 1;
    padding: 24px 0 24px 24px;  /* No right padding - scrollbar hugs the edge */
    overflow-y: auto;
}

.detail-page-content > * {
    margin-right: 24px;  /* Content breathing room */
}

.detail-page-content > *:last-child {
    margin-right: 24px;
}

/* Card grid - default */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Card grid - visual: larger cards for photo-heavy content (Chattels, Property)
   Targets 4 cards (Charlie closed) / 3 cards (Charlie open) */
.card-grid-visual {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

/* Card grid - compact: denser layout for data-heavy content (Portfolios, Banking)
   Targets 4-5 cards across with tighter spacing */
.card-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

/* Loading state */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    color: #64748b;
}

.loading-state i {
    font-size: 32px;
    margin-bottom: 16px;
}

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s ease;
    text-align: center;
}

.empty-state i {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px;
}

.empty-state p {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 24px;
}

/* Dropdown selected state (for filter menus) */
.dropdown-item.selected {
    background: #f0f9ff;
    color: #1e3a5f;
}

/* ===== DETAIL PAGE PATTERN =====
   Hero-focused layout for viewing single items (Chattels, Property)
   ================================ */

/* Detail page container */
.detail-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f1f5f9;  /* Must match tab active color */
}

/* Scrollable content area */
.detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 0 24px 24px;  /* No right padding - scrollbar hugs the edge */
}

.detail-content > * {
    margin-right: 24px;  /* Content breathing room */
}

/* Hero block: Photo + Info side by side */
.hero-block {
    display: flex;
    gap: 24px;
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    transition: box-shadow 0.2s ease;
}

.hero-block:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Hero photo - 4:3 aspect ratio */
.hero-photo {
    position: relative;
    width: 320px;
    flex-shrink: 0;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #f1f5f9;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.hero-photo-placeholder i {
    font-size: 4rem;
    color: #94a3b8;
}

.hero-photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.hero-photo-overlay i {
    font-size: 2rem;
    color: white;
}

.hero-photo:hover .hero-photo-overlay {
    opacity: 1;
}

/* Hero info */
.hero-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

/* Back link above title - badge style */
.hero-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    margin-bottom: 6px;
    padding: 4px 10px 4px 8px;
    background: #f1f5f9;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.hero-back-link:hover {
    background: #e2e8f0;
    color: #1e3a5f;
}

.hero-back-link i {
    font-size: 0.75rem;
    color: #94a3b8;
}

.hero-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e3a5f;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.edit-pencil {
    background: none;
    border: none;
    padding: 6px 8px;
    cursor: pointer;
    color: #94a3b8;
    font-size: 0.875rem;
    border-radius: 4px;
    transition: all 0.15s ease;
    margin-bottom: 8px;
}

.edit-pencil:hover {
    color: #1e3a5f;
    background: #f1f5f9;
}

.hero-value {
    margin-bottom: 12px;
}

.hero-value .value-amount {
    font-size: 2rem;
    font-weight: 700;
    color: #1e3a5f;
}

.hero-value .value-amount.not-valued {
    font-size: 1.25rem;
    font-weight: 400;
    color: #94a3b8;
    font-style: italic;
}

.hero-value .value-date {
    display: block;
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 2px;
}

.hero-type {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 8px;
}

.hero-type i {
    color: #94a3b8;
}

.hero-subtype {
    color: #94a3b8;
}

.hero-subtype::before {
    content: "•";
    margin-right: 8px;
}

.hero-location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #64748b;
}

.hero-location i {
    color: #94a3b8;
}

/* Collection badge in hero - clickable */
.hero-collection-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-left: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}

.hero-collection-badge:hover {
    background: #bae6fd;
    color: #0c4a6e;
}

.hero-collection-badge i {
    font-size: 0.75rem;
}

/* Detail panel */
.detail-panel {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    transition: box-shadow 0.2s ease;
}

.detail-panel:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.detail-panel:last-child {
    margin-bottom: 0;
}

.panel-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e3a5f;
    margin: 0 0 16px 0;
}

/* Panel grid - two columns for data items */
.panel-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 32px;
}

.panel-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.panel-label {
    font-size: 0.8125rem;
    color: #64748b;
}

.panel-value {
    font-size: 0.9375rem;
    color: #1e293b;
    font-weight: 500;
}

.panel-value.gain {
    color: #059669;
}

.panel-value.loss {
    color: #dc2626;
}

.panel-value-sub {
    font-weight: 400;
    color: #64748b;
}

.panel-notes {
    font-size: 0.9375rem;
    color: #475569;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
}

/* =====================================================
   INFO CARDS - Standard data display cards
   Use for displaying key-value pairs in card layouts
   (e.g., Personal Info, Contact Details, Bank Details)
   ===================================================== */

/* Container for horizontal row of cards */
.info-cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* The card itself */
.info-card {
    background: white;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s ease;
}

.info-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Card title with underline */
.info-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

/* Rows of label/value pairs */
.info-row {
    display: flex;
    align-items: baseline;
    padding: 8px 0;
}

.info-row .label {
    font-size: 14px;
    color: #64748b;
    width: 120px;
    flex-shrink: 0;
}

.info-row .value {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    flex: 1;
}

/* Multi-line value (e.g., address) - stack child spans vertically */
.info-row .value.multiline {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-row .value.multiline span {
    display: block;
}

/* Mono-spaced value (e.g., NI number, sort code) */
.info-row .value.mono {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    letter-spacing: 0.5px;
}

/* Empty/placeholder value */
.info-row .value.empty {
    color: #94a3b8;
    font-weight: 400;
}

/* Status badges within info cards */
.info-badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.info-badge.active {
    background: #d1fae5;
    color: #059669;
}

.info-badge.pending {
    background: #fef3c7;
    color: #d97706;
}

.info-badge.inactive,
.info-badge.suspended {
    background: #fee2e2;
    color: #dc2626;
}

.info-badge.neutral {
    background: #f1f5f9;
    color: #64748b;
}

.info-badge.info {
    background: #e0e7ff;
    color: #4f46e5;
}

/* Empty state for card with no data */
.info-card-empty {
    color: #94a3b8;
    font-size: 14px;
    padding: 12px 0;
}

/* Panel skeleton - shows while loading extras */
.panel-skeleton {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.skeleton-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-text {
    height: 16px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Panel header with action button */
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.panel-header .panel-title {
    margin: 0;
}

.panel-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f1f5f9;
    border: none;
    border-radius: 6px;
    font-size: 0.8125rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}

.panel-action-btn:hover {
    background: #e2e8f0;
    color: #1e3a5f;
}

/* ===== OWNERSHIP SECTION ===== */
.ownership-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.owner-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.owner-row.implied {
    border-style: dashed;
    background: #fafbfc;
}

.owner-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.owner-info > i {
    color: #64748b;
    font-size: 0.875rem;
}

.owner-name {
    font-weight: 500;
    color: #1e293b;
}

.owner-label {
    color: #94a3b8;
    font-size: 0.875rem;
}

.owner-badge {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.owner-badge.primary {
    background: #dbeafe;
    color: #1e40af;
}

.owner-tenure {
    color: #64748b;
    font-size: 0.8125rem;
}

.owner-percentage {
    font-weight: 600;
    color: #1e3a5f;
    min-width: 60px;
    text-align: right;
}

.owner-remove-btn {
    padding: 6px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #94a3b8;
    cursor: pointer;
    opacity: 0;
    transition: all 0.15s ease;
}

.owner-row:hover .owner-remove-btn {
    opacity: 1;
}

.owner-remove-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

.ownership-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 12px 0 0 0;
    padding: 12px;
    background: #fffbeb;
    border-radius: 6px;
    font-size: 0.8125rem;
    color: #92400e;
}

.ownership-hint i {
    color: #d97706;
    margin-top: 2px;
}

/* Ownership display (read-only on detail view) */
.ownership-display {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.owner-display-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.owner-display-row .owner-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.owner-display-row .owner-info i {
    color: #64748b;
    font-size: 0.875rem;
}

.owner-display-row .owner-name {
    font-weight: 500;
    color: #1e293b;
    font-size: 0.875rem;
}

.owner-display-row .owner-percentage {
    font-weight: 600;
    color: #1e3a5f;
    font-size: 0.875rem;
}

.panel-empty-text {
    color: #94a3b8;
    font-size: 0.875rem;
    margin: 0;
}

/* Ownership inherited from collection (read-only display in editor) */
.ownership-inherited {
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.ownership-inherited .inherited-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.ownership-inherited .inherited-label i {
    color: #94a3b8;
}

.ownership-inherited .inherited-owners {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Ownership inherited note (on detail view) */
.ownership-inherited-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f1f5f9;
    border-radius: 6px;
    color: #64748b;
    font-size: 0.8125rem;
    margin-bottom: 8px;
}

.ownership-inherited-note i {
    color: #94a3b8;
    font-size: 0.75rem;
}

/* Add owner panel */
.add-owner-panel {
    margin-top: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.add-owner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-weight: 500;
    color: #1e293b;
}

.add-owner-header .close-btn {
    padding: 4px 8px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    border-radius: 4px;
}

.add-owner-header .close-btn:hover {
    background: #e2e8f0;
}

.add-owner-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quick-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.15s ease;
}

.quick-add-btn:hover {
    border-color: #1e3a5f;
    background: #f1f5f9;
}

.quick-add-btn i {
    color: #64748b;
}

.add-owner-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.owner-name-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.875rem;
}

.owner-name-input:focus {
    outline: none;
    border-color: #1e3a5f;
}

.owner-percentage-input {
    display: flex;
    align-items: center;
    gap: 4px;
}

.owner-percentage-input input {
    width: 70px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.875rem;
    text-align: right;
}

.owner-percentage-input input:focus {
    outline: none;
    border-color: #1e3a5f;
}

.owner-percentage-input span {
    color: #64748b;
    font-size: 0.875rem;
}

.add-owner-btn {
    padding: 10px 14px;
    background: #1e3a5f;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.15s ease;
}

.add-owner-btn:hover:not(:disabled) {
    background: #0f2744;
}

.add-owner-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Inline percentage edit for existing owners */
.owner-percentage-edit {
    display: flex;
    align-items: center;
    gap: 4px;
}

.owner-percentage-edit input {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.875rem;
    text-align: right;
}

.owner-percentage-edit input:focus {
    outline: none;
    border-color: #1e3a5f;
}

.owner-percentage-edit span {
    color: #64748b;
    font-size: 0.875rem;
}

/* Responsive: stack on smaller screens */
@media (max-width: 700px) {
    .hero-block {
        flex-direction: column;
    }

    .hero-photo {
        width: 100%;
    }

    .panel-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== COLLECTION ITEMS TAB ===== */
.collection-items-tab {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 20px 28px 28px;
}

.items-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #eaecf0;
    border-radius: 0;
    padding: 16px 20px;
    box-shadow: none;
    border-bottom: 1px solid #e2e8f0;
    margin: 0 -20px 0 -28px;
    padding-left: 28px;
    padding-right: 20px;
}

/* Pastel CTA buttons in list/toolbar contexts - calm, non-transactional */
.items-toolbar .btn-primary,
.items-actions .btn-primary,
.empty-tab .btn-primary,
.empty-state .btn-primary,
.tab-actions .btn-primary {
    height: 40px;
    padding: 0 16px;
    background: #e8f4fc;
    color: #1e3a5f;
    border: 1px solid #c5dff0;
    box-shadow: none;
    box-sizing: border-box;
}

.items-toolbar .btn-primary:hover,
.items-actions .btn-primary:hover,
.empty-tab .btn-primary:hover,
.empty-state .btn-primary:hover,
.tab-actions .btn-primary:hover {
    background: #d1ebfa;
    border-color: #9ecae8;
}

.items-toolbar .btn-primary:active,
.items-actions .btn-primary:active,
.empty-tab .btn-primary:active,
.empty-state .btn-primary:active,
.tab-actions .btn-primary:active {
    background: #bae0f7;
}

/* Context bar with back navigation */
.items-context {
    display: flex;
    align-items: center;
    gap: 10px;
}

.context-back {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1e3a5f;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.0625rem;
    cursor: pointer;
    padding: 6px 12px 6px 8px;
    margin: -6px;
    border-radius: 6px;
    transition: all 0.15s;
}

.context-back:hover {
    background: #f1f5f9;
    color: #3b82f6;
}

.context-back i {
    font-size: 0.875rem;
    opacity: 0.7;
}

.context-separator {
    color: #cbd5e1;
    font-weight: 300;
}

.context-count {
    color: #64748b;
    font-size: 0.9375rem;
}

.context-value {
    font-weight: 600;
    color: #1e3a5f;
    font-size: 0.9375rem;
}

.items-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* View toggle */
.view-toggle {
    display: flex;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.view-toggle-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: white;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.view-toggle-btn:not(:last-child) {
    border-right: 1px solid #e2e8f0;
}

.view-toggle-btn:hover:not(.active) {
    background: #f1f5f9;
}

.view-toggle-btn.active {
    background: #1e3a5f;
    color: white;
}

/* Items grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.item-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.15s;
}

.item-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
    text-decoration: none;
}

.item-image {
    aspect-ratio: 4 / 3;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-image i {
    font-size: 2.5rem;
    color: #94a3b8;
}

.item-details {
    padding: 14px 16px;
}

.item-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-type {
    font-size: 0.8125rem;
    color: #64748b;
    margin-top: 2px;
}

.item-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e3a5f;
    margin-top: 8px;
}

.item-value .not-valued {
    font-weight: 400;
    color: #94a3b8;
}

/* ===== LIST VIEW (Inline Editable) ===== */
.items-list-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
}

.items-table thead {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.items-table th {
    padding: 10px 12px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
}

.items-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.15s;
}

.items-table th.sortable:hover {
    color: #1e3a5f;
}

.items-table th.sortable i {
    margin-left: 4px;
    font-size: 0.625rem;
    opacity: 0.5;
}

.items-table th.sortable:hover i {
    opacity: 0.8;
}

.items-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
}

.items-table tbody tr:last-child {
    border-bottom: none;
}

.item-row {
    transition: background 0.15s;
}

.item-row:hover {
    background: #f8fafc;
}

.items-table td {
    padding: 6px 8px;
    font-size: 0.8125rem;
    color: #1e293b;
}

/* Column widths - 6 columns with actions */
.col-name { width: 26%; }
.col-type { width: 14%; }
.col-purchase { width: 12%; }
.col-value { width: 12%; }
.col-notes { width: 28%; }
.col-actions { width: 8%; }

.items-table th.col-value,
.items-table th.col-purchase {
    text-align: right;
}

/* Row action buttons */
.row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s;
}

.item-row:hover .row-actions {
    opacity: 1;
}

.row-action-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.row-action-btn:hover {
    background: #f1f5f9;
    color: #1e3a5f;
}

.row-action-btn.danger:hover {
    background: #fef2f2;
    color: #dc2626;
}

.item-name-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.item-name-cell i {
    color: #94a3b8;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

/* Clickable item name link */
.item-link {
    color: #1e3a5f;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
}

.item-link:hover {
    color: #3b82f6;
    text-decoration: underline;
}

/* Add hint in quick-add row */
.add-hint {
    color: #94a3b8;
    font-size: 0.75rem;
    font-style: italic;
}

/* Inline editable inputs */
.inline-edit {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 0.8125rem;
    color: #1e293b;
    background: transparent;
    transition: all 0.15s;
}

.inline-edit:hover {
    border-color: #e2e8f0;
    background: #f8fafc;
}

.inline-edit:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}

select.inline-edit {
    cursor: pointer;
}

/* Money input in table */
.inline-money {
    display: flex;
    align-items: center;
    gap: 2px;
}

.inline-money span {
    color: #94a3b8;
    font-size: 0.75rem;
}

.inline-money input {
    text-align: right;
    padding-right: 4px;
}

/* View button */
.row-view-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.15s;
}

.item-row:hover .row-view-btn {
    opacity: 1;
}

.row-view-btn:hover {
    background: #e2e8f0;
    color: #1e3a5f;
}

/* Backwards compat */
.row-edit-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.15s;
}

.item-row:hover .row-edit-btn {
    opacity: 1;
}

.row-edit-btn:hover {
    background: #e2e8f0;
    color: #1e3a5f;
}

/* Quick add row */
.quick-add-row {
    background: #f8fafc;
}

.quick-add-row td {
    padding: 6px 8px;
}

.quick-add-row input[type="text"],
.quick-add-row input[type="number"],
.quick-add-row select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-family: inherit;
    background: white;
}

.quick-add-row input:focus,
.quick-add-row select:focus {
    outline: none;
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.quick-add-row input::placeholder {
    color: #94a3b8;
}

.quick-add-value {
    display: flex;
    align-items: center;
    gap: 2px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding-left: 10px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.quick-add-value:focus-within {
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.quick-add-value span {
    color: #64748b;
    font-size: 0.8125rem;
}

.quick-add-value input {
    border: none !important;
    padding: 6px 10px 6px 4px !important;
    text-align: right;
    font-size: 0.8125rem;
    box-shadow: none !important;
}

.quick-add-value input:focus {
    border: none !important;
    box-shadow: none !important;
}

.row-add-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: #1e3a5f;
    color: white;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.row-add-btn:hover:not(:disabled) {
    background: #2d4a6f;
}

.row-add-btn:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
}

/* ===== STANDARD TABLE =====
   Shared table style for all data tables in 2030.
   Based on SecclAccounts — the gold standard.
   Usage:
     <div class="table-card">           (optional wrapper — card container)
       <table class="std-table">
         <thead><tr>
           <th class="sortable active">Name <i class="fas fa-arrow-up sort-icon"></i></th>
           <th class="col-right">Value</th>
         </tr></thead>
         <tbody><tr class="clickable-row">
           <td><div class="cell-stack"><span class="cell-primary">Name</span><span class="cell-secondary">ID</span></div></td>
           <td class="col-right">£1,000</td>
         </tr></tbody>
       </table>
     </div>
   ================================ */

.table-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.std-table {
    width: 100%;
    border-collapse: collapse;
}

.std-table th,
.std-table td {
    padding: 14px 20px;
    text-align: left;
}

.std-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #64748b;
    font-size: 12px;
    text-transform: uppercase;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.std-table td {
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.std-table tbody tr:last-child td {
    border-bottom: none;
}

.std-table tbody tr:hover td {
    background: #f8fafc;
}

/* Clickable rows */
.std-table tr.clickable-row {
    cursor: pointer;
}

/* Sortable headers */
.std-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.std-table th.sortable:hover {
    color: #1e293b;
}

.std-table th.active {
    color: #1e3a5f;
}

/* Sort arrow icon — shows only on active column */
.sort-icon {
    font-size: 10px;
    margin-left: 4px;
    opacity: 0.6;
}

/* Column alignment */
.col-right {
    text-align: right !important;
}

/* Stacked name + subtitle in a cell */
.cell-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cell-primary {
    font-weight: 500;
    color: #1e293b;
}

.cell-secondary {
    color: #94a3b8;
    font-size: 12px;
    font-family: monospace;
}

/* ===== TEST TAB: PROFILE-STYLE LAYOUT =====
   Left card (wider for 4:3), right panels fill remaining width
   Like ClientProfile but for assets
   ================================ */

/* Container */
.test-layout {
    height: 100%;
    overflow: hidden;
}

/* Two column grid - card left, panels right */
.test-columns {
    display: grid;
    grid-template-columns: 420px 1fr;  /* Wider card for 4:3 photos */
    gap: 24px;
    height: 100%;
    overflow: hidden;
}

/* ===== LEFT CARD ===== */
.test-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: 100%;  /* Fill available height */
    overflow-y: auto;
}

/* Card photo - 4:3 aspect ratio */
.test-card-photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    background: #f1f5f9;
}

.test-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.test-card-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

.test-card-photo-placeholder i {
    font-size: 4rem;
    color: #94a3b8;
}

/* Value - GREEN pill with date inline on right */
.test-card-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ecfdf5;
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.test-card-value .test-value-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #059669;
}

.test-card-value .test-value-date {
    font-size: 0.75rem;
    color: #64748b;
}

.test-card-value .test-value-not-set {
    font-size: 1rem;
    color: #94a3b8;
    font-style: italic;
}

/* Name */
.test-card-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e3a5f;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

/* Type */
.test-card-type {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 8px;
}

.test-card-type i {
    color: #94a3b8;
}

/* Location */
.test-card-location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #64748b;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    margin-top: 12px;
}

.test-card-location i {
    color: #3b82f6;
}

/* ===== RIGHT PANELS ===== */
.test-panels {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    padding-bottom: 20px;
}

.test-panel {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.test-panel-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.test-panel-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.test-panel-item {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 8px 0;
}

.test-panel-label {
    font-size: 0.875rem;
    color: #64748b;
    width: 30%;  /* Percentage - grows with container */
    min-width: 100px;
    max-width: 200px;
    flex-shrink: 0;
}

.test-panel-value {
    font-size: 0.875rem;
    color: #1e293b;
    font-weight: 400;
}

.test-panel-value.gain {
    color: #059669;
}

.test-panel-value.loss {
    color: #dc2626;
}

/* Gain/loss inline with value */
.test-panel-gain {
    font-size: 0.8125rem;
    font-weight: 500;
    margin-left: 12px;
}

.test-panel-gain.gain {
    color: #059669;
}

.test-panel-gain.loss {
    color: #dc2626;
}

/* Loading / empty states */
.test-loading {
    color: #94a3b8;
    font-size: 0.875rem;
    padding: 8px 0;
}

.test-empty {
    color: #94a3b8;
    font-size: 0.875rem;
    margin: 0;
}

/* Ownership display - compact for panels */
.test-owners {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.test-owner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 6px;
}

.test-owner-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.test-owner-avatar i {
    font-size: 0.75rem;
    color: #64748b;
}

.test-owner-name {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
}

.test-owner-pct {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e3a5f;
}

/* Notes block - full width */
.test-notes-block {
    padding: 16px 20px;
}

.test-notes {
    font-size: 0.9375rem;
    color: #475569;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
}

/* Responsive: Stack on narrow screens */
@media (max-width: 800px) {
    .test-columns {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .test-card {
        max-height: none;
    }

    .test-card-photo {
        max-width: 400px;
    }

    /* Stack label/value vertically on mobile */
    .test-panel-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .test-panel-label {
        width: auto;
    }

    .test-panel-grid {
        max-width: none;
    }
}

/* ===== TEST2 TAB - WP1 STYLE LAYOUT ===== */

.summary-layout {
    padding: 0;
    height: 100%;
    overflow-y: auto;
}

.summary-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px 28px 28px;
}

/* Two columns - align to top, 24px gap like rest of system */
.summary-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

/* Left column: hero tiles + overview stacked, 20px gap */
.summary-left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Hero tiles - image 4:3, value same height, separate */
.summary-hero-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.summary-hero-image {
    background: #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.summary-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.summary-hero-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.summary-hero-placeholder i {
    font-size: 2.5rem;
    color: #9ca3af;
}

.summary-hero-value {
    background: #14b8a6;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.summary-hero-edit {
    position: absolute;
    top: 12px;
    right: 12px;
    color: white;
    opacity: 0.7;
    cursor: pointer;
    font-size: 0.875rem;
    transition: opacity 0.15s ease;
}

.summary-hero-edit:hover {
    opacity: 1;
}

.summary-hero-name {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 6px;
}

.summary-hero-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
}

.summary-hero-date {
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.9);
    margin-top: 4px;
}

/* Right column: analytics + notes stacked, 20px gap */
.summary-right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.summary-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 24px;
}

/* Adviser-only panels - subtle but distinct from client-visible content */
.summary-panel.adviser-only {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border: 1px solid #fde047;
}

.summary-panel.adviser-only .summary-panel-title {
    color: #854d0e;
}

.summary-panel.adviser-only .summary-panel-title i {
    margin-right: 8px;
    font-size: 0.875rem;
}

.summary-panel-title {
    font-size: 1rem;
    font-weight: 400;
    color: #374151;
    margin: 0 0 16px 0;
    padding-bottom: 0;
    border-bottom: none;
}

.summary-panel-content {
    display: flex;
    flex-direction: column;
}

.summary-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 10px 0;
}

.summary-label {
    font-size: 0.875rem;
    color: #9ca3af;
    width: 45%;
    flex-shrink: 0;
}

.summary-value {
    font-size: 0.875rem;
    color: #1e293b;
    font-weight: 400;
}

.summary-value.gain {
    color: #059669;
}

.summary-value.loss {
    color: #dc2626;
}

/* Parent pill for nested chattels - obvious clickable button to navigate back */
.summary-value .parent-pill {
    display: inline-block;
    padding: 4px 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #1e3a5f;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.15s ease;
}

.summary-value .parent-pill:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #1e3a5f;
}

/* Type and subtype icons in Overview panel */
.summary-value .type-icon,
.summary-value .subtype-icon {
    width: 18px;
    margin-right: 6px;
    color: #64748b;
    font-size: 0.875rem;
}

.summary-analytics-content {
    display: flex;
    flex-direction: column;
}

.summary-analytics-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 10px 0;
}

.summary-analytics-row.highlight {
    background: #f0fdf4;
    margin: 8px -24px;
    padding: 12px 24px;
    border-radius: 8px;
}

.summary-analytics-label {
    font-size: 0.875rem;
    color: #9ca3af;
    width: 45%;
    flex-shrink: 0;
}

.summary-analytics-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
}

.summary-analytics-value.gain {
    color: #16a34a;
    font-weight: 600;
}

.summary-analytics-value.loss {
    color: #dc2626;
    font-weight: 600;
}

.summary-analytics-empty {
    font-size: 0.875rem;
    color: #9ca3af;
    text-align: center;
    padding: 24px 0;
    margin: 0;
}

.summary-notes {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
    min-height: 60px;
}

.summary-address {
    font-size: 0.875rem;
    color: #1e293b;
    line-height: 1.8;
}

.summary-address div {
    margin: 0;
}

/* Responsive */
@media (max-width: 800px) {
    .summary-columns {
        grid-template-columns: 1fr;
    }

    .summary-label,
    .summary-analytics-label {
        width: 35%;
    }
}

@media (max-width: 500px) {
    .summary-label,
    .summary-analytics-label {
        width: auto;
        min-width: 100px;
    }
}

/* ===== UTILITY ===== */
.text-muted {
    color: #94a3b8;
}

/* ===== PEOPLE CARD GRID (Firms > People tab) ===== */

.people-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.people-search {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    max-width: 380px;
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: white;
}

.people-search:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.people-search i {
    color: #94a3b8;
    font-size: 15px;
    flex-shrink: 0;
}

.people-search input {
    border: none;
    outline: none;
    font-size: 14px;
    color: #1e293b;
    width: 100%;
    background: transparent;
}

.people-sort {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #475569;
    background: white;
    cursor: pointer;
}

.people-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.person-card {
    background: white;
    border: 1px solid #dfdfdf;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.person-card:hover {
    box-shadow: 0 6px 9px -5px rgba(0, 0, 0, 0.3);
}

.person-card-top {
    display: block;
    cursor: pointer;
    text-align: center;
    background-color: #f3f5ff;
    border-bottom: 1px solid #dfdfdf;
    padding: 15px;
    transition: background-color 0.3s ease;
}

.person-card:hover .person-card-top {
    background-color: #e8ebfd;
}

.person-img {
    width: 100%;
    padding-bottom: 100%;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    border: 1px solid #bfbfbf;
    transition: transform 0.3s ease;
    position: relative;
}

.person-card:hover .person-img {
    transform: scale(1.02);
}

.person-img-initials {
    border: none;
    padding-bottom: 0;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    font-weight: 700;
    color: white;
    letter-spacing: 2px;
}

.person-card-body {
    padding: 10px 8px;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.person-card-body .person-name {
    font-weight: 500;
    font-size: 14px;
    color: #1e293b;
    line-height: 1.4;
}

.person-card-body .person-title {
    font-size: 13px;
    font-weight: 300;
    color: #64748b;
    padding-top: 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 800px) {
    .profile-columns {
        grid-template-columns: 1fr;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ESTATE PLANNING PAGE STYLES
   ═══════════════════════════════════════════════════════════════════════════════
   Used by: EstatePlanning.razor
   Tabs: Overview (dashboard), Gifts (7-year tracking), Wills & POAs, Trusts

   SESSION CONTEXT (January 2026):
   This was ABSENT from WP1. Estate planning for HNW clients is critical.
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ===== OVERVIEW DASHBOARD ===== */
.estate-dashboard {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px 28px;
    overflow-y: auto;
    background: #f1f5f9;
}

/* Top row: Key metrics */
.estate-metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.estate-metric-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
}

.estate-metric-card.highlight {
    border-left: 4px solid #f59e0b;
}

.estate-metric-card.highlight-danger {
    border-left: 4px solid #ef4444;
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.metric-icon.blue {
    background: #dbeafe;
    color: #2563eb;
}

.metric-icon.green {
    background: #dcfce7;
    color: #16a34a;
}

.metric-icon.amber {
    background: #fef3c7;
    color: #d97706;
}

.metric-icon.red {
    background: #fee2e2;
    color: #dc2626;
}

.metric-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.metric-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.metric-value.danger {
    color: #dc2626;
}

.metric-hint {
    font-size: 12px;
    color: #94a3b8;
}

.metric-action {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
}

.metric-action:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Status cards row */
.estate-status-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.estate-status-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.status-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-header i {
    font-size: 18px;
    color: #64748b;
}

.status-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    flex: 1;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.green {
    background: #dcfce7;
    color: #16a34a;
}

.status-badge.amber {
    background: #fef3c7;
    color: #d97706;
}

.status-badge.red {
    background: #fee2e2;
    color: #dc2626;
}

.status-content {
    flex: 1;
}

.status-detail {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.status-detail:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 13px;
    color: #64748b;
}

.detail-value {
    font-size: 13px;
    color: #1e293b;
    font-weight: 500;
}

.status-empty {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
    padding: 8px 0;
}

.status-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: #f8fafc;
    border-radius: 8px;
    color: #1e3a5f;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.status-action:hover {
    background: #f1f5f9;
}

.status-action i {
    font-size: 12px;
}

/* Insights card */
.estate-insights-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.insights-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.insights-header i {
    color: #f59e0b;
    font-size: 18px;
}

.insights-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.insight-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.insight-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 14px;
    color: #334155;
}

.insight-item i {
    margin-top: 2px;
    flex-shrink: 0;
}

.insight-item.positive i {
    color: #16a34a;
}

.insight-item.warning i {
    color: #f59e0b;
}

.insight-item.danger i {
    color: #dc2626;
}

.insight-item.info i {
    color: #3b82f6;
}

/* ===== GIFTS TAB ===== */
.gifts-container {
    padding: 24px 28px;
    overflow-y: auto;
    background: #f1f5f9;
    height: 100%;
}

.gifts-summary-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    background: white;
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.summary-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.summary-stat .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.summary-stat .stat-label {
    font-size: 12px;
    color: #64748b;
}

.summary-stat.highlight .stat-value {
    color: #dc2626;
}

.gifts-summary-bar .btn-primary {
    margin-left: auto;
}

/* Gift cards */
.gifts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gift-card {
    display: grid;
    grid-template-columns: 6px 1fr auto 140px auto;
    align-items: center;
    gap: 20px;
    background: white;
    border-radius: 12px;
    padding: 16px 20px 16px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.gift-status-indicator {
    width: 6px;
    height: 100%;
    border-radius: 12px 0 0 12px;
    min-height: 80px;
}

.gift-card.red .gift-status-indicator {
    background: #ef4444;
}

.gift-card.amber .gift-status-indicator {
    background: #f59e0b;
}

.gift-card.green .gift-status-indicator {
    background: #22c55e;
}

.gift-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gift-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gift-type {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.gift-type i {
    color: #64748b;
}

.gift-date {
    font-size: 13px;
    color: #64748b;
}

.gift-recipient {
    font-size: 14px;
    color: #475569;
}

.gift-recipient strong {
    color: #1e293b;
}

.gift-description {
    font-size: 13px;
    color: #94a3b8;
}

.gift-values {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.gift-value-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.gift-value-row .value-label {
    font-size: 12px;
    color: #94a3b8;
}

.gift-value-row .value-amount {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.gift-value-row.exemptions .value-amount {
    color: #16a34a;
}

.gift-value-row.chargeable .value-amount {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.gift-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    min-width: 100px;
}

.countdown-years {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
}

.countdown-label {
    font-size: 11px;
    color: #64748b;
    text-align: center;
}

.taper-relief {
    font-size: 11px;
    color: #16a34a;
    font-weight: 500;
}

.exempt-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #16a34a;
    font-size: 14px;
    font-weight: 600;
}

.gift-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
}

.icon-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* ===== WILLS & POAs TAB ===== */
.wills-container {
    padding: 24px 28px;
    overflow-y: auto;
    background: #f1f5f9;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.estate-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title-row i {
    font-size: 20px;
    color: #64748b;
}

.section-title-row h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.will-details,
.lpa-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item .detail-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item .detail-value {
    font-size: 15px;
    color: #1e293b;
    font-weight: 500;
}

.people-section {
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.people-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin: 0 0 12px 0;
}

.people-section h3 i {
    color: #94a3b8;
}

.people-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.people-list .person-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.people-list .person-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.people-list .person-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.people-list .person-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.people-list .person-role {
    font-size: 12px;
    color: #64748b;
}

.empty-hint {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

.empty-hint.warning {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f59e0b;
    background: #fef3c7;
    padding: 12px 16px;
    border-radius: 8px;
}

/* Compact empty state for sections */
.empty-state.compact {
    padding: 24px;
    text-align: center;
}

.empty-state.compact i {
    font-size: 32px;
    color: #cbd5e1;
    margin-bottom: 12px;
}

.empty-state.compact p {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 16px 0;
}

/* ===== TRUSTS TAB ===== */
.trusts-container {
    padding: 24px 28px;
    overflow-y: auto;
    background: #f1f5f9;
    height: 100%;
}

.trusts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.trust-filters {
    display: flex;
    gap: 8px;
}

.trust-filters .filter-btn {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
}

.trust-filters .filter-btn:hover {
    border-color: #cbd5e1;
    color: #1e293b;
}

.trust-filters .filter-btn.active {
    background: #1e3a5f;
    border-color: #1e3a5f;
    color: white;
}

.trusts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trust-card {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 20px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.trust-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #dbeafe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 20px;
}

.trust-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trust-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.trust-type {
    font-size: 13px;
    color: #64748b;
}

.trust-role {
    display: inline-block;
    padding: 2px 8px;
    background: #f1f5f9;
    border-radius: 4px;
    font-size: 11px;
    color: #475569;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trust-value {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.trust-value .value-amount {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.trust-value .value-label {
    font-size: 11px;
    color: #94a3b8;
}

.trust-anniversary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 16px;
    background: #fef3c7;
    border-radius: 8px;
}

.anniversary-date {
    font-size: 13px;
    font-weight: 600;
    color: #92400e;
}

.anniversary-label {
    font-size: 11px;
    color: #b45309;
}

/* ===== ESTATE RESPONSIVE ===== */
@media (max-width: 1200px) {
    .gift-card {
        grid-template-columns: 6px 1fr auto auto;
    }

    .gift-countdown {
        min-width: 80px;
    }
}

@media (max-width: 900px) {
    .estate-metrics-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .estate-status-row {
        grid-template-columns: 1fr;
    }

    .gift-card {
        grid-template-columns: 6px 1fr;
        grid-template-rows: auto auto auto;
    }

    .gift-values,
    .gift-countdown,
    .gift-actions {
        grid-column: 2;
        justify-self: start;
    }

    .gift-values {
        flex-direction: row;
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .estate-dashboard,
    .gifts-container,
    .wills-container,
    .trusts-container {
        padding: 16px;
    }

    .estate-metrics-row {
        grid-template-columns: 1fr;
    }

    .gifts-summary-bar {
        flex-wrap: wrap;
    }

    .trust-card {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .trust-icon {
        display: none;
    }
}


/* =====================================================
   HELP PAGE
   Used by: HelpPage.razor (/help)
   The 2030 Operations Manual - reader view
   ===================================================== */

.help-page {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: 100%;
    overflow: hidden;
}

/* ===== HELP SIDEBAR ===== */

.help-sidebar {
    border-right: 1px solid var(--color-border, #e2e8f0);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--color-surface, #fff);
}

.help-sidebar-header {
    padding: 20px 16px 12px;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
}

.help-sidebar-header h2 {
    font-size: var(--font-size-base, 14px);
    font-weight: var(--font-weight-semibold, 600);
    color: var(--color-text, #1e293b);
    margin: 0 0 12px;
}

.help-search {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 16px 12px;
}

.help-search i {
    position: absolute;
    left: 24px;
    color: var(--color-text-tertiary, #94a3b8);
    font-size: 12px;
    pointer-events: none;
}

.help-search input {
    width: 100%;
    padding: 8px 8px 8px 30px;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 6px;
    font-size: var(--font-size-sm, 13px);
    background: var(--color-background, #f8fafc);
    color: var(--color-text, #1e293b);
}

.help-search input:focus {
    outline: none;
    border-color: var(--color-primary, #1e3a5f);
    background: #fff;
}

.help-search-clear {
    position: absolute;
    right: 24px;
    background: none;
    border: none;
    color: var(--color-text-tertiary, #94a3b8);
    cursor: pointer;
    padding: 4px;
    font-size: 12px;
}

.help-search-clear:hover {
    color: var(--color-text, #1e293b);
}

/* ===== HELP NAV ===== */

.help-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.help-nav-loading,
.help-nav-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 32px 16px;
    color: var(--color-text-tertiary, #94a3b8);
    font-size: var(--font-size-sm, 13px);
}

.help-nav-loading i,
.help-nav-empty i {
    font-size: 24px;
}

.help-nav-category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 16px;
    background: none;
    border: none;
    font-size: var(--font-size-sm, 13px);
    font-weight: var(--font-weight-semibold, 600);
    color: var(--color-text-secondary, #475569);
    cursor: pointer;
    text-align: left;
}

.help-nav-category-header:hover {
    background: var(--color-background, #f8fafc);
}

.help-nav-chevron {
    font-size: 10px;
    transition: transform 0.15s ease;
    margin-left: auto;
}

.help-nav-category-header.expanded .help-nav-chevron {
    transform: rotate(180deg);
}

.help-nav-count {
    font-size: var(--font-size-xs, 11px);
    font-weight: 400;
    color: var(--color-text-tertiary, #94a3b8);
    background: var(--color-background, #f8fafc);
    padding: 1px 6px;
    border-radius: 10px;
}

.help-nav-items {
    padding: 2px 0 6px;
}

.help-nav-item {
    display: block;
    width: 100%;
    padding: 6px 16px 6px 28px;
    background: none;
    border: none;
    font-size: var(--font-size-sm, 13px);
    color: var(--color-text-secondary, #475569);
    cursor: pointer;
    text-align: left;
    line-height: 1.4;
}

.help-nav-item:hover {
    background: var(--color-background, #f8fafc);
    color: var(--color-text, #1e293b);
}

.help-nav-item.active {
    background: var(--color-primary-light, #e8eef5);
    color: var(--color-primary, #1e3a5f);
    font-weight: var(--font-weight-medium, 500);
}

/* ===== HELP CONTENT ===== */

.help-content {
    flex: 1;
    overflow-y: auto;
    background: var(--color-background, #f8fafc);
}

.help-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 48px;
}

.help-article-header {
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
}

.help-article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-xs, 11px);
    color: var(--color-text-tertiary, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.help-article-breadcrumb i {
    font-size: 8px;
}

.help-article-header h1 {
    font-size: 24px;
    font-weight: var(--font-weight-semibold, 600);
    color: var(--color-text, #1e293b);
    margin: 0 0 8px;
    line-height: 1.3;
}

.help-article-summary {
    font-size: var(--font-size-base, 14px);
    color: var(--color-text-secondary, #475569);
    margin: 0 0 12px;
    line-height: 1.6;
}

.help-article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--font-size-xs, 11px);
    color: var(--color-text-tertiary, #94a3b8);
}

.help-audience-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: var(--font-weight-medium, 500);
    font-size: var(--font-size-xs, 11px);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.help-audience-badge.all { background: #f0f9ff; color: #0369a1; }
.help-audience-badge.client { background: #f0fdf4; color: #15803d; }
.help-audience-badge.staff { background: #fff7ed; color: #c2410c; }
.help-audience-badge.dev { background: #faf5ff; color: #7c3aed; }

.help-version {
    color: var(--color-text-tertiary, #94a3b8);
}

.help-updated {
    color: var(--color-text-tertiary, #94a3b8);
}

/* ===== HELP ARTICLE BODY (rendered markdown) ===== */

.help-article-body {
    font-size: var(--font-size-base, 14px);
    color: var(--color-text, #1e293b);
    line-height: 1.7;
}

.help-article-body h1 {
    font-size: 22px;
    font-weight: var(--font-weight-semibold, 600);
    margin: 32px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
}

.help-article-body h2 {
    font-size: 18px;
    font-weight: var(--font-weight-semibold, 600);
    margin: 24px 0 8px;
    color: var(--color-text, #1e293b);
}

.help-article-body h3 {
    font-size: 15px;
    font-weight: var(--font-weight-semibold, 600);
    margin: 20px 0 6px;
    color: var(--color-text, #1e293b);
}

.help-article-body p {
    margin: 0 0 12px;
}

.help-article-body ul {
    margin: 0 0 12px;
    padding-left: 20px;
}

.help-article-body li {
    margin-bottom: 4px;
}

.help-article-body strong {
    font-weight: var(--font-weight-semibold, 600);
}

.help-article-body code {
    background: var(--color-background, #f8fafc);
    border: 1px solid var(--color-border, #e2e8f0);
    padding: 1px 5px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 12px;
}

.help-article-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 12px 0;
}

.help-article-body pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font-size: 13px;
    line-height: 1.5;
}

.help-article-body hr {
    border: none;
    border-top: 1px solid var(--color-border, #e2e8f0);
    margin: 24px 0;
}

.help-article-body a {
    color: var(--color-primary, #1e3a5f);
    text-decoration: none;
}

.help-article-body a:hover {
    text-decoration: underline;
}

/* ===== ARTICLE TAGS ===== */

.help-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border, #e2e8f0);
}

.help-tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--color-background, #f8fafc);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 12px;
    font-size: var(--font-size-xs, 11px);
    color: var(--color-text-secondary, #475569);
}

/* ===== HELP WELCOME (no article selected) ===== */

.help-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 64px 32px;
    min-height: 400px;
}

.help-welcome-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-primary-light, #e8eef5);
    color: var(--color-primary, #1e3a5f);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 20px;
}

.help-welcome h2 {
    font-size: var(--font-size-xl, 18px);
    font-weight: var(--font-weight-semibold, 600);
    color: var(--color-text, #1e293b);
    margin: 0 0 8px;
}

.help-welcome p {
    font-size: var(--font-size-base, 14px);
    color: var(--color-text-secondary, #475569);
    margin: 0;
}

/* ===== FEATURED ARTICLES ===== */

.help-featured {
    margin-top: 32px;
    width: 100%;
    max-width: 700px;
}

.help-featured h3 {
    font-size: var(--font-size-sm, 13px);
    font-weight: var(--font-weight-semibold, 600);
    color: var(--color-text-secondary, #475569);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px;
}

.help-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.help-featured-card {
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    padding: 16px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.help-featured-card:hover {
    border-color: var(--color-primary, #1e3a5f);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.help-featured-category {
    font-size: var(--font-size-xs, 11px);
    color: var(--color-text-tertiary, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.help-featured-title {
    font-size: var(--font-size-sm, 13px);
    font-weight: var(--font-weight-semibold, 600);
    color: var(--color-text, #1e293b);
    margin-bottom: 4px;
}

.help-featured-summary {
    font-size: var(--font-size-xs, 11px);
    color: var(--color-text-secondary, #475569);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== HELP PAGE RESPONSIVE ===== */

@media (max-width: 768px) {
    .help-page {
        grid-template-columns: 1fr;
    }

    .help-sidebar {
        display: none; /* On mobile, could be a slide-over panel later */
    }

    .help-article {
        padding: 20px 16px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CAMERAS TAB (PropertyView)
   CCTV-style dashboard — all cameras stream simultaneously.
   Click any feed to expand to full-screen lightbox.
   ═══════════════════════════════════════════════════════════════════════════════ */

.cameras-tab {
    padding: 24px;
}

/* ─── Toolbar ───────────────────────────────────────────────────────────── */

.cameras-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cameras-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cameras-toolbar-right {
    display: flex;
    gap: 8px;
}

.cameras-count {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

/* ─── CCTV Grid ─────────────────────────────────────────────────────────── */

.cctv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 16px;
}

.cctv-card {
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #1e293b;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.cctv-card:hover {
    border-color: #475569;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.cctv-card-live {
    border-color: #1e3a5f;
}

.cctv-card-live:hover {
    border-color: #38bdf8;
}

/* Video area */
.cctv-video-area {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
    overflow: hidden;
}

.cctv-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.cctv-video-visible {
    display: block;
}

/* Placeholder when not streaming */
.cctv-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.cctv-placeholder i {
    font-size: 36px;
    color: #334155;
}

.cctv-placeholder .fa-spinner {
    font-size: 24px;
    color: #38bdf8;
}

/* Name overlay at bottom of video */
.cctv-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 14px;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cctv-overlay-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cctv-name {
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.cctv-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: cameraPulse 1.5s infinite;
    flex-shrink: 0;
}

/* Card mute button — appears on hover in bottom-right of overlay */
.cctv-mute-btn {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.2s, background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.cctv-card:hover .cctv-mute-btn {
    opacity: 1;
}

.cctv-mute-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* When unmuted — always visible, even without hover */
.cctv-mute-btn-active {
    opacity: 1;
    color: #38bdf8;
}

.cctv-mute-btn-active:hover {
    color: #7dd3fc;
}

/* Hover overlay — fullscreen icon centered on hover */
.cctv-hover-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 2;
}

.cctv-card:hover .cctv-hover-overlay {
    opacity: 1;
}

.cctv-hover-overlay i {
    color: white;
    font-size: 32px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
    transition: transform 0.15s;
}

.cctv-card:hover .cctv-hover-overlay i {
    transform: scale(1.1);
}

@keyframes cameraPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ─── Full-Screen Lightbox ──────────────────────────────────────────────── */

.camera-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    flex-direction: column;
    animation: lightboxFadeIn 0.2s ease;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.camera-lightbox-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    max-height: 100%;
}

.camera-lightbox-header {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.camera-lightbox-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.camera-lightbox-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.camera-lightbox-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.15s;
}

.camera-lightbox-btn:hover {
    background: rgba(255,255,255,0.2);
}

.camera-lightbox-btn .fa-volume-up {
    color: #38bdf8;
}

.camera-lightbox-video {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px 24px;
    min-height: 0;
}

.camera-lightbox-video video {
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 100px);
    object-fit: contain;
    border-radius: 8px;
}

/* ─── Live Badge (reusable) ─────────────────────────────────────────────── */

.cameras-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    background: #dc2626;
    color: white;
    flex-shrink: 0;
}

.cameras-live-badge .cameras-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
    animation: cameraPulse 1.5s infinite;
}

/* ─── Assignment Panel ──────────────────────────────────────────────────── */

.cameras-assign-panel {
    margin-bottom: 24px;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.cameras-assign-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.cameras-assign-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.cameras-assign-header .btn-icon {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
}

.cameras-assign-section {
    margin-bottom: 16px;
}

.cameras-assign-section:last-child {
    margin-bottom: 0;
}

.cameras-assign-section h5 {
    margin: 0 0 10px 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 600;
}

.cameras-assign-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 8px;
}

.cameras-assign-row:last-child {
    margin-bottom: 0;
}

.cameras-assign-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #1e293b;
    font-weight: 500;
}

.cameras-assign-info i {
    color: #1e3a5f;
    font-size: 16px;
}

.cameras-assign-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    background: #f0fdf4;
    color: #166534;
}

.cameras-assign-empty {
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
    padding: 12px;
}

/* ─── Button variants ───────────────────────────────────────────────────── */

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.btn-danger:hover {
    background: #fee2e2;
}

/* ===== RESPONSIVE — TABS & NAV BAR ===== */

@media (max-width: 767px) {
    .page-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0 16px;
    }

    .page-tabs::-webkit-scrollbar {
        display: none;
    }

    .page-tab {
        white-space: nowrap;
        padding: 10px 14px;
        font-size: 13px;
    }

    .profile-nav-bar {
        padding-right: 16px;
        gap: 4px;
    }

    .actions-btn {
        font-size: 13px;
        padding: 0 10px;
        height: 32px;
    }

    .refresh-icon-btn {
        width: 32px;
        height: 32px;
    }
}

/* ===== RESPONSIVE — SECCL CLIENT DETAIL PAGE ===== */
/* Scoped CSS in Razor can't handle complex media queries, so these live here */

/* Tablet (768–1280): quick links drop to own row, value cards 2-col */
@media (max-width: 1280px) {
    .client-detail-content .client-header {
        flex-wrap: wrap;
    }

    .client-detail-content .quick-links {
        width: 100%;
        margin-left: 0;
        padding-top: 16px;
        border-top: 1px solid #f1f5f9;
        margin-top: 4px;
    }

    .client-detail-content .value-cards {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .client-detail-content .card-value {
        font-size: 26px;
    }

    .client-detail-content .accounts-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }

    /* Dashboard widget cards: 2-col on tablet landscape */
    .client-detail-content .dashboard-row {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .client-detail-content .compliance-docs-body {
        grid-template-columns: 1fr;
    }

    .client-detail-content .compliance-status-panel {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
}

/* Phone (<768): single column everything, tighter spacing */
@media (max-width: 767px) {
    .client-detail-content {
        padding: 16px;
        min-width: 0 !important;
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    .client-detail-content .client-header {
        flex-wrap: wrap;
        padding: 16px;
        gap: 12px;
    }

    .client-detail-content .back-btn {
        width: 36px;
        height: 36px;
    }

    .client-detail-content .client-avatar,
    .client-detail-content .client-avatar-img {
        width: 48px;
        height: 48px;
    }

    .client-detail-content .client-name-row h1 {
        font-size: 18px;
    }

    .client-detail-content .client-name-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .client-detail-content .client-meta {
        gap: 12px;
        font-size: 12px;
    }

    .client-detail-content .quick-links {
        width: 100%;
        margin-left: 0;
        padding-top: 12px;
        border-top: 1px solid #f1f5f9;
        margin-top: 4px;
    }

    .client-detail-content .quick-link {
        flex: 1 !important;
        justify-content: center !important;
        padding: 8px 8px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        min-width: 0 !important;
    }

    .client-detail-content .value-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .client-detail-content .value-card {
        padding: 18px;
    }

    .client-detail-content .card-value {
        font-size: 24px;
    }

    .client-detail-content .dashboard-section {
        padding: 16px;
    }

    .client-detail-content .dashboard-row {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .client-detail-content .widget-card {
        padding: 18px 20px !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .client-detail-content .css-doughnut {
        width: 160px;
        height: 160px;
    }

    .client-detail-content .doughnut-value {
        font-size: 16px;
    }

    .client-detail-content .accounts-grid {
        grid-template-columns: 1fr;
    }

    .client-detail-content .details-cards-grid {
        grid-template-columns: 1fr;
    }

    .client-detail-content .holdings-table th,
    .client-detail-content .holdings-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
}
