/* ── Registry layout ──────────────────────────────────────────────────── */
.reg-section            { padding: 80px 0 60px; }
.reg-container          { padding: 0 20px; }
.reg-layout             { display: flex; flex-wrap: nowrap; align-items: flex-start; position: relative; }
.reg-sidebar            { flex: 0 0 350px; width: 350px; min-width: 350px; max-width: 350px; padding-right: 15px; transition: width .2s ease, flex .2s ease, opacity .2s ease, max-width .2s ease; }
.reg-main               { flex: 1 1 0; min-width: 0; padding-left: 10px; transition: width .2s ease; }

/* Sidebar collapse toggle button */
.reg-sidebar-toggle {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background: transparent;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #666;
    padding: 0;
    margin-right: 10px;
    transition: background .15s, color .15s, border-color .15s;
}
.reg-sidebar-toggle:hover { background: #f0f0f0; color: #333; border-color: #bbb; }
.reg-sidebar-toggle svg { display: block; }

/* Collapsed state */
.reg-layout.sidebar-collapsed .reg-sidebar {
    width: 0 !important;
    flex: 0 0 0 !important;
    max-width: 0 !important;
    min-width: 0 !important;
    overflow: hidden;
    opacity: 0;
    padding: 0;
}
.reg-layout.sidebar-collapsed .reg-main {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    padding-left: 10px;
}
.reg-layout.sidebar-collapsed .reg-toggle-arrow {
    transform: rotate(180deg);
    transform-origin: center;
    transform-box: fill-box;
}

/* Sidebar blocks */
.reg-sidebar-block      { background: #fff; border: 1px solid #e0e0e0; border-radius: 6px;
                           padding: 16px; margin-bottom: 16px; }
.reg-sidebar-title      { font-size: 13px; font-weight: 700; text-transform: uppercase;
                           letter-spacing: .5px; color: #555; margin: 0 0 12px; }

/* 2-level type navigator */
.reg-type-nav           { padding: 16px; }
.reg-type-selected-bar  { display: flex; align-items: center; justify-content: space-between;
                           padding: 8px 10px; border-radius: 6px; background: #f0f4ff;
                           border: 1px solid #d0dcf8; cursor: pointer;
                           transition: background .15s; margin-bottom: 0; }
.reg-type-selected-bar:hover { background: #e4ecfd; }
.reg-type-selected-inner { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.reg-type-selected-cat  { font-size: 10px; font-weight: 700; text-transform: uppercase;
                           letter-spacing: .5px; color: #888; white-space: nowrap;
                           overflow: hidden; text-overflow: ellipsis; }
.reg-type-selected-name { font-size: 13px; font-weight: 600; color: #1a56db;
                           white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reg-type-toggle-arrow  { font-size: 10px; color: #888; transition: transform .2s; flex-shrink: 0; margin-left: 8px; }
.reg-type-selected-bar.open .reg-type-toggle-arrow { transform: rotate(180deg); }
.reg-type-accordion     { display: none; margin-top: 8px; }
.reg-type-accordion.open { display: block; }
.reg-category-item      { margin-bottom: 6px; }
.reg-category-header    { display: flex; justify-content: space-between; align-items: center;
                           padding: 6px 8px; border-radius: 4px; cursor: pointer;
                           transition: background .15s; }
.reg-category-header:hover { background: rgba(0,0,0,.04); }
.reg-category-label     { font-size: 11px; font-weight: 700; color: #888;
                           text-transform: uppercase; letter-spacing: .6px; }
.reg-category-arrow     { font-size: 9px; color: #bbb; transition: transform .2s; flex-shrink: 0; }
.reg-category-item.open .reg-category-arrow { transform: rotate(90deg); }
.reg-type-list          { list-style: none; padding: 0; margin: 2px 0 4px 0; display: none;
                           border-left: 2px solid #e0e0e0; margin-left: 8px; }
.reg-type-list.visible  { display: block; }
.reg-type-list li       { margin: 0; }
.reg-type-link          { display: block; padding: 7px 10px 7px 12px; border-radius: 0 4px 4px 0;
                           color: #444; font-size: 13px; transition: background .15s; }
.reg-type-link:hover    { background: #f0f4ff; text-decoration: none; color: #333; font-size: 13px; }
.reg-type-link.active   { background: #e8f0fe; color: #1a56db; font-weight: 600;
                           border-left: 2px solid #1a56db; margin-left: -2px; }

/* Filter inputs */
.reg-filter-group       { margin-bottom: 10px; }
.reg-filter-label       { font-size: 12px; color: #666; margin-bottom: 3px; display: block; }
.reg-filter-input       { font-size: 13px; height: 34px; padding: 6px 10px; line-height: 1.4; }
.nice-select.reg-filter-select { height: 34px !important; line-height: 22px !important;
                                  padding-top: 6px !important; padding-bottom: 6px !important;
                                  font-size: 13px !important; margin-bottom: 10px !important; }
.nice-select.reg-per-page      { height: 34px !important; line-height: 22px !important;
                                  padding-top: 6px !important; padding-bottom: 6px !important;
                                  font-size: 14px !important; width: 70px !important; }
.reg-per-page           { height: 34px; padding: 6px 8px; line-height: 1.4; }
.reg-btn-apply          { width: 100%; margin-top: 6px; padding: 10px 16px; font-size: 15px; font-weight: 600; }
.reg-btn-reset          { width: 100%; text-align: center; font-size: 12px; }

/* Table header */
.reg-table-header       { display: flex; justify-content: space-between; align-items: center;
                           margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.reg-table-header-left  { display: flex; align-items: center; gap: 10px; }
.reg-table-header-right { display: flex; align-items: center; gap: 6px; }
.reg-type-title         { margin: 0; font-size: 18px; font-weight: 600; }
.reg-count-label        { font-size: 13px; color: #888; }
.reg-per-page           { width: 70px; display: inline-block; }
.reg-per-page-label     { font-size: 13px; color: #666; }

/* Table */
.reg-table-wrap         { transition: opacity .2s; border: 1px solid #ddd; border-radius: 4px; }
.reg-table              { font-size: 13px; margin-bottom: 0; }
.reg-table.table-bordered { border: none; }
.reg-th                 { white-space: nowrap; }
.reg-sort-icon          { color: #aaa; font-size: 11px; margin-left: 4px; }
.reg-th:hover .reg-sort-icon { color: #555; }
.reg-th-actions         { width: 60px; text-align: center; }
.reg-td-actions         { text-align: center; }
.reg-empty              { padding: 40px !important; }

/* Loading */
.reg-table-wrap         { position: relative; }
.reg-loading            { display: flex; justify-content: center; align-items: center;
                          position: absolute; inset: 0; z-index: 10;
                          background: rgba(255,255,255,0.55); pointer-events: none; }
.reg-spinner            { width: 32px; height: 32px; border: 3px solid #e0e0e0;
                           border-top-color: #1a56db; border-radius: 50%;
                           animation: reg-spin .7s linear infinite; }
@keyframes reg-spin     { to { transform: rotate(360deg); } }

/* Pagination bar */
.reg-pagination-bar     { margin-top: 10px; display: flex; justify-content: flex-end; }
#reg-pagination.pagination > li > a,
#reg-pagination.pagination > li > span {
    background: transparent;
    border: 1px solid #ddd;
    color: #337ab7;
    min-width: 32px;
    text-align: center;
    border-radius: 4px !important;
    margin: 0 2px;
}
#reg-pagination.pagination > li > a:hover {
    background: #eaf1fb;
    color: #23527c;
}
#reg-pagination.pagination > .active > a,
#reg-pagination.pagination > .active > span {
    background: #337ab7;
    border-color: #337ab7;
    color: #fff;
}
#reg-pagination.pagination > .disabled > span {
    background: transparent;
    border-color: #ddd;
    color: #aaa;
}
body.theme-bold #reg-pagination.pagination > li > a,
body.theme-bold #reg-pagination.pagination > li > span,
body.theme-bold #reg-pagination.pagination > li {
    border-color: rgba(255,255,255,.2) !important;
    color: #fffffe !important;
    background-color: rgba(255,255,255,.06) !important;
    box-shadow: none !important;
    outline: none !important;
}
body.theme-bold #reg-pagination.pagination > li > a:hover,
body.theme-bold #reg-pagination.pagination > li > a:focus {
    background-color: rgba(255,255,255,.14) !important;
    color: #fffffe !important;
}
body.theme-bold #reg-pagination.pagination > .active > a,
body.theme-bold #reg-pagination.pagination > .active > span,
body.theme-bold #reg-pagination.pagination > .active {
    background-color: rgba(167,139,250,.35) !important;
    border-color: rgba(167,139,250,.6) !important;
    color: #fffffe !important;
}
body.theme-bold #reg-pagination.pagination > .disabled > span,
body.theme-bold #reg-pagination.pagination > .disabled > a {
    border-color: rgba(255,255,255,.08) !important;
    color: rgba(255,255,255,.3) !important;
    background-color: rgba(255,255,255,.02) !important;
}

/* Card modal */
.reg-card-modal-header  { background: #f8f8f8; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
#reg-card-modal .close {
    float: none;
    margin: 0;
    font-size: 24px;
    line-height: 1;
    color: #333;
    opacity: .6;
    text-shadow: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    order: 1;
}
#reg-card-modal .close:hover { opacity: 1; background: rgba(0,0,0,.08); color: #000; }
#reg-card-modal .modal-title { order: 0; flex: 1; }
/* Modal — centered vertically with overlay */
#reg-card-modal .modal-dialog        { position: absolute !important; top: 50% !important; left: 50% !important;
                                        transform: translate(-50%, -50%) !important;
                                        margin: 0 !important; width: 90%; max-width: 700px;
                                        display: flex; flex-direction: column;
                                        max-height: 90vh; }
#reg-card-modal .modal-dialog.has-geometry { max-width: 960px; }
#reg-card-modal .modal-content       { display: flex; flex-direction: column;
                                        max-height: 90vh; border-radius: 8px;
                                        box-shadow: 0 20px 60px rgba(0,0,0,.5); }
#reg-card-modal .modal-body          { overflow-y: auto; flex: 1; padding: 16px; }
#reg-card-modal .modal-body.has-layout { overflow: hidden; padding: 0; display: flex; flex: 1; }
.modal-backdrop.in                   { opacity: .7; }
#reg-card-modal                      { z-index: 10000 !important; }
body.modal-open .navbar              { z-index: 99 !important; }

/* Two-column layout (fields left, map right) */
.reg-card-layout        { display: flex; flex-direction: row; width: 100%; min-height: 400px; }
.reg-card-fields        { flex: 1; overflow-y: auto; padding: 20px 24px; min-width: 0; }
.reg-card-map           { width: 50%; flex-shrink: 0; position: relative; background: #e8eaed; }

/* DL styles */
.reg-card-dl            { margin: 0; }
.reg-card-dl dt         { font-weight: 600; font-size: 13px; color: #555; padding: 5px 0 2px; }
.reg-card-dl dd         { margin-left: 0; font-size: 14px; padding-bottom: 6px; border-bottom: 1px solid #f0f0f0; margin-bottom: 2px; }
.reg-card-dl dd:last-child { border-bottom: none; }

/* ── Dark theme (bold) ──────────────────────────────────────────────── */
body.theme-bold .reg-sidebar-block  { background: #1a1a2e; border-color: rgba(167,139,250,.2); }
body.theme-bold .reg-sidebar-title  { color: #a7a9be; }
body.theme-bold .reg-sidebar-toggle { background: transparent; border-color: rgba(255,255,255,.2); color: #fffffe; }
body.theme-bold .reg-sidebar-toggle:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.35); }
body.theme-bold .reg-type-selected-bar  { background: rgba(167,139,250,.1); border-color: rgba(167,139,250,.3); }
body.theme-bold .reg-type-selected-bar:hover { background: rgba(167,139,250,.18); }
body.theme-bold .reg-type-selected-cat  { color: #6b6f8a; }
body.theme-bold .reg-type-selected-name { color: #a78bfa; }
body.theme-bold .reg-type-toggle-arrow  { color: #6b6f8a; }
body.theme-bold .reg-category-header:hover { background: rgba(167,139,250,.06); }
body.theme-bold .reg-category-label { color: #6b6f8a; }
body.theme-bold .reg-category-arrow { color: #6b6f8a; }
body.theme-bold .reg-type-list      { border-left-color: rgba(167,139,250,.2); }
body.theme-bold .reg-type-link      { color: #c4c6d8; }
body.theme-bold .reg-type-link:hover{ background: rgba(167,139,250,.08); color: #fffffe; text-decoration: none; font-size: 13px; }
body.theme-bold .reg-type-link.active{ background: rgba(167,139,250,.12); color: #a78bfa; font-weight: 600;
                                        border-left-color: #a78bfa; }
body.theme-bold .reg-filter-label   { color: #a7a9be; }
body.theme-bold .reg-filter-select,
body.theme-bold .reg-filter-input   { background: #0f0e17; border-color: rgba(167,139,250,.3); color: #fffffe; }
.nice-select.reg-filter-select .current { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: calc(100% - 24px); }
.nice-select.reg-filter-select .list,
.nice-select.reg-per-page .list { max-height: 0 !important; overflow: hidden !important; }
.nice-select.reg-filter-select.open .list,
.nice-select.reg-per-page.open .list { max-height: 280px !important; overflow-y: auto !important; }
body.theme-bold .nice-select.reg-filter-select { background: #0f0e17 !important; border-color: rgba(167,139,250,.3) !important; color: #fffffe !important; }
body.theme-bold .nice-select.reg-filter-select:after { border-top-color: #a7a9be !important; border-bottom-color: #a7a9be !important; }
body.theme-bold .nice-select.reg-filter-select .list { background-color: #1a1a2e !important; border: 1px solid rgba(167,139,250,.3) !important; box-shadow: 0 4px 16px rgba(0,0,0,.7) !important; }
body.theme-bold .nice-select.reg-filter-select .list li { background-color: #1a1a2e !important; color: #fffffe !important; }
body.theme-bold .nice-select.reg-filter-select .option { background-color: #1a1a2e !important; color: #fffffe !important; }
body.theme-bold .nice-select.reg-filter-select .option:hover,
body.theme-bold .nice-select.reg-filter-select .option.focus,
body.theme-bold .nice-select.reg-filter-select .option.selected.focus { background-color: rgba(167,139,250,.15) !important; color: #a78bfa !important; }
body.theme-bold .nice-select.reg-filter-select .option.selected { color: #a78bfa !important; }
body.theme-bold .nice-select.reg-per-page { background: #0f0e17 !important; border-color: rgba(167,139,250,.3) !important; color: #fffffe !important; }
body.theme-bold .nice-select.reg-per-page .list { background-color: #1a1a2e !important; border: 1px solid rgba(167,139,250,.3) !important; box-shadow: 0 4px 16px rgba(0,0,0,.7) !important; }
body.theme-bold .nice-select.reg-per-page .option { background-color: #1a1a2e !important; color: #fffffe !important; }
body.theme-bold .nice-select.reg-per-page .option:hover,
body.theme-bold .nice-select.reg-per-page .option.focus { background-color: rgba(167,139,250,.15) !important; color: #a78bfa !important; }
body.theme-bold .reg-btn-apply { background: rgba(167,139,250,.15) !important; border-color: rgba(167,139,250,.4) !important; color: #fffffe !important; }
body.theme-bold .reg-btn-apply:hover { background: rgba(167,139,250,.25) !important; }
body.theme-bold .reg-table-wrap     { border-color: rgba(255,255,255,.1); }
body.theme-bold .reg-table          { color: #fffffe !important; background: #0f0e17 !important; }
body.theme-bold .reg-table > thead > tr > th { background: #1a1a2e !important; color: #a7a9be !important; border-color: rgba(255,255,255,.1) !important; }
body.theme-bold .reg-table > tbody > tr > td,
body.theme-bold .reg-table > tbody > tr.odd > td { background: #0f0e17 !important; color: #fffffe !important; border-color: rgba(255,255,255,.06) !important; }
body.theme-bold .reg-table > tbody > tr:nth-child(odd) > td { background: #13131f !important; }
body.theme-bold .reg-table > tbody > tr:hover > td { background: #1a1a2e !important; }
body.theme-bold .reg-spinner        { border-color: rgba(255,255,255,.1); border-top-color: #a78bfa; }
body.theme-bold .reg-loading        { background: rgba(15,14,23,0.55); }
body.theme-bold .reg-type-title     { color: #fffffe; }
body.theme-bold #reg-card-modal .modal-content  { background: #1a1a2e; color: #fffffe; border-color: rgba(167,139,250,.2); }
body.theme-bold #reg-card-modal .modal-header   { background: #0f0e17; border-color: rgba(167,139,250,.2); color: #fffffe; }
body.theme-bold #reg-card-modal .modal-title    { color: #fffffe; }
body.theme-bold #reg-card-modal .close          { color: #a7a9be; opacity: 1; }
body.theme-bold .reg-card-dl dt     { color: #a7a9be; }
body.theme-bold .reg-card-dl dd     { color: #fffffe; border-bottom-color: rgba(255,255,255,.07); }
body.theme-bold .reg-card-fields    { background: #1a1a2e; }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .reg-layout         { flex-wrap: wrap; }
    .reg-sidebar        { flex: 0 0 100%; width: 100%; max-width: 100%; padding-right: 0; margin-bottom: 20px; }
    .reg-main           { flex: 0 0 100%; width: 100%; max-width: 100%; padding-left: 0; padding-right: 0; }
    .reg-table-wrap     { border: none !important; }
    .reg-sidebar-toggle { display: none; }

    /* Mobile card: stack vertically, map on top */
    .reg-card-layout    { flex-direction: column; }
    .reg-card-map       { width: 100%; height: 260px; }
    #reg-card-modal .modal-dialog.has-geometry { max-width: 90%; }
}
