/* ============================================
   EUA e Irmãos Borges — Premium USA Theme v3
   Full American Branding
   ============================================ */

:root {
    --navy: #0A1628;
    --navy-light: #1B2A4A;
    --navy-mid: #142038;
    --red: #B22234;
    --red-dark: #8B1A29;
    --red-glow: #E63946;
    --white: #FFFFFF;
    --cream: #F8F6F0;
    --gold: #C5A55A;
    --gold-light: #D4B96E;
    --blue-canton: #3C3B6E;
    --text-primary: #1a1a2e;
    --text-secondary: #5a6478;
    --bg-main: #F0F2F7;
    --bg-card: #FFFFFF;
    --border: #E2E6EE;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    --gray-100: #F7F8FA;
    --gray-200: #E8ECF2;
    --gray-300: #D1D5DE;
    --gray-400: #9CA3B0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --radius-lg: 16px;
    --sidebar-w: 240px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    background: var(--bg-main);
    min-height: 100vh;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* ============================================
   LOGIN — Full American
   ============================================ */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0A1628 0%, #142038 30%, #1B2A4A 50%, #142038 70%, #0A1628 100%);
}

.login-bg-elements {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.stars-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.float-star {
    position: absolute;
    color: rgba(197, 165, 90, 0.15);
    animation: floatStar ease-in-out infinite alternate;
    text-shadow: 0 0 6px rgba(197, 165, 90, 0.3);
}

@keyframes floatStar {
    0% {
        opacity: 0.1;
        transform: translateY(0) scale(1)
    }

    100% {
        opacity: 0.5;
        transform: translateY(-20px) scale(1.2)
    }
}

.flag-stripe {
    position: absolute;
    right: 0;
    height: 6px;
    opacity: 0.15;
    animation: stripeSlide 3s ease-in-out infinite alternate;
}

.stripe-1 {
    top: 15%;
    width: 60%;
    background: var(--red);
}

.stripe-2 {
    top: 50%;
    width: 45%;
    background: var(--white);
    left: 0;
    right: auto;
}

.stripe-3 {
    top: 85%;
    width: 55%;
    background: var(--red);
}

@keyframes stripeSlide {
    from {
        opacity: 0.05;
        transform: scaleX(0.8)
    }

    to {
        opacity: 0.15;
        transform: scaleX(1)
    }
}

.login-container {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px 50px;
    background: rgba(20, 32, 56, 0.6);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(197, 165, 90, 0.15);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(178, 34, 52, 0.08);
    max-width: 520px;
    width: 90%;
}

.login-flag-container {
    margin-bottom: 20px;
}

.usa-flag-svg {
    width: 180px;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(197, 165, 90, 0.3);
}

.login-statue {
    font-size: 2.5rem;
    margin-bottom: 6px;
}

.login-brand h1 {
    font-size: 1.9rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    font-family: 'Playfair Display', serif;
    background: linear-gradient(135deg, #fff 0%, #C5A55A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-top: 4px;
    font-weight: 300;
}

.login-tagline {
    margin-top: 14px;
    font-size: 0.7rem;
    color: var(--gold);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 700;
    padding: 8px 20px;
    border: 1px solid rgba(197, 165, 90, 0.2);
    border-radius: 20px;
    display: inline-block;
    background: rgba(197, 165, 90, 0.05);
}

.login-motto {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    font-style: italic;
    margin-top: 10px;
}

.login-users {
    margin-top: 28px;
}

.login-user-btn.single {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 18px 24px;
    border: 1px solid rgba(197, 165, 90, 0.25);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(178, 34, 52, 0.15), rgba(60, 59, 110, 0.2));
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.login-user-btn.single::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(135deg, rgba(178, 34, 52, 0.3), rgba(197, 165, 90, 0.15));
    transition: opacity 0.3s;
}

.login-user-btn.single:hover {
    transform: translateY(-2px);
    border-color: var(--gold);
    box-shadow: 0 8px 30px rgba(178, 34, 52, 0.2);
}

.login-user-btn.single:hover::before {
    opacity: 1;
}

.login-avatar-lg {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 800;
    color: white;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    box-shadow: 0 4px 15px rgba(178, 34, 52, 0.4);
    border: 2px solid rgba(197, 165, 90, 0.4);
}

.login-user-info {
    flex: 1;
    text-align: left;
    position: relative;
    z-index: 1;
}

.login-user-name {
    display: block;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--white);
}

