:root {
    /* Paleta alinhada à index (theme #FF00CC, #990066, #B64EBD, #F78EE2) */
    --bg-1: #fff9fd;
    --bg-2: #fce7f4;
    --accent: #FF00CC;
    --accent-2: #F78EE2;
    --accent-dark: #990066;
    --text: #4a1540;
    --muted: #7a4572;
    --card: #ffffff;
    --border: rgba(255, 0, 204, 0.28);
    --shadow: 0 16px 34px rgba(153, 0, 102, 0.14);
    --shadow-strong: 0 28px 60px rgba(153, 0, 102, 0.18);
    --panel: linear-gradient(135deg, rgba(255,255,255,0.94), rgba(252, 234, 247, 0.98));
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(247, 142, 226, 0.4), transparent 32%),
        radial-gradient(circle at top right, rgba(255, 0, 204, 0.12), transparent 28%),
        linear-gradient(180deg, #fff9fd 0%, #fceff8 42%, #f5dff0 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: '';
    position: fixed;
    inset: auto;
    pointer-events: none;
    z-index: 0;
    border-radius: 999px;
    filter: blur(16px);
    opacity: 0.55;
}

body::before {
    width: 260px;
    height: 260px;
    top: 92px;
    left: -90px;
    background: radial-gradient(circle, rgba(255,0,204,0.2), transparent 72%);
}

body::after {
    width: 320px;
    height: 320px;
    right: -120px;
    bottom: 60px;
    background: radial-gradient(circle, rgba(247,142,226,0.35), transparent 72%);
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1200px, 92vw);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: transparent;
    border-bottom: 1px solid rgba(153, 0, 102, 0.25);
    box-shadow: 0 8px 24px rgba(153, 0, 102, 0.12);
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 max(12px, 2vw);
    gap: 20px;
    min-height: 48px;
    background: #ff00cc;
}

.logo img {
    width: 280px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(153, 0, 102, 0.16));
}

.hamburger {
    width: 44px;
    height: 44px;
    background: linear-gradient(180deg, #fff9fd, #fde8f7);
    border: none;
    border-radius: 12px;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
}

.hamburger span {
    width: 22px;
    height: 2px;
    background: #990066;
    margin: 0 auto;
}

.menu {
    position: absolute;
    right: 4vw;
    top: 52px;
    background: linear-gradient(180deg, rgba(255,249,252,0.98), rgba(253,230,248,0.98));
    border: 1px solid #FF00CC;
    border-radius: 16px;
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow);
}

.menu.is-open {
    display: flex;
}

.menu__item {
    padding: 8px 12px;
    border-radius: 10px;
    transition: transform 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    border: none;
    background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,220,245,0.72));
    color: var(--text);
    position: relative;
}

.menu__item + .menu__item {
    border-top: 1px solid rgba(255, 0, 204, 0.4);
}

.menu__item:hover {
    color: var(--text);
    transform: translateY(-2px);
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(248,200,238,0.82));
    box-shadow: 0 12px 22px rgba(153, 0, 102, 0.12);
}

.menu__item::after {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 4px;
    height: 2px;
    background: #990066;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
    border-radius: 999px;
    opacity: 0.7;
}

.menu__item:hover::after {
    transform: scaleX(1);
}

.hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 20px 0 22px;
    position: relative;
    z-index: 1;
    margin: 10px 0 18px;
    border: 1px solid rgba(255, 0, 204, 0.38);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(255,0,204,0.18), transparent 26%),
        linear-gradient(135deg, rgba(255,255,255,0.95), rgba(252,234,247,0.96));
    box-shadow: var(--shadow-strong);
    overflow: hidden;
}

.hero__kicker {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 3px;
    color: #990066;
    margin: 0;
    padding: 0 19px;
    text-align: center;
}

.hero__title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(24px, 3.5vw, 32px);
    margin: 12px 0 6px;
    text-align: center;
    letter-spacing: 0.02em;
    color: #5c1848;
    text-shadow: 0 1px 0 rgba(255,255,255,0.7);
}

.hero__text {
    color: var(--muted);
    max-width: 920px;
    text-align: center;
    margin: 0 auto;
    font-size: 18px;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(255,0,204,0.42);
    border-radius: 16px;
    padding: 14px 10px;
    box-shadow: 0 14px 24px rgba(153, 0, 102, 0.1);
}

