/* ── Página Atividades — SAASCOM Morador ── */

:root {
    --ativ-wave-height: 44px;
}

.ativ-page .page-content {
    background: var(--bg-body, #F0F7FF);
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    border: none !important;
}

.ativ-content {
    min-height: 100%;
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
    font-family: var(--font, 'Montserrat', sans-serif);
    color: #1E3A5F;
}

.ativ-page .page-content::before,
.ativ-page .page-content::after {
    display: none !important;
    content: none !important;
}

/* Hero */
.ativ-hero {
    position: relative;
    z-index: 2;
    padding: calc(env(safe-area-inset-top, 0px) + 16px) clamp(16px, 4vw, 22px) calc(var(--ativ-wave-height) + 20px);
    background: var(--blue-primary, #3DAAEB);
    overflow: visible;
}

.ativ-hero__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        #45B0F0 0%,
        #3DAAEB 35%,
        #2E96D6 100%
    );
    pointer-events: none;
}

.ativ-hero__texture {
    position: absolute;
    inset: 0;
    background-image: url('../img/water-texture.svg');
    background-size: cover;
    opacity: 0.45;
    pointer-events: none;
}

.ativ-hero__inner {
    position: relative;
    z-index: 2;
}

.ativ-hero__title {
    margin: 0;
    font-size: clamp(20px, 5.5vw, 24px);
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.2px;
}

.ativ-hero__sub {
    margin: 6px 0 0;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.45;
}

.ativ-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    height: var(--ativ-wave-height);
    line-height: 0;
    pointer-events: none;
}

.ativ-wave svg {
    display: block;
    width: 100%;
    height: 100%;
}

.ativ-wave path {
    fill: var(--bg-body, #F0F7FF);
}

/* Resumo */
.ativ-summary {
    position: relative;
    z-index: 4;
    margin: calc(-1 * (var(--ativ-wave-height) + 8px)) clamp(14px, 4vw, 18px) 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #fff;
    box-shadow:
        0 14px 36px rgba(30, 90, 142, 0.12),
        0 4px 14px rgba(61, 170, 235, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.ativ-summary__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(145deg, #E8F4FD 0%, #D4EBFA 100%);
    color: var(--blue-primary, #3DAAEB);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.ativ-summary__text strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: #1E3A5F;
    margin-bottom: 2px;
}

.ativ-summary__text span {
    font-size: 12px;
    color: #5B7A96;
    line-height: 1.4;
}

/* Filtros */
.ativ-filters-wrap {
    position: sticky;
    top: 0;
    z-index: 5;
    background: linear-gradient(180deg, var(--bg-body, #F0F7FF) 75%, rgba(240, 247, 255, 0));
    padding: 4px 0 8px;
}

.ativ-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 clamp(14px, 4vw, 18px);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.ativ-filters::-webkit-scrollbar {
    display: none;
}

.ativ-filter {
    flex: 0 0 auto;
    border: 1px solid #D6E8F8;
    background: #fff;
    color: #4A6B8A;
    font-size: 12px;
    font-weight: 700;
    padding: 9px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(30, 90, 142, 0.04);
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.ativ-filter:active {
    transform: scale(0.97);
}

.ativ-filter.is-active {
    background: linear-gradient(180deg, #45B0F0 0%, var(--blue-primary, #3DAAEB) 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 16px rgba(61, 170, 235, 0.35);
}

/* Lista */
.ativ-main {
    padding: 4px clamp(14px, 4vw, 18px) 28px;
}

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

.ativ-group-title {
    margin: 16px 0 8px;
    padding-left: 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7A96B0;
}

.ativ-group-title:first-child {
    margin-top: 4px;
}

/* Card de atividade */
.ativ-item {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    gap: 12px;
    align-items: start;
    padding: 14px 14px 14px 12px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(214, 232, 248, 0.9);
    box-shadow:
        0 8px 22px rgba(30, 90, 142, 0.06),
        0 2px 8px rgba(61, 170, 235, 0.04);
}

.ativ-item__icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    box-shadow: 0 6px 14px rgba(30, 58, 95, 0.12);
}

.ativ-item__icon--reservas {
    background: linear-gradient(145deg, #818CF8 0%, #4F46E5 100%);
}

.ativ-item__icon--ocorrencias {
    background: linear-gradient(145deg, #FBBF24 0%, #D97706 100%);
}

.ativ-item__icon--agendamentos {
    background: linear-gradient(145deg, #34D399 0%, #059669 100%);
}

.ativ-item__icon--encomendas {
    background: linear-gradient(145deg, #F472B6 0%, #DB2777 100%);
}

.ativ-item__icon--manifestacoes {
    background: linear-gradient(145deg, #A78BFA 0%, #7C3AED 100%);
}

.ativ-item__body {
    min-width: 0;
    padding-top: 1px;
}

.ativ-item__tipo {
    margin: 0 0 3px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #7A96B0;
}

.ativ-item__title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #1E3A5F;
    line-height: 1.35;
}

.ativ-item__meta {
    margin: 5px 0 0;
    font-size: 12px;
    color: #5B7A96;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ativ-item__badge {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    background: #EEF6FF;
    color: #2563EB;
}

.ativ-item__badge--ok {
    background: #ECFDF5;
    color: #059669;
}

.ativ-item__badge--warn {
    background: #FFFBEB;
    color: #B45309;
}

.ativ-item__badge--muted {
    background: #F1F5F9;
    color: #64748B;
}

.ativ-item__time {
    font-size: 11px;
    font-weight: 700;
    color: #94A3B8;
    white-space: nowrap;
    padding-top: 4px;
    text-align: right;
}

/* Estados vazios / loading */
.ativ-loading,
.ativ-empty {
    text-align: center;
    padding: 48px 20px;
    color: #5B7A96;
    font-size: 14px;
    line-height: 1.55;
    border-radius: 18px;
    background: #fff;
    border: 1px dashed #D6E8F8;
    margin-top: 8px;
}

.ativ-loading {
    border-style: solid;
    border-color: #E3EFFA;
}

.ativ-empty__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: linear-gradient(145deg, #E8F4FD 0%, #D4EBFA 100%);
    color: var(--blue-primary, #3DAAEB);
    font-size: 32px;
}

.ativ-empty strong {
    display: block;
    color: #1E3A5F;
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 6px;
}
