/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root[data-theme="light"] {
    --primary: #4f7be8;
    --primary-rgb: 79, 123, 232;
    --primary-hover: #3d6ae0;
    --accent: #10b981;
    --background: #ffffff;
    --foreground: #1f2937;
    --muted: #f9fafb;
    --muted-foreground: #6b7280;
    --border: #e5e7eb;
    --card: #ffffff;
    --card-foreground: #1f2937;
    --destructive: #ef4444;
    --warning: #f59e0b;
    --radius: 8px;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

:root[data-theme="dark"] {
    --primary: #5b8def;
    --primary-rgb: 91, 141, 239;
    --primary-hover: #4a7ed8;
    --accent: #10b981;
    --background: #0a0a0a;
    --foreground: #ffffff;
    --muted: #1a1a1a;
    --muted-foreground: #a1a1aa;
    --border: #333333;
    --card: #1a1a1a;
    --card-foreground: #ffffff;
    --destructive: #ef4444;
    --warning: #f59e0b;
    --radius: 8px;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--muted);
    color: var(--foreground);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-content {
    padding: 2rem 0;
}

/* Header */
.header {
    background: var(--background);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
}

.wifi-icon {
    color: var(--primary);
    width: 1.5rem;
    height: 1.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.25rem;
    color: var(--muted-foreground);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--foreground);
}

.nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--muted-foreground);
}

/* Grid Layouts */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

/* Cards */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.card-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
}

.section-icon {
    color: var(--primary);
}

.sticky-card {
    position: sticky;
    top: 1.5rem;
}

/* Plan Cards */
.plan-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.plan-card:hover {
    box-shadow: var(--shadow-lg);
}

.plan-card.selected {
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.03), rgba(var(--primary-rgb), 0.01));
}

/* Garantir borda azul no tema escuro */
[data-theme="dark"] .plan-card.selected {
    border: 2px solid #4f7be8;
    box-shadow: 0 8px 25px rgba(79, 123, 232, 0.25);
    background: linear-gradient(135deg, rgba(79, 123, 232, 0.08), rgba(79, 123, 232, 0.03));
}

.plan-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.plan-info h4 {
    font-weight: 600;
    color: var(--muted-foreground);
    margin-bottom: 0.25rem;
}

.plan-info p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.plan-radio {
    accent-color: var(--primary);
}

.plan-price {
    text-align: right;
}

.plan-price .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.plan-price .period {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Caixas de Serviços Adicionais - Melhoradas */
.addon-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border: 2px solid var(--border);
    border-radius: 16px;
    margin-bottom: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--card);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.addon-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 123, 232, 0.05), transparent);
    transition: left 0.5s;
}

.addon-item:hover::before {
    left: 100%;
}

.addon-item:hover {
    background-color: var(--muted);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.addon-item.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(79, 123, 232, 0.05), rgba(79, 123, 232, 0.02));
    box-shadow: 0 4px 20px rgba(79, 123, 232, 0.15);
}

.addon-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.addon-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.addon-checkbox {
    appearance: none;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-radius: 6px;
    background: var(--background);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.addon-checkbox:checked {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.1);
}

.addon-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.addon-info h4 {
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.addon-info h5 {
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.addon-info p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin: 0;
    line-height: 1.4;
}

.addon-price {
    font-weight: 600;
    color: var(--foreground);
}

/* New Addon Layout */
.addon-content {
    padding: 1.25rem;
}

.addon-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.addon-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    flex: 1;
}

.addon-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.addon-checkbox-custom {
    width: 20px;
    height: 20px;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 6px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.addon-checkbox-label:hover .addon-checkbox-custom {
    border-color: var(--primary);
}

.addon-checkbox-label input:checked ~ .addon-checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.addon-checkbox-label input:checked ~ .addon-checkbox-custom::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.addon-quantity-controls {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-label {
    font-size: 0.9rem;
    color: var(--muted-foreground);
    font-weight: 500;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    background: var(--background);
    color: var(--foreground);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.quantity-display {
    min-width: 2rem;
    text-align: center;
    font-weight: 600;
    color: var(--foreground);
}

/* Controles de Quantidade Modernos */
.qty-controls-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(var(--primary-rgb), 0.08);
    border-radius: 12px;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    transition: all 0.3s ease;
    width: 100%;
}

.qty-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--foreground);
    white-space: nowrap;
    flex-shrink: 0;
}

.qty-btn-modern {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
    flex-shrink: 0;
}

.qty-btn-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.4);
    background: rgb(var(--primary-rgb));
    filter: brightness(1.1);
}

.qty-btn-modern:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(var(--primary-rgb), 0.3);
}

.qty-number {
    min-width: 40px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--foreground);
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
}

.qty-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.qty-btn:hover::before {
    left: 100%;
}

.qty-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px) scale(1.15);
    box-shadow: 
        0 8px 20px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.qty-btn:active {
    transform: translateY(0) scale(0.95);
    box-shadow: 
        0 2px 8px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.qty-input {
    width: 60px;
    height: 42px;
    border: 2px solid rgba(79, 172, 254, 0.3);
    border-radius: 12px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.9) 100%);
    color: var(--foreground);
    outline: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 2px 8px rgba(79, 172, 254, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
}

