
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html, body {
    height: 100%;
}

body {
    background-color: #f7f8fc;
    color: #1f2937;
    --sidebar-width: 230px;
    --collapsed-width: 64px;
    --sub-sidebar-width: 280px;
    transition: background 0.2s ease;
}

body.sidebar-collapsed {
    --sidebar-width: var(--collapsed-width);
}

/* Sub-sidebar base styles */
.sub-sidebar {
    position: fixed;
    left: var(--sidebar-width);
    width: 280px;
    height: 100vh;
    top: 0;
    background: #ffffff;
    border-right: 1px solid #e3e8f7;
    padding: 0px;
    transition: left 0.2s ease, opacity 0.15s ease;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    pointer-events: none;
    z-index: 15;
}

body.sub-open .sub-sidebar {
    opacity: 1;
    pointer-events: auto;
}

.AlertArea{width:100%;display: flex;align-items: center;gap: 12px;background: #ffe0e0;padding: 8px 8px;border: 1px solid #ffb0b0;margin-bottom: 24px;border-radius: 4px;}
.AlertArea>svg{width: auto;stroke: #f00;}
.AlertArea>span{font-size: 13px;}

#app-wrapper{width:100%;}

.sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("/assets/img/logo.png") no-repeat;
    background-size: 210px 210px;
    background-position: -125px -79px;
    pointer-events: none;
    opacity: 0.9;
}

body.sidebar-collapsed .sidebar::before {
    display: none;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    filter: none;
    background: transparent;
    opacity: 0;
    transition: opacity 0.2s ease;
}

body.sidebar-collapsed .logo-icon {
    opacity: 1;
}
.logo-text {
    width: 100%;
    display: flex;
    flex-direction: column;
    white-space: nowrap;
}

.logo-text .brand {
    font-size: 15px;
    font-weight: 700;
    color: #4450ff;
    letter-spacing: 0.06em;
    text-align: right;
}

.logo-text .tagline {
    font-size: 9px;
    letter-spacing: 0.18em;
    color: #9aa4c9;
    margin-top: 2px;
    white-space: nowrap;
    text-align: right;
}
.sidebar{
    width: var(--sidebar-width);
    background: #f7f8fc;
    border-right: 1px solid #e3e8f7;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    z-index: 25;
    transition: width 0.2s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header {
    /* padding-right: 18px; */
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-top-fixed {
    padding: 12px 12px 0;
    border-bottom: 1px solid transparent;
    margin-bottom: 12px;
    margin-top: 50px;
}

.sidebar-top-fixed .sidebar-item {
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    font-weight: 500;
}

.sidebar-top-fixed .sidebar-item.active {
    background: #fff;
    border-color: #cbd2ff;
    box-shadow: 0 4px 10px rgba(59, 91, 255, 0.15);
}

.sidebar-bottom-fixed {
    margin-top: auto;
    padding: 6px 10px 10px 10px;
    border-top: 1px solid #e3e8f7;
}

/* Admin'e DÃ¶n butonu */
.admin-switch-item {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #fff !important;
    margin-bottom: 8px;
}
.admin-switch-item:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
}
.admin-switch-item .label,
.admin-switch-item .icon-placeholder {
    color: #fff !important;
}
.admin-switch-item svg {
    stroke: #fff !important;
}

#sidebar-nav {
    padding: 6px 8px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-title {
    padding: 10px 22px 4px 22px;
    font-size: 11px;
    font-weight: 600;
    color: #9aa4c9;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-top: 10px;
    white-space: nowrap;
}

.sidebar-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    margin: 6px 6px;
    gap: 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    color: #6c7796;
    font-size: 13px;
    transition: background 0.15s ease, color 0.15s ease, padding 0.15s ease;
    white-space: nowrap;
}

.sidebar-item .icon-placeholder,
.sidebar-item .sidebar-icon {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    min-height: 18px;
    stroke-width: 1.6;
}

.sidebar-item .svg-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-item .svg-icon svg {
    width: 18px;
    height: 18px;
    stroke: rgb(133 151 176);
}

.sidebar-item:hover {
    background: #f4f6ff;
    border-color: #dfe5ff;
    color: #2f3ebf;
}

.sidebar-item.active {
    background: #ffffff;
    border-color: #cdd4fe;
    color: #2f3ebf;
}

.sidebar-item.active .svg-icon svg {
    stroke: #2f3ebf;
}

.sidebar-item.as-title {
    background: #eef2ff;
    color: #1f2a44;
    font-weight: 600;
}

.bottom-item {
    font-size: 13px;
}

body.sidebar-collapsed .sidebar-item {
    justify-content: center;
    padding: 10px 12px;
    border: 1px solid transparent;
}

body.sidebar-collapsed .sidebar-item .label {
    display: none;
}

body.sidebar-collapsed .sidebar-item.active {
    background: #ffffff;
    box-shadow: none;
    border-color: #dfe3f5;
    padding: 10px 12px;
}

body.sidebar-collapsed .sidebar-item.active .icon-placeholder {
    stroke: #3b5bff;
}

.sidebar-float-tooltip {
    position: fixed;
    padding: 8px 12px;
    background: #1b2234;
    color: #fff;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%);
    transition: opacity 0.12s ease;
    z-index: 50;
    box-shadow: 0 12px 26px rgba(14, 18, 32, 0.35);
}

.sidebar-float-tooltip::after {
    content: "";
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent #1b2234 transparent transparent;
}

.sidebar-float-tooltip.show {
    opacity: 1;
}

body.sub-open .content-area {
    background: #f7f8fc;
    margin-left: calc(var(--collapsed-width) + 280px);
}

.content-area {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: transparent;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.2s ease;
    width: inherit;
    padding: 0 32px;
}

.sidebar .tooltip {
    position: absolute;
    top: 50%;
    left: calc(100% + 8px);
    transform: translateY(-50%);
    background: #1f2937;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    display: none;
    z-index: 30;
}

.sidebar .tooltip::after {
    content: "";
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent #1f2937 transparent transparent;
}

body.sidebar-collapsed .sidebar-item:hover .tooltip {
    display: block;
    opacity: 1;
}

body:not(.sidebar-collapsed) .sidebar .tooltip {
    display: none !important;
}

.sidebar .tooltip,
.sidebar-item:hover .tooltip {
    display: none !important;
    opacity: 0 !important;
}

body.sub-open .sub-sidebar {
    opacity: 1;
    pointer-events: auto;
}

.sub-item.level-3 {
    padding-left: 36px;
}

.sub-group-title {
    padding: 12px 22px 6px 22px;
    font-size: 11px;
    font-weight: 600;
    color: #9aa4c9;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-left: 6px;
}

.sub-group {
    margin: 2px 0 12px;
    padding-left: 10px;
    border-left: 1px solid #e5e7eb;
}

.sub-group-header .sub-arrow {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

/* Sub-sidebar item styles - eski stiller kaldÄ±rÄ±ldÄ±, yenileri accordion bÃ¶lÃ¼mÃ¼nde */

#sub-sidebar-nav {
    overflow-y: auto;
    flex: 1;
    padding-bottom: 20px;
    padding-right: 6px;
    padding-top: 8px;
}

.sub-sidebar::-webkit-scrollbar {
    width: 6px;
}

.sub-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sub-sidebar::-webkit-scrollbar-thumb {
    background: #b8bfd3;
    border-radius: 10px;
}

.sub-sidebar:hover::-webkit-scrollbar-thumb {
    background: #8a93a9;
}

.sub-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 22px 18px 22px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 12px;
    height: 70px;
}

#sub-sidebar-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #1a1a2e;
}

.sub-header-icon {
    width: 18px;
    height: 18px;
    color: #5046e5;
}

.sub-header-icon.svg-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sub-header-icon.svg-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Algolia style Accordion */
.sub-accordion-group {
    margin-bottom: 0;
}

.sub-accordion-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 8px 20px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.sub-accordion-header:hover {
    color: #5046e5;
}

.accordion-icon {
    width: 16px;
    height: 16px;
    color: #6b7280;
}

.accordion-icon.svg-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.accordion-icon.svg-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.accordion-chevron {
    margin-left: auto;
    width: 14px;
    height: 14px;
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.sub-accordion-group.open .accordion-chevron {
    transform: rotate(180deg);
}

.sub-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    padding-left: 20px;
    border-left: 1px solid #e5e7eb;
    margin-left: 27px;
}

.sub-accordion-group.open .sub-accordion-content {
    max-height: 500px;
}

/* Algolia tarzÄ± sub-sidebar item - sadece text, sol border */
.sub-sidebar-item {
    display: block;
    padding: 6px 12px;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s ease;
    border-left: 2px solid transparent;
    margin-left: -1px;
}

.sub-sidebar-item:hover {
    color: #5046e5;
}

.sub-sidebar-item.active {
    color: #5046e5;
    font-weight: 500;
    border-left-color: #5046e5;
}

.sub-direct-items {
    margin-top: 8px;
    padding-left: 20px;
}

.sub-sidebar-header i {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    color: #4450ff;
}

.sub-group-header .sub-arrow.rotated {
    transform: rotate(180deg);
}

.sub-item {
    padding: 8px 26px;
    margin: 2px 0;
    font-size: 13px;
    color: #4f5f8f;
    cursor: pointer;
    border-left: 2px solid transparent;
    transition: all 0.15s ease;
}

.sub-item:hover {
    background: #eef2ff;
    color: #3448ff;
    border-left-color: #bec7ff;
}

.sub-item.active {
    background: #e9edff;
    color: #3448ff;
    font-weight: 600;
    border-left-color: #3d5afe;
}

.sub-group-items {
    display: none;
    padding-left: 4px;
}

.sub-group-items.open {
    display: block;
    border-left: 1px solid #e5e7eb;
    margin-left: 6px;
}

.sub-group-header {
    border-left: 3px solid transparent;
    transition: border-color 0.2s;
}

.sub-group-header.active {
    border-left-color: #4450ff;
    background: #f6f7ff;
}

/* ==================================
   TOPBAR - Google Cloud Style
   ================================== */
.topbar {
    height: 70px;
    padding: 0;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    box-shadow: none;
}

.topbar.gcloud-style {
    gap: 16px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Application/Project Selector */
.gcloud-app-selector {
    display: flex;
    flex-direction: column;
    gap: 2px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.15s;
}

.gcloud-app-selector:hover {
    background: #f3f4f6;
}

.gcloud-app-label {
    font-size: 10px;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gcloud-app-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #202124;
}

.gcloud-app-name svg {
    color: #5f6368;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

/* Search Box */
.gcloud-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f1f3f4;
    border: 1px solid #dadce0;
    border-radius: 8px;
    cursor: pointer;
    min-width: 180px;
    transition: all 0.15s;
}

.gcloud-search-box:hover {
    background: #e8eaed;
    border-color: #c6c9cc;
}

.gcloud-search-box svg {
    color: #5f6368;
}

.gcloud-search-box span {
    font-size: 14px;
    color: #5f6368;
    flex: 1;
}

.gcloud-search-box kbd {
    font-size: 11px;
    color: #5f6368;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 4px;
    padding: 2px 6px;
    font-family: inherit;
}

/* Credit Info */
.gcloud-credits {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e8eaed;
}

.credit-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #5f6368;
    font-weight: 500;
}

.credit-item svg {
    color: #5f6368;
}

.credit-item span {
    min-width: 24px;
    text-align: right;
}

/* Upgrade Button */
.gcloud-upgrade-btn {
    padding: 8px 16px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.gcloud-upgrade-btn:hover {
    background: #1557b0;
}

/* Icon Buttons */
.gcloud-icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s;
    color: #5f6368;
}

.gcloud-icon-btn:hover {
    background: #f1f3f4;
}

/* User Avatar */
.gcloud-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #34a853, #4285f4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: box-shadow 0.15s;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.gcloud-user-avatar:hover {
    box-shadow: 0 0 0 2px #e8f0fe;
}

/* User Dropdown Menu */
.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 280px;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.user-dropdown-menu.open {
    display: block;
    animation: slideDown 0.15s ease;
}

.user-dropdown-menu .user-menu-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #f8f9fa;
}

.user-dropdown-menu .avatar-circle.lg {
    width: 48px;
    height: 48px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50%;
    background: linear-gradient(135deg, #34a853, #4285f4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.user-dropdown-menu .user-menu-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-dropdown-menu .user-menu-name {
    font-size: 15px;
    font-weight: 600;
    color: #202124;
}

.user-dropdown-menu .user-menu-email {
    font-size: 13px;
    color: #5f6368;
}

.user-dropdown-menu .dropdown-separator {
    height: 1px;
    background: #e8eaed;
    margin: 4px 0;
}

.user-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    font-size: 14px;
    color: #202124;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
}

.user-dropdown-menu .dropdown-item:hover {
    background: #f1f3f4;
}

.user-dropdown-menu .dropdown-item.danger {
    color: #d93025;
}

.user-dropdown-menu .dropdown-item i,
.user-dropdown-menu .dropdown-item svg {
    width: 18px;
    height: 18px;
    color: #5f6368;
}

.user-dropdown-menu .dropdown-item.danger i,
.user-dropdown-menu .dropdown-item.danger svg {
    color: #d93025;
}

/* ==================================
   SEARCH POPUP
   ================================== */
.search-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(32, 33, 36, 0.6);
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
}

.search-popup-overlay.open {
    display: flex;
    animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.search-popup {
    width: 100%;
    max-width: 720px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.24);
    overflow: hidden;
    animation: popupSlideIn 0.2s ease;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.search-popup-header {
    padding: 16px;
    border-bottom: 1px solid #e8eaed;
}

.search-popup-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    padding: 8px 12px;
}