.hero__text p {
    margin: 0;
    line-height: 1.7;
}

.hero__text p + p {
    margin-top: 18px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hero-search {
    display: flex;
    align-items: stretch;
    gap: 8px;
    max-width: 420px;
    margin: 18px auto 0;
    padding: 0 4px;
}

.hero-search__input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    font-size: 15px;
    line-height: 1.35;
    color: var(--text);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(153, 0, 102, 0.28);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(153, 0, 102, 0.06);
}

.hero-search__input::placeholder {
    color: rgba(122, 69, 114, 0.65);
}

.hero-search__input:focus {
    outline: none;
    border-color: rgba(255, 0, 204, 0.55);
    box-shadow: 0 0 0 3px rgba(255, 0, 204, 0.12);
}

.hero-search__submit {
    flex-shrink: 0;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-dark);
    background: linear-gradient(180deg, rgba(255, 249, 253, 0.98), rgba(253, 232, 247, 0.95));
    border: 1px solid rgba(255, 0, 204, 0.35);
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(153, 0, 102, 0.08);
}

.hero-search__submit:hover {
    border-color: rgba(255, 0, 204, 0.55);
    background: linear-gradient(180deg, #fff, rgba(252, 236, 250, 0.98));
}

.hero-search__submit:focus-visible {
    outline: 2px solid var(--accent-dark);
    outline-offset: 2px;
}

.hero-search__hint {
    max-width: 420px;
    margin: 10px auto 0;
    padding: 0 8px;
    font-size: 13px;
    color: var(--muted);
    text-align: center;
}


.grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    padding-bottom: 40px;
    z-index: 1;
    position: relative;
}

.card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(253,240,248,0.98));
    border: 1px solid rgba(255,0,204,0.42);
    box-shadow: var(--shadow);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    animation: reveal 0.6s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.25), transparent 46%);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 34px 68px rgba(153, 0, 102, 0.34);
    border-color: rgba(182,78,189,0.58);
}

.card__title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    line-height: 1.25;
    color: #4a1540;
}

.card__media {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(182,78,189,0.5);
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.36);
}

.card__media.is-empty {
    display: grid;
    place-items: center;
    color: var(--muted);
    background: rgba(255, 0, 204, 0.12);
}

.card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.card__media picture {
    display: block;
    width: 100%;
    height: 100%;
}

.card__text {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.5;
    padding: 0 2px 2px;
}

.card__text span {
    color: #7a1f6b;
    font-weight: 600;
}

.card:hover .card__media img {
    transform: scale(1.04);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding-bottom: 50px;
}

.page {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.88);
    border: 1px solid var(--border);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.page--dots {
    border: none;
    background: transparent;
    color: var(--muted);
    padding: 0 6px;
}

.page:hover,
.page.is-active {
    background: rgba(255, 0, 204, 0.22);
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(153, 0, 102, 0.12);
}

.article {
    padding: 12px 0 20px;
    position: relative;
    z-index: 1;
}

