/*
 * So Audiovisual - visual identity layer
 */

:root {
    --sa-orange: #ff6b35;
    --sa-red: #e8384f;
    --sa-purple: #8c4ce8;
    --sa-blue: #2e8fff;
    --sa-grad: linear-gradient(100deg, var(--sa-orange) 0%, var(--sa-red) 35%, var(--sa-purple) 68%, var(--sa-blue) 100%);
    --font-heading: 'Space Grotesk', 'Inter', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --radius: 8px;
    --radius-md: 8px;
    --radius-lg: 8px;
    --radius-xl: 8px;
    --primary: #e8384f;
    --primary-light: #ff6b35;
    --primary-dark: #bf263c;
    --secondary: #2e8fff;
    --accent-purple: #8c4ce8;
    --accent-blue: #2e8fff;
    --gradient-primary: var(--sa-grad);
    --gradient-secondary: linear-gradient(120deg, #2e8fff, #8c4ce8);
    --header-height: 78px;
}

html[data-theme="branco"] {
    --sa-bg: #f3f4f8;
    --sa-elev: #ffffff;
    --sa-elev-2: #fafbfd;
    --sa-text: #14161c;
    --sa-muted: #5c6270;
    --sa-border: rgba(20, 22, 28, 0.1);
    --sa-border-strong: rgba(20, 22, 28, 0.18);
    --sa-chip: rgba(20, 22, 28, 0.04);
    --sa-shadow: 0 20px 50px -24px rgba(30, 30, 60, 0.24);
}

html[data-theme="grafite"] {
    --sa-bg: #111318;
    --sa-elev: #1a1d24;
    --sa-elev-2: #20232b;
    --sa-text: #f2f3f6;
    --sa-muted: #a2a8b5;
    --sa-border: rgba(255, 255, 255, 0.1);
    --sa-border-strong: rgba(255, 255, 255, 0.18);
    --sa-chip: rgba(255, 255, 255, 0.06);
    --sa-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.75);
}

html[data-theme="azul"] {
    --sa-bg: #0b1220;
    --sa-elev: #111a2c;
    --sa-elev-2: #152037;
    --sa-text: #eaf0ff;
    --sa-muted: #96a6ca;
    --sa-border: rgba(140, 170, 255, 0.16);
    --sa-border-strong: rgba(140, 170, 255, 0.26);
    --sa-chip: rgba(120, 160, 255, 0.08);
    --sa-shadow: 0 20px 50px -24px rgba(0, 10, 40, 0.78);
}

html[data-theme="rosa"] {
    --sa-bg: #fff4f8;
    --sa-elev: #ffffff;
    --sa-elev-2: #fff9fb;
    --sa-text: #3a1626;
    --sa-muted: #93607a;
    --sa-border: rgba(214, 51, 108, 0.14);
    --sa-border-strong: rgba(214, 51, 108, 0.26);
    --sa-chip: rgba(214, 51, 108, 0.06);
    --sa-shadow: 0 20px 50px -24px rgba(214, 51, 108, 0.2);
}

html[data-theme="pride"] {
    --sa-bg: #151220;
    --sa-elev: #1d1929;
    --sa-elev-2: #251f33;
    --sa-text: #f6f2fb;
    --sa-muted: #a79fc0;
    --sa-border: rgba(255, 255, 255, 0.1);
    --sa-border-strong: rgba(255, 255, 255, 0.2);
    --sa-chip: rgba(255, 255, 255, 0.06);
    --sa-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.72);
    --sa-grad: linear-gradient(100deg, #e4405f 0%, #ff8a00 22%, #ffd400 42%, #2ecc71 62%, #2e8fff 82%, #8c4ce8 100%);
}

html,
body {
    font-family: var(--font-body);
    background: var(--sa-bg);
    color: var(--sa-text);
    letter-spacing: 0;
}

body {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 420px);
}

h1,
h2,
h3,
h4,
.hero-title,
.section-title h2,
.admin-header h1 {
    font-family: var(--font-heading);
    letter-spacing: 0;
}

a {
    color: inherit;
}

.container {
    max-width: 1180px;
}

.main-content {
    background: transparent;
    padding-top: 0;
}

/* Header */
.sa-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky, 1000);
    background: color-mix(in srgb, var(--sa-bg) 88%, transparent);
    border-bottom: 1px solid var(--sa-border);
    box-shadow: none;
    backdrop-filter: blur(16px);
}