.search-popup-input-wrapper svg {
    color: #5f6368;
    flex-shrink: 0;
}

.search-popup-input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: #202124;
    background: transparent;
}

.search-popup-input-wrapper input::placeholder {
    color: #9aa0a6;
}

.search-popup-btn {
    padding: 8px 16px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.search-popup-btn:hover {
    background: #1557b0;
}

.search-popup-content {
    max-height: 480px;
    overflow-y: auto;
}

.search-popup-section {
    padding: 16px;
    border-bottom: 1px solid #e8eaed;
}

.search-popup-section:last-child {
    border-bottom: none;
}

/* Gemini Section */
.gemini-section {
    background: #f8f9fa;
}

.gemini-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1a73e8;
    margin-bottom: 8px;
}

.gemini-desc {
    font-size: 13px;
    color: #5f6368;
    margin-bottom: 4px;
    line-height: 1.5;
}

.gemini-tip {
    font-size: 12px;
    color: #80868b;
    margin-bottom: 12px;
}

.gemini-tip kbd {
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 11px;
}

.gemini-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gemini-suggestion-btn {
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 20px;
    font-size: 13px;
    color: #202124;
    cursor: pointer;
    transition: all 0.15s;
}

.gemini-suggestion-btn:hover {
    background: #e8f0fe;
    border-color: #1a73e8;
    color: #1a73e8;
}

/* Search Results List */
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #5f6368;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.search-results-list {
    display: flex;
    flex-direction: column;
}

.search-result-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.search-result-item:hover {
    background: #f1f3f4;
}

.search-result-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f0fe;
    border-radius: 8px;
    flex-shrink: 0;
}

.search-result-icon svg {
    width: 18px;
    height: 18px;
    color: #1a73e8;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 14px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 2px;
}

.search-result-desc {
    font-size: 12px;
    color: #5f6368;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Legacy styles for compatibility */
.topbar-app-name {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.topbar-app-sub {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 2px;
}
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
}

.topbar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    min-width: 240px;
    transition: all 0.2s ease;
}

.topbar-search:focus-within {
    background: #ffffff;
    border-color: #d1d5db;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.topbar-search input {
    border: none;
    outline: none;
    font-size: 13px;
    width: 100%;
    background: transparent;
    color: #111827;
}

.topbar-search input::placeholder {
    color: #9ca3af;
}

.topbar-search-icon {
    width: 16px;
    height: 16px;
    stroke-width: 1.5;
    color: #6b7280;
    flex-shrink: 0;
}

.topbar-btn {
    border-radius: 6px;
    padding: 7px 16px;
    font-size: 13px;
    border: none;
    background: #ffffff;
    cursor: pointer;
    color: #3b82f6;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.topbar-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.topbar-btn.primary {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.topbar-btn.primary:hover {
    background: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.topbar-icon-btn {
    border-radius: 6px;
    width: 36px;
    height: 36px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
}

.topbar-icon-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #111827;
}

.topbar-icon-btn i {
    width: 18px;
    height: 18px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid #e5e7eb;
}

.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.topbar-username {
    font-size: 14px;
    color: #111827;
    font-weight: 500;
}

.user-dropdown {
    position: relative;
}

.user-dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 6px 10px;
    border-radius: 6px;
}

.user-dropdown .dropdown-toggle:hover {
    background: #f3f4f6;
}

.user-dropdown .dropdown-toggle i {
    transition: transform 0.2s ease;
    width: 16px;
    height: 16px;
    color: #6b7280;
}

.user-dropdown.open .dropdown-toggle i {
    transform: rotate(180deg);
    color: #111827;
}

.user-dropdown .dropdown-menu {
    min-width: 280px;
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    z-index: 1000;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.user-dropdown.open .dropdown-menu {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-dropdown .dropdown-item[data-user-action="logout"] {
    color: #ef4444;
}

.page-header h1 {
    font-size: 22px;
    margin-bottom: 4px;
    color: #111827;
}

.page-header p {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
}

.widget.card {
    background: #ffffff;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.widget.card.danger {
    border-left: 4px solid #e74c3c;
}

@media (max-width: 768px) {
    .sidebar {
        position: relative;
        height: auto;
    }

    .sub-sidebar {
        display: none;
    }

    .content-area {
        margin-left: 230px;
        width: inherit;
    }

    .topbar {
        padding: 0 12px;
        height: 64px;
        border-bottom: 1px solid #e7e7e7;
        margin: 0 32px;
    }

    .main-content {
        padding: 16px 32px;
    }
}

.index-page {
    margin: 0 auto;
}

.index-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
}

.index-header h1 {
    font-size: 28px;
    font-weight: 700;
}

.index-meta {
    display: flex;
    gap: 18px;
    font-size: 13px;
    color: #6b7280;
}

.index-meta strong {
    color: #374151;
}

.search-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
}

.tabs-line {
    display: inline-flex;
    gap: 8px;
    margin: 10px 0 14px;
}

.tab-btn {
    padding: 8px 14px;
    border: 1px solid #dfe3f5;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    color: #374151;
    transition: all 0.15s ease;
}

.tab-btn.active {
    background: #eef3ff;
    color: #1f3bb3;
    border-color: #d5ddff;
}

.product-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-bar {
    display: flex;
    align-items: center;
    background: #eef3ff;
    border: 1px solid #d5ddff;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 15px 0;
}

.info-bar .icon {
    font-size: 18px;
    margin-right: 10px;
}

.info-bar a {
    color: #3b5bff;
}

:root {
    --color-primary: #3b5bff;
    --color-primary-dark: #2f49d1;
    --color-secondary: #f1f5f9;
    --color-danger: #ef4444;
    --color-danger-dark: #dc2626;
    --color-text-dark: #0f172a;
}

.actions-row {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    align-items: center;
}




.btn:disabled,


.btn:not(.btn-primary).is-loading::after {
    border-color: rgba(15,23,42,0.3);
    border-top-color: rgba(15,23,42,0.7);
}

@keyframes btnSpin {
    from { transform: translateY(-50%) rotate(0deg); }
    
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-toggle i {
    width: 16px;
    height: 16px;
    color: #94a3b8;
}


.dropdown-menu.align-right {
    left: auto;
    right: 0;
}

.dropdown-menu.align-up {
    top: auto;
    bottom: calc(100% + 6px);
}

.dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-section {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    padding: 6px 16px;
    text-transform: uppercase;
}

.dropdown-item + .dropdown-section {
    margin-top: 4px;
    border-top: 1px solid #f1f5f9;
}

.nav-actions-row .search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0 20px;
}

.search-select {
    border: 1px solid #dfe3f5;
    padding: 6px 10px;
    border-radius: 6px;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #dfe3f5;
    padding: 6px 10px;
    border-radius: 6px;
    width: 100%;
    background: #fff;
}

.search-input-wrapper input {
    border: none;
    outline: none;
    width: 100%;
    line-height: 30px;
}

.search-icon {
    width: 16px;
    height: 16px;
    stroke-width: 1.7;
    margin-right: 6px;
}

.search-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    width: 200px;
    justify-content: flex-end;
    flex: none;
}

.micro {
    font-size: 12px;
    color: #9ca3af;
}

.analytics-bar {
    display: flex;
    align-items: center;
    padding: 8px 0 15px;
    color: #6b7280;
}

.analytics-bar .icon {
    margin-right: 8px;
}


.result-image {
    width: 80px;
    height: 80px;
    background: #f3f4f6;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-info {
    display: flex;
    flex-direction: column;
    line-height: 17px;
}
.result-name {
    font-size: 14px;
    font-weight:500
}
.result-code {
    font-size:12px;
    font-weight:bold
}
.result-code>span{
    font-weight:normal;
}
.result-actions {
    font-size: 15px;
    font-weight: 500;
    position: absolute;
    right: 16px;
    gap: 12px;
    flex-direction: column;
    align-items: flex-end;
    display: none;
}
.result-item:hover .result-actions {
    display: flex;
}
.result-actions-top{display:flex;gap: 12px;align-items: center;justify-content: space-between;}
.config-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
    position: relative;
    padding-bottom: 100px;
}

.config-left {
    background: #f8f9ff;
    border: 1px solid #ecf0fa;
    border-radius: 2px;
    padding: 12px;
    position: sticky;
    top: 12px;
    height: fit-content;
}

.config-search input {
    width: 100%;
    padding: 10px 12px 10px 32px;
    margin-bottom: 14px;
    border: 1px solid #dfe3f5;
    border-radius: 10px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239aa5bf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat 10px center;
    background-size: 14px;
}

.config-category {
    margin: 14px 0 8px;
    font-size: 10.5px;
    font-weight: 700;
    color: #a0aac7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.config-item {
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 8px;
    color: #111827;
    font-weight: 500;
    font-size: 13px;
}

.config-item:hover {
    background: #f1f5ff;
}

.config-item.active {
    background: #eef2ff;
    color: #2563eb;
    font-weight: 600;
    border: 1px solid #dbeafe;
    box-shadow: 0 0 0 1px #e5edff inset;
}

.config-right {
    flex: 1;
}

.facet-footer {
    margin-top: 20px;
    text-align: right;
}

.facet-meta {
    flex: 1;
}

.facet-meta .field-name {
    font-weight: 600;
    color: #111827;
}

.facet-meta .field-sub {
    font-size: 13px;
    color: #64748b;
}

.facet-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.facet-visibility {
    font-size: 12px;
    color: #9ca3af;
}

.facet-item .facet-delete {
    border: none;
    background: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
}

.facet-item .facet-delete:hover {
    background: #fef2f2;
}

.facet-add-row {
    margin-top: 10px;
    border: 1px dashed #dbeafe;
    border-radius: 8px;
    padding: 12px 10px;
    background: #f8fbff;
}

.facet-add-btn {
    width: 100%;
    border: 1px dashed #cbd5f5;
    background: #f9fbff;
    color: var(--color-primary);
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
}

.facet-add-btn:hover {
    background: #eef3ff;
}

.searchable-add {
    display: flex;
    gap: 8px;
    align-items: center;
}
.searchable-inputwrap {
    flex: 1;
    position: relative;
}
.searchable-add input {
    width: 100%;
    padding: 8px 10px;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    outline: none;
    background: #fff;
}
.searchable-add input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.searchable-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(15,23,42,0.12);
    max-height: 260px;
    overflow-y: auto;
    display: none;
    z-index: 30;
}
.searchable-dropdown.align-bottom {
    top: calc(100% + 6px);
    bottom: auto;
}
.searchable-dropdown.align-top {
    top: auto;
    bottom: calc(100% + 6px);
}
.searchable-dropdown.open {
    display: block;
}
.searchable-dropdown .searchable-item {
    padding: 8px 10px;
    cursor: pointer;
    font-size: 13px;
    color: #0f172a;
}
.searchable-dropdown .searchable-item:hover {
    background: #eef2ff;
    color: #2563eb;
}
.searchable-add .facet-add-btn {
    white-space: nowrap;
    width: auto;
}

.order-select {
    position: relative;
}
.order-toggle {
    padding: 6px 10px;
    border-radius: 12px;
    border: 1px solid #e0e7ff;
    background: #eef2ff;
    color: #2563eb;
    cursor: pointer;
    font-size: 11px;
}
.order-menu {
    position: absolute;
    top: 110%;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(15,23,42,0.12);
    display: none;
    min-width: 140px;
    z-index: 20;
}
.order-menu.open {
    display: block;
}
.order-menu div {
    padding: 8px 10px;
    cursor: pointer;
    font-size: 12px;
    color: #111827;
}
.order-menu div.active,
.order-menu div:hover {
    background: #eef2ff;
    color: #2563eb;
}
.changes-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: -1px;
    display: none;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 32px;
    margin-top: 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
    z-index: 60;
}

.changes-bar.visible {
    display: flex;
}

#searchable-changes-bar {
    display: none !important;
}

.changes-text {
    font-size: 14px;
    color: #475569;
}

.changes-actions {
    display: flex;
    gap: 12px;
}

.admin-system-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.eyebrow {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 4px;
}

.admin-system-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.admin-system-header h1 {
    margin: 4px 0;
    font-size: 26px;
    color: #0f172a;
}

.admin-system-header .muted {
    color: #64748b;
    margin: 0;
}

.admin-system-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.nav-hero {
    background: #f8f9ff;
    border: 1px solid #e4e8f7;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
}

.nav-hero-header h1 {
    margin: 6px 0 4px;
}

.nav-hero-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.hero-buttons {
    display: flex;
    gap: 10px;
}

.hero-search {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.search-input-wrapper.plain {
    border-radius: 0;
    border: 1px solid #d1d5e5;
    background: #fff;
    width: 320px;
}

.nav-hero-meta {
    margin-top: 14px;
    font-size: 13px;
    color: #475569;
}

.nav-hero-flat {
    margin: 16px 0 18px;
    background: none;
    border: none;
    padding: 0;
}

.nav-hero-flat .eyebrow {
    font-size: 11px;
    letter-spacing: 0.16em;
    color: #8d97b8;
    margin-bottom: 4px;
}

.nav-hero-flat h1 {
    font-size: 23px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 6px;
}

.nav-hero-flat .muted {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.nav-actions-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 12px 0 30px;
}

.nav-actions-left {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

#nav-back-btn {
    display: none;
}

.nav-actions-left .btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 32px;
    padding: 0 10px;
    border-radius: 2px;
    font-weight: 500;
    font-size: 13px;
    box-shadow: none;
    background: #fff;
    color: #111827;
    border: 1px solid #e2e8f0;
}