.article__header {
    text-align: left;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.article__header h1 {
    font-family: Arial, sans-serif;
    font-size: clamp(28px, 4vw, 46px);
    margin: 12px 0;
    text-align: left;
}

.article__subtitle {
    color: var(--muted);
    font-size: 18px;
    max-width: 720px;
    margin: 12px 0 0;
    background: linear-gradient(135deg, rgba(255,0,204,0.22), rgba(255,255,255,0.96));
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 16px;
    box-shadow: var(--shadow);
    text-align: left;
}

.article__meta {
    font-size: 14px;
    color: var(--muted);
    margin-top: 8px;
    align-self: flex-start;
}

@media (min-width: 900px) {
    .article__header {
        align-items: center;
        text-align: center;
    }
    .article__header h1 {
        text-align: center;
    }
    .article__subtitle {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
}

@media (max-width: 899px) {
    .article__header {
        align-items: center;
        text-align: center;
    }
    .article__header h1 {
        text-align: center;
    }
    .article__subtitle {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
}

.article__image img {
    width: 100%;
    max-width: 640px;
    max-height: 360px;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid var(--border);
    margin: 24px auto;
}

@media (max-width: 900px) {
    .article__image {
        display: flex;
        justify-content: center;
    }

    .article__image img {
        width: min(90vw, 340px);
        height: 210px;
        max-width: 340px;
        max-height: none;
        margin: 16px auto;
    }
}

.article__content {
    line-height: 1.8;
    color: var(--text);
    font-size: 18px;
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 12px;
    box-shadow: var(--shadow);
}

.no-copy {
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.article__content a {
    color: #c4109c;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    font-weight: 600;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.article__content a:hover {
    color: #6a0888;
    text-decoration-color: #6a0888;
}

.resizable-media {
    display: inline-block;
    max-width: 100%;
}

.resizable-media img {
    width: 100%;
    height: auto;
    display: block;
}

.editor-media {
    width: 100%;
    margin: 14px 0;
}

.editor-media.media-align-left {
    text-align: left;
}

.editor-media.media-align-center {
    text-align: center;
}

.editor-media.media-align-right {
    text-align: right;
}

.editor-media .resizable-media {
    width: min(100%, 420px);
}

.tag {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255,0,204,0.22);
    font-size: 12px;
    align-self: flex-start;
    margin-bottom: 6px;
}

.share {
    margin-top: 30px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid rgba(255,0,204,0.35);
    background: linear-gradient(135deg, rgba(255,0,204,0.22), rgba(255,255,255,0.94));
    box-shadow: 0 18px 35px rgba(153,0,102,0.18);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.share__headline {
    display: grid;
    gap: 6px;
    flex: 1 1 240px;
}

.share__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.share__subtitle {
    color: var(--muted);
    font-size: 14px;
}

.share__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share__btn {
    padding: 8px 14px;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    border: none;
}

.share__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    opacity: 0.95;
}

.share__btn--facebook {
    background: linear-gradient(120deg, #1877f2, #0f5bd6);
}

.share__btn--whats {
    background: linear-gradient(120deg, #25d366, #128c7e);
}

@media (max-width: 700px) {
    .share {
        justify-content: center;
        text-align: center;
    }
    .share__headline {
        justify-items: center;
    }
}

@media (min-width: 900px) {
    .share {
        justify-content: center;
        text-align: center;
    }
    .share__headline {
        justify-items: center;
        flex: 0 1 auto;
    }
}

.related {
    margin-top: 50px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding: 18px 8px 8px;
    border: 1px solid rgba(255,0,204,0.35);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(253,230,248,0.82));
    box-shadow: 0 18px 36px rgba(153,0,102,0.12);
}

.related h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 26px;
    margin: 0 0 18px;
    text-align: center;
    color: #7a1f6b;
    letter-spacing: 0.03em;
    position: relative;
}

.related h2::after {
    content: '';
    display: block;
    width: 88px;
    height: 3px;
    margin: 10px auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,0,204,0.1), #B64EBD, rgba(255,0,204,0.1));
}

.grid--related {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card--compact {
    padding: 14px;
    gap: 10px;
}

.card--compact .card__media {
    height: 120px;
    aspect-ratio: auto;
}

.footer {
    padding: 22px 0 26px;
    border-top: 1px solid rgba(255,0,204,0.5);
    background:
        radial-gradient(circle at top center, rgba(255,0,204,0.2), transparent 34%),
        linear-gradient(180deg, #f5dff0, #f0c8e8);
    position: relative;
    z-index: 1;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}

.footer__inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.footer__block {
    display: grid;
    gap: 6px;
}

.footer__title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    margin: 0;
    text-align: center;
    color: var(--text);
}

.footer__text {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.footer__site {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #7a1f6b;
}

.footer__meta {
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    margin: 0;
}

.footer__text a,
.footer__meta a {
    color: #8b2678;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-bar {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 40;
}

.cookie-bar__inner {
    max-width: 980px;
    margin: 0 auto;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255,249,252,0.98), rgba(247,142,226,0.97));
    border: 1px solid rgba(182,78,189,0.5);
    box-shadow: 0 18px 36px rgba(153,0,102,0.24);
    display: grid;
    gap: 10px;
}

.cookie-bar__text,
.cookie-bar__links {
    margin: 0;
    text-align: center;
    color: var(--text);
    font-size: 14px;
}

.cookie-bar__links a {
    color: #8b2678;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-bar__actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.cookie-bar__btn {
    min-width: 120px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid #B64EBD;
    background: linear-gradient(180deg, #fff9fd, #f5b8e8);
    color: #4a1540;
    font-weight: 700;
    cursor: pointer;
}

.cookie-bar__btn--accept {
    background: linear-gradient(180deg, #F78EE2, #FF00CC);
}

.cookie-bar__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(153,0,102,0.16);
}

.empty {
    padding: 30px;
    border: 1px dashed var(--border);
    border-radius: 16px;
    text-align: center;
    color: var(--muted);
}

.empty--not-found {
    max-width: 560px;
    margin: 24px auto;
    padding: 36px 28px;
}

.empty--not-found h1 {
    margin: 0 0 14px;
    font-size: clamp(22px, 3vw, 28px);
    color: var(--text);
    font-weight: 700;
}

.empty--not-found p {
    margin: 0 0 16px;
    line-height: 1.65;
    color: var(--muted);
}

.empty--not-found p:last-of-type {
    margin-bottom: 0;
}

.grid-ad-break {
    grid-column: 1 / -1;
}

.ad-slot {
    width: min(100%, 980px);
    margin: 18px auto;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.ad-slot ins {
    min-height: 90px;
}

.article__content .ad-slot {
    width: 100%;
    margin: 18px 0;
    box-shadow: none;
}

@media (max-width: 700px) {
    .ad-slot {
        padding: 6px;
        border-radius: 12px;
        margin: 14px auto;
    }

    .cookie-bar {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .cookie-bar__inner {
        padding: 12px;
        border-radius: 16px;
    }

    .cookie-bar__btn {
        width: 100%;
    }
}

/* Admin — superfícies claras na paleta rosa do site */
body.admin {
    /* Altura da .admin-topbar (sticky); JS em materias-form.php atualiza ao medir o elemento */
    --admin-topbar-offset: 76px;
    background:
        radial-gradient(circle at 12% 0%, rgba(247, 142, 226, 0.22), transparent 42%),
        radial-gradient(circle at 88% 20%, rgba(255, 0, 204, 0.08), transparent 38%),
        linear-gradient(180deg, #fff9fd 0%, #fceff8 45%, #f5eaf4 100%);
}

body.admin .resizable-media {
    resize: both;
    overflow: auto;
    border: 1px dashed var(--border);
    padding: 4px;
    border-radius: 8px;
    min-width: 120px;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(180deg, rgba(255, 251, 254, 0.98), rgba(252, 238, 249, 0.94));
    border-bottom: 1px solid rgba(255, 0, 204, 0.2);
    box-shadow: 0 6px 20px rgba(153, 0, 102, 0.06);
}

.admin-topbar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    gap: 12px;
    position: relative;
}

.admin-logo {
    font-family: Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-dark);
    text-decoration: none;
}

.admin-nav {
    display: flex;
    gap: 12px;
    margin-left: auto;
    flex-wrap: nowrap;
}

.admin-hamburger {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 0, 204, 0.22);
    background: rgba(255, 245, 252, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-direction: column;
    cursor: pointer;
    margin-left: auto;
    flex-shrink: 0;
}

.admin-hamburger span {
    width: 20px;
    height: 2px;
    background: var(--text);
}

.admin-nav a {
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 245, 252, 0.95);
    border: 1px solid rgba(255, 0, 204, 0.14);
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s ease;
}

.admin-nav a:hover {
    background: rgba(255,0,204,0.22);
    box-shadow: 0 10px 18px rgba(153,0,102,0.14);
    transform: translateY(-1px);
}

.admin-main {
    padding: 10px 0 60px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 20px;
}

.admin-search {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 10px 0 18px;
    flex-wrap: wrap;
}

.admin-search input {
    max-width: 320px;
}

.admin-filters {
    display: flex;
    gap: 10px;
    margin: 0 0 16px;
    flex-wrap: wrap;
}

.admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 20px 0 30px;
}

.admin-card {
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 0, 204, 0.18);
    box-shadow: 0 10px 28px rgba(153, 0, 102, 0.06);
}

.admin-card--metric {
    padding: 12px 14px;
}

.admin-metric-line {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-weight: 600;
}

.admin-metric-line strong {
    font-size: 24px;
    line-height: 1;
    color: #7a1f6b;
}

.admin-grid-2 {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-top: 20px;
}

.admin-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: grid;
    gap: 10px;
}

