/* Magenta Desenvolve - v3.0 - FinControl Design System */

/* Hide browser loading bars in PWA */
::-webkit-progress-bar,
::-webkit-progress-value {
    display: none !important;
}

/* Hide Chrome/Edge loading bar */
body::before,
body::after {
    display: none !important;
}

/* Hide all progress indicators */
progress {
    display: none !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    /* Ultra Clean Premium Design */
    --primary: #5044E5;
    --secondary: #8BA4FF;
    --bg: #FFFFFF;
    /* PURE WHITE - No more gray! */
    --surface: #FFFFFF;
    --surface-elevated: #FAFBFC;
    /* Very subtle for cards */
    --text: #111827;
    --text-secondary: #6B7280;

    /* System compatibility */
    --accent: var(--primary);
    --accent_alt: var(--secondary);
    --border: #F3F4F6;
    /* Ultra light border */
    --border-light: rgba(243, 244, 246, 0.5);

    /* Minimal shadows - iOS style */
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 4px 16px rgba(80, 68, 229, 0.12);

    /* Missing variables fix */
    --accent-magenta: #8A2BE2;
    --accent-magenta-2: #7B1FA2;
    --ring: rgba(138, 43, 226, 0.5);
    --text_muted: #6B7280;
}

html,
body {
    overflow-x: hidden;
    color: var(--text) !important;
    background: var(--bg) !important;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1,
h2,
h3,
.heading {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: var(--text);
}

p,
.body-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
}

small,
.caption {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
}

/* Cards - Ultra Minimal Premium */
.card,
.glass,
.glass-strong {
    background: var(--surface-elevated) !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow) !important;
    padding: 20px !important;
    border: 1px solid var(--border) !important;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-hover) !important;
    transform: translateY(-1px);
}

.card-header {
    padding: 0 0 16px 0 !important;
    margin-bottom: 16px !important;
    border-bottom: 1px solid var(--border) !important;
    background: transparent !important;
}

.card-header.no-border {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}


/* Buttons - Clean & Sophisticated */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px !important;
    border-radius: 12px !important;
    background: var(--primary) !important;
    color: #FFFFFF !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border: none !important;
    box-shadow: 0 1px 2px rgba(80, 68, 229, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: auto !important;
}

.btn:hover {
    background: #3e33b8 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(80, 68, 229, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn svg {
    stroke: currentColor;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px !important;
    border-radius: 12px !important;
    background: #FFFFFF !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #F9FAFB !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04) !important;
}

/* Inputs - Clean & Sophisticated */
input[type=text],
input[type=email],
input[type=password],
input[type=date],
input[type=number],
input[type=file],
select,
textarea,
.search-input {
    border-radius: 12px !important;
    border: 1px solid var(--border) !important;
    padding: 12px 16px !important;
    background: #FFFFFF !important;
    color: var(--text) !important;
    font-size: 15px !important;
    width: 100%;
    outline: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    min-height: auto !important;
    transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(80, 68, 229, 0.08), 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-secondary) !important;
    opacity: 0.6;
}

input[type=checkbox] {
    accent-color: var(--accent);
    width: 1.2rem;
    height: 1.2rem;
    border-radius: .25rem;
    cursor: pointer
}

/* Fix double chevron issue - remove browser default arrow */
select,
select.w-full,
select.form-control,
.form-select,
.custom-select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23a7a7a7' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right .75rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1.2rem !important;
    padding-right: 2.5rem !important;
    min-height: 48px !important;
    line-height: 1.5 !important;
    font-size: 16px !important;
}

/* Ensure no duplicate arrows on any select element */
select::-ms-expand {
    display: none !important;
}

/* Override any potential Tailwind or other framework styles */
select[class*="select"] {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Alerts */
.alert {
    border-radius: 14px !important;
    padding: 14px 20px !important;
    border: none !important;
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 15px;
}

.alert-error {
    background: rgba(244, 63, 94, 0.1);
    color: #dc2626;
    border: 1px solid rgba(244, 63, 94, 0.3) !important;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.3) !important;
}

