.portal-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 0;
    background: var(--bg-white);
    min-height: 60vh;
    text-align: center;
}

.portal-section .container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.portal-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100rem;
    margin: 0 auto;
    text-align: center;
    background: var(--bg-light-gray);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.portal-container h1 {
    font-size: 2rem;
    color: var(--text-dark);
}

.portal-container p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    width: 70%;
}

#management-section {
    margin-top: 2rem;
    text-align: center;
}

#device-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, 320px);
    justify-content: center;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
}

#device-list .device-item {

    background: var(--bg-white);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);


    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
}

.device-info strong {
    color: var(--text-dark);
}

.device-info span {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-left: 0.5rem;
}

.error-message {
    color: #dc2626;
    background: #fee2e2;
    padding: 1rem;
    border-radius: 6px;
    display: none;

}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary-blue);
}

input:disabled+.slider {
    background-color: #e0e0e0;
    cursor: not-allowed;
}

input:checked+.slider:before {
    transform: translateX(22px);
}

.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--text-dark);
    color: var(--text-white);
    padding: 1rem 1.5rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.dashboard-section {
    margin-bottom: 40px;
}

.contact-buttons-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#installation-text {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.dashboard-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #1f2937;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 10px;
}


.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}


#customer-info-card {
    grid-column: 1 / 3;
}

.quick-actions-card {
    grid-column: 3 / 5;
}

.summary-card {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.card-label {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.card-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.status-active {
    color: #16a34a;
}

.status-paused {
    color: #f59e0b;
}

.status-canceled {
    color: #dc3545;

}

.status-past-due {
    color: #b45309;
}

.status-revoked {
    color: #b91c1c;
}

.status-refunded {
    color: #6b7280;
}



.usage-meter {
    margin-bottom: 15px;
}

.usage-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.usage-info label {
    font-weight: 500;
    color: #374151;
}

.usage-info span {
    color: #6b7280;
}

.progress-bar-container {
    width: 100%;
    background-color: #e5e7eb;
    border-radius: 8px;
    height: 12px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #16a34a;

    border-radius: 8px;
    transition: width 0.5s ease-in-out, background-color 0.5s ease-in-out;
}

.device-item:last-child {
    border-bottom: none;
}

.device-info strong {
    display: block;
    color: #1f2937;
}

.device-info span {
    font-size: 0.85rem;
    color: #6b7280;
}

.no-devices {
    text-align: center;
    color: #6b7280;
    padding: 20px;
}

.device-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-copy {
    background: none;
    border: 1px solid #d1d5db;
    color: #6b7280;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 5px;
    transition: background-color 0.2s, color 0.2s;
    font-size: 1rem;
}

.btn-copy:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

.btn-delete {
    background: none;
    border: none;
    color: #a0aec0;

    cursor: pointer;
    font-size: 1rem;
    padding: 5px 8px;
    margin-left: 8px;
    transition: color 0.2s;
}

.btn-delete:hover {
    color: #ef4444;

}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.visible {
    opacity: 1;
}

.modal-content {
    text-align: center;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.visible .modal-content {
    transform: scale(1);
}

.modal-header h2 {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    color: #333;
}

.modal-body p {
    margin: 0;
    line-height: 1.6;
    color: #555;
}

.modal-footer {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}


.section-header-tooltip {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;

}

.section-header-tooltip h2 {
    margin: 0;
}


.tooltip-container {
    position: relative;
    display: inline-block;
}


.tooltip-icon {
    font-size: 1.1rem;
    color: #a0aec0;

    cursor: help;

}


.tooltip-text {
    visibility: hidden;
    opacity: 0;
    width: 320px;
    background-color: #2d3748;

    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 15px;
    position: absolute;
    z-index: 1;
    bottom: 150%;

    left: 50%;
    margin-left: -160px;

    transition: opacity 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}


.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #2d3748 transparent transparent transparent;
}


.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}


.tooltip-text strong {
    font-size: 1rem;
}

.tooltip-text hr {
    border: none;
    border-top: 1px solid #4a5568;
    margin: 0.5rem 0;
}

.tooltip-text p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0.5rem 0 0 0;
}

#download-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}


#download-section p {
    max-width: 85%;
}


#main-download-btn {
    padding: 12px 24px;
    min-width: 250px;
    background: var(--primary-blue);
    color: var(--text-white);
}

#customer-info {
    font-size: 1rem;
    line-height: 1.5;
    color: #374151;
    font-weight: 600;
}

#customer-info small {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.25rem;
    font-weight: 600;
}


.card-label-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}

