:root {
    --primary: #10b981;
    --primary-hover: #059669;
    --bg: #06110d;
    --card-bg: #0c1f18;
    --text: #f0fdf4;
    --text-muted: #94a3b8;
    --success: #34d399;
    --danger: #ef4444;
    --glass: rgba(16, 185, 129, 0.1);
    --border: rgba(255, 255, 255, 0.05);
}

/* CUSTOM PREMIUM SCROLLBARS FOR INTERNAL ELEMENTS */
*:not(html):not(body) {
    scrollbar-width: thin;
    scrollbar-color: rgba(16, 185, 129, 0.25) rgba(6, 17, 13, 0.4);
}

*:not(html):not(body)::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*:not(html):not(body)::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 99px;
}

*:not(html):not(body)::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.25);
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.02);
    transition: background 0.2s ease;
}

*:not(html):not(body)::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 185, 129, 0.5);
}

#app-container:not(.hidden) {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

/* LOGIN SCREEN */
#login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, #064e3b, #06110d);
}

.login-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.brand-login {
    margin-bottom: 1.5rem;
}

.brand-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.02em;
}

.brand-name span {
    color: var(--primary);
}

.login-card h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.form-group {
    text-align: left;
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.3);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background-color: var(--primary);
    color: white;
    border: none !important;
    outline: none !important;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    outline: none;
    gap: 8px;
    font-size: 0.9rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
}

.error-msg {
    color: var(--danger);
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* ANNOUNCEMENT BANNER HERO (BELOW HEADER) */
.announcement-hero-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 16px auto 0;
    padding: 0 20px;
    box-sizing: border-box;
    flex-shrink: 0;
    z-index: 10;
}

.announcement-hero-card {
    position: relative;
    border-radius: 18px;
    background: rgba(12, 31, 24, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.announcement-hero-card:hover {
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

.announcement-hero-slider {
    display: flex;
    width: 100%;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.announcement-hero-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
    padding: 30px 65px;
    box-sizing: border-box;
    position: relative;
}

/* Tipos e Badges de Notificação Centrados */
.announcement-hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.announcement-hero-badge i {
    font-size: 1.15rem;
}

.announcement-hero-text {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text);
    max-width: 820px;
    margin: 0 auto;
    font-weight: 500;
    text-align: center;
}

.announcement-hero-action {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 4px;
}

.announcement-hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.announcement-hero-cta i {
    font-size: 1.15rem;
    transition: transform 0.2s ease;
}

.announcement-hero-cta:hover i {
    transform: translateX(3px);
}

/* Variações de Cores e Gradientes Elegantes */
.announcement-hero-slide.info {
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.14) 0%, rgba(6, 17, 13, 0) 75%);
}
.announcement-hero-slide.info .announcement-hero-badge {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
}
.announcement-hero-slide.info .announcement-hero-cta {
    background: var(--primary);
    color: #06110d;
}
.announcement-hero-slide.info .announcement-hero-cta:hover {
    background: #34d399;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
    transform: translateY(-2px);
}

.announcement-hero-slide.warning {
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.14) 0%, rgba(6, 17, 13, 0) 75%);
}
.announcement-hero-slide.warning .announcement-hero-badge {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
}
.announcement-hero-slide.warning .announcement-hero-cta {
    background: #f59e0b;
    color: #000;
}
.announcement-hero-slide.warning .announcement-hero-cta:hover {
    background: #fbbf24;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
    transform: translateY(-2px);
}

.announcement-hero-slide.alert {
    background: radial-gradient(circle at center, rgba(239, 68, 68, 0.16) 0%, rgba(6, 17, 13, 0) 75%);
}
.announcement-hero-slide.alert .announcement-hero-badge {
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}
.announcement-hero-slide.alert .announcement-hero-cta {
    background: #ef4444;
    color: #fff;
}
.announcement-hero-slide.alert .announcement-hero-cta:hover {
    background: #dc2626;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
    transform: translateY(-2px);
}

