:root {
    --primary-green: #008055;
    --primary-light: #e6f2ec;
    --primary-gradient: linear-gradient(135deg, #008055 0%, #00a36c 100%);
    --bg-light: #f8fafc;
    --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 128, 85, 0.05);
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-bars {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.loader-bar {
    width: 12px;
    height: 40px;
    background: var(--primary-green);
    border-radius: 10px;
    animation: bar-wave 1s ease-in-out infinite;
}

.loader-bar:nth-child(2) { animation-delay: 0.1s; background: #00a871; }
.loader-bar:nth-child(3) { animation-delay: 0.2s; background: #00cf8b; }
.loader-bar:nth-child(4) { animation-delay: 0.3s; background: #33ffbd; }

@keyframes bar-wave {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1.5); }
}

.loader-text {
    color: var(--primary-green);
    font-weight: 700;
    font-size: 1.1rem;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 1px;
}

/* Centered Labels Utility */
.form-label-centered {
    display: block;
    text-align: center;
    font-weight: 600;
    color: #475569;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.form-control-centered {
    text-align: center;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 10px 15px;
    font-weight: 500;
}

body {
    background-color: var(--bg-light);
    font-family: 'Poppins', sans-serif;
    color: #334155;
    padding-bottom: 50px;
}

h1,
h2,
h3,
h4,
.outfit {
    font-family: 'Outfit', sans-serif;
}

/* Header Styles */
.navbar-custom {
    background: white;
    padding: 12px 24px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 16px;
    background: #f1f5f9;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-profile:hover {
    background: #e2e8f0;
}

.avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.9rem;
}

.role-badge {
    background: #fff8e1;
    color: #b45309;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Main Containers */
.page-header-box {
    background: white;
    border-radius: var(--border-radius-md);
    padding: 20px;
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
    text-align: center;
}

.location-badge {
    background: #e0f2fe;
    color: #0369a1;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.location-badge:hover {
    background: #bae6fd;
}

/* Calculator Switcher */
.nav-pills-custom {
    background: white;
    padding: 8px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--card-shadow);
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.nav-link-custom {
    flex: 1;
    padding: 12px 20px;
    border-radius: 12px;
    border: 2px solid transparent;
    background: transparent;
    color: #64748b;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.nav-link-custom.active {
    background: var(--primary-light);
    color: var(--primary-green);
    border-color: var(--primary-green);
}

.nav-link-custom i {
    font-size: 1.2rem;
}

/* Section Cards */
.section-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
    border: 1px solid rgba(0, 128, 85, 0.05);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.section-title {
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-light);
}

.section-title i {
    color: var(--primary-green);
    font-size: 1.4rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
}

.form-control,
.form-select {
    border-radius: 12px;
    padding: 11px 16px;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background-color: #fff;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px rgba(0, 128, 85, 0.1);
    background-color: #fff;
}

/* Accessories Grid */
.accessory-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.accessory-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #334155;
}

.accessory-qty {
    font-size: 0.75rem;
    color: #64748b;
    background: white;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

/* Insurance Badge */
.insurance-alert {
    background: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46;
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

/* Action Buttons */
.btn-primary-custom {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 10px 15px -3px rgba(0, 128, 85, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 20px -3px rgba(0, 128, 85, 0.4);
    color: white;
}

.btn-outline-custom {
    border: 2px solid #e2e8f0;
    color: #64748b;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    background: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-outline-custom:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
    background: var(--primary-light);
}

/* Wiring Rows */
.wire-row {
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.wire-row:hover {
    border-color: var(--primary-green);
    background-color: white !important;
}

/* Section dividers */
.sub-header {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 15px;
}

/* Result Cards */
.result-card {
    background: white;
    border-radius: 20px;
    padding: 24px 20px;
    text-align: center;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-card.border-success-subtle {
    border-color: #10b981 !important;
    background: #f0fdf4;
}

.result-card.border-primary-subtle {
    border-color: #3b82f6 !important;
    background: #eff6ff;
}

.result-card.border-warning-subtle {
    border-color: #f59e0b !important;
    background: #fffbeb;
}

.result-value {
    font-size: 1.6rem;
    font-weight: 800;
    margin-top: 8px;
    font-family: 'Outfit', sans-serif;
}

.result-label {
    font-size: 0.85rem;
    color: #475569;
    font-weight: 600;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade {
    animation: fadeIn 0.5s ease forwards;
}

.border-dashed {
    border: 2px dashed #e2e8f0;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    background: white;
    min-width: 200px;
    border-radius: 20px;
    padding: 10px;
    z-index: 1000;
    display: none;
    transform-origin: top right;
    animation: dropdownFade 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.profile-dropdown.show {
    display: block;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.dropdown-arrow {
    position: absolute;
    top: -8px;
    right: 20px;
    width: 16px;
    height: 16px;
    background: white;
    transform: rotate(45deg);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-left: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-item-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.dropdown-item-custom:hover {
    background: #f1f5f9;
    color: var(--primary-green);
}

.dropdown-item-custom i {
    font-size: 1.1rem;
    color: var(--primary-green);
}

.dropdown-item-custom.logout {
    color: #ef4444;
    background: #fef2f2;
    margin-top: 5px;
}

.dropdown-item-custom.logout:hover {
    background: #fee2e2;
}

.dropdown-item-custom.logout i {
    color: #ef4444;
}

.dropdown-divider-custom {
    height: 1px;
    background: #f1f5f9;
    margin: 8px 0;
}

.wire-item-card {
    background: white;
    border: 1px solid #eef2f6;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.wire-item-card:hover {
    border-color: #cbd5e1;
}

.wire-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.wire-name {
    font-weight: 700;
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
}

.wire-label {
    display: block;
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 5px;
}

/* PVC Accessories Dashed Box */
.border-dashed {
    border: 2px dashed #e2e8f0;
    background: #f8fafc;
}

/* Mounting Accessories Small Cards */
.accessory-badge {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
}

.accessory-badge .qty-text {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-left: 10px;
}

/* Structure Accessories Large Cards */
.struct-acc-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    height: 100%;
    transition: all 0.2s ease;
}

.struct-acc-card:hover {
    border-color: var(--primary-green);
    background: #f0fdf4;
}

.struct-acc-card .form-check-input {
    width: 24px;
    height: 24px;
    margin-bottom: 10px;
    cursor: pointer;
}

.struct-acc-card label {
    display: block;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 5px;
}

.struct-acc-card .qty-sub {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Transport & Insurance Alerts */
.transport-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 500;
}

.insurance-success-box {
    background: #f0fdf4;
    border: 1px solid #bcf0da;
    color: #166534;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}


.kit-result-card {
    background: white;
    border-radius: 20px;
    border: 1px solid #eef2f6;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

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

.card-header-kit {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 700;
    color: #1e293b;
    font-family: 'Outfit', sans-serif;
}

.icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.icon-circle.blue {
    background: #e0f2fe;
    color: #0ea5e9;
}

.icon-circle.green {
    background: #dcfce7;
    color: #22c55e;
}

.card-body-kit {
    padding: 40px 20px;
    text-align: center;
}

.price-text {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    font-family: 'Outfit', sans-serif;
}

.price-text.blue {
    color: #0284c7;
}

.price-text.dark {
    color: #1e293b;
}

.price-sub {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 5px;
    font-weight: 500;
}

/* Profit List Styling */
.profit-list {
    padding: 20px;
    text-align: left;
}

.profit-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    font-weight: 500;
    color: #64748b;
}

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

.profit-item span:last-child {
    color: #1e293b;
    font-weight: 700;
}

.profit-item.total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #f1f5f9;
    color: #0369a1;
}

.profit-item.total span:last-child {
    color: #0369a1;
    font-size: 1.1rem;
    font-weight: 800;
}