.alert-warning {
    background: rgba(251, 191, 36, 0.1);
    color: #d97706;
    border: 1px solid rgba(251, 191, 36, 0.3) !important;
}

/* Navigation Links */
.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-link:hover {
    background: rgba(80, 68, 229, 0.08);
    color: var(--primary);
}

.nav-link.active {
    background: rgba(80, 68, 229, 0.12);
    color: var(--primary);
    font-weight: 600;
}

/* Utility Classes */
.text-primary {
    color: var(--primary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.bg-surface {
    background-color: var(--surface) !important;
}

html,
body {
    overflow-x: hidden;
    color: var(--text) !important;
    background: linear-gradient(135deg, #E0E2E1 0%, #d5d7d6 50%, #cacccb 100%) !important;
    min-height: 100vh
}

body {
    background-attachment: fixed !important;
}

a {
    color: var(--accent) !important;
    text-decoration: none
}

a:hover {
    color: var(--accent_alt) !important
}

nav.nav {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 1rem
}

nav.nav a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .875rem 1rem;
    border-radius: 1rem;
    color: var(--text) !important;
    font-weight: 500;
    transition: all .3s ease;
    border: 1px solid transparent
}

nav.nav a:hover {
    background: var(--glass) !important;
    border: 1px solid var(--border) !important;
    transform: translateX(4px)
}

nav.nav a.active {
    background: linear-gradient(135deg, rgba(104, 147, 197, .2), rgba(104, 147, 197, .1)) !important;
    color: var(--accent) !important;
    border: 1px solid rgba(104, 147, 197, .3) !important
}

img,
svg,
canvas,
video {
    max-width: 100%;
    height: auto
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--glass-strong), var(--glass));
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft)
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto
}

th,
td {
    padding: .75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light)
}

th {
    background: linear-gradient(135deg, var(--glass-strong), var(--glass));
    font-weight: 600;
    color: var(--accent);
    position: sticky;
    top: 0;
    backdrop-filter: blur(10px);
    white-space: nowrap
}

tr:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02))
}

tr:last-child td {
    border-bottom: none
}

td {
    word-break: break-word
}

td:not(.whitespace-nowrap) {
    max-width: 300px
}

.break-words {
    overflow-wrap: break-word;
    word-break: break-word
}

.card {
    background: linear-gradient(135deg, var(--glass-strong), var(--glass));
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    box-shadow: var(--shadow-soft);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all .3s ease
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow)
}

.card-header {
    background: linear-gradient(135deg, var(--glass), rgba(255, 255, 255, .05));
    margin: -1.5rem -1.5rem 1.5rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    border-radius: 1.25rem 1.25rem 0 0;
    font-weight: 600;
    color: var(--accent)
}

.sidebar-glass {
    background: #ffffff !important;
    border-right: 1px solid var(--border) !important;
    box-shadow: 2px 0 12px rgba(37, 37, 38, .08) !important;
    border-radius: 0
}

/* Dropdown Menu Styles */
.dropdown-menu {
    background: #ffffff !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 10px 40px rgba(37, 37, 38, .15), 0 2px 8px rgba(37, 37, 38, .08) !important;
    z-index: 99999 !important;
    position: absolute;
    pointer-events: auto;
}

.action-menu {
    position: relative;
    z-index: 1;
}

.action-menu button {
    z-index: 1;
    position: relative;
}

tbody tr {
    z-index: auto !important;
}

tbody tr:has(.dropdown-menu:not(.hidden)) {
    z-index: 100000 !important;
    position: relative;
}

.dropdown-item {
    color: var(--text);
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(104, 147, 197, 0.12);
    color: var(--accent);
}

