/* ========================================
   Gov.br Design System - CNPJ Brasil
   ======================================== */

/* CSS Variables - Paleta gov.br */
:root {
    /* Cores Primárias */
    --gov-blue: #1351b4;
    --gov-blue-dark: #0c326f;
    --gov-blue-light: #2670e8;
    --gov-blue-lightest: #d4e5ff;

    /* Cores do Logo */
    --logo-yellow: #ffcd07;
    --logo-green: #168821;
    --logo-blue: #1351b4;

    /* Cores Neutras */
    --gray-100: #f8f8f8;
    --gray-200: #ededed;
    --gray-300: #cccccc;
    --gray-400: #888888;
    --gray-500: #555555;
    --gray-600: #333333;
    --white: #ffffff;

    /* Background */
    --bg-gradient-start: #e8f0fe;
    --bg-gradient-end: #f0f4f8;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* Typography */
    --font-family: 'Rawline', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 50%;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    color: var(--gray-600);
    line-height: 1.5;
}

a {
    color: var(--gov-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--gov-blue-dark);
    text-decoration: underline;
}

/* ========================================
   Header
   ======================================== */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: var(--space-md) var(--space-xl);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

.logo-gov {
    color: var(--logo-green);
}

.logo-br {
    color: var(--logo-yellow);
}

.header-title {
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--gray-300);
    padding-left: var(--space-lg);
}

.title-main {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.title-sub {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.notification-btn {
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-full);
    transition: background 0.2s ease;
}

.notification-btn:hover {
    background: var(--gray-100);
}

.system-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.75rem;
}

.system-info span:first-child {
    color: var(--gray-400);
}

.system-name {
    color: var(--gov-blue);
    font-weight: 600;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--gov-blue);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    cursor: pointer;
    transition: background 0.2s ease;
}

.user-avatar:hover {
    background: var(--gov-blue-dark);
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px var(--space-xl) var(--space-xxl);
}

/* ========================================
   Login Card
   ======================================== */
.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-xl) var(--space-xxl);
    width: 100%;
    max-width: 440px;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.govbr-logo {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.govbr-logo-img {
    height: 40px;
    width: auto;
}

.govbr-logo.large .govbr-logo-img {
    height: 60px;
}

.logo-img {
    height: 28px;
    width: auto;
}

.footer-logo-img {
    height: 24px;
    width: auto;
    opacity: 0.7;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-600);
    margin-bottom: var(--space-xs);
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--gray-400);
}

/* ========================================
   Terms Notice
   ======================================== */
.terms-notice {
    background: var(--gov-blue-lightest);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.notice-dot {
    width: 8px;
    height: 8px;
    background: var(--gov-blue);
    border-radius: var(--radius-full);
    margin-top: 6px;
    flex-shrink: 0;
}

.terms-notice p {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.4;
}

/* ========================================
   Login Form
   ======================================== */
.login-form {
    margin-bottom: var(--space-lg);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: var(--space-sm);
}

.form-group input {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-family);
    color: var(--gray-600);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input::placeholder {
    color: var(--gray-400);
}

.form-group input:focus {
    outline: none;
    border-color: var(--gov-blue);
    box-shadow: 0 0 0 3px rgba(19, 81, 180, 0.15);
}

/* ========================================
   Primary Button
   ======================================== */
.btn-primary {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(135deg, var(--gov-blue) 0%, var(--gov-blue-light) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(19, 81, 180, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.1rem;
}

/* ========================================
   Secure Connection
   ======================================== */
.secure-connection {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    color: var(--gray-400);
    font-size: 0.75rem;
}

.secure-connection svg {
    opacity: 0.7;
}

/* ========================================
   Page 2 - Split Layout
   ======================================== */
.split-container {
    display: flex;
    min-height: 100vh;
}

.split-left {
    flex: 1;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.split-left::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30%;
    height: 100%;
    background: var(--logo-yellow);
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: var(--space-xxl);
}

.hero-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
}

.hero-logo {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.hero-text {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 350px;
    line-height: 1.6;
}

.hero-text strong {
    color: var(--gov-blue);
}

.split-right {
    flex: 1;
    background: var(--white);
    display: flex;
    flex-direction: column;
    padding: var(--space-xxl);
    max-width: 500px;
}

.split-header {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-lg);
    margin-bottom: var(--space-xxl);
}

.header-link {
    font-size: 0.875rem;
    color: var(--gray-500);
    text-decoration: none;
    transition: color 0.2s ease;
}

.header-link:hover {
    color: var(--gov-blue);
}

.split-form-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-600);
    margin-bottom: var(--space-lg);
}

.cnpj-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.cnpj-label svg {
    color: var(--gov-blue);
}

.cnpj-label span {
    font-weight: 600;
    color: var(--gray-600);
}

.form-helper {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-bottom: var(--space-md);
}

.form-helper a {
    color: var(--gov-blue);
}

.btn-continue {
    background: var(--gov-blue);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: var(--space-md);
    align-self: flex-start;
}

.btn-continue:hover {
    background: var(--gov-blue-dark);
}

/* ========================================
   Other Options
   ======================================== */
.other-options {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--gray-200);
}

.other-options-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: var(--space-md);
}

.option-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    color: var(--gray-600);
    text-decoration: none;
    transition: color 0.2s ease;
}

.option-item:hover {
    color: var(--gov-blue);
}

.option-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gov-blue);
}

.option-badge {
    background: var(--logo-yellow);
    color: var(--gray-600);
    font-size: 0.625rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    margin-left: var(--space-sm);
}