.sa-header.scrolled {
    box-shadow: var(--sa-shadow);
}

.sa-header > .container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.sa-header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.sa-logo {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    flex: 0 0 auto;
    padding: 0;
    background: transparent;
}

.sa-logo img {
    width: auto;
    max-width: 42vw;
    height: 37px;
    display: block;
}

.sa-main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.sa-main-nav a {
    padding: 9px 15px;
    border-radius: 999px;
    color: var(--sa-muted);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background 180ms ease, color 180ms ease;
}

.sa-main-nav a:hover,
.sa-main-nav a.active {
    background: var(--sa-chip);
    color: var(--sa-text);
    text-decoration: none;
}

.sa-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.theme-dots {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid var(--sa-border);
    border-radius: 999px;
    background: var(--sa-chip);
}

.theme-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
}

.theme-dot[data-theme-btn="grafite"] {
    background: #1a1d24;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.theme-dot[data-theme-btn="branco"] {
    background: #f3f4f8;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
}

.theme-dot[data-theme-btn="azul"] {
    background: #12356b;
}

.theme-dot[data-theme-btn="rosa"] {
    background: #f7b8d2;
}

.theme-dot[data-theme-btn="pride"] {
    background: conic-gradient(from 180deg, #e4405f, #ff8a00, #ffd400, #2ecc71, #2e8fff, #8c4ce8, #e4405f);
}

.theme-dot.active {
    border-color: var(--sa-text);
    transform: scale(1.16);
}

.sa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
    line-height: normal;
    text-decoration: none;
    border: 1px solid var(--sa-border);
    white-space: nowrap;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.sa-btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.sa-btn-primary {
    background: var(--sa-grad);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 12px 28px -18px rgba(232, 56, 79, 0.9);
}

.sa-btn-ghost {
    background: transparent;
    color: var(--sa-text);
}

.sa-header-icon,
.sa-header .notifications-btn,
.sa-header .chat-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--sa-text);
    box-shadow: none;
    position: relative;
    flex: 0 0 auto;
    cursor: pointer;
    transition: color 180ms ease, transform 180ms ease;
}

.sa-header-icon:hover,
.sa-header .notifications-btn:hover,
.sa-header .chat-btn:hover {
    background: transparent;
    color: var(--sa-purple);
    transform: scale(1.08);
    text-decoration: none;
}

.sa-header-icon svg,
.sa-header .notifications-btn svg,
.sa-header .chat-btn svg {
    width: 21px;
    height: 21px;
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--sa-red);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 0 0 2px var(--sa-elev);
}

.badge:not([hidden]) {
    display: inline-flex;
}

.sa-header .badge {
    top: -2px;
    right: -4px;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    font-size: 0.56rem;
    box-shadow: 0 0 0 2px var(--sa-elev);
}

.user-menu {
    position: relative;
}

.user-menu-toggle {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 6px;
    border-radius: 999px;
    border: 1px solid var(--sa-border);
    background: var(--sa-chip);
    color: var(--sa-text);
    cursor: pointer;
    transition: background 180ms ease, transform 180ms ease;
}

.user-menu-toggle:hover {
    background: var(--sa-elev);
    transform: translateY(-1px);
}

.sa-user-avatar {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 50%;
    overflow: hidden;
    background: var(--sa-grad);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
}

.sa-user-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.user-avatar,
.dropdown-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--sa-chip);
}

.user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    font-size: 0.9rem;
}

.sa-chevron {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    color: var(--sa-muted);
}

.user-dropdown,
.notifications-dropdown {
    background: var(--sa-elev);
    border: 1px solid var(--sa-border);
    color: var(--sa-text);
    border-radius: 8px;
    box-shadow: var(--sa-shadow);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 290px;
    display: none;
    overflow: hidden;
    z-index: var(--z-dropdown, 1100);
}

.user-menu.active .user-dropdown {
    display: block;
}

/* Estrutura do menu da conta: a home nao carrega o CSS legado das paginas. */
.sa-header .dropdown-menu {
    display: block;
    margin: 0;
    padding: 8px 0;
    list-style: none;
}

.sa-header .dropdown-menu li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sa-header .dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    padding: 10px 14px;
    color: var(--sa-text);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
}

