/* =========================================================
   SETTINGS PANEL — Scoped CSS
   Namespace: .uicfg-*  — No conflicts with main.css or Tailwind
   ========================================================= */

.uicfg-wrap {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #a1a1aa;
    background: transparent;
    min-height: 100%;
    padding-bottom: 120px;
}

/* ---- HEADER ---- */
.uicfg-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 32px 36px 24px;
}

.uicfg-header-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.uicfg-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--color-emphasis, #E85102);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.uicfg-icon svg {
    width: 28px;
    height: 28px;
    color: #111113;
}

.uicfg-header-eyebrow {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--color-emphasis);
    margin-bottom: 4px;
}

.uicfg-header-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin: 0 0 6px;
}

.uicfg-header-sub {
    font-size: 13px;
    color: #71717a;
    line-height: 1.5;
    margin: 0;
}

.uicfg-header-badge {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 260px;
    background: linear-gradient(130deg, #1a0800 0%, #2d1000 50%, var(--color-emphasis) 140%);
    flex-shrink: 0;
}

.uicfg-header-badge::before {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 180px; height: 90px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 90'%3E%3Cpath d='M0,60 Q45,10 90,45 T180,30 L180,90 L0,90Z' fill='%23ff8a00' opacity='.15'/%3E%3C/svg%3E") no-repeat center/cover;
}

.uicfg-header-badge-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(232,81,2,.2);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    position: relative; z-index: 1;
}

.uicfg-header-badge-icon svg { width: 18px; height: 18px; color: var(--color-emphasis); }

.uicfg-header-badge-text { position: relative; z-index: 1; }
.uicfg-header-badge-text strong { display: block; font-size: 13px; font-weight: 600; color: #fff; margin-bottom: 2px; }
.uicfg-header-badge-text span { font-size: 11px; color: #fba97a; }

/* ---- TABS ---- */
.uicfg-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #1f1f23;
    padding: 0 36px;
    overflow-x: auto;
    scrollbar-width: none;
}

.uicfg-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 500;
    color: #52525b;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color .2s, border-color .2s;
    text-decoration: none;
    margin-bottom: -1px;
}

