    * { box-sizing: border-box; margin:0; padding:0; }
    body { font-family: 'Noto Serif Bengali', serif; background: #fcfbf7; padding: 20px; font-size: 14px; color: #333; }
    .main-container { max-width: 950px; margin: 0 auto; background: white; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); overflow: hidden; }
    
    /* Web Premium Banner */
    .banner-container {
      background: linear-gradient(135deg, #43e323 0%, #3fe226 100%);
      color: #ffffff;
      padding: 25px 20px;
      text-align: center;
      border-bottom: 5px solid #f40505;
      box-shadow: 0 4px 15px rgba(0,0,0,0.2);
      position: relative;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 15px;
    }
    .banner-left-svg, .banner-right-svg {
      width: 80px;
      height: 90px;
      flex-shrink: 0;
      background: rgba(255, 255, 255, 0.08);
      padding: 5px;
      border-radius: 8px;
      border: 1px solid rgba(255, 255, 255, 0.15);
    }
    .banner-center-text { flex-grow: 1; }
    .banner-title { font-size: 30px; font-weight: bold; color: #ffffff; margin: 0 0 5px 0; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); }
    .banner-subtitle { font-size: 16px; color: #fbfbfb; margin: 0 0 12px 0; letter-spacing: 1px; opacity: 0.95; }
    .banner-info { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; font-size: 12px; background: rgba(255, 255, 255, 0.1); padding: 8px 15px; border-radius: 20px; max-width: 600px; margin: 0 auto; border: 1px solid rgba(255, 255, 255, 0.15); }

    /* Tabs */
    .nav-tabs { display: flex; background: #f1f1f1; border-bottom: 2px solid #62101c; }
    .nav-btn { flex: 1; padding: 15px; border: none; background: #14c8e8; font-size: 16px; font-weight: bold; cursor: pointer; transition: 0.3s; font-family: 'Noto Serif Bengali', serif; color: #ffffff; }
    .nav-btn.active { background: #62101c; color: white; }
    .nav-btn:hover:not(.active) { background: #2ae908; }
    
    .tab-content { display: none; padding: 20px; }
    .tab-content.active { display: block; }

    /* Section Styles */
    .section-title { background: #277be2d5; color: #ffffff; padding: 11px 15px; margin-top: 25px; margin-bottom: 15px; border-radius: 6px; font-size: 15px; font-weight: bold;}
    
    /* Search Box styling */
    .search-wrapper { display: flex; gap: 10px; margin-bottom: 20px; background: #f4f6f9; padding: 12px; border-radius: 8px; border: 1px solid #e1e8ed; }
    .search-input { flex: 1; padding: 11px 15px; border: 1px solid #ced4da; border-radius: 6px; font-size: 14px; font-family: 'Noto Serif Bengali', sans-serif; box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); }
    .search-input:focus { border-color: #277be2; outline: none; box-shadow: 0 0 5px rgba(39,123,226,0.25); }
    .search-btn { background: #277be2; color: white; border: none; padding: 0 25px; font-size: 14px; font-weight: bold; border-radius: 6px; cursor: pointer; font-family: 'Noto Serif Bengali', sans-serif; transition: 0.2s; }
    .search-btn:hover { background: #1a61b5; }

    /* Patterns Multi-Select Row CSS */
    .pattern-row-container { background: #f0f7ff; border: 1px solid #b3d7ff; padding: 12px; margin-bottom: 15px; border-radius: 6px; }
    .pattern-row-title { font-weight: bold; color: #004085; font-size: 14px; margin-bottom: 8px; display: block; }
    .pattern-checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; }
    .pattern-cb-label { display: flex; align-items: center; gap: 5px; background: white; padding: 5px 10px; border: 1px solid #ced4da; border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: bold; color: #333; transition: 0.2s; }
    .pattern-cb-label input { width: 15px; height: 15px; cursor: pointer; }
    .pattern-cb-label:hover { border-color: #277be2; background: #eef5fc; }

    /* Checkbox Selection Grid */
    .selection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 15px; background: #fff8f8; padding: 12px; border-radius: 8px; border: 1px solid #ffdddd; }
    .selection-item { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: bold; color: #4a121a; cursor: pointer; padding: 8px; background: white; border: 1px solid #ddd; border-radius: 6px; transition: 0.2s; }
    .selection-item input { width: 18px; height: 18px; cursor: pointer; }
    .selection-item:hover { border-color: #62101c; background: #fff0f2; }

    .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 12px; }
    .form-group { display: flex; flex-direction: column; }
    .form-group label { margin-bottom: 5px; font-weight: bold; color: #4a121a; font-size: 13px; }
    .form-group input, .form-group select { padding: 10px; border: 1px solid #ced4da; border-radius: 6px; font-size: 14px; background-color: #fff; font-family: 'Noto Serif Bengali', sans-serif; width: 100%;}
    .extra-number-input { border-color: #277be2 !important; background-color: #f4f8ff !important; }

    /* Table Styles */
    .product-list-container { background: #fdfdfd; border: 1px solid #ced4da; border-radius: 8px; padding: 15px; margin-bottom: 20px; }
    .product-entry-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
    .product-entry-table th { background: #4a121a; color: white; padding: 10px; font-size: 13px; font-weight: bold; }
    .product-entry-table td { padding: 10px 5px; border-bottom: 1px solid #edf2f7; text-align: center; }
    
    .qty-controls { display: flex; align-items: center; gap: 5px; justify-content: center; }
    .qty-btn { background: #e2e8f0; border: none; width: 28px; height: 28px; font-weight: bold; cursor: pointer; border-radius: 4px; display: flex; align-items: center; justify-content: center; }
    .qty-val { width: 35px; text-align: center; font-weight: bold; border: none; background: transparent; }

    .payment-section { background: #fff9f9; padding: 15px; border-radius: 8px; border: 1px solid #f8d7da; margin-bottom: 20px; }
    .due-amount { font-weight: bold; color: #c0392b !important; background: #fff0f0; }
    .measurement-section { display: none; background: #fff; border: 1px dashed #ced4da; padding: 15px; border-radius: 8px; margin-top: 15px; }

    /* Cloth (কাপড়) calculation toggle & summary */
    .cloth-toggle-row { background: #fff8e1; border: 1px solid #ffe082; padding: 10px 12px; border-radius: 6px; margin-bottom: 15px; display: flex; align-items: center; gap: 8px; }
    .cloth-toggle-row input { width: 18px; height: 18px; cursor: pointer; flex-shrink: 0; }
    .cloth-toggle-row label { font-weight: bold; color: #7a5c00; cursor: pointer; font-size: 13px; }
    .cloth-col { display: none; }
    .product-entry-table.cloth-active .cloth-col { display: table-cell; }
    .cloth-summary-box { display: none; background: #f0f7ff; border: 1px solid #b3d7ff; border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; }
    .cloth-summary-box.active { display: block; }
    .cloth-summary-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; font-weight: bold; color: #004085; }
    .cloth-summary-row.grand { border-top: 1px dashed #b3d7ff; margin-top: 6px; padding-top: 8px; font-size: 16px; color: #62101c; }
    .token-btn { background: #8e44ad; color: white; }

    /* Per-Product Config Cards */
    .product-config-card { border-radius: 10px; padding: 15px; margin-top: 18px; border: 1px solid; }
    .product-config-card.upper-config { background: #e6f7e9; border-color: #b6e3c0; }
    .product-config-card.lower-config { background: #f2e9fb; border-color: #d9c4f0; }
    .config-title-bar { font-size: 15px; font-weight: bold; color: #ffffff; padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; }
    .upper-config .config-title-bar { background: #1e8e4e; }
    .lower-config .config-title-bar { background: #6f2da8; }
    .config-subtitle { font-weight: bold; font-size: 13px; margin: 12px 0 8px 0; color: #333; }

    /* SVG Cards */
    .placket-grid, .cuff-grid { display: flex; flex-direction: row; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
    .option-card { background: #fdfdfd; border: 2px solid #ced4da; border-radius: 8px; padding: 12px; cursor: pointer; position: relative; display: flex; flex-direction: column; align-items: center; flex: 1 1 calc(50% - 12px); min-width: 150px; }
    .cuff-grid .option-card { flex: 1 1 calc(25% - 12px); width: calc(25% - 12px); min-width: 120px; }
    .option-card input[type="radio"] { position: absolute; opacity: 0; }
    .option-card.selected-card { border-color: #2a2860; background: #f0f3ff; box-shadow: 0 4px 10px rgba(42,40,96,0.15); }
    .option-card::after { content: "✓"; position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; background: #2a2860; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: bold; opacity: 0; }
    .option-card.selected-card::after { opacity: 1; }
    .num { font-family: 'Caveat', cursive; font-size: 22px; font-weight: 700; color: #9a8070; margin-bottom: 5px; }
    .option-card.selected-card .num { color: #2a2860; }
    .label { margin-top: 10px; font-size: 12px; font-weight: 600; text-align: center; }
    .option-card svg { width: 100%; max-height: 120px; height: auto; display: block; }

    /* Button Group */
    .button-group { display: flex; gap: 15px; margin-top: 25px; }
    .action-btn { border: none; padding: 14px; font-size: 16px; font-weight: bold; cursor: pointer; border-radius: 6px; flex:1; font-family: 'Noto Serif Bengali', serif;}
    .save-btn { background: #27ae60; color: white; }
    .print-btn { background: #2980b9; color: white; }
    .clear-btn { background: #e74c3c; color: white; }

    /* Dashboard Summary Cards */
    .dash-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 25px; }
    .dash-summary .dash-card { background: #fff; padding: 20px; border-radius: 8px; border-left: 5px solid #277be2; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
    .dash-card h4 { margin: 0 0 10px 0; color: #555; font-size: 14px; }
    .dash-card .amt { font-size: 22px; font-weight: bold; color: #62101c; }
    .dash-card.today { border-left-color: #27ae60; }
    .dash-card.month { border-left-color: #e67e22; }

    /* Dashboard Container */
    .dashboard-container-card { background: white; border-radius: 8px; padding: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.06); border: 1px solid #e1e1e1; margin-top: 10px; }
    .dashboard-main-title { font-size: 20px; font-weight: bold; color: #4a121a; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
    .dashboard-title-line { border: none; border-top: 2px solid #5a0e19; margin-bottom: 15px; opacity: 0.85; }

    /* Year / Month Filter */
    .year-month-filter { margin-bottom: 15px; }
    .ym-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
    .ym-btn { padding: 7px 16px; border-radius: 20px; border: 1px solid #b3d7ff; background: #eef6ff; color: #1a61b5; font-weight: bold; font-size: 13px; cursor: pointer; font-family: 'Noto Serif Bengali', sans-serif; transition: 0.2s; }
    .ym-btn:hover { background: #dcedff; }
    .ym-btn.active { background: #277be2; color: white; border-color: #277be2; }
    .ym-btn.all-btn { background: #f1f1f1; color: #555; border-color: #ccc; }
    .ym-btn.all-btn.active { background: #62101c; color: white; border-color: #62101c; }

    /* Data Table */
    .data-table-wrapper { overflow-x: auto; background: #fff; border-radius: 4px; }
    .data-table { width: 100%; border-collapse: collapse; min-width: 750px; }
    .data-table th, .data-table td { padding: 12px 15px; border-bottom: 1px solid #edf2f7; text-align: left; vertical-align: middle; }
    .data-table th { background: #4a90e2; font-weight: bold; color: white; }
    .data-table tr:hover { background: #f1f5f9; }
    
    /* Badges */
    .badge { padding: 4px 8px; border-radius: 4px; font-size: 12px; font-weight: bold; }
    .badge-paid { background: #d4edda; color: #155724; }
    .badge-due { background: #f8d7da; color: #721c24; }

    /* Action Buttons */
    .btn-sm { padding: 6px 10px; font-size: 12px; border: none; border-radius: 4px; cursor: pointer; color: white; font-family: 'Noto Serif Bengali', serif; margin-right: 4px; margin-bottom: 4px; display: inline-block; font-weight: bold; }
    .btn-info { background: #17a2b8; }
    .btn-edit { background: #ffc107; color: #000 !important; }
    .btn-delete { background: #dc3545; }
    .btn-delete:hover { background: #bd2130; }

    /* Modal */
    .modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 999; align-items: center; justify-content: center; }
    .modal-content { background: white; width: 90%; max-width: 520px; border-radius: 8px; padding: 20px; max-height: 90vh; overflow-y: auto; }
    .modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; padding-bottom: 10px; margin-bottom: 15px; }
    .modal-header h3 { margin: 0; color: #62101c; }
    .close-modal { background: none; border: none; font-size: 22px; cursor: pointer; color: #aaa; font-weight: bold; }

    #thermal-print-area { display: none; }

    /* ===== Fixed Portrait 80mm Print CSS ===== */
    #thermal-print-area { display: none; }

/* ===== Dynamic 80mm Continuous Print CSS ===== */
@media print {
  html, body {
    width: 80mm !important;
    height: auto !important; /* Force continuous length */
    min-height: 100% !important;
    margin: 0mm !important;
    padding: 0mm !important;
    background: #fff;
    -webkit-print-color-adjust: exact; /* Color control track rakhar jonno */
  }

  @page { 
    size: 80mm auto !important; 
    margin: 0mm !important; 
  }

  /* Body-r bhetor baki sob strict hide */
  body > *:not(#thermal-print-area) { 
    display: none !important; 
  }

  #thermal-print-area { 
    display: block !important; 
    width: 80mm !important; 
    height: auto !important; /* Automatic length */
    background: white !important; 
    font-size: 11px !important; 
    color: #000 !important; 
    line-height: 1.3 !important; 
    padding: 2mm !important; /* Padding ektu komano holo text spacing er jonno */
    margin: 0mm !important;
    box-sizing: border-box !important;
  }
  
  .thermal-block { 
    font-family: 'Noto Serif Bengali', serif; 
    padding: 0; 
    box-sizing: border-box; 
    width: 100% !important;
  }
  
  .print-separator { 
    display: flex !important; 
    align-items: center;
    width: 100% !important; 
    margin-top: 15px !important;
    margin-bottom: 15px !important;
    padding: 0 !important;
    font-size: 10px;
    font-weight: bold;
    color: #000 !important;
    gap: 6px;
  }
  .print-separator::before, .print-separator::after {
    content: "";
    flex: 1;
    border-top: 2px dashed #000 !important; 
  }
}

      .copy-type-title { display: block !important; text-align: center; font-weight: bold; background: none !important; color: #000 !important; padding: 4px; margin: 6px 0; font-size: 12px; border: 1.5px solid #000; border-radius: 3px; }
      .info-row { display: flex !important; justify-content: space-between; align-items: baseline; margin-bottom: 4px; font-size: 14px; gap: 1px; }
      .divider { display: block !important; border-top: 1px dashed #000; margin: 4px 0; }
      .section-title-p { display: block !important; font-weight: normal !important; font-size: 14px; margin: 8px 0 5px 0; padding: 5px 6px; border: 1.5px solid #000 !important; border-radius: 3px; background: none !important; color: #000 !important; text-shadow: none !important; break-inside: avoid; page-break-after: avoid; }

      .invoice-table { display: table !important; width: 100%; border-collapse: collapse; margin: 5px 0; border: 1px solid #000; }
      .invoice-table th, .invoice-table td { display: table-cell !important; font-size: 11px; padding: 5px 4px; border: 1px solid #000; text-align: left; }
      .invoice-table th { background: #f0f0f0 !important; font-weight: bold; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

      .measure-grid-p { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 3px; margin-top: 3px; }
      .measure-box-p { display: flex !important; flex-direction: row; flex-wrap: nowrap; justify-content: center; align-items: baseline; gap: 3px; border: 1px solid #000; border-radius: 3px; text-align: center; padding: 3px 3px; min-height: 20px; background: none !important; }
      .measure-box-p span { display: inline !important; font-size: 14px; font-weight: bold; border-bottom: none; width: auto; padding-bottom: 0; background: none !important; color: #000 !important; white-space: nowrap; }
      .measure-box-p strong { display: inline !important; font-size: 14px; font-weight: bold; margin-top: 0; color: #000 !important; }

      .footer-note { display: block !important; text-align: center; font-size: 10px; margin-top: 6px; font-style: italic; font-weight: bold; }
    .print-style-item { display: block !important; font-size: 16px; margin-bottom: 1px; font-weight: normal !important; line-height: 1.4; }
      .print-style-pattern { font-size: 10px; color: #000; font-weight: normal; }
      
      .print-svg-container { display: flex !important; justify-content: space-around; margin: 6px 0; gap: 4px; }
      .print-svg-box { display: block !important; border: 1px solid #000; padding: 4px 2px; text-align: center; flex: 1; max-width: 49%; border-radius: 3px; background: none !important; }
      .print-svg-box p { display: block !important; font-size: 12px; font-weight: bold; border-bottom: 1px solid #000; padding-bottom: 1px; margin-bottom: 3px; background: none !important; color: #000 !important; }
      .print-svg-box svg { display: block !important; width: 100%; height: auto; max-height: 55px; margin: 0 auto; filter: drop-shadow(1.2px 1.5px 0.6px rgba(0,0,0,0.55)); }

      .tailor-item-boxes { display: flex !important; flex-direction: column; gap: 3px; margin-top: 5px; }
      .tailor-item-box { display: block !important; border: 1.5px solid #000; border-radius: 3px; padding: 7.5px 9px; width: 100% !important; box-sizing: border-box; }
      .tailor-item-box .tib-line { display: block !important; font-size: 14px; font-weight: bold; padding: 3px 0; border-bottom: 1px dashed #888; line-height: 1.4; }
      .tailor-item-box .tib-line:last-child { border-bottom: none; }

      .config-left-col { width: 100% !important; }
    }
  </style>

/* ==== User-requested overrides ==== */
.config-title-bar { color: #000 !important; }
.upper-config .config-title-bar { background: #1e8e4e; }
.lower-config .config-title-bar { background: #6f2da8; }