/* ========================================
   Footer Links
   ======================================== */
.footer-links {
    margin-top: auto;
    padding-top: var(--space-xl);
}

.help-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--gov-blue);
    font-size: 0.875rem;
    margin-bottom: var(--space-md);
}

.help-link svg {
    width: 16px;
    height: 16px;
}

.terms-link {
    font-size: 0.75rem;
    color: var(--gov-blue);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .header-title {
        display: none;
    }

    .system-info {
        display: none;
    }

    .login-card {
        padding: var(--space-lg);
        margin: var(--space-md);
    }

    .split-container {
        flex-direction: column;
    }

    .split-left {
        min-height: 300px;
    }

    .split-right {
        max-width: 100%;
        padding: var(--space-lg);
    }
}

/* ========================================
   Dark Background Pages
   ======================================== */
body.dark-bg {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
}

/* ========================================
   Status Page
   ======================================== */
.status-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-xl) var(--space-md);
}

.status-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-xl);
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.5s ease;
}

.govbr-logo.large {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: var(--space-lg);
}

/* Alert Banner */
.alert-banner {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    text-align: center;
    margin-bottom: var(--space-lg);
}

.alert-banner.danger {
    background: linear-gradient(135deg, #1a3a6e 0%, #0d2440 100%);
    color: var(--white);
}

.alert-banner h2 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Info Section */
.info-section {
    background: var(--gray-100);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    text-align: center;
}

.info-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: var(--space-md);
}

.info-section p {
    font-size: 0.85rem;
    color: var(--gray-500);
    line-height: 1.6;
}

.info-section strong {
    color: var(--gov-blue);
}

/* Data Section */
.data-section {
    background: var(--gray-100);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-md);
    text-align: center;
}

.data-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: var(--space-xs);
}

.data-value {
    font-size: 1.1rem;
    color: var(--gray-500);
    font-weight: 500;
}

.price-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2d7d32;
    margin: 0;
}

.price-value.large {
    font-size: 2.5rem;
}

/* Personal Data Section */
.personal-data-section {
    background: var(--gray-100);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.personal-data-section h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-600);
    text-align: center;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--gray-200);
}

.personal-data-content p {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: var(--space-xs);
}

.personal-data-content strong {
    color: var(--gray-600);
}

/* Generate Payment Button */
.btn-generate {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(135deg, #168821 0%, #1a9928 100%);
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-family);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 136, 33, 0.4);
}

/* Status Footer */
.status-footer {
    background: linear-gradient(135deg, #1a3a6e 0%, #0d2440 100%);
    padding: var(--space-md) var(--space-xl);
    width: 100%;
    max-width: 420px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin-top: auto;
}

.footer-logo {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-logo .logo-gov {
    color: #4a8cff;
}

.footer-logo .logo-br {
    color: var(--logo-yellow);
}

/* ========================================
   Payment Page
   ======================================== */
.payment-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl) var(--space-md);
}

.payment-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-xl);
    width: 100%;
    max-width: 400px;
    animation: fadeInUp 0.5s ease;
}

/* Status Banners */
.status-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-banner.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-banner.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-banner.hidden {
    display: none;
}

/* Payment Value Section */
.payment-value-section {
    text-align: center;
    padding: var(--space-md);
    background: var(--gray-100);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.payment-value-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: var(--space-xs);
}

/* Timer Section */
.timer-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.timer-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer-content {
    display: flex;
    flex-direction: column;
}

.timer-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
}

.timer-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-600);
}

/* PIX Section */
.pix-section {
    text-align: center;
}

.pix-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gov-blue);
    margin-bottom: var(--space-md);
}

.pix-code-box {
    background: var(--gray-100);
    border: 1px dashed var(--gray-300);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.pix-code {
    font-size: 0.65rem;
    color: var(--gray-500);
    word-break: break-all;
    line-height: 1.4;
}

/* Copy Button */
.btn-copy {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(135deg, #1a3a6e 0%, #0d2440 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: var(--space-md);
}

.btn-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 58, 110, 0.4);
}

/* Confirm Payment Button */
.btn-confirm-payment {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(135deg, #168821 0%, #1a9928 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-family);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: var(--space-md);
}

.btn-confirm-payment:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 136, 33, 0.4);
}

/* Secure Payment Notice */
.secure-payment-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--gray-100);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* ========================================
   Success Page
   ======================================== */
.success-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-xl) var(--space-md);
}

.success-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-xl);
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.5s ease;
}

/* Official Message */
.official-message {
    background: var(--gray-100);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.official-message p {
    font-size: 0.8rem;
    color: var(--gray-600);
    line-height: 1.6;
    text-align: center;
}

/* Success Badge */
.success-badge {
    background: linear-gradient(135deg, #168821 0%, #1a9928 100%);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(22, 136, 33, 0.4);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(22, 136, 33, 0);
    }
}

.badge-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-text {
    display: flex;
    flex-direction: column;
    color: var(--white);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

/* ========================================
   Responsive Design - Additional
   ======================================== */
@media (max-width: 480px) {

    .status-card,
    .payment-card,
    .success-card {
        padding: var(--space-lg);
        margin: var(--space-sm);
    }

    .govbr-logo.large {
        font-size: 2rem;
    }

    .price-value {
        font-size: 1.75rem;
    }

    .price-value.large {
        font-size: 2rem;
    }

    .timer-value {
        font-size: 1.5rem;
    }
}