.nav-actions-left .btn i {
    width: 12px;
    height: 12px;
    stroke-width: 1.4;
}

.btn > svg {
    height: 15px;
    width: inherit;
}

.nav-actions-left .btn:not(.btn-primary) {
    background: #fff;
    border-color: #e2e8f0;
    color: #111827;
}

.nav-actions-left .btn.btn-primary {
    border: 1px solid #e2e8f0;
    box-shadow: none;
    background: #fff;
    color: #111827;
}

.nav-actions-right {
    margin-left: auto;
    flex: 1;
    min-width: 220px;
    max-width: 360px;
    display: flex;
    justify-content: flex-end;
}

.nav-actions-row .search-input-wrapper {
    height: 34px;
    border-radius: 2px;
    border-color: #e2e8f0;
    margin-left: 8px;
}

.nav-meta-line {
    font-size: 11px;
    color: #4b5563;
    margin: 8px 0 12px;
}

.filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-chips .chip {
    height: 32px;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 12px;
    border: 1px solid #dfe3f5;
}

.filter-chips .chip.active {
    background: #eef2ff;
    color: #1f2a44;
}

.products-search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    background: transparent;
}

.products-search-bar .search-field {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 8px;
    border: 1px solid #dfe3f5;
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

.products-search-bar input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 14px;
    color: #0f172a;
    background: transparent;
}

.products-search-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 12px;
    color: #4b5563;
}
.products-search-meta .hit-count {
    color: #0f172a;
    font-weight: 600;
}

.filter-dropdown {
    position: relative;
}

.filter-dropdown .filter-menu {
    position: absolute;
    right: 0;
    top: 110%;
    background: #fff;
    border: 1px solid #dfe3f5;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(15,23,42,0.1);
    padding: 6px;
    display: none;
    min-width: 180px;
    z-index: 10;
}

.filter-dropdown .filter-menu.open {
    display: block;
}

.filter-dropdown .filter-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 13px;
    color: #111827;
}

.filter-dropdown .filter-menu button.active,
.filter-dropdown .filter-menu button:hover {
    background: #eef2ff;
}

.products-metrics {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: #4f46e5;
    margin: 4px 0 10px;
    flex-wrap: wrap;
}
.products-metrics.hero-inline {
    margin: 6px 0 6px;
}

.products-metrics strong {
    color: #111827;
    margin-left: 6px;
}

.products-metrics .metric-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    color: #4f46e5;
    border: none;
    box-shadow: none;
}

.products-metrics .metric-pill i {
    width: 14px;
    height: 14px;
    stroke: #2563eb;
}

.products-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 14px;
}
.products-pagination {
    margin: 12px 0 4px;
    display: none;
    justify-content: flex-end;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 10px 16px;
}
.products-pager {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #ffffff;
    background: #0d204a;
    border: 1px solid #dfe3f5;
    border-radius: 8px;
    padding: 15px 15px;
}
.pager-btn {
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font-size: 12px;
}
.pager-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.pager-btn.ghost {
    background: transparent;
    border-color: transparent;
    color: #e5e7eb;
}
.pager-btn.primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}
.pager-line {
    width: 1px;
    height: 22px;
    background: rgba(255,255,255,0.25);
    margin: 0 2px;
}
.pager-input {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #e5e7eb;
}
.pager-input input {
    width: 52px;
    padding: 4px 6px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-align: center;
    font-size: 12px;
}
.pager-input input:focus {
    outline: 1px solid rgba(255,255,255,0.45);
}
.products-pager button {
    padding: 6px 10px;
    border: 1px solid #dfe3f5;
    background: #f8fafc;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    color: #000 !important;
}
.products-pager button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.products-pagination.show {
    display: flex !important;
    justify-content: center;
    align-items: center;
}

.product-card {
    display: grid;
    grid-template-columns: 120px 1fr 140px;
    gap: 16px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    align-items: center;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
    transition: box-shadow 0.12s ease, transform 0.12s ease, border-color 0.12s ease;
}
.product-card:hover {
    border-color: #dbeafe;
    box-shadow: 0 6px 18px rgba(15,23,42,0.08);
    transform: translateY(-2px);
}

.product-thumb {
    width: 120px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-placeholder {
    font-size: 12px;
    color: #6b7280;
}

.product-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-title {
    font-weight: 600;
    color: #111827;
    font-size: 14px;
}
.product-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.product-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    border-radius: 6px;
    color: #2563eb;
    border: 1px solid transparent;
}
.product-link-icon:hover {
    background: #eef2ff;
    border-color: #dbeafe;
}

.product-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #4b5563;
}

.product-body strong {
    color: #0f172a;
}

.product-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    color: #0f172a;
    margin-bottom: 2px;
}
.product-price del {
    color: #9ca3af;
    font-weight: 500;
    font-size: 13px;
}
.product-price .current {
    font-weight: 600;
    font-size: 14px;
}
.product-campaign {
    font-size: 10.5px;
    color: #2563eb;
    font-weight: 600;
    margin-top: 2px;
    text-align: right;
}

.nav-table-wrapper {
    border: 1px solid #e4e8f5;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.nav-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.nav-table tbody tr {
    position: relative;
}

.nav-table thead th {
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 1px solid #eef2ff;
}

.nav-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #f2f5fb;
    vertical-align: middle;
}

.nav-table tbody tr:last-child td {
    border-bottom: none;
}

.nav-table-row {
    transition: background 0.15s ease, transform 0.15s ease;
}

.nav-table-row:hover {
    background: #f8fafc;
}

.nav-table-row.dragging {
    opacity: 0.4;
    transform: scale(0.995);
}

.nav-table-row.drag-over {
    transform: translateX(6px);
    background: #eef2ff;
    box-shadow: inset 2px 0 0 #94a3ff;
}

.nav-col-drag {
    width: 40px;
}

.nav-name-cell {
    display: flex;
    flex-direction: column;
}

.nav-name-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-icon-pill,
.nav-icon-pill.small {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon-pill.small svg {
    width: 16px;
    height: 16px;
    stroke-width: 1.7;
}

.nav-sub.nav-url {
    font-size: 11px;
    color: #7c8aa6;
}

.nav-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    background: #eef2ff;
    color: var(--color-primary);
    border-radius: 999px;
    padding: 2px 12px;
}

.nav-type-badge.is-title {
    background: #0f172a;
    color: #fff;
}

.nav-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-enter-cell {
    width: 46px;
    text-align: right;
}

.nav-enter-cell .icon-btn {
    border-radius: 6px;
}

.drag-handle {
    cursor: grab;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    /* border: 1px dashed #d0d7f6; */
    border-radius: 6px;
    color: #94a3b8;
}

.department-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.department-card {
    border: 1px solid #e5e7f0;
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fafbff;
}

.department-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.department-card h4 {
    margin: 0 0 6px;
    font-size: 16px;
}

.department-card p {
    margin: 0;
    color: #64748b;
}

.department-meta {
    display: flex;
    gap: 16px;
    text-align: right;
    font-size: 13px;
    color: #475569;
}

.department-meta strong {
    display: block;
    font-size: 18px;
    color: var(--color-primary);
}

.department-actions {
    display: flex;
    gap: 6px;
}

.department-actions .icon-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.department-actions .icon-btn.danger {
    color: #ef4444;
    border-color: #fecaca;
}

.permission-block {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    margin-top: 12px;
    background: #f8fafc;
}

.permission-block-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.permission-tree {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.permission-level {
    margin-left: 6px;
    border-left: 1px dashed #e2e8f0;
    padding-left: 10px;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
}

.permission-name {
    font-weight: 500;
    color: #111827;
    font-size: 13px;
}

.permission-pill {
    display: none;
}

.form-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.Input {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.Input label {
    font-weight: 600;
    font-size: 13px;
    color: #0f172a;
}

.Input input[type="text"],
.Input input[type="number"],
.Input input[type="email"],
.Input input[type="password"],
.Input input[type="search"] {
    width: 100%;
    height: 34px;
    padding: 8px 12px;
    border: 1px solid #d6dbef;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
}

.Input input:focus {
    border-color: #0f172a;
    outline: none;
}

.Input input:not(:placeholder-shown) {
    border-color: #0f172a;
    color: #0f172a;
}

.Input textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px 12px;
    border: 1px solid #d6dbef;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    resize: vertical;
}

.Input textarea:focus {
    border-color: #0f172a;
    outline: none;
}

.InputGroup {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.form-vertical input[type="text"],
.form-vertical input[type="number"],
.form-vertical input[type="email"],
.form-vertical input[type="password"],
.form-vertical input[type="search"],
.form-two-col input[type="text"],
.form-two-col input[type="number"] {
    width: 100%;
    height: 34px;
    padding: 8px 12px;
    border: 1px solid #d6dbef;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
}

.form-vertical input[type="text"]:focus,
.form-vertical input[type="number"]:focus,
.form-vertical input[type="email"]:focus,
.form-vertical input[type="password"]:focus,
.form-vertical input[type="search"]:focus,
.form-two-col input[type="text"]:focus,
.form-two-col input[type="number"]:focus {
    border-color: #0f172a;
    outline: none;
}

.form-vertical input[type="text"]:not(:placeholder-shown),
.form-vertical input[type="number"]:not(:placeholder-shown),
.form-vertical input[type="email"]:not(:placeholder-shown),
.form-vertical input[type="password"]:not(:placeholder-shown),
.form-vertical input[type="search"]:not(:placeholder-shown),
.form-two-col input[type="text"]:not(:placeholder-shown),
.form-two-col input[type="number"]:not(:placeholder-shown) {
    border-color: #0f172a;
    color: #0f172a;
}

.form-vertical input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #0f172a;
}

.Switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #4b4f79;
}

.Switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.Switch .track {
    width: 38px;
    height: 20px;
    background: #7a7db6;
    border-radius: 999px;
    position: relative;
    transition: background 0.2s ease;
    cursor: pointer;
}

.Switch .thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.Switch input:checked + .track {
    background: #0f172a;
}

.Switch input:checked + .track .thumb {
    transform: translateX(18px);
}

.Checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #0f172a;
}

.Checkbox input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #7a7db6;
    border-radius: 4px;
    background: #fff;
    position: relative;
    cursor: pointer;
    transition: all 0.15s ease;
}

.Checkbox input[type="checkbox"]:checked {
    border-color: #2563eb;
}

.Checkbox input[type="checkbox"]:checked::after {
    content: "ÃƒÆ’Ã‚Â¢Ãƒâ€¦Ã¢â‚¬Å“ÃƒÂ¢Ã¢â€šÂ¬Ã…â€œ";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
}

.form-two-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.modules-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.module-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.row-action-buttons {
    display: flex;
    gap: 6px;
}

.nav-table tbody tr:hover .row-action-buttons,
.nav-table tbody tr:hover .nav-row-actions {
    opacity: 1;
    visibility: visible;
}

.action-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 12px;
    background: linear-gradient(90deg, rgba(248, 250, 252, 0), rgb(171 190 209 / 96%));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    width: 100%;
    z-index: 1;
}

.nav-table tbody tr:hover .action-overlay {
    opacity: 1;
}

.action-overlay .row-action-buttons {
    pointer-events: auto;
}

.nav-count-cell {
    width: 1%;
    white-space: nowrap;
}

.nav-table tbody td.action-cell {
    width: 1px;
    padding: 0;
}
.nav-table thead th.action-cell-head {
    width: 0;
    padding: 0;
}

.app-tooltip {
    position: fixed;
    z-index: 9999;
    background: #0f172a;
    color: #fff;
    font-size: 12px;
    padding: 6px 8px;
    border-radius: 4px;
    box-shadow: 0 6px 18px rgba(15,23,42,0.18);
    pointer-events: none;
    display: none;
    max-width: 240px;
    word-break: break-word;
}

