* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Sistema de Abas */
.tabs-container {
    margin-bottom: 20px;
}

.tabs-header {
    display: flex;
    background: white;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    background: #f8f9fa;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-button:hover:not(.disabled) {
    background: #e9ecef;
    color: #333;
}

.tab-button.active {
    background: white;
    color: #ff6b35;
    border-bottom-color: #ff6b35;
}

.tab-button.disabled {
    background: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
    opacity: 0.6;
}

.tab-button:first-child {
    border-radius: 12px 0 0 0;
}

.tab-button:last-child {
    border-radius: 0 12px 0 0;
}

/* Conteúdo das Abas */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Seção de Entrada */
.input-section {
    padding: 30px;
    background: white;
}

.frete-section {
    margin-bottom: 30px;
}

.frete-section h2 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

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

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

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

input:checked + .slider {
    background-color: #4CAF50;
}

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

.toggle-label {
    font-weight: 600;
    color: #4CAF50;
}

/* Grupos de Input */
.input-group {
    margin-bottom: 25px;
}

/* Container para label e help-icon */
.label-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.label-container label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin: 0;
    letter-spacing: 0.5px;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #ddd;
    border-radius: 50%;
    font-size: 10px;
    color: #666;
    cursor: help;
    transition: background-color 0.2s;
}

.help-icon:hover {
    background: #bbb;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgb(222, 222, 222);
    border: 2px solid rgb(222, 222, 222);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.input-wrapper:focus-within {
    border-color: rgb(222, 222, 222);
}



.currency {
    padding: 12px 15px;
    background: rgb(250, 250, 250);
    font-weight: 600;
    color: rgb(10, 10, 10);
    border-right: 1px solid rgb(250, 250, 250);
}

.input-wrapper input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
}

.select-input {
    width: 100%;
    padding: 12px 15px;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23666666" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 40px;
}

.multiplier-container {
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-left: 1px solid #e0e0e0;
}

.multiplier {
    font-weight: 600;
    color: rgb(255, 60, 0);
    margin-right: 8px;
}

.multiplier-arrows {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.arrow-up, .arrow-down {
    background: none;
    border: none;
    font-size: 10px;
    color: rgb(10, 10, 10);
    cursor: pointer;
    padding: 2px;
    transition: color 0.2s;
}

.arrow-up:hover, .arrow-down:hover {
    color: rgb(255, 60, 0);
}

/* Seção de Resultados */
.results-section {
    padding: 30px;
    background: white;
}

.main-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.result-item {
    text-align: center;
}

.result-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.result-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.result-value.primary {
    font-size: 24px;
    color: rgb(255, 60, 0);
}

.secondary-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.result-box {
    background: rgb(222, 222, 222);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgb(222, 222, 222);
}

.result-box .result-label {
    font-size: 11px;
    margin-bottom: 5px;
}

.result-box .result-value {
    font-size: 14px;
    font-weight: 600;
}

/* Margem de Lucro */
.margin-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid white;
    margin-bottom: 20px;
}

/* Tema escuro - Margem de Lucro */
body.dark-theme .margin-section {
    background: #3a3a3a !important;
    border: 1px solid #3a3a3a !important;
}

.margin-section h3 {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.margin-slider-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
}

.margin-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    transition: background 0.3s ease;
}

.margin-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: linear-gradient(to right, var(--track-color) var(--track-fill), #ddd var(--track-fill));
    border-radius: 3px;
    transition: background 0.3s ease;
}

.margin-slider::-moz-range-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: linear-gradient(to right, var(--track-color) var(--track-fill), #ddd var(--track-fill));
    border-radius: 3px;
    transition: background 0.3s ease;
}

.margin-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--track-color);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease;
    margin-top: -7px;
}

.margin-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--track-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease;
    margin-top: -7px;
}

.margin-value {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    min-width: 50px;
    text-align: right;
}



/* Header do usuário */
.user-header {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
    position: fixed;
    top: 0;
    left: 0; /* Começar do início da tela */
    right: 0;
    z-index: 999;
    height: 60px; /* Altura fixa para o header */
}

.logo-container {
    flex: 0 0 auto;
}