.sa-header .dropdown-menu .dropdown-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: var(--sa-muted);
}

.sa-header .dropdown-menu .dropdown-icon svg {
    display: block;
    width: 17px !important;
    height: 17px !important;
    max-width: 17px;
    max-height: 17px;
}

.sa-header .dropdown-menu .divider {
    height: 1px;
    margin: 7px 12px;
    padding: 0;
    background: var(--sa-border);
}

.sa-header .dropdown-menu .logout-link,
.sa-header .dropdown-menu .logout-link .dropdown-icon {
    color: var(--sa-red);
}

.notifications-container {
    position: relative;
}

.notifications-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(280px, calc(100vw - 32px));
    overflow: hidden;
    z-index: 1100;
}

.notifications-dropdown[hidden] {
    display: none !important;
}

.notif-header {
    padding: 12px 15px;
}

.notif-list {
    padding: 5px 0;
}

.notif-item {
    display: block;
    padding: 10px 15px;
    border-bottom: 1px solid var(--sa-border);
    font-size: 0.85rem;
    text-decoration: none;
}

.notif-empty {
    margin: 0;
    padding: 20px;
    color: var(--sa-muted);
    font-size: 0.85rem;
    text-align: center;
}

.pulse-ring {
    position: absolute;
    top: 7px;
    right: 8px;
    width: 7px;
    height: 7px;
    border: 1.5px solid var(--sa-elev);
    border-radius: 50%;
    background: var(--sa-red);
    pointer-events: none;
}

.pulse-ring[hidden] {
    display: none !important;
}

.sa-header .pulse-ring {
    top: -5px;
    right: -7px;
    width: 21px;
    height: 21px;
    border: 1.5px solid var(--sa-red);
    background: transparent;
    opacity: 0;
    animation: sa-header-alert-pulse 1.7s ease-out infinite;
}

@keyframes sa-header-alert-pulse {
    0% { transform: scale(.55); opacity: .9; }
    70% { transform: scale(1.28); opacity: 0; }
    100% { transform: scale(1.28); opacity: 0; }
}

.chat-preview-dropdown {
    width: min(350px, calc(100vw - 32px));
}

.chat-preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    border-bottom: 1px solid var(--sa-border);
    color: var(--sa-text);
    text-decoration: none;
}

.chat-preview-item:hover {
    background: var(--sa-chip);
    text-decoration: none;
}

.chat-preview-avatar {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--sa-grad);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 800;
}

.chat-preview-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-preview-content {
    display: grid;
    min-width: 0;
    flex: 1;
    gap: 2px;
}

.chat-preview-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.chat-preview-meta strong,
.chat-preview-message,
.chat-preview-content small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-preview-meta strong {
    font-size: 0.83rem;
}

.chat-preview-meta time,
.chat-preview-content small {
    color: var(--sa-muted);
    font-size: 0.68rem;
}

.chat-preview-message {
    color: var(--sa-text);
    font-size: 0.76rem;
    font-weight: 600;
}

.chat-preview-count {
    min-width: 17px;
    height: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--sa-red);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
}

.chat-preview-all {
    display: block;
    padding: 12px 14px;
    color: var(--sa-purple);
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.chat-preview-all:hover {
    background: var(--sa-chip);
    text-decoration: none;
}

.dropdown-header,
.notif-header {
    background: var(--sa-elev-2);
    border-bottom: 1px solid var(--sa-border);
}

.dropdown-menu a,
.notif-item {
    color: var(--sa-text);
}

.dropdown-menu a:hover,
.notif-item:hover {
    background: var(--sa-chip);
}

.mobile-menu-toggle {
    width: 42px;
    height: 42px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--sa-border);
    background: var(--sa-elev);
}

.hamburger span {
    background: var(--sa-text);
}

/* O componente e renderizado em todas as paginas, inclusive na home. */
.mobile-nav {
    position: fixed;
    top: 74px;
    right: 14px;
    left: auto;
    bottom: auto;
    display: block;
    width: min(310px, calc(100vw - 28px));
    max-height: calc(100dvh - 92px);
    margin: 0;
    padding: 10px;
    overflow: auto;
    border: 1px solid var(--sa-border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--sa-bg) 72%, transparent);
    backdrop-filter: blur(18px);
    box-shadow: var(--sa-shadow);
    transform: translateY(-8px) scale(.98);
    transform-origin: top right;
    opacity: 0;
    visibility: hidden;
    z-index: 1200;
    transition: transform 180ms ease, opacity 180ms ease, visibility 180ms ease;
}

