/* --- Reset & Layout --- */
.directory-container { padding: 30px 0; }
.directory-box { 
    background: #fff; 
    border-radius: 16px; 
    border: 1px solid #dee2e6; 
    padding: 20px; 
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Paste the CSS above here */
.ps-grid,
.bod-grid,
.util-grid,
.member-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.ps-card,
.bod-card,
.util-card,
.member-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.1);
    width: 280px;
    padding: 1.5rem 1.5rem 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ps-card:hover,
.bod-card:hover,
.util-card:hover,
.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgb(0 0 0 / 0.15);
}

.ps-photo,
.bod-photo,
.util-photo,
.member-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 0px solid #0078d7;
    box-shadow: 0 4px 10px rgb(0 0 0 / 0.1);
}

.ps-name,
.bod-name,
.util-name,
.member-name {
    font-weight: 700;
    font-size: 1.25rem;
    margin-top: 1rem;
    color: #222;
    text-decoration: underline;
}

.ps-title,
.bod-title,
.util-title,
.member-title {
    font-weight: 500;
    font-size: 1rem;
    color: #555;
    margin-top: 0.25rem;
}

.ps-title a,
.bod-title a,
.util-title a,
.member-title a {
    align-items: center;
    color: #043270;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    min-height: 40px;
    padding: 0 0.25rem;
    text-decoration: none;
}

