estimator-pro / index.html
rdowns's picture
Add 3 files
747147a verified
Raw History Blame Contribute Delete
61.4 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Reconstruction Project Estimator</title> <script src="https://cdn.tailwindcss.com"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <style> .calculator-card { transition: all 0.3s ease; } .calculator-card:hover { transform: translateY(-3px); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); } .tab-button { transition: all 0.2s ease; } .tab-button.active { background-color: #3b82f6; color: white; } .summary-item { border-left: 4px solid #3b82f6; } input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; } .profit-positive { color: #10b981; } .profit-negative { color: #ef4444; } .profit-neutral { color: #6b7280; } </style> </head> <body class="bg-gray-50 min-h-screen"> <header class="bg-blue-700 text-white shadow-lg"> <div class="container mx-auto px-4 py-6"> <div class="flex flex-col md:flex-row justify-between items-center"> <div class="mb-4 md:mb-0"> <h1 class="text-3xl font-bold">Reconstruction Estimator Pro</h1> <p class="text-blue-200 mt-1">Accurate pricing based on industry standards</p> </div> <div class="flex items-center space-x-4"> <button id="resetBtn" class="bg-white text-blue-700 px-4 py-2 rounded-lg font-semibold hover:bg-blue-50 transition"> <i class="fas fa-redo mr-2"></i>Reset All </button> <button id="printBtn" class="bg-blue-800 text-white px-4 py-2 rounded-lg font-semibold hover:bg-blue-900 transition"> <i class="fas fa-print mr-2"></i>Print Estimate </button> </div> </div> </div> </header> <main class="container mx-auto px-4 py-8"> <div class="grid grid-cols-1 lg:grid-cols-3 gap-8"> <div class="lg:col-span-2"> <div class="bg-white rounded-xl shadow-md p-6 mb-6"> <h2 class="text-2xl font-bold text-gray-800 mb-4">Project Details</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Project Name</label> <input type="text" id="projectName" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="e.g., Smith Residence Kitchen"> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Project Date</label> <input type="date" id="projectDate" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500"> </div> </div> <div class="mt-4"> <label class="block text-sm font-medium text-gray-700 mb-1">Project Notes</label> <textarea id="projectNotes" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" rows="3" placeholder="Any special considerations..."></textarea> </div> <div class="mt-4 grid grid-cols-1 md:grid-cols-2 gap-4"> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Contract Total ($)</label> <input type="number" id="contractTotal" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total contract amount"> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Estimated Overhead (%)</label> <input type="number" id="overheadPercent" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" value="15" placeholder="Overhead percentage"> </div> </div> </div> <div class="bg-white rounded-xl shadow-md p-6 mb-6"> <div class="flex overflow-x-auto space-x-1 pb-2"> <button class="tab-button px-4 py-2 rounded-lg font-medium active" data-tab="maintrade">Main Trade</button> <button class="tab-button px-4 py-2 rounded-lg font-medium" data-tab="countertops">Countertops</button> <button class="tab-button px-4 py-2 rounded-lg font-medium" data-tab="flooring">Flooring</button> <button class="tab-button px-4 py-2 rounded-lg font-medium" data-tab="tile">Tile</button> <button class="tab-button px-4 py-2 rounded-lg font-medium" data-tab="showers">Showers</button> <button class="tab-button px-4 py-2 rounded-lg font-medium" data-tab="cabinetry">Cabinetry</button> </div> <div id="tabContent" class="mt-4"> <!-- Main Trade Tab --> <div class="tab-content" id="maintrade-tab"> <div class="calculator-card bg-gray-50 p-4 rounded-lg"> <h3 class="font-bold text-lg text-gray-800 mb-3">Main Trade Labor</h3> <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Number of Days</label> <input type="number" id="tradeDays" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Estimated days"> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Daily Rate</label> <select id="tradeRate" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500"> <option value="600">$600/day (Standard)</option> <option value="700">$700/day (Moderate)</option> <option value="800">$800/day (Heavy Labor)</option> </select> </div> </div> <div class="mt-3 space-y-2"> <label class="inline-flex items-center"> <input type="checkbox" id="tradeMaterials" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"> <span class="ml-2 text-sm text-gray-700">Add Materials Surcharge (+15%)</span> </label> <label class="inline-flex items-center"> <input type="checkbox" id="tradeHeavy" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"> <span class="ml-2 text-sm text-gray-700">Heavy Labor (+10%)</span> </label> </div> <button onclick="calculateTrade()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button> <div id="tradeResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden"> <div class="flex justify-between"> <span class="font-medium">Estimated Cost:</span> <span id="tradeCost" class="font-bold">$0.00</span> </div> </div> </div> </div> <!-- Countertops Tab --> <div class="tab-content hidden" id="countertops-tab"> <div class="calculator-card bg-gray-50 p-4 rounded-lg mb-4"> <h3 class="font-bold text-lg text-gray-800 mb-3">Solid/Stone Countertops</h3> <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Square Footage</label> <input type="number" id="countertopSqft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total sqft"> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Number of Slabs</label> <input type="number" id="countertopSlabs" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Slab count"> </div> </div> <div class="mt-3 space-y-2"> <label class="inline-flex items-center"> <input type="checkbox" id="countertopDisposal" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"> <span class="ml-2 text-sm text-gray-700">Disposal Needed (+$170)</span> </label> <label class="inline-flex items-center"> <input type="checkbox" id="countertopSubdeck" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"> <span class="ml-2 text-sm text-gray-700">Sub Deck Needed (+$200)</span> </label> </div> <button onclick="calculateCountertop()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button> <div id="countertopResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden"> <div class="flex justify-between"> <span class="font-medium">Estimated Cost:</span> <span id="countertopCost" class="font-bold">$0.00</span> </div> </div> </div> <div class="calculator-card bg-gray-50 p-4 rounded-lg"> <h3 class="font-bold text-lg text-gray-800 mb-3">Laminate Countertops</h3> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Linear Feet</label> <input type="number" id="laminateLnft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total linear feet"> </div> <button onclick="calculateLaminate()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button> <div id="laminateResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden"> <div class="flex justify-between"> <span class="font-medium">Estimated Cost:</span> <span id="laminateCost" class="font-bold">$0.00</span> </div> </div> </div> </div> <!-- Flooring Tab --> <div class="tab-content hidden" id="flooring-tab"> <div class="calculator-card bg-gray-50 p-4 rounded-lg mb-4"> <h3 class="font-bold text-lg text-gray-800 mb-3">Vinyl/Laminate Flooring</h3> <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Square Footage</label> <input type="number" id="vinylSqft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total sqft"> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Linear Feet (Quarter Round)</label> <input type="number" id="vinylLnft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Linear feet"> </div> </div> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mt-2"> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Material Cost ($/sqft)</label> <input type="number" id="vinylMaterialCost" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Material cost per sqft"> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Delivery Trips</label> <input type="number" id="vinylTrips" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Number of trips"> </div> </div> <div class="mt-3 space-y-2"> <label class="inline-flex items-center"> <input type="checkbox" id="vinylDemo" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"> <span class="ml-2 text-sm text-gray-700">Demo Needed (+$1.50/sqft)</span> </label> <label class="inline-flex items-center"> <input type="checkbox" id="vinylUnderlayment" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"> <span class="ml-2 text-sm text-gray-700">Underlayment Needed (+$0.75/sqft)</span> </label> <label class="inline-flex items-center"> <input type="checkbox" id="vinylLeveling" class="h-4 w-4 text-blue-600 focus:ring-blue-5 00 border-gray-300 rounded"> <span class="ml-2 text-sm text-gray-700">Floor Leveling Needed (+$1.50/sqft)</span> </label> </div> <button onclick="calculateVinyl()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button> <div id="vinylResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden"> <div class="flex justify-between"> <span class="font-medium">Estimated Cost:</span> <span id="vinylCost" class="font-bold">$0.00</span> </div> </div> </div> <div class="calculator-card bg-gray-50 p-4 rounded-lg mb-4"> <h3 class="font-bold text-lg text-gray-800 mb-3">Hardwood Flooring</h3> <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Square Footage</label> <input type="number" id="woodSqft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total sqft"> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Linear Feet (Quarter Round)</label> <input type="number" id="woodLnft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Linear feet"> </div> </div> <div class="mt-2"> <label class="block text-sm font-medium text-gray-700 mb-1">Material Cost ($/sqft)</label> <input type="number" id="woodMaterialCost" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Material cost per sqft"> </div> <div class="mt-3 space-y-2"> <label class="inline-flex items-center"> <input type="checkbox" id="woodDemo" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"> <span class="ml-2 text-sm text-gray-700">Demo Needed (+$2.00/sqft)</span> </label> <label class="inline-flex items-center"> <input type="checkbox" id="woodLeveling" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"> <span class="ml-2 text-sm text-gray-700">Floor Leveling Needed (+$1.50/sqft)</span> </label> </div> <button onclick="calculateWood()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button> <div id="woodResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden"> <div class="flex justify-between"> <span class="font-medium">Estimated Cost:</span> <span id="woodCost" class="font-bold">$0.00</span> </div> </div> </div> <div class="calculator-card bg-gray-50 p-4 rounded-lg"> <h3 class="font-bold text-lg text-gray-800 mb-3">Carpet</h3> <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Square Footage</label> <input type="number" id="carpetSqft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total sqft"> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Number of Rooms</label> <input type="number" id="carpetRooms" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Number of rooms"> </div> </div> <div class="mt-2"> <label class="block text-sm font-medium text-gray-700 mb-1">Material Cost ($/sqft)</label> <input type="number" id="carpetMaterialCost" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Material cost per sqft"> </div> <div class="mt-3"> <label class="inline-flex items-center"> <input type="checkbox" id="carpetDemo" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"> <span class="ml-2 text-sm text-gray-700">Demo Needed (+$1.00/sqft)</span> </label> </div> <button onclick="calculateCarpet()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button> <div id="carpetResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden"> <div class="flex justify-between"> <span class="font-medium">Estimated Cost:</span> <span id="carpetCost" class="font-bold">$0.00</span> </div> </div> </div> </div> <!-- Tile Tab --> <div class="tab-content hidden" id="tile-tab"> <div class="calculator-card bg-gray-50 p-4 rounded-lg mb-4"> <h3 class="font-bold text-lg text-gray-800 mb-3">Tile Flooring</h3> <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Square Footage</label> <input type="number" id="tileSqft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total sqft"> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Material Cost ($/sqft)</label> <input type="number" id="tileMaterialCost" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Material cost per sqft"> </div> </div> <div class="mt-3 space-y-2"> <label class="inline-flex items-center"> <input type="checkbox" id="tileDemo" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"> <span class="ml-2 text-sm text-gray-700">Demo Needed (+$2.00/sqft)</span> </label> <label class="inline-flex items-center"> <input type="checkbox" id="tileSmallBath" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"> <span class="ml-2 text-sm text-gray-700">Small Bathroom (+$150)</span> </label> </div> <div id="tileBathLocation" class="mt-2 hidden"> <label class="block text-sm font-medium text-gray-700 mb-1">Bathroom Location</label> <div class="flex space-x-4"> <label class="inline-flex items-center"> <input type="radio" name="bathLocation" value="main" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300"> <span class="ml-2 text-sm text-gray-700">Main Floor</span> </label> <label class="inline-flex items-center"> <input type="radio" name="bathLocation" value="upstairs" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300"> <span class="ml-2 text-sm text-gray-700">Upstairs</span> </label> </div> </div> <button onclick="calculateTile()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button> <div id="tileResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden"> <div class="flex justify-between"> <span class="font-medium">Estimated Cost:</span> <span id="tileCost" class="font-bold">$0.00</span> </div> </div> </div> <div class="calculator-card bg-gray-50 p-4 rounded-lg"> <h3 class="font-bold text-lg text-gray-800 mb-3">Backsplash</h3> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Square Footage</label> <input type="number" id="backsplashSqft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total sqft"> </div> <div class="mt-2"> <label class="block text-sm font-medium text-gray-700 mb-1">Complexity</label> <select id="backsplashComplexity" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500"> <option value="simple">Simple (Straight runs)</option> <option value="medium">Medium (Some cuts)</option> <option value="complex">Complex (Many cuts/patterns)</option> </select> </div> <button onclick="calculateBacksplash()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button> <div id="backsplashResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden"> <div class="flex justify-between"> <span class="font-medium">Estimated Cost:</span> <span id="backsplashCost" class="font-bold">$0.00</span> </div> </div> </div> </div> <!-- Showers Tab --> <div class="tab-content hidden" id="showers-tab"> <div class="calculator-card bg-gray-50 p-4 rounded-lg mb-4"> <h3 class="font-bold text-lg text-gray-800 mb-3">Shower Installation</h3> <label class="block text-sm font-medium text-gray-700 mb-1">Shower Size</label> <select id="showerSize" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500"> <option value="basic">Basic (3'x3')</option> <option value="medium">Medium (3'x4')</option> <option value="large">Large (4'x5')</option> <option value="custom">Custom Size</option> </select> <div id="showerCustomSize" class="mt-2 hidden"> <label class="block text-sm font-medium text-gray-700 mb-1">Custom Dimensions (LxW in feet)</label> <input type="text" id="showerDimensions" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="e.g., 3.5x4"> </div> <div class="mt-3 space-y-2"> <label class="inline-flex items-center"> <input type="checkbox" id="showerDualHead" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"> <span class="ml-2 text-sm text-gray-700">Dual Shower Head (+$300)</span> </label> <label class="inline-flex items-center"> <input type="checkbox" id="showerBench" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"> <span class="ml-2 text-sm text-gray-700">Shower Bench (+$450)</span> </label> <label class="inline-flex items-center"> <input type="checkbox" id="showerMultipleNiches" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"> <span class="ml-2 text-sm text-gray-700">Multiple Niches (+$200)</span> </label> </div> <button onclick="calculateShower()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button> <div id="showerResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden"> <div class="flex justify-between"> <span class="font-medium">Estimated Cost:</span> <span id="showerCost" class="font-bold">$0.00</span> </div> </div> </div> <div class="calculator-card bg-gray-50 p-4 rounded-lg mb-4"> <h3 class="font-bold text-lg text-gray-800 mb-3">Tub Surround</h3> <div class="space-y-2"> <label class="inline-flex items-center"> <input type="checkbox" id="tubStandard" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"> <span class="ml-2 text-sm text-gray-700">Standard Tub Surround ($1200)</span> </label> </div> <button onclick="calculateTub()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button> <div id="tubResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden"> <div class="flex justify-between"> <span class="font-medium">Estimated Cost:</span> <span id="tubCost" class="font-bold">$0.00</span> </div> </div> </div> <div class="calculator-card bg-gray-50 p-4 rounded-lg"> <h3 class="font-bold text-lg text-gray-800 mb-3">Shower Glass</h3> <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Glass Type</label> <select id="glassType" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500"> <option value="standard">Standard Framed</option> <option value="frameless">Frameless</option> <option value="reinstall">Reinstall Existing</option> </select> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Linear Feet</label> <input type="number" id="glassLnft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Linear feet"> </div> </div> <button onclick="calculateGlass()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button> <div id="glassResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden"> <div class="flex justify-between"> <span class="font-medium">Estimated Cost:</span> <span id="glassCost" class="font-bold">$0.00</span> </div> </div> </div> </div> <!-- Cabinetry Tab --> <div class="tab-content hidden" id="cabinetry-tab"> <div class="calculator-card bg-gray-50 p-4 rounded-lg"> <h3 class="font-bold text-lg text-gray-800 mb-3">Cabinet Repair/Installation</h3> <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Linear Feet</label> <input type="number" id="cabinetLnft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Linear feet"> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Number of Doors</label> <input type="number" id="cabinetDoors" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Number of doors"> </div> </div> <button onclick="calculateCabinet()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button> <div id="cabinetResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden"> <div class="flex justify-between"> <span class="font-medium">Estimated Cost:</span> <span id="cabinetCost" class="font-bold">$0.00</span> </div> </div> </div> </div> </div> </div> </div> <div class="lg:col-span-1"> <div class="bg-white rounded-xl shadow-md p-6 sticky top-8"> <h2 class="text-2xl font-bold text-gray-800 mb-4">Project Summary</h2> <div class="mb-6"> <h3 class="text-lg font-semibold text-gray-700 mb-2">Financial Overview</h3> <div class="grid grid-cols-2 gap-4"> <div class="bg-gray-50 p-3 rounded-lg"> <p class="text-sm text-gray-500">Contract Total</p> <p id="summaryContract" class="text-xl font-bold">$0.00</p> </div> <div class="bg-gray-50 p-3 rounded-lg"> <p class="text-sm text-gray-500">Estimated Costs</p> <p id="summaryCosts" class="text-xl font-bold">$0.00</p> </div> <div class="bg-gray-50 p-3 rounded-lg"> <p class="text-sm text-gray-500">Overhead</p> <p id="summaryOverhead" class="text-xl font-bold">$0.00</p> </div> <div class="bg-gray-50 p-3 rounded-lg"> <p class="text-sm text-gray-500">Profit</p> <p id="summaryProfit" class="text-xl font-bold">$0.00</p> </div> </div> </div> <div class="mb-6"> <h3 class="text-lg font-semibold text-gray-700 mb-2">Cost Breakdown</h3> <div id="costItems" class="space-y-3"> <div class="text-center text-gray-500 py-4"> <i class="fas fa-calculator text-2xl mb-2"></i> <p>Start adding items to see your cost breakdown</p> </div> </div> </div> <div class="border-t border-gray-200 pt-4"> <div class="flex justify-between items-center mb-2"> <span class="font-semibold">Total Estimated Costs:</span> <span id="totalCosts" class="font-bold text-lg">$0.00</span> </div> <button onclick="updateSummary()" class="mt-4 w-full bg-blue-600 text-white py-2 rounded-md hover:bg-blue-700 transition"> <i class="fas fa-sync-alt mr-2"></i>Update Summary </button> </div> </div> </div> </div> </main> <script> // Global variables to store calculated values const calculatedItems = { trade: 0, countertop: 0, laminate: 0, vinyl: 0, wood: 0, carpet: 0, tile: 0, backsplash: 0, shower: 0, tub: 0, glass: 0, cabinet: 0 }; // Tab switching functionality document.querySelectorAll('.tab-button').forEach(button => { button.addEventListener('click', function() { // Remove active class from all buttons document.querySelectorAll('.tab-button').forEach(btn => { btn.classList.remove('active'); }); // Add active class to clicked button this.classList.add('active'); // Hide all tab contents document.querySelectorAll('.tab-content').forEach(content => { content.classList.add('hidden'); }); // Show the selected tab content const tabId = this.getAttribute('data-tab') + '-tab'; document.getElementById(tabId).classList.remove('hidden'); }); }); // Calculate Trade Labor function calculateTrade() { const days = parseFloat(document.getElementById('tradeDays').value) || 0; const rate = parseFloat(document.getElementById('tradeRate').value) || 0; const materialsSurcharge = document.getElementById('tradeMaterials').checked; const heavyLabor = document.getElementById('tradeHeavy').checked; let cost = days * rate; if (materialsSurcharge) cost *= 1.15; if (heavyLabor) cost *= 1.10; calculatedItems.trade = cost; document.getElementById('tradeCost').textContent = `$${cost.toFixed(2)}`; document.getElementById('tradeResult').classList.remove('hidden'); addCostItem('Main Trade Labor', cost); updateSummary(); } // Calculate Countertop function calculateCountertop() { const sqft = parseFloat(document.getElementById('countertopSqft').value) || 0; const slabs = parseFloat(document.getElementById('countertopSlabs').value) || 0; const disposal = document.getElementById('countertopDisposal').checked; const subdeck = document.getElementById('countertopSubdeck').checked; // Base rate per square foot plus per slab let cost = (sqft * 45) + (slabs * 100); // Add disposal if needed if (disposal) cost += 170; // Add subdeck if needed if (subdeck) cost += 200; calculatedItems.countertop = cost; document.getElementById('countertopCost').textContent = `$${cost.toFixed(2)}`; document.getElementById('countertopResult').classList.remove('hidden'); addCostItem('Solid Countertops', cost); updateSummary(); } // Calculate Laminate function calculateLaminate() { const lnft = parseFloat(document.getElementById('laminateLnft').value) || 0; // Base rate per linear foot const cost = lnft * 35; calculatedItems.laminate = cost; document.getElementById('laminateCost').textContent = `$${cost.toFixed(2)}`; document.getElementById('laminateResult').classList.remove('hidden'); addCostItem('Laminate Countertops', cost); updateSummary(); } // Calculate Vinyl Flooring function calculateVinyl() { const sqft = parseFloat(document.getElementById('vinylSqft').value) || 0; const lnft = parseFloat(document.getElementById('vinylLnft').value) || 0; const materialCost = parseFloat(document.getElementById('vinylMaterialCost').value) || 0; const trips = parseFloat(document.getElementById('vinylTrips').value) || 0; const demo = document.getElementById('vinylDemo').checked; const underlayment = document.getElementById('vinylUnderlayment').checked; const leveling = document.getElementById('vinylLeveling').checked; // Base installation cost let cost = sqft * 2.50; // Add material cost cost += sqft * materialCost; // Add quarter round cost += lnft * 2.50; // Add delivery trips cost += trips * 75; // Add demo if needed if (demo) cost += sqft * 1.50; // Add underlayment if needed if (underlayment) cost += sqft * 0.75; // Add leveling if needed if (leveling) cost += sqft * 1.50; calculatedItems.vinyl = cost; document.getElementById('vinylCost').textContent = `$${cost.toFixed(2)}`; document.getElementById('vinylResult').classList.remove('hidden'); addCostItem('Vinyl Flooring', cost); updateSummary(); } // Calculate Wood Flooring function calculateWood() { const sqft = parseFloat(document.getElementById('woodSqft').value) || 0; const lnft = parseFloat(document.getElementById('woodLnft').value) || 0; const materialCost = parseFloat(document.getElementById('woodMaterialCost').value) || 0; const demo = document.getElementById('woodDemo').checked; const leveling = document.getElementById('woodLeveling').checked; // Base installation cost let cost = sqft * 3.50; // Add material cost cost += sqft * materialCost; // Add quarter round cost += lnft * 3.00; // Add demo if needed if (demo) cost += sqft * 2.00; // Add leveling if needed if (leveling) cost += sqft * 1.50; calculatedItems.wood = cost; document.getElementById('woodCost').textContent = `$${cost.toFixed(2)}`; document.getElementById('woodResult').classList.remove('hidden'); addCostItem('Wood Flooring', cost); updateSummary(); } // Calculate Carpet function calculateCarpet() { const sqft = parseFloat(document.getElementById('carpetSqft').value) || 0; const rooms = parseFloat(document.getElementById('carpetRooms').value) || 0; const materialCost = parseFloat(document.getElementById('carpetMaterialCost').value) || 0; const demo = document.getElementById('carpetDemo').checked; // Base installation cost let cost = sqft * 1.75; // Add material cost cost += sqft * materialCost; // Add per room charge cost += rooms * 50; // Add demo if needed if (demo) cost += sqft * 1.00; calculatedItems.carpet = cost; document.getElementById('carpetCost').textContent = `$${cost.toFixed(2)}`; document.getElementById('carpetResult').classList.remove('hidden'); addCostItem('Carpet', cost); updateSummary(); } // Calculate Tile function calculateTile() { const sqft = parseFloat(document.getElementById('tileSqft').value) || 0; const materialCost = parseFloat(document.getElementById('tileMaterialCost').value) || 0; const demo = document.getElementById('tileDemo').checked; const smallBath = document.getElementById('tileSmallBath').checked; const bathLocation = document.querySelector('input[name="bathLocation"]:checked')?.value; // Base installation cost let cost = sqft * 5.00; // Add material cost cost += sqft * materialCost; // Add demo if needed if (demo) cost += sqft * 2.00; // Small bathroom premium if (smallBath) { cost += 150; if (bathLocation === 'upstairs') cost += 100; } calculatedItems.tile = cost; document.getElementById('tileCost').textContent = `$${cost.toFixed(2)}`; document.getElementById('tileResult').classList.remove('hidden'); addCostItem('Tile Flooring', cost); updateSummary(); } // Calculate Backsplash function calculateBacksplash() { const sqft = parseFloat(document.getElementById('backsplashSqft').value) || 0; const complexity = document.getElementById('backsplashComplexity').value; // Base rates based on complexity let rate; switch(complexity) { case 'simple': rate = 8.00; break; case 'medium': rate = 10.00; break; case 'complex': rate = 15.00; break; default: rate = 8.00; } const cost = sqft * rate; calculatedItems.backsplash = cost; document.getElementById('backsplashCost').textContent = `$${cost.toFixed(2)}`; document.getElementById('backsplashResult').classList.remove('hidden'); addCostItem('Backsplash', cost); updateSummary(); } // Calculate Shower function calculateShower() { const size = document.getElementById('showerSize').value; const dualHead = document.getElementById('showerDualHead').checked; const bench = document.getElementById('showerBench').checked; const niches = document.getElementById('showerMultipleNiches').checked; // Base rates based on size let cost; switch(size) { case 'basic': cost = 2500; break; case 'medium': cost = 3500; break; case 'large': cost = 4500; break; case 'custom': const dimensions = document.getElementById('showerDimensions').value; if (dimensions) { const [length, width] = dimensions.split('x').map(Number); const area = length * width; cost = area * 100; } else { cost = 3000; } break; default: cost = 2500; } // Add features if (dualHead) cost += 300; if (bench) cost += 450; if (niches) cost += 200; calculatedItems.shower = cost; document.getElementById('showerCost').textContent = `$${cost.toFixed(2)}`; document.getElementById('showerResult').classList.remove('hidden'); addCostItem('Shower Installation', cost); updateSummary(); } // Calculate Tub function calculateTub() { const standard = document.getElementById('tubStandard').checked; // Base rate const cost = standard ? 1200 : 0; calculatedItems.tub = cost; document.getElementById('tubCost').textContent = `$${cost.toFixed(2)}`; document.getElementById('tubResult').classList.remove('hidden'); addCostItem('Tub Surround', cost); updateSummary(); } // Calculate Glass function calculateGlass() { const type = document.getElementById('glassType').value; const lnft = parseFloat(document.getElementById('glassLnft').value) || 0; // Rates based on type let rate; switch(type) { case 'standard': rate = 75; break; case 'frameless': rate = 125; break; case 'reinstall': rate = 40; break; default: rate = 75; } const cost = lnft * rate; calculatedItems.glass = cost; document.getElementById('glassCost').textContent = `$${cost.toFixed(2)}`; document.getElementById('glassResult').classList.remove('hidden'); addCostItem('Shower Glass', cost); updateSummary(); } // Calculate Cabinet function calculateCabinet() { const lnft = parseFloat(document.getElementById('cabinetLnft').value) || 0; const doors = parseFloat(document.getElementById('cabinetDoors').value) || 0; // Base rate per linear foot plus per door const cost = (lnft * 25) + (doors * 50); calculatedItems.cabinet = cost; document.getElementById('cabinetCost').textContent = `$${cost.toFixed(2)}`; document.getElementById('cabinetResult').classList.remove('hidden'); addCostItem('Cabinet Repair', cost); updateSummary(); } // Add cost item to summary function addCostItem(name, cost) { const costItems = document.getElementById('costItems'); // Check if item already exists const existingItem = Array.from(costItems.children).find(item => { return item.querySelector('.item-name')?.textContent === name; }); if (existingItem) { // Update existing item existingItem.querySelector('.item-cost').textContent = `$${cost.toFixed(2)}`; } else { // Create new item const item = document.createElement('div'); item.className = 'summary-item pl-3 py-2'; item.innerHTML = ` <div class="flex justify-between items-center"> <span class="item-name text-gray-700">${name}</span> <span class="item-cost font-bold">$${cost.toFixed(2)}</span> </div> `; costItems.appendChild(item); } // Remove placeholder if present const placeholder = costItems.querySelector('.text-center'); if (placeholder) { costItems.removeChild(placeholder); } } // Update summary calculations function updateSummary() { // Calculate total costs let totalCosts = 0; for (const key in calculatedItems) { totalCosts += calculatedItems[key]; } // Get contract total and overhead const contractTotal = parseFloat(document.getElementById('contractTotal').value) || 0; const overheadPercent = parseFloat(document.getElementById('overheadPercent').value) || 0; const overheadAmount = contractTotal * (overheadPercent / 100); // Calculate profit const profit = contractTotal - totalCosts - overheadAmount; // Update summary display document.getElementById('summaryContract').textContent = `$${contractTotal.toFixed(2)}`; document.getElementById('summaryCosts').textContent = `$${totalCosts.toFixed(2)}`; document.getElementById('summaryOverhead').textContent = `$${overheadAmount.toFixed(2)}`; // Style profit based on value const profitElement = document.getElementById('summaryProfit'); profitElement.textContent = `$${profit.toFixed(2)}`; profitElement.className = 'text-xl font-bold ' + (profit > 0 ? 'profit-positive' : profit < 0 ? 'profit-negative' : 'profit-neutral'); document.getElementById('totalCosts').textContent = `$${totalCosts.toFixed(2)}`; } // Reset all fields document.getElementById('resetBtn').addEventListener('click', function() { // Reset all input fields document.querySelectorAll('input[type="text"], input[type="number"], input[type="date"], textarea').forEach(input => { input.value = ''; }); // Reset checkboxes and radios document.querySelectorAll('input[type="checkbox"], input[type="radio"]').forEach(input => { input.checked = false; }); // Reset selects document.querySelectorAll('select').forEach(select => { select.selectedIndex = 0; }); // Reset calculated items for (const key in calculatedItems) { calculatedItems[key] = 0; } // Reset results displays document.querySelectorAll('[id$="Result"]').forEach(result => { result.classList.add('hidden'); }); // Reset summary document.getElementById('costItems').innerHTML = ` <div class="text-center text-gray-500 py-4"> <i class="fas fa-calculator text-2xl mb-2"></i> <p>Start adding items to see your cost breakdown</p> </div> `; // Reset summary numbers updateSummary(); }); // Print functionality document.getElementById('printBtn').addEventListener('click', function() { window.print(); }); // Show/hide custom shower size field document.getElementById('showerSize').addEventListener('change', function() { const customSizeField = document.getElementById('showerCustomSize'); if (this.value === 'custom') { customSizeField.classList.remove('hidden'); } else { customSizeField.classList.add('hidden'); } }); // Show/hide bathroom location options document.getElementById('tileSmallBath').addEventListener('change', function() { const bathLocationField = document.getElementById('tileBathLocation'); if (this.checked) { bathLocationField.classList.remove('hidden'); } else { bathLocationField.classList.add('hidden'); } }); // Initialize with today's date document.addEventListener('DOMContentLoaded', function() { const today = new Date().toISOString().split('T')[0]; document.getElementById('projectDate').value = today; }); </script> <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=rdowns/estimator-pro" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> </html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Reconstruction Project Estimator</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.calculator-card {
transition: all 0.3s ease;
}
.calculator-card:hover {
transform: translateY(-3px);
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.tab-button {
transition: all 0.2s ease;
}
.tab-button.active {
background-color: #3b82f6;
color: white;
}
.summary-item {
border-left: 4px solid #3b82f6;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
.profit-positive {
color: #10b981;
}
.profit-negative {
color: #ef4444;
}
.profit-neutral {
color: #6b7280;
}
</style>
</head>
<body class="bg-gray-50 min-h-screen">
<header class="bg-blue-700 text-white shadow-lg">
<div class="container mx-auto px-4 py-6">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="mb-4 md:mb-0">
<h1 class="text-3xl font-bold">Reconstruction Estimator Pro</h1>
<p class="text-blue-200 mt-1">Accurate pricing based on industry standards</p>
</div>
<div class="flex items-center space-x-4">
<button id="resetBtn" class="bg-white text-blue-700 px-4 py-2 rounded-lg font-semibold hover:bg-blue-50 transition">
<i class="fas fa-redo mr-2"></i>Reset All
</button>
<button id="printBtn" class="bg-blue-800 text-white px-4 py-2 rounded-lg font-semibold hover:bg-blue-900 transition">
<i class="fas fa-print mr-2"></i>Print Estimate
</button>
</div>
</div>
</div>
</header>
<main class="container mx-auto px-4 py-8">
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
<div class="lg:col-span-2">
<div class="bg-white rounded-xl shadow-md p-6 mb-6">
<h2 class="text-2xl font-bold text-gray-800 mb-4">Project Details</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Project Name</label>
<input type="text" id="projectName" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="e.g., Smith Residence Kitchen">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Project Date</label>
<input type="date" id="projectDate" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500">
</div>
</div>
<div class="mt-4">
<label class="block text-sm font-medium text-gray-700 mb-1">Project Notes</label>
<textarea id="projectNotes" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" rows="3" placeholder="Any special considerations..."></textarea>
</div>
<div class="mt-4 grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Contract Total ($)</label>
<input type="number" id="contractTotal" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total contract amount">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Estimated Overhead (%)</label>
<input type="number" id="overheadPercent" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" value="15" placeholder="Overhead percentage">
</div>
</div>
</div>
<div class="bg-white rounded-xl shadow-md p-6 mb-6">
<div class="flex overflow-x-auto space-x-1 pb-2">
<button class="tab-button px-4 py-2 rounded-lg font-medium active" data-tab="maintrade">Main Trade</button>
<button class="tab-button px-4 py-2 rounded-lg font-medium" data-tab="countertops">Countertops</button>
<button class="tab-button px-4 py-2 rounded-lg font-medium" data-tab="flooring">Flooring</button>
<button class="tab-button px-4 py-2 rounded-lg font-medium" data-tab="tile">Tile</button>
<button class="tab-button px-4 py-2 rounded-lg font-medium" data-tab="showers">Showers</button>