.mobile-nav.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.mobile-nav-header {
    display: none;
    padding: 20px;
}

.mobile-nav-header img {
    width: 180px;
    height: auto;
}

.mobile-nav-list a {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 10px 12px;
    color: var(--sa-text);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    border-radius: 8px;
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mobile-nav-list li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mobile-nav-list .divider {
    height: 1px;
    margin: 7px 4px;
    background: var(--sa-border);
}

.mobile-nav-list a.highlight,
.mobile-nav-list a.active {
    background: var(--sa-grad);
    color: #fff;
}

/* Home */
.sa-hero {
    padding: 54px 0 42px;
}

.sa-hero-grid {
    display: grid;
    grid-template-columns: 1.02fr 0.98fr;
    gap: 44px;
    align-items: center;
}

.sa-kicker,
.sa-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid var(--sa-border);
    border-radius: 999px;
    background: var(--sa-chip);
    color: var(--sa-muted);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
}

.sa-title {
    max-width: 720px;
    margin: 18px 0 18px;
    color: var(--sa-text);
    font-size: 3.7rem;
    line-height: 1.02;
    font-weight: 700;
}

.sa-gradient {
    background: var(--sa-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.sa-lead {
    max-width: 620px;
    color: var(--sa-muted);
    font-size: 1.08rem;
    line-height: 1.7;
}

.sa-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 28px 0 14px;
}

.sa-note {
    color: var(--sa-muted);
    font-size: 0.86rem;
}

.sa-hero-media {
    display: grid;
    gap: 12px;
}

.sa-media-main {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--sa-border);
    border-radius: 8px;
    aspect-ratio: 4 / 3;
    background: var(--sa-elev);
    box-shadow: var(--sa-shadow);
}

.sa-media-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sa-media-label {
    position: absolute;
    left: 14px;
    bottom: 14px;
    right: 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(17, 19, 24, 0.72);
    color: #fff;
    backdrop-filter: blur(10px);
}

.sa-media-label span {
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.86rem;
}

.sa-media-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.sa-mini-shot {
    min-height: 92px;
    padding: 14px;
    border: 1px solid var(--sa-border);
    border-radius: 8px;
    background: var(--sa-elev);
}

.sa-mini-shot strong {
    display: block;
    margin-bottom: 6px;
    color: var(--sa-text);
}

.sa-mini-shot span {
    color: var(--sa-muted);
    font-size: 0.85rem;
}

.sa-section,
.listings-section,
.cta-section,
.info-section {
    padding: 58px 0;
    background: transparent;
}

.sa-section-band {
    border-top: 1px solid var(--sa-border);
    border-bottom: 1px solid var(--sa-border);
    background: color-mix(in srgb, var(--sa-elev) 62%, transparent);
}

.sa-section-head,
.listings-header,
.section-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 28px;
}

.sa-section-head h2,
.listings-header h2,
.section-title h2 {
    margin: 0 0 6px;
    color: var(--sa-text);
    font-size: 2rem;
}

.sa-section-head p,
.listings-header p,
.section-title p,
.text-muted {
    color: var(--sa-muted);
}

