/* css/style.css */
body.dark-theme {
    background-color: #121214;
    color: #e2e8f0;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.bg-animated {
    position: fixed;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    width: 200%;
    height: 200vh;
    background: transparent url('http://assets.iceable.com/img/noise-transparent.png') repeat 0 0;
    background-repeat: repeat;
    animation: bg-animation .2s infinite;
    opacity: .05;
    visibility: visible;
    z-index: 0;
    pointer-events: none;
}
body.dark-theme::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(28,28,30,1) 0%, rgba(12,12,14,1) 100%);
    z-index: -1;
}

.form-wrapper {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.form-title {
    font-weight: 700;
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.form-subtitle {
    color: #94a3b8;
    font-weight: 300;
}

.premium-card {
    background: rgba(40, 40, 44, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.section-title {
    font-size: 1.1rem;
    color: #10b981;
    margin-top: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
}

.premium-input {
    background: rgba(20, 20, 24, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
    border-radius: 8px;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.premium-input:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
    border-color: #10b981 !important;
}

.custom-file::file-selector-button {
    background: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    margin-right: 15px;
    transition: background 0.2s;
    font-weight: 500;
}
.custom-file::file-selector-button:hover {
    background: #059669;
}

.custom-switch .form-check-input {
    width: 3em;
    height: 1.5em;
    background-color: rgba(255, 255, 255, 0.2);
    border-color: transparent;
}
.custom-switch .form-check-input:checked {
    background-color: #10b981;
}

.premium-submit-btn {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white !important;
}

.premium-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.section-collapse {
    animation: fadeInDown 0.4s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -10px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* ========================================
   TOGGLE SWITCH (Premium dark theme)
======================================== */
.premium-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(20, 20, 24, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 14px 18px;
    transition: all 0.3s ease;
    cursor: pointer;
}
.premium-toggle:hover {
    border-color: rgba(16, 185, 129, 0.3);
}
.premium-toggle .toggle-label {
    color: #cbd5e1;
    font-size: 0.88rem;
    font-weight: 500;
    flex: 1;
    padding-right: 12px;
    line-height: 1.3;
}
.premium-toggle .form-check-input {
    width: 3.2em;
    height: 1.6em;
    background-color: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin: 0;
}
.premium-toggle .form-check-input:checked {
    background-color: #10b981;
    border-color: #10b981;
}
.premium-toggle .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
    border-color: #10b981;
}
.premium-toggle .toggle-status {
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 36px;
    text-align: center;
    margin-left: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.premium-toggle .toggle-status.on  { color: #34d399; }
.premium-toggle .toggle-status.off { color: #ef4444; }

/* ========================================
   CHECKBOX GROUP (Grid layout)
======================================== */
.checkbox-group-title {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 8px;
}
.checkbox-item {
    display: flex;
    align-items: center;
    background: rgba(20, 20, 24, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.25s ease;
}
.checkbox-item:hover {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.05);
}
.checkbox-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    margin-right: 10px;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
}
.checkbox-item input[type="checkbox"]:checked {
    background: #10b981;
    border-color: #10b981;
}
.checkbox-item input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 13px;
    font-weight: 700;
}
.checkbox-item label {
    color: #cbd5e1;
    font-size: 0.82rem;
    cursor: pointer;
    line-height: 1.3;
    margin-bottom: 0;
}
.checkbox-item.active {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}
.checkbox-outros-input {
    margin-top: 8px;
    grid-column: 1 / -1;
}

/* ========================================
   QR CODE SCAN BUTTON
======================================== */
.qr-scan-wrapper {
    display: flex;
    gap: 12px;
    align-items: stretch;
}
.btn-qr-scan {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border: none;
    color: white;
    border-radius: 10px;
    padding: 12px 22px;
    font-weight: 600;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}
.btn-qr-scan:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
    color: white;
}
.btn-qr-scan i {
    font-size: 1.1rem;
}
.qr-result-field {
    background: rgba(20, 20, 24, 0.7) !important;
    border: 1px solid rgba(99, 102, 241, 0.25) !important;
    color: #a5b4fc !important;
    border-radius: 10px;
    padding: 12px 16px;
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}
.qr-result-field::placeholder {
    color: rgba(165, 180, 252, 0.4);
}

/* ========================================
   CONDITIONAL SECTION ANIMATION
======================================== */
.section-conditional {
    animation: sectionSlideIn 0.5s ease;
}
@keyframes sectionSlideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   QR SCANNER MODAL
======================================== */
.qr-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.qr-modal-content {
    background: #1e1e22;
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.08);
}
.qr-modal-content video {
    width: 100%;
    border-radius: 10px;
    margin: 16px 0;
    background: #000;
}
.qr-modal-content h5 {
    color: #a5b4fc;
    margin-bottom: 4px;
}
.qr-modal-content .btn-close-qr {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.qr-modal-content .btn-close-qr:hover {
    background: #dc2626;
}