.dropdown-item:hover svg {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Fix table overflow for dropdown */
.table-wrap {
    overflow: visible !important;
}

.table-wrap>div {
    overflow: visible !important;
}

table {
    position: relative;
    z-index: 0;
    overflow: visible !important;
}

tbody {
    overflow: visible !important;
}

tbody tr {
    position: relative;
    overflow: visible !important;
}

tbody tr td {
    overflow: visible !important;
}

tbody tr td:last-child {
    overflow: visible !important;
    position: relative;
}

/* Card container overflow fix */
.card {
    overflow: visible !important;
}

.card>div {
    overflow: visible !important;
}

/* Universal fix for dropdown parents */
.hidden.md\:block,
.md\:block {
    overflow: visible !important;
}

main {
    overflow: visible !important;
}

/* Ensure dropdown is always on top */
.dropdown-menu.hidden {
    display: none;
}

.dropdown-menu:not(.hidden) {
    display: block;
}

/* Force card and table colors */
.card {
    background: var(--glass-strong) !important;
    color: var(--text) !important;
}

.card-header {
    color: var(--text) !important;
    border-bottom-color: var(--border) !important;
}

table {
    color: var(--text) !important;
}

table thead {
    color: var(--text) !important;
    border-bottom-color: var(--border) !important;
}

table th {
    color: var(--accent) !important;
    font-weight: 600 !important;
}

table td {
    color: var(--text) !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text) !important;
}

.text-gray-400,
.text-gray-300 {
    color: var(--text_muted) !important;
}

/* Form Styles */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="tel"],
input[type="file"],
textarea,
select,
input,
select option {
    width: 100%;
    padding: 0.75rem 1rem !important;
    border: 2px solid #9ca3af !important;
    border-radius: 0.75rem !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #1f2937 !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%231f2937' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 8l4 4 4-4'/%3E%3C/svg%3E") !important;
    background-position: right 0.5rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1.5em 1.5em !important;
    padding-right: 2.5rem !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="tel"]:focus,
