:root {
      --primary: #007bff;
      --primary-dark: #0056b3;
      --navy: #0a3663;
      --navy-dark: #072242;
      --teal: #0d9488;
      --success: #10b981;
      --warning: #f59e0b;
      --danger: #ef4444;
      --slate-50: #f8fafc;
      --slate-100: #f1f5f9;
      --slate-200: #e2e8f0;
      --slate-300: #cbd5e1;
      --slate-600: #475569;
      --slate-700: #334155;
      --slate-800: #1e293b;
    }

    * {
      box-sizing: border-box;
    }

    body {
      background: #f4f7f6;
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
      color: #2c3e50;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    /* Navbar */
    .navbar {
      background: #ffffff;
      border-bottom: 1px solid #e0e0e0;
      padding: 10px 24px;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    }

    .navbar-brand {
      font-weight: 700;
      color: #007bff !important;
      font-size: 1.25rem;
    }

    .nav-link {
      color: #555 !important;
      font-weight: 500;
      margin-right: 8px;
      transition: color 0.15s ease;
    }

    .nav-link:hover,
    .nav-link.active {
      color: #007bff !important;
    }

    /* Main Container */
    .main-content {
      max-width: 1240px;
      margin: 25px auto 60px auto;
      padding: 0 16px;
      flex: 1;
      width: 100%;
    }

    /* Hero Banner */
    .hero-calc {
      background: linear-gradient(135deg, #072242 0%, #0a3663 55%, #0284c7 100%);
      color: #ffffff;
      border-radius: 16px;
      padding: 36px 36px 32px;
      margin-bottom: 25px;
      box-shadow: 0 12px 28px rgba(10, 54, 99, 0.18);
      position: relative;
      overflow: hidden;
    }

    .hero-calc::before {
      content: '';
      position: absolute;
      right: -30px;
      bottom: -40px;
      width: 260px;
      height: 260px;
      background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
      border-radius: 50%;
      pointer-events: none;
    }

    .hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: rgba(255, 255, 255, 0.16);
      border: 1px solid rgba(255, 255, 255, 0.28);
      padding: 5px 14px;
      border-radius: 50px;
      font-size: 0.82rem;
      font-weight: 600;
      margin-bottom: 12px;
      letter-spacing: 0.3px;
    }

    .hero-title {
      font-family: 'Outfit', sans-serif;
      font-weight: 800;
      font-size: 2.2rem;
      line-height: 1.25;
      color: #ffffff;
      margin-bottom: 10px;
    }

    .hero-sub {
      color: #e0f2fe;
      font-size: 1.05rem;
      max-width: 860px;
      line-height: 1.6;
      margin-bottom: 18px;
    }

    .hero-badges-row {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .hero-chip {
      background: rgba(255, 255, 255, 0.12);
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 6px;
      padding: 5px 12px;
      font-size: 0.85rem;
      color: #f1f5f9;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    /* Cards */
    .calc-card {
      background: #ffffff;
      border: 1px solid var(--slate-200);
      border-radius: 14px;
      box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
      margin-bottom: 24px;
      overflow: hidden;
      transition: box-shadow 0.2s ease;
    }

    .calc-card:hover {
      box-shadow: 0 6px 22px rgba(0, 0, 0, 0.07);
    }

    .card-header-custom {
      background: #ffffff;
      border-bottom: 1px solid var(--slate-200);
      padding: 16px 22px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 12px;
    }

    .card-header-title {
      font-family: 'Outfit', sans-serif;
      font-weight: 700;
      font-size: 1.25rem;
      color: var(--navy);
      margin: 0;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    /* Control Strip */
    .controls-strip {
      background: var(--slate-50);
      border-bottom: 1px solid var(--slate-200);
      padding: 14px 22px;
    }

    .preset-btn {
      font-size: 0.84rem;
      font-weight: 600;
      padding: 6px 14px;
      border-radius: 20px;
      border: 1px solid var(--slate-300);
      background: #ffffff;
      color: var(--slate-700);
      transition: all 0.15s ease;
      cursor: pointer;
    }

    .preset-btn:hover {
      background: #e0f2fe;
      border-color: #0284c7;
      color: #0369a1;
    }

    .preset-btn.active {
      background: #0284c7;
      border-color: #0284c7;
      color: #ffffff;
      box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
    }

    /* Table Styling */
    .load-table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      margin: 0;
    }

    .load-table th {
      background: #f8fafc;
      color: var(--slate-700);
      font-weight: 700;
      font-size: 0.86rem;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      padding: 12px 16px;
      border-bottom: 2px solid var(--slate-200);
      border-top: none;
      vertical-align: middle;
    }

    .load-table td {
      padding: 12px 16px;
      vertical-align: middle;
      border-bottom: 1px solid #f1f5f9;
      font-size: 0.94rem;
    }

    .load-table tr:hover td {
      background-color: #f8fafc;
    }

    .appliance-cell {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .appliance-icon {
      width: 38px;
      height: 38px;
      border-radius: 8px;
      background: #e0f2fe;
      color: #0284c7;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1rem;
      flex-shrink: 0;
    }

    .appliance-meta {
      display: flex;
      flex-direction: column;
    }

    .appliance-name {
      font-weight: 600;
      color: var(--slate-800);
    }

    .appliance-hint {
      font-size: 0.76rem;
      color: #64748b;
    }

    /* Numeric Inputs & Steppers */
    .watt-input {
      width: 110px;
      font-weight: 600;
      text-align: right;
      border: 1px solid var(--slate-300);
      border-radius: 6px;
      padding: 6px 10px;
      color: var(--slate-800);
      background: #fff;
      transition: border-color 0.15s;
    }

    .watt-input:focus {
      border-color: #0284c7;
      outline: none;
      box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
    }

    .qty-stepper {
      display: inline-flex;
      align-items: center;
      border: 1px solid var(--slate-300);
      border-radius: 8px;
      overflow: hidden;
      background: #fff;
    }

    .stepper-btn {
      background: #f8fafc;
      border: none;
      color: var(--slate-600);
      width: 32px;
      height: 34px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 0.95rem;
      transition: background 0.1s;
      user-select: none;
    }

    .stepper-btn:hover {
      background: #e2e8f0;
      color: var(--slate-800);
    }

    .stepper-btn:active {
      background: #cbd5e1;
    }

    .qty-input {
      width: 50px;
      height: 34px;
      border: none;
      border-left: 1px solid var(--slate-200);
      border-right: 1px solid var(--slate-200);
      text-align: center;
      font-weight: 700;
      color: var(--slate-800);
      outline: none;
      -moz-appearance: textfield;
    }

    .qty-input::-webkit-outer-spin-button,
    .qty-input::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }

    .subtotal-val {
      font-family: 'Outfit', sans-serif;
      font-weight: 700;
      font-size: 1.05rem;
      color: var(--navy);
      text-align: right;
    }

    .subtotal-cell {
      text-align: right;
      min-width: 120px;
    }

    /* Summary Bar Sticky or Sidebar */
    .summary-card {
      background: #ffffff;
      border: 1px solid var(--slate-200);
      border-radius: 14px;
      padding: 24px;
      box-shadow: 0 8px 24px rgba(10, 54, 99, 0.08);
      position: sticky;
      top: 20px;
    }

    .summary-title {
      font-family: 'Outfit', sans-serif;
      font-weight: 800;
      font-size: 1.35rem;
      color: var(--navy);
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .metric-box {
      background: linear-gradient(145deg, #f8fafc, #edf2f7);
      border: 1px solid var(--slate-200);
      border-radius: 12px;
      padding: 16px 18px;
      margin-bottom: 14px;
      transition: all 0.2s ease;
    }

    .metric-box.highlight {
      background: linear-gradient(145deg, #eff6ff, #dbeafe);
      border-color: #93c5fd;
    }

    .metric-box.highlight-success {
      background: linear-gradient(145deg, #ecfdf5, #d1fae5);
      border-color: #a7f3d0;
    }

    .metric-box.highlight-warning {
      background: linear-gradient(145deg, #fffbeb, #fef3c7);
      border-color: #fde68a;
    }

    .metric-label {
      font-size: 0.82rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: #64748b;
      margin-bottom: 4px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .metric-val {
      font-family: 'Outfit', sans-serif;
      font-size: 2rem;
      font-weight: 800;
      color: var(--navy);
      line-height: 1.1;
    }

    .metric-unit {
      font-size: 1rem;
      font-weight: 600;
      color: #64748b;
      margin-left: 4px;
    }

    .metric-sub {
      font-size: 0.8rem;
      color: #64748b;
      margin-top: 6px;
    }

    .phase-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 10px;
      border-radius: 20px;
      font-size: 0.78rem;
      font-weight: 700;
    }

    .phase-single {
      background: #e0f2fe;
      color: #0369a1;
      border: 1px solid #bae6fd;
    }

    .phase-three {
      background: #fef3c7;
      color: #b45309;
      border: 1px solid #fde68a;
    }

    .divider {
      height: 1px;
      background: var(--slate-200);
      margin: 18px 0;
    }

    /* Action Buttons */
    .btn-action-primary {
      background: #0284c7;
      color: white;
      font-weight: 600;
      border: none;
      padding: 10px 18px;
      border-radius: 8px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      transition: all 0.15s ease;
      cursor: pointer;
    }

    .btn-action-primary:hover {
      background: #0369a1;
      color: white;
      box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
      text-decoration: none;
    }

    .btn-action-secondary {
      background: #ffffff;
      color: var(--slate-700);
      font-weight: 600;
      border: 1px solid var(--slate-300);
      padding: 8px 16px;
      border-radius: 8px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      transition: all 0.15s ease;
      cursor: pointer;
    }

    .btn-action-secondary:hover {
      background: var(--slate-100);
      color: var(--slate-900);
      text-decoration: none;
    }

    /* Custom Appliance Adder Modal / Section */
    .add-custom-box {
      background: #f8fafc;
      border: 1px dashed var(--slate-300);
      border-radius: 10px;
      padding: 16px 20px;
      margin: 18px 22px;
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      align-items: center;
    }

    /* Information / FAQ Cards */
    .info-card {
      background: #ffffff;
      border: 1px solid var(--slate-200);
      border-radius: 12px;
      padding: 24px;
      margin-bottom: 24px;
    }

    .info-card h4 {
      font-family: 'Outfit', sans-serif;
      font-weight: 700;
      color: var(--navy);
      font-size: 1.25rem;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .disclaimer-box {
      background: #fffbeb;
      border-left: 5px solid #f59e0b;
      border-radius: 8px;
      padding: 18px 22px;
      margin-top: 20px;
    }

    .disclaimer-box h5 {
      font-family: 'Outfit', sans-serif;
      font-weight: 700;
      color: #b45309;
      font-size: 1.05rem;
      margin-bottom: 6px;
    }

    .disclaimer-box p {
      color: #78350f;
      font-size: 0.9rem;
      line-height: 1.6;
      margin: 0;
    }

    /* Footer */
    footer {
      background: #ffffff;
      border-top: 1px solid #e0e0e0;
      padding: 30px 20px 20px;
      text-align: center;
      color: #64748b;
      font-size: 0.9rem;
      margin-top: auto;
    }

    .footer-links a {
      color: #475569;
      text-decoration: none;
      margin: 0 12px;
      transition: color 0.15s ease;
    }

    .footer-links a:hover {
      color: #007bff;
    }

    /* Toast Notification */
    #copyToast {
      position: fixed;
      bottom: 24px;
      right: 24px;
      background: #1e293b;
      color: #fff;
      padding: 12px 20px;
      border-radius: 8px;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
      font-size: 0.9rem;
      font-weight: 500;
      z-index: 9999;
      display: none;
      align-items: center;
      gap: 10px;
    }

    /* Print Stylesheet */
    @media print {

      .navbar,
      .controls-strip,
      .add-custom-box,
      .btn-action-primary,
      .btn-action-secondary,
      .stepper-btn,
      .no-print,
      footer {
        display: none !important;
      }

      body {
        background: #fff;
        color: #000;
      }

      .main-content {
        max-width: 100%;
        margin: 0;
        padding: 0;
      }

      .hero-calc {
        background: none !important;
        color: #000 !important;
        padding: 10px 0;
        box-shadow: none;
        border-bottom: 2px solid #000;
      }

      .hero-title {
        color: #000 !important;
        font-size: 1.6rem;
      }

      .hero-sub,
      .hero-badge,
      .hero-chip {
        color: #333 !important;
      }

      .calc-card,
      .summary-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
      }

      .load-table th {
        background: #eee !important;
        color: #000 !important;
        border: 1px solid #aaa !important;
      }

      .load-table td {
        border: 1px solid #aaa !important;
      }

      .watt-input,
      .qty-input {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
      }
    }

    /* Mobile Responsiveness */
    @media (max-width: 768px) {
      .hero-title {
        font-size: 1.65rem;
      }

      .load-table th,
      .load-table td {
        padding: 10px 8px;
      }

      .appliance-cell {
        gap: 8px;
      }

      .appliance-icon {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
      }

      .watt-input {
        width: 80px;
        padding: 4px 6px;
        font-size: 0.85rem;
      }

      .qty-stepper {
        border-radius: 6px;
      }

      .stepper-btn {
        width: 26px;
        height: 30px;
        font-size: 0.85rem;
      }

      .qty-input {
        width: 36px;
        height: 30px;
        font-size: 0.85rem;
      }

      .subtotal-val {
        font-size: 0.92rem;
      }

      .summary-card {
        position: relative;
        top: 0;
        margin-top: 20px;
      }
    }
