/* ═══════════════════════════════════════════════════════════════════════════
   SHOWROOM PREMIUM — Design system compartilhado (V152)
   Aplica visual consistente nas 7 telas do módulo.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --sh-primary: #9333ea;
    --sh-primary-dark: #6d28d9;
    --sh-primary-light: #c026d3;
    --sh-grad: linear-gradient(135deg, #6d28d9 0%, #9333ea 50%, #c026d3 100%);
    --sh-grad-soft: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
}

/* ─── Container ─── */
.sh-page {
    padding: 18px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ─── HERO ─── */
.sh-hero {
    background: var(--sh-grad);
    color: #fff;
    border-radius: 16px;
    padding: 22px 28px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(147,51,234,.25);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.sh-hero::before {
    content:""; position:absolute; top:-100px; right:-80px;
    width:320px; height:320px;
    background: radial-gradient(circle, rgba(255,255,255,.18) 0%, transparent 70%);
    pointer-events:none;
}
.sh-hero::after {
    content:""; position:absolute; bottom:-60px; left:-40px;
    width:200px; height:200px;
    background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%);
    pointer-events:none;
}
.sh-hero-content { position: relative; z-index: 1; flex: 1; }
.sh-hero h1 {
    font-size: 1.45rem; font-weight: 900; margin: 0;
    display: flex; align-items: center; gap: 12px;
    letter-spacing: -.3px;
}
.sh-hero p {
    margin: 5px 0 0; opacity: .88; font-size: .87rem; font-weight: 500;
}
.sh-hero-actions { position: relative; z-index: 1; display: flex; gap: 10px; }
.sh-hero-btn {
    background: rgba(255,255,255,.95) !important;
    color: var(--sh-primary-dark) !important;
    font-weight: 800 !important;
    border-radius: 10px !important;
    padding: 8px 18px !important;
    text-transform: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,.15) !important;
}
.sh-hero-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,0,0,.2) !important;
}