.admin-card {
    background: #fff;
    border: 1px solid #e5e7f0;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 18px 30px rgba(15,23,42,0.05);
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.admin-card-header h3 {
    margin: 0;
    font-size: 18px;
    color: #0f172a;
}

.nav-tree-body {
    border: 1px solid #e5e7f0;
    border-radius: 12px;
    padding: 12px;
    max-height: 70vh;
    overflow-y: auto;
}

.search-input-wrapper.compact {
    border-radius: 999px;
    padding: 6px 10px;
    min-width: 200px;
}

.nav-tree-group + .nav-tree-group {
    margin-top: 10px;
}

.nav-tree-parent,
.nav-tree-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e5e7f0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.nav-tree-parent.is-selected,
.nav-tree-item.is-selected {
    border-color: var(--color-primary);
    background: rgba(59,91,255,0.06);
}

.nav-tree-children {
    margin-top: 8px;
    margin-left: 18px;
    border-left: 1px dashed #e2e8f0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-name {
    font-weight: 600;
    color: #0f172a;
}

.nav-sub {
    font-size: 12px;
    color: #94a3b8;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-badge {
    font-size: 11px;
    text-transform: uppercase;
    background: #eef2ff;
    color: var(--color-primary);
    border-radius: 999px;
    padding: 2px 10px;
}

.nav-badge.muted {
    background: #e5e7eb;
    color: #6b7280;
}

.badge-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.badge-nav.on {
    background: #e8f9f0;
    color: #15803d;
}

.badge-nav.off {
    background: #f3f4f6;
    color: #6b7280;
}

.empty-panel {
    text-align: center;
    border: 1px dashed #dbe4ff;
    border-radius: 12px;
    padding: 24px;
    color: #64748b;
}

.admin-detail-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.detail-actions {
    display: flex;
    gap: 10px;
}

.admin-detail-form .input-group {
    margin-bottom: 14px;
}

.input-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.switch-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.detail-footer {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.info-banner {
    margin-top: 16px;
    border-radius: 10px;
    background: #eff4ff;
    color: #1d4ed8;
    padding: 10px 14px;
    font-size: 13px;
}

.monitor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.monitor-card {
    border: 1px solid #e5e7f0;
    border-radius: 12px;
    padding: 14px;
    background: #f8fafc;
}

.monitor-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    margin-bottom: 10px;
}


.status-dot.up { background: #22c55e; }
.status-dot.degraded { background: #f97316; }
.status-dot.down { background: #ef4444; }

.monitor-card-body {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: #475569;
}

.monitor-card-body strong {
    display: block;
    font-size: 16px;
    color: #0f172a;
}

.alert-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #e5e7f0;
    border-radius: 10px;
}

.alert-row strong {
    display: block;
    color: #0f172a;
}

.alert-row span {
    font-size: 12px;
    color: #94a3b8;
}

.alert-row.warning {
    border-color: #fbbf24;
    background: #fffbeb;
}

.alert-row.info {
    border-color: #93c5fd;
    background: #eff6ff;
}

.alert-row.error {
    border-color: #f87171;
    background: #fef2f2;
}
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.theme-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15,23,42,0.05);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.theme-card.active {
    border-color: var(--color-primary);
    box-shadow: 0 12px 30px rgba(59,91,255,0.15);
}

.theme-card img {
    width: 100%;
    border-radius: 10px;
    height: 140px;
    object-fit: cover;
}

.theme-card h4 {
    margin: 0;
    font-size: 16px;
    color: #0f172a;
}

.theme-card p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.theme-card .theme-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.theme-card .theme-status {
    font-size: 12px;
    color: var(--color-primary);
    font-weight: 600;
}

.facet-edit-panel {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fff6ea;
}

.facet-edit-panel h3 {
    margin-top: 0;
}

.facet-edit-panel .input {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
}

/* Legacy support */
.modal-overlay.open {
    display: flex;
}

.modal.modal-lg {
    width: min(960px, 96vw);
}

@keyframes modalShow {
    from { opacity: 0; transform: scale(0.98); }
    
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.modal-body::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.25);
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
}

.modal-footer {
    padding: 16px 20px 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-footer .btn {
    min-width: 120px;
    border-radius: 6px;
}

.nav-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.nav-modal.open {
    display: flex;
}

.nav-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
}

.nav-modal-card {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(15,23,42,0.2);
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.nav-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.nav-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.nav-modal .tabs {
    display: flex;
    gap: 10px;
    padding: 0 16px;
    border-bottom: 1px solid #e5e7eb;
}

.nav-modal .tab {
    padding: 10px 12px;
}

.nav-modal .tab-panel {
    padding: 12px 16px 16px;
    overflow: auto;
    max-height: calc(80vh - 120px);
}

.nav-table.compact td,
.nav-table.compact th {
    padding: 8px 10px;
}

.app-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13, 25, 48, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.app-modal {
    width: min(660px, 95vw);
    max-height: 90vh;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.app-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 30px 14px;
    border-bottom: 1px solid #eef2ff;
}

.app-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #0b1a37;
}

.app-modal-body {
    padding: 18px 24px 22px;
    background: #fff;
    flex: 1;
    overflow-y: auto;
    max-height: calc(90vh - 160px);
}

.app-modal-footer {
    padding: 16px 24px 20px;
    display: flex;
    gap: 12px;
    border-top: 1px solid #eef2ff;
    background: #fff;
}

.app-modal-footer .btn {
    flex: 1;
}

.app-modal-close {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    opacity: 0.6;
}

.app-modal-close:hover {
    opacity: 1;
}

/* Edit Modal Tabs */
.edit-modal-tabs {
    display: flex !important;
    gap: 1rem !important;
    border-bottom: 1px solid #e0e0e0 !important;
    padding: 0 1.5rem !important;
}

.edit-modal-tab {
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -1px;
}

.edit-modal-tab:hover {
    color: #0b1a37;
}

.edit-modal-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.edit-modal-content {
    display: none;
}

.edit-modal-content.active {
    display: block;
}

.modal-confirm-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 30;
    padding: 12px;
}

.modal-confirm-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(15,23,42,0.2);
    padding: 16px 18px;
    max-width: 380px;
    width: 100%;
    border: 1px solid #fca5a5;
}

.modal-confirm-card p {
    margin: 0 0 10px;
    color: #b91c1c;
    font-weight: 600;
}

.modal-confirm-card .confirm-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.manual-modal-text,
.manual-json-sample,

.manual-json-sample {
    background: #111b2b;
    color: #f8fbff;
    padding: 16px;
    border-radius: 10px;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 13px;
    max-height: 200px;
    overflow: auto;
    margin-bottom: 24px;
}

.manual-json-input {
    width: 100%;
    min-height: 180px;
    background: #0f172a;
    color: #e2e8f0;
    border: none;
    border-radius: 10px;
    padding: 16px;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 14px;
    resize: vertical;
}

.input-group {
    margin-bottom: 14px;
}

.input-group label {
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.empty-facets {
    margin-top: 20px;
    padding: 40px;
    text-align: center;
    border: 2px dashed #ddd;
    border-radius: 12px;
    color: #666;
}

.logs-header-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.logs-header-spacer {
    flex: 1;
}

.logs-table-wrapper {
    width: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.logs-table thead {
    background: #fafafa;
}

.logs-table th {
    text-align: left;
    padding: 12px 14px;
    font-weight: 600;
    color: #444;
    border-bottom: 1px solid #eee;
}

.logs-table td {
    padding: 12px 14px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.logs-table tbody tr:hover {
    background: #fafcff;
}

.logs-empty td {
    padding: 40px 20px;
    text-align: center;
}

.logs-empty-state h3 {
    margin: 5px 0;
    font-size: 18px;
    color: #222;
}

.logs-empty-state p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.badge-method {
    background: #f3f3f8;
    color: #666;
    border: 1px solid #ddd;
}

.badge-code {
    padding: 4px 12px;
}

.code-success { background: #e9fdf1; color: #22a354; }
.code-warning { background: #fff4d8; color: #c97e00; }
.code-error   { background: #ffe8e8; color: #d33; }

#log-toggle-btn {
    min-width: 100px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-btn {
    padding: 6px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #dfe3f5;
    border-radius: 0;
    cursor: pointer;
}
.icon-btn>svg {
    height: 16px;
}

.icon-btn.danger {
    color: #0f172a;
}

.icon-btn.success {
    color: #059669;
}
.icon-btn.success:hover {
    background: #d1fae5;
}

.icon-btn:hover {
    background: #f4f6ff;
}

#log-filter-btn {
    border-radius: 6px;
}

@media (max-width: 600px) {
    .logs-table th:nth-child(2),
    .logs-table td:nth-child(2),
    .logs-table th:nth-child(3),
    .logs-table td:nth-child(3) {
        display: none;
    }
}

.stats-page {
    padding: 25px;
}

.stats-title-group {
    display: flex;
    gap: 16px;
    align-items: center;
    width: 100%;
}

.stats-title-group h2 {
    margin: 0;
    font-size: 20px;
    flex: 0 0 auto;
}

.period-selector {
    display: flex;
    gap: 8px;
    align-items: center;
    background: #f5f5f5;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.period-nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.period-nav-btn:hover {
    background: #e0e0e0;
    color: #000;
}

.period-nav-btn:active {
    transform: scale(0.95);
}

.period-display {
    min-width: 100px;
    text-align: center;
    font-weight: 600;
    color: #0066cc;
}

/* ============= SEARCH METRICS CARD ============= */
.search-metrics-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 0;
    padding: 24px;
    margin-bottom: 18px;
}

.metrics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.metrics-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #0066cc;
    letter-spacing: 2px;
}

.metrics-period {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: #666;
}

.period-text {
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.period-text:hover {
    background: #f0f0f0;
    color: #0066cc;
}

.period-arrows {
    color: #999;
    font-size: 12px;
}

.metrics-content {
    display: flex;
    gap: 40px;
    align-items: stretch;
}

.metrics-divider {
    width: 1px;
    background: #e8e8e8;
    flex-shrink: 0;
}

.metrics-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-width: 200px;
}

.metric-row {
    display: flex;
    gap: 0;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-direction: column;
    align-items: flex-start;
}

.metric-row:hover {
    background: #f5f5f5;
}

.metric-row.hidden {
    opacity: 0.5;
    color: #999;
}

.metric-row[data-color]::before {
    --metric-color: attr(data-color);
}

.metric-row[data-color] .metric-label::before {
    background-color: inherit;
}

.metric-row:nth-child(1) .metric-label::before {
    background-color: #0066cc;
}

.metric-row:nth-child(3) .metric-label::before {
    background-color: #ff4444;
}

.metric-row:nth-child(5) .metric-label::before {
    background-color: #ffaa00;
}

.metric-row.hidden .metric-label {
    color: #999;
}

.metric-row.hidden .metric-value {
    color: #999;
}

.metric-spacer {
    height: 1px;
    background: #f0f0f0;
}

.metrics-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1;
}

.metrics-chart {
    flex: 1;
    height: 70px;
    position: relative;
    background: transparent;
    overflow: hidden;
}

.metrics-chart-divider {
    height: 1px;
    background: #e8e8e8;
}

.metrics-chart canvas {
    display: block;
    width: 100% !important;
    height: 70px !important;
    background: transparent;
}

/* Zero Result Chart Card */
.zero-result-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 0;
    padding: 24px;
    margin-bottom: 18px;
}

.zero-result-chart-wrapper {
    display: flex;
    gap: 40px;
    align-items: stretch;
}

.zero-result-metrics-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-width: 200px;
}

.zero-result-chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    background: transparent;
    flex: 1;
}

.zero-result-card canvas {
    display: block;
    width: 100% !important;
    height: 300px !important;
    background: transparent;
}

.checkbox {
    font-size: 14px;
}

.tab-stats {
    padding: 20px 30px;
}

.stats-top-nav {
    font-size: 14px;
    margin-bottom: 20px;
}

.stats-top-nav a {
    color: #0066ff;
    text-decoration: underline;
}

.stats-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 35px;
}

.stats-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stats-card-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.date-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.date-picker i {
    width: 18px;
}

.stats-card-filters {
    display: flex;
    gap: 25px;
    margin-bottom: 10px;
    padding-left: 5px;
}

.stats-card-filters .checkbox {
    font-size: 14px;
    cursor: pointer;
}

.chart-container {
    width: 100%;
    height: 350px;
}

.chart-container canvas {
    width: 100% !important;
    height: 350px !important;
}

.stats-footer-link {
    text-align: right;
    margin-top: 10px;
}

.stats-footer-link a {
    color: #0066ff;
    font-size: 13px;
}

.product-details-modal {
    padding: 20px 40px;
}

.pd-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 15px;
}

.pd-title {
    font-size: 22px;
    font-weight: 600;
}

.pd-close {
    position: absolute;
    right: 0;
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
}

.pd-nav {
    background: #fff;
    border: 1px solid #ddd;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
}

.pd-prev { position: absolute; left: 0; }
.pd-next { position: absolute; right: 40px; }

.pd-photo-box {
    text-align: center;
    margin: 20px 0;
}

.pd-photo {
    max-width: 280px;
    border-radius: 8px;
    object-fit: contain;
}

.pd-product-name {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 15px;
}

.pd-object-info {
    text-align: center;
    margin-bottom: 20px;
}

.pd-ranked {
    font-size: 13px;
    color: #555;
    text-decoration: underline;
}

.pd-fields {
    padding: 5px 0;
}

.pd-field-item {
    margin-bottom: 18px;
}

.pd-field-name {
    font-size: 14px;
    font-weight: 600;
}

.pd-field-value {
    font-size: 15px;
    word-break: break-word;
    color: #333;
    margin-top: 2px;
}

.a-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.a-icon i {
    width: 18px;
    height: 18px;
    color: #6d6e78;
}

.a-text {
    color: #4b4d55;
}

.a-text strong {
    font-weight: 600;
}

.bullet {
    margin: 0 6px;
    opacity: 0.5;
}

.a-link {
    color: #2860ff;
    cursor: pointer;
    text-decoration: none;
}
.a-link:hover {
    text-decoration: underline;
}

.a-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 7px;
}

.a-icon-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e2e2e7;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.a-icon-btn:hover {
    background: #f6f6f8;
}
.a-icon-btn i {
    width: 16px;
    height: 16px;
    color: #444;
}

.tile-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
}

.tile-modal {
    width: 1200px;
    height: 780px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0,0,0,0.15);
}