.admin-list li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border);
}

.admin-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-pill {
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    background: rgba(255,0,204,0.22);
    color: var(--text);
    white-space: nowrap;
}

.admin-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 700px) {
    .admin-actions--dashboard {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .admin-actions--dashboard .btn {
        width: 100%;
        text-align: center;
        padding-left: 8px;
        padding-right: 8px;
    }
}

.admin-form {
    margin: 20px 0 30px;
    display: grid;
    gap: 14px;
}

.admin button[type="button"] {
    background: #fceef9;
    border: 1px solid rgba(255, 0, 204, 0.22);
    color: var(--text);
}

.admin button[type="button"]:hover {
    background: #f5dff0;
    border-color: rgba(182, 78, 189, 0.35);
}

.admin button.modal__close {
    background: linear-gradient(180deg, #fff5fb, #fce7f4);
    color: #7a1f6b;
    border: 1px solid rgba(182, 78, 189, 0.4);
    font-weight: 600;
}

.admin button.modal__close:hover {
    background: #f5dff0;
    border-color: rgba(255, 0, 204, 0.45);
    color: #5c1848;
}

#inlineImagePlaceholder {
    color: var(--muted);
}

.editor-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(255, 0, 204, 0.2);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 251, 254, 0.98), rgba(252, 239, 250, 0.96));
    position: sticky;
    top: var(--admin-topbar-offset, 76px);
    z-index: 9;
    box-shadow: 0 4px 14px rgba(153, 0, 102, 0.08);
}