input[type="file"]:focus,
textarea:focus,
select:focus {
    border-color: #6893C5 !important;
    box-shadow: 0 0 0 4px rgba(104, 147, 197, .2) !important;
    background: #ffffff !important;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="number"]::placeholder,
input[type="tel"]::placeholder,
textarea::placeholder {
    color: #6b7280 !important;
    opacity: 1 !important;
    font-weight: 400 !important;
}

input:disabled,
select:disabled,
textarea:disabled {
    background-color: #e5e7eb !important;
    color: #4b5563 !important;
    cursor: not-allowed !important;
    border-color: #d1d5db !important;
}

/* Ultra-specific overrides for Tailwind classes */
input.w-full,
select.w-full,
textarea.w-full,
input[class*="w-"],
select[class*="w-"],
textarea[class*="w-"],
input[type="text"].w-full,
input[type="email"].w-full,
input[type="password"].w-full,
input[type="number"].w-full,
input[type="date"].w-full,
input[type="tel"].w-full {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    border: 2px solid #9ca3af !important;
    border-radius: 0.75rem !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #1f2937 !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
}

/* Override any bg- classes */
input[class*="bg-"],
select[class*="bg-"],
textarea[class*="bg-"] {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

/* Override any text- color classes */
input[class*="text-"],
select[class*="text-"],
textarea[class*="text-"] {
    color: #1f2937 !important;
}

/* Override any border- classes */
input[class*="border-"],
select[class*="border-"],
textarea[class*="border-"] {
    border: 2px solid #9ca3af !important;
}

label {
    color: #1f2937 !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
}

.alert {
    padding: 1rem 1.25rem !important;
    border-radius: 0.75rem !important;
    margin-bottom: 1rem !important;
    border: 1px solid !important;
}

.alert-success {
    background: #d4edda !important;
    border-color: #c3e6cb !important;
    color: #155724 !important;
}

.alert-error {
    background: #f8d7da !important;
    border-color: #f5c6cb !important;
    color: #721c24 !important;
}

/* Override Tailwind dark classes */
.bg-gray-800,
.bg-gray-900,
.bg-slate-800,
.bg-slate-900,
.dark\:bg-gray-800,
.dark\:bg-gray-900 {
    background-color: #ffffff !important;
}

.text-white,
.dark\:text-white {
    color: #252526 !important;
}

.border-gray-700,
.border-gray-800,
.dark\:border-gray-700 {
    border-color: #d1d5db !important;
}

/* Force all form elements to be light */
form input,
form select,
form textarea,
form button[type="submit"] {
    background: #ffffff !important;
    color: #252526 !important;
}

form select option {
    background: #ffffff !important;
    color: #252526 !important;
}

/* Mobile Form Improvements */
@media (max-width: 768px) {

    /* Form container */
    form {
        padding: 0 !important;
    }

    /* Form groups */
    form>div,
    form .space-y-4>div,
    form .grid>div {
        margin-bottom: 1.25rem !important;
    }

    /* Labels */
    form label {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
        display: block !important;
    }

    /* All inputs */
    form input,
    form select,
    form textarea {
        font-size: 16px !important;
        padding: 0.875rem 1rem !important;
        min-height: 48px !important;
    }

    /* Textareas */
    form textarea {
        min-height: 120px !important;
    }

    /* ALL BUTTONS - Standardized */
    .btn,
    .btn-secondary,
    button,
    a.btn,
    a.btn-secondary,
    form button,
    form .btn,
    form a.btn,
    [class*="btn"] {
        padding: 0.625rem 1rem !important;
        font-size: 0.875rem !important;
        min-height: 40px !important;
        height: auto !important;
        width: auto !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
        border-radius: 0.5rem !important;
    }

    /* Full width buttons only when explicitly needed */
    form button[type="submit"],
    .btn.w-full,
    .btn-secondary.w-full,
    .btn-whatsapp.w-full {
        width: 100% !important;
    }

    /* Button groups in cards */
    .card .flex.gap-2,
    .card .flex.gap-3,
    .glass .flex.gap-2 {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.5rem !important;
        flex-wrap: wrap !important;
    }

    .card .flex.gap-2>*,
    .card .flex.gap-3>*,
    .glass .flex.gap-2>* {
        flex: 1 !important;
        min-width: 0 !important;
        width: auto !important;
    }

    /* Action buttons in tables/cards */
    .card .flex.justify-center.gap-2 button,
    .card .flex.justify-center.gap-2 a,
    .glass .flex.gap-2 button,
    .glass .flex.gap-2 a {
        flex: 1 !important;
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8125rem !important;
    }

    /* Form button groups */
    form .flex.gap-3,
    form .flex.gap-2 {
        flex-direction: row !important;
        gap: 0.5rem !important;
    }

    form .flex.gap-3>*,
    form .flex.gap-2>* {
        flex: 1 !important;
        width: auto !important;
    }

    /* Grid layouts */
    form .grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    /* Card padding */
    .card {
        padding: 1rem !important;
    }

    /* Card header */
    .card-header {
        font-size: 1.25rem !important;
        margin-bottom: 1rem !important;
        padding-bottom: 0.75rem !important;
    }

    /* Header buttons */
    .card-header+.btn,
    .flex.justify-between .btn {
        padding: 0.625rem 1rem !important;
        font-size: 0.875rem !important;
    }

    .card-header .btn,
    .card-header .btn-secondary {
        margin-top: .5rem !important;
    }

    /* Remove horizontal margins */
    form .mx-auto {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* File inputs */
    input[type="file"] {
        padding: 0.75rem !important;
    }

    /* Checkbox and radio groups */
    form .flex.items-center.gap-2,
    form .flex.items-center.gap-3 {
        flex-direction: row !important;
        gap: 0.5rem !important;
    }

    /* Select with custom arrow */
    form select {
        padding-right: 2.5rem !important;
    }

    /* Mobile card actions */
    .md\:hidden .flex.gap-2 {
        margin-top: 0.75rem !important;
    }

    /* Prevent text wrapping in buttons */
    button,
    .btn,
    .btn-secondary {
        text-overflow: ellipsis !important;
        overflow: hidden !important;
    }

    /* Mobile margin for public form cards - REMOVED to allow full width */
    .form-card {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
        padding: 10px !important;
    }
}

/* Margin around public cards on all viewports - REMOVED */
.form-card {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Tablet improvements */
@media (min-width: 769px) and (max-width: 1024px) {
    form .grid.md\:grid-cols-2 {
        grid-template-columns: 1fr !important;
    }

    form .grid.md\:grid-cols-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}


/* Sidebar mobile fixes */
#sidebar {
    max-height: 100vh;
    max-height: 100dvh;
    /* Dynamic viewport height for mobile */
}

@media (min-width: 768px) {
    #sidebar {
        height: 100vh;
        height: 100dvh;
    }
}

@media (max-width: 768px) {
    #sidebar {
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
    }
}


/* Melhorias para inputs */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
}