.tile-modal-header {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.tile-modal-body {
    display: flex;
    gap: 30px;
    padding: 20px;
    flex: 1;
    overflow: hidden;
}

.tile-left {
    width: 360px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #f1f1f4;
    padding-right: 20px;
}

.tile-tabs {
    display: flex;
    gap: 25px;
    border-bottom: 1px solid #e9e9ee;
    margin-bottom: 20px;
}
.tile-tab {
    padding-bottom: 10px;
    cursor: pointer;
    color: #7a7d87;
}
.tile-tab.active {
    font-weight: 600;
    border-bottom: 2px solid #3f68ff;
    color: #3f68ff;
}

.tile-tab-content {
    display: none;
}
.tile-tab-content.active {
    display: block;
}

.t-label {
    font-size: 13px;
    margin-top: 15px;
    margin-bottom: 4px;
    display: block;
    color: #444;
}
.t-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.t-add-field {
    display: block;
    margin-top: 15px;
    color: #3f68ff;
    cursor: pointer;
}

.t-toggle-line {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.t-save-btn {
    margin-top: 25px;
    width: 100%;
    padding: 10px;
    background: #2b60ff;
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

.tile-right {
    flex: 1;
    overflow-y: auto;
}

.tile-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 200px);
    gap: 25px;
}

.p-title {
    font-weight: 600;
    margin-top: 10px;
}
.p-sub, .p-sub2 {
    font-size: 13px;
    color: #7a7a7a;
}
.p-tag {
    margin-top: 10px;
    background: #f3f3ff;
    color: #6b6fe5;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    text-align: center;
}

.layout-pref-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.layout-pref-modal {
    width: 90%;
    height: 85%;
    background: white;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    box-shadow: 0px 6px 28px rgba(0,0,0,0.2);
}

.layout-pref-header {
    border-bottom: 1px solid #e6e6e6;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
}
.layout-pref-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}
.layout-pref-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.layout-pref-content {
    flex: 1;
    display: flex;
    background: #f7f8fa;
}

.layout-pref-left {
    width: 360px;
    padding: 20px 25px;
    background: white;
    border-right: 1px solid #eaeaea;
}

.input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    margin-bottom: 12px;
    border-radius: 5px;
}

.save-btn {
    width: 100%;
    background: #0057ff;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    margin-top: 10px;
}

.help-text {
    margin-top: 10px;
    font-size: 12px;
}

.layout-pref-right {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.preview-card {
    background: white;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.preview-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}
.preview-card .title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}
.preview-card .subtitle {
    font-size: 12px;
    color: #666;
}

.facet-item.dragging {
    opacity: 0.4;
}

/* Algolia-style Toast */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100000;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 320px;
    max-width: 420px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.toast-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.15s;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #64748b;
}