.pricing-section {
    padding: 3rem;
}

.btn-edit {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px;
}

.btn-edit:hover {
    color: var(--primary-blue);
}

.customer-edit-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 50%;
}

.customer-edit-form input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 0.95rem;
}

.customer-edit-form .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-small {

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.375rem;

    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;


    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    line-height: 1.25;
}

.login-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-normal);
}

.form-group input {
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 1rem;
    width: 100%;
}

#login-btn {
    padding: 0.85rem;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.form-links {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 400px;
    margin-top: 1.5rem;
}

.form-links a {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 0.9rem;
}

.form-links a:hover {
    text-decoration: underline;
}

.no-cnpjs {
    text-align: center;
    color: #6b7280;
    padding: 20px;
    background: transparent !important;
    border: none !important;
}

.change-password-link {
    font-size: 0.85rem;
    margin-top: 1rem;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    display: inline-block;

}

.change-password-link:hover {
    text-decoration: underline;
}


#password-change-modal .modal-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#password-change-modal .form-group {
    width: 100%;
    margin-bottom: 0;
}

#password-change-modal .form-group input {
    width: 100%;
}

.btn-change-password {
    margin-top: 1rem;
    background-color: #f3f4f6;

    color: var(--text-normal);
    border: 1px solid var(--border-light);
}

.btn-change-password:hover {
    background-color: #e5e7eb;

    color: var(--text-dark);
}

#cnpj-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.cnpj-slot-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 120px;
    transition: all 0.2s ease-in-out;
}

.cnpj-slot-card.status-active {
    justify-content: space-between;
    flex-direction: row;
    align-items: center;
}

.cnpj-slot-card.status-empty {
    border-style: dashed;
    cursor: pointer;
}

.cnpj-slot-card.status-empty:hover {
    border-color: var(--primary-blue);
    background-color: #f9fafb;
}

.cnpj-slot-card.status-cooldown {
    background-color: #f8f8f8;
    border-color: #e0e0e0;
    color: #9e9e9e;
    cursor: not-allowed;
}

.slot-info-active {
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--text-dark);
}

.slot-info-empty,
.slot-info-cooldown {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

.slot-info-empty span {
    font-weight: 500;
    color: var(--text-light);
}

.slot-info-cooldown .cooldown-label {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.slot-info-cooldown .cooldown-time {
    font-weight: bold;
}

.slot-actions button {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
}

.slot-actions button:hover {
    color: var(--accent-red);
}

.slot-add-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.slot-add-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--primary-blue);
    border-radius: 6px;
    font-size: 1rem;
    text-align: center;
}

.slot-add-form .form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.device-main-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
}

.device-usage-details {
    display: flex;
    justify-content: space-around;

    flex-wrap: wrap;

    gap: 1rem;
    background-color: #f9fafb;

    padding: 0.75rem;
    border-radius: 6px;
    border-top: 1px solid #f3f4f6;
}

.usage-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

.usage-stat i {
    font-size: 1rem;
    color: #9ca3af;

}

.usage-stat strong {
    font-weight: 600;
    color: var(--text-normal);
}


.quick-actions-card .actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    width: 85%;
}


.quick-actions-card .btn,
.quick-actions-card .btn-support {
    border: 1.5px solid transparent;

    transition: all 0.2s ease-in-out;
    font-size: 0.8rem;
}

.status-test {
    color: #8a2be2;
}

#verification-code-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#verification-code-input {
    font-size: 1rem;
    text-align: center;
    letter-spacing: 0.5em;
    max-width: 200px;
}

.cooldown-progress {
    width: 80%;
    background-color: #e5e7eb;
    border-radius: 4px;
    height: 8px;
    margin-top: 0.75rem;
    overflow: hidden;
}

.cooldown-progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 4px;
    transition: width 0.5s ease;
}

#cnpj-slots-grid,
#device-list {

    max-height: 400px;
    overflow-y: auto;

    padding-right: 10px;

}


#cnpj-slots-grid::-webkit-scrollbar,
#device-list::-webkit-scrollbar {
    width: 8px;
}

#cnpj-slots-grid::-webkit-scrollbar-track,
#device-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#cnpj-slots-grid::-webkit-scrollbar-thumb,
#device-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

#cnpj-slots-grid::-webkit-scrollbar-thumb:hover,
#device-list::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

.loader-container {
    display: none;

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-blue);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.no-items-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    border: 2px dashed var(--border-light);
    border-radius: 8px;
    color: var(--text-light);
    text-align: center;
}

.no-items-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.no-items-placeholder span {
    font-weight: 500;
}