.editor-toolbar button {
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 0, 204, 0.18);
    background: rgba(255, 245, 252, 0.95);
    color: var(--text);
    cursor: pointer;
}

.editor-toolbar button:hover {
    background: rgba(255,0,204,0.22);
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.icon-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 6px 0 10px;
}

.icon-color {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
}

.icon-color.is-active {
    border-color: #990066;
    box-shadow: 0 0 0 3px rgba(255, 0, 204, 0.28);
}

.icon-color-custom input {
    width: 28px;
    height: 28px;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.icon-grid button {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 0, 204, 0.18);
    background: rgba(255, 245, 252, 0.95);
    text-align: left;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 8px;
    align-items: center;
}

.icon-grid .icon-symbol {
    font-size: 18px;
    line-height: 1;
}

.icon-grid button:hover {
    background: rgba(255,0,204,0.16);
    border-color: rgba(255,0,204,0.36);
}

.editor-color {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    font-size: 14px;
}

.editor-color input {
    width: 36px;
    height: 28px;
    border: none;
    background: transparent;
}

.editor {
    min-height: 260px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 0, 204, 0.2);
    background: #fffbfe;
    color: var(--text);
    font-family: inherit;
    resize: vertical;
    overflow: auto;
}

.source-editor {
    width: 100%;
    min-height: 260px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 0, 204, 0.2);
    background: #fffbfe;
    color: var(--text);
    font-family: inherit;
    resize: vertical;
}

.editor:focus {
    outline: 2px solid rgba(255,0,204,0.45);
}

.editor img {
    max-width: 100%;
    border-radius: 12px;
    margin: 8px 0;
}

.editor a.img-link {
    display: inline-block;
}

.inline-icon {
    display: inline-block;
    font-size: 1em;
    line-height: 1;
    vertical-align: baseline;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 0, 204, 0.22);
    background: #fffbfe;
    color: var(--text);
}

.admin-form .color-square-input {
    width: 52px;
    min-width: 52px;
    height: 40px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid rgba(182, 78, 189, 0.45);
    background: #fce7f4;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.admin-form .color-square-input::-webkit-color-swatch-wrapper {
    padding: 4px;
    border-radius: 9px;
}

.admin-form .color-square-input::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

.admin-form .color-square-input::-moz-color-swatch {
    border: none;
    border-radius: 6px;
}

.admin-form label {
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.char-count {
    font-weight: 400;
    font-size: 12px;
    color: #b44a9c;
    margin-left: 6px;
}

.char-count.is-limit {
    color: #dc2626;
    font-weight: 600;
}

.form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-table table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 26px rgba(153, 0, 102, 0.06);
}

.admin-table thead th {
    background: linear-gradient(180deg, rgba(255, 242, 252, 0.98), rgba(250, 228, 244, 0.94));
    color: #7a1f6b;
    font-weight: 700;
}

.status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
}

.status--published {
    color: #15803d;
    background: rgba(22, 163, 74, 0.15);
    border: 1px solid rgba(22, 163, 74, 0.35);
}

