/* Viessmann Service Management System */

:root {
    --brand: #d01b0a;
    --brand-dark: #a81508;
    --brand-light: #e8342a;
    --sidebar-width: 250px;
    --viessmann-dark: #1a1a2e;
}

/* === Bootstrap overrides === */
.btn-primary {
    background-color: var(--brand) !important;
    border-color: var(--brand) !important;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--brand-dark) !important;
    border-color: var(--brand-dark) !important;
}
.btn-outline-primary {
    color: var(--brand) !important;
    border-color: var(--brand) !important;
}
.btn-outline-primary:hover {
    background-color: var(--brand) !important;
    color: #fff !important;
}
.text-primary { color: var(--brand) !important; }
.bg-primary { background-color: var(--brand) !important; }
.border-primary { border-color: var(--brand) !important; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
.page-item.active .page-link {
    background-color: var(--brand);
    border-color: var(--brand);
}
.page-link { color: var(--brand); }
.form-control:focus, .form-select:focus {
    border-color: var(--brand-light);
    box-shadow: 0 0 0 0.2rem rgba(208,27,10,0.15);
}

/* === Sidebar === */
#sidebar {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%) !important;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

#sidebar .sidebar-brand {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#sidebar .sidebar-brand img {
    height: 32px;
    filter: brightness(0) invert(1);
}

#sidebar .nav-link {
    color: rgba(255,255,255,0.75);
    padding: 0.6rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
}

#sidebar .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
}

#sidebar .nav-link.active {
    background-color: var(--brand) !important;
    color: #fff !important;
    font-weight: 600;
}

#sidebar .nav-link i {
    width: 24px;
    text-align: center;
}

/* Responsive sidebar */
@media (max-width: 991.98px) {
    #sidebar {
        transform: translateX(-100%);
        position: fixed !important;
    }
    #sidebar.show {
        transform: translateX(0);
    }
    .flex-grow-1 {
        margin-left: 0 !important;
    }
}

/* === Tags === */
.tag-badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 0.375rem;
    color: #fff;
    white-space: nowrap;
}

/* === Cards === */
.stat-card {
    border-left: 4px solid;
    transition: transform 0.15s ease;
}

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

/* === Tables === */
.table-hover tbody tr {
    cursor: pointer;
}

/* === Search === */
.search-bar {
    max-width: 400px;
}

/* === Process steps === */
.step-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

.step-dot.completed { background: #28a745; color: #fff; }
.step-dot.active { background: var(--brand); color: #fff; }
.step-dot.pending { background: #e9ecef; color: #6c757d; }
.step-line { flex-grow: 1; height: 2px; background: #e9ecef; }
.step-line.completed { background: #28a745; }

/* === Mobile === */
@media (max-width: 575.98px) {
    .container-fluid { padding: 1rem !important; }
    .btn-group-responsive .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.25rem;
    }
}

/* === Print === */
@media print {
    #sidebar, .navbar, .btn, .alert { display: none !important; }
    .flex-grow-1 { margin-left: 0 !important; }
}

/* ==============================
   PUBLIC WEBSITE STYLES
   ============================== */

.public-nav {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.public-nav .navbar-brand img {
    height: 36px;
}

.public-nav .nav-link {
    color: #333 !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.15s;
}

.public-nav .nav-link:hover,
.public-nav .nav-link.active {
    color: var(--brand) !important;
}

/* Hero */
.hero-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, var(--brand-dark) 100%);
    color: #fff;
    padding: 6rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 100%);
}

.hero-section h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.hero-section .lead {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Sections */
.section { padding: 5rem 0; }
.section-gray { background: #f8f9fa; }

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #1a1a2e;
}

.section-subtitle {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* Service cards */
.service-card {
    border: none;
    border-radius: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.service-card .card-body { padding: 2rem; }

.service-icon {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    background: rgba(208,27,10,0.1);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

/* Stats bar */
.stats-bar {
    background: var(--brand);
    color: #fff;
    padding: 3rem 0;
}

.stats-bar .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
}

.stats-bar .stat-label {
    font-size: 0.95rem;
    opacity: 0.85;
}

/* Contact form */
.contact-form .form-control {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
}

/* Footer */
.site-footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.7);
    padding: 3rem 0 1.5rem;
}

.site-footer h6 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1rem;
}

.site-footer a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.15s;
}

.site-footer a:hover {
    color: var(--brand-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
}

/* Emergency banner */
.emergency-banner {
    background: var(--brand);
    color: #fff;
    padding: 0.75rem 0;
    font-weight: 500;
}

.emergency-banner a {
    color: #fff;
    text-decoration: underline;
}