.sa-category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.sa-category-card {
    min-height: 112px;
    padding: 16px;
    border: 1px solid var(--sa-border);
    border-radius: 8px;
    background: var(--sa-elev);
    color: var(--sa-text);
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.sa-category-card:hover {
    transform: translateY(-2px);
    border-color: var(--sa-border-strong);
    box-shadow: var(--sa-shadow);
    text-decoration: none;
}

.sa-category-icon {
    display: block;
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.sa-category-card strong {
    display: block;
    margin-bottom: 6px;
}

.sa-category-card span {
    color: var(--sa-muted);
    font-size: 0.86rem;
}

.listings-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn,
.nav-tab {
    border-radius: 8px;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.anuncio-card,
.anuncio-card-mini,
.info-card,
.admin-card,
.dash-card,
.metric-card,
.stat-card {
    border-radius: 8px;
}

.anuncio-card {
    background: var(--sa-elev);
    border: 1px solid var(--sa-border);
    box-shadow: none;
    overflow: hidden;
    color: var(--sa-text);
    text-decoration: none;
}

.anuncio-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--sa-shadow);
}

.anuncio-image {
    aspect-ratio: 4 / 3;
    background: var(--sa-elev-2);
}

.anuncio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.anuncio-type {
    border-radius: 999px;
    background: rgba(17, 19, 24, 0.72);
    backdrop-filter: blur(10px);
}

.anuncio-body {
    background: transparent;
}

.anuncio-name {
    color: var(--sa-text);
}

.anuncio-info,
.anuncio-location {
    color: var(--sa-muted);
}

.sa-newsletter {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 28px;
    border: 1px solid var(--sa-border);
    border-radius: 8px;
    background: var(--sa-elev);
}

.sa-newsletter h2 {
    margin: 0 0 6px;
}

.sa-newsletter p {
    margin: 0;
    color: var(--sa-muted);
}

.sa-newsletter form {
    display: flex;
    gap: 10px;
    min-width: 360px;
}

.sa-newsletter input {
    min-height: 44px;
    border-radius: 8px;
    border: 1px solid var(--sa-border);
    background: var(--sa-elev-2);
    color: var(--sa-text);
    padding: 0 14px;
}

.sa-ai-widget {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 80;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--sa-border-strong);
    border-radius: 999px;
    background: color-mix(in srgb, var(--sa-elev) 88%, transparent);
    color: var(--sa-text);
    box-shadow: var(--sa-shadow);
    backdrop-filter: blur(14px);
}

.sa-ai-widget img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.sa-ai-widget span {
    max-width: 170px;
    color: var(--sa-muted);
    font-size: 0.82rem;
    line-height: 1.25;
}

/* Admin */
.admin-section,
.admin-dashboard {
    background: transparent;
}

.admin-shell {
    padding: 40px 0 64px;
}

.admin-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.admin-head h1 {
    margin: 0 0 6px;
    color: var(--sa-text);
    font-size: 2rem;
}

.admin-head p {
    margin: 0;
    color: var(--sa-muted);
}

.admin-tabs,
.admin-nav-tabs {
    display: flex;
    gap: 6px;
    padding: 5px;
    border: 1px solid var(--sa-border);
    border-radius: 8px;
    background: var(--sa-chip);
}

.admin-tabs a,
.admin-nav-tabs a {
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--sa-muted);
    font-weight: 700;
}

.admin-tabs a.active,
.admin-nav-tabs a.active {
    background: var(--sa-elev);
    color: var(--sa-text);
    box-shadow: 0 10px 26px -22px rgba(0, 0, 0, 0.8);
}

.stats-grid,
.metrics-grid,
.admin-metrics {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card,
.metric-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 98px;
    padding: 16px;
    border: 1px solid var(--sa-border);
    background: var(--sa-elev);
    color: var(--sa-text);
    box-shadow: none;
}

.stat-icon,
.metric-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--sa-chip);
}

.stat-value,
.stat-number,
.metric-val {
    display: block;
    color: var(--sa-text);
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
}

.stat-label,
.metric-label {
    color: var(--sa-muted);
    font-size: 0.78rem;
    text-transform: none;
    white-space: normal;
}

.admin-grid,
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.admin-card,
.dash-card {
    border: 1px solid var(--sa-border);
    background: var(--sa-elev);
    color: var(--sa-text);
    box-shadow: none;
    overflow: hidden;
}

.card-header {
    border-bottom: 1px solid var(--sa-border);
    background: var(--sa-elev-2);
}

.card-body,
.card-content {
    background: transparent;
}

.list-item,
.dash-item {
    background: var(--sa-elev-2);
    border-radius: 8px;
}

.item-meta,
.item-time,
.item-date,
.item-main span,
.empty,
.empty-message {
    color: var(--sa-muted);
}

.quick-links,
.quick-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.quick-link,
.quick-tile {
    min-height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--sa-border);
    border-radius: 8px;
    background: var(--sa-elev);
    color: var(--sa-text);
    text-decoration: none;
    box-shadow: none;
}

.quick-link:hover,
.quick-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--sa-shadow);
    text-decoration: none;
}

.admin-shell.admin-section,
.admin-shell.admin-dashboard {
    padding: 40px 0 64px;
    background: transparent;
    min-height: calc(100vh - var(--header-height));
    font-family: var(--font-body);
}

