/* Boiler Genius - Caldaie Melgari
   Brand Colors:
   - Primary Red Dark: #ac182d
   - Primary Red: #e30613
   - Gray: #99989a
   - Gradient: from #ac182d to #e30613
*/

:root {
    --bg-primary-dark: #ac182d;
    --bg-primary: #e30613;
    --bg-gray: #99989a;
    --bg-gradient: linear-gradient(135deg, #ac182d 0%, #e30613 100%);
}

/* Typography */
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 600;
}

/* Navbar */
.navbar {
    background: var(--bg-gradient) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    padding: 0.5rem 1rem;
}

.navbar-brand {
    padding: 0;
    margin-right: 1rem;
}

.navbar-logo {
    height: 36px;
    width: auto;
}

.navbar-nav {
    align-items: center;
}

.navbar-nav .nav-item {
    display: flex;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 0.75rem !important;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.dropdown-toggle::after {
    margin-left: 0.25rem;
}

/* Override Bootstrap primary */
.bg-primary {
    background: var(--bg-gradient) !important;
}

.btn-primary {
    background: var(--bg-gradient);
    border: none;
}

.btn-primary:hover {
    background: var(--bg-primary-dark);
    box-shadow: 0 2px 8px rgba(172, 24, 45, 0.4);
}

.btn-outline-primary {
    color: var(--bg-primary-dark);
    border-color: var(--bg-primary-dark);
}

.btn-outline-primary:hover {
    background: var(--bg-primary-dark);
    border-color: var(--bg-primary-dark);
}

.text-primary {
    color: var(--bg-primary-dark) !important;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-radius: 10px;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

/* Stats cards */
.stat-card {
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s;
}

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

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--bg-primary-dark);
}

.stat-card .stat-label {
    color: var(--bg-gray);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Form sections */
.form-section {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.form-section-title {
    color: var(--bg-primary-dark);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bg-primary);
}

/* Tables */
.table {
    background: #fff;
}

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid var(--bg-primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table-hover tbody tr:hover {
    background-color: rgba(227, 6, 19, 0.05);
}

/* Status badges */
.badge-draft {
    background-color: var(--bg-gray);
}

.badge-in_progress {
    background-color: #ffc107;
    color: #000;
}

.badge-completed {
    background-color: #198754;
}

.badge-sent {
    background-color: var(--bg-primary);
}

/* Sidebar for forms */
.quote-sidebar {
    background: #fff;
    border-radius: 10px;
    padding: 1rem;
    position: sticky;
    top: 1rem;
}

.quote-sidebar .nav-link {
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    margin-bottom: 0.25rem;
}

.quote-sidebar .nav-link:hover,
.quote-sidebar .nav-link.active {
    background: rgba(227, 6, 19, 0.1);
    color: var(--bg-primary-dark);
}

/* AI Generate */
.ai-input-area {
    min-height: 200px;
    font-size: 1.1rem;
}

.ai-preview-card {
    border-left: 4px solid var(--bg-primary);
}

/* Integrations */
.integration-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.integration-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.integration-icon {
    font-size: 2.5rem;
    color: var(--bg-primary-dark);
}

/* Converter */
.converter-box {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.converter-result {
    font-size: 2rem;
    font-weight: 700;
    color: var(--bg-primary-dark);
}

/* Login page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gradient);
}

.login-card {
    background: #fff;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    max-width: 400px;
    width: 100%;
}

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

.login-card .logo h1,
.login-card .logo h2 {
    color: var(--bg-primary-dark);
    font-size: 1.5rem;
    margin-top: 0.5rem;
}

/* Footer */
.footer {
    margin-top: auto;
    border-top: 1px solid #dee2e6;
}

/* Responsive */
@media (max-width: 768px) {
    .stat-card .stat-value {
        font-size: 1.8rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
}

/* Print styles */
@media print {
    .navbar, .footer, .btn, .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Dropbox file browser */
.file-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

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

.file-item i {
    margin-right: 0.75rem;
    color: var(--bg-gray);
}

.file-item.folder i {
    color: #ffc107;
}

/* Price list conditions */
.condition-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    background: #e9ecef;
    margin: 0.125rem;
}

/* Translation history */
.translation-item {
    border-left: 3px solid var(--bg-primary);
    padding-left: 1rem;
    margin-bottom: 1rem;
}