.mod7-pop-container{width:100%;position: fixed;top: 0;left: 0;z-index: 999999999999;background: #fff;height: -webkit-fill-available;font-family: system-ui;font-size: 14px;}
.mod7-pop-container .mod7-container{margin: 0 auto;}

.mod7-pop-container .mod7-logo>img{height: 67px;}
.mod7-pop-container .mod7-search-input{width:100%;position: relative;}
.mod7-pop-container .mod7-search-input>img{position: absolute;right: 40px;top: 10px;width: auto;height: 20px;display: none;}
.mod7-pop-container .mod7-search-input>svg{position: absolute;right: 12px;top: 10px;width: auto;height: 20px;display:none;cursor: pointer;}
.mod7-pop-container .mod7-search-input>svg.mod7-search-icon{display:block}
.mod7-pop-container .mod7-search-input.Query>svg.mod7-search-icon{display:none}
.mod7-pop-container .mod7-search-input.Query>img{display:block}
.mod7-pop-container .mod7-search-input.Query>svg.mod7-search-query{display:block}
.mod7-pop-container .mod7-search-input.Find>svg.mod7-search-icon{display:none}
.mod7-pop-container .mod7-search-input.Find>svg.mod7-search-query{display:block}

.mod7-pop-container .mod7-search-input>input{width:100%;background: #efefef;border: 0;border-bottom: 1px solid #000;line-height: 38px;padding: 2px 8px;font-size: 14px;outline: none;}

.mod7-pop-container .mod7-tooltip>svg{position: absolute;fill: #000;right: -9px;top: 9px;transform: rotate(212deg);width: auto;height: 14px;}
.mod7-pop-container .mod7-tooltip-text{width:100%}
.mod7-pop-container .mod7-button{width: 40px;height: 40px;background: #000;border-radius: 4100%;flex: none;display: flex;align-items: center;justify-content: center;cursor: pointer;}
.mod7-pop-container .mod7-button>svg{
    stroke: #fff;
    height: 28px;
    width: auto;
}

.mod7-pop-container .mod7-search-area{width:100%;padding: 32px;padding-top: 100px;display: none;}
.mod7-pop-container .mod7-head-content{width:100%;min-height: 72px;}
.mod7-pop-container .mod7-last-keyword{width:100%;display: flex;padding: 4px 0px;gap: 10px;align-items: center;justify-content: center;display: none;}
.mod7-pop-container .mod7-suggets-keyword{width:100%;display: flex;padding: 4px 0px;gap: 10px;align-items: center;justify-content: center;}
.mod7-pop-container .mod7-filter-history{width:100%;display: flex;padding: 4px 0px;gap: 10px;align-items: center;justify-content: flex-start;}
.mod7-pop-container .mod7-filter-history .mod7-title{display:none}

.mod7-pop-container .mod7-list .FilterSelectedItem{display:flex;flex-direction: column;border: 1px solid #efefef;background: #efefef;padding: 3px;border-radius: 1px;position: relative;padding-right: 15px;}
.mod7-pop-container .mod7-list .FilterSelectedItem>span:nth-child(1){display:flex;font-size: 11px;}
.mod7-pop-container .mod7-list .FilterSelectedItem>span:nth-child(2){display:flex;font-size: 12px;}
.mod7-pop-container .mod7-list .FilterSelectedItem>.Removed{position: absolute;right: -6px;top: -6px;width: 15px;height: 15px;background: #000;color: #fff;border-radius: 100%;display: flex;align-items: center;justify-content: center;flex: none;}
.mod7-pop-container .mod7-item{display: flex;background: #efefef;padding: 7px 12px;border-radius: 2px;font-size: 12px;align-items: center;border-radius: 3px;cursor: pointer;}
.mod7-pop-container .mod7-suggets-keyword .mod7-item{display: flex;background: transparent;padding: 4px 4px;border-radius: 2px;font-size: 12px;align-items: center;border-radius: 3px;}
.mod7-pop-container .mod7-suggets-keyword .mod7-item:hover{text-decoration:underline;color:#000}
.mod7-pop-container .mod7-item>span:nth-child(1){width:100%}
.mod7-pop-container .mod7-item>span:nth-child(2){background: #ccc;border-radius: 100%;flex: none;width: 16px;height: 16px;display: flex;align-items: center;justify-content: center;font-size: 9px;font-weight: bold;margin-left: 10px;}

.mod7-pop-container .mod7-result-text{width:100%;margin-top: 25px;}
.mod7-pop-container .mod7-search-keyword{width:100%}
.mod7-pop-container .mod7-search-keyword>span{width:100%}
.mod7-pop-container .mod7-search-keyword>strong{width:100%}

.mod7-pop-container .mod7-result-tools{width:100%;display: flex;align-items: center;justify-content: space-between;margin: 10px 0px;}
.mod7-pop-container .mod7-filter-btn{display: flex;align-items: center;cursor: pointer;}
.mod7-pop-container .mod7-filter-btn>span{width:100%}
.mod7-pop-container .mod7-filter-btn>svg{height: 28px;width: inherit;}
.mod7-pop-container .mod7-sort-btn{margin-left: auto;display: flex;align-items: center;display: none;}
.mod7-pop-container .mod7-sort-btn>span{width:100%}
.mod7-pop-container .mod7-sort-btn>svg{width:100%}

.mod7-pop-container .mod7-result-viewer{width:100%;display: flex;position: relative;z-index: 2;height: 70vh !important;}
.mod7-pop-container .mod7-viewer-filters-overflow{position:fixed;top:0;left:0;width:100%;height:100%;background: #000000a8;z-index: 1;display: none;}
.mod7-pop-container .mod7-viewer-overflow{position:fixed;top:0;left:0;width:100%;height:100%;background: #00000000;z-index: 1;display: none;}

.mod7-pop-container.filterOpen .mod7-viewer-filters{display: flex}
.mod7-pop-container .mod7-filter-item{width:100%;border-bottom: 1px solid #dddddd;padding-bottom: 8px;}

.mod7-pop-container .mod7-filter-item.show .mod7-filter-content{display: flex;flex-direction: column;transition: all 0.4s;}
.mod7-pop-container .mod7-filter-item-head{width:100%;display: flex;align-items: center;border-radius: 4px;padding: 7px;font-size: 15px;font-weight: 100;cursor: pointer;}
.mod7-pop-container .mod7-filter-item-head>span{width:100%;font-weight: 400;}
.mod7-pop-container .mod7-filter-item-head>svg{margin-left: auto;transform: rotate(270deg);transition: 0.4s;}
.mod7-pop-container .mod7-filter-item.show .mod7-filter-item-head>svg{transform: rotate(360deg);transition: 0.4s;}
.mod7-pop-container .mod7-filter-content{width:100%;display: none;padding: 12px 0px;transition: all 0.4s;}
.mod7-pop-container .mod7-filter-content>input{width:100%;border: solid 1px #e2e2e2;border-radius: 4px;line-height: 28px;padding: 0 6px;margin-bottom: 12px;background: #fafafa;font-weight: 200;font-size: 12px;}
.mod7-pop-container .mod7-filter-content-list{width:100%}
.mod7-pop-container .mod7-filter-selected{width:100%;display: flex;align-items: center;padding: 5px 4px;border-radius: 4px;margin-bottom: 2px;cursor: pointer;}
.mod7-pop-container .mod7-filter-content[items="1"][view="0"] .mod7-filter-selected:nth-child(n+7){display:none}
.mod7-pop-container .mod7-filter-content[items="1"][view="1"] .mod7-filter-selected:nth-child(n+7){display:flex}
.mod7-pop-container .mod7-filter-content[items="0"]>input{display:none}

.mod7-pop-container .mod7-filter-content[items="0"] .mod7-filter-content-more-view{display:none}
.mod7-pop-container .mod7-filter-content[items="0"] .mod7-filter-content-more-hide{display:none}
.mod7-pop-container .mod7-filter-content[items="1"][view="0"] .mod7-filter-content-more-view{display:flex;text-align: center;width: 100%;justify-content: center;align-items: center;text-decoration: underline;margin-top: 10px;font-weight: 300;cursor: pointer;}
.mod7-pop-container .mod7-filter-content[items="1"][view="0"] .mod7-filter-content-more-hide{display:none}
.mod7-pop-container .mod7-filter-content[items="1"][view="1"] .mod7-filter-content-more-view{display:none}
.mod7-pop-container .mod7-filter-content[items="1"][view="1"] .mod7-filter-content-more-hide{display:flex;text-align: center;width: 100%;justify-content: center;align-items: center;text-decoration: underline;margin-top: 10px;font-weight: 300;cursor: pointer;}

.mod7-pop-container .mod7-filter-selected:hover{background: #f8f8f8;}
.mod7-pop-container .mod7-filter-checked{width: 16px;height: 16px;border: 1px solid #ccc;border-radius: 2px;margin-right: 8px;}
.mod7-pop-container .mod7-filter-selected.active .mod7-filter-checked{border: 1px solid #000;position:relative}
.mod7-pop-container .mod7-filter-selected.active .mod7-filter-checked::before{content:"";position: absolute;width: 9px;height: 10px;background:#000;left: 2px;top: 2px;}
.mod7-pop-container .mod7-filter-text{width:100%;font-weight: 200;display: flex;align-items: center;justify-content: space-between;}
.mod7-pop-container .mod7-filter-text>span:nth-child(1){background: #f0f0f0;border-radius: 4px;padding: 2px 8px;font-size: 11px;border-radius: 30px;font-weight: 400;}
.mod7-pop-container .mod7-filter-text>span:nth-child(2){width:100%}

.mod7-pop-container .mod7-viewer-products{width:100%;display: flex;flex-wrap: wrap;overflow: auto;height: 60vh;}

.mod7-pop-container .mod7-productItem>img{width:100%}

.mod7-pop-container .mod7-social {
   margin: 4px 0;
   width: 100%;
   overflow: hidden;
   height: 14px!important;
   line-height: 14px!important;
   position: relative
}

.mod7-pop-container .mod7-social>.bn-news:empty {
   display: none
}

.mod7-pop-container .mod7-social[S="0"]{
   display: none
}

.mod7-pop-container .mod7-social .bn-news {
   position: absolute;
   left: 0;
   top: 0;
   bottom: 0;
   height: 100%;
   right: 0;
   overflow: hidden
}

.mod7-pop-container .mod7-social ul {
   position: absolute;
   width: 100%;
   margin: 0;
   padding: 0;
   display: flex;
   list-style: none;
   height: 14px;
   flex-direction: column;
   display: block;
   height: 100%;
   list-style: none;
   padding: 0;
   margin: 0;
   left: 0;
   bottom: 0;
   width: 100%;
   position: absolute
}

.mod7-pop-container .mod7-social ul li {
   padding: 0;
   display: flex!important;
   gap: 5px;
   font-size: 12px;
   line-height: 14px;
   align-items: center;
   white-space: nowrap;
   overflow: hidden!important;
   text-overflow: ellipsis;
   text-decoration: none;
   -webkit-transition: color .2s linear;
   -moz-transition: color .2s linear;
   -o-transition: color .2s linear;
   transition: color .2s linear;
   position: absolute;
   width: 100%;
   display: none;
   color: #333
}

.mod7-pop-container .mod7-social ul li>img {
   display:none
}

.mod7-pop-container .mod7-social ul li>span.Color {
   font-weight: 600;
   color: #000000
}

.mod7-pop-container .mod7-comments{display:flex;gap: 0px;}
.mod7-pop-container .mod7-comments>span>svg{fill:#ccc;height: 14px;margin-top: 2px;}

.mod7-pop-container .mod7-comments[Rate="0"] {
   margin-right: 0
}

.mod7-pop-container .mod7-comments[Rate="1"] span:nth-child(1)>svg {
   fill: #FFC107
}

.mod7-pop-container .mod7-comments[Rate="2"] span:nth-child(1)>svg {
   fill: #FFC107
}

.mod7-pop-container .mod7-comments[Rate="2"] span:nth-child(2)>svg {
   fill: #FFC107
}

.mod7-pop-container .mod7-comments[Rate="3"] span:nth-child(1)>svg {
   fill: #FFC107
}

.mod7-pop-container .mod7-comments[Rate="3"] span:nth-child(2)>svg {
   fill: #FFC107
}

.mod7-pop-container .mod7-comments[Rate="3"] span:nth-child(3)>svg {
   fill: #FFC107
}

.mod7-pop-container .mod7-comments[Rate="4"] span:nth-child(1)>svg {
   fill: #FFC107;
}

.mod7-pop-container .mod7-comments[Rate="4"] span:nth-child(2)>svg {
   fill: #FFC107
}

.mod7-pop-container .mod7-comments[Rate="4"] span:nth-child(3)>svg {
   fill: #FFC107
}

.mod7-pop-container .mod7-comments[Rate="4"] span:nth-child(4)>svg {
   fill: #FFC107
}

.mod7-pop-container .mod7-comments[Rate="5"] span:nth-child(1)>svg {
   fill: #FFC107
}

.mod7-pop-container .mod7-comments[Rate="5"] span:nth-child(2)>svg {
   fill: #FFC107
}

.mod7-pop-container .mod7-comments[Rate="5"] span:nth-child(3)>svg {
   fill: #FFC107
}

.mod7-pop-container .mod7-comments[Rate="5"] span:nth-child(4)>svg {
   fill: #FFC107
}

.mod7-pop-container .mod7-comments[Rate="5"] span:nth-child(5)>svg {
   fill: #FFC107
}

.mod7-pop-container .mod7-info{width:100%}
.mod7-pop-container .mod7-gallery{width:100%;position: relative;}
.mod7-pop-container .mod7-gallery>img{width:100%;position: relative;}
.mod7-pop-container .mod7-name{width:100%;font-size: 12px;color: #000;font-weight: 400;margin-top: 2px;margin-bottom: 8px;}
.mod7-pop-container .mod7-old-price{width:100%;font-size: 12px;text-decoration: line-through;color: #767676;line-height: 14px;font-weight: 200;}
.mod7-pop-container .mod7-old-price[P="0"]{display:none}

.mod7-pop-container [campaing="true"] .mod7-sale-price{width:100%;font-size: 12px;text-decoration: line-through;color: #767676;line-height: 14px;font-weight: 300;}
.mod7-pop-container .mod7-sale-price{width:100%;font-size: 12px;font-weight: 600;line-height: 14px;color: #000;margin-top: 3px;}
.mod7-pop-container .mod7-price{width:100%;font-size: 12px;font-weight: 600;line-height: 14px;color: #000;margin-top: 3px;}
.mod7-pop-container .mod7-price .mod7-sale{width:100%;font-size: 12px;font-weight: 600;line-height: 14px;color: #000;margin-top: 3px;}
.mod7-pop-container .mod7-price .mod7-discount{display:none}

.mod7-pop-container .mod7-campaing-badge{font-weight:200;font-size:12px;color:#f00;margin-top:5px}

.mod7-pop-container [campaing="false"] .mod7-price{display:none}

.mod7-pop-container .mod7-clear-btn{width:100%;cursor: pointer;order: 10;}
.mod7-pop-container .mod7-clear-btn>span{text-decoration: underline;font-size: 12px;margin-left: 5px;}

.mod7-pop-container .mod7-products{width:100%;padding-top: 20px;display: flex;flex-wrap: wrap;}

@media only screen and (max-width: 768px) {
   .mod7-pop-container .mod7-search-area{padding: 8px;padding-top: 80px;}
   .mod7-pop-container .mod7-viewer-area{padding: 8px;padding-top: 80px;}
   .mod7-pop-container .mod7-logo{display: none;}
   .mod7-pop-container .mod7-tooltip{display: none;}
   .mod7-pop-container .mod7-closed{
    width: auto;
    margin-left: 10px;
   }

   .mod7-pop-container .mod7-productItem{width:50%}
   .mod7-pop-container .mod7-viewer-filters{display:none;position: fixed;left: 0;background: #fff;z-index: 2;width: 100%;margin: 0;padding: 28px;max-height: 68vh;overflow: auto;bottom: 0;padding-bottom: 85px;}
   .mod7-pop-container .mod7-title{width: 110px;flex: none;}
   .mod7-pop-container .mod7-list{overflow-x: scroll;width: 100%;padding-top: 6px;}

   .mod7-pop-container.filterOpen .mod7-viewer-overflow{display: block;}
   .mod7-pop-container.filterOpen .mod7-viewer-filters-overflow{display: block;}
   .mod7-filter-apply{display: block;}
   .mod7-pop-container .mod7-header{z-index:1}

}

.project-switcher-wrapper {
    position: relative; 
}

.current-project {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    border: 1px solid #cfd8ff;
    background: #f7f9ff;
    box-shadow: inset 0 0 0 1px rgba(64, 88, 255, 0.08);
}

.current-project:hover {
    background-color: #eef2ff;
    border-color: #b9c6ff;
}

.project-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    gap: 2px;
}

.project-chip-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffe3b8, #ffc78f);
    color: #8a4b11;
    font-weight: 700;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.03em;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.switcher-arrow {
    margin-left: 12px;
    color: #6c757d; 
    transition: transform 0.2s ease-in-out;
}

.project-switcher-wrapper.open .switcher-arrow {
    transform: rotate(180deg);
}

.project-dropdown {
    position: absolute;
    top: calc(100% + 8px); 
    left: 0;
    width: 280px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid #e9ecef;
    z-index: 1000;
    overflow: hidden;
    display: none; 
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.project-dropdown.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-header {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f1f3f5;
}

#project-list {
    list-style: none;
    padding: 8px 0;
    margin: 0;
    max-height: 200px; 
    overflow-y: auto;
}

#project-list li a {
    display: flex !important;
    align-items: center;
    padding: 10px 16px;
    color: #212529;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease, color 0.2s ease;
}
#project-list li a .project-list-info{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
#project-list li a .project-list-info>span:nth-child(1){
    width: 100%;
    font-size: 12px;
    font-weight: 600;
}
#project-list li a .project-list-info>span:nth-child(2){
    width: 100%;
    font-size: 10px;
}

#project-list li a:hover {
    background-color: #f8f9fa;
    color: #007bff; 
}

.dropdown-footer {
    border-top: 1px solid #f1f3f5;
    padding: 8px;
}

.dropdown-footer a {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    text-decoration: none;
    color: #495057;
    transition: background-color 0.2s ease;
}

.dropdown-footer a:hover {
    background-color: #f8f9fa;
}

.dropdown-footer a i {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

.dropdown-footer a span {
    font-size: 14px;
    font-weight: 500;
}

.project-domain {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #6c757d; 
}

.project-favicon-list {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

.login-wrapper {
    display: flex;
    width: 100vw;
    height: 100vh;
    background: #f7f9fb;
    overflow: hidden;
}

.login-left {
    width: 58%;
    background: url('/images/bg-pattern.png'), #0c1528;
    background-size: cover;
    color: #fff;
    padding: 80px;
    display: flex;
    align-items: center;
}

.login-left-inner {
    max-width: 560px;
}

.login-badge {
    background: rgba(255,255,255,0.15);
    padding: 8px 18px;
    border-radius: 20px;
    display: inline-block;
    font-size: 13px;
}

.login-title {
    font-size: 46px;
    line-height: 1.2;
    margin: 25px 0;
    font-weight: 700;
}

.login-title span {
    color: #42d37e;
}

.login-subtext {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: .9;
}

.login-stats {
    margin: 20px 0;
    display: flex;
    gap: 40px;
    color: #fff;
    font-size: 16px;
}

.login-brands img {
    height: 34px;
    margin-right: 20px;
    opacity: .8;
}

.login-right {
    width: 42%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
}

.login-box {
    width: 360px;
}

.login-box h2 {
    font-size: 28px;
    margin-bottom: 6px;
}

.login-box p {
    color: #666;
    margin-bottom: 25px;
}

.login-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.login-input-wrapper {
    margin-bottom: 18px;
}

.login-input-wrapper input {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #d8dfe6;
    background: #f8fafc;
    font-size: 15px;
}

.login-input-wrapper input:focus {
    border-color: #42d37e;
    outline: none;
}

.login-error {
    color: #e63946;
    font-size: 14px;
    margin-bottom: 12px;
    display: none;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: #1b8a5a;
    border: none;
    color: white;
    border-radius: 8px;
    font-size: 17px;
    cursor: pointer;
    font-weight: 600;
}

.login-btn:hover {
    background: #157347;
}

.no-index-wrapper {
     
     background: #f0f2f8; 
     transition: left 0.2s ease; 
     border: 1px solid #efefef;
     border-radius: 10px;
}

.no-index-box {
    padding: 40px 50px;
    text-align: left;
}

.no-index-icon {
    width: 64px;
    height: 64px;
    background: #e3e7f5;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.no-index-icon i {
    width: 32px;
    height: 32px;
    color: #4450ff;
}

.no-index-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.no-index-desc {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 25px;
    line-height: 16px;
}

.create-index-form {
    display: block;
    margin-top: 20px;
    padding: 22px;
    border-radius: 0;
    background: #f7f8fc;
    border: 1px solid #dfe3fb;
    text-align: left;
}

.create-index-form .full {
    width: 100%;
    padding: 12px;
}

.create-index-form input {
    width: 100%;
    padding: 13px;
    border-radius: 0;
    border: 1px solid #cdd4f8;
    margin-bottom: 15px;
    font-size: 15px;
}

.info-note {
    background: #cdefff;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 15px;
    color: #052373;
}
body.sidebar-collapsed .logo-text {
    display: none;
}

body.sidebar-collapsed .sidebar-title {
    display: block;
    opacity: 0;
    visibility: hidden;
    height: 24px;
    overflow: hidden;
}

body.sidebar-collapsed .sidebar-top-fixed {
    padding: 10px 10px 0;
}

body.sidebar-collapsed .sidebar-top-fixed .sidebar-item {
    display: flex;
    justify-content: center;
}

.dashboard-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f5f7ff 0%, #ffffff 60%);
    border: 1px solid #e5e9ff;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.dashboard-hero .eyebrow {
    font-size: 11px;
    letter-spacing: 0.18em;
    color: #6c7392;
    text-transform: uppercase;
}

.dashboard-hero h2 {
    margin: 4px 0;
    color: #111827;
}

.dashboard-hero .sub {
    color: #6b7280;
    font-size: 13px;
}

.hero-badges {
    display: flex;
    gap: 8px;
}

.badge-chip {
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid #dfe3f5;
    font-size: 12px;
    color: #1f2937;
    background: #fff;
}

.badge-chip.muted {
    background: #f8fafc;
    color: #6b7280;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.metric-card {
    background: #fff;
    border: 1px solid #e8ebf7;
    border-radius: 0;
    padding: 14px;
    /* box-shadow: 0 6px 20px rgba(17, 24, 39, 0.06); */
}

.metric-head {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4b5563;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.metric-head .meta {
    margin-left: auto;
    color: #9ca3af;
    font-size: 11px;
    letter-spacing: 0.04em;
}

.metric-sub {
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 8px;
}

.metric-card canvas {
    width: 100%;
    height: 70px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-flex;
}
.dot.blue { background: #2f49ff; }
.dot.pink { background: #f0467a; }
.dot.purple { background: #6b4bff; }

.facet-panel {
    background: #fff;
    border: 1px solid #e8ebf7;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 6px 20px rgba(17, 24, 39, 0.05);
}

.facet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.facet-search {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #d9def2;
    padding: 6px 10px;
    border-radius: 10px;
    background: #fafbff;
}

.facet-search input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 12px;
}

.facet-body {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
}

.ranking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.ranking-box {
    border: 1px solid #e5e7eb;
    background: #fcfdff;
    border-radius: 2px;
    padding: 14px;
    box-shadow: 0 4px 12px rgba(15,23,42,0.04);
}
.ranking-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    min-height: 70px;
}
.ranking-header>div{
    display: flex;
    flex-direction: column;
    font-size: 13px;
}
.ranking-list {
    border: 1px dashed #e5e7eb;
    border-radius: 10px;
    background: #fff;
    padding: 8px;
    min-height: 90px;
    margin-bottom: 12px;
}
.ranking-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 8px;
    background: #f8fafc;
}
.ranking-item .label {
    font-size: 13px;
    color: #0f172a;
}
.ranking-item .sub {
    font-size: 12px;
    color: #6b7280;
}
.btn-outline {
    border: 1px solid #dcdcdc;
    padding: 8px 10px;
    border-radius: 3px;
    font-size: 12px;
    color: #111827;
    background: #fff;
    width: 100%;
    text-align: center;
}
.btn-outline:hover { border-color: #c7ccd4; }
.alert.warning {
    border: 1px solid #fecdd3;
    background: #fff1f2;
    color: #b91c1c;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin: 12px 0px;
}
.alert.hidden { display: none; }
.muted {color: #6b7280;font-size: 12px;margin-top: 5px;}

.ranking-help {
    gap: 12px;
    display: flex;
    flex-direction: column;
}
.ranking-help .mb-4,.ranking-help .mt-4{padding: 16px;background: #fff9ec;border: 1px solid #ffe9c3;display: flex;flex-direction: column;gap: 13px;}
.ranking-help .grid{padding: 16px;background: #ffffff;border: 1px solid #e1e1e1;display: flex;flex-direction: column;gap: 13px;}

.ranking-help .mb-4>p{font-size: 13px;}
.ranking-help .text-lg,.ranking-help .text-xl {
    color: #0f172a;
    font-size: 14px;
    margin-bottom: 4px;
}
.ranking-help .rule-card {
    border: 1px solid #cccccc5e;
    background: #ffffffad;
    border-radius: 6px;
    padding: 12px;
}
.ranking-help .rule-card>div{
    border: 0;
    margin-bottom: 15px;
    font-size: 13px;
}
.ranking-help .text-sm{
    border: 0;
    margin-bottom: 15px;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ranking-help .rule-card h4 {
    font-size: 15px;
    color: #0f172a;
}
.ranking-help ul {
    list-style: disc;
    padding-left: 18px;
    margin: 10px 0px;
    font-size: 13px;
    line-height: 19px;
}
.ranking-help ul>li {
    list-style: none;
    padding-left: 12px;
}
.ranking-help .info-banner {
    border: 1px solid #ffe8cc;
    background: #fff8ed;
    color: #b45309;
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
    display: flex;
    gap: 8px;
    align-items: center;
}
.ranking-help .info-banner .icon {
    font-size: 16px;
}
.ranking-help .section-box {
    border: 1px dashed #d8def3;
    background: #f9fbff;
    padding: 12px;
    border-radius: 10px;
}
.ranking-help .tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #1d4ed8;
    font-size: 12px;
    border: 1px solid #e0e7ff;
}
.ranking-help pre {
    border: 1px solid #0f172a;
}

.blank-state {
    border: 1px dashed #d8def3;
    background: #f9fbff;
    color: #6b7280;
    padding: 14px;
    border-radius: 10px;
    text-align: center;
    font-size: 13px;
}
.link-reset {
    background: none;
    border: none;
    cursor: pointer;
}
.ranking-item.dragging {
    opacity: 0.9;
    transform: scale(1.01);
}
.placeholder-hint {
    border: 1px dashed #d8def3;
    background: #f9fbff;
    padding: 10px;
    border-radius: 10px;
}

.switch-sm {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}
.switch-sm input {
    opacity: 0;
    width: 0;
    height: 0;
}
.switch-sm .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: 0.2s;
    border-radius: 999px;
}
.switch-sm .slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.2s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch-sm input:checked + .slider {
    background-color: #2563eb;
}
.switch-sm input:checked + .slider:before {
    transform: translateX(16px);
}

/* Related Searches UI */
.related-wrapper {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    padding: 16px;
    box-shadow: 0 6px 18px rgba(15,23,42,0.05);
}
.related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}
.related-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}
.related-header p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #4b5563;
}
.related-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 1px solid #d8def3;
    border-radius: 999px;
    font-size: 12px;
    color: #6b7280;
    background: #f8fafc;
    cursor: help;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.related-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(15,23,42,0.04);
    font-size: 13px;
    color: #1f2937;
}
.related-card.light {
    background: #f9fbff;
}
.related-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.related-card h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}
.related-card p,
.related-card ul,
.related-card div {
    margin: 0;
}
.related-card ul {
    margin-top: 6px;
    margin-bottom: 6px;
    padding-left: 18px;
    color: #4b5563;
}
.related-subtitle {
    font-weight: 600;
    margin-top: 8px;
    color: #111827;
}
.related-text {
    color: #374151;
    font-size: 13px;
}
.related-toggle label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #111827;
    cursor: pointer;
}
.related-toggle input {
    display: none;
}
.related-toggle .switch {
    width: 40px;
    height: 20px;
    background: #e5e7eb;
    border-radius: 999px;
    position: relative;
    transition: background 0.2s ease;
}
.related-toggle .switch::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 999px;
    top: 2px;
    left: 2px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    transition: transform 0.2s ease;
}
.related-toggle input:checked + .switch {
    background: #2563eb;
}
.related-toggle input:checked + .switch::after {
    transform: translateX(20px);
}
.related-field label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #0f172a;
    margin-bottom: 4px;
}
.related-field textarea {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px;
    font-size: 13px;
    min-height: 80px;
    resize: vertical;
}
.related-note {
    font-size: 12px;
    color: #92400e;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    padding: 10px;
}
.related-samples {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(15,23,42,0.04);
}
.related-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}
.related-cards-grid .badge {
    margin-left: 4px;
}

.facet-item.active {
    background: #eef1ff;
    border-left-color: #2f49ff;
    color: #1f2a44;
    font-weight: 600;
}

.facet-content {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
    background: #fff;
}

.facet-placeholder-card {
    margin-top: 10px;
    border: 1px dashed #cdd4f0;
    border-radius: 8px;
    padding: 12px;
    color: #6b7280;
    background: #f9fbff;
}

.facet-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    font-size: 13px;
    color: #4b5563;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
    margin-bottom: 6px;
    cursor: pointer;
    border-left: 0;
}
.facet-item:hover {
    background: #f8fafc;
}
.facet-item .drag {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b4f82;
    cursor: move;
    padding: 0;
    border: none;
    background: transparent;
    transform: none;
}
.drag-icon {
    width: 20px;
    height: 20px;
}
#sort-dropdown {
    min-width: 180px;
    max-width: 240px;
    left: 0;
    right: auto;
    top: calc(100% + 6px);
}
.ranking-box .relative {
    position: relative;
}
.ranking-box .searchable-dropdown {
    min-width: 180px;
    max-width: 240px;
    left: 0;
    right: auto;
}
.facet-type-badge {
    font-size: 12px;
    text-transform: lowercase;
    color: var(--color-primary);
    background: rgba(59, 91, 255, 0.08);
    border-radius: 2px;
    padding: 4px 10px;
}
.facet-info-card h3 {
    margin: 0 0 4px;
    font-size: 14px;
    color: #111827;
    font-weight: 500;
}
.facet-info-card p {
    margin: 0;
    color: #475569;
    font-size: 12px;
}
.facet-info-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: #f8f9ff;
    border: 1px solid #e4e8fb;
    border-radius: 3px;
    padding: 18px 22px;
    margin-bottom: 16px;
    gap: 10px;
    flex-direction: column;
}
.facet-count {
    font-weight: 400;
    color: #2663eb;
    font-size: 12px;
    background: #e0e7ff;
    padding: 2px 8px;
    width: fit-content;
    border: 1px solid #e0e7ff;
    border-radius: 2px;
    text-transform: uppercase;
}

.facet-settings {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 16px;
    background: #fff;
    border: 1px solid #e6e9f5;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
}

.facet-settings__left {
    border-right: 1px solid #e5e7eb;
    padding-right: 12px;
}

.facet-settings__search {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #d9def2;
    border-radius: 10px;
    padding: 6px 10px;
    background: #fafbff;
    margin-bottom: 12px;
}

.facet-settings__search input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 12px;
}

.facet-settings__section {
    margin-bottom: 12px;
}

.facet-settings__section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #6b7280;
    text-transform: uppercase;
    margin: 6px 4px;
}

.facet-settings__item {
    padding: 10px 12px;
    border-radius: 8px;
    color: #4b5563;
    font-size: 13px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background 0.15s ease, border-left-color 0.15s ease;
    margin-bottom: 4px;
}

.facet-settings__item:hover {
    background: #f5f6ff;
}

.facet-settings__item.active {
    background: #eef1ff;
    border-left-color: #2f49ff;
    color: #1f2a44;
    font-weight: 600;
}

.facet-settings__right .eyebrow {
    font-size: 11px;
    letter-spacing: 0.18em;
    color: #6c7392;
    text-transform: uppercase;
}

.facet-settings__right h3 {
    margin: 4px 0;
    color: #111827;
}

.facet-settings__right .sub {
    color: #6b7280;
    font-size: 13px;
}

.facet-settings__content {
    margin-top: 12px;
    background: #f9fbff;
    border: 1px dashed #cdd4f0;
    border-radius: 10px;
    padding: 12px;
    color: #4b5563;
}

.facet-settings__placeholder {
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
}
.index-page.loading {
    visibility: hidden;
}

/* ========================================
   DESIGN SYSTEM - COMPREHENSIVE STYLING
   ======================================== */

/* COLOR VARIABLES */
:root {
    --color-primary: #3b82f6;
    --color-primary-dark: #1e40af;
    --color-secondary: #6b7280;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-danger-dark: #dc2626;
    --color-info: #0ea5e9;
    
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--color-gray-300);
    border-radius: 6px;
    background: white;
    color: var(--color-gray-700);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    text-decoration: none;
}

.btn:hover {
    border-color: var(--color-gray-400);
    background: var(--color-gray-50);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Button Variants */
.btn-primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

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

.btn-secondary {
    background: var(--color-gray-100);
    border-color: var(--color-gray-200);
    color: var(--color-gray-700);
}

.btn-secondary:hover {
    background: var(--color-gray-200);
}

.btn-danger {
    background: #fee2e2;
    border-color: #fecaca;
    color: var(--color-danger);
}

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

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--color-gray-600);
}

.btn-ghost:hover {
    background: var(--color-gray-100);
    border-color: var(--color-gray-200);
}

.btn-link {
    background: transparent;
    border: none;
    color: var(--color-primary);
    padding: 0;
    text-decoration: underline;
}

.btn-link:hover {
    background: transparent;
    opacity: 0.8;
}

/* Button Sizes */
.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 10px 20px;
    font-size: 15px;
}

/* Icon Button */

.btn-icon svg,

/* Disabled State */
.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Loading State */
.btn.is-loading {
    position: relative;
    color: transparent;
}

.btn.is-loading::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    opacity: 0.4;
    animation: spin 0.6s linear infinite;
}

@
}

/* ========================================
   FORM INPUTS & CONTROLS
   ======================================== */


.form-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--color-gray-900);
    display: block;
}

.form-input,
.form-control,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="tel"],
select{
    outline: none;
    /* box-shadow: inset 0 1px 4px #777aaf73; */
}

.form-input:focus,
.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    border: 1px solid #777aaf;
    box-shadow: inset 0 1px 4px #777aaf4d;
    transition: all .1s ease-in-out
}

.form-input::placeholder,
.form-control::placeholder,
input::placeholder {
    color: var(--color-gray-400);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Form Checkbox */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.form-check-label {
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-gray-900);
    margin: 0;
}

/* Form Radio */
.form-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.form-radio-input {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.form-radio-label {
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-gray-900);
    margin: 0;
}

/* Help Text */
.form-help,
.form-text {
    font-size: 12px;
    color: var(--color-gray-500);
    margin-top: 2px;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   PAGE LAYOUT
   ======================================== */

.page-hero {
    background: white;
    padding: 24px 20px;
    border-bottom: 1px solid var(--color-gray-200);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.page-hero-content {
    flex: 1;
}

.page-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-gray-500);
    margin-bottom: 8px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--color-gray-600);
    margin: 0;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-gray-500);
}

.meta-item strong {
    font-size: 24px;
    color: var(--color-gray-900);
}

/* Action Bar */
.action-bar {
    background: white;
    padding: 12px 20px;
    border-bottom: 1px solid var(--color-gray-200);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-box svg,

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    padding: 0;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    font-size: 13px;
    margin-bottom: 12px;
}

.breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--color-primary);
    text-decoration: none;
    transition: opacity 0.15s;
}