.announcement-hero-slide.doc {
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.15) 0%, rgba(6, 17, 13, 0) 75%);
}
.announcement-hero-slide.doc .announcement-hero-badge {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #a5b4fc;
}
.announcement-hero-slide.doc .announcement-hero-cta {
    background: #6366f1;
    color: #fff;
}
.announcement-hero-slide.doc .announcement-hero-cta:hover {
    background: #818cf8;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
    transform: translateY(-2px);
}

/* Controles de Navegação Hero */
.announcement-hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.4rem;
    transition: all 0.25s ease;
    z-index: 5;
}

.announcement-hero-nav.prev {
    left: 14px;
}

.announcement-hero-nav.next {
    right: 14px;
}

.announcement-hero-nav:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: var(--primary);
    transform: translateY(-50%) scale(1.08);
}

/* Botão Fechar */
.announcement-hero-dismiss {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    z-index: 6;
}

.announcement-hero-dismiss:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    transform: scale(1.08);
}

@media (max-width: 768px) {
    .announcement-hero-slide {
        padding: 24px 20px;
        gap: 12px;
    }

    .announcement-hero-text {
        font-size: 0.95rem;
    }

    .announcement-hero-nav {
        width: 34px;
        height: 34px;
        font-size: 1.2rem;
    }

    .announcement-hero-nav.prev {
        left: 8px;
    }

    .announcement-hero-nav.next {
        right: 8px;
    }

    .announcement-hero-dismiss {
        top: 10px;
        right: 10px;
    }
}