.login-user-info small {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.78rem;
}

.login-enter {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(197, 165, 90, 0.2);
    color: var(--gold);
    font-size: 1rem;
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.login-user-btn.single:hover .login-enter {
    background: var(--gold);
    color: var(--navy);
}

.login-landmarks {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 1.5rem;
    opacity: 0.6;
}

.login-landmarks span {
    cursor: default;
    transition: var(--transition);
}

.login-landmarks span:hover {
    opacity: 1;
    transform: scale(1.2);
}

.login-footer-text {
    margin-top: 20px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.5px;
}

/* ============================================
   SIDEBAR
   ============================================ */
.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-mid) 100%);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    border-right: 1px solid rgba(197, 165, 90, 0.1);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
}

.sidebar-brand {
    padding: 16px 16px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(197, 165, 90, 0.1);
}

.brand-text h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
}

.brand-sub {
    font-size: 0.7rem;
    color: var(--gold);
    letter-spacing: 1px;
}

.sidebar-welcome {
    padding: 8px 16px;
    background: linear-gradient(90deg, rgba(178, 34, 52, 0.2), rgba(60, 59, 110, 0.15));
    color: var(--gold);
    font-size: 0.65rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
    text-align: center;
    border-bottom: 1px solid rgba(197, 165, 90, 0.08);
}

.sidebar-nav {
    flex: 1;
    padding: 8px 10px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
    position: relative;
}

.nav-item:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(178, 34, 52, 0.3);
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 0.85rem;
}

.nav-badge-usa {
    position: absolute;
    right: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--navy);
}

.sidebar-flag-footer {
    padding: 0 16px;
    margin-bottom: 4px;
}

.mini-flag-bar {
    height: 5px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--red) 0%, var(--red) 33%, white 33%, white 66%, var(--blue-canton) 66%, var(--blue-canton) 100%);
    opacity: 0.5;
}

.sidebar-user {
    padding: 12px 16px;
    border-top: 1px solid rgba(197, 165, 90, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--red), var(--gold));
}

.sidebar-user span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    font-weight: 500;
}

.sidebar-user .btn-icon {
    color: rgba(255, 255, 255, 0.4);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.sidebar-user .btn-icon:hover {
    color: var(--red-glow);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-header {
    height: 56px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-header h1 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-phrase {
    font-size: 0.7rem;
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 1px;
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-flag-icon {
    font-size: 1.2rem;
}

.mobile-menu-btn {
    display: none;
}

.rate-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: var(--gold);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    border: 1px solid rgba(197, 165, 90, 0.2);
}

.rate-badge i {
    font-size: 0.72rem;
}

.content-area {
    padding: 20px 24px;
    flex: 1;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
}

.btn i {
    font-size: 0.8rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: var(--white);
    box-shadow: 0 3px 12px rgba(178, 34, 52, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(178, 34, 52, 0.35);
}

.btn-secondary {
    background: var(--navy);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--navy-light);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--navy);
    background: var(--gray-100);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--navy);
    font-weight: 700;
}

.btn-sm {
    padding: 7px 14px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 13px 28px;
    font-size: 0.95rem;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 6px;
    border-radius: 6px;
    transition: var(--transition);
}

.btn-icon:hover {
    color: var(--red);
    background: var(--gray-100);
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body {
    padding: 20px;
}

/* Stat Cards */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.stat-card.blue::before {
    background: var(--navy);
}

.stat-card.red::before {
    background: var(--red);
}

.stat-card.green::before {
    background: var(--success);
}

.stat-card.gold::before {
    background: var(--gold);
}

.stat-card .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 12px;
}

.stat-card.blue .stat-icon {
    background: rgba(27, 42, 74, 0.08);
    color: var(--navy);
}

.stat-card.red .stat-icon {
    background: rgba(178, 34, 52, 0.08);
    color: var(--red);
}

.stat-card.green .stat-icon {
    background: rgba(16, 185, 129, 0.08);
    color: var(--success);
}

.stat-card.gold .stat-icon {
    background: rgba(197, 165, 90, 0.08);
    color: var(--gold);
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.stat-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 14px;
    flex: 1;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.88rem;
    font-family: inherit;
    background: var(--gray-100);
    transition: var(--transition);
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--navy);
    background: white;
    box-shadow: 0 0 0 3px rgba(27, 42, 74, 0.08);
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

select.form-control {
    cursor: pointer;
    appearance: auto;
}

/* ============================================
   TABLE
   ============================================ */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    padding: 10px 12px;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--gray-100);
    border-bottom: 2px solid var(--border);
}