.breadcrumb-link:hover {
    opacity: 0.7;
}

.breadcrumb-link svg,
.breadcrumb-link i {
    width: 14px;
    height: 14px;
}

.breadcrumb-sep {
    color: var(--color-gray-400);
}

.breadcrumb-current {
    color: var(--color-gray-600);
    font-weight: 500;
}

/* ========================================
   TABS
   ======================================== */


.tab:hover {
    color: var(--color-gray-900);
    background: var(--color-gray-50);
}

.tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* ========================================
   CARDS
   ======================================== */

.card {
    background: white;
    border: 1px solid var(--color-gray-200);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2,
.card-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-gray-900);
}

.card-body {
    padding: 20px;
}

.card-body:empty {
    padding: 20px;
    text-align: center;
    color: var(--color-gray-500);
}

.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--color-gray-100);
    background: var(--color-gray-50);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.card-badge {
    display: inline-block;
    padding: 4px 8px;
    background: var(--color-info);
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.card-info {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.card-warning {
    background: #fffbeb;
    border-color: #fde68a;
}

.card-danger {
    background: #fef2f2;
    border-color: #fecaca;
}

.card-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

/* ========================================
   TABLES
   ======================================== */

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table thead {
    background: var(--color-gray-50);
}

.table thead th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--color-gray-700);
    border-bottom: 1px solid var(--color-gray-200);
}

.table tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--color-gray-100);
    color: var(--color-gray-900);
}