.logo {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

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

.user-info span {
    font-weight: 600;
    color: #333;
}

.logout-btn {
    background: rgb(255 255 255);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

/* Cores da Margem de Lucro */
.margin-slider {
    --track-color: #FF0000;
    --track-fill: 0%;
    background: linear-gradient(to right, var(--track-color) var(--track-fill), #ddd var(--track-fill));
    transition: background 0.3s ease;
}

.margin-slider.margem-vermelho {
    --track-color: #FF0000;
}

.margin-slider.margem-laranja {
    --track-color: #FFA500;
}

.margin-slider.margem-amarelo {
    --track-color: #FFFF00;
}

.margin-slider.margem-verde-lima {
    --track-color: #32CD32;
}

.margin-slider.margem-verde-claro {
    --track-color: #90EE90;
}

.margin-slider.margem-azul-ciano {
    --track-color: #00FFFF;
}

.margin-slider.margem-azul-escuro {
    --track-color: #00008B;
}

/* Estilos para Custo Extra Dinâmico */
.add-custo-extra-btn {
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    transition: background-color 0.2s;
}

.add-custo-extra-btn:hover {
    background: #45a049;
}

.input-group label .add-custo-extra-btn {
    margin-top: -2px;
}

#custosExtrasContainer, #custosExtrasContainerML {
    margin-top: 15px;
}

.custo-extra-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.custo-extra-item {
    flex: 1;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.custo-extra-item:focus-within {
    border-color: #4CAF50;
}

.custo-extra-type-selector {
    padding: 12px 15px;
    background: rgb(250, 250, 250);
    font-weight: 600;
    color: rgb(10, 10, 10);
    border: none;
    border-right: 1px solid rgb(250, 250, 250);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23666666" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 16px;
    padding-right: 25px;
}

.custo-extra-value {
    flex: 1;
    padding: 12px 15px;
    border: none;
    outline: none;
    font-size: 16px;
    background: rgb(222, 222, 222);
}

.remove-custo-extra-btn {
    background: rgb(255, 60, 0);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s;
}

.remove-custo-extra-btn:hover {
    background: #d32f2f;
}

/* Estilos para o botão Limpar Campos */
.limpar-campos-btn {
    display: block;
    width: 100%;
    padding: 15px 20px;
    margin-top: 20px;
    background-color: rgb(255, 60, 0);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.limpar-campos-btn:hover {
    background-color: rgb(230, 50, 0);
}

/* Coming Soon */
.coming-soon {
    background: white;
    border-radius: 0 0 12px 12px;
    padding: 60px 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.coming-soon h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.coming-soon p {
    font-size: 16px;
    color: #666;
}

/* Responsividade */
@media (max-width: 768px) {
    .calculator-wrapper {
        grid-template-columns: 1fr;
    }
    
    .secondary-results {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-results {
        grid-template-columns: 1fr;
    }
    
    .tabs-header {
        flex-direction: column;
    }
    
    .tab-button {
        border-radius: 0 !important;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .tab-button:last-child {
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .input-section,
    .results-section {
        padding: 20px;
    }
    
    .secondary-results {
        grid-template-columns: 1fr;
    }
}

/* Animações */
.result-value {
    transition: all 0.3s ease;
}

.input-wrapper {
    transition: all 0.2s ease;
}

.result-box {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.result-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}



/* Estilos para o botão de usuário e menu dropdown */
.user-menu-container {
    position: relative;
    display: inline-block;
    margin-left: 1px;
}

.user-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-icon-btn img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ff6b35;
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    box-shadow: 0 8px 16px rgb(0 0 0);
    z-index: 1;
    min-width: 200px;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 10px;
}

.user-dropdown-menu.show {
    display: block;
}

.dropdown-header {
    padding: 12px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    color: #333;
}

.dropdown-item {
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f1f1f1;
}

.dropdown-item.logout-btn {
    color: #333;
    font-weight: 600;
    border-top: 1px solid #eee;
}

.dropdown-item.logout-btn:hover {
    background-color: rgb(255, 107, 53);
}

/* Estilos para o Toggle de Tema */
.theme-toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

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

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

input:checked + .switch .slider {
    background-color: #ff6b35;
}

input:focus + .switch .slider {
    box-shadow: 0 0 1px #ff6b35;
}

input:checked + .switch .slider:before {
    -webkit-transform: translateX(20px);
    -ms-transform: translateX(20px);
    transform: translateX(20px);
}

/* Estilos para o tema escuro */
body.dark-theme {
    background-color: #1a1a1a;
    color: #f5f5f5;
}

body.dark-theme .tabs-header,
body.dark-theme .calculator-wrapper,
body.dark-theme .input-section,
body.dark-theme .results-section,
body.dark-theme .user-header,
body.dark-theme .user-dropdown-menu,
body.dark-theme .dropdown-header,
body.dark-theme .dropdown-item,
body.dark-theme .result-box {
    background-color: #3a3a3a;
}

body.dark-theme .tab-button {
    background: #4a4a4a;
    color: #ccc;
}

body.dark-theme .tab-button:hover:not(.disabled) {
    background: #5a5a5a;
    color: #eee;
}

body.dark-theme .tab-button.active {
    background: #3a3a3a;
    color: #ff6b35;
}

body.dark-theme .frete-section h2,
body.dark-theme .label-container label,
body.dark-theme .input-group label,
body.dark-theme .result-label,
body.dark-theme .result-value,
body.dark-theme .margin-section h3,
body.dark-theme .user-info span,
body.dark-theme .dropdown-header,
body.dark-theme .dropdown-item {
    color: #f5f5f5 !important;
}

body.dark-theme .input-wrapper {
    background: #4a4a4a;
    border-color: #4a4a4a;
}

body.dark-theme .input-wrapper:focus-within {
    border-color: #ff6b35;
}

body.dark-theme .currency {
    background: #5a5a5a;
    color: #f5f5f5;
    border-right-color: #5a5a5a;
}

body.dark-theme .input-wrapper input,
body.dark-theme .select-input {
    color: #f5f5f5;
}

body.dark-theme .multiplier-arrows button {
    color: #f5f5f5;
}

body.dark-theme .help-icon {
    background: #5a5a5a;
    color: #f5f5f5;
}

body.dark-theme .help-icon:hover {
    background: #6a6a6a;
}

body.dark-theme .margin-section {
    background: #3a3a3a !important;
    border-color: #3a3a3a !important;
}

body.dark-theme .margin-slider::-webkit-slider-runnable-track {
    background: linear-gradient(to right, var(--track-color) var(--track-fill), #5a5a5a var(--track-fill));
}

body.dark-theme .margin-slider::-moz-range-track {
    background: linear-gradient(to right, var(--track-color) var(--track-fill), #5a5a5a var(--track-fill));
}

body.dark-theme .margin-value {
    color: #f5f5f5 !important;
}

body.dark-theme .margin-section h3 {
    color: #f5f5f5 !important;
}

body.dark-theme .result-box {
    background-color: #3a3a3a !important;
    border-color: #4a4a4a !important;
}

body.dark-theme .result-label {
    color: #f5f5f5 !important;
}

body.dark-theme .result-value {
    color: #f5f5f5 !important;
}

body.dark-theme .add-custo-extra-btn {
    background: #4a4a4a !important;
    color: #f5f5f5 !important;
    border-color: #4a4a4a !important;
}

body.dark-theme .add-custo-extra-btn:hover {
    background: #5a5a5a !important;
}

body.dark-theme .clear-btn {
    background: #ff6b35 !important;
    color: #ffffff !important;
}

body.dark-theme .clear-btn:hover {
    background: #e55a2b !important;
}

body.dark-theme input::placeholder {
    color: #aaa !important;
}

body.dark-theme .multiplier {
    color: #f5f5f5 !important;
}

body.dark-theme .custo-extra-item {
    background: #4a4a4a;
    border-color: #4a4a4a;
}

body.dark-theme .custo-extra-item:focus-within {
    border-color: #4CAF50;
}

body.dark-theme .custo-extra-type-selector {
    background: #5a5a5a;
    color: #f5f5f5;
    border-right-color: #5a5a5a;
}

body.dark-theme .custo-extra-value {
    color: #f5f5f5;
}

body.dark-theme .coming-soon h2,
body.dark-theme .coming-soon p {
    color: #f5f5f5;
}

body.dark-theme .user-icon-btn svg circle,
body.dark-theme .user-icon-btn svg path {
    stroke: #ff6b35;
    fill: #3a3a3a;
}

body.dark-theme .user-icon-btn svg circle:first-child {
    fill: #3a3a3a;
}

body.dark-theme .user-icon-btn svg circle:nth-child(2) {
    fill: none;
}

body.dark-theme .user-icon-btn svg path {
    fill: none;
}
olor: #3a3a3a;
    color: #f5f5f5;
}

body.dark-theme .tab-button {
    background: #4a4a4a;
    color: #bbb;
}

body.dark-theme .tab-button:hover:not(.disabled) {
    background: #5a5a5a;
    color: #f5f5f5;
}

body.dark-theme .tab-button.active {
    background: #3a3a3a;
    color: #ff6b35;
}

body.dark-theme .input-wrapper,
body.dark-theme .custo-extra-item {
    background: #4a4a4a;
    border-color: #4a4a4a;
}

body.dark-theme .currency,
body.dark-theme .custo-extra-type-selector {
    background: #5a5a5a;
    border-right-color: #5a5a5a;
    color: #f5f5f5;
}

body.dark-theme .input-wrapper input,
body.dark-theme .select-input,
body.dark-theme .custo-extra-value {
    color: #f5f5f5;
}

body.dark-theme .help-icon {
    background: #5a5a5a;
    color: #f5f5f5;
}

body.dark-theme .help-icon:hover {
    background: #6a6a6a;
}

body.dark-theme .result-label,
body.dark-theme .margin-section h3,
body.dark-theme .user-info span {
    color: #bbb;
}

body.dark-theme .result-value,
body.dark-theme .margin-value {
    color: #f5f5f5 !important;
}

body.dark-theme .margin-section h3 {
    color: #f5f5f5 !important;
}

body.dark-theme .result-box {
    background-color: #3a3a3a !important;
    border-color: #4a4a4a !important;
}

body.dark-theme .result-label {
    color: #f5f5f5 !important;
}

body.dark-theme .result-value {
    color: rgb(255, 60, 0) !important;
}

body.dark-theme .add-custo-extra-btn {
    background: #4a4a4a !important;
    color: #f5f5f5 !important;
    border-color: #4a4a4a !important;
}

body.dark-theme .add-custo-extra-btn:hover {
    background: #5a5a5a !important;
}

body.dark-theme .clear-btn {
    background: #ff6b35 !important;
    color: #ffffff !important;
}

body.dark-theme .clear-btn:hover {
    background: #e55a2b !important;
}

body.dark-theme input::placeholder {
    color: #aaa !important;
}

body.dark-theme .multiplier {
    color: #f5f5f5 !important;
}

body.dark-theme .margin-slider::-webkit-slider-runnable-track {
    background: linear-gradient(to right, var(--track-color) var(--track-fill), #5a5a5a var(--track-fill));
}

body.dark-theme .margin-slider::-moz-range-track {
    background: linear-gradient(to right, var(--track-color) var(--track-fill), #5a5a5a var(--track-fill));
}

body.dark-theme .dropdown-header {
    background-color: #4a4a4a;
    color: #f5f5f5;
}

body.dark-theme .dropdown-item {
    color: #f5f5f5;
}

body.dark-theme .dropdown-item:hover {
    background-color: #5a5a5a;
}

body.dark-theme .dropdown-item.logout-btn {
    border-top-color: #4a4a4a;
}

body.dark-theme .dropdown-item.logout-btn:hover {
    background-color: #ff6b35;
    color: white;
}

body.dark-theme .switch .slider {
    background-color: #5a5a5a;
}

input:checked + .switch .slider {
    background-color: #ff6b35;
}

input:focus + .switch .slider {
    box-shadow: 0 0 1px #ff6b35;
}

input:checked + .switch .slider:before {
    -webkit-transform: translateX(20px);
    -ms-transform: translateX(20px);
    transform: translateX(20px);
}


body.dark-theme select option {
    background-color: #3a3a3a;
    color: #f5f5f5;
}
/* Estilos para Sidebar e SPA */

/* Layout principal */
#app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 60px;
    background: linear-gradient(135deg, rgb(255, 60, 0) 0%, #f7931e 100%);
    color: white;
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    transition: width 0.3s;
    overflow: hidden;
    position: fixed;
    top: 60px; /* Altura do header */
    left: 0;
    height: calc(100vh - 60px); /* Altura total menos a altura do header */
    z-index: 999;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar:hover {
    width: 220px;
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.5rem 1.5rem 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1rem;
}

.brand__icon {
    width: 32px;
    height: 32px;
    margin-right: 0.75rem;
    border-radius: 6px;
    object-fit: contain;
}

.brand__text {
    font-size: 1.1rem;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.15s ease-in-out 0.15s;
    color: white;
}

.sidebar:hover .brand__text {
    opacity: 1;
}

/* Navegação */
.nav {
    flex-grow: 1;
}

.nav__item {
    display: flex;
    align-items: center;
    padding: 0.9rem 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    margin-bottom: 0.3rem;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.nav__item:hover,
.nav__item.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateX(2px);
}

.nav__item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: white;
    border-radius: 0 2px 2px 0;
}

.nav__item i {
    font-size: 1.3rem;
    margin-right: 0.75rem;
    min-width: 20px;
    text-align: center;
}

.nav__item span {
    opacity: 0;
    transition: opacity 0.15s ease-in-out 0.15s;
    font-weight: 500;
    font-size: 0.9rem;
}

.sidebar:hover .nav__item span {
    opacity: 1;
}

/* Conteúdo principal */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: #f5f5f5;
    margin-top: 60px; /* Altura do header */
    margin-left: 60px; /* Largura da sidebar */
}
.user-header {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
    position: fixed;
    top: 0;
    left: 0px; /* Ajustar para a largura da sidebar */
    right: 0;
    z-index: 999;
    height: 60px; /* Altura fixa para o header */
}

/* Container de conteúdo */
.content-container {
    flex-grow: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* Estilos para páginas */
.page-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.welcome-section {
    background: linear-gradient(135deg, rgb(255, 60, 0) 0%, #f7931e 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.welcome-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.welcome-section p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Seção de atualizações */
.updates-section {
    padding: 2rem;
}

.updates-section h2 {
    color: #ff6b35;
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.update-item {
    display: flex;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.update-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.update-version {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 1.5rem;
    min-width: 60px;
    text-align: center;
    height: fit-content;
}

.update-content ul {
    list-style: none;
    padding: 0;
}

.update-content li {
    padding: 0.3rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.update-content li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* Seção de funcionalidades futuras */
.future-features-section {
    padding: 2rem;
    background: #f8f9fa;
}

.future-features-section h2 {
    color: #ff6b35;
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s ease-in-out;
}

.feature-card:hover {
    transform: translateY(-2px);
}

.feature-card i {
    font-size: 3rem;
    color: #ff6b35;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.status.coming-soon {
    background: #ffc107;
    color: #856404;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Páginas "Em breve" */
.coming-soon-page {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coming-soon-content {
    text-align: center;
    padding: 3rem;
    max-width: 600px;
}

.coming-soon-content i {
    font-size: 4rem;
    color: #ff6b35;
    margin-bottom: 2rem;
}

.coming-soon-content h1 {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.coming-soon-content > p {
    color: #666;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.features-preview {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.features-preview h3 {
    color: #ff6b35;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.features-preview ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.features-preview li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 2rem;
    color: #555;
}

.features-preview li::before {
    content: '🚀';
    position: absolute;
    left: 0;
}

/* Container "Em breve" para abas */
.coming-soon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: white;
    border-radius: 0 0 12px 12px;
}

/* Responsividade */
@media (max-width: 768px) {
    .sidebar {
        width: 50px;
    }
    
    .sidebar:hover {
        width: 200px;
    }
    
    .content-container {
        padding: 1rem;
    }
    
    .user-header {
        padding: 1rem;
    }
    
    .welcome-section {
        padding: 2rem 1rem;
    }
    
    .welcome-section h1 {
        font-size: 2rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .update-item {
        flex-direction: column;
    }
    
    .update-version {
        margin-right: 0;
        margin-bottom: 1rem;
        width: fit-content;
    }
}


.sidebar:hover + .main-content {
    margin-left: 220px;
}


/* ===== CORREÇÕES PARA O TEMA ESCURO ===== */

/* Tema escuro para o conteúdo principal */
body.dark-theme .main-content {
    background-color: #3a3a3a !important;
}

/* Tema escuro para a seção de boas-vindas */
body.dark-theme .welcome-section {
    background: linear-gradient(135deg, rgb(255, 60, 0) 0%, #f7931e 100%) !important;
    color: white !important;
}

body.dark-theme .welcome-section h1 {
    color: white !important;
}

body.dark-theme .welcome-section p {
    color: white !important;
    opacity: 0.9;
}

/* Tema escuro para a seção de atualizações */
body.dark-theme .updates-section {
    background-color: #333 !important;
    color: #e2e8f0 !important;
}

body.dark-theme .updates-section h2 {
    color: #ff6b35 !important;
}

body.dark-theme .update-item {
    border-bottom-color: #4a5568 !important;
}

body.dark-theme .update-version {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%) !important;
    color: white !important;
}

body.dark-theme .update-content {
    color: #e2e8f0 !important;
}

body.dark-theme .update-content ul {
    color: #e2e8f0 !important;
}

body.dark-theme .update-content li {
    color: #e2e8f0 !important;
}

body.dark-theme .update-content li::before {
    color: #28a745 !important;
}

/* Tema escuro para a seção de funcionalidades futuras */
body.dark-theme .future-features-section {
    background-color: #333 !important;
    color: #e2e8f0 !important;
}

body.dark-theme .future-features-section h2 {
    color: rgb(255, 60, 0) !important;
}

body.dark-theme .feature-card {
    background-color: #3a3a3a !important;
    color: #e2e8f0 !important;
    border: 1px solid #3a3a3a !important;
}

body.dark-theme .feature-card:hover {
    background-color: #5a6578 !important;
    transform: translateY(-2px);
}

body.dark-theme .feature-card i {
    color: rgb(255, 60, 0) !important;
}

body.dark-theme .feature-card h3 {
    color: #e2e8f0 !important;
}

body.dark-theme .feature-card p {
    color: #a0aec0 !important;
}

body.dark-theme .status.coming-soon {
    background: #ffc107 !important;
    color: #856404 !important;
}

/* Tema escuro para o container da página */
body.dark-theme .page-container {
    background-color: #333 !important;
    color: #e2e8f0 !important;
}

/* Tema escuro para páginas "Em breve" */
body.dark-theme .coming-soon-page {
    background-color: #333 !important;
    color: #e2e8f0 !important;
}

body.dark-theme .coming-soon-content {
    color: #e2e8f0 !important;
}

body.dark-theme .coming-soon-content h1 {
    color: #e2e8f0 !important;
}

body.dark-theme .coming-soon-content p {
    color: rgb(255 255 255) !important;
}

body.dark-theme .coming-soon-content i {
    color: rgb(255, 60, 0) !important;
}

body.dark-theme .features-preview {
    background-color: #3a3a3a !important;
    color: #e2e8f0 !important;
}

body.dark-theme .features-preview h3 {
    color: rgb(255, 60, 0) !important;
}

body.dark-theme .features-preview li {
    color: #e2e8f0 !important;
}

/* Tema escuro para container "Em breve" */
body.dark-theme .coming-soon-container {
    background-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

/* Garantir que todos os textos tenham contraste adequado */
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6 {
    color: rgb(255 255 255) !important;
}

body.dark-theme p {
    color: rgb(255 255 255) !important;
}

/* Tema escuro para elementos específicos que podem ter sido perdidos */
body.dark-theme .content-container {
    background-color: transparent !important;
}

/* Melhorar a visibilidade dos links no tema escuro */
body.dark-theme a {
    color: rgb(0 0 0) !important;
}

body.dark-theme a:hover {
    color: rgb(255 255 255) !important;
}

/* Tema escuro para elementos de lista */
body.dark-theme ul,
body.dark-theme ol {
    color: #e2e8f0 !important;
}

body.dark-theme li {
    color: #e2e8f0 !important;
}

/* Garantir que os ícones mantenham a cor correta */
body.dark-theme .fa,
body.dark-theme .fas,
body.dark-theme .far,
body.dark-theme .fab {
    color: inherit;
}

/* Tema escuro para elementos de destaque */
body.dark-theme .highlight {
    background-color: #4a5568 !important;
    color: #e2e8f0 !important;
}

/* Tema escuro para separadores */
body.dark-theme hr {
    border-color: #4a5568 !important;
}

/* Tema escuro para elementos de código (se houver) */
body.dark-theme code,
body.dark-theme pre {
    background-color: #4a5568 !important;
    color: #e2e8f0 !important;
    border: 1px solid #4a5568 !important;
}

/* Tema escuro para tabelas (se houver) */
body.dark-theme table {
    background-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

body.dark-theme th,
body.dark-theme td {
    border-color: #4a5568 !important;
    color: #e2e8f0 !important;
}

body.dark-theme th {
    background-color: #4a5568 !important;
}

/* Tema escuro para elementos de formulário adicionais */
body.dark-theme textarea {
    background-color: #333 !important;
    color: #e2e8f0 !important;
    border-color: rgb(255, 60, 0) !important;
}

body.dark-theme textarea:focus {
    border-color: #ff6b35 !important;
}

/* Tema escuro para elementos de navegação breadcrumb (se houver) */
body.dark-theme .breadcrumb {
    background-color: #4a5568 !important;
}

body.dark-theme .breadcrumb-item {
    color: #a0aec0 !important;
}

body.dark-theme .breadcrumb-item.active {
    color: #e2e8f0 !important;
}

/* Tema escuro para alertas e notificações (se houver) */
body.dark-theme .alert {
    background-color: #4a5568 !important;
    color: #e2e8f0 !important;
    border-color: #4a5568 !important;
}

body.dark-theme .alert-success {
    background-color: #2d5a3d !important;
    color: #a3d9a5 !important;
    border-color: #2d5a3d !important;
}

body.dark-theme .alert-warning {
    background-color: #5d4e37 !important;
    color: #f4d03f !important;
    border-color: #5d4e37 !important;
}

body.dark-theme .alert-danger {
    background-color: #5d2d2d !important;
    color: #f1948a !important;
    border-color: #5d2d2d !important;
}

body.dark-theme .alert-info {
    background-color: #2d4a5d !important;
    color: #85c1e9 !important;
    border-color: #2d4a5d !important;
}



/* Seção de Salvar Cálculo - Design Aprimorado */
.save-section-enhanced {
    background: #f8f9fa;
    border-radius: 12px;
    margin-top: 20px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.save-header {
    background: rgb(255 255 255);
    padding: 0;
    border-bottom: 1px solid rgb(255 255 255);
}

.save-title-container {
    display: flex;
    align-items: stretch;
    height: 50px;
    gap: 15px; /* Adiciona espaçamento entre os itens flex */
}

.save-title-input {
    flex: 1;
    border: none;
    padding: 0 16px;
    font-size: 16px;
    color: #ff6b35;
    background: transparent;
    outline: none;
    font-weight: 500;
}

.save-title-input::placeholder {
    color: #ff6b35;
    opacity: 0.7;
}

.photo-upload-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
    border-left: 1px solid #e0e0e0;
}

.photo-upload-btn:hover {
    background: #e55a2b;
}

.photo-upload-btn i {
    font-size: 16px;
}

.photo-url-input {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-top: 1px solid #e0e0e0;
    font-size: 14px;
    color: #666;
    background: #f8f9fa;
    outline: none;
}

.save-body {
    padding: 20px;
}

.save-field {
    margin-bottom: 5px;
}

.save-field:last-of-type {
    margin-bottom: 0;
}

.save-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.save-field textarea,
.save-field input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    transition: border-color 0.2s;
    resize: vertical;
    min-height: 44px;
}

.save-field textarea {
    min-height: 80px;
}

.save-field textarea:focus,
.save-field input[type="text"]:focus {
    border-color: #ff6b35;
    outline: none;
}

.save-btn-enhanced {
    width: 100%;
    padding: 14px;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.save-btn-enhanced:hover {
    background: #e55a2b;
}

.save-btn-enhanced:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Tema escuro para a seção de salvar cálculo aprimorada */
body.dark-theme .save-section-enhanced {
    background: #3a3a3a;
    border-color: #3a3a3a;
}

body.dark-theme .save-header {
    background: #3a3a3a;
    border-bottom-color: #3a3a3a;
}

body.dark-theme .save-title-input {
    color: #ff6b35;
    background: #2c2c2c;
}

body.dark-theme .save-title-input::placeholder {
    color: #ff6b35;
}

body.dark-theme .photo-upload-btn {
    border-left-color: #444;
}

body.dark-theme .photo-url-input {
    background: #3a3a3a;
    border-top-color: #444;
    color: #eee;
}

body.dark-theme .save-field label {
    color: #eee;
}

body.dark-theme .save-field textarea,
body.dark-theme .save-field input[type="text"] {
    background-color: #333;
    border-color: rgb(255, 60, 0);
    color: #eee;
}

body.dark-theme .save-field textarea:focus,
body.dark-theme .save-field input[type="text"]:focus {
    border-color: #ff6b35;
}

/* Lista de Cálculos Salvos */
.saved-calculations-section {
    background: white;
    border-radius: 12px;
    margin-top: 20px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    width: 100%; /* Largura total do container pai */
    max-width: none; /* Remove qualquer limitação de largura máxima */
}

.saved-calculations-header {
    background: linear-gradient(135deg, rgb(255, 60, 0), rgb(255 158 0));
    color: white;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.saved-calculations-header i {
    font-size: 18px;
}

.saved-calculations-list {
    max-height: 400px;
    overflow-y: auto;
    width: 100%; /* Garante que a lista ocupe toda a largura */
}

.calculation-item {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%; /* Garante que cada item ocupe toda a largura */
}

.calculation-item:hover {
    background: #f8f9fa;
}

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

.calculation-photo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 20px;
    flex-shrink: 0; /* Impede que a foto encolha */
}

.calculation-info {
    flex: 1;
    min-width: 0; /* Permite que o texto seja truncado se necessário */
}

.calculation-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    word-wrap: break-word; /* Quebra palavras longas */
}

.calculation-meta {
    font-size: 12px;
    color: #666;
    display: flex;
    gap: 12px;
    flex-wrap: wrap; /* Permite quebra de linha se necessário */
}

.calculation-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0; /* Impede que os botões encolham */
}

.calculation-action-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap; /* Impede quebra de linha nos botões */
}

.calculation-action-btn:hover {
    background: #f0f0f0;
}

.calculation-action-btn.load {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.calculation-action-btn.load:hover {
    background: #218838;
}

.calculation-action-btn.delete {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.calculation-action-btn.delete:hover {
    background: #c82333;
}

.no-calculations {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    width: 100%; /* Garante que ocupe toda a largura */
}

.no-calculations i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 16px;
}

/* Tema escuro para lista de cálculos */
body.dark-theme .saved-calculations-section {
    background: #3a3a3a;
    border-color: #444;
}

body.dark-theme .calculation-item {
    border-bottom-color: #444;
}

body.dark-theme .calculation-item:hover {
    background: #2c2c2c;
}

body.dark-theme .calculation-photo {
    background: #2c2c2c;
    color: #666;
}

body.dark-theme .calculation-name {
    color: #eee;
}

body.dark-theme .calculation-meta {
    color: #aaa;
}

body.dark-theme .calculation-action-btn {
    border-color: #555;
    color: #eee;
}

body.dark-theme .calculation-action-btn:hover {
    background: #444;
}

body.dark-theme .no-calculations {
    color: #aaa;
}

body.dark-theme .no-calculations i {
    color: #555;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 768px) {
    .saved-calculations-section {
        margin-left: -10px;
        margin-right: -10px;
        border-radius: 0;
        width: calc(100% + 20px); /* Compensa as margens negativas */
    }
    
    .calculation-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .calculation-photo {
        align-self: center;
    }
    
    .calculation-info {
        width: 100%;
        text-align: center;
    }
    
    .calculation-actions {
        width: 100%;
        justify-content: center;
    }
    
    .calculation-meta {
        justify-content: center;
    }
}

/* Ajustes específicos para garantir largura total */
.results-section .saved-calculations-section {
    margin-left: -605px; /* Compensa o padding da seção de resultados */
    margin-right: -30px;
    width: calc(100% + 620px); /* Adiciona o padding de volta */
}

/* Para dispositivos móveis, ajustar o comportamento */
@media (max-width: 768px) {
    .results-section .saved-calculations-section {
        margin-left: -20px;
        margin-right: -20px;
        width: calc(100% + 40px);
    }
}



/* Estilos para a seção de salvamento aprimorada */
.save-section-enhanced {
    background: rgb(255 255 255);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid rgb(255 255 255);
}

.save-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.save-title-container {
    flex-grow: 1;
    position: relative;
}

.save-title-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgb(255, 60, 0);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    transition: border-color 0.2s;
}

.save-title-input:focus {
    outline: none;
    border-color: #ff6b35;
}

.photo-upload-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.photo-upload-btn:hover {
    background: #e55a2b;
}

.photo-upload-btn i {
    font-size: 16px;
}

.save-body {
    display: grid;
    gap: 1px;
}

.save-field label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    display: block;
}

.save-field textarea,
.save-field input {
    width: 100%;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.save-btn-enhanced {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.save-btn-enhanced:hover {
    background: #e55a2b;
}

/* Estilos para a lista de cálculos salvos */
.saved-calculations-section {
    margin-top: 20px;
}

.saved-calculations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

.saved-calculations-list {
    display: grid;
    gap: 15px;
}

.calculation-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.calculation-photo {
    width: 60px;
    height: 60px;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ccc;
}

.calculation-info {
    flex-grow: 1;
}

.calculation-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.calculation-meta {
    font-size: 12px;
    color: #666;
    display: flex;
    gap: 10px;
}

.calculation-actions button {
    margin-left: 10px;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
}

.no-calculations {
    text-align: center;
    padding: 20px;
    color: #999;
}



/* Estilos para o relógio do plano */
.plan-clock-container {
    position: relative;
    display: inline-block;
    margin-right: 2px;
}

.plan-clock {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.plan-clock:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.5);
}

.plan-clock i {
    color: white;
    font-size: 18px;
    animation: clockTick 2s infinite;
}

@keyframes clockTick {
    0%, 50%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(6deg); }
    75% { transform: rotate(-6deg); }
}

.plan-tooltip {
    position: absolute;
    top: 50px;
    right: 0;
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    min-width: 220px;
    border: 1px solid #e0e0e0;
}

.plan-clock-container:hover .plan-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tooltip-content {
    padding: 16px;
}

.tooltip-content h4 {
    margin: 0 0 8px 0;
    color: #ff6b35;
    font-size: 16px;
    font-weight: 600;
}

.tooltip-content p {
    margin: 4px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.tooltip-content p:last-child {
    margin-bottom: 0;
}

/* Seta do tooltip */
.plan-tooltip::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

.plan-tooltip::after {
    content: '';
    position: absolute;
    top: -9px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #e0e0e0;
}

/* Tema escuro para o relógio do plano */
body.dark-theme .plan-tooltip {
    background: #3a3a3a;
    border-color: #555;
}

body.dark-theme .tooltip-content h4 {
    color: #ff6b35;
}

body.dark-theme .tooltip-content p {
    color: #ccc;
}

body.dark-theme .plan-tooltip::before {
    border-bottom-color: #3a3a3a;
}

body.dark-theme .plan-tooltip::after {
    border-bottom-color: #555;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 768px) {
    .plan-clock {
        width: 35px;
        height: 35px;
    }
    
    .plan-clock i {
        font-size: 16px;
    }
    
    .plan-tooltip {
        right: -10px;
        min-width: 200px;
    }
    
    .tooltip-content {
        padding: 12px;
    }
    
    .tooltip-content h4 {
        font-size: 14px;
    }
    
    .tooltip-content p {
        font-size: 12px;
    }
}

/* Ajuste no user-info para acomodar o relógio */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}


/* Estados do relógio baseados no status do plano */
.plan-clock.clock-active {
    background: linear-gradient(135deg, rgb(255, 60, 0), rgb(255 233 0));
}

.plan-clock.clock-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.plan-clock.clock-expired {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

/* Estilos para o status no tooltip */
.status-active {
    color: #28a745 !important;
    font-weight: 600;
}

.status-warning {
    color: #ffc107 !important;
    font-weight: 600;
}

.status-expired {
    color: #dc3545 !important;
    font-weight: 600;
}

/* Animação pulsante para planos próximos do vencimento */
.plan-clock.clock-warning {
    animation: clockTick 2s infinite, warningPulse 3s infinite;
}

.plan-clock.clock-expired {
    animation: clockTick 2s infinite, expiredPulse 2s infinite;
}

@keyframes warningPulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3); }
    50% { box-shadow: 0 4px 20px rgba(255, 193, 7, 0.6); }
}

@keyframes expiredPulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3); }
    50% { box-shadow: 0 4px 20px rgba(220, 53, 69, 0.8); }
}

/* Tema escuro para os estados do relógio */
body.dark-theme .status-active {
    color: #4caf50 !important;
}

body.dark-theme .status-warning {
    color: #ff9800 !important;
}

body.dark-theme .status-expired {
    color: #f44336 !important;
}