.qty-input:focus {
    border-color: var(--primary);
    box-shadow: 
        0 0 0 3px rgba(79, 172, 254, 0.2),
        0 4px 15px rgba(79, 172, 254, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: scale(1.05);
}

/* Remove spinner arrows from number input */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input[type=number] {
    -moz-appearance: textfield;
}

/* Summary */
.summary-content {
    margin-bottom: 1.5rem;
}

.selected-plan {
    margin-bottom: 1rem;
}

.empty-state {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.plan-details .plan-name {
    font-weight: 500;
    color: var(--muted-foreground);
}

.plan-details .plan-speed {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.plan-details .plan-price-display {
    color: var(--primary);
    font-weight: 600;
}

.selected-addons {
    margin-bottom: 1rem;
}

.addon-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.addon-line .addon-name {
    color: var(--muted-foreground);
}

.addon-line .addon-price-display {
    font-weight: 500;
}

.summary-totals {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.total-row.final-total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--foreground);
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-bottom: 1rem;
}

.final-total .total-amount {
    color: var(--primary);
}

.free-text {
    color: var(--accent);
    font-weight: 500;
}

.installation-fee {
    color: #ef4444;
    font-weight: 600;
    transition: all 0.3s ease;
}

.installation-fee.free {
    color: #10b981;
    text-decoration: line-through;
    opacity: 0.7;
}

.installation-fee.free::after {
    content: " GRÁTIS";
    text-decoration: none;
    color: #10b981;
    font-weight: 700;
    margin-left: 8px;
}

/* Estilos para controles de quantidade modernos */
.quantity-controls-modern {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: var(--card);
    border: 1px solid var(--border);
}

.qty-btn-modern {
    width: 32px !important;
    height: 32px !important;
    border: 1px solid var(--border) !important;
    background: var(--background) !important;
    color: var(--foreground) !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    font-size: 16px !important;
    transition: all 0.2s ease !important;
}

.qty-btn-modern:hover {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
    transform: scale(1.05);
}

.addon-item-modern {
    transition: all 0.3s ease;
    background: var(--card) !important;
    border: 1px solid var(--border) !important;
    color: var(--foreground) !important;
}

.addon-item-modern:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.1);
}

/* Força as cores do tema nos elementos inline */
[data-theme="dark"] .quantity-controls-modern {
    background: #1a1a1a !important;
    border-color: #333 !important;
}

[data-theme="dark"] .quantity-controls-modern * {
    background: transparent !important;
}

[data-theme="dark"] .qty-btn-modern {
    background: #262626 !important;
    color: #ffffff !important;
    border-color: #404040 !important;
}

[data-theme="dark"] .qty-btn-modern:not(:hover) {
    background: #262626 !important;
}

[data-theme="dark"] .addon-item-modern {
    background: #1a1a1a !important;
    border-color: #333 !important;
}

[data-theme="light"] .quantity-controls-modern {
    background: #f8f9fa !important;
    border-color: #dee2e6 !important;
}

[data-theme="light"] .qty-btn-modern {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #cccccc !important;
}

[data-theme="light"] .addon-item-modern {
    background: #ffffff !important;
    border-color: #dddddd !important;
}

/* Estilos modernos para addons */
.addon-item-modern {
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    transition: all 0.2s ease;
}

.addon-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.addon-checkbox {
    margin-right: 10px;
    accent-color: var(--primary);
}

.addon-info {
    flex: 1;
}

.addon-name {
    font-weight: bold;
    margin-bottom: 4px;
    color: var(--foreground);
}

.addon-description {
    color: var(--muted-foreground);
    font-size: 14px;
    margin-bottom: 4px;
}

.addon-price {
    color: var(--primary);
    font-weight: bold;
}

/* Controles de quantidade modernos */
.qty-controls-modern {
    padding: 10px;
    background: var(--muted);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    flex-wrap: nowrap;
}

.qty-label {
    font-weight: 500;
    color: var(--foreground);
}

.qty-number {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    color: var(--foreground);
    flex-shrink: 0;
    display: inline-block;
}

.qty-btn-modern {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border);
    background: var(--background);
    color: var(--foreground);
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.qty-btn-modern:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Força cores específicas para tema escuro - Modernizado */
[data-theme="dark"] .addon-item-modern {
    background: #1a1a1a !important;
    border-color: #333 !important;
}

[data-theme="dark"] .qty-controls-modern {
    background: #262626 !important;
}

[data-theme="dark"] .qty-label,
[data-theme="dark"] .qty-number,
[data-theme="dark"] .addon-name {
    color: #ffffff !important;
}

[data-theme="dark"] .addon-description {
    color: #a1a1aa !important;
}

[data-theme="dark"] .addon-price {
    color: #4f7be8 !important;
}

[data-theme="dark"] .qty-btn-modern {
    background: #262626 !important;
    color: #ffffff !important;
    border-color: #404040 !important;
}

[data-theme="dark"] .qty-btn-modern:hover {
    background: #4f7be8 !important;
    color: #ffffff !important;
    border-color: #4f7be8 !important;
}

/* CORREÇÃO COMPLETA TEMA ESCURO - FORÇA TODAS AS CORES */
[data-theme="dark"] {
    color-scheme: dark;
}

[data-theme="dark"] * {
    color: #ffffff !important;
}