tbody td {
    padding: 10px 12px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--gray-200);
    color: var(--text-primary);
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: var(--gray-100);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-navy {
    background: rgba(27, 42, 74, 0.1);
    color: var(--navy);
}

.badge-red {
    background: rgba(178, 34, 52, 0.1);
    color: var(--red);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.badge-gold {
    background: rgba(197, 165, 90, 0.1);
    color: var(--gold);
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 22, 40, 0.7);
    backdrop-filter: blur(6px);
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95)
    }
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1rem;
    font-weight: 700;
}

.modal-body {
    padding: 20px;
}

/* ============================================
   TOAST
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 500;
    color: white;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

.toast.info {
    background: var(--navy);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(40px)
    }
}

/* ============================================
   PROGRESS
   ============================================ */
.progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--red), var(--gold));
    transition: width 0.8s ease;
}

/* ============================================
   GRIDS
   ============================================ */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-secondary);
}

.chart-container {
    position: relative;
    height: 280px;
}

/* ============================================
   MAP PAGE
   ============================================ */
.map-hero {
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 24px;
    color: white;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue-canton) 50%, var(--red) 100%);
}

.map-hero::before {
    content: '★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★';
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.08);
    letter-spacing: 8px;
}

.map-hero-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 900;
}

.map-hero-content p {
    opacity: 0.8;
    margin-top: 6px;
    font-size: 0.9rem;
}

.map-hero-stats {
    display: flex;
    gap: 20px;
    margin-top: 18px;
}

.mhs {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.8);
}

.mhs span {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--gold);
}

.map-container {
    padding: 0 !important;
}

.usa-map-wrapper {
    overflow: hidden;
    border-radius: 8px;
}

.usa-map-svg {
    width: 100%;
    height: auto;
    display: block;
}

.state-path:hover {
    filter: brightness(0.8);
}

.florida-state {
    animation: floridaPulse 2s ease-in-out infinite alternate;
}

@keyframes floridaPulse {
    from {
        filter: brightness(1)
    }

    to {
        filter: brightness(1.1) drop-shadow(0 0 8px rgba(255, 107, 53, 0.4))
    }
}

.map-legend {
    display: flex;
    gap: 16px;
    padding: 12px 20px;
    background: var(--gray-100);
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-dot.florida {
    background: linear-gradient(135deg, #FF6B35, #F7C948);
}

.legend-dot.visited {
    background: var(--blue-canton);
}

.legend-dot.default {
    background: var(--gray-300);
}

/* State Info */
.state-info-default {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.state-info-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.state-detail {
    padding: 20px;
}

.state-detail.florida {
    background: linear-gradient(180deg, rgba(178, 34, 52, 0.03), transparent);
    border-radius: var(--radius);
}

.state-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.state-detail-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text-primary);
}

.sd-row {
    padding: 6px 0;
    font-size: 0.88rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--gray-200);
}

.sd-divider {
    height: 1px;
    background: var(--red);
    margin: 14px 0;
    opacity: 0.3;
}

.sd-highlight {
    padding: 10px 16px;
    background: rgba(178, 34, 52, 0.06);
    border-radius: 8px;
    color: var(--red);
    font-size: 0.9rem;
    font-weight: 700;
}

.sd-highlight i {
    margin-right: 6px;
}

