/* ============================================================================
   SmartConnect / SmartSpace — Stylesheet di progetto
   Convive con Bootstrap 5 (pagine dashboard interne) e
   Tailwind Play CDN (pagine pubbliche marketplace).
   ============================================================================ */

:root {
    --sc-brand:        #3cc4a6;
    --sc-brand-dark:   #2fa78c;
    --sc-brand-light:  #e6f7f2;
    --sc-ink:          #0f0f1e;
    --sc-ink-soft:     #1a1a3e;
    --sc-sand:         #faf9f7;
    --sc-sidebar-bg:   #ffffff;
    --sc-sidebar-w:    240px;
    --sc-bg-app:       #f7f7fb;
}

html, body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: var(--sc-ink);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-display {
    font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
}

/* ============================================================================
   PAGINE PUBBLICHE (Tailwind) — animazioni & utility
   ============================================================================ */
.sticky-nav-enter-active { transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.18s ease; }
.sticky-nav-leave-active { transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s ease; }

.hero-photo {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}
.hero-photo.active { opacity: 1; }
.caption { transition: opacity 0.5s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
html { scroll-behavior: smooth; }
.sc-dot { width: 8px; height: 8px; border-radius: 9999px; background: var(--sc-brand); display: inline-block; }
.sc-scroll-hide::-webkit-scrollbar { display: none; }
.sc-scroll-hide { scrollbar-width: none; }

/* ============================================================================
   LAYOUT DASHBOARD (Bootstrap) — header, sidebar, main, footer
   ============================================================================ */
body.sc-app {
    background: var(--sc-bg-app);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sc-topbar {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 1px solid #e9e9ef;
}
.sc-logo-dot { width: 14px; height: 14px; border-radius: 4px; display: inline-block; background: var(--sc-brand); }

.sc-layout {
    display: flex;
    flex: 1;
    min-height: calc(100vh - 56px);
}

.sc-sidebar {
    width: var(--sc-sidebar-w);
    background: var(--sc-sidebar-bg);
    border-right: 1px solid #e9e9ef;
    flex-shrink: 0;
}
@media (max-width: 991.98px) {
    .sc-sidebar.offcanvas-lg {
        position: fixed;
        top: 0; bottom: 0; left: -100%;
        z-index: 1045;
        transition: left .25s ease;
    }
}

.sc-sidebar .nav-link {
    color: #344054;
    border-radius: 10px;
    padding: 9px 14px;
    margin-bottom: 2px;
    font-size: 14px;
    font-weight: 500;
}
.sc-sidebar .nav-link:hover {
    background: var(--sc-brand-light);
    color: var(--sc-brand-dark);
}
.sc-sidebar .nav-link.active {
    background: var(--sc-brand);
    color: #fff !important;
}
.sc-sidebar .nav-link.active i { color: #fff; }

.sc-main { min-width: 0; flex: 1; }

.sc-footer {
    background: #fff;
    border-top: 1px solid #e9e9ef;
    margin-top: auto;
}

/* ============================================================================
   CARD / BUTTON OVERRIDES — Bootstrap reskinned per SmartSpace
   ============================================================================ */
.card {
    border: 1px solid #e9e9ef;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    background: #fff;
}
.card .card-header {
    background: #fff;
    border-bottom: 1px solid #f0f0f5;
    font-weight: 600;
    border-radius: 14px 14px 0 0;
}

.btn { font-weight: 600; border-radius: 10px; }
.btn-primary {
    background-color: var(--sc-brand) !important;
    border-color: var(--sc-brand) !important;
    color: #0f0f1e !important;
    font-weight: 700;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--sc-brand-dark) !important;
    border-color: var(--sc-brand-dark) !important;
    color: #fff !important;
}
.btn-outline-primary {
    color: var(--sc-brand-dark) !important;
    border-color: var(--sc-brand) !important;
}
.btn-outline-primary:hover {
    background-color: var(--sc-brand) !important;
    border-color: var(--sc-brand) !important;
    color: #0f0f1e !important;
}

.text-primary { color: var(--sc-brand-dark) !important; }
.bg-primary   { background-color: var(--sc-brand) !important; }

/* Page header dashboard */
.sc-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 12px;
}
.sc-page-header h1 {
    font-size: 1.65rem;
    margin: 0;
    font-weight: 800;
    color: var(--sc-ink);
}

/* Tabelle */
.table > :not(caption) > * > * { padding: .9rem .8rem; }
.table thead th {
    background: #fafafd;
    font-weight: 700;
    font-size: 12px;
    color: #475467;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #e9e9ef;
}

/* Badge */
.badge.sc-status { font-weight: 600; font-size: .72rem; letter-spacing: 0.03em; }

/* Form controls */
.form-control:focus, .form-select:focus {
    border-color: var(--sc-brand);
    box-shadow: 0 0 0 0.2rem rgba(60,196,166,0.15);
}
.form-control, .form-select { border-radius: 10px; }

/* ============================================================================
   PAGINE AUTH (login / register) — gradient background
   ============================================================================ */
.sc-auth-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0f1e 0%, #1a1a3e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.sc-auth-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
}

/* ============================================================================
   COMPONENTI PAGINE PUBBLICHE
   ============================================================================ */
.sc-venue-card {
    border-radius: 18px;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    height: 100%;
    border: 1px solid #eaeaef;
    background: #fff;
}
.sc-venue-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0, 0, 0, .08); }

.sc-venue-cover {
    height: 200px;
    background: #f1f1f7 center/cover no-repeat;
    position: relative;
}
.sc-venue-cover .sc-badge {
    position: absolute;
    top: 12px; left: 12px;
    background: rgba(255, 255, 255, .95);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.sc-rating-stars { color: #ffb400; }

.sc-detail-gallery {
    height: 420px;
    background: #f1f1f7 center/cover no-repeat;
    border-radius: 18px;
    margin-bottom: 1.5rem;
}

.sc-amenity-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--sc-sand);
    border-radius: 20px;
    font-size: 13px;
    margin: 2px;
}

.sc-price-box {
    background: #fff;
    border: 1px solid #eaeaef;
    border-radius: 18px;
    padding: 1.5rem;
    position: sticky;
    top: 80px;
}