.status--draft {
    color: #8b4a6b;
    background: rgba(255, 0, 204, 0.1);
    border: 1px solid rgba(182, 78, 189, 0.35);
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}

.admin-table .actions {
    display: flex;
    gap: 8px;
}

@media (max-width: 700px) {
    #adsConfigForm .admin-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #adsConfigForm .admin-table table {
        min-width: 760px;
    }

    .admin-table--materias {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table--materias table {
        min-width: 760px;
    }

    .admin-table--usuarios {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table--usuarios table {
        min-width: 760px;
    }
}

.h1-count {
    font-size: 14px;
    font-weight: 600;
    color: #b44a9c;
}

.btn {
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    color: #4a1540;
    font-weight: 700;
    cursor: pointer;
}

.btn-outline {
    background: rgba(255, 251, 254, 0.95);
    border: 1px solid rgba(255, 0, 204, 0.28);
    color: var(--text);
}

.admin-form input[type="checkbox"],
.admin-table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    padding: 0;
    border: none;
    background: transparent;
    accent-color: var(--accent);
}

.btn-upload {
    background: #FF00CC;
    border: 1px solid #B64EBD;
    color: #4a1540;
}

.btn-upload:hover {
    background: #F702E6;
    border-color: #992d7a;
}

.btn-danger {
    background: #dc2626;
    border: 1px solid #b91c1c;
    color: #ffffff;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 13px;
}

.modal #uploadBtn,
.modal #inlineImageInsertBtn {
    background: linear-gradient(120deg, #FF00CC, #B64EBD);
    border: 1px solid #B64EBD;
    color: #4a1540;
}

.modal #uploadBtn:hover,
.modal #inlineImageInsertBtn:hover {
    background: linear-gradient(120deg, #F702E6, #992d7a);
}

.modal #uploadBtn:disabled,
.modal #inlineImageInsertBtn:disabled {
    background: linear-gradient(120deg, #FF00CC, #B64EBD);
    border-color: #B64EBD;
    color: #4a1540;
    opacity: 0.82;
}

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255, 120, 120, 0.12);
    border: 1px solid rgba(255, 120, 120, 0.3);
}

.alert.success {
    background: rgba(100, 255, 200, 0.15);
    border-color: rgba(100, 255, 200, 0.3);
}

.admin .alert {
    background: linear-gradient(135deg, rgba(255, 245, 252, 0.98), rgba(252, 231, 244, 0.95));
    border: 1px solid rgba(182, 78, 189, 0.45);
    color: #861043;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(153, 0, 102, 0.07);
}

/* Sucesso no painel: paleta rosa (verde claro parecia cinza no fundo rosa) */
body.admin .alert.success {
    background: linear-gradient(135deg, #fff8fc 0%, #fce7f4 55%, #f5dff0 100%);
    border: 1px solid rgba(255, 0, 204, 0.38);
    border-left: 4px solid #ff00cc;
    color: #5c1848;
    font-weight: 600;
    box-shadow: 0 8px 22px rgba(153, 0, 102, 0.1);
}

.admin-login {
    display: grid;
    place-items: center;
    min-height: 100vh;
}

.login-card {
    width: min(420px, 92vw);
    padding: 32px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fff8fc 55%, #fceef9 100%);
    border: 1px solid rgba(255, 0, 204, 0.22);
    text-align: center;
    box-shadow: 0 20px 48px rgba(153, 0, 102, 0.12);
}

.login-card h1 {
    font-family: Arial, sans-serif;
    margin: 0 0 6px;
}

.login-card p {
    margin: 0 0 18px;
    color: var(--muted);
}

.login-card form {
    margin-top: 16px;
    display: grid;
    gap: 16px;
    text-align: left;
}

.login-field {
    display: grid;
    gap: 6px;
}

.login-field label {
    font-size: 13px;
    color: var(--muted);
}

.login-field input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 0, 204, 0.22);
    background: #fffbfe;
    color: var(--text);
}