/* ─── KPI cards ─── */
.sh-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.sh-kpi {
    background: #fff;
    border-radius: 14px;
    padding: 16px 20px;
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
    transition: all .15s;
}
.sh-kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.06); }
.sh-kpi::before {
    content:""; position:absolute; left:0; top:0; bottom:0; width:4px;
    background: var(--sh-color, var(--sh-primary));
}
.sh-kpi .lbl {
    font-size: .7rem; color: #64748b;
    text-transform: uppercase; letter-spacing: .6px; font-weight: 700;
}
.sh-kpi .val {
    font-size: 1.9rem; font-weight: 900; color: #0f172a; line-height: 1.1;
    margin-top: 4px;
}
.sh-kpi .sub { font-size: .75rem; color: #94a3b8; margin-top: 3px; }
.sh-kpi.purple { --sh-color: #9333ea; }
.sh-kpi.green  { --sh-color: #16a34a; }
.sh-kpi.amber  { --sh-color: #f59e0b; }
.sh-kpi.cyan   { --sh-color: #0891b2; }
.sh-kpi.red    { --sh-color: #dc2626; }

/* ─── Card padrão ─── */
.sh-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px 22px;
    border: 1px solid #e5e7eb;
    margin-bottom: 18px;
    transition: box-shadow .15s;
}
.sh-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.04); }

.sh-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}
.sh-card-title {
    font-size: .98rem; font-weight: 800; color: #0f172a;
    display: flex; align-items: center; gap: 9px;
    margin: 0;
}
.sh-card-icon {
    width: 32px; height: 32px; border-radius: 9px;
    background: var(--sh-grad-soft);
    color: var(--sh-primary-dark);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

/* ─── Toolbar (filtros) ─── */
.sh-toolbar {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 16px; flex-wrap: wrap;
}

/* ─── Tabela simples ─── */
.sh-table { width: 100%; border-collapse: collapse; }
.sh-table th, .sh-table td {
    padding: 10px 8px; border-bottom: 1px solid #f1f5f9;
    font-size: .85rem; text-align: left;
}
.sh-table th {
    font-weight: 800; color: #64748b;
    text-transform: uppercase; letter-spacing: .4px; font-size: .7rem;
    background: #fafafa;
}
.sh-table tr.sh-row-link { cursor: pointer; transition: background .12s; }
.sh-table tr.sh-row-link:hover { background: #faf5ff; }

/* ─── Badges ─── */
.sh-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .3px;
    text-transform: uppercase;
}
.sh-badge.success { background: #dcfce7; color: #166534; }
.sh-badge.info    { background: #dbeafe; color: #1e40af; }
.sh-badge.warn    { background: #fef3c7; color: #92400e; }
.sh-badge.danger  { background: #fee2e2; color: #991b1b; }
.sh-badge.purple  { background: #ede9fe; color: #5b21b6; }
.sh-badge.gray    { background: #f1f5f9; color: #475569; }

/* ─── Pills/chips de filtro ─── */
.sh-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    font-size: .78rem; font-weight: 700; color: #475569;
    cursor: pointer; transition: all .12s;
}
.sh-chip:hover {
    border-color: var(--sh-primary);
    color: var(--sh-primary-dark);
}
.sh-chip.active {
    background: var(--sh-grad);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(147,51,234,.3);
}

/* ─── Empty state com personalidade ─── */
.sh-empty {
    text-align: center;
    padding: 50px 20px;
    color: #94a3b8;
}
.sh-empty-emoji {
    font-size: 4rem; margin-bottom: 14px;
    opacity: .7;
    animation: shFloat 3s ease-in-out infinite;
}
@keyframes shFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
.sh-empty-titulo {
    font-size: 1.1rem; font-weight: 800; color: #475569; margin-bottom: 6px;
}
.sh-empty-sub {
    font-size: .88rem; color: #94a3b8; margin-bottom: 20px;
    max-width: 380px; margin-left: auto; margin-right: auto;
}

/* ─── Botão CTA principal ─── */
.sh-btn-primary {
    background: var(--sh-grad) !important;
    color: #fff !important;
    font-weight: 800 !important;
    border-radius: 10px !important;
    padding: 10px 22px !important;
    box-shadow: 0 4px 14px rgba(147,51,234,.3) !important;
    text-transform: none !important;
}
.sh-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(147,51,234,.4) !important;
}

/* ─── Grid de cards genérico ─── */
.sh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

/* ─── Card item (Templates / Campanhas) ─── */
.sh-item-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px 20px;
    border: 1.5px solid #e5e7eb;
    transition: all .18s;
    position: relative;
    overflow: hidden;
}
.sh-item-card:hover {
    transform: translateY(-3px);
    border-color: var(--sh-primary);
    box-shadow: 0 12px 28px rgba(147,51,234,.12);
}
.sh-item-card::before {
    content:""; position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: var(--sh-grad);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s;
}
.sh-item-card:hover::before { transform: scaleX(1); }

.sh-item-title {
    font-size: 1.02rem; font-weight: 800; color: #0f172a;
    margin: 0 0 6px;
}
.sh-item-desc {
    font-size: .82rem; color: #64748b; line-height: 1.5;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sh-item-meta {
    display: flex; align-items: center; justify-content: space-between;
    font-size: .73rem; color: #94a3b8;
    margin-top: 10px;
    border-top: 1px solid #f1f5f9; padding-top: 10px;
}
.sh-item-actions {
    display: flex; gap: 8px; margin-top: 12px;
}

/* ─── Timeline (comentários, eventos) ─── */
.sh-timeline { position: relative; padding-left: 24px; }
.sh-timeline::before {
    content:""; position: absolute;
    left: 8px; top: 0; bottom: 0; width: 2px;
    background: linear-gradient(180deg, var(--sh-primary), transparent);
}
.sh-timeline-item {
    position: relative;
    padding: 12px 16px;
    margin-bottom: 10px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    transition: all .12s;
}
.sh-timeline-item::before {
    content:""; position: absolute;
    left: -20px; top: 18px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--sh-primary);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--sh-primary);
}
.sh-timeline-item.unread { background: #fffbeb; border-color: #fde68a; }
.sh-timeline-item.unread::before { background: #f59e0b; box-shadow: 0 0 0 2px #f59e0b; }

/* ═══════════════════════════════════════════════════════════════════════════
   POPUPS DO SHOWROOM
   ═══════════════════════════════════════════════════════════════════════════ */

/* Container do dialog — remove padding default do MudDialog */
.sh-dialog .mud-dialog-content { padding: 0 !important; }
.sh-dialog .mud-dialog-title { padding: 0 !important; }

.sh-dialog-header {
    background: var(--sh-grad);
    color: #fff;
    padding: 22px 28px;
    position: relative;
    overflow: hidden;
    border-radius: 4px 4px 0 0;
}
.sh-dialog-header::before {
    content:""; position:absolute; top:-80px; right:-60px;
    width:240px; height:240px;
    background: radial-gradient(circle, rgba(255,255,255,.18) 0%, transparent 70%);
    pointer-events: none;
}
.sh-dialog-header-content {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 14px;
}
.sh-dialog-header-icon {
    width: 48px; height: 48px;
    background: rgba(255,255,255,.2);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.3);
}
.sh-dialog-header h2 {
    font-size: 1.25rem; font-weight: 900; margin: 0;
    letter-spacing: -.3px;
}
.sh-dialog-header p {
    font-size: .85rem; opacity: .9; margin: 2px 0 0;
}
.sh-dialog-close {
    position: absolute; top: 16px; right: 16px;
    z-index: 2;
    width: 32px; height: 32px;
    background: rgba(255,255,255,.2);
    color: #fff;
    border: none; border-radius: 8px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .12s;
}
.sh-dialog-close:hover { background: rgba(255,255,255,.35); transform: scale(1.05); }

.sh-dialog-body {
    padding: 24px 28px;
    background: #fafafa;
    max-height: calc(90vh - 200px);   /* header (~80px) + footer (~70px) + folga */
    overflow-y: auto;
    overflow-x: hidden;
}
/* Scrollbar customizada no body do popup */
.sh-dialog-body::-webkit-scrollbar { width: 8px; }
.sh-dialog-body::-webkit-scrollbar-track { background: transparent; }
.sh-dialog-body::-webkit-scrollbar-thumb {
    background: #c4b5fd; border-radius: 4px;
}
.sh-dialog-body::-webkit-scrollbar-thumb:hover { background: var(--sh-primary); }

.sh-dialog-section {
    margin-bottom: 20px;
}
.sh-dialog-section:last-child { margin-bottom: 0; }
.sh-dialog-section-title {
    font-size: .75rem;
    font-weight: 800;
    color: #6b21a8;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 10px;
    display: flex; align-items: center; gap: 8px;
}
.sh-dialog-section-title::before {
    content:"";
    width: 4px; height: 14px;
    background: var(--sh-grad);
    border-radius: 2px;
}

.sh-dialog-footer {
    padding: 16px 24px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    display: flex; align-items: center; justify-content: flex-end;
    gap: 10px;
    border-radius: 0 0 4px 4px;
}

.sh-dialog-row {
    display: grid; gap: 12px;
}
.sh-dialog-row.cols-2 { grid-template-columns: 1fr 1fr; }
.sh-dialog-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 600px) {
    .sh-dialog-row.cols-2, .sh-dialog-row.cols-3 { grid-template-columns: 1fr; }
}

/* ─── Responsivo ─── */
@media (max-width: 768px) {
    .sh-page { padding: 12px 14px; }
    .sh-hero { flex-direction: column; align-items: flex-start; }
    .sh-hero-actions { width: 100%; }
    .sh-hero h1 { font-size: 1.2rem; }
}