.btn-logout {
    background-color: transparent;
    color: var(--accent-red);
    border: 2px solid var(--accent-red);
    padding: 0.75rem 1.5rem;

    font-size: 1rem;

    transition: all 0.3s ease;
}

.btn-logout:hover {
    background-color: #fee2e2;
    color: #b91c1c;
}

.quick-actions-card .actions-grid a {
    display: flex;

    align-items: center;

    justify-content: center;

    white-space: nowrap;

    color: white;
    border: 2px solid;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
    text-align: center;
    padding: 10px 15px;

}




#support-email {
    color: var(--text-white);
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

#support-whatsapp {
    color: var(--text-white);

    background-color: var(--accent-green);
    border-color: var(--accent-green);
}

#update-payment-btn {
    background-color: #6b7280;

    border-color: #6b7280;
}

#cancel-subscription-btn {
    background-color: var(--accent-red);
    border-color: var(--accent-red);
}





#support-email:hover {
    background-color: transparent;
    color: var(--primary-blue);
}

#support-whatsapp:hover {
    background-color: transparent;
    color: var(--accent-green);
}

#update-payment-btn:hover {
    background-color: transparent;
    color: #6b7280;
}

#cancel-subscription-btn:hover {
    background-color: transparent;
    color: var(--accent-red);
}

#change-plan-btn {
    background-color: #4B5563;

    border-color: #4B5563;
}

#change-plan-btn:hover {
    background-color: transparent;
    color: #4B5563;
}

.summary-grid.unlimited-plan {
    grid-template-columns: repeat(6, 1fr);
}


.summary-grid.unlimited-plan>.summary-card:not(#customer-info-card):not(.quick-actions-card) {
    grid-column: span 2;
}


.summary-grid.unlimited-plan #customer-info-card {
    grid-column: span 3;
}


.summary-grid.unlimited-plan .quick-actions-card {
    grid-column: span 3;
}

#reset-password-container {
    background-color: #ffffff;

    padding: 2.5rem;

    border-radius: 12px;

    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);

    width: 100%;
    max-width: 450px;

    text-align: center;
    border: 1px solid #e5e7eb;


    display: flex;
    flex-direction: column;
    align-items: center;
}


#reset-password-container h1 {
    font-size: 2rem;

    color: #1f2937;

    margin-bottom: 0.5rem;

}


#reset-password-container p {
    color: #6b7280;

    margin-bottom: 2rem;

    max-width: 350px;

    line-height: 1.5;
}


#reset-password-form {
    width: 100%;

    text-align: left;

}


#reset-password-form label {
    font-weight: 600;

    color: #374151;
    font-size: 0.9rem;
}


#reset-password-form input[type="password"] {
    width: 100%;
    padding: 0.9rem 1rem;

    border: 1px solid #d1d5db;

    border-radius: 8px;
    font-size: 1rem;
    margin-top: 0.5rem;

    transition: border-color 0.2s, box-shadow 0.2s;

}


#reset-password-form input[type="password"]:focus {
    outline: none;
    border-color: #3b82f6;

    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);

}


#reset-password-btn {
    width: 100%;
    padding: 0.9rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background-color: #2563eb;

    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 1rem;

    transition: background-color 0.2s;
}


#reset-password-btn:hover {
    background-color: #1d4ed8;

}

#installation-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.form-group-scheduling {
    display: flex;
    flex-direction: column;
}

.form-group-scheduling label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-normal);
}

.form-group-scheduling input,
.form-group-scheduling textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.form-group-scheduling input:read-only {
    background-color: #e5e7eb;
    cursor: not-allowed;
    color: #6b7280;
}

#scheduling-form .btn {
    padding: 0.85rem;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.plan-selection-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.plan-option-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background-color: var(--bg-white);
    transition: all 0.2s ease-in-out;
}

.btn-details {
    margin-top: 2rem;
}

.plan-option-card:hover {
    border-color: var(--primary-blue);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
}

.plan-option-card .plan-info {
    text-align: center;
}

.plan-option-card .plan-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.25rem 0;
}

.plan-option-card .plan-description {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0;
    width: 100%;

}

.plan-option-card .btn {
    white-space: nowrap;
    padding: 0.75rem 1.5rem;
}

.price-annual p {
    margin: 0;
    text-align: center;
}

.pricing-section .price-annual {
    display: none;
}

.pricing-section .price-monthly {
    display: block;
}

.pricing-section.show-annual .price-annual {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem;
}

.pricing-section.show-annual .price-monthly {
    display: none;
}