/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Paleta baseada na logo:
   Azul: #667eea
   Roxo: #764ba2
   Ciano: #7ee6f3
   Roxo escuro: #3b2e63
*/
:root {
    --azul-logo: #667eea;
    --roxo-logo: #764ba2;
    --ciano-logo: #7ee6f3;
    --roxo-escuro: #3b2e63;
    --azul-solido: #3d47b7;
}

/* Rodapé fixo e elegante */
.site-footer {
    width: 100%;
    background: linear-gradient(90deg, var(--ciano-logo) 0%, var(--azul-logo) 60%, var(--roxo-logo) 100%);
    color: white;
    text-align: center;
    padding: 18px 0 12px 0;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(59, 46, 99, 0.08);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--ciano-logo) 0%, var(--azul-logo) 60%, var(--roxo-logo) 100%);
    min-height: 100vh;
    color: #333;
    padding-bottom: 60px;
    /* espaço para o rodapé */
}

.logo-portal-idea {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    background: white;
    box-shadow: 0 2px 8px rgba(118, 75, 162, 0.08);
    margin-bottom: 10px;
    display: block;
}

/* Página de Login */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

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

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

.login-header {
    background: linear-gradient(135deg, var(--ciano-logo) 0%, var(--azul-logo) 60%, var(--roxo-logo) 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.login-header i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.login-header h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.login-header p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.login-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.form-group label i {
    margin-right: 8px;
    color: #25d366;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: #25d366;
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
}

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

.message {
    margin: 15px 30px;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.hidden {
    display: none;
}

.login-footer {
    padding: 20px 30px;
    text-align: center;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 0.8rem;
}

/* Dashboard */
.dashboard-page {
    min-height: 100vh;
    background: #f8f9fa;
}

.dashboard-header {
    background: var(--azul-solido) !important;
    box-shadow: 0 2px 10px rgba(59, 46, 99, 0.08);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header h1 {
    color: #25d366;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    color: #666;
}

.btn-logout {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.btn-logout:hover {
    background: #c82333;
}

.dashboard-content {
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.status-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.status-card h2 {
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-indicator.connected {
    background: #d4edda;
    color: var(--azul-logo);
    border: 1px solid var(--azul-logo);
}

.status-indicator.disconnected {
    background: #f8d7da;
    color: var(--roxo-logo);
    border: 1px solid var(--roxo-logo);
}

.control-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--azul-logo);
    color: white;
}

.btn-primary:hover {
    background: var(--roxo-logo);
}

.btn-secondary {
    background: var(--ciano-logo);
    color: var(--roxo-escuro);
}

.btn-secondary:hover {
    background: var(--azul-logo);
    color: white;
}

.btn-danger {
    background: var(--roxo-logo);
    color: white;
}

.btn-danger:hover {
    background: var(--roxo-escuro);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #333;
}

/* Textarea */
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

textarea:focus {
    outline: none;
    border-color: #25d366;
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.notificator-title {
    margin: 0;
    font-size: 2.1rem;
    font-weight: 700;
    color: #fff;
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    background-clip: initial;
    letter-spacing: 1px;
    text-shadow: none;
}

/* Responsividade */
@media (max-width: 768px) {
    .login-container {
        max-width: 100%;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .control-buttons {
        flex-direction: column;
    }

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

    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

/* Enhan
ced QR Code Display Styles */
.qr-code-wrapper {
    background: #f8f9fa !important;
    border: 2px dashed #007bff !important;
    border-radius: 12px !important;
    padding: 25px !important;
    margin: 20px 0 !important;
    text-align: center !important;
    transition: all 0.3s ease;
}

.qr-code-wrapper:hover {
    border-color: #0056b3;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.qr-instructions h4 {
    color: #007bff !important;
    margin-bottom: 15px !important;
    font-size: 1.1rem !important;
}

.qr-instructions ol {
    text-align: left !important;
    display: inline-block !important;
    color: #666 !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
}

.qr-instructions ol li {
    margin-bottom: 5px !important;
    padding-left: 5px !important;
}

.qr-timer {
    background: rgba(40, 167, 69, 0.1) !important;
    border-radius: 6px !important;
    padding: 10px !important;
    margin-top: 15px !important;
    font-weight: 500 !important;
}

.qr-message {
    padding: 30px 20px !important;
    border-radius: 8px !important;
    text-align: center !important;
    margin: 20px 0 !important;
}

.qr-message.success {
    background: rgba(40, 167, 69, 0.1) !important;
    border: 2px solid #28a745 !important;
    color: #155724 !important;
}

.qr-message.info {
    background: rgba(0, 123, 255, 0.1) !important;
    border: 2px solid #007bff !important;
    color: #004085 !important;
}

.qr-message.ready {
    background: rgba(255, 193, 7, 0.1) !important;
    border: 2px solid #ffc107 !important;
    color: #856404 !important;
}

.qr-message.error {
    background: rgba(220, 53, 69, 0.1) !important;
    border: 2px solid #dc3545 !important;
    color: #721c24 !important;
}

.qr-message i {
    font-size: 2rem !important;
    margin-bottom: 10px !important;
    display: block !important;
}

.qr-message p {
    margin: 10px 0 !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
}

.qr-message p.small {
    font-size: 0.85rem !important;
    font-weight: normal !important;
    opacity: 0.8 !important;
}

/* Enhanced Status Indicators */
.status-indicator.connecting {
    color: #007bff !important;
}

.status-indicator.ready {
    color: #ffc107 !important;
}

.status-indicator.error {
    color: #dc3545 !important;
}

.status-details {
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    padding: 12px !important;
    margin-top: 10px !important;
}

.status-details div {
    margin-bottom: 5px !important;
}

.status-details div:last-child {
    margin-bottom: 0 !important;
}

/* QR Code Container Animation */
#qrCodeContainer {
    transition: all 0.3s ease-in-out;
}

#qrCodeContainer.show {
    opacity: 1;
    transform: translateY(0);
}

#qrCodeContainer.hide {
    opacity: 0;
    transform: translateY(-10px);
}

/* Responsive QR Code */
@media (max-width: 768px) {
    .qr-code-wrapper {
        padding: 15px !important;
        margin: 15px 0 !important;
    }

    .qr-instructions ol {
        font-size: 0.9rem !important;
    }

    .qr-message {
        padding: 20px 15px !important;
    }

    .qr-message i {
        font-size: 1.5rem !important;
    }
}

/* S
erver Information Styles */
.server-details {
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    padding: 15px !important;
    margin-top: 10px !important;
}

.info-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.info-row:last-child {
    border-bottom: none !important;
}

.info-label {
    font-weight: 600 !important;
    color: #333 !important;
    font-size: 0.9rem !important;
}

.info-value {
    color: #666 !important;
    font-size: 0.9rem !important;
    font-family: 'Courier New', monospace !important;
    background: rgba(255, 255, 255, 0.5) !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
}

/* Enhanced Button Styles */
.control-buttons {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 15px !important;
    justify-content: center !important;
}

.control-buttons .btn {
    flex: 1 !important;
    min-width: 120px !important;
    max-width: 150px !important;
    transition: all 0.3s ease !important;
}

.control-buttons .btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.control-buttons .btn:not(:disabled):hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    border: none !important;
    color: white !important;
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #218838, #1ea080) !important;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14) !important;
    border: none !important;
    color: #212529 !important;
}

.btn-warning:hover:not(:disabled) {
    background: linear-gradient(135deg, #e0a800, #e8590c) !important;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #e83e8c) !important;
    border: none !important;
    color: white !important;
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #c82333, #d91a72) !important;
}

/* Responsive Design for Controls */
@media (max-width: 768px) {
    .control-buttons {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .control-buttons .btn {
        max-width: none !important;
        min-width: auto !important;
    }

    .info-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 5px !important;
    }

    .info-value {
        align-self: stretch !important;
        text-align: center !important;
    }
}

/* Status Card Enhancements */
.status-card {
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 12px !important;
    padding: 25px !important;
    margin-bottom: 25px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px) !important;
    transition: all 0.3s ease !important;
}

.status-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
}

.status-card h2 {
    color: #333 !important;
    margin-bottom: 20px !important;
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.status-card h2 i {
    color: #007bff !important;
}

/* Error Display Styles */
.error-display {
    margin: 15px 0 !important;
    padding: 15px !important;
    border-radius: 8px !important;
    border-left: 4px solid !important;
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.error-critical {
    border-left-color: #dc3545 !important;
    background: rgba(220, 53, 69, 0.05) !important;
}

.error-high {
    border-left-color: #fd7e14 !important;
    background: rgba(253, 126, 20, 0.05) !important;
}

.error-medium {
    border-left-color: #ffc107 !important;
    background: rgba(255, 193, 7, 0.05) !important;
}

.error-low {
    border-left-color: #17a2b8 !important;
    background: rgba(23, 162, 184, 0.05) !important;
}

.error-header {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
    font-weight: 600 !important;
}

.error-title {
    flex: 1 !important;
    font-size: 1rem !important;
}

.error-time {
    font-size: 0.8rem !important;
    color: #666 !important;
    font-weight: normal !important;
}

.error-message {
    margin-bottom: 15px !important;
    color: #333 !important;
    line-height: 1.4 !important;
}

.error-actions {
    display: flex !important;
    gap: 10px !important;
    justify-content: flex-end !important;
}

.btn-sm {
    padding: 5px 12px !important;
    font-size: 0.85rem !important;
}

/* Error Animation */
.error-display {
    animation: slideInError 0.3s ease-out !important;
}

@keyframes slideInError {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Responsive Error Display */
@media (max-width: 768px) {
    .error-actions {
        flex-direction: column !important;
    }

    .error-header {
        flex-wrap: wrap !important;
    }

    .error-time {
        width: 100% !important;
        margin-top: 5px !important;
    }
}