/* Placeholder mais visível */
input::placeholder,
textarea::placeholder {
    color: #9ca3af !important;
    opacity: 0.8 !important;
}

/* Labels dos formulários */
label {
    color: #d1d5db;
    font-weight: 500;
}

/* Garantir glassmorphism funciona em todos os navegadores */
.glass,
.glass-strong,
.card,
.sidebar-glass,
.table-wrap {
    -webkit-backdrop-filter: blur(var(--blur, 16px));
    backdrop-filter: blur(var(--blur, 16px));
}

/* Estilos para options dos selects */
select option {
    background-color: #1f2937 !important;
    color: #e5e5e5 !important;
    padding: 0.5rem !important;
}

select option:checked,
select option:hover {
    background-color: #374151 !important;
    color: #ffffff !important;
}

/* Prevenir options em branco */
select option[value=""] {
    background-color: #374151 !important;
    color: #9ca3af !important;
    font-style: italic;
}

/* Garantir que options vazios não fiquem invisíveis */
select option:empty {
    display: none !important;
}

/* Fallback para navegadores que não suportam estilização de options */
select {
    background-color: #1f2937 !important;
    color: #e5e5e5 !important;
}

/* Consistência visual para todos os inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
select,
textarea {
    min-height: 48px !important;
    line-height: 1.4 !important;
    font-size: 16px !important;
}

/* Estilo específico para input de arquivo */
input[type="file"] {
    background: linear-gradient(135deg, var(--glass-strong), var(--glass)) !important;
    border: 1px solid var(--border-light) !important;
    color: #e5e5e5 !important;
    padding: 0.75rem 1rem !important;
    cursor: pointer !important;
}

input[type="file"]::file-selector-button {
    background: linear-gradient(135deg, rgba(29, 185, 84, .25), rgba(29, 185, 84, .15)) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 0.5rem !important;
    margin-right: 1rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

input[type="file"]::file-selector-button:hover {
    background: linear-gradient(135deg, rgba(29, 185, 84, .35), rgba(29, 185, 84, .25)) !important;
    transform: translateY(-1px) !important;
}

/* Consistência de foco para todos os campos */
input:focus,
select:focus,
textarea:focus,
input[type="file"]:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--ring), inset 0 2px 4px rgba(0, 0, 0, .2) !important;
    background: linear-gradient(135deg, var(--glass), var(--glass-strong)) !important;
    outline: none !important;
}

/* Placeholder consistente */
input::placeholder,
textarea::placeholder {
    color: #9ca3af !important;
    opacity: 0.8 !important;
    font-size: 16px !important;
}

/* Placeholder específico para input tel */
input[type="tel"]::placeholder {
    color: #9ca3af !important;
    opacity: 0.8 !important;
}

/* Melhorar visualização do texto do input de arquivo */
input[type="file"]:not(:valid)::after {
    content: "Nenhum arquivo escolhido";
    color: #9ca3af;
    font-style: italic;
    margin-left: 1rem;
}

/* Ajustar espaçamento interno dos inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"] {
    padding: 0.875rem 1rem !important;
    line-height: 1.5 !important;
    background: linear-gradient(135deg, var(--glass-strong), var(--glass)) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 1rem !important;
    color: #e5e5e5 !important;
    min-height: 48px !important;
    font-size: 16px !important;
    width: 100% !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .2) !important;
}

/* Foco consistente para todos os inputs tipados */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--ring), inset 0 2px 4px rgba(0, 0, 0, .2) !important;
    background: linear-gradient(135deg, var(--glass), var(--glass-strong)) !important;
}

/* Garantir que inputs sem type específico também sigam o tema */
input:not([type]) {
    background: linear-gradient(135deg, var(--glass-strong), var(--glass)) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 1rem !important;
    color: #e5e5e5 !important;
    padding: 0.875rem 1rem !important;
    min-height: 48px !important;
    line-height: 1.5 !important;
    font-size: 16px !important;
    width: 100% !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .2) !important;
}

