:root {
    --app-bg: #f5f5f7;
    --surface: #ffffff;
    --surface-border: #e5e7eb;
    --text-strong: #111827;
    --text-muted: #4b5563;
    --text-soft: #6b7280;
    --text-subtle: #374151;
}

body {
    background-color: var(--app-bg);
    color: var(--text-strong);
}

.bg-neutral-950,
.bg-neutral-900 {
    background-color: var(--app-bg) !important;
    color: var(--text-strong) !important;
}

.bg-neutral-900\/40,
.bg-black\/40,
.bg-black\/60,
.bg-black\/50,
.bg-neutral-900\/60,
.bg-neutral-900\/30,
.bg-neutral-900\/20 {
    background-color: var(--surface) !important;
    color: var(--text-strong) !important;
}

.border-neutral-800,
.border-neutral-800\/80,
.border-neutral-800\/60,
.border-neutral-800\/40,
.border-neutral-900,
.border-neutral-900\/40 {
    border-color: var(--surface-border) !important;
}

.text-neutral-400 { color: var(--text-muted) !important; }
.text-neutral-300 { color: var(--text-soft) !important; }
.text-neutral-200 { color: var(--text-subtle) !important; }
.text-neutral-100 { color: var(--text-strong) !important; }

.bg-black,
.bg-neutral-900\/90,
.bg-neutral-900\/80 {
    background-color: var(--surface) !important;
    color: var(--text-strong) !important;
}

