
/*
    COLORS
yellow - #FEF0C1
blue - #2260AB

*/

html {
  font-size: 14px;
}

html, body {
    font-family: Arial, Helvetica, sans-serif;
}

a {
    text-decoration:none;
  }

footer { position:unset !important; margin-top: 20px; }

footer > div > div, footer .social_links{ display:inline-block; }
footer .social_links { float:right; margin-top: 0px }
footer .social_links a { color:#000; margin: 0 5px; text-decoration: none;  font-size: 20px; /* Size of icon */}
footer .social_links a:hover { /*color: #007bff;*/ color:#000; /* Highlight color on hover */}

/*a {
    color: white;
    text-align: center;
    text-decoration:none;
    width:100%;
  }
     
a:hover,.list-item a:active {
    color: white;
    text-align: center;
    text-decoration:none;
  }
*/

 nav { /*margin-bottom: 1px !important;*/ padding: 0px !important; }
.navbar { background-color: #000 !important; color:#fff; }
.navbar a {  color:#fff; /*font-size:20px;*/ }
.navbar-brand img { width:100px; }
.navbar ul .log_in_out { margin-left: auto; }


.header { font-weight:bold; }

.kk_alert { text-align:center; background-color: #2260AB; color: #fff; font-size: 20px; }
.kk_alert i { padding-right: 5px; }
.kk_alert i::after { content: 'this is an alert test';  }
.kk_alert { display:none; }

body > main { margin-top: 20px;  width: 100%; padding-right: var(--bs-gutter-x, .25rem);  padding-left: var(--bs-gutter-x, .25rem); margin-right: auto; margin-left: auto; }

.home .content { margin-top: 20px; }
.home .content > div > div > div:not(:last-child) { font-weight:bold; }
.home .content > div > div > div:last-child { font-weight:bold; text-align: center; font-size: 20px; }
.home ul > li > div > div:first-child  { font-weight:bold; }

  .home .content > div:nth-child(2) { margin-top:50px; }


/*
.home .content2 > div:not(:last-child) {  width: 33%; display:inline-grid; border: 1px solid #000;  }
.home .content2 > div > div div { height: 150px; }

.home .content2 > div:last-child { text-align:center; border: 1px solid #000; }

*/

.products .header + div  { font-size:20px; }

.products .list_products { margin-top: 40px; }

.products .list_products .card { /*display:inline-block; width:30%; */     margin-bottom: 40px !important; }

.products .list_products .card:nth-child(2) { margin-left: 5px; margin-right: 5px; }
.products .list_products .kk_card_group:not(:first-child) { margin-top: 50px;}
.products .list_products .card img { height: 215px; }
.products .list_products .card .card-text { height:42px; }

.products .need_quote { margin: auto;  width: 50%; background-color:#FEF0C1; text-align:center; }
.products .need_quote > div { padding-top:20px; padding-bottom:20px; }
.products .need_quote div a::before,.products .need_quote div a::after {
  display:inline;
  color: #000;
  font-family: "bootstrap-icons"; 
}

.products .need_quote div > div  { display:inline-block; }
.products .need_quote div > div > div:nth-child(2) a:first-child::before { content: '\F5C1'; margin-right:5px; }
.products .need_quote div > div > div:nth-child(2) a:first-child::after { content: ' / '; }
.products .need_quote div > div > div:nth-child(4) a:first-child::after { content: '\F138';  margin-left:5px; }
/*.products .need_quote div > div > a:nth-child(2)::after { content: '\F138';  margin-left:5px; }*/

.abouts_us .content > div { /*margin-top: 20px;*/ }

.contact_us .content > div { margin-top: 10px; }

.contact_us .content > div > div:nth-child(1) > div:nth-child(2)  { /*margin-left: 30px;*/ }
.contact_us .content > div > div:nth-child(2) { margin-top: 10px; margin-bottom: 10px;  }

.contact_us .form > div { margin-top: 10px; }
.contact_us .form input, .contact_us .form textarea { width:100%; }
.contact_us .form textarea { height: 200px; }
.contact_us .content i { padding-right:3px; }
.contact_us .content table > tbody > tr:nth-child(1)  > td  { padding-right: 5px; }
.contact_us .form div { margin-bottom: 5px; } 


/* style.css */
.contact_us .emailstatus {
    font-weight: bold;
    margin-top: 10px;
    color: red; /* For error messages */
}

.contact_us .emailstatus.success {
    color: #0a7a2f; /* For error messages */
}


.container .form { width: 100%; } 
.container .form  div { margin-bottom: 5px; } 
.container .form input, .container .form textarea { /*width:100%;*/ border-radius:8px; text-indent: 5px; }

/*.box { max-width: 420px; margin: 40px auto; padding: 16px; border: 1px solid #ddd; border-radius: 10px; }
.row { margin-bottom: 12px; }*/
/*input { width: 100%; padding: 10px; box-sizing: border-box; }
button { width: 100%; padding: 10px; }*/
/*.msg { margin-top: 12px; font-weight: 600; }*/
.msg.error { color: #b00020; }
.msg.success, .msg.ok { color: #0a7a2f; }


main.login .container { place-items: center; }

main.login .container .form  { /*display: flex; justify-content: center; align-items: center;*/ }

main.login .container .form form div { text-align:center;  }
main.login .container input { border-radius: 8px; border-width: 1px;  height: 36px; text-align:center; font-size: 15px; width:50%; }
main.login .container div:nth-child(3) { text-align:center; }
main.login .container button { border-radius: 8px; width:30%; }
main.login .container .msg { text-align:center; }

main.dashboard .welcome_logout div,
    main.dashboard .welcome_logout h1 { display: inline;}


main.dashboard .welcome_logout .logout { margin-left: 50px; width:50%; display:inline-block; text-align:right; }   
main.dashboard .links.receipt { margin-top:40px;}
main.dashboard .links.receipt_number { margin-top:20px;}
main.dashboard .links.products { margin-top:20px;}

/*    body { font-family: Arial, sans-serif; background:#f6f7fb; margin:0; padding:20px; }*/
main.create_receipt .container { max-width: 1000px; margin: 0 auto; background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:18px 5px; }
main.create_receipt h1 { margin: 0 0 14px; font-size: 22px; }
main.create_receipt .grid { display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
main.create_receipt .grid .field {  width:95%; }
main.create_receipt .field { display:flex; flex-direction:column; gap:6px; }
main.create_receipt label { font-weight:600; font-size: 13px; color:#111827; }
main.create_receipt input, textarea { padding:10px 5px; border:1px solid #d1d5db; border-radius:8px; font-size:14px; }
main.create_receipt textarea { resize: vertical; min-height: 64px; }
/* Base select styling */
main.create_receipt select {
      width: 100%;
      padding: 10px 42px 10px 12px;
      border: 1px solid #d1d5db;
      border-radius: 10px;
      font-size: 14px;
      background-color: #fff;
      color: #111827;
      appearance: none;
      -webkit-appearance: none;
      -moz-appearance: none;
      cursor: pointer;
    }

/* Focus state */
main.create_receipt select:focus {
  outline: none;
  border-color: #111827;
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.15);
}

main.create_receipt .section { margin-top: 16px; padding-top: 16px; border-top: 1px solid #eee; }

main.create_receipt .item-row { display:grid; grid-template-columns: 1.6fr 0.5fr 0.7fr 0.5fr; gap:10px; align-items:end; }


main.create_receipt .btn { padding:10px 12px; border:0; border-radius:10px; cursor:pointer; font-weight:700; }
main.create_receipt .btn-primary { background:#111827; color:#fff; }
main.create_receipt .btn-secondary { background:#e5e7eb; color:#111827; }
main.create_receipt .btn-danger { background:#b91c1c; color:#fff; }
main.create_receipt .btn:disabled { opacity:.6; cursor:not-allowed; }

main.create_receipt table { width:100%; border-collapse: collapse; margin-top: 12px; }
main.create_receipt th, td { border-bottom:1px solid #eee; padding:10px; text-align:left; font-size:14px; }
main.create_receipt th { background:#fafafa; font-size:13px; color:#374151; }
main.create_receipt td.right, th.right { text-align:right; }
main.create_receipt .totals { display:flex; justify-content:flex-end; margin-top: 10px; }
main.create_receipt .totals-box { min-width: 260px; border:1px solid #eee; border-radius:10px; padding:12px; background:#fafafa; }
main.create_receipt .totals-box div { display:flex; justify-content:space-between; padding:4px 0; padding-top:8px; margin-top:6px; }

main.create_receipt .muted { color:#6b7280; font-size: 13px; }

main.create_receipt .actions { display:flex; gap:10px; margin-top: 14px; flex-wrap:wrap; }
main.create_receipt .status { margin-top: 10px; font-weight: 700; }
main.create_receipt .status.error { color:#b91c1c; }
main.create_receipt .status.ok { color:#0a7a2f; }


main.create_receipt .grid .receipt_number { grid-column: span 2; }


/* --- Table responsiveness --- */
main.create_receipt.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fff;
}

main.create_receipt.items-table {
  width: 100%;
  min-width: 720px; /* forces horizontal scroll instead of squishing */
  border-collapse: collapse;
}

main.create_receipt.items-table th,
main.create_receipt.items-table td {
  padding: 10px;
  border-bottom: 1px solid #eee;
  white-space: nowrap; /* keeps qty/unit/total readable */
}

main.create_receipt.items-table th {
  background: #fafafa;
  font-size: 13px;
  color: #374151;
}

main.create_receipt.items-table td:first-child,
main.create_receipt.items-table th:first-child {
  white-space: normal; /* allow description to wrap */
  min-width: 260px;
}

main.create_receipt.center { text-align: center; }

/* --- Make top form grid responsive --- */
main.create_receipt.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}



main.products_controller .grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

main.products_controller .field {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

main.products_controller label {
            font-weight: 700;
            font-size: 13px;
        }

main.products_controller input, main.products_controller textarea {
            padding: 10px;
            border: 1px solid #d1d5db;
            border-radius: 10px;
            font-size: 14px;
        }

main.products_controller textarea {
            min-height: 80px;
            resize: vertical;
        }

main.products_controller .actions {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            margin-top: 10px;
        }

main.products_controller .btn {
            padding: 10px 12px;
            border: 0;
            border-radius: 10px;
            cursor: pointer;
            font-weight: 800;
        }

main.products_controller .btn-primary {
            background: #111827;
            color: #fff;
        }

main.products_controller .btn-secondary {
            background: #e5e7eb;
            color: #111827;
        }

main.products_controller .btn-danger {
            background: #b91c1c;
            color: #fff;
        }

main.products_controller .status {
            margin-top: 12px;
            font-weight: 800;
        }

main.products_controller .status.ok {
                color: #0a7a2f;
            }

main.products_controller .status.error {
                color: #b91c1c;
            }

main.products_controller .section {
            margin-top: 18px;
            padding-top: 16px;
            border-top: 1px solid #eee;
        }

        /* Responsive table */
main.products_controller .table-wrap {
            width: 100%;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            border: 1px solid #eee;
            border-radius: 12px;
        }

main.products_controller table {
            width: 100%;
            min-width: 800px;
            border-collapse: collapse;
            background: #fff;
        }

main.products_controller th, main.products_controller td {
            padding: 10px;
            border-bottom: 1px solid #eee;
            vertical-align: top;
        }

main.products_controller th {
            background: #fafafa;
            font-size: 13px;
            color: #374151;
            text-align: left;
        }




main.products_controller .form div.section h2 { margin:0 0 10px; font-size: 18px; }

main.products_controller div.section { margin:0 0 10px; font-size: 18px; }

main.products_controller div.section form { display:inline-block; margin-left:8px; }

main.products_controller .table-wrap table thead tr th:nth-child(1) { width: 220px; }
main.products_controller .table-wrap table thead tr th:nth-child(3) { width: 220px; text-align: center; }
main.products_controller .table-wrap table thead tr th:nth-child(4) { width: 170px; }

main.products_controller .form .form_add_product { width: 100%; }
main.products_controller form .actions a { text-decoration:none; display:inline-block; }

main.products_controller .right { text-align: right; }

main.products_controller .no_products,
    main.products_controller .price,
    main.products_controller .actions{  text-align: center; }

main.products_controller .price::before { content: '$'; }



@media (max-width: 768px) {
  body { padding: 12px; }
  .container { padding: 14px; }

  .grid {
    grid-template-columns: 1fr;
  }

  .item-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  /* Place fields nicely in 2 columns on small screens */
  #item_desc { grid-column: 1 / -1; }
  #addItemBtn { grid-column: 1 / -1; }

  .totals {
    justify-content: stretch;
  }
  .totals-box {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 420px) {
  .item-row {
    grid-template-columns: 1fr;
  }
}




@media all and (max-width: 768px) 
{
  html {
    font-size: 16px;
  }

  
  footer > div > div, footer .social_links{ display:block; text-align: center; }
  footer .social_links { float:unset; }

  .navbar-toggler-icon { background-color: #2260AB; }

  .home .content > div> div  { display:block; }
  .home .content > div > div:nth-child(2)  { display: inline-table; }
  .home .content img { width :100%; }  
  .home .content > div:nth-child(2) { margin-top:20px; }
  
  .products .list_products .card { margin-bottom: 10px !important; }
  .products .list_products .card .card-text { height:60px; }

  .products .need_quote { width: unset; }  
  .products .need_quote div > div  { display:block; }

  .contact_us .content { margin-bottom: 30px; }
  .contact_us .content > div { margin-top: 10px; }
  
  .abouts_us .kk_card_group > div:first-child { margin-top: 25px; }
  .abouts_us .card { margin-top: 5px;}
  
    main.login .container .form input, main.login .container .form textarea { width:100%; }

    main.create_receipt .item-row div:nth-child(1) select { width:180px;  }
    main.create_receipt .item-row div:nth-child(2) input { width:50px;  }
    main.create_receipt .item-row div:nth-child(3) input { width:100px;  }
    main.create_receipt .item-row div:nth-child(3) button { width:100px;  }

}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}



@media all and (max-width: 768px) {
    .navbar ul .login,
    .navbar ul .dashboard,
    .navbar ul .receipt {
        margin-left: 0px;
    }
    
    main.login .container button { width: 75%; }
    
    main.dashboard .welcome_logout div,
        main.dashboard .welcome_logout h1 { display: inline;}
       
    main.dashboard .welcome_logout .logout { margin-left: 50px; width:25%;}

    .container .form input, .container .form textarea { height:42px !important; }

}



html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}