.uicfg-tab:hover { color: #d4d4d8; }

.uicfg-tab.active {
    color: #fff;
    border-bottom-color: var(--color-emphasis);
}

.uicfg-tab svg { width: 15px; height: 15px; }

/* ---- CONTENT ---- */
.uicfg-content {
    padding: 32px 36px;
}

/* ---- SECTIONS ---- */
.uicfg-section { margin-bottom: 40px; }

.uicfg-section-head { margin-bottom: 20px; }

.uicfg-section-head h2 {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.uicfg-section-head h2 svg { width: 16px; height: 16px; color: #52525b; }

.uicfg-section-head p {
    font-size: 12px;
    color: #52525b;
    margin: 0 0 0 24px;
}

/* ---- THEME CARDS ---- */
.uicfg-theme-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.uicfg-theme-card {
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    outline: 1.5px solid #27272a;
    transition: outline-color .2s, box-shadow .2s;
}

.uicfg-theme-card:hover { outline-color: #3f3f46; }

.uicfg-theme-card.selected {
    outline: 2px solid var(--color-emphasis);
    box-shadow: 0 0 0 4px rgba(232,81,2,.12);
}

.uicfg-theme-card-preview {
    height: 110px;
    position: relative;
    overflow: hidden;
    display: flex;
    gap: 6px;
    padding: 10px;
}

.uicfg-theme-card-info {
    background: #111113;
    padding: 10px 12px 12px;
}

.uicfg-theme-card-info strong {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 3px;
}

.uicfg-theme-card-info p {
    font-size: 10px;
    color: #52525b;
    margin: 0;
    line-height: 1.4;
}

.uicfg-check {
    position: absolute;
    top: 8px; right: 8px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--color-emphasis);
    display: flex; align-items: center; justify-content: center;
    z-index: 10;
}

.uicfg-check svg { width: 10px; height: 10px; color: #fff; }

/* mini UI inside theme card */
.uicfg-mini-ui {
    display: flex;
    gap: 5px;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

.uicfg-mini-sidebar {
    width: 28%;
    border-radius: 8px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.uicfg-mini-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.uicfg-mini-bar {
    height: 10px;
    border-radius: 6px;
}

.uicfg-mini-card {
    flex: 1;
    border-radius: 8px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.uicfg-mini-line { height: 3px; border-radius: 2px; }
.uicfg-mini-num  { font-size: 11px; font-weight: 700; margin: 2px 0; }

/* ---- LOGO SECTION ---- */
.uicfg-logo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.uicfg-logo-label {
    font-size: 11px;
    font-weight: 500;
    color: #71717a;
    margin-bottom: 10px;
}

.uicfg-logo-row {
    display: flex;
    align-items: center;
    gap: 14px;
}
.uicfg-input {
    width: 100%;
    background: #111113;
    border: 1px solid #27272a;
    border-radius: 9px;
    padding: 10px 14px;
    font-size: 13px;
    color: #e4e4e7;
    outline: none;
    transition: border-color .18s, box-shadow .18s;
    font-family: inherit;
    appearance: none;
}

select.uicfg-input {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' fill='none' viewBox='0 0 24 24' stroke='%2371717a'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.uicfg-input:focus {
    border-color: #3f3f46;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.05);
}

.uicfg-logo-preview {
    background: #111113;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.uicfg-logo-preview.wide { width: 140px; height: 52px; }
.uicfg-logo-preview.square { width: 52px; height: 52px; }

.uicfg-logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }

.uicfg-logo-actions { display: flex; flex-direction: column; gap: 6px; }

.uicfg-btn-sm {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #1c1c1f;
    color: #d4d4d8;
    border: none;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background .18s;
    white-space: nowrap;
}

.uicfg-btn-sm:hover { background: #27272a; }

.uicfg-btn-sm input[type=file] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.uicfg-hint { font-size: 10px; color: #3f3f46; }

/* ---- COLOR PRINCIPAL ---- */
.uicfg-color-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.uicfg-color-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #111113;
    border-radius: 12px;
    padding: 6px 14px 6px 6px;
}

.uicfg-color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.uicfg-color-swatch input[type=color] {
    position: absolute;
    top: -6px; left: -6px;
    width: calc(100% + 12px);
    height: calc(100% + 12px);
    cursor: pointer;
    border: none;
    padding: 0;
    background: none;
}

.uicfg-color-hex {
    font-size: 13px;
    font-weight: 600;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: #d4d4d8;
    text-transform: uppercase;
    background: none;
    border: none;
    outline: none;
    width: 80px;
}

.uicfg-swatches {
    display: flex;
    align-items: center;
    gap: 10px;
}

.uicfg-swatch-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    flex-shrink: 0;
    border: none;
    padding: 0;
}

.uicfg-swatch-dot:hover { transform: scale(1.15); }
.uicfg-swatch-dot.active { box-shadow: 0 0 0 2px #09090b, 0 0 0 4px #fff; }

/* ---- TOGGLES ---- */
.uicfg-toggle-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.uicfg-toggle-card {
    background: #111113;
    border-radius: 14px;
    padding: 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.uicfg-toggle-card strong {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #e4e4e7;
    margin-bottom: 4px;
}

.uicfg-toggle-card p {
    font-size: 11px;
    color: #52525b;
    margin: 0;
    line-height: 1.45;
}

.uicfg-toggle {
    position: relative;
    width: 38px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 2px;
}

.uicfg-toggle input { display: none; }

.uicfg-toggle-track {
    position: absolute;
    inset: 0;
    border-radius: 99px;
    background: #27272a;
    cursor: pointer;
    transition: background .2s;
}

.uicfg-toggle-thumb {
    position: absolute;
    top: 3px; left: 3px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #71717a;
    transition: transform .2s, background .2s;
}

.uicfg-toggle.on .uicfg-toggle-track { background: var(--color-emphasis); }
.uicfg-toggle.on .uicfg-toggle-thumb { transform: translateX(16px); background: #fff; }

/* ---- SAVE BAR ---- */
.uicfg-save-bar {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 220px; /* sidebar width */
    background: rgba(9,9,11,.92);
    backdrop-filter: blur(16px);
    border-top: 1px solid #1f1f23;
    padding: 16px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 100;
}

.uicfg-btn-reset {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: #52525b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 10px;
    transition: color .18s, background .18s;
    font-family: inherit;
}

.uicfg-btn-reset:hover { color: #a1a1aa; background: #18181b; }
.uicfg-btn-reset svg { width: 15px; height: 15px; }

.uicfg-btn-save {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 28px;
    border-radius: 12px;
    border: none;
    color: #111113;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background-color: var(--color-emphasis, #e85102);
    box-shadow: 0 4px 20px -4px var(--color-emphasis, #e85102);
    transition: opacity .18s, transform .12s;
}

.uicfg-btn-save:hover { opacity: .9; }
.uicfg-btn-save:active { transform: scale(.97); }
.uicfg-btn-save svg { width: 16px; height: 16px; }

/* ---- SPIN ---- */
@keyframes uicfg-spin {
    to { transform: rotate(360deg); }
}
.uicfg-spin { animation: uicfg-spin 1s linear infinite; }

/* ---- DIVIDER ---- */
.uicfg-divider {
    height: 1px;
    background: #1f1f23;
    margin: 0 0 36px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
    .uicfg-header { flex-direction: column; padding: 24px 20px; gap: 20px; }
    .uicfg-header-left { flex-direction: row; align-items: flex-start; }
    .uicfg-btn-save {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 28px;
    border-radius: 12px;
    border: none;
    color: #111113;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background-color: var(--color-emphasis, #e85102);
    box-shadow: 0 4px 20px -4px var(--color-emphasis, #e85102);
    transition: opacity .18s, transform .12s;
}
    .uicfg-btn-reset { width: 100%; justify-content: center; }
    .uicfg-theme-grid,
    .uicfg-logo-grid,
    .uicfg-toggle-grid { grid-template-columns: 1fr; }
    .uicfg-save-bar { left: 0; padding: 12px 16px; flex-direction: column; gap: 12px; }
}

.uicfg-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.uicfg-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #e4e4e7;
}

/* Responsive Grids */
.uicfg-grid-3 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 1024px) { .uicfg-grid-3 { grid-template-columns: repeat(3, 1fr); } }

.uicfg-grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 1024px) { .uicfg-grid-2 { grid-template-columns: repeat(2, 1fr); } }

.uicfg-grid-preview { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 1024px) { .uicfg-grid-preview { grid-template-columns: repeat(3, 1fr); } }


.uicfg-tabs {
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none; /* Firefox */
}
.uicfg-tabs::-webkit-scrollbar { 
    display: none; /* Safari and Chrome */
}





/* Custom responsive utility classes because Tailwind might not have them compiled */
.uicfg-desktop-only { display: none !important; }
.uicfg-mobile-only { display: flex !important; }
@media (min-width: 768px) {
    .uicfg-desktop-only { display: block !important; }
    .uicfg-mobile-only { display: none !important; }
}


.uicfg-services-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.uicfg-services-search-wrap { display: flex; flex-direction: column; gap: 12px; width: 100%; }
@media (min-width: 768px) {
    .uicfg-services-head { flex-direction: row; align-items: center; justify-content: space-between; }
    .uicfg-services-search-wrap { flex-direction: row; align-items: center; width: auto; }
}


.uicfg-search-input-wrap { width: 100%; position: relative; }
@media (min-width: 768px) { .uicfg-search-input-wrap { width: 260px; } }


.uicfg-btn-save-wrap { width: 100%; }
@media (min-width: 1024px) { .uicfg-btn-save-wrap { width: auto; } }