.card-surface,
.apple-card,
.rounded-3xl.border-neutral-800.bg-neutral-900\/40,
.rounded-3xl.border-neutral-800.bg-neutral-900\/60,
.rounded-3xl.border-neutral-800.bg-neutral-900\/30 {
    background-color: var(--surface) !important;
    border-color: var(--surface-border) !important;
    border-radius: 28px !important;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.alert-success {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.alert-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

a:hover {
    transition: color 0.2s ease, border-color 0.2s ease;
}

.rich-content ul,
.rich-content ol {
    margin: 1.25rem 0 1.25rem 1.5rem;
    padding-left: 0;
}

.rich-content ul {
    list-style: disc outside;
}

.rich-content ol {
    list-style: decimal outside;
}

.rich-content li + li {
    margin-top: 0.5rem;
}

.rich-content p,
.rich-content blockquote {
    font-size: 18px;
    line-height: 1.75;
}

.rich-content blockquote {
    border-left: 4px solid var(--surface-border, rgba(148, 163, 184, 0.4));
    margin: 1.5rem 0;
    padding-left: 1.25rem;
    color: var(--text-muted, inherit);
    font-style: italic;
    background: transparent;
    border-radius: 0;
}
.rich-content blockquote.study-answer {
    border-left-color: var(--surface-border, rgba(148, 163, 184, 0.4));
    background: transparent;
    font-style: italic;
    color: var(--text-muted, inherit);
    padding-left: 1.25rem;
    border-radius: 0;
    position: relative;
}
.rich-content blockquote.study-answer::before {
    content: 'Resposta: ';
    font-weight: 400;
    font-style: normal;
    color: #0f172a;
    margin-right: 0.35rem;
}
.rich-content blockquote.study-answer p {
    margin: 0;
    display: inline;
}

.rich-content .rich-block {
    margin: 3rem 0;
    padding: 0;
}

.rich-content .rich-block__inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.rich-content .rich-block--columns-2 .rich-block__inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.rich-content .rich-block__item {
    background: rgba(226, 232, 240, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.rich-content .rich-block__content {
    color: inherit;
}

.rich-content .rich-block__content[data-empty="true"]::before {
    content: 'Clique duas vezes para editar este bloco';
    display: block;
    padding: 20px;
    border-radius: 16px;
    border: 1px dashed rgba(148, 163, 184, 0.6);
    text-align: center;
    color: rgba(100, 116, 139, 0.9);
    font-size: 14px;
}

.rich-content .rich-block--theme-neutral {
    color: #0f172a;
}

.rich-content .rich-block--theme-neutral .rich-block__item {
    background: rgba(226, 232, 240, 0.85);
    border-color: rgba(148, 163, 184, 0.4);
}

.rich-content .rich-block--theme-white {
    color: #0f172a;
}

.rich-content .rich-block--theme-white .rich-block__item {
    background: #ffffff;
    border-color: rgba(209, 213, 219, 0.8);
}

.rich-content .rich-block--theme-dark {
    color: #f8fafc;
}

.rich-content .rich-block--theme-dark .rich-block__item {
    background: rgba(30, 41, 59, 0.88);
    border-color: rgba(51, 65, 85, 0.65);
    color: #f8fafc;
}

.rich-content .rich-block--theme-dark .rich-block__item a {
    color: #38bdf8;
}

.rich-content .rich-block--theme-dark a {
    color: #38bdf8;
}

.rich-content::after {
    content: '';
    display: block;
    clear: both;
}

.rich-content .rich-image {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin: 1.5rem auto;
    text-align: center;
    border-radius: 16px;
    overflow: hidden;
}

.rich-content .rich-image img,
.rich-content .rich-image a {
    max-width: 100%;
    height: auto;
    display: inline-block;
    border: none;
    border-radius: 16px;
}
.rich-content .rich-image img[data-variant="thumb-60"] { max-width: 60px; width: 60px; height: auto; }
.rich-content .rich-image img[data-variant="thumb-150"] { max-width: 150px; width: 150px; height: auto; }
.rich-content .rich-image img[data-variant="thumb-320"] { max-width: 320px; width: 320px; height: auto; }
.rich-content .rich-image img[data-variant="thumb-hd"] { max-width: 100%; height: auto; }

.rich-content img,
.rich-content figure img,
.rich-content iframe,
.rich-content video,
.rich-content .rich-embed,
.rich-content .rich-embed iframe {
    border-radius: 16px;
    overflow: hidden;
}

.rich-content img {
    max-width: 100%;
    height: auto;
    display: block;
}

.rich-content iframe,
.rich-content video,
.rich-content .rich-embed {
    width: 100%;
}

.rich-content .rich-embed {
    position: relative;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    display: block;
    overflow: hidden;
    border-radius: 16px;
    background: transparent;
}

.rich-content .rich-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.rich-content .rich-image--left {
    float: left;
    display: inline-block;
    margin: 0.75rem 1.5rem 0.75rem 0;
    text-align: left;
}

.rich-content .rich-image--right {
    float: right;
    display: inline-block;
    margin: 0.75rem 0 0.75rem 1.5rem;
    text-align: right;
}

.rich-content .rich-image--center {
    float: none;
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    clear: both;
}

.rich-content img.alignleft,
.rich-content img[align="left"],
.rich-content img[style*="float:left"],
.rich-content img[style*="float: left"],
.rich-content img.align-left,
.rich-content img.alignLeft,
.rich-content figure.alignleft,
.rich-content figure[style*="float:left"],
.rich-content figure[style*="float: left"],
.rich-content figure.align-left,
.rich-content figure.image-left,
.rich-content .alignleft,
.rich-content .alignleft img {
    float: left;
    margin: 12px 20px 12px 0 !important;
    display: block;
}

.rich-content img.alignright,
.rich-content img[align="right"],
.rich-content img[style*="float:right"],
.rich-content img[style*="float: right"],
.rich-content img.align-right,
.rich-content img.alignRight,
.rich-content figure.alignright,
.rich-content figure[style*="float:right"],
.rich-content figure[style*="float: right"],
.rich-content figure.align-right,
.rich-content figure.image-right,
.rich-content .alignright,
.rich-content .alignright img {
    float: right;
    margin: 12px 0 12px 20px !important;
    display: block;
}

.rich-content .rich-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    border-radius: 9999px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.rich-content .rich-button:not([class*="rich-button--"]) {
    background: #1e2535;
    color: #f8fafc;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.22);
}

.rich-content .rich-button:not([class*="rich-button--"]):hover {
    background: #242d40;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 22px 36px rgba(15, 23, 42, 0.25);
}

.rich-content .rich-button:not([class*="rich-button--"]):active {
    transform: translateY(0);
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.22);
}

.rich-content .rich-button--dark {
    background: #1e2535;
    color: #f8fafc;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.22);
}

.rich-content .rich-button--dark:hover {
    background: #242d40;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 22px 36px rgba(15, 23, 42, 0.25);
}

.rich-content .rich-button--dark:active {
    transform: translateY(0);
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.22);
}

.rich-content .rich-button--light {
    background: #ffffff;
    color: #0f172a;
    border-color: rgba(58, 64, 84, 0.85);
    box-shadow: none;
}

.rich-content .rich-button--light:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: rgba(47, 53, 72, 0.92);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.rich-content .rich-button--light:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.rich-content .rich-block--theme-dark .rich-button:not([class*="rich-button--"]) {
    background: #f8fafc;
    color: #0f172a;
}

.rich-content .rich-block--theme-dark .rich-button:not([class*="rich-button--"]):hover {
    background: #e2e8f0;
    color: #0f172a;
}

.rich-content .rich-block--theme-dark .rich-button--light {
    background: rgba(17, 24, 39, 0.4);
    color: #f8fafc;
    border-color: rgba(58, 64, 84, 0.85);
}

.rich-content .rich-block--theme-dark .rich-button--light:hover {
    background: rgba(30, 41, 59, 0.6);
    color: #f8fafc;
    border-color: rgba(47, 53, 72, 0.92);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.25);
}

.rich-content .rich-block--theme-white .rich-button--dark {
    background: #1e2535;
    color: #f8fafc;
}

.rich-content .rich-block--theme-white .rich-button--light {
    background: #ffffff;
    color: #0f172a;
    border-color: rgba(58, 64, 84, 0.85);
}

.rich-content .rich-image--left:not([data-variant="custom"]),
.rich-content .rich-image--right:not([data-variant="custom"]) {
    max-width: 60%;
}

.rich-content .rich-image[data-variant="custom"] {
    max-width: none;
}

.rich-content a {
    color: var(--link-color, #2563eb);
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

.rich-content p + p {
    margin-top: 1.5rem;
}

.rich-content blockquote p + p {
    margin-top: 0;
}

.rich-content h1,
.rich-content h2,
.rich-content h3 {
    font-weight: 700;
    letter-spacing: -1px;
    line-height: inherit;
}

.rich-content h1 { font-size: 34px; }
.rich-content h2 { font-size: 26px; }
.rich-content h3 { font-size: 20px; }


.rich-content img[data-variant="thumb-60"] { max-width: 60px; width: 60px; height: auto; }
.rich-content img[data-variant="thumb-150"] { max-width: 150px; width: 150px; height: auto; }
.rich-content img[data-variant="thumb-320"] { max-width: 320px; width: 320px; height: auto; }
.rich-content img[data-variant="thumb-hd"] { max-width: 100%; height: auto; }

.site-form__label,
.site-form__help {
    color: #525252;
}

.rich-block--theme-dark .site-form__label,
.rich-block--theme-dark .site-form__help {
    color: #ffffff;
}

.rich-block--theme-dark .site-form input[type="text"],
.rich-block--theme-dark .site-form input[type="email"],
.rich-block--theme-dark .site-form select,
.rich-block--theme-dark .site-form textarea {
    color: #f4f6fa;
    background-color: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.28);
}

.rich-block--theme-dark .site-form input::placeholder,
.rich-block--theme-dark .site-form textarea::placeholder,
.rich-block--theme-dark .site-form select {
    color: rgba(244,246,250,0.75);
}

.rich-block--theme-dark .site-form .site-form__option {
    color: #f4f6fa;
}

.rich-block--theme-dark .site-form input[type="checkbox"],
.rich-block--theme-dark .site-form input[type="radio"] {
    border-color: rgba(255,255,255,0.7);
    background-color: rgba(255,255,255,0.14);
}

/* Evita mudar cor de fundo em autofill */
.site-form input:-webkit-autofill,
.site-form input:-webkit-autofill:hover,
.site-form input:-webkit-autofill:focus,
.site-form textarea:-webkit-autofill,
.site-form textarea:-webkit-autofill:hover,
.site-form textarea:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px transparent inset;
    box-shadow: 0 0 0 1000px transparent inset;
    transition: background-color 9999s ease-in-out 0s;
}

/* Tema claro: inputs mais suaves */
.site-form input[type="text"],
.site-form input[type="email"],
.site-form textarea {
    background-color: #fdfdfd;
}

.site-form button[type="submit"] {
    border: 1px solid #dddddd;
}

.rich-block--theme-dark .site-form input:-webkit-autofill,
.rich-block--theme-dark .site-form input:-webkit-autofill:hover,
.rich-block--theme-dark .site-form input:-webkit-autofill:focus,
.rich-block--theme-dark .site-form textarea:-webkit-autofill,
.rich-block--theme-dark .site-form textarea:-webkit-autofill:hover,
.rich-block--theme-dark .site-form textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: #f4f6fa !important;
    color: #f4f6fa !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(255,255,255,0.12) inset;
    box-shadow: 0 0 0 1000px rgba(255,255,255,0.12) inset;
}
.message-hero {
    padding: 56px 0 120px;
    background: #f5f5f5;
}
.message-hero--image {
    background: #f5f5f5;
}
.message-hero--video {
    background: #050505;
    color: #fff;
}
.message-hero__inner {
    position: relative;
    z-index: 2;
}
.message-hero__media {
    margin-bottom: 32px;
    border-radius: 32px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #000;
}
.message-hero--video .message-hero__media {
    border-color: rgba(255, 255, 255, 0.18);
}
.message-hero__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.message-hero__meta {
    color: #64748b;
}
.message-hero__meta--light {
    color: rgba(255, 255, 255, 0.75);
}
.message-hero__icon {
    color: #94a3b8;
}
.message-hero__icon--light {
    color: rgba(255, 255, 255, 0.85);
}
.message-body {
    position: relative;
    z-index: 3;
}
.message-body--image,
.message-body--video {
    margin-top: -86px;
}
@media (max-width: 768px) {
    .message-body--image,
    .message-body--video {
        margin-top: -60px;
    }
}
.message-author-card {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    background: #fdfdfd;
}
@media (min-width: 768px) {
    .message-author-card {
        flex-direction: row;
        align-items: stretch;
    }
}
.message-author-card__section {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.message-author-card__section--speaker {
    border-right: 1px solid #e2e8f0;
    padding-right: 1.5rem;
}
@media (max-width: 767px) {
    .message-author-card__section--speaker {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid #e2e8f0;
        padding-bottom: 1.25rem;
    }
}
.message-author-card__section--study {
    padding-left: 0;
    justify-content: center;
}
@media (min-width: 768px) {
    .message-author-card__section--study {
        padding-left: 1.5rem;
        justify-content: center;
        align-items: flex-start;
    }
}
.message-author-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.message-author-card__speaker {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.message-author-card__photo {
    width: 80px;
    height: 80px;
    border-radius: 999px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}
.message-author-card__avatar {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
}
.message-author-card__section-label {
    font-size: 0.85rem;
    color: #475569;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
}
.message-author-card__name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #0f172a;
    margin-top: 0.2rem;
}
.message-author-card__bio {
    font-size: 0.9rem;
    color: #475569;
    margin-top: 0.3rem;
}
.message-author-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 1.2rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #0f172a;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.message-author-card__button--primary {
    background: #ffffff;
    color: #0f172a;
}
.message-author-card__button--primary:hover {
    background: #0f172a;
    color: #ffffff;
    transform: translateY(-1px);
}
.message-author-card__note {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    color: #0f172a;
    font-weight: 500;
    margin-left: 0.5rem;
}
.series-block {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    background: #fefefe;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}
.series-block__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.series-block__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
}
.series-block__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.series-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    overflow: hidden;
    background: #fff;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.series-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}