input:not([type]):focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--ring), inset 0 2px 4px rgba(0, 0, 0, .2) !important;
    background: linear-gradient(135deg, var(--glass), var(--glass-strong)) !important;
}

/* Forçar estilo específico para input tel - corrige problema de fundo branco */
input[type="tel"] {
    background: linear-gradient(135deg, var(--glass-strong), var(--glass)) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 1rem !important;
    color: #e5e5e5 !important;
    padding: 0.875rem 1rem !important;
    min-height: 48px !important;
    line-height: 1.5 !important;
    font-size: 16px !important;
    width: 100% !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .2) !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

input[type="tel"]:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--ring), inset 0 2px 4px rgba(0, 0, 0, .2) !important;
    background: linear-gradient(135deg, var(--glass), var(--glass-strong)) !important;
}

/* Animations & backgrounds for public pages */
.gradient-bg {
    background: linear-gradient(135deg, #0a0a0a 0%, #121212 50%, #0f0f0f 100%) !important;
    background-size: 400% 400% !important;
    animation: gradientBG 18s ease infinite;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.animate-fade-in {
    animation: fadeIn .8s ease-out both;
}

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

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

.animate-slide-up {
    animation: slideUp .8s ease-out .2s both;
}

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

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

/* Stepper component */
.stepper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .5rem;
    margin-bottom: 1rem;
}

.stepper .step {
    height: .375rem;
    border-radius: 9999px;
    background: rgba(138, 43, 226, .15);
    border: 1px solid var(--border);
}

.stepper .step.step-active {
    background: var(--accent-magenta);
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.4);
}

.stepper .step.step-done {
    background: #22c55e;
    border-color: #22c55e;
}

/* Ghost button */
.btn-ghost {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text_muted);
    padding: .7rem 1.2rem;
    border-radius: 12px;
    transition: all .3s ease;
    font-weight: 500;
}

.btn-ghost:hover {
    background: #f3f4f6;
    color: var(--text);
    transform: translateY(-1px);
}

/* Input group */
.input-group {
    display: grid;
    gap: 1.25rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .5rem 1rem;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid var(--border);
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 48px;
    cursor: pointer;
}

.chip:hover {
    border-color: var(--accent-magenta);
    background: #fdf4ff;
}

.chip-select {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.chip.is-active {
    background: linear-gradient(135deg, var(--accent-magenta), var(--accent-magenta-2)) !important;
    color: #fff !important;
    border-color: rgba(138, 43, 226, .4) !important;
    box-shadow: 0 8px 20px rgba(138, 43, 226, .25) !important;
}

.btn-gradient {
    background: linear-gradient(135deg, var(--accent-magenta), var(--accent-magenta-2)) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 10px 24px rgba(138, 43, 226, .25) !important;
}

.btn-gradient:hover {
    filter: brightness(1.05) !important;
    transform: translateY(-2px) !important;
}

/* Icon input field */
/* Professional Input Field Redesign */
.ui-field {
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    background: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.ui-field:focus-within {
    border-color: var(--accent-magenta) !important;
    box-shadow: 0 0 0 4px rgba(138, 43, 226, 0.1) !important;
    transform: translateY(-1px);
}

.ui-field .ui-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--accent-magenta);
    background: transparent;
    box-shadow: none;
    flex-shrink: 0;
}

.ui-field .ui-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.5px;
}

.ui-field .ui-input {
    border: none !important;
    background: transparent !important;
    color: var(--text) !important;
    padding: 0 !important;
    box-shadow: none !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    width: 100%;
}

.ui-field .ui-input:focus {
    box-shadow: none !important;
    outline: none !important;
}

/* Placeholder refinement */
.ui-field .ui-input::placeholder {
    color: #94a3b8 !important;
    font-weight: 400 !important;
}