/* APP LAYOUT - HEADER */
header {
    width: 100%;
    flex-shrink: 0;
    background: rgba(12, 31, 24, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    padding: 0.75rem 0;
    position: sticky;
    top: 20px;
    z-index: 1000;
    border-radius: 20px;
    margin: 20px auto 0;
    max-width: 1200px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled {
    top: 0;
    max-width: 100%;
    border-radius: 0;
    margin-top: 0;
    border-color: transparent transparent var(--border) transparent;
    background: rgba(12, 31, 24, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand a, .brand-login a {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
}

.brand-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
}

.panel-name {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-docs {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.btn-docs i {
    font-size: 1.1rem;
}

.btn-docs:hover {
    background: var(--glass);
    color: var(--primary);
    border-color: rgba(16, 185, 129, 0.2);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px;
    padding-left: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.user-text {
    text-align: right;
}

#user-display-name {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 2px;
}

.plan-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--glass);
    color: var(--primary);
}

.plan-badge.free {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

.plan-badge.advanced {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

.plan-badge.enterprise {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: #000;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 0.9rem;
}

.btn-logout {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-logout i {
    font-size: 1.3rem;
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-1px);
}

/* DASHBOARD CONTENT */
.dashboard {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    flex: 1 0 auto;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
    border: none;
    background: transparent;
    font-size: 1rem;
    position: relative;
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CARDS */
.card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.card h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

/* USAGE */
.usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.usage-stats {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.progress-bar {
    height: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #34d399);
    transition: width 0.5s ease;
}

.stats-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* UPGRADE */
.upgrade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.upgrade-card.featured {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.05) 0%, var(--card-bg) 100%);
}

.upgrade-card.current {
    border: 2px solid var(--primary);
    position: relative;
    padding-top: 0;
    overflow: hidden;
    /* Garante que a faixa siga o border-radius do card */
}

.current-plan-banner {
    background: var(--primary);
    color: #000;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 10px 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-left: -24px;
    /* Compensa o padding do .card */
    margin-right: -24px;
    width: calc(100% + 48px);
    margin-bottom: 24px;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

.upgrade-card h2.plan-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-weight: 500;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 16px;
}

.plan-price .currency {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-muted);
}

.plan-price .amount {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

.plan-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 24px;
    min-height: 3rem;
}

.plan-features {
    list-style: none;
    padding: 0;
}

.plan-features li {
    font-size: 0.85rem;
    color: var(--text);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-features li::before {
    content: '\eb7a';
    font-family: 'boxicons';
    color: var(--primary);
    font-size: 1.1rem;
}

.upgrade-footer {
    margin-top: 40px;
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    border: 1px solid var(--border);
}

/* GUIDE TAB */
.guide-container {
    max-width: 900px;
    margin: 0 auto;
}

.guide-step {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
    position: relative;
}

.guide-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 20px;
    top: 45px;
    bottom: -25px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), transparent);
    opacity: 0.3;
}

.step-number {
    width: 42px;
    height: 42px;
    background: var(--glass);
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    z-index: 2;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 1.2rem;
    color: white;
    margin-bottom: 12px;
    text-transform: none;
    letter-spacing: normal;
}

.ai-prompt-box {
    background: rgba(16, 185, 129, 0.05);
    border: 1px dashed var(--primary);
    border-radius: 16px;
    padding: 24px;
    margin-top: 32px;
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.ai-header i {
    font-size: 1.5rem;
    color: var(--primary);
}

.ai-header h4 {
    margin: 0;
    color: var(--primary);
    font-size: 1rem;
}

.prompt-text {
    background: rgba(0, 0, 0, 0.3);
    padding: 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
    border: 1px solid var(--border);
    position: relative;
}

.code-block {
    background: #000;
    padding: 16px;
    border-radius: 12px;
    font-family: monospace;
    font-size: 0.85rem;
    margin: 12px 0;
    border: 1px solid var(--border);
    overflow-x: auto;
    color: #34d399;
}

.guide-tip {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid #f59e0b;
    padding: 12px 16px;
    border-radius: 4px 12px 12px 4px;
    margin: 16px 0;
    font-size: 0.9rem;
}

.guide-tip strong {
    color: #fbbf24;
}

/* PERMISSIONS TAB */
#tab-permissions .card {
    padding: 0;
    background: none;
    border: none;
}

.perm-group {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 1.5rem;
}

.perm-group h4 {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.perm-group h4::before {
    content: '';
    display: block;
    width: 4px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
}

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

.perm-tag {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-size: 0.9rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .value {
    font-weight: 700;
    color: var(--primary);
}

/* GLOSSARY & ACCORDIONS */
.glossary-container {
    max-width: 800px;
    margin: 0 auto;
}

.glossary-card h2 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.glossary-intro {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.accordion-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item:hover {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.03);
}

.accordion-header {
    width: 100%;
    padding: 16px 20px;
    background: none;
    border: none;
    color: var(--text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
}

.accordion-header i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    color: var(--primary);
}

.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
}

/* FOOTER */
.app-footer {
    width: 100%;
    flex-shrink: 0;
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-links a i {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
    line-height: 1.6;
}

.accordion-item.active .accordion-content {
    max-height: 800px;
    padding-bottom: 20px;
}

.accordion-content ul,
.accordion-content ol {
    margin: 1rem 0 1rem 1.5rem;
}

.code-example {
    background: #000;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 1rem;
    border-left: 4px solid var(--primary);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: #fff;
    word-break: break-all;
}

.steps code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--primary);
}

/* SECURITY TAB */
.security-container {
    max-width: 800px;
    margin: 0 auto;
}

.security-card h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.security-intro {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.warning-box {
    display: flex;
    gap: 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 2.5rem;
    color: #fca5a5;
    line-height: 1.5;
}

.warning-box i {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.rotation-section h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.rotation-reasons {
    margin-top: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.rotation-reasons h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.rotation-reasons ul {
    list-style: none;
}

.rotation-reasons li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.rotation-reasons li i {
    color: var(--primary);
}

#rotation-action-box {
    margin-top: 2rem;
    text-align: center;
}

.btn-rotate {
    width: auto;
    padding: 16px 32px;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

#new-password-box {
    margin-top: 2rem;
    padding: 24px;
    background: rgba(16, 185, 129, 0.05);
    border: 1px dashed var(--primary);
    border-radius: 16px;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--success);
    font-weight: 700;
    margin-bottom: 20px;
    justify-content: center;
}

.password-display {
    text-align: center;
    margin-bottom: 20px;
}

.password-display label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.password-box {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: #000;
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.password-box code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.05em;
}

.btn-copy {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.btn-copy:hover {
    color: white;
}

.important-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}

.important-note strong {
    color: var(--danger);
}

/* CODE BLOCKS */
.code-block {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
    position: relative;
    border: 1px solid var(--border);
}

.code-block pre {
    margin: 0;
    overflow-x: auto;
    padding-right: 40px;
}

.code-block code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    color: #e2e8f0;
    line-height: 1.5;
}

.btn-copy-small {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-copy-small:hover {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

/* UPTIME HISTORY BAR */
.uptime-container {
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border);
}

.uptime-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.uptime-bar {
    display: flex;
    gap: 3px;
    height: 18px;
    align-items: flex-end;
}

.uptime-tick {
    flex: 1;
    height: 100%;
    background: var(--success);
    border-radius: 2px;
    opacity: 0.8;
    transition: all 0.2s;
    cursor: help;
}

.uptime-tick:hover {
    opacity: 1;
    transform: scaleY(1.1);
}

.uptime-tick.down {
    background: var(--danger);
}

.uptime-tick.pending {
    background: var(--text-muted);
    opacity: 0.3;
}

.uptime-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.65rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* FIREBIRD SPECIAL CARD */
.card-fb {
    background: linear-gradient(135deg, var(--card-bg) 0%, #0d2a20 100%);
    border-color: rgba(16, 185, 129, 0.2);
    position: relative;
    overflow: hidden;
}

.card-fb::before {
    content: '\eb3d';
    /* bx-data icon */
    font-family: 'boxicons';
    position: absolute;
    right: -10px;
    bottom: -10px;
    font-size: 6rem;
    opacity: 0.03;
    transform: rotate(-15deg);
}

.card-fb .status-badge-mini {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.card-fb h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
}

.card-fb h3 i {
    font-size: 1.1rem;
}

/* STATUS BADGE REPOSITIONING */
.status-badge-mini {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 14px !important;
    font-size: 0.75rem !important;
    z-index: 5;
}

/* Adjust card padding to accommodate absolute badge */
.card {
    position: relative;
}

/* FIREBIRD LATENCY ENHANCEMENT */
.latency-fb {
    text-align: left;
    width: 100%;
    margin-top: 10px;
}

.latency-value {
    font-size: 1.1rem !important;
    font-weight: 700;
    color: var(--text) !important;
    opacity: 1 !important;
    display: block;
    margin-bottom: 4px;
}

.latency-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* NOTIFICATIONS AND DRAWER SYSTEM */
.btn-notifications {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.2s;
    border: 1px solid transparent;
    position: relative;
    outline: none;
}

.btn-notifications:hover {
    background: var(--glass);
    color: var(--primary);
    border-color: rgba(16, 185, 129, 0.2);
}

.notifications-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--card-bg);
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.notifications-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    background: rgba(12, 31, 24, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.notifications-drawer.open {
    right: 0;
}

.drawer-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: none;
    letter-spacing: normal;
}

.drawer-header h3 i {
    color: var(--primary);
    font-size: 1.4rem;
}

.btn-close-drawer {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.2s;
}

.btn-close-drawer:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.drawer-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
}

.drawer-tab-btn {
    flex: 1;
    padding: 14px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: center;
    position: relative;
    transition: color 0.2s;
}

.drawer-tab-btn.active {
    color: var(--primary);
}

.drawer-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 12px;
    transition: all 0.2s;
    position: relative;
}

.notification-item:hover {
    border-color: rgba(16, 185, 129, 0.15);
    background: rgba(12, 31, 24, 0.6);
}

.notification-item.unread {
    border-left: 3px solid var(--primary);
}

.notification-icon {
    font-size: 1.3rem;
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
}

.notification-item.info .notification-icon { color: #34d399; }
.notification-item.warning .notification-icon { color: #fbbf24; }
.notification-item.alert .notification-icon { color: #f87171; }
.notification-item.doc .notification-icon { color: #a5b4fc; }

.notification-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.notification-text {
    font-size: 0.88rem;
    line-height: 1.4;
    color: var(--text);
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notification-link {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    align-self: flex-start;
    border-bottom: 1px dashed currentColor;
    transition: color 0.2s;
    margin-top: 4px;
}

.notification-link:hover {
    color: var(--primary-hover);
}

.notification-actions {
    display: flex;
    align-items: flex-start;
}

.btn-mark-read {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    transition: all 0.2s;
    opacity: 0.7;
}

.btn-mark-read:hover {
    background: rgba(16, 185, 129, 0.1);
    opacity: 1;
    transform: scale(1.05);
}

.empty-notifications {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    gap: 12px;
}

.empty-notifications i {
    font-size: 3rem;
    opacity: 0.3;
}

.empty-notifications p {
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .notifications-drawer {
        width: 100vw;
        right: -100vw;
    }
}

/* ==========================================================================
   GUIA DE INTEGRAÇÃO - SUBABAS LATERAIS & CARDS DE PDF
   ========================================================================== */

.guide-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.guide-sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.guide-subtab-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    outline: none;
}

.guide-subtab-btn i {
    font-size: 1.35rem;
    transition: transform 0.2s ease;
}

.guide-subtab-btn:hover {
    background: rgba(16, 185, 129, 0.08);
    color: var(--text);
    border-color: rgba(16, 185, 129, 0.2);
    transform: translateX(3px);
}

.guide-subtab-btn:hover i {
    transform: scale(1.1);
    color: var(--primary);
}

.guide-subtab-btn.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary);
    border-color: rgba(16, 185, 129, 0.4);
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.12);
}

.guide-subtab-btn.active i {
    color: var(--primary);
}

.guide-badge-count {
    margin-left: auto;
    background: rgba(16, 185, 129, 0.2);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.guide-content-area {
    flex: 1;
    min-width: 0;
}

.guide-subtab-pane {
    display: none;
}

.guide-subtab-pane.active {
    display: block;
    animation: fadeInGuide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Category Filter Pills */
.category-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.category-pill:hover {
    background: rgba(16, 185, 129, 0.1);
    color: var(--text);
    border-color: rgba(16, 185, 129, 0.25);
}

.category-pill.active {
    background: var(--primary);
    color: #06110d;
    border-color: var(--primary);
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

/* PDF Guides Grid */
.pdf-guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.pdf-guide-card {
    background: rgba(6, 17, 13, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pdf-guide-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), rgba(16, 185, 129, 0.2));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pdf-guide-card:hover {
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(16, 185, 129, 0.12);
}

.pdf-guide-card:hover::before {
    opacity: 1;
}

.pdf-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.pdf-card-code {
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    font-family: monospace;
    letter-spacing: 0.5px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.pdf-card-category {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.pdf-card-body h4 {
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 8px 0;
}

.pdf-card-body p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pdf-card-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-view-pdf {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--primary);
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-view-pdf:hover {
    background: var(--primary);
    color: #06110d;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-download-pdf {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.15rem;
}

.btn-download-pdf:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--primary);
    transform: scale(1.05);
}

@media (max-width: 868px) {
    .guide-layout {
        flex-direction: column;
    }

    .guide-sidebar {
        width: 100%;
        position: static;
        flex-direction: row;
        overflow-x: auto;
        padding: 8px;
        gap: 8px;
    }

    .guide-subtab-btn {
        width: auto;
        white-space: nowrap;
        padding: 10px 14px;
    }
}