.series-card__cover {
    width: 100%;
    height: 140px;
    object-fit: cover;
}
.series-card__cover--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a, #3b82f6);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
}
.series-card__body {
    padding: 0.85rem 1rem 1.1rem;
}
.series-card__name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.series-card__meta {
    font-size: 0.9rem;
    color: #94a3b8;
}
.series-card__meta-part {
    font-weight: 400;
    color: inherit;
    letter-spacing: normal;
    text-transform: none;
    margin-right: 0.1rem;
}
.audio-block {
    margin-top: 48px;
    margin-bottom: 35px;
}
.audio-block__title {
    margin-top: 40px;
}
.audio-spotify-embed {
    height: 152px !important;
}
.message-hero__title {
    line-height: 1.1;
}
@media (min-width: 768px) {
    .message-hero__title {
        font-size: 42px !important;
    }
}
.site-logo-image {
    width: 200px;
    height: 60px;
    object-fit: contain;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    background: #f7f8fb;
}
.app-sidebar {
    width: 280px;
    background: #e8eaf1;
    color: #333333;
    padding: 24px 16px 32px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: width 0.25s ease;
    z-index: 20;
}
.app-sidebar[data-collapsed="true"] {
    width: 92px;
}
.app-main {
    flex: 1;
    min-height: 100vh;
    background: #f7f8fb;
    display: flex;
    flex-direction: column;
}
.sidebar-toggle {
    position: absolute;
    top: 14px;
    right: -14px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 3px solid #f8fafc;
    background: #ffffff;
    color: #4a4a4a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.2);
}
.app-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #333333;
    font-weight: 600;
    margin-bottom: 20px;
}
.app-sidebar__brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.app-sidebar__brand-text span:last-child {
    font-size: 0.85rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #333333;
}
.site-brand__logos {
    display: flex;
    align-items: center;
}
.site-brand__logo {
    display: flex;
    align-items: center;
    justify-content: center;
}
.site-brand__logo--master {
    display: none;
}
.app-sidebar[data-collapsed="true"] .site-brand__logo--city {
    display: none;
}
.app-sidebar[data-collapsed="true"] .site-brand__logo--master {
    display: flex;
}
.app-sidebar__menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.app-sidebar__item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 14px;
    text-decoration: none;
    color: #333333;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease, color 0.2s ease;
    position: relative;
}
.app-sidebar__item:hover,
.app-sidebar__sublink:hover {
    background: rgba(51, 51, 51, 0.08);
    color: #333333;
}
.app-sidebar__item.is-active,
.app-sidebar__sublink.is-active {
    background: rgba(51, 51, 51, 0.12);
    color: #333333;
}
.app-sidebar__icon {
    width: 28px;
    text-align: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.app-sidebar__text {
    flex: 1;
    font-weight: 500;
}
.app-sidebar__chevron {
    font-size: 0.75rem;
    opacity: 0.65;
    transition: transform 0.2s ease;
}
.app-sidebar__section {
    position: relative;
}
.app-sidebar__section[data-open="true"] .app-sidebar__chevron {
    transform: rotate(90deg);
}
.app-sidebar__submenu {
    margin-left: 46px;
    padding-left: 10px;
    border-left: 1px solid rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}
.app-sidebar__section[data-open="false"] .app-sidebar__submenu {
    display: none;
}
.app-sidebar__sublink {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    color: #333333;
    text-decoration: none;
    font-size: 0.92rem;
}
.app-sidebar__footer {
    margin-top: 24px;
}
.app-sidebar[data-collapsed="true"] .app-sidebar__section {
    position: relative;
}
.app-sidebar[data-collapsed="true"] .app-sidebar__text,
.app-sidebar[data-collapsed="true"] .app-sidebar__chevron,
.app-sidebar[data-collapsed="true"] .app-sidebar__brand-text {
    opacity: 0;
    pointer-events: none;
}
.app-sidebar[data-collapsed="true"] .app-sidebar__submenu {
    display: none;
}
.app-sidebar .app-sidebar__section.submenu-hover > .app-sidebar__submenu {
    position: absolute;
    left: calc(100% - 18px);
    top: 0;
    background: #ffffff;
    color: #333333;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    min-width: 220px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    z-index: 99;
}
.app-sidebar .app-sidebar__section.submenu-hover > .app-sidebar__submenu::before {
    content: '';
    position: absolute;
    left: -32px;
    top: -12px;
    width: 32px;
    height: calc(100% + 24px);
}
.app-sidebar .app-sidebar__section.submenu-hover > .app-sidebar__submenu .app-sidebar__sublink {
    color: #333333;
}
.app-sidebar .app-sidebar__section.submenu-hover > .app-sidebar__submenu .app-sidebar__sublink.is-active {
    background: rgba(51, 51, 51, 0.08);
}
.app-main header {
    background: #fff;
}

.settings-tabs {
    display: inline-flex;
    gap: 0.25rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0;
    justify-content: flex-start;
}
.settings-tab {
    border: 1px solid transparent;
    border-bottom: none;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
    background: transparent;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.55rem 1.5rem;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.settings-tab[data-active="true"] {
    background: #ffffff;
    color: #0f172a;
    border-color: #e2e8f0;
    border-bottom: 1px solid #ffffff;
}
.settings-tab[data-active="false"]:hover {
    color: #0f172a;
}

.study-detail {
    padding-top: 2rem;
    padding-bottom: 5rem;
}
.study-detail__section {
    margin-top: 2.5rem;
}
.study-detail__section:first-of-type {
    margin-top: 0;
}
.study-detail__section-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.75rem;
}
.study-detail__card {
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}
.py-20 {
    padding-top: 2.5rem !important;
    padding-bottom: 5rem !important;
}

/* Recurrence modal (event) */
.recurrence-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}
.recurrence-modal {
    width: min(720px, 95vw);
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}
.recurrence-modal h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}
.recurrence-modal label {
    color: #475569;
}
.recurrence-day-chip {
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    border: 1px solid #d1d5db;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    background: #f8fafc;
    color: #475569;
}
.recurrence-day-chip.is-active {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
    font-weight: 600;
}
.recurrence-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}
.recurrence-footer button {
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
}
.recurrence-footer .btn-secondary {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #0f172a;
}
.recurrence-footer .btn-primary {
    background: #0f172a;
    color: #ffffff;
}