/* Remove the specific margins that were added before */
.form-card .ui-field {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.form-card .ui-select {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.form-card .glass {
    margin-left: 6px !important;
    margin-right: 6px !important;
}

/* Stronger contrast for cards inside briefing/public forms */
.form-card .glass,
.form-card .glass-strong {
    background: #ffffff !important;
    border: 2px solid rgba(37, 37, 38, .25) !important;
    box-shadow: 0 12px 28px rgba(37, 37, 38, .14) !important;
    color: var(--text) !important;
}

.form-card .glass:hover,
.form-card .glass-strong:hover {
    box-shadow: 0 16px 36px rgba(37, 37, 38, .18) !important;
}

/* Visible pill select for public forms */
.form-card .ui-select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background: #ffffff !important;
    color: var(--text) !important;
    border: 2px solid #9ca3af !important;
    border-radius: 2rem !important;
    padding: .5rem .75rem !important;
    box-shadow: 0 6px 16px rgba(37, 37, 38, .08) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%231f2937' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 8l4 4 4-4'/%3E%3C/svg%3E") !important;
    background-position: right .75rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1.2rem !important;
    padding-right: 2.25rem !important;
}

.form-card .ui-select:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--ring), 0 6px 16px rgba(37, 37, 38, .12) !important;
}

/* Ensure light dropdown options in public cards */
.form-card select option,
.form-card .ui-select option {
    background: #ffffff !important;
    color: var(--text) !important;
}

/* Strong select text inside public cards */
.form-card select,
.form-card .ui-select {
    color: var(--text) !important;
    font-weight: 600 !important;
}

.text-magenta-gradient {
    background: linear-gradient(135deg, var(--accent-magenta), var(--accent-magenta-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.text-slate-300,
.text-slate-400 {
    color: var(--text) !important;
}

/* Custom Checkbox - Modern & Clean */
.form-card input[type="checkbox"] {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
    margin: 0 !important;
    vertical-align: middle;
}

.form-card input[type="checkbox"]:hover {
    border-color: #94a3b8 !important;
}

.form-card input[type="checkbox"]:checked {
    background: var(--accent-magenta) !important;
    border-color: var(--accent-magenta) !important;
}

.form-card input[type="checkbox"]:checked::before {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    font-weight: bold;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

.form-card input[type="checkbox"]:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.1) !important;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .7rem 1.2rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 8px 20px rgba(34, 197, 94, .25) !important;
}

.btn-whatsapp:hover {
    filter: brightness(1.06) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 28px rgba(34, 197, 94, .35) !important;
}

.btn-whatsapp.w-full {
    width: 100% !important;
}

.search-stack {
    display: flex;
    flex-direction: column;
    gap: .375rem;
}

.search-input-wrap {
    position: relative;
}

.search-icon {
    position: absolute;
    left: .75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.search-input {
    padding-left: 0.75rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.5rem !important;
    background: #fff !important;
    width: 100%;
}

/* Mobile UX Improvements */
@media (max-width: 768px) {
    .search-stack {
        flex-direction: column;
        gap: 0.75rem;
    }

    .search-input-wrap {
        width: 100%;
    }

    .search-button {
        width: 100%;
        justify-content: center;
    }

    /* Better card padding on mobile */
    .card {
        padding: 1.25rem !important;
    }

    /* Action buttons in cards */
    .flex.flex-wrap.gap-2 button,
    .flex.flex-wrap.gap-2 a {
        min-height: 42px;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 0.5rem;
    }

    .flex.flex-wrap.gap-2 button:hover,
    .flex.flex-wrap.gap-2 a:hover {
        background: #e9ecef;
    }
}

/* Global Input Improvements */
input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=date],
select,
textarea {
    min-height: 48px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    /* Prevents zoom on iOS */
}

.search-input::placeholder {
    color: #6b7280 !important;
    opacity: 1 !important;
}

.search-button {
    width: 100% !important;
    height: 2.25rem !important;
    background: linear-gradient(135deg, var(--accent-magenta), var(--accent-magenta-2)) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 8px 20px rgba(138, 43, 226, .25) !important;
    font-weight: 600 !important;
}

.search-button:hover {
    filter: brightness(1.06) !important;
    transform: translateY(-1px) !important;
}