/* ===============================
   PRODUCTS SECTION
================================ */

#products .stock-header{
  background:#1565c0;
  color:#fff;
  padding:15px;
  border-bottom-left-radius:20px;
  border-bottom-right-radius:20px;
}

/* ===============================
   PRODUCT TABS
================================ */

#products .product-tabs{
  display:flex;
  width:96%;
  margin:15px auto;
  gap:8px;
}

#products .product-tabs .tab-btn{
  flex:1;
  padding:10px;
  border:none;
  border-radius:10px;
  font-weight:600;
  cursor:pointer;
  background:#e0e0e0;
  color:#000;
  transition:0.2s;
}

#products .product-tabs .tab-btn.active{
  background:#1565c0;
  color:#fff;
}

#products .product-tabs .tab-btn:hover{
  background:#1976d2;
  color:#fff;
}

/* ===============================
   SEARCH BAR
================================ */

#products .stock-search{
  position:relative;
  margin:15px auto 20px auto;   /* search box thora uper gap */
  width:96%;
}

#products .stock-search input{
  width:100%;
  padding:10px 40px 10px 15px;
  border-radius:25px;
  border:1px solid #ccc;
  border-bottom:3px solid #1565c0;
  box-sizing:border-box;
  outline:none;
}

#products .stock-search .search-icon{
  position:absolute;
  right:15px;
  top:50%;
  transform:translateY(-50%);
  color:#1565c0;
  font-size:20px;
  pointer-events:none;
}

/* ===============================
   PRODUCT LIST
================================ */

#products .stock-list{
  padding:0;
}

/* ===============================
   PRODUCT CARD
================================ */

#products .stock-card{
  background:#fff;
  padding:12px;
  margin-bottom:10px;
  border-radius:12px;
  box-shadow:0 2px 6px rgba(0,0,0,0.05);
  display:flex;
  flex-direction:column;
}

.stock-top-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.stock-name{
  font-weight:600;
  font-size:16px;
  color:#333;
}

.stock-price{
  font-weight:800;
  font-size:16px;
  color:#006AFF;
  padding:2px 6px;
}

.stock-bottom-row{
  font-size:13px;
  margin-top:4px;
  color:#555;
}

/* remove old badges */

.stock-qty,
.in-stock,
.out-stock{
  background:none;
  color:inherit;
  padding:0;
}

/* remove side gaps for products screen */

#products.screen{
  padding-left:1px;
  padding-right:1px;
}
/* Product Avatar */
.product-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #e3f2fd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.product-avatar .material-icons {
    font-size: 22px;
    color: #1e88e5;
}

/* Row Layout */
.stock-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Info column */
.product-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-avatar {
    background: linear-gradient(135deg, #42a5f5, #1e88e5);
}

.product-avatar .material-icons {
    color: #fff;
}
/* ===============================
   PRODUCT ACTION SCREEN
================================ */

#productActionScreen{
  padding-top:20px;
}

.product-action-wrapper{
  margin-top:20px;
  display:flex;
  flex-direction:column;
  gap:15px;
  padding:0 15px;
}

.product-action-btn{
  color:#1565c0;
  background:#fff;
  border:1px solid #ddd;
  padding:14px;
  font-size:16px;
  font-weight:600;
  border-radius:10px;
  box-shadow:0 3px 8px rgba(0,0,0,0.05);
  cursor:pointer;
  transition:0.2s;
}

.product-action-btn:hover{
  transform:scale(1.02);
}

.delete-btn-action{
  color:#d32f2f;
  border-color:#f8d7da;
}

/* ===============================
   ADD PRODUCT FORM
================================ */

#addProductScreen{
  padding:20px 16px;
}

#addProductScreen .form-group{
  position:relative;
  margin-bottom:24px;
}

#addProductScreen input {
  width:96%;
  padding:22px 18px;
  font-size:17px;
  border:3px solid #1976d2;
  border-radius:16px;
  background:#f1f3f6;
  box-sizing:border-box;
  transition:0.3s;
  color:#000;
}

#addProductScreen select {
  width:96%;
  padding:16px 18px;         /* تھوڑا زیادہ padding تاکہ value پوری visible ہو */
  font-size:17px;
  border:3px solid #1976d2;
  border-radius:16px;
  background:#f1f3f6;
  box-sizing:border-box;
  transition:0.3s;
  color:#000;
  appearance:none;           /* icon remove کرنے کے لیے */
  -webkit-appearance:none;   /* Safari/Chrome */
  -moz-appearance:none;      /* Firefox */
  background-image:none;     /* default dropdown arrow remove */
}

/* focus effect */
#addProductScreen select:focus{
  border-color:#0d47a1;
  box-shadow:0 0 0 4px rgba(25,118,210,0.15);
  background:#fff;
  outline:none;
}

/* label for select */
.select-label{
  position:static;
  display:block;
  margin-bottom:6px;
  font-size:14px;
  color:#0d47a1;
  font-weight:600;
}
#addProductScreen input,
#addProductScreen select{
  color:#000;
  font-weight:500;
}

/* focus effect */

#addProductScreen input:focus,
#addProductScreen select:focus{
  border-color:#0d47a1;
  box-shadow:0 0 0 4px rgba(25,118,210,0.15);
  background:#fff;
  outline:none;
}

/* floating labels */

#addProductScreen .form-group label{
  position:absolute;
  top:-10px;
  left:18px;
  background:#f4f6f9;
  padding:0 8px;
  font-size:14px;
  color:#0d47a1;
  font-weight:600;
  pointer-events:none;
}

/* select label fix */

.select-label{
  position:static;
  display:block;
  margin-bottom:6px;
  font-size:14px;
  color:#0d47a1;
  font-weight:600;
}

/* ===============================
   UNIT SELECT FIELD FIX
================================ */
#addProductScreen .unit-group select {
  width:96%;
  height:56px;                 /* same as input */
  padding:0 18px;              /* vertical padding 0, horizontal 18px */
  font-size:17px;
  line-height:56px;            /* vertically center the selected value */
  border:3px solid #1976d2;
  border-radius:16px;
  background:#f1f3f6;
  box-sizing:border-box;
  transition:0.3s;
  color:#000;
  appearance:none;             /* remove default arrow/icon */
  -webkit-appearance:none;
  -moz-appearance:none;
  background-image:none;       /* remove default arrow */
  text-align:left;             /* value aligned left */
}

/* focus effect */
#addProductScreen .unit-group select:focus {
  border-color:#0d47a1;
  box-shadow:0 0 0 4px rgba(25,118,210,0.15);
  background:#fff;
  outline:none;
}

/* label for unit select */
#addProductScreen .unit-group .unit-label {
  display:block;
  margin-bottom:6px;
  font-size:14px;
  color:#0d47a1;
  font-weight:600;
}

/* ===============================
   SALE + PROFIT INLINE
================================ */

.sale-profit-row{
  display:flex;
  align-items:center;
  gap:12px;
}

.sale-input{
  flex:2;
}

.sale-input input{
  width:100%;
}

.profit-divider{
  width:2px;
  height:40px;
  background:#1976d2;
}

.profit-inline{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:16px;
  color:#0d47a1;
}