.admin-shell .admin-header {
    display: block;
    margin-bottom: 28px;
}

.admin-shell .admin-header>div {
    width: 100%;
}

.admin-shell .admin-header h1 {
    margin: 0 0 6px;
    color: var(--sa-text);
    font-family: var(--font-heading);
    font-size: 2rem;
}

.admin-shell .admin-header p {
    color: var(--sa-muted);
}

.admin-shell .stats-grid,
.admin-shell .metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.admin-shell .stat-card,
.admin-shell .metric-card,
.admin-shell .quick-link,
.admin-shell .dash-card,
.admin-shell .admin-card {
    border: 1px solid var(--sa-border);
    border-radius: 8px;
    background: var(--sa-elev);
    color: var(--sa-text);
    box-shadow: none;
}

.admin-shell .stat-card,
.admin-shell .metric-card {
    min-height: 98px;
    padding: 16px;
}

.admin-shell .stat-icon,
.admin-shell .metric-icon,
.admin-shell .item-avatar,
.admin-shell .quick-icon {
    background: var(--sa-chip);
    border-radius: 8px;
}

.admin-shell .stat-value,
.admin-shell .stat-number,
.admin-shell .metric-val {
    color: var(--sa-text);
    font-family: var(--font-heading);
}

.admin-shell .stat-label,
.admin-shell .metric-label,
.admin-shell .item-meta,
.admin-shell .item-time,
.admin-shell .item-date {
    color: var(--sa-muted);
}

.admin-shell .admin-nav-tabs {
    border: 1px solid var(--sa-border);
    background: var(--sa-chip);
}

.admin-shell .nav-tab.active {
    background: var(--sa-elev);
    color: var(--sa-text);
}

.admin-shell .admin-grid,
.admin-shell .dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.admin-shell .list-item,
.admin-shell .dash-item {
    background: var(--sa-elev-2);
    border-radius: 8px;
}

.admin-shell .card-header {
    border-bottom: 1px solid var(--sa-border);
    background: var(--sa-elev-2);
}