.sd-attractions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.sd-attractions span {
    padding: 6px 12px;
    background: var(--gray-100);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

/* Florida Grid */
.florida-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.fl-card {
    padding: 20px;
    text-align: center;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--gray-100);
    transition: var(--transition);
}

.fl-card:hover {
    background: white;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.fl-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.fl-card h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.fl-card p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Cities Grid */
.cities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.city-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--gray-100);
    transition: var(--transition);
}

.city-card:hover {
    background: white;
    box-shadow: var(--shadow-sm);
}

.city-card.highlight {
    border-color: var(--red);
    background: rgba(178, 34, 52, 0.03);
}

.city-card.highlight:hover {
    background: rgba(178, 34, 52, 0.06);
}

.city-icon {
    font-size: 1.5rem;
}

.city-info {
    flex: 1;
}

.city-info strong {
    display: block;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.city-info small {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.city-pop {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--gold);
}

/* USA Facts */
.map-usa-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.fact-card {
    padding: 24px;
    text-align: center;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.fact-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.fact-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.fact-card h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.fact-card p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ============================================
   CALENDAR
   ============================================ */
.cal-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.cal-nav h3 {
    min-width: 200px;
    text-align: center;
    font-weight: 700;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.cal-header-cell {
    padding: 8px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    background: var(--gray-100);
}

.cal-day {
    min-height: 85px;
    padding: 5px 7px;
    background: var(--bg-card);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.82rem;
}

.cal-day:hover {
    background: var(--gray-100);
}

.cal-day.today {
    background: rgba(178, 34, 52, 0.04);
    border: 2px solid var(--red);
}

.cal-day.other-month {
    background: var(--gray-100);
    opacity: 0.4;
    cursor: default;
}

.cal-day-number {
    font-weight: 700;
    margin-bottom: 3px;
    color: var(--text-primary);
    font-size: 0.78rem;
}

.cal-event {
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.67rem;
    margin-bottom: 2px;
    background: rgba(27, 42, 74, 0.08);
    color: var(--navy);
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-event.completed {
    opacity: 0.5;
    text-decoration: line-through;
}

/* ============================================
   CHECKLIST
   ============================================ */
.checklist-phase {
    margin-bottom: 20px;
}

.phase-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--gray-100);
    border-radius: var(--radius) var(--radius) 0 0;
    border: 1px solid var(--border);
    border-bottom: 2px solid var(--red);
}

.phase-header h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    border: 1px solid var(--border);
    border-top: none;
    background: var(--bg-card);
    transition: var(--transition);
}

.checklist-item:last-child {
    border-radius: 0 0 var(--radius) var(--radius);
}

.checklist-item:hover {
    background: var(--gray-100);
}

.check-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: transparent;
    transition: var(--transition);
    flex-shrink: 0;
}

.checklist-item.concluido .check-circle {
    border-color: var(--success);
    background: var(--success);
    color: white;
}

.checklist-item.bloqueado .check-circle {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.checklist-meta {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

/* ============================================
   AI CHAT
   ============================================ */
.ai-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
}

.ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: linear-gradient(180deg, var(--gray-100) 0%, var(--bg-card) 100%);
}

.ai-msg {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    animation: msgIn 0.3s ease-out;
}

@keyframes msgIn {
    from {
        opacity: 0;
        transform: translateY(8px)
    }
}

.ai-msg-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: white;
}

.ai-msg.user .ai-msg-avatar {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
}

.ai-msg.assistant .ai-msg-avatar {
    background: linear-gradient(135deg, var(--red), var(--gold));
}

.ai-msg-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.55;
}

.ai-msg.user .ai-msg-bubble {
    background: var(--navy);
    color: white;
    border-bottom-left-radius: 4px;
}

.ai-msg.assistant .ai-msg-bubble {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.ai-msg.user {
    flex-direction: row-reverse;
}

.ai-msg.user .ai-msg-bubble {
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 4px;
}

.ai-typing {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.ai-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-400);
    animation: typeDot 1.2s ease-in-out infinite;
}

.ai-typing span:nth-child(2) {
    animation-delay: 0.15s;
}