.login-card .btn {
    width: 100%;
    margin-top: 6px;
    background: linear-gradient(120deg, #FF00CC, #B64EBD);
    border: 1px solid #B64EBD;
    color: #4a1540;
}

.login-card .btn:hover {
    background: linear-gradient(120deg, #F702E6, #992d7a);
}

.image-preview {
    min-height: 140px;
    border: 1px dashed rgba(255, 0, 204, 0.35);
    border-radius: 12px;
    display: grid;
    place-items: center;
    margin-bottom: 10px;
    overflow: hidden;
    width: 100%;
    max-width: 320px;
    height: 180px;
    justify-self: start;
    background: rgba(255, 251, 254, 0.95);
}

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

.modal {
    position: fixed;
    inset: 0;
    background: rgba(74, 21, 64, 0.42);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 20;
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal.is-open {
    display: flex;
}

.modal__content {
    width: min(520px, 92vw);
    background: linear-gradient(180deg, rgba(255,249,252,0.98), rgba(253,230,248,0.96));
    border-radius: 18px;
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    margin: auto;
}

.modal__content--wide {
    width: min(900px, 92vw);
    max-height: 80vh;
    overflow: auto;
}

.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.modal__close--round {
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0;
    border-radius: 999px;
    font-size: 22px;
    line-height: 1;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.modal__close {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    padding: 6px 10px;
    cursor: pointer;
}

@media (max-width: 600px) {
    .modal {
        align-items: flex-start;
        padding: 10px;
    }

    .modal__content {
        width: min(520px, 100%);
        max-height: calc(100vh - 20px);
    }

    .modal__content--wide {
        width: 94vw;
        max-height: 78vh;
        border-radius: 14px;
    }

    .modal__close--round {
        width: 34px;
        height: 34px;
        min-width: 34px;
        font-size: 20px;
    }

}

@media (max-width: 900px) {
    .admin-topbar__inner {
        flex-wrap: nowrap;
        gap: 12px;
    }

    .admin-nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: min(260px, 92vw);
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        z-index: 30;
        background: linear-gradient(180deg, rgba(255, 251, 254, 0.99), rgba(252, 238, 249, 0.98));
        border: 1px solid rgba(255, 0, 204, 0.22);
        border-radius: 12px;
        padding: 10px;
        box-shadow: 0 16px 40px rgba(153, 0, 102, 0.12);
    }

    .admin-nav.is-open {
        display: flex;
    }

    .admin-hamburger {
        display: inline-flex;
    }
}

@media (max-width: 600px) {
    .admin-topbar__inner {
        flex-direction: row;
        align-items: center;
    }

    .admin-nav {
        width: 100%;
    }

    .admin-nav a {
        text-align: left;
    }
}

.modal__preview {
    margin: 12px 0;
    padding: 12px;
    border-radius: 12px;
    border: 1px dashed var(--border);
    color: var(--muted);
    min-height: 220px;
    background: #fceef9;
    display: grid;
    place-items: center;
}

.inline-image-form {
    display: grid;
    gap: 12px;
}

.inline-image-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.inline-image-form input,
.inline-image-form select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text);
}

.inline-image-row {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inline-image-preview img {
    max-height: 220px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.inline-image-row--compact {
    grid-template-columns: repeat(2, minmax(180px, 220px));
}

@media (max-width: 600px) {
    .inline-image-row {
        grid-template-columns: 1fr;
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes reveal {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


@media (min-width: 700px) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
    .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
    .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 800px) {
    .menu {
        position: static;
        display: flex !important;
        background: transparent;
        border: none;
        box-shadow: none;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        overflow-y: visible;
        padding-top: 2px;
    }
    .hamburger { display: none; }
}

@media (min-width: 800px) {
    .menu__item {
        white-space: nowrap;
        font-size: 14px;
        box-shadow: inset 0 0 0 1px #B64EBD;
    }
}

@media (min-width: 900px) {
    .topbar__inner {
        padding: 2px max(16px, 3vw) 2px max(16px, 3vw);
    }
}

@media (max-width: 799px) {
    .topbar {
        position: fixed;
        width: 100%;
        left: 0;
        background: transparent;
        transform: none;
    }
}

@media (min-width: 800px) {
    .menu__item + .menu__item {
        border-top: none;
    }
}

@media (max-width: 799px) {
    .menu__item {
        color: var(--text);
        background: transparent;
        box-shadow: none;
    }

    .menu__item:hover {
        color: var(--text);
        background: rgba(255, 0, 204, 0.18);
    }

    .menu__item::after {
        background: #990066;
    }

    .hero {
        margin-top: 18px;
    }

    .hamburger {
        border: 1px solid #B64EBD;
    }
}

@media (max-width: 799px) {
    main.container {
        padding-top: 56px;
    }
}