[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] h4, 
[data-theme="dark"] h5, 
[data-theme="dark"] h6,
[data-theme="dark"] p, 
[data-theme="dark"] span, 
[data-theme="dark"] div, 
[data-theme="dark"] label,
[data-theme="dark"] .card-title,
[data-theme="dark"] .plan-name,
[data-theme="dark"] .plan-speed,
[data-theme="dark"] .plan-price,
[data-theme="dark"] .summary-item strong,
[data-theme="dark"] .btn-text,
[data-theme="dark"] .page-header h2,
[data-theme="dark"] .page-header p,
[data-theme="dark"] .card-body,
[data-theme="dark"] .card-body *,
[data-theme="dark"] .plan-card *,
[data-theme="dark"] .addon-card *,
[data-theme="dark"] .summary-card *,
[data-theme="dark"] .form-label,
[data-theme="dark"] .form-control,
[data-theme="dark"] strong,
[data-theme="dark"] b {
    color: #ffffff !important;
}

[data-theme="dark"] .card-text,
[data-theme="dark"] .plan-description,
[data-theme="dark"] .summary-item,
[data-theme="dark"] small,
[data-theme="dark"] .text-muted {
    color: #a1a1aa !important;
}

/* Botões no tema escuro */
[data-theme="dark"] .btn-primary {
    background: #4f7be8 !important;
    border-color: #4f7be8 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .btn-secondary {
    background: #262626 !important;
    border-color: #404040 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .btn-outline-primary {
    border-color: #4f7be8 !important;
    color: #4f7be8 !important;
    background: transparent !important;
}

[data-theme="dark"] .btn-outline-primary:hover {
    background: #4f7be8 !important;
    color: #ffffff !important;
}

/* Cards no tema escuro */
[data-theme="dark"] .card {
    background: #1a1a1a !important;
    border-color: #333 !important;
}

[data-theme="dark"] .plan-card,
[data-theme="dark"] .addon-card,
[data-theme="dark"] .summary-card {
    background: #1a1a1a !important;
    border-color: #333 !important;
}

/* Inputs no tema escuro */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: #262626 !important;
    border-color: #404040 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .form-control::placeholder,
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #a1a1aa !important;
}

/* Containers dos controles */
.qty-controls-inner {
    display: flex;
    align-items: center;
    gap: 15px;
    background: transparent !important;
}

.qty-buttons-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent !important;
}

/* Força transparência no tema escuro */
[data-theme="dark"] .qty-controls-inner,
[data-theme="dark"] .qty-buttons-container {
    background: transparent !important;
}

/* Remove qualquer fundo branco residual */
[data-theme="dark"] .quantity-controls-modern div {
    background: transparent !important;
}

/* Força o fundo escuro em todo o container */
[data-theme="dark"] .quantity-controls-modern {
    background: #1a1a1a !important;
    border: 1px solid #333 !important;
}

/* Remove fundos de todos os elementos filhos exceto botões */
[data-theme="dark"] .quantity-controls-modern *:not(button) {
    background: transparent !important;
}

/* Força transparência absoluta nos containers */
[data-theme="dark"] .qty-controls-inner,
[data-theme="dark"] .qty-buttons-container,
[data-theme="dark"] .quantity-controls-modern div:not(.qty-btn-modern) {
    background: transparent !important;
    background-color: transparent !important;
}

/* Solução definitiva - força fundo escuro em tudo */
[data-theme="dark"] .quantity-controls-modern,
[data-theme="dark"] .quantity-controls-modern *,
[data-theme="dark"] .quantity-controls-modern *:before,
[data-theme="dark"] .quantity-controls-modern *:after {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
}

/* Exceções para botões */
[data-theme="dark"] .qty-btn-modern {
    background: #262626 !important;
    background-color: #262626 !important;
    border: 1px solid #404040 !important;
    color: #ffffff !important;
}

/* Exceções para elementos de texto */
[data-theme="dark"] .qty-label,
[data-theme="dark"] .qty-number {
    background: transparent !important;
    background-color: transparent !important;
}

/* Nova versão simplificada dos controles */
.qty-controls-simple {
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
}

.qty-btn-simple {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border);
    background: var(--background);
    color: var(--foreground);
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.qty-btn-simple:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Tema escuro para versão simples - FORÇADO */
html[data-theme="dark"] .qty-controls-simple,
body[data-theme="dark"] .qty-controls-simple,
[data-theme="dark"] .qty-controls-simple {
    background: #1a1a1a !important;
    border: 1px solid #333 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .qty-btn-simple,
body[data-theme="dark"] .qty-btn-simple,
[data-theme="dark"] .qty-btn-simple {
    background: #262626 !important;
    color: #ffffff !important;
    border: 2px solid #404040 !important;
}

html[data-theme="dark"] .qty-btn-simple:hover,
body[data-theme="dark"] .qty-btn-simple:hover,
[data-theme="dark"] .qty-btn-simple:hover {
    background: #4f7be8 !important;
    color: #ffffff !important;
    border-color: #4f7be8 !important;
}

html[data-theme="dark"] .qty-controls-simple span,
body[data-theme="dark"] .qty-controls-simple span,
[data-theme="dark"] .qty-controls-simple span {
    color: #ffffff !important;
}

/* Nova versão ultra-simples sem conflitos */
.qty-controls-dark {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.qty-btn-dark {
    width: 32px;
    height: 32px;
    border: 2px solid #d1d5db;
    background: #ffffff;
    color: #1f2937;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-num {
    font-weight: bold;
    min-width: 30px;
    text-align: center;
    color: #1f2937;
}

/* Tema escuro específico para nova versão */
[data-theme="dark"] .qty-controls-dark {
    background: #1a1a1a !important;
    border: 1px solid #333 !important;
}

[data-theme="dark"] .qty-btn-dark {
    background: #262626 !important;
    color: #ffffff !important;
    border: 2px solid #404040 !important;
}

[data-theme="dark"] .qty-num,
[data-theme="dark"] .qty-controls-dark span {
    color: #ffffff !important;
}

/* Força cores no tema claro também */
[data-theme="light"] .qty-controls-simple {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    color: #1f2937 !important;
}

[data-theme="light"] .qty-btn-simple {
    background: #ffffff !important;
    color: #1f2937 !important;
    border-color: #d1d5db !important;
}

[data-theme="light"] .qty-controls-simple span {
    color: #1f2937 !important;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
}

.toast {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-lg);
    animation: toastSlideIn 0.3s ease-out;
}

.toast-success {
    border-left: 4px solid var(--accent);
}

.toast-error {
    border-left: 4px solid var(--destructive);
}

.toast-info {
    border-left: 4px solid var(--primary);
}

.toast-content {
    display: flex;
    align-items: center;
}

.toast-message {
    color: var(--foreground);
    font-size: 14px;
    font-weight: 500;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Força tema escuro global */
[data-theme="dark"] {
    background-color: #0a0a0a;
    color: #ffffff;
}

[data-theme="dark"] body {
    background-color: #0a0a0a !important;
    color: #ffffff !important;
}

.free-text {
    color: #10b981;
    font-weight: 600;
}

/* Modal Styles */
.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: 9999;
    backdrop-filter: blur(4px);
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
}

.modal.hidden {
    display: none !important;
    opacity: 0;
    visibility: hidden;
}

.modal-content {
    background: var(--card);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    color: var(--foreground);
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--muted-foreground);
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.btn-close:hover {
    background: var(--muted);
    color: var(--foreground);
}

.btn-close::after {
    content: '×';
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--foreground);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--foreground);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(79, 123, 232, 0.2);
}