.ai-typing span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes typeDot {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.8)
    }

    50% {
        opacity: 1;
        transform: scale(1.1)
    }
}

.ai-action-result {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-size: 0.8rem;
    color: var(--success);
    display: flex;
    gap: 8px;
    align-items: center;
}

.ai-input-area {
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}

.ai-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.ai-chip {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--gray-100);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.ai-chip:hover {
    border-color: var(--red);
    color: var(--red);
    background: rgba(178, 34, 52, 0.04);
}

.ai-input-row {
    display: flex;
    gap: 8px;
}

.ai-input-row input {
    flex: 1;
    padding: 10px 16px;
    border: 1.5px solid var(--border);
    border-radius: 24px;
    font-size: 0.88rem;
    font-family: inherit;
    background: var(--gray-100);
    transition: var(--transition);
}

.ai-input-row input:focus {
    outline: none;
    border-color: var(--navy);
    background: white;
    box-shadow: 0 0 0 3px rgba(27, 42, 74, 0.06);
}

.ai-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: white;
    font-size: 0.95rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(178, 34, 52, 0.3);
}

/* ============================================
   SETTINGS / EXCHANGE / ACCOUNTS / FILTER
   ============================================ */
.settings-section {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.settings-section h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    align-items: flex-end;
}

.filter-bar .form-group {
    margin-bottom: 0;
    min-width: 130px;
}

.account-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.account-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.account-card .acc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.account-card .acc-name {
    font-weight: 700;
    font-size: 0.9rem;
}

.account-card .acc-balance {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
}

.account-card .acc-actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
}

.exchange-big {
    text-align: center;
    padding: 28px;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    border-radius: var(--radius);
    color: white;
}

.exchange-big .rate-value {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--gold);
}

.exchange-big .rate-label {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width:1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .florida-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cities-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .map-usa-facts {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width:768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .content-area {
        padding: 14px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .filter-bar {
        flex-direction: column;
    }

    .login-container {
        padding: 28px 20px;
    }

    .login-brand h1 {
        font-size: 1.4rem;
    }

    .map-hero-stats {
        flex-wrap: wrap;
        gap: 10px;
    }

    .florida-grid,
    .cities-grid,
    .map-usa-facts {
        grid-template-columns: 1fr;
    }

    .login-landmarks {
        gap: 10px;
        font-size: 1.2rem;
    }
}

/* ============================================
   DASHBOARD WELCOME BANNER
   ============================================ */
.dash-welcome-banner {
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue-canton) 40%, var(--red) 100%);
    position: relative;
    overflow: hidden;
}

.dash-welcome-banner::before {
    content: '★ ★ ★ ★ ★ ★ ★ ★ ★ ★';
    position: absolute;
    top: 8px;
    right: 16px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.06);
    letter-spacing: 6px;
}

.dwb-left h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 900;
}

.dwb-left p {
    opacity: 0.7;
    font-size: 0.85rem;
    margin-top: 4px;
}

.dwb-right {
    display: flex;
    gap: 8px;
    font-size: 1.8rem;
    opacity: 0.5;
}

/* Event List */
.event-list {
    list-style: none;
}

.event-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.85rem;
}

.event-list li:last-child {
    border-bottom: none;
}

.event-date {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--red);
    background: rgba(178, 34, 52, 0.06);
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

/* Checklist Preview */
.checklist-preview {
    list-style: none;
}

.checklist-preview li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.85rem;
}

.checklist-preview li:last-child {
    border-bottom: none;
}

/* ============================================
   MAP — AI Side Panel Layout
   ============================================ */
.map-main-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 20px;
}

.map-card {
    overflow: hidden;
}

.map-controls {
    display: flex;
    gap: 6px;
}

.map-ai-card {
    display: flex;
    flex-direction: column;
    max-height: 600px;
}

.map-ai-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    background: linear-gradient(180deg, var(--gray-100) 0%, var(--bg-card) 100%);
}

.map-ai-input {
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}

.map-ai-chips {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.map-ai-chips .ai-chip {
    padding: 4px 10px;
    font-size: 0.7rem;
}

/* Map Hero improved */
.map-hero-bg {
    position: absolute;
    top: 10px;
    right: 16px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.05);
    letter-spacing: 6px;
    pointer-events: none;
}