.admin-shell .quick-links {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.admin-shell .quick-link {
    min-height: 112px;
    justify-content: center;
}

@media (max-width: 1040px) {
    .sa-main-nav {
        display: none;
    }

    .sa-hero-grid,
    .admin-grid,
    .dashboard-grid,
    .admin-shell .admin-grid,
    .admin-shell .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .sa-category-grid,
    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid,
    .metrics-grid,
    .admin-metrics,
    .admin-shell .stats-grid,
    .admin-shell .metrics-grid,
    .admin-shell .quick-links,
    .quick-links,
    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 760px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .sa-header-inner {
        min-height: 68px;
        gap: 8px;
    }

    .sa-logo img {
        width: auto;
        height: 34px;
    }

    .sa-header-actions {
        gap: 6px;
    }

    .sa-btn {
        min-height: 38px;
        padding: 0 10px;
        font-size: 0.86rem;
    }

    .mobile-menu-toggle,
    .sa-header-icon,
    .sa-header .btn-icon,
    .sa-header .notifications-btn,
    .sa-header .chat-btn {
        width: 38px;
        height: 38px;
    }

    .theme-dots,
    .sa-desktop-only,
    .user-name,
    .sa-chevron {
        display: none;
    }

    .mobile-menu-toggle {
        display: inline-flex;
    }

    .sa-title {
        font-size: 2.42rem;
    }

    .sa-hero {
        padding-top: 34px;
    }

    .sa-section-head,
    .listings-header,
    .section-title,
    .admin-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .sa-category-grid,
    .listings-grid,
    .sa-media-strip,
    .stats-grid,
    .metrics-grid,
    .admin-metrics,
    .admin-shell .stats-grid,
    .admin-shell .metrics-grid,
    .admin-shell .quick-links,
    .quick-links,
    .quick-grid {
        grid-template-columns: 1fr;
    }

    .sa-newsletter,
    .sa-newsletter form {
        grid-template-columns: 1fr;
        min-width: 0;
        width: 100%;
    }

    .sa-newsletter form {
        display: grid;
    }

    .sa-ai-widget span {
        display: none;
    }
}

@media (max-width: 760px) {
    .mobile-nav {
        background: var(--sa-elev);
    }

    .mobile-nav::before,
    .mobile-nav.active::before {
        display: none;
    }

    .mobile-nav-header {
        display: none;
    }

    .mobile-nav-list {
        gap: 4px;
        margin: 0;
        padding: 0;
    }

    .mobile-nav-list a {
        padding: 10px 12px;
        border-radius: 10px;
        font-size: 0.92rem;
    }

    .sa-header .theme-dots {
        display: flex;
        position: fixed;
        top: 76px;
        right: 16px;
        z-index: 990;
        padding: 5px;
        background: var(--sa-elev);
        border: 1px solid var(--sa-border);
        border-radius: 999px;
        box-shadow: var(--sa-shadow);
        transform: scale(.9);
        transform-origin: top right;
    }

    body.mobile-menu-open {
        overflow: hidden;
    }
}

/* ---------- Assistente flutuante (site-wide) ---------- */
.ai-fab {
    position: fixed;
    right: 24px;
    bottom: 94px;
    z-index: 4000;
    width: 66px;
    height: 70px;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    animation: aiFabFloat 3s ease-in-out infinite;
}

.ai-fab::before,
.ai-fab::after {
    content: "";
    position: absolute;
    pointer-events: none;
    opacity: 0;
}

.ai-fab.is-busy::before {
    inset: -9px -7px;
    border: 1px solid rgba(46, 143, 255, 0.28);
    border-radius: 50%;
    opacity: 1;
    animation: aiOrbitRing 1.4s ease-in-out infinite;
}

.ai-fab.is-busy::after {
    top: 50%;
    left: 50%;
    width: 9px;
    height: 9px;
    margin: -4.5px 0 0 -4.5px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b35, #8c4ce8 55%, #2e8fff);
    box-shadow: 0 0 12px rgba(46, 143, 255, 0.7), -10px 0 14px rgba(232, 56, 79, 0.28);
    opacity: 1;
    animation: aiOrbitComet 1s linear infinite;
}

.ai-fab-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

@keyframes aiFabFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes aiOrbitComet {
    from {
        transform: rotate(0deg) translateX(45px);
    }

    to {
        transform: rotate(360deg) translateX(45px);
    }
}

@keyframes aiOrbitRing {

    0%,
    100% {
        transform: scale(0.96);
        opacity: 0.45;
    }

    50% {
        transform: scale(1.04);
        opacity: 0.9;
    }
}

.ai-panel {
    position: fixed;
    right: 24px;
    bottom: 176px;
    z-index: 4000;
    width: 300px;
    max-width: calc(100vw - 48px);
    background: var(--sa-elev);
    border: 1px solid var(--sa-border-strong);
    border-radius: 16px;
    box-shadow: 0 20px 45px -20px rgba(0, 0, 0, 0.35);
    padding: 16px;
    display: none;
    flex-direction: column;
    gap: 10px;
}

.ai-panel.open {
    display: flex;
}

.ai-panel[hidden] {
    display: none !important;
}

.ai-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ai-panel-title {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.ai-panel-title-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    flex: 0 0 auto;
}

.ai-panel-head strong {
    font-size: 14px;
    color: var(--sa-text);
}

.ai-panel-close {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--sa-elev-2);
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: var(--sa-text);
    cursor: pointer;
}

.ai-panel-close svg {
    width: 12px;
    height: 12px;
}

.ai-panel-bubble {
    background: var(--sa-elev-2);
    border: 1px solid var(--sa-border-strong);
    border-radius: 14px;
    border-bottom-left-radius: 4px;
    padding: 12px 14px;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--sa-text);
}