.table tbody tr:hover {
    background: var(--color-gray-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table-compact th,
.table-compact td {
    padding: 8px 12px;
    font-size: 12px;
}

.table-striped tbody tr:nth-child(odd) {
    background: var(--color-gray-50);
}

.table td.label {
    font-weight: 600;
    color: var(--color-gray-700);
    width: 160px;
}

/* ========================================
   BADGES & CHIPS
   ======================================== */


.badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #cffafe;
    color: #0c4a6e;
}

/* Status Dot */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-active {
    background: var(--color-success);
}

.status-inactive {
    background: var(--color-gray-400);
}

.status-pending {
    background: var(--color-warning);
}

.status-error {
    background: var(--color-danger);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted,
.text-gray-500 {
    color: var(--color-gray-500);
}

.text-gray-600 {
    color: var(--color-gray-600);
}

.text-gray-700 {
    color: var(--color-gray-700);
}

.text-primary {
    color: var(--color-primary);
}

.text-danger {
    color: var(--color-danger);
}

.text-success {
    color: var(--color-success);
}

.text-small {
    font-size: 12px;
}

.text-tiny {
    font-size: 11px;
}

/* Links */
.link {
    color: var(--color-primary);
    text-decoration: none;
    transition: opacity 0.15s;
}

.link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.link-primary {
    color: var(--color-primary);
}

.link-danger {
    color: var(--color-danger);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

.grid {
    display: grid;
}

.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.stack {
    display: flex;
    flex-direction: column;
}

.stack.gap-2 { gap: 8px; }
.stack.gap-3 { gap: 12px; }
.stack.gap-4 { gap: 16px; }

/* Spacing */
.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }

.m-0 { margin: 0; }
.m-1 { margin: 4px; }
.m-2 { margin: 8px; }
.m-3 { margin: 12px; }
.m-4 { margin: 16px; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

/* ========================================
   PAGE CONTENT
   ======================================== */

.page-content {
    padding: 0 20px 40px;
    max-width: 100%;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .page-hero {
        flex-direction: column;
        gap: 16px;
    }

    .page-hero-meta {
        width: 100%;
    }

    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .action-bar-left,
    .action-bar-right {
        width: 100%;
    }

    

    .tabs {
        padding: 0 12px;
        overflow-x: auto;
    }

    .tab {
        padding: 10px 12px;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .btn, .action-bar, .breadcrumb {
        display: none !important;
    }

    .card {
        break-inside: avoid;
    }
}
.modal-body { padding: 1.5rem; }
.sync-step h3 { margin-top: 0; margin-bottom: 0.5rem; font-size: 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============= ALGOLIA-STYLE PRODUCTS PAGE ============= */

/* TITLE */
.algolia-title {
    font-size: 24px;
    font-weight: 300;
    color: #000;
    margin: 0 0 14px 0;
    padding: 0;
    letter-spacing: 0.3px;
}

/* MODULE NAME */
.algolia-module-name {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9ca3af;
    margin: 0 0 6px 0;
}

/* STATS LINE */
.algolia-stats-line {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #666;
}

.algolia-stats-line span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-icon {
    width: 14px;
    height: 14px;
    color: #2563eb;
    flex-shrink: 0;
}

.stat-label {
    color: #666;
    font-weight: 500;
    font-size: 11px;
}

.algolia-stats-line strong {
    font-weight: 600;
    color: #111;
    min-width: 30px;
}

/* BANNER */
.algolia-banner {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 6px 10px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #1e40af;
    font-size: 12px;
    line-height: 1.3;
    position: relative;
}

.algolia-banner i:first-child {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    opacity: 0.8;
}

.algolia-banner span {
    flex: 1;
    color: #1e3a8a;
}

.banner-close {
    background: transparent;
    border: none;
    color: #3b82f6;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    border-radius: 4px;
}

.banner-close:hover {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.1);
}

.banner-close i {
    width: 14px;
    height: 14px;
}

/* BUTTON GROUP */
.algolia-button-group {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    align-items: center;
}

.btn-dropdown {
    position: relative;
}

.btn-algolia:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-algolia.icon-only {
    padding: 5px 6px;
    width: 28px;
    justify-content: center;
}

.btn-algolia i {
    width: 12px;
    height: 12px;
    stroke-width: 2.5;
}

/* DROPDOWN MENU */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    z-index: 100;
    margin-top: 4px;
}

.dropdown-menu.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.dropdown-item i,
.dropdown-item svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.dropdown-item.danger {
    color: #ef4444;
}

.dropdown-item.danger i,
.dropdown-item.danger svg {
    color: #ef4444;
}

.dropdown-item:first-child {
    border-radius: 4px 4px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 4px 4px;
}

.dropdown-item:hover {
    background: #f3f4f6;
    color: #2563eb;
}

/* TABS */
.algolia-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 14px;
    padding-bottom: 0;
}

.tab-item {
    padding: 8px 12px;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
    white-space: nowrap;
    font-weight: 500;
}

.tab-item:hover {
    color: #111;
}

.tab-item.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

/* TAB CONTENT */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.2s ease-in;
}

@
    
}

/* SEARCH WRAPPER */
.algolia-search-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    overflow: visible;
}

.search-toggle {
    padding: 8px 10px;
    border: none;
    background: transparent;
    color: #374151;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    position: relative;
    text-align: left;
}

.search-toggle:hover {
    background: rgba(0, 0, 0, 0.02);
}

.search-chevron {
    width: 10px;
    height: 10px;
    margin-left: 4px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.search-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 140px;
    z-index: 100;
    margin-top: 4px;
}

.search-dropdown-menu.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

.search-dropdown-item {
    display: block;
    padding: 8px 12px;
    color: #374151;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.2s;
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.search-dropdown-item:first-child {
    border-radius: 4px 4px 0 0;
}

.search-dropdown-item:last-child {
    border-radius: 0 0 4px 4px;
}

.search-dropdown-item:hover {
    background: #f3f4f6;
    color: #2563eb;
}

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box i {
    color: #9ca3af;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.search-input {
    border: none;
    outline: none;
    background: transparent;
    flex: 1;
    font-size: 13px;
    color: #111;
    padding: 8px 0;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-results-info span:first-child {
    font-weight: 500;
}

.search-results-info span:last-child {
    color: #999;
}

/* ANALYTICS BAR */
.algolia-analytics-bar {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.analytics-item i {
    color: #9ca3af;
    width: 14px;
    height: 14px;
}

.analytics-item strong {
    font-weight: 600;
    color: #111;
}

.link-configure {
    color: #2563eb;
    text-decoration: none;
    margin-left: 6px;
    font-size: 12px;
}

.link-configure:hover {
    text-decoration: underline;
}

.btn-icon {
    background: transparent;
    border: none;
    color: #2563eb;
    cursor: pointer;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
}

.btn-icon:hover {
    background: white;
    border-radius: 4px;
}

.btn-icon i {
    width: 16px;
    height: 16px;
}

.toggle-label {
    font-size: 13px;
    color: #666;
}

.toggle-switch {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    width: 36px;
    height: 20px;
    background: #d1d5db;
    border-radius: 10px;
    display: inline-block;
    position: relative;
    transition: background 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
    background: #2563eb;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: left 0.2s;
}

.toggle-switch input:checked + .toggle-slider::after {
    left: 18px;
}

/* FILTER BAR */
.algolia-filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding: 0;
    background: transparent;
    border: none;
    flex-wrap: wrap;
}

.filter-item label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

.filter-item select:hover {
    border-color: #9ca3af;
}

.filter-item select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* RESULT LIST */
.result-list {
    background: white;
    border-radius: 6px;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
}

.result-item:hover {
    background: #f9fafb;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.result-item-title {
    font-weight: 600;
    color: #111;
    font-size: 13px;
}

.result-item-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 11px;
    color: #666;
}

.result-item-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* STATS GRID */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: #bfdbfe;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.stat-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stat-card-header i {
    width: 20px;
    height: 20px;
    color: #2563eb;
}

.stat-card-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #111;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 6px;
    line-height: 1;
}

.stat-card-label {
    font-size: 12px;
    color: #666;
}

/* PAGINATION */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
}

.pagination button {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    min-width: 28px;
    height: 28px;
}

.pagination button:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #9ca3af;
}

.pagination button.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* BADGE STYLES */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-active {
    background: #d1fae5;
    color: #065f46;
}

.badge-inactive {
    background: #fee2e2;
    color: #7f1d1d;
}

.badge-trendyol {
    background: #fef3c7;
    color: #92400e;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .algolia-stats-line {
        flex-direction: column;
        gap: 8px;
    }

    .algolia-button-group {
        flex-wrap: wrap;
    }

    .btn-algolia {
        flex: 1;
        min-width: 100px;
    }

    .algolia-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .algolia-search-wrapper {
        flex-direction: column;
    }

    .search-sidebar {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .search-main {
        flex-direction: column;
        padding: 12px 16px;
    }

    .search-results-info {
        width: 100%;
        justify-content: space-between;
    }

    .algolia-analytics-bar {
        flex-direction: column;
        gap: 12px;
    }

    .analytics-item {
        width: 100%;
    }

    .analytics-actions {
        width: 100%;
        justify-content: space-between;
    }

    .algolia-filter-bar {
        flex-direction: column;
    }

    .filter-item {
        width: 100%;
    }

    .filter-item select {
        width: 100%;
    }

    .result-item {
        grid-template-columns: 1fr;
    }

    .result-item-actions {
        flex-direction: row;
    }

    .result-item-btn {
        flex: 1;
    }
}
/* ========================================
   MOD_7 ANALYTICS STYLES
   ======================================== */

.mod7-analytics-container {
}

.stats-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 30px; 
    flex-wrap: wrap; 
    gap: 20px; 
}

.stats-header h2 { 
    font-size: 24px; 
    margin: 0; 
    color: #1f2937;
}

.analytics-controls { 
    display: flex; 
    gap: 15px; 
    align-items: flex-end; 
}

.form-group { 
    display: flex; 
    flex-direction: column; 
    gap: 5px; 
}

.form-group label { 
    font-size: 12px; 
    color: #666; 
    font-weight: 600; 
    text-transform: uppercase; 
}

select, input { 
    padding: 8px 12px; 
    border: 1px solid #ddd; 
    border-radius: 6px; 
    font-size: 14px; 
}

.btn-refresh { 
    padding: 8px 16px; 
    background: #667eea; 
    color: white; 
    border: none; 
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: 600; 
}

.btn-refresh:hover { 
    background: #764ba2; 
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.metric-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    border-color: #e0e0e0;
}

.metric-card-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
}

.metric-card-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
}

.metric-card-chart {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
}

.metric-mini-chart {
    width: 100% !important;
    height: 60px !important;
}

.metric-label {
    font-size: 11px;
    color: #888;
    font-family: monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.metric-label > .metric-dot{display: block;width:8px;height:8px}

.metric-value {
    font-size: 21px;
    font-weight: 700;
    color: #000;
    line-height: 1;
}

.analytics-charts { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); 
    gap: 20px; 
    margin-bottom: 30px; 
}

.chart-box { 
    background: white; 
    padding: 20px; 
    border-radius: 8px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); 
}

.chart-box h3 { 
    margin-top: 0; 
    font-size: 16px; 
    color: #333; 
}

.chart-box canvas { 
    max-height: 300px; 
}

.table-section { 
    background: white; 
    border-radius: 8px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); 
    padding: 20px; 
}

.analytics-table { 
    width: 100%; 
    border-collapse: collapse; 
}

.analytics-table th { 
    background: #f5f5f5; 
    padding: 12px; 
    text-align: left; 
    font-weight: 600; 
    font-size: 12px; 
    border-bottom: 2px solid #ddd; 
}

.analytics-table td { 
    padding: 12px; 
    border-bottom: 1px solid #eee; 
}

.analytics-table tr:hover { 
    background: #f9f9f9; 
}
/* ========================================
   REPORTING TAB STYLES
   ======================================== */

.reporting-container {
    padding: 20px;
    background: #fff;
}

.reporting-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

.reporting-header h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 5px;
}

.reporting-header .subtitle {
    font-size: 14px;
    color: #666;
}

/* Reporting Sub-tabs */
.reporting-subtabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #eee;
    overflow-x: auto;
    padding-bottom: 10px;
}

.reporting-subtab {
    padding: 10px 20px;
    background: #f5f5f5;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.reporting-subtab:hover {
    background: #e8e8e8;
}

.reporting-subtab.active {
    background: #2563eb;
    color: white;
    border-bottom: 3px solid #1d4ed8;
}

/* Reporting Panel Styles (using config-right classes) */
.config-panel {
    /* Don't hide by default - let initial style.display="block" and JavaScript control it */
}

.config-panel[style*="display:none"] {
    display: none !important;
}

.config-panel[style*="display:block"] {
    display: block !important;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.config-panel h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Reporting tab: show active panel */
#tab-reporting .config-panel.active {
    display: block !important;
}

#tab-reporting .config-panel:not(.active) {
    display: none !important;
}

/* Reporting Controls */
.reporting-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.reporting-controls select,
.reporting-controls input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Reporting Grid */
.reporting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.reporting-card {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.reporting-card:hover {
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.reporting-card .card-header {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.reporting-card .card-value {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.reporting-card .card-change {
    font-size: 13px;
    color: #4caf50;
}

.reporting-card .card-change.negative {
    color: #f44336;
}

/* Reporting Table */
.reporting-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.reporting-table thead {
    background: #f5f5f5;
    border-bottom: 2px solid #ddd;
}

.reporting-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.reporting-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    color: #666;
    font-size: 13px;
}

.reporting-table tbody tr:hover {
    background: #f9f9f9;
}

.reporting-table tbody tr:nth-child(even) {
    background: #fafafa;
}

/* Custom Reports Container */
.custom-reports-container {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-reports {
    text-align: center;
    color: #999;
}

.no-reports p {
    font-size: 16px;
    margin-bottom: 20px;
}

.no-reports button {
    padding: 10px 20px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.no-reports button:hover {
    background: #1d4ed8;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .reporting-subtabs {
        flex-direction: column;
    }
    
    .reporting-grid {
        grid-template-columns: 1fr;
    }
    
    .reporting-controls {
        flex-direction: column;
    }
    
    .reporting-controls input {
        max-width: 100%;
    }
}