/* ============================================
   TOURIST SPOTS GRID
   ============================================ */
.tourist-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.tourist-card {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--gray-100);
    cursor: pointer;
    transition: var(--transition);
}

.tourist-card:hover {
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.tourist-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.tourist-info strong {
    display: block;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.tourist-info small {
    display: block;
    font-size: 0.68rem;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 4px;
}

.tourist-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Florida card click hint */
.fl-click {
    display: block;
    margin-top: 8px;
    font-size: 0.68rem;
    color: var(--red);
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s;
}

.fl-card:hover .fl-click {
    opacity: 1;
}

.fl-card {
    cursor: pointer;
}

/* Legend selected */
.legend-dot.selected {
    background: var(--blue-canton);
}

/* ============================================
   MAP RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .map-main-grid {
        grid-template-columns: 1fr;
    }

    .map-ai-card {
        max-height: 400px;
    }

    .tourist-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tourist-grid {
        grid-template-columns: 1fr;
    }

    .dash-welcome-banner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .dwb-right {
        justify-content: center;
    }
}

/* ============================================
   LEAFLET MAP CUSTOM STYLES
   ============================================ */

/* Capital dots */
.map-capital-icon .capital-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--navy);
    border: 1.5px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.map-florida-icon .florida-dot {
    font-size: 20px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    animation: floridaPulse 2s ease-in-out infinite;
}

@keyframes floridaPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* City emoji markers */
.city-marker {
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
    transition: transform 0.2s;
}

.city-marker:hover {
    transform: scale(1.3);
}

.city-marker.florida-marker {
    font-size: 22px;
    animation: floridaPulse 2.5s ease-in-out infinite;
}

/* State abbreviation labels */
.state-label {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 800;
    color: #5a6478;
    text-shadow: 1px 1px 0 white, -1px -1px 0 white, 1px -1px 0 white, -1px 1px 0 white;
    letter-spacing: 0.5px;
    pointer-events: none;
    white-space: nowrap;
}

.state-label-fl {
    color: #B22234;
    font-size: 13px;
    font-weight: 900;
    text-shadow: 2px 2px 0 white, -2px -2px 0 white, 2px -2px 0 white, -2px 2px 0 white;
}

/* Custom tooltips */
.map-tooltip {
    background: white !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    color: var(--text-primary) !important;
    line-height: 1.4 !important;
}

.map-tooltip::before {
    border-top-color: white !important;
}

.florida-tooltip {
    border-color: var(--red) !important;
    border-width: 2px !important;
    background: linear-gradient(135deg, #FFF8F0, white) !important;
}

.florida-tooltip strong {
    color: var(--red) !important;
}

/* Leaflet overrides */
.leaflet-control-zoom a {
    background: var(--bg-card) !important;
    color: var(--navy) !important;
    border-color: var(--border) !important;
    font-weight: 700 !important;
    width: 34px !important;
    height: 34px !important;
    line-height: 34px !important;
}

.leaflet-control-zoom a:hover {
    background: var(--navy) !important;
    color: white !important;
}

.leaflet-control-attribution {
    font-size: 9px !important;
    background: rgba(255, 255, 255, 0.8) !important;
}

/* Map card height */
.map-ai-card {
    max-height: 580px;
}

@media (max-width: 1024px) {
    #leaflet-map {
        height: 400px !important;
    }

    .map-ai-card {
        max-height: 350px;
    }
}

/* ============================================
   CHECKLIST — Premium Mission Board
   ============================================ */
.checklist-hero {
    background: linear-gradient(135deg, var(--navy) 0%, #1B2A4A 50%, #3C3B6E 100%);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 20px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(10, 22, 40, 0.4);
}

.checklist-hero::before {
    content: '★ ★ ★ ★ ★';
    position: absolute;
    top: 8px;
    right: 20px;
    font-size: 0.6rem;
    letter-spacing: 6px;
    opacity: 0.15;
    color: var(--gold);
}

.checklist-hero-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

.checklist-hero-icon {
    font-size: 2.5rem;
    animation: heroPulse 3s ease-in-out infinite;
}

@keyframes heroPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.checklist-hero-progress {
    margin-left: auto;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
}

.checklist-progress-ring {
    width: 64px;
    height: 64px;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 100%;
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 3.8;
}

.circle {
    fill: none;
    stroke: var(--gold);
    stroke-width: 3.8;
    stroke-linecap: round;
    animation: progress-anim 1s ease-out forwards;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

@keyframes progress-anim {
    0% {
        stroke-dasharray: 0 100;
    }
}

.percentage {
    fill: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.5em;
    font-weight: 700;
    text-anchor: middle;
}

/* TOOLBAR */
.checklist-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.checklist-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: var(--bg-card);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    font-family: inherit;
}

.filter-btn:hover {
    border-color: var(--navy);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--navy);
    color: white;
    border-color: var(--navy);
}

.filter-btn.joao.active {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border-color: var(--red);
}

.filter-btn.aaron.active {
    background: linear-gradient(135deg, var(--blue-canton), #5B5BAE);
    border-color: var(--blue-canton);
}

.filter-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: white;
}

.filter-avatar.aaron {
    background: linear-gradient(135deg, var(--blue-canton), #5B5BAE);
}

/* PHASE CARDS */
.checklist-phase-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.checklist-phase-card:hover {
    box-shadow: var(--shadow-md);
}

.phase-header-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--gray-100);
}