.quote-summary {
    background: var(--muted);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.quote-summary h4 {
    color: var(--foreground);
    margin-bottom: 1rem;
}

.quote-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

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

.quote-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border);
    text-align: right;
    font-size: 1.1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-secondary {
    background: var(--muted);
    color: var(--foreground);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

/* Fidelity Section */
.fidelity-section {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.fidelity-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.fidelity-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.fidelity-checkbox:hover .checkmark {
    border-color: var(--primary);
}

.fidelity-checkbox input[type="checkbox"]:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.fidelity-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.fidelity-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.fidelity-title {
    font-weight: 600;
    color: var(--foreground);
    font-size: 0.9rem;
}

.fidelity-benefit {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
}

/* Benefits */
.benefits-box {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--foreground);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.benefit-item:last-child {
    margin-bottom: 0;
}

.benefit-item svg {
    color: var(--accent);
}

/* Buttons - Design Moderno e Aprimorado */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.75rem;
    border: none;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    user-select: none;
    min-height: 50px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    backdrop-filter: blur(10px);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: #4a90e2;
    color: white;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover:not(:disabled) {
    background: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4);
}
}

.btn-primary:active {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 
        0 10px 20px rgba(255, 138, 0, 0.4),
        0 6px 15px rgba(229, 46, 113, 0.3),
        0 3px 8px rgba(30, 60, 114, 0.2);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    animation: none;
}

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