.ai-panel-bubble a {
    color: var(--purple);
    font-weight: 700;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.ai-panel-bubble a:hover {
    text-decoration: underline;
}

.ai-error {
    display: flex;
    flex-direction: column;
    gap: 9px;
    border-color: rgba(232, 56, 79, 0.22);
}

.ai-error button {
    align-self: flex-start;
    border: 0;
    border-radius: 999px;
    padding: 7px 11px;
    color: #fff;
    background: var(--grad-brand);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.ai-feedback-action {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.ai-feedback-action button,
.ai-feedback-actions button {
    align-self: flex-start;
    border: 0;
    border-radius: 999px;
    padding: 7px 11px;
    color: #fff;
    background: var(--grad-brand);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.ai-feedback-form {
    display: grid;
    gap: 8px;
}

.ai-feedback-form strong {
    font-size: 13px;
}

.ai-feedback-form textarea,
.ai-feedback-form input[type="text"] {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--sa-border-strong);
    border-radius: 10px;
    background: var(--sa-elev);
    color: var(--sa-text);
    font: inherit;
    font-size: 12.5px;
    line-height: 1.45;
    padding: 9px 10px;
    resize: vertical;
}

.ai-feedback-form textarea:focus,
.ai-feedback-form input[type="text"]:focus {
    outline: none;
    border-color: var(--purple);
}

.ai-feedback-check {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    color: var(--sa-text-muted);
    font-size: 12px;
    line-height: 1.35;
}

.ai-feedback-actions {
    display: flex;
    gap: 8px;
}

.ai-feedback-actions button[type="button"] {
    color: var(--sa-text);
    background: var(--sa-elev);
    border: 1px solid var(--sa-border-strong);
}

.ai-feedback-actions button:disabled {
    opacity: 0.65;
    cursor: wait;
}

.ai-nudge {
    position: fixed;
    right: 92px;
    bottom: 112px;
    z-index: 3999;
    max-width: 220px;
    padding: 10px 13px;
    border-radius: 999px;
    background: var(--sa-elev);
    color: var(--sa-text);
    border: 1px solid var(--sa-border-strong);
    box-shadow: 0 16px 36px -22px rgba(0, 0, 0, 0.35);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.ai-nudge[hidden] {
    display: none !important;
}

.ai-messages {
    display: flex;
    flex-direction: column;
    gap: 9px;
    max-height: 310px;
    overflow-y: auto;
    padding-right: 2px;
}

.ai-message-user {
    align-self: flex-end;
    background: var(--grad-brand);
    color: #fff;
    border: 0;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 4px;
    max-width: 86%;
}

.ai-message-bot {
    align-self: flex-start;
    max-width: 92%;
}

.ai-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--sa-text-muted);
    font-weight: 600;
}

.ai-typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.ai-typing-dots i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.35;
    animation: aiTypingDot 1s ease-in-out infinite;
}

.ai-typing-dots i:nth-child(2) {
    animation-delay: 0.15s;
}

.ai-typing-dots i:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes aiTypingDot {

    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: 0.35;
    }

    40% {
        transform: translateY(-3px);
        opacity: 1;
    }
}

.ai-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 4px;
}

.ai-form input {
    min-width: 0;
    flex: 1;
    height: 38px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px solid var(--sa-border-strong);
    background: var(--sa-elev-2);
    color: var(--sa-text);
    font: inherit;
    font-size: 13px;
}

.ai-form input:focus {
    outline: none;
    border-color: var(--purple);
}

.ai-form button {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 0;
    color: #fff;
    background: var(--grad-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
}

.ai-form button svg {
    width: 16px;
    height: 16px;
}

.sa-cookie-banner {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 4200;
    width: min(420px, calc(100vw - 48px));
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: var(--sa-elev, #ffffff);
    border: 1px solid var(--sa-border-strong, rgba(20, 22, 28, 0.16));
    border-radius: 16px;
    box-shadow: 0 20px 45px -24px rgba(0, 0, 0, 0.35);
}

.sa-cookie-banner[hidden] {
    display: none !important;
}

.sa-cookie-banner p {
    margin: 0;
    color: var(--sa-text, #14161c);
    font-size: 13px;
    line-height: 1.45;
}

.sa-cookie-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.sa-cookie-actions a {
    color: var(--sa-text-dim, #5c6270);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
}

.sa-cookie-actions button {
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    color: #fff;
    background: var(--sa-grad, linear-gradient(100deg, #ff6b35 0%, #e8384f 35%, #8c4ce8 68%, #2e8fff 100%));
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 640px) {
    .ai-fab {
        right: 16px;
        bottom: 18px;
    }

    .ai-panel {
        right: 16px;
        bottom: 96px;
        max-width: calc(100vw - 32px);
    }

    .ai-nudge {
        right: 82px;
        bottom: 34px;
        max-width: calc(100vw - 112px);
    }

    .sa-cookie-banner {
        left: 16px;
        right: 16px;
        bottom: 16px;
        width: auto;
        flex-direction: column;
        align-items: flex-start;
    }
}