.phase-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.phase-emoji {
    font-size: 1.4rem;
}

.phase-header-new h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
}

.phase-stats {
    display: flex;
    align-items: center;
    gap: 10px;
}

.phase-mini-progress {
    width: 60px;
    height: 5px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.phase-mini-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #34D399);
    border-radius: 3px;
    transition: width 0.6s ease;
}

.phase-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 30px;
    text-align: right;
}

/* MISSION ITEMS */
.phase-items {
    padding: 4px 0;
}

.mission-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 18px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.mission-item:last-child {
    border-bottom: none;
}

.mission-item:hover {
    background: var(--gray-100);
}

.mission-item.concluido .mission-title {
    text-decoration: line-through;
    opacity: 0.5;
}

.mission-item.concluido .mission-notes {
    opacity: 0.4;
}

.mission-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    transition: var(--transition);
}

.mission-check.pendente {
    border: 2px solid var(--gray-300);
}

.mission-check.concluido {
    background: var(--success);
    color: white;
    font-size: 0.65rem;
    animation: checkPop 0.3s ease;
}

.mission-check.bloqueado {
    background: var(--gray-300);
    color: var(--gray-400);
    font-size: 0.6rem;
}

@keyframes checkPop {
    0% {
        transform: scale(0.5);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.mission-ring {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
}

.mission-body {
    flex: 1;
    min-width: 0;
}

.mission-title {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.mission-notes {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 3px;
    line-height: 1.4;
}

.mission-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.mission-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    color: white;
}

.mission-avatar.joao {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
}

.mission-avatar.aaron {
    background: linear-gradient(135deg, var(--blue-canton), #5B5BAE);
}

.mission-avatar.both {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    font-size: 0.8rem;
}

.btn-tiny {
    padding: 3px;
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.btn-tiny.del {
    color: var(--danger);
}

.mission-item:hover .btn-tiny {
    opacity: 0.6;
}

.mission-item:hover .btn-tiny:hover {
    opacity: 1;
}

/* ============================================
   PWA — iOS Safe Area
   ============================================ */
@supports (padding-top: env(safe-area-inset-top)) {
    .top-header {
        padding-top: env(safe-area-inset-top);
    }

    .sidebar {
        padding-top: env(safe-area-inset-top);
    }

    body {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Mobile checklist refinements */
@media (max-width: 768px) {
    .checklist-hero-inner {
        flex-wrap: wrap;
    }

    .checklist-hero-progress {
        margin-left: 0;
    }

    .checklist-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .checklist-filters {
        justify-content: center;
    }

    .mission-meta {
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }

    .mission-notes {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .phase-header-new {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}