.ps-contacts,
.bod-contacts,
.util-contacts,
.member-contacts {
    margin-top: auto;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.ps-contacts a,
.bod-contacts a,
.util-contacts a,
.member-contacts a {
    color: #0078d7;
    text-decoration: none;
    font-size: 1.25rem;
    min-height: 42px;
    min-width: 42px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ps-contacts a:hover,
.bod-contacts a:hover,
.util-contacts a:hover,
.member-contacts a:hover,
.ps-contacts a:focus,
.bod-contacts a:focus,
.util-contacts a:focus,
.member-contacts a:focus {
    background: #eef6ff;
    border-color: #bfdbfe;
    color: #005a9e;
}

.ps-contacts svg,
.bod-contacts svg,
.util-contacts svg,
.member-contacts svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.ps-phone,
.bod-phone,
.member-phone,
.util-phone {
    font-size: 1rem;
    margin-top: 0.5rem;
    color: #444;
    font-weight: 500;
}

.member-position {
    font-weight: 500;
    font-size: 1rem;
    color: #555;
    margin: 0.25rem 0 0.75rem;
}

.member-term,
.member-unit {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.25rem;
}

/* --- Centered Header Section --- */
.directory-header.centered {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.directory-header h3 {
    margin: 0 0 15px 0;
    font-weight: 700;
    color: #043270;
    font-size: 2rem;
}
.header-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Align Title (Left) and Search (Right) */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    width: 100%;
}

.title-group {
    display: flex;
    align-items: center;
    gap: 25px;
}

.table-controls h3 { 
    margin: 0; 
    font-weight: 800; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    color: #1a202c;
    font-size: 1.3rem;
}

/* --- Action Buttons --- */
.btn-modern {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none !important;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}
.btn-owner { background: #ed8936; color: #fff !important; }
.btn-owner:hover { background: #dd6b20; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(237, 137, 54, 0.3); }
.btn-board { background: #4299e1; color: #fff !important; }
.btn-board:hover { background: #3182ce; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3); }

/* --- Search Box (Right Side) --- */
#search-container .dataTables_filter {
    margin: 0;
}

#search-container .dataTables_filter input {
    width: 300px !important;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
}

#search-container .dataTables_filter input:focus {
    border-color: #043270;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

#directory thead th { 
    background-color: #043270 !important; 
    color: #ffffff !important; 
    font-weight: 800 !important; 
    text-transform: uppercase; 
    font-size: 0.75rem; 
    padding: 15px;
    border: none !important;
}

/* Force DataTables Sorting Arrows to Bold White */
table.dataTable thead .sorting:before,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_desc:before,
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:after {
    color: #ffffff !important;
    opacity: 1 !important;
    font-weight: 900 !important;
}

#directory tbody td { 
    padding: 12px 15px; 
    vertical-align: middle; 
    font-size: 0.9rem;
    color: #2d3748;
    border-bottom: 1px solid #f0f0f0;
}

/* Interactive Links */
.dir-link { 
    color: #043270; 
    font-weight: 600; 
    text-decoration: none !important; 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    min-height: 40px;
    overflow-wrap: anywhere;
}
.dir-link:hover { color: #2c5282; }

.bio-link {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-height: 40px;
    min-width: 40px;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .ps-grid,
    .bod-grid,
    .util-grid,
    .member-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 2rem;
        justify-content: center;
        margin-bottom: 40px;
    }
}

.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; width: 100%; }
.dataTables_filter { text-align: left !important; margin-bottom: 0 !important; float: none !important; }
.dataTables_filter input { width: 300px; transition: width 0.2s ease; }
.dataTables_filter input:focus { width: 350px; }
        
        /* Synchronized Button Aesthetics */
        .btn-action {
            display: inline-flex;
            align-items: center;
            padding: 8px 16px;
            border-radius: 6px;
            font-weight: 600;
            font-size: 13px;
            text-decoration: none;
            transition: all 0.2s;
            cursor: pointer;
            border: 1px solid #d1d5db;
            margin-left: 8px;
            height: 36px;
        }
        .btn-pdf-print { background: #ffffff; color: #374151; }
        .btn-pdf-print:hover { background: #f9fafb; border-color: #9ca3af; }
        .btn-excel-export { background: #ffffff; color: #15803d; }
        .btn-excel-export:hover { background: #f0fdf4; border-color: #86efac; }
        .btn-action i { margin-right: 6px; }

        /* Align buttons in DataTable header */
        .top { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; }
        .top .dataTables_filter { margin-left: 0; }
        .dt-actions-wrapper { display: flex; align-items: center; }

#directory tbody tr { cursor: pointer; transition: background-color 0.15s; }
#directory tbody tr:hover { background-color: #F8FAFC !important; }

#directory {
    table-layout: auto;
    width: 100% !important;
}

#directory th,
#directory td {
    white-space: normal !important;
}

table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before {
    display: none !important;
}

.swal-details-container { text-align: left; max-height: 60vh; overflow-y: auto; padding: 10px; }
.details-grid { display: grid; grid-template-columns: 140px 1fr; gap: 10px; border-top: 1px solid #EDF2F7; padding-top: 10px; }
.details-item { padding: 8px 0; border-bottom: 1px solid #F7FAFC; display: contents; }
.details-label { font-weight: 700; color: #4A5568; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.025em; }
.details-value { color: #2D3748; font-size: 0.95rem; }
.details-value a { color: #3B82F6; text-decoration: none; font-weight: 500; }
.details-value a:hover { text-decoration: underline; }

.directory-box .dataTables_wrapper .dataTables_paginate { margin-top: 1.5rem; text-align: center; float: none; display: flex; justify-content: center; }
.directory-box .dataTables_wrapper .dataTables_info { margin-top: 1rem; text-align: center; float: none; color: #718096; font-size: 0.875rem; }

@media screen and (max-width: 768px) {
    .directory-container {
        box-sizing: border-box !important;
        max-width: 100vw !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }

    .directory-container .row,
    .directory-container .col-12 {
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
    }

    .directory-box {
        box-sizing: border-box !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        padding: 0.75rem !important;
        margin-left: auto !important;
        margin-right: auto !important;
        max-width: calc(100vw - 1.5rem) !important;
        width: 100% !important;
    }

    .directory-box .dataTables_wrapper {
        box-sizing: border-box !important;
        max-width: 100% !important;
        overflow: hidden !important;
        width: 100% !important;
    }

    #directory {
        border-collapse: separate !important;
        border-spacing: 0 0.65rem !important;
        box-sizing: border-box !important;
        display: block !important;
        max-width: 100% !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    #directory thead {
        display: none !important;
    }

    #directory tbody,
    #directory tr,
    #directory td {
        box-sizing: border-box !important;
        display: block !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    #directory tbody tr {
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 8px !important;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06) !important;
        margin-bottom: 0.7rem !important;
        overflow: hidden !important;
        padding: 0.55rem 0.65rem !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    #directory tbody td {
        border-bottom: 0 !important;
        color: #1f2937 !important;
        font-size: 0.92rem !important;
        padding: 0.28rem 0 !important;
        word-break: break-word !important;
    }

    #directory tbody td::before {
        color: #64748b;
        content: attr(data-label);
        display: block;
        font-size: 0.68rem;
        font-weight: 850;
        letter-spacing: 0.04em;
        line-height: 1.1;
        margin-bottom: 0.1rem;
        text-transform: uppercase;
    }

    #directory tbody td:nth-child(n+4) {
        display: none !important;
    }

    #directory tbody td:nth-child(1) {
        color: #043270 !important;
        font-size: 1rem !important;
        font-weight: 850 !important;
    }

    .top,
    .dt-actions-wrapper {
        align-items: stretch !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100% !important;
    }

    .dataTables_filter,
    .dataTables_filter label,
    .dataTables_filter input {
        width: 100% !important;
    }

    .dataTables_filter input:focus {
        width: 100% !important;
    }

    .btn-action {
        justify-content: center !important;
        margin-left: 0 !important;
        width: 100% !important;
    }

    .details-grid {
        grid-template-columns: 1fr !important;
    }

    .details-label {
        padding-top: 0.75rem;
    }
}

/* --- HOA Directory Specific Overrides --- */
.ps-grid {
    display: grid !important;
    /* Reduced min-width to 160px to prevent overlap and decrease size */
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
    gap: 1.25rem !important;
    width: 100% !important;
    justify-content: center !important;
}

.ps-card {
    background: #fff !important;
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.08) !important;
    padding: 1.2rem 0.5rem !important;
    text-align: center !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important; 
    position: relative !important;
    float: none !important; /* Prevents overlap from old float layouts */
}

.ps-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgb(0 0 0 / 0.12) !important;
    border-color: #cbd5e0 !important;
}

.unit-display {
    font-weight: 800 !important;
    color: #2b6cb0 !important; /* Adjust to your $color1 if needed */
    font-size: 1rem !important;
    margin-bottom: 0.3rem !important;
    width: 100% !important;
}

.name-display {
    font-size: 0.9375rem !important;
    color: #2d3748 !important;
    font-weight: 600 !important;
    width: 100% !important;
    white-space: nowrap !important; /* Forces name onto one line */
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    padding: 0 5px !important;
}

        .building-section { margin-bottom: 3rem; width: 100%; }
        .building-header { 
            border-bottom: 2px solid #e2e8f0; 
            margin-bottom: 1.5rem; 
            padding-bottom: 0.5rem;
            color: #2d3748;
            font-weight: 700;
            text-align: left;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .ps-grid {
            display: grid;
            /* Reduced min-width to 150px to ensure cards are smaller and don't overlap */
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 1rem;
            width: 100%;
        }

        .ps-card {
            cursor: pointer;
            transition: transform 0.1s, box-shadow 0.1s;
            padding: 1.2rem 0.8rem !important;
            text-align: center !important; /* Centered content */
            background: #fff;
            border: 1px solid #e2e8f0;
            border-radius: 10px;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            align-items: center; /* Centered content */
            justify-content: center;
            min-width: 0;
            max-width: 150px;
            height: 100%;
        }
        .ps-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
            border-color: #cbd5e0;
        }
        .unit-display {
            font-weight: 800;
            color: var(--color1, #2b6cb0);
            font-size: 1rem;
            margin-bottom: 0.4rem;
        }
        .name-display {
            font-size: 0.9rem;
            color: #2d3748;
            font-weight: 600;
            line-height: 1.3;
            word-wrap: break-word;
            width: 100%;
        }

        .swal2-popup { font-size: 0.9rem !important; border-radius: 12px !important; }
        .swal-avatar { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; margin-bottom: 1rem; border: 3px solid #edf2f7; }

/* --- Owner Directory: database-backed card/list view --- */
.owner-directory-page {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: min(1180px, calc(100vw - 5rem)) !important;
    padding: 34px 0 46px;
    user-select: none;
    -webkit-user-select: none;
    width: min(1180px, calc(100vw - 5rem)) !important;
}

.owner-directory-page [hidden] {
    display: none !important;
}

.owner-directory-page .sr-only {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

.owner-directory-hero {
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(128px, 1fr) minmax(0, auto) minmax(128px, 1fr);
    margin: 0 auto 22px;
    max-width: none;
    min-height: 116px;
    padding: 24px clamp(18px, 4vw, 34px);
    position: relative;
    width: 100%;
}

.owner-directory-title {
    grid-column: 2;
    justify-self: center;
    min-width: 0;
    padding: 0;
    text-align: center;
    width: min(100%, 700px);
}

.owner-directory-eyebrow {
    color: #043270;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    margin-bottom: 7px;
    text-transform: uppercase;
}

.owner-directory-title h3 {
    color: #111827;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.12;
    margin: 0;
}

.owner-directory-count {
    align-items: center;
    background: rgba(4, 50, 112, 0.08);
    border: 1px solid rgba(4, 50, 112, 0.22);
    border-radius: 10px;
    color: #334155;
    display: inline-flex;
    flex: 0 0 auto;
    gap: 8px;
    grid-column: 3;
    justify-content: center;
    justify-self: end;
    min-width: 118px;
    padding: 10px 14px;
}

.owner-directory-count strong {
    color: #043270;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1;
}

.owner-directory-count span {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.owner-directory-toolbar {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin: 0 auto 18px;
    max-width: none;
    width: 100%;
}

.owner-directory-filter-group {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    gap: 10px;
    min-width: 0;
}

.owner-directory-search {
    align-items: center;
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    color: #64748b;
    display: flex;
    flex: 0 1 390px;
    gap: 10px;
    max-width: 390px;
    min-height: 46px;
    padding: 0 16px;
}

.owner-directory-search input {
    appearance: none;
    background: transparent;
    border: 0;
    color: #111827;
    flex: 1;
    font-size: 0.98rem;
    font-weight: 650;
    min-width: 0;
    outline: none;
    user-select: text;
    -webkit-user-select: text;
}

.owner-directory-search:focus-within {
    border-color: #043270;
    box-shadow: 0 0 0 4px rgba(4, 50, 112, 0.12);
}

.owner-directory-view-toggle {
    align-items: center;
    background: #eef2f7;
    border: 1px solid #dbe3ef;
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    padding: 4px;
}

.owner-directory-view-toggle button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.83rem;
    font-weight: 850;
    gap: 7px;
    min-height: 38px;
    padding: 0 14px;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.owner-directory-view-toggle button.is-active {
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
    color: #043270;
}

.owner-directory-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    margin: 0 auto;
    max-width: none;
    width: 100%;
}

.owner-directory-grid.is-hidden,
.owner-directory-list.is-hidden,
.owner-directory-empty.is-hidden,
.owner-directory-pager.is-hidden {
    display: none !important;
}

.owner-directory-pager {
    align-items: center;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 0.9fr);
    margin: 18px auto 0;
    max-width: none;
    width: 100%;
}

.owner-directory-page-size {
    align-items: center;
    color: #475569;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.86rem;
    font-weight: 850;
    gap: 10px;
    white-space: nowrap;
}

.owner-directory-select-wrap {
    align-items: center;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    display: inline-flex;
    position: relative;
}

.owner-directory-page-size select {
    appearance: none;
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 999px;
    color: #111827;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 850;
    min-height: 46px;
    min-width: 82px;
    outline: none;
    padding: 0 32px 0 12px;
}

.owner-directory-page-size select:focus {
    border-color: #043270;
    box-shadow: 0 0 0 4px rgba(4, 50, 112, 0.12);
}

.owner-directory-select-wrap i {
    color: #64748b;
    font-size: 0.7rem;
    position: absolute;
    pointer-events: none;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.owner-directory-page-info {
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 800;
    text-align: center;
}

.owner-directory-page-buttons {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    justify-content: flex-end;
}

.owner-directory-page-buttons button {
    align-items: center;
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 9px;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 850;
    gap: 7px;
    justify-content: center;
    min-height: 40px;
    min-width: 82px;
    padding: 0 12px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.owner-directory-page-buttons button:hover:not(:disabled),
.owner-directory-page-buttons button:focus-visible:not(:disabled) {
    background: rgba(4, 50, 112, 0.08);
    border-color: rgba(4, 50, 112, 0.32);
    color: #043270;
    outline: none;
}

.owner-directory-page-buttons button:disabled {
    cursor: default;
    opacity: 0.45;
}

.owner-directory-page-status {
    align-items: center;
    color: #475569;
    display: inline-flex;
    font-size: 0.86rem;
    font-weight: 900;
    justify-content: center;
    min-width: 58px;
}

.owner-directory-card {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    color: inherit;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 238px;
    min-width: 0;
    padding: 22px 16px 18px;
    text-align: center;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
    width: 100%;
}

.owner-directory-card:hover,
.owner-directory-card:focus-visible {
    border-color: rgba(4, 50, 112, 0.38);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.11);
    outline: none;
    transform: translateY(-2px);
}

.owner-directory-avatar,
.owner-directory-modal-avatar {
    align-items: center;
    background: rgba(4, 50, 112, 0.11);
    border: 1px solid rgba(4, 50, 112, 0.2);
    border-radius: 999px;
    color: #043270;
    display: inline-flex;
    font-weight: 900;
    justify-content: center;
}

.owner-directory-avatar {
    font-size: 1.15rem;
    height: 58px;
    margin-bottom: 14px;
    width: 58px;
}

.owner-directory-unit {
    color: #043270;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.owner-directory-name {
    color: #111827;
    display: block;
    font-size: 1.08rem;
    font-weight: 850;
    line-height: 1.2;
    margin-bottom: 12px;
    overflow-wrap: anywhere;
}

.owner-directory-card-meta {
    color: #475569;
    display: grid;
    gap: 6px;
    margin-top: auto;
    max-width: 100%;
}

.owner-directory-card-meta span {
    align-items: center;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 700;
    gap: 7px;
    justify-content: center;
    line-height: 1.3;
    min-width: 0;
    overflow-wrap: anywhere;
}

.owner-directory-card-meta i {
    color: #043270;
    flex: 0 0 auto;
}

.owner-directory-muted,
.owner-directory-list-row em {
    color: #94a3b8;
    font-style: normal;
    font-weight: 750;
}

.owner-directory-list {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    margin: 0 auto;
    max-width: none;
    width: 100%;
    overflow: hidden;
}

.owner-directory-list-head,
.owner-directory-list-row {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(80px, 0.75fr) minmax(150px, 1.2fr) minmax(130px, 1fr) minmax(190px, 1.5fr);
}

.owner-directory-list-head {
    background: #043270;
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 14px 18px;
    text-transform: uppercase;
}

.owner-directory-list-row {
    align-items: center;
    background: #ffffff;
    border: 0;
    border-bottom: 1px solid #eef2f7;
    color: #1f2937;
    cursor: pointer;
    font-size: 0.94rem;
    font-weight: 700;
    padding: 15px 18px;
    text-align: left;
    transition: background 0.14s ease;
    width: 100%;
}

.owner-directory-list-row:hover,
.owner-directory-list-row:focus-visible {
    background: #f8fafc;
    outline: none;
}

.owner-directory-list-row span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.owner-directory-empty {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    color: #475569;
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 0 auto;
    max-width: none;
    width: 100%;
    min-height: 120px;
    padding: 22px;
    text-align: center;
}

.owner-directory-empty i {
    color: #043270;
    font-size: 1.25rem;
}

.owner-directory-modal {
    border-radius: 14px !important;
    user-select: none;
    -webkit-user-select: none;
}

.owner-directory-modal-html {
    margin: 0 !important;
}

.owner-directory-modal-summary {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    gap: 14px;
    margin: 0 0 14px;
    padding: 14px;
    text-align: left;
}

.owner-directory-modal-avatar {
    flex: 0 0 auto;
    font-size: 1rem;
    height: 48px;
    width: 48px;
}

.owner-directory-modal-summary strong {
    color: #111827;
    display: block;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.2;
}

.owner-directory-modal-summary span {
    color: #64748b;
    display: block;
    font-size: 0.82rem;
    font-weight: 800;
    margin-top: 2px;
}

.owner-directory-modal-grid {
    display: grid;
    gap: 10px;
    max-height: 58vh;
    overflow-y: auto;
    padding-right: 4px;
    text-align: left;
}

.owner-directory-modal-row {
    border-bottom: 1px solid #edf2f7;
    display: grid;
    gap: 10px;
    grid-template-columns: 170px 1fr;
    padding: 8px 0 10px;
}

.owner-directory-modal-label {
    align-items: center;
    color: #64748b;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 900;
    gap: 8px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.owner-directory-modal-label i {
    color: #043270;
    width: 16px;
}

.owner-directory-modal-value {
    color: #111827;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.owner-directory-modal-empty {
    color: #64748b;
    font-weight: 750;
    padding: 8px 0;
    text-align: center;
}

@media screen and (max-width: 820px) {
    .owner-directory-page {
        max-width: calc(100vw - 1.25rem) !important;
        padding: 18px 12px 34px;
        width: calc(100vw - 1.25rem) !important;
    }

    .owner-directory-hero {
        align-items: stretch;
        grid-template-columns: 1fr;
        margin-bottom: 16px;
        min-height: 0;
        padding: 20px 16px;
    }

    .owner-directory-title {
        grid-column: 1;
        width: 100%;
    }

    .owner-directory-count {
        grid-column: 1;
        justify-self: stretch;
        width: 100%;
    }

    .owner-directory-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .owner-directory-filter-group {
        align-items: center;
        width: 100%;
    }

    .owner-directory-search {
        flex: 1 1 auto;
        max-width: none;
        width: auto;
    }

    .owner-directory-filter-group .owner-directory-page-size {
        justify-content: flex-end;
        width: auto;
    }

    .owner-directory-view-toggle {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .owner-directory-view-toggle button {
        justify-content: center;
    }

    .owner-directory-grid {
        grid-template-columns: 1fr;
    }

    .owner-directory-pager {
        grid-template-columns: 1fr;
    }

    .owner-directory-page-info,
    .owner-directory-page-buttons {
        justify-content: center;
        text-align: center;
        width: 100%;
    }

    .owner-directory-list {
        background: transparent;
        border: 0;
        box-shadow: none;
        overflow: visible;
    }

    .owner-directory-list-head {
        display: none;
    }

    .owner-directory-list-row {
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
        display: grid;
        gap: 8px;
        grid-template-columns: 1fr;
        margin-bottom: 12px;
        padding: 14px 16px;
    }

    .owner-directory-list-row span::before {
        color: #64748b;
        content: attr(data-label);
        display: block;
        font-size: 0.68rem;
        font-weight: 900;
        letter-spacing: 0.07em;
        margin-bottom: 2px;
        text-transform: uppercase;
    }

    .owner-directory-modal-row {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 520px) {
    .owner-directory-filter-group {
        align-items: stretch;
        flex-direction: column;
    }

    .owner-directory-search {
        width: 100%;
    }

    .owner-directory-filter-group .owner-directory-page-size {
        justify-content: center;
        width: 100%;
    }
}
