@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Inter:wght@300;400;500;600&display=swap');

    :root {
        --primary: #ff7733;
        --primary-light: #ffefe6;
        --primary-dark: #e66019;
        --secondary: #2d3436;
        --accent: #00cec9;
        --bg-light: #fdfdfd;
        --bg-alt: #f1f3f5;
        --text-main: #2d3436;
        --text-muted: #636e72;
        --white: #ffffff;
        --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
        --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.04);
        --radius: 12px;
        --radius-sm: 8px;
        --max-width: 1200px;
    }

    /* reset * disabled for Django layout */

    /* body reset disabled */

    h1,
    h2,
    h3,
    .logo {
        font-family: 'Outfit', sans-serif;
        font-weight: 700;
    }

    a {
        transition: all 0.3s ease;
    }

    .limite {
        max-width: var(--max-width);
        width: 90%;
        margin: 0 auto;
    }

    /* TOP BAR */
    .top-bar {
        background: var(--primary-light);
        color: var(--primary);
        padding: 6px 0;
        font-size: 0.85rem;
    }

    .top-bar .limite {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* HEADER */
    .header {
        padding: 14px 0;
        background: var(--white);
        box-shadow: var(--shadow-sm);
        position: sticky;
        top: 0;
        z-index: 100;
    }

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

    .logo {
        font-size: 1.5rem;
        color: var(--secondary);
        display: flex;
        align-items: center;
        gap: 8px;
        text-decoration: none;
    }

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

    /* HERO SECTION */
    .legal-hero {
        background: linear-gradient(135deg, var(--secondary) 0%, #1a1f24 100%);
        padding: 60px 0 50px;
        position: relative;
        overflow: hidden;
    }

    .legal-hero::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -10%;
        width: 500px;
        height: 500px;
        background: radial-gradient(circle, rgba(255, 119, 51, 0.15) 0%, transparent 70%);
        pointer-events: none;
    }

    .legal-hero h1 {
        color: var(--white);
        font-size: 2.4rem;
        margin-bottom: 12px;
    }

    .legal-hero p {
        color: rgba(255, 255, 255, 0.6);
        font-size: 1rem;
        max-width: 600px;
    }

    .legal-hero .badge-date {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: rgba(255, 119, 51, 0.2);
        border: 1px solid rgba(255, 119, 51, 0.3);
        color: var(--primary);
        padding: 5px 14px;
        border-radius: 30px;
        font-size: 0.82rem;
        font-weight: 600;
        margin-bottom: 16px;
    }

    /* LAYOUT */
    .legal-layout {
        display: grid;
        grid-template-columns: 280px 1fr;
        gap: 32px;
        padding: 40px 0 80px;
    }

    /* SIDEBAR NAV */
    .legal-sidebar {
        position: sticky;
        top: 90px;
        height: fit-content;
    }

    .sidebar-card {
        background: var(--white);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        overflow: hidden;
    }

    .sidebar-header {
        background: var(--primary);
        padding: 16px 20px;
        color: white;
        font-family: 'Outfit', sans-serif;
        font-weight: 700;
        font-size: 0.9rem;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .sidebar-nav a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 20px;
        text-decoration: none;
        color: var(--text-main);
        font-size: 0.9rem;
        font-weight: 500;
        border-bottom: 1px solid #f1f3f5;
        transition: all 0.2s;
    }

    .sidebar-nav a:last-child {
        border-bottom: none;
    }

    .sidebar-nav a .doc-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        background: var(--primary-light);
        color: var(--primary);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.8rem;
        flex-shrink: 0;
        transition: all 0.2s;
    }

    .sidebar-nav a:hover {
        background: var(--primary-light);
        color: var(--primary);
    }

    .sidebar-nav a:hover .doc-icon {
        background: var(--primary);
        color: white;
    }

    .sidebar-nav a.active {
        background: var(--primary-light);
        color: var(--primary);
        font-weight: 600;
    }

    .sidebar-nav a.active .doc-icon {
        background: var(--primary);
        color: white;
    }

    /* PRINT BUTTON */
    .btn-print {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        padding: 12px;
        background: var(--secondary);
        color: white;
        border: none;
        border-radius: var(--radius-sm);
        font-size: 0.88rem;
        font-weight: 600;
        cursor: pointer;
        margin-top: 16px;
        transition: all 0.3s;
        font-family: 'Inter', sans-serif;
    }

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

    /* DOCUMENT SECTIONS */
    .legal-content {
        display: flex;
        flex-direction: column;
        gap: 32px;
    }

    .doc-section {
        background: var(--white);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        overflow: hidden;
        scroll-margin-top: 100px;
    }

    .doc-header {
        padding: 28px 36px;
        border-bottom: 2px solid var(--bg-alt);
        display: flex;
        align-items: flex-start;
        gap: 18px;
    }

    .doc-header-icon {
        width: 52px;
        height: 52px;
        border-radius: 14px;
        background: var(--primary-light);
        color: var(--primary);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.3rem;
        flex-shrink: 0;
    }

    .doc-header-text h2 {
        font-size: 1.4rem;
        color: var(--secondary);
        margin-bottom: 4px;
    }

    .doc-header-text .doc-meta {
        font-size: 0.82rem;
        color: var(--text-muted);
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    .doc-header-text .doc-meta span {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .doc-body {
        padding: 32px 36px;
    }

    /* ARTICLE STYLES */
    .doc-article {
        margin-bottom: 28px;
    }

    .doc-article:last-child {
        margin-bottom: 0;
    }

    .article-title {
        font-family: 'Outfit', sans-serif;
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--secondary);
        margin-bottom: 10px;
        padding: 10px 0 10px 16px;
        border-left: 3px solid var(--primary);
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .article-title .art-num {
        background: var(--primary);
        color: white;
        font-size: 0.72rem;
        padding: 2px 8px;
        border-radius: 20px;
        font-weight: 700;
    }

    .doc-article p {
        color: var(--text-main);
        font-size: 0.93rem;
        line-height: 1.75;
        margin-bottom: 10px;
    }

    .doc-article p:last-child {
        margin-bottom: 0;
    }

    .doc-article ul,
    .doc-article ol {
        padding-left: 20px;
        margin: 10px 0;
    }

    .doc-article li {
        font-size: 0.93rem;
        line-height: 1.75;
        color: var(--text-main);
        margin-bottom: 4px;
    }

    /* INFO BOXES */
    .info-box {
        border-radius: var(--radius-sm);
        padding: 16px 20px;
        margin: 16px 0;
        display: flex;
        gap: 14px;
        align-items: flex-start;
    }

    .info-box.warning {
        background: #fff8e6;
        border: 1px solid #ffd166;
    }

    .info-box.info {
        background: #e8f8f8;
        border: 1px solid #00cec9;
    }

    .info-box.danger {
        background: #fff0f0;
        border: 1px solid #ff7675;
    }

    .info-box.success {
        background: var(--primary-light);
        border: 1px solid rgba(255, 119, 51, 0.3);
    }

    .info-box .box-icon {
        font-size: 1.1rem;
        flex-shrink: 0;
        margin-top: 2px;
    }

    .info-box.warning .box-icon {
        color: #e17055;
    }

    .info-box.info .box-icon {
        color: var(--accent);
    }

    .info-box.danger .box-icon {
        color: #d63031;
    }

    .info-box.success .box-icon {
        color: var(--primary);
    }

    .info-box p {
        font-size: 0.88rem;
        margin: 0 !important;
        line-height: 1.6;
    }

    .info-box strong {
        font-weight: 600;
    }

    /* TABLE */
    .legal-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.88rem;
        margin: 14px 0;
        border-radius: var(--radius-sm);
        overflow: hidden;
        box-shadow: var(--shadow-sm);
    }

    .legal-table th {
        background: var(--secondary);
        color: white;
        padding: 12px 16px;
        text-align: left;
        font-weight: 600;
    }

    .legal-table td {
        padding: 11px 16px;
        border-bottom: 1px solid #f1f3f5;
        vertical-align: top;
    }

    .legal-table tr:last-child td {
        border-bottom: none;
    }

    .legal-table tr:nth-child(even) td {
        background: #fafbfc;
    }

    .legal-table tr:hover td {
        background: var(--primary-light);
    }

    /* DIVIDER */
    .doc-divider {
        height: 1px;
        background: linear-gradient(to right, transparent, var(--primary), transparent);
        margin: 24px 0;
        opacity: 0.3;
    }

    /* TOC inside doc */
    .doc-toc {
        background: var(--bg-alt);
        border-radius: var(--radius-sm);
        padding: 18px 20px;
        margin-bottom: 24px;
    }

    .doc-toc h4 {
        font-size: 0.82rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--text-muted);
        margin-bottom: 10px;
    }

    .doc-toc ol {
        padding-left: 18px;
    }

    .doc-toc li {
        font-size: 0.88rem;
        margin-bottom: 4px;
    }

    .doc-toc a {
        color: var(--primary);
        text-decoration: none;
        font-weight: 500;
    }

    .doc-toc a:hover {
        text-decoration: underline;
    }

    /* CONTACT CARD */
    .contact-card {
        background: linear-gradient(135deg, var(--secondary), #3d4852);
        border-radius: var(--radius);
        padding: 28px 32px;
        color: white;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
        flex-wrap: wrap;
        margin-top: 32px;
    }

    .contact-card h3 {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }

    .contact-card p {
        font-size: 0.88rem;
        opacity: 0.7;
    }

    .contact-card a {
        background: var(--primary);
        color: white;
        padding: 10px 22px;
        border-radius: var(--radius-sm);
        text-decoration: none;
        font-weight: 600;
        font-size: 0.88rem;
        white-space: nowrap;
    }

    .contact-card a:hover {
        background: var(--primary-dark);
    }

    /* FOOTER */
    .footer {
        background: var(--secondary);
        color: rgba(255, 255, 255, 0.7);
        padding: 32px 0;
        font-size: 0.88rem;
        text-align: center;
    }

    .footer strong {
        color: var(--primary);
    }

    /* SCROLL TO TOP */
    .scroll-top {
        position: fixed;
        bottom: 28px;
        right: 28px;
        width: 44px;
        height: 44px;
        background: var(--primary);
        color: white;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 14px rgba(255, 119, 51, 0.4);
        opacity: 0;
        transform: translateY(10px);
        transition: all 0.3s;
        z-index: 999;
    }

    .scroll-top.visible {
        opacity: 1;
        transform: translateY(0);
    }

    .scroll-top:hover {
        background: var(--primary-dark);
        transform: translateY(-2px);
    }

    /* RESPONSIVE */
    @media (max-width: 900px) {
        .legal-layout {
            grid-template-columns: 1fr;
        }

        .legal-sidebar {
            position: static;
        }

        .doc-header {
            padding: 20px 20px;
        }

        .doc-body {
            padding: 20px 20px;
        }

        .legal-hero h1 {
            font-size: 1.8rem;
        }
    }

    @media (max-width: 600px) {
        .contact-card {
            flex-direction: column;
        }

        .doc-header {
            flex-direction: column;
        }
    }

    @media print {

        .legal-sidebar,
        .scroll-top,
        .legal-hero,
        .footer,
        .header,
        .top-bar {
            display: none;
        }

        .legal-layout {
            grid-template-columns: 1fr;
            padding: 0;
        }

        .doc-section {
            box-shadow: none;
            border: 1px solid #ddd;
        }
    }