.btn-ghost {
    background: rgba(255, 255, 255, 0.9);
    color: var(--foreground);
    border: 2px solid var(--border);
    box-shadow: 
        0 4px 15px rgba(0,0,0,0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 1);
    border-color: var(--primary);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(0,0,0,0.12),
        0 4px 15px rgba(79, 123, 232, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.btn-destructive {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: 2px solid transparent;
    box-shadow: 
        0 8px 20px rgba(245, 87, 108, 0.4),
        0 4px 10px rgba(240, 147, 251, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-destructive:hover {
    background: linear-gradient(135deg, #f5576c 0%, #e53e3e 100%);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 15px 35px rgba(245, 87, 108, 0.5),
        0 8px 20px rgba(240, 147, 251, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.full-width {
    width: 100%;
}

/* Botão Principal de Cotação - Design Épico */
.btn-quote-primary,
.btn-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
    color: white;
    padding: 1.25rem 2.5rem;
    border-radius: 20px;
    border: none;
    font-weight: 900;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 15px 35px rgba(102, 126, 234, 0.4),
        0 8px 20px rgba(118, 75, 162, 0.3),
        0 4px 10px rgba(240, 147, 251, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    min-height: 60px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

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

.btn-quote-primary::before,
.btn-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    transition: left 0.8s ease;
}

.btn-quote-primary:hover::before,
.btn-hero:hover::before {
    left: 100%;
}

.btn-quote-primary::after,
.btn-hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.8s, height 0.8s;
}

.btn-quote-primary:active::after,
.btn-hero:active::after {
    width: 500px;
    height: 500px;
}

.btn-quote-primary:hover,
.btn-hero:hover {
    transform: translateY(-8px) scale(1.08);
    box-shadow: 
        0 25px 50px rgba(102, 126, 234, 0.5),
        0 15px 30px rgba(118, 75, 162, 0.4),
        0 8px 20px rgba(240, 147, 251, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.4);
    animation-duration: 2s;
}

.btn-quote-primary:active,
.btn-hero:active {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 
        0 12px 25px rgba(102, 126, 234, 0.4),
        0 6px 15px rgba(118, 75, 162, 0.3),
        0 3px 8px rgba(240, 147, 251, 0.2);
}

.btn-quote-primary:disabled,
.btn-hero:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    animation: none;
}

/* Ícones nos botões */
.btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.btn:hover svg {
    transform: scale(1.1);
}

.btn-quote-primary svg,
.btn-hero svg {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Botões específicos do Dashboard - Design Ultra Moderno */
.dashboard-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 1.25rem 2rem;
    border-radius: 16px;
    border: none;
    font-weight: 800;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 10px 25px rgba(79, 172, 254, 0.4),
        0 5px 15px rgba(0, 242, 254, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 56px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.dashboard-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.7s ease;
}

.dashboard-btn:hover::before {
    left: 100%;
}

.dashboard-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.dashboard-btn:active::after {
    width: 400px;
    height: 400px;
}

.dashboard-btn:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 
        0 20px 40px rgba(79, 172, 254, 0.5),
        0 10px 25px rgba(0, 242, 254, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}

.dashboard-btn:active {
    transform: translateY(-3px) scale(1.02);
}

.dashboard-btn.btn-new-plan {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #2d3748;
    box-shadow: 
        0 10px 25px rgba(168, 237, 234, 0.4),
        0 5px 15px rgba(254, 214, 227, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.5),
        inset 0 -2px 0 rgba(0, 0, 0, 0.05);
    text-shadow: 0 1px 2px rgba(255,255,255,0.3);
}

.dashboard-btn.btn-new-plan:hover {
    background: linear-gradient(135deg, #9ae6b4 0%, #fbb6ce 100%);
    box-shadow: 
        0 20px 40px rgba(168, 237, 234, 0.5),
        0 10px 25px rgba(254, 214, 227, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.6);
}

.dashboard-btn.btn-new-addon {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #2d3748;
    box-shadow: 
        0 10px 25px rgba(255, 236, 210, 0.4),
        0 5px 15px rgba(252, 182, 159, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.5),
        inset 0 -2px 0 rgba(0, 0, 0, 0.05);
    text-shadow: 0 1px 2px rgba(255,255,255,0.3);
}

.dashboard-btn.btn-new-addon:hover {
    background: linear-gradient(135deg, #fed7aa 0%, #f97316 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    box-shadow: 
        0 20px 40px rgba(255, 236, 210, 0.5),
        0 10px 25px rgba(252, 182, 159, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.6);
}

.dashboard-btn.btn-new-user {
    background: linear-gradient(135deg, #d299c2 0%, #fef9d3 100%);
    color: #2d3748;
    box-shadow: 
        0 10px 25px rgba(210, 153, 194, 0.4),
        0 5px 15px rgba(254, 249, 211, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.5),
        inset 0 -2px 0 rgba(0, 0, 0, 0.05);
    text-shadow: 0 1px 2px rgba(255,255,255,0.3);
}

.dashboard-btn.btn-new-user:hover {
    background: linear-gradient(135deg, #c084fc 0%, #facc15 100%);
    box-shadow: 
        0 20px 40px rgba(210, 153, 194, 0.5),
        0 10px 25px rgba(254, 249, 211, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.6);
}

/* Stats Cards */
.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.stat-icon {
    padding: 0.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.blue {
    background: #dbeafe;
    color: var(--primary);
}

.stat-icon.green {
    background: #d1fae5;
    color: var(--accent);
}

.stat-icon.yellow {
    background: #fef3c7;
    color: var(--warning);
}

.stat-icon.purple {
    background: #ede9fe;
    color: #8b5cf6;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
}

/* Tabs */
.tabs {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.tab-list {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: var(--muted);
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-button:hover {
    color: var(--foreground);
}

.tab-button.active {
    background: var(--background);
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
    padding: 1.5rem;
}

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

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.tab-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-header .btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab-header .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.tab-header .btn-primary:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.tab-header .btn-primary:hover::before {
    left: 100%;
}

.tab-header .btn-primary:active {
    transform: translateY(0);
}

.tab-header .btn-primary svg {
    width: 18px;
    height: 18px;
}

/* Search */
.search-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-foreground);
}

.search-input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--background);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 123, 232, 0.1);
}

/* Tables */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--background);
}

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

.data-table th {
    background: var(--muted);
    font-weight: 600;
    color: var(--foreground);
    font-size: 0.875rem;
}

.data-table td {
    font-size: 0.875rem;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.active {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.inactive {
    background: #f3f4f6;
    color: #374151;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    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: var(--background);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
}

.modal-close:hover {
    background: var(--muted);
}

.modal-body {
    padding: 1.5rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--foreground);
    font-size: 0.875rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--background);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 123, 232, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-switch-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.form-switch-info h4 {
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.form-switch-info p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.form-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #d1d5db;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.form-switch.active {
    background: var(--primary);
}

.form-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.form-switch.active::after {
    transform: translateX(20px);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.form-actions .btn {
    flex: 1;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.hidden {
    display: none !important;
}

.modal-content {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
}

.modal-close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: var(--radius);
    transition: background-color 0.2s;
    color: var(--muted-foreground);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background-color: var(--accent);
    color: var(--foreground);
}

.modal-body {
    padding: 1.5rem;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-label {
    font-weight: 500;
    color: var(--foreground);
    font-size: 0.875rem;
}

.form-input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.2s;
    background: var(--background);
    color: var(--foreground);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--ring);
}

.quote-summary {
    margin-top: 1.25rem;
    padding: 1rem;
    background: var(--muted);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.quote-summary h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    color: var(--foreground);
}

.quote-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.quote-total {
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    font-size: 1.1rem;
    color: var(--foreground);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

.btn-ghost {
    background: transparent;
    color: var(--muted-foreground);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--accent);
    color: var(--foreground);
}

/* Status badges */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-success {
    background: #d1fae5;
    color: #065f46;
}

.status-error {
    background: #fee2e2;
    color: #991b1b;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--background);
    color: var(--foreground);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sm:hover {
    background: var(--accent);
}

.btn-sm.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-sm.btn-primary:hover {
    opacity: 0.9;
}

.btn-sm.btn-outline {
    background: transparent;
}

@media (max-width: 768px) {
    .modal {
        padding: 0.625rem;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body {
        padding: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
}

.toast {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    margin-bottom: 0.5rem;
    min-width: 300px;
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left: 4px solid var(--accent);
}

.toast.error {
    border-left: 4px solid var(--destructive);
}

.toast-title {
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.toast-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .plans-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.8rem;
        padding: 0.75rem 0.125rem;
    }
    
    .page-header h2 {
        font-size: 1.5rem;
    }
    
    .tab-list {
        flex-direction: column;
    }
    
    .tab-button {
        justify-content: center;
        border-bottom: none;
        border-right: 2px solid transparent;
    }
    
    .tab-button.active {
        border-right-color: var(--primary);
        border-bottom: none;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-content {
        flex-direction: column;
        height: auto;
        padding: 1rem 0;
    }
    
    .nav-menu {
        margin-top: 1rem;
    }
    
    .addon-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .addon-left {
        width: 100%;
    }
    
    .plan-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .data-table {
        font-size: 0.75rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
}

/* Login Page Styles */
.login-page {
  background: linear-gradient(135deg, var(--muted) 0%, #f0f4f8 100%);
  min-height: 100vh;
}

.login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 2rem 1rem;
  position: relative;
}

/* Melhor centralização */
@media (max-height: 600px) {
  .login-main {
    align-items: flex-start;
    padding-top: 1rem;
  }
}

.login-container {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.login-card {
  background: var(--card);
  border-radius: 20px;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.1),
    0 10px 20px rgba(0, 0, 0, 0.05),
    0 2px 8px rgba(0, 0, 0, 0.03);
  padding: 2.5rem;
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  transform: translateY(0);
  transition: all 0.3s ease;
}

.login-card:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.12),
    0 15px 30px rgba(0, 0, 0, 0.07),
    0 5px 15px rgba(0, 0, 0, 0.05);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-icon {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: white;
}

.login-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.login-header p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.login-form {
  margin-bottom: 1.5rem;
}

.login-form .form-group {
  margin-bottom: 1rem;
}

.login-form .form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.login-form .form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--background);
  color: var(--foreground);
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.login-form .form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 123, 232, 0.1);
}

.login-form .form-group input::placeholder {
  color: var(--muted-foreground);
}

/* Correções específicas para tema escuro - Login */
[data-theme="dark"] .login-page {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

[data-theme="dark"] .login-card {
  background: #1a1a1a !important;
  border-color: #333 !important;
}

[data-theme="dark"] .login-header h2 {
  color: #ffffff !important;
}

[data-theme="dark"] .login-header p {
  color: #a1a1aa !important;
}

[data-theme="dark"] .login-form .form-group label {
  color: #ffffff !important;
}

[data-theme="dark"] .login-form .form-group input {
  background: #262626 !important;
  color: #ffffff !important;
  border-color: #404040 !important;
}

[data-theme="dark"] .login-form .form-group input::placeholder {
  color: #a1a1aa !important;
}

[data-theme="dark"] .login-form .form-group input:focus {
  border-color: #4f7be8 !important;
  box-shadow: 0 0 0 3px rgba(79, 123, 232, 0.2) !important;
}

.login-form .form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  transition: border-color 0.2s ease;
  background: var(--background);
  box-sizing: border-box;
}

.login-form .form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 123, 232, 0.1);
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.checkbox-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  height: 16px;
  width: 16px;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: 3px;
  margin-right: 0.5rem;
  position: relative;
  transition: all 0.2s ease;
}

.checkbox-container:hover .checkmark {
  border-color: var(--primary);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--primary);
  border-color: var(--primary);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 2px;
  width: 3px;
  height: 6px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.forgot-password {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.875rem;
}

.forgot-password:hover {
  text-decoration: underline;
}

.btn-primary.full-width {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.btn-primary.full-width:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 123, 232, 0.3);
}

.btn-primary.full-width:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-spinner {
  display: none;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.login-divider {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
}

.login-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.login-divider span {
  background: var(--card);
  padding: 0 1rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  position: relative;
  z-index: 1;
}

.social-login {
  margin-bottom: 1.5rem;
}

.btn-social {
  width: 100%;
  background: var(--background);
  border: 1px solid var(--border);
  color: var(--foreground);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-social:hover {
  background: var(--muted);
  border-color: var(--primary);
}

.login-footer {
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.login-footer a {
  color: var(--primary);
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}

.login-hint {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--muted);
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  font-size: 0.8rem;
}

/* Login Notifications */
.login-notification {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid;
  animation: slideIn 0.3s ease;
}

.login-notification.success {
  background: #f0f9ff;
  border-color: #22c55e;
  color: #15803d;
}

.login-notification.error {
  background: #fef2f2;
  border-color: #ef4444;
  color: #dc2626;
}

.login-notification.info {
  background: #f0f9ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

[data-theme="dark"] .login-notification.success {
  background: #022c22;
  border-color: #22c55e;
  color: #4ade80;
}

[data-theme="dark"] .login-notification.error {
  background: #2d1b1b;
  border-color: #ef4444;
  color: #f87171;
}

[data-theme="dark"] .login-notification.info {
  background: #1e3a8a;
  border-color: #3b82f6;
  color: #60a5fa;
}

.notification-content {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.notification-icon {
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.notification-message {
  flex: 1;
  font-weight: 500;
  line-height: 1.4;
}

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

/* Toast animations */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.toast {
  animation: slideIn 0.3s ease-out;
}

/* Dark theme */
:root[data-theme="dark"] {
    --primary: #5b8def;
    --primary-hover: #4a7de8;
    --accent: #14d99b;
    --background: #1a1a1a;
    --foreground: #f8f9fa;
    --muted: #2d2d2d;
    --muted-foreground: #d1d5db;
    --border: #555555;
    --card: #2d2d2d;
    --card-foreground: #f8f9fa;
    --destructive: #ff5b5b;
    --warning: #ffc107;
    --radius: 8px;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* Dark theme input fields */
:root[data-theme="dark"] .form-input,
:root[data-theme="dark"] .form-textarea {
    background: #404040;
    color: #f8f9fa;
    border-color: #666666;
}

:root[data-theme="dark"] .form-input:focus,
:root[data-theme="dark"] .form-textarea:focus {
    background: #4a4a4a;
    border-color: var(--primary);
    color: #f8f9fa;
}

/* Dark theme login form inputs */
:root[data-theme="dark"] .login-form .form-group input {
    background: #404040 !important;
    color: #f8f9fa !important;
    border-color: #666666 !important;
}

:root[data-theme="dark"] .login-form .form-group input:focus {
    background: #4a4a4a !important;
    border-color: var(--primary) !important;
    color: #f8f9fa !important;
}

/* Dark theme fidelity checkbox */
:root[data-theme="dark"] .checkmark {
    background: var(--background);
    border-color: var(--border);
}

:root[data-theme="dark"] .fidelity-checkbox:hover .checkmark {
    border-color: var(--primary);
}

:root[data-theme="dark"] .fidelity-checkbox input[type="checkbox"]:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

/* Dark theme text improvements */
:root[data-theme="dark"] .plan-info h4,
:root[data-theme="dark"] .addon-info h4 {
    color: #f8f9fa !important;
}

:root[data-theme="dark"] .plan-info p,
:root[data-theme="dark"] .addon-info p {
    color: #d1d5db !important;
}

:root[data-theme="dark"] .addon-price {
    color: #f8f9fa !important;
}

:root[data-theme="dark"] .plan-price .price {
    color: var(--primary) !important;
}

:root[data-theme="dark"] .plan-price .period {
    color: #d1d5db !important;
}

/* Forçar cores claras nos planos no tema escuro */
:root[data-theme="dark"] .plan-card .plan-info h4 {
    color: #f8f9fa !important;
}

:root[data-theme="dark"] .plan-card .plan-info p {
    color: #d1d5db !important;
}

:root[data-theme="dark"] .plan-card .plan-price .price {
    color: #5b8def !important;
}

:root[data-theme="dark"] .plan-card .plan-price .period {
    color: #d1d5db !important;
}

/* Garantir borda azul bem visível no tema escuro para planos selecionados */
:root[data-theme="dark"] .plan-card.selected {
    border-color: #6366f1 !important;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.04)) !important;
}

:root[data-theme="dark"] .plans-grid .plan-card h4 {
    color: #f8f9fa !important;
}

:root[data-theme="dark"] .plans-grid .plan-card p {
    color: #d1d5db !important;
}

/* Corrigir classes específicas geradas pelo JavaScript */
:root[data-theme="dark"] .plan-name {
    color: #f8f9fa !important;
}

:root[data-theme="dark"] .plan-speed {
    color: #d1d5db !important;
}

:root[data-theme="dark"] .price-value {
    color: #5b8def !important;
}

:root[data-theme="dark"] .price-period {
    color: #d1d5db !important;
}

:root[data-theme="dark"] .feature-item span {
    color: #d1d5db !important;
}

:root[data-theme="dark"] .plan-features .feature-item span {
    color: #d1d5db !important;
}

:root[data-theme="dark"] .fidelity-title {
    color: #f8f9fa !important;
}

:root[data-theme="dark"] .fidelity-benefit {
    color: #d1d5db !important;
}

:root[data-theme="dark"] .benefit-item span {
    color: #d1d5db !important;
}

:root[data-theme="dark"] .total-row span {
    color: #f8f9fa !important;
}

:root[data-theme="dark"] .installation-fee {
    color: #d1d5db !important;
}

:root[data-theme="dark"] .quantity-display {
    color: #f8f9fa !important;
}

:root[data-theme="dark"] .empty-state {
    color: #d1d5db !important;
}

:root[data-theme="dark"] .selected-addon-name {
    color: #f8f9fa !important;
}

:root[data-theme="dark"] .selected-addon-price {
    color: #d1d5db !important;
}

:root[data-theme="dark"] h1, 
:root[data-theme="dark"] h2, 
:root[data-theme="dark"] h3, 
:root[data-theme="dark"] h4 {
    color: #f8f9fa !important;
}

/* Dashboard dark theme fixes - force light text */
:root[data-theme="dark"] .dashboard .page-header h2,
:root[data-theme="dark"] .dashboard .page-header p,
:root[data-theme="dark"] .dashboard .stat-card h3,
:root[data-theme="dark"] .dashboard .stat-value,
:root[data-theme="dark"] .dashboard .stat-label,
:root[data-theme="dark"] .dashboard .data-table th,
:root[data-theme="dark"] .dashboard .data-table td,
:root[data-theme="dark"] .dashboard .recent-quotes h3,
:root[data-theme="dark"] .dashboard .summary-card h3,
:root[data-theme="dark"] .dashboard .summary-card p,
:root[data-theme="dark"] .dashboard .card-title,
:root[data-theme="dark"] .dashboard .card-content p,
:root[data-theme="dark"] .dashboard .card-content span,
:root[data-theme="dark"] .dashboard .quick-actions h3,
:root[data-theme="dark"] .dashboard .recent-activity h3,
:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3,
:root[data-theme="dark"] h4,
:root[data-theme="dark"] h5,
:root[data-theme="dark"] h6,
:root[data-theme="dark"] p,
:root[data-theme="dark"] span,
:root[data-theme="dark"] div,
:root[data-theme="dark"] td,
:root[data-theme="dark"] th,
:root[data-theme="dark"] label {
    color: var(--foreground) !important;
}

/* Specific dashboard stats fixes */
:root[data-theme="dark"] .stats-grid .stat-card .stat-value {
    color: var(--primary) !important;
}

:root[data-theme="dark"] .stats-grid .stat-card .stat-label {
    color: var(--muted-foreground) !important;
}

/* Dashboard table fixes */
:root[data-theme="dark"] .data-table {
    color: var(--foreground) !important;
}

:root[data-theme="dark"] .data-table th {
    color: var(--foreground) !important;
    background: var(--muted) !important;
}

:root[data-theme="dark"] .data-table td {
    color: var(--foreground) !important;
}

/* Force light text in all dashboard elements */
:root[data-theme="dark"] .dashboard * {
    color: var(--foreground) !important;
}

/* Override any remaining dark text */
:root[data-theme="dark"] .dashboard .card * {
    color: var(--card-foreground) !important;
}

/* Button Edit (Orange) and Delete (Red) Colors */
.btn-edit {
    background: linear-gradient(135deg, #ff8a00 0%, #e52e71 100%) !important;
    color: white !important;
    border: none !important;
    transition: all 0.3s ease !important;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #e6780a 0%, #d1285f 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(255, 138, 0, 0.4) !important;
}

.btn-delete {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%) !important;
    color: white !important;
    border: none !important;
    transition: all 0.3s ease !important;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.4) !important;
}

/* Dark theme adjustments for edit/delete buttons */
:root[data-theme="dark"] .btn-edit {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%) !important;
}

:root[data-theme="dark"] .btn-edit:hover {
    background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%) !important;
}

:root[data-theme="dark"] .btn-delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

:root[data-theme="dark"] .btn-delete:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
}

/* Dark theme status badges - improved visibility */
:root[data-theme="dark"] .status-badge.active {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    color: white !important;
    border: 1px solid #22c55e !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

:root[data-theme="dark"] .status-badge.inactive {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
    color: #f9fafb !important;
    border: 1px solid #6b7280 !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

:root[data-theme="dark"] .status-badge.status-pending {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: white !important;
    border: 1px solid #f59e0b !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

:root[data-theme="dark"] .status-badge.status-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    color: white !important;
    border: 1px solid #22c55e !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

:root[data-theme="dark"] .status-badge.status-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
    border: 1px solid #ef4444 !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

:root[data-theme="dark"] .form-label {
    color: #f8f9fa !important;
}

:root[data-theme="dark"] .modal-header h3 {
    color: #f8f9fa !important;
}

:root[data-theme="dark"] .quote-summary h4 {
    color: #f8f9fa !important;
}

:root[data-theme="dark"] .quote-total {
    color: #f8f9fa !important;
}

/* Theme toggle button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.theme-icon {
    font-size: 20px;
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    text-align: center;
}

.badge-admin {
    background-color: var(--destructive);
    color: white;
}

.badge-manager {
    background-color: var(--warning);
    color: black;
}

.badge-user {
    background-color: var(--primary);
    color: white;
}

.badge-success {
    background-color: var(--accent);
    color: white;
}

.badge-danger {
    background-color: var(--destructive);
    color: white;
}

.badge-info {
    background-color: var(--primary);
    color: white;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--card);
    margin: 5% auto;
    padding: 0;
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: slideInModal 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    color: var(--card-foreground);
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--muted-foreground);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    color: var(--card-foreground);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInModal {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Dashboard specific styles */
.status-pending {
    background-color: #fef3c7;
    color: #924608;
    border: 1px solid #f59e0b;
}

.status-approved {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.status-rejected {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Dark theme for specific status badges */
:root[data-theme="dark"] .status-approved {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    color: white !important;
    border: 1px solid #22c55e !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

:root[data-theme="dark"] .status-rejected {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
    border: 1px solid #ef4444 !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    width: 36px;
    height: 36px;
}

.btn-download:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-download svg {
    width: 16px;
    height: 16px;
}

/* Toast styles for dashboard */
.toast {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left: 4px solid var(--accent);
}

.toast.error {
    border-left: 4px solid var(--destructive);
}

.toast.info {
    border-left: 4px solid var(--primary);
}

.toast-content {
    flex: 1;
}

.toast-content strong {
    color: var(--foreground);
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.toast-content p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin: 0;
}

.toast-close {
    background: none;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 0;
    margin-left: 1rem;
}

.toast-close:hover {
    color: var(--foreground);
}