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

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}

/* Login Screen Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f1f5f9; /* Light background */
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.login-logo {
    width: 120px;
    height: auto;
    margin-bottom: 20px;
}

.login-box h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #1e293b;
}

.login-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    margin-top: 20px;
}

.login-message {
    margin-top: 15px;
    font-size: 14px;
    color: #ef4444; /* Error color */
    font-weight: 500;
}

.login-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.login-footer-text {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
}

.login-footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.login-footer-links a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.login-footer-links a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.footer-separator {
    color: #cbd5e1;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.menu-toggle:hover {
    background-color: #f1f5f9;
}

.header-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.header-logo {
    height: 40px; /* Adjust as needed */
    width: auto;
    margin-left: 10px;
    margin-right: auto; /* Push cart to the right */
    object-fit: contain;
}

.cart-indicator {
    position: relative;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s;
    user-select: none;
}

.cart-indicator:hover {
    background-color: #f1f5f9;
}

.cart-indicator:active {
    transform: scale(0.98);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: white;
    border-right: 1px solid #e2e8f0;
    transition: left 0.3s ease;
    z-index: 1001;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.close-sidebar {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.close-sidebar:hover {
    background-color: #f1f5f9;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s;
    border-right: 3px solid transparent;
}

.menu-item:hover {
    background-color: #f8fafc;
    color: #1e293b;
}

.menu-item.active {
    background-color: #f1f5f9;
    color: #3b82f6;
    border-right-color: #3b82f6;
}

.menu-item i {
    margin-right: 12px;
    width: 16px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-top: 60px;
    padding: 30px;
    transition: margin-left 0.3s ease;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Dashboard */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    user-select: none;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.card:active {
    transform: translateY(0);
}

.card-icon {
    width: 50px;
    height: 50px;
    background: #3b82f6;
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 16px;
}

.card-info h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.card-info p {
    color: #64748b;
    font-size: 14px;
}

/* Chart Container */
.budget-chart-container {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-top: 30px;
    text-align: center;
    max-width: 600px; /* Limit chart size */
    margin-left: auto;
    margin-right: auto;
    height: 400px; /* Ensure enough height for chart */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.budget-chart-container h3 {
    margin-bottom: 20px;
    font-size: 20px;
    color: #1e293b;
}

/* Section Header with sticky button */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
}

/* Sticky button container */
.section-header .btn {
    position: -webkit-sticky;
    position: sticky;
    top: 80px;
    z-index: 100;
    background: #3b82f6;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
}

.section-header .btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.section-header .btn-danger {
    position: -webkit-sticky;
    position: sticky;
    top: 80px;
    z-index: 100;
    background: #f97316; /* Orange color as requested */
    color: white;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    transition: all 0.2s ease;
}

.section-header .btn-danger:hover {
    background: #ea580c;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
}

.section-header h2 {
    font-size: 24px;
    font-weight: 600;
}

/* New: Styling for inline controls like category filter */
.filter-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-controls .form-group-inline {
    flex: 1;
    min-width: 200px;
    height: 60px;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    background: white;
}

input[type="text"],
input[type="number"] {
  height: 60px; /* Define a altura desejada */
  padding: 10px; /* Adiciona espaçamento interno */
  line-height: 20px; /* Ajusta o espaçamento vertical do texto */
  -webkit-appearance: none; /* Remove as setas do input number */
  appearance: none; /* Remove as setas para navegadores não WebKit */
}

/* Buttons */
.btn {
    padding: 12px 20px; /* Increased padding */
    height: 60px; /* Define a altura do botão */
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

#clearCartBtn {
    background: #f97316;
}

#clearCartBtn:hover {
    background: #ea580c;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: move;
    border-top: 3px solid transparent;
    transition: all 0.2s;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.product-card[draggable="true"] {
    user-select: none;
    -webkit-user-select: none;
}

.product-image-container {
    width: 100%;
    height: 200px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    max-width: 114px;
    max-height: 158px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    word-wrap: break-word; /* Ensure long names wrap */
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 12px;
}

.product-description {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 16px;
    word-wrap: break-word; /* Ensure long descriptions wrap */
}

.product-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap; /* Allow buttons to wrap */
}

.product-quantity-indicator {
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    margin-left: 5px;
}

.btn-small {
    padding: 8px 14px; /* Slightly increased padding for small buttons */
    font-size: 13px; /* Adjusted font size for small buttons */
}

/* Cart */
.cart-items {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

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

.cart-item-image-container {
    width: 60px;
    height: 60px;
    background: #f8fafc;
    border-radius: 8px;
    margin-right: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image {
    max-width: 48px;
    max-height: 48px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0;
}

.cart-item-price {
    color: #10b981;
    font-weight: 500;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 20px;
    flex-shrink: 0;
}

.quantity-btn {
    width: 34px; /* Increased size */
    height: 34px; /* Increased size */
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.quantity-input {
    width: 60px; /* Increased width */
    height: 34px; /* Added height */
    text-align: center;
    border: 1px solid #d1d5db;
    border-radius: 8px; /* Adjusted border-radius */
    padding: 4px;
}

.cart-total {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    text-align: right;
}

.cart-total h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

/* Forms */
.budget-form, .product-form, .tax-form, .meal-form, .displacement-form, .accommodation-form, .engineering-form, .commercial-conditions-form, .general-observations-form {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px; /* Increased padding */
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px; /* Slightly increased font size */
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-help-text {
    font-size: 0.85em;
    color: #64748b;
    margin-top: 5px;
    margin-bottom: 5px;
}

.billing-fields {
    display: none;
}

.budget-summary {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.summary-item.total {
    font-weight: 700;
    font-size: 18px;
    border-top: 1px solid #e2e8f0;
    padding-top: 10px;
    margin-top: 10px;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@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: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.close-modal:hover {
    background-color: #f1f5f9;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.image-preview {
    margin-top: 10px;
}

.image-preview img {
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    display: none;
}

.overlay.active {
    display: block;
}

/* Report Preview */
.report-preview {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    min-height: 400px;
}

.report-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

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

.report-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1e293b;
}

.report-section p {
    margin-bottom: 10px;
    white-space: pre-wrap; /* Preserve whitespace and allow wrapping for textareas */
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.report-table th,
.report-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    word-wrap: break-word; /* Ensure table cell content wraps */
}

.report-table th {
    background: #f8fafc;
    font-weight: 600;
}

/* Report Actions */
.report-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

/* Tab Navigation Buttons */
.tab-navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.tab-navigation-buttons button {
    min-width: 120px; /* Ensure buttons have a decent size */
}

/* About Tab Specific Styles */
.about-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.about-content p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.about-content ul {
    list-style: disc;
    margin-left: 20px;
    padding-top: 10px;
}

.about-content li {
    margin-bottom: 8px;
}

.about-content a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.about-content a:hover {
    text-decoration: underline;
}

/* Cloud Tab Styles */
.cloud-container {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.cloud-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.cloud-section.credential-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.cloud-section.credential-section h3 {
    color: #1e293b;
    margin-bottom: 20px;
}

.cloud-section .form-group label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.cloud-section .form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 10px;
}

.cloud-section .form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.cloud-section .help-text {
    font-size: 12px;
    color: #64748b;
    margin-top: 10px;
}

.cloud-section .help-text a {
    color: #3b82f6;
    text-decoration: none;
}

.cloud-section .help-text a:hover {
    text-decoration: underline;
}

.cloud-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1e293b;
}

.drive-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.drive-status.connected {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.drive-status.not-connected {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

#driveStatus.error {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
}

.files-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.files-list {
    max-height: 400px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: #f8fafc;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.file-item:hover {
    background: #f1f5f9;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-icon {
    color: #3b82f6;
    font-size: 18px;
}

.file-name {
    font-weight: 500;
    color: #1e293b;
}

.file-date {
    font-size: 12px;
    color: #64748b;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 20px 15px;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .section-header .btn {
        position: relative;
        top: auto;
        width: 100%;
        margin-top: 10px;
    }

    .section-header .btn-danger {
        position: relative;
        top: auto;
        width: 100%;
        margin-top: 10px;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .cart-item-quantity {
        margin: 0;
    }

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

    .tab-navigation-buttons {
        flex-direction: column;
        gap: 10px;
    }

    /* Mobile specific button styles */
    .btn {
        width: 100%; /* Make buttons take full width */
        height: 50px; /* Increase button height */
        font-size: 16px; /* Adjust font size for better readability on larger buttons */
        padding: 12px 20px; /* Adjust padding to center text vertically */
        justify-content: center; /* Center content horizontally */
    }

    /* Small buttons should retain their smaller size */
    .btn-small {
        width: auto;
        height: auto;
        font-size: 12px;
        padding: 6px 12px;
    }

    .back-to-top {
        width: 56px;
        height: 56px;
        right: 14px;
        bottom: 18px;
        font-size: 18px;
    }
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #cbd5e1;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #475569;
}

.file-actions {
    display: flex;
    gap: 8px;
}

.file-actions .btn-small {
    padding: 4px 8px;
    font-size: 11px;
}

/* Rich Text Editor Styles */
.rich-text-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    padding: 8px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.rich-text-editor {
    min-height: 120px;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    background: white;
    cursor: text;
    overflow-y: auto;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.rich-text-editor:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.rich-text-editor a {
    color: #3b82f6;
    text-decoration: underline;
    cursor: pointer;
}

.rich-text-editor a:hover {
    color: #2563eb;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    right: 18px;
    bottom: 22px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #3b82f6;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(59,130,246,0.25);
    cursor: pointer;
    z-index: 2500;
    transition: transform 0.18s ease, opacity 0.18s ease;
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    will-change: transform, opacity;
    touch-action: manipulation;
}

.back-to-top.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.back-to-top:active {
    transform: translateY(1px) scale(0.98);
}