* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #f4f7fb;
  color: #333;
  min-height: 100vh;
}

#loginBox {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.login {
  width: 100%;
  max-width: 380px;
  background: white;
  padding: 30px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.login h3 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 24px;
}

input {
  width: 100%;
  padding: 14px;
  margin: 10px 0;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
}

input:focus {
  border-color: #007bff;
}

button {
  padding: 12px 18px;
  border: none;
  background: #007bff;
  color: white;
  cursor: pointer;
  border-radius: 8px;
  font-size: 15px;
  transition: 0.3s;
}

button:hover {
  background: #0056b3;
}

#panel {
  display: none;
  padding: 20px;
  width: 100%;
  max-width: 1400px;
  margin: auto;
}

#panel h2 {
    color: #007bff;
    font-weight: bold;
}

.top-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

#search {
  flex: 1;
  min-width: 220px;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

th, td {
  padding: 14px;
  border-bottom: 1px solid #eee;
  text-align: left;
}

th {
  background: #007bff;
  color: white;
  position: sticky;
  top: 0;
}

tr:hover {
  background: #f9fbff;
}

td button {
  margin-right: 5px;
  margin-bottom: 5px;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.45);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.box {
  background: white;
  width: 100%;
  max-width: 500px;
  padding: 25px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.box button {
  width: 100%;
  margin-top: 10px;
}

@media (max-width: 992px) {
  #panel {
    padding: 15px;
  }

  #panel h2 {
    font-size: 24px;
  }

  th, td {
    padding: 12px;
    font-size: 14px;
  }
}

@media (max-width: 768px) {

  .top-bar {
    flex-direction: column;
  }

  .top-bar button,
  .top-bar input {
    width: 100%;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

  table {
    min-width: 100%;
  }

  tr {
    background: white;
    margin-bottom: 15px;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  }

  td {
    border: none;
    padding: 10px 10px 10px 45%;
    position: relative;
    min-height: 45px;
    display: flex;
    align-items: center;
  }

  td::before {
    position: absolute;
    left: 12px;
    width: 40%;
    font-weight: bold;
    color: #007bff;
  }

  td:nth-child(1)::before {
    content: "Nümayəndə";
  }

  td:nth-child(2)::before {
      content: "Həkim";
  }

  td:nth-child(3)::before {
      content: "Dərman";
  }

  td:nth-child(4)::before {
      content: "Qiymət";
  }

  td:nth-child(5)::before {
      content: "Tarix";
  }

  td:nth-child(6)::before {
      content: "Əməliyyat";
  }

  td button {
    width: auto;
    padding: 8px 12px;
    font-size: 13px;
  }

  .login {
    padding: 25px 20px;
  }

  .login h3 {
    font-size: 22px;
  }

  input {
    font-size: 15px;
    padding: 12px;
  }
}

@media (max-width: 480px) {

  #panel {
    padding: 10px;
  }

  #panel h2 {
    font-size: 22px;
  }

  .login {
    border-radius: 10px;
  }

  td {
    padding-left: 42%;
    font-size: 14px;
  }

  td::before {
    width: 38%;
    font-size: 13px;
  }

  button {
    font-size: 14px;
    padding: 10px;
  }
}
.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.modal-buttons button {
    flex: 1;
    margin-top: 0;
}
#startDate{
  width: 20%;
}
#endDate{
  width: 20%;
}
@media(max-width: 992px){
  #startDate{
    width: 70%;
  }
  #endDate{
    width: 70%;
  }
}
.summary{
    margin-top:25px;
    display:flex;
    justify-content:flex-end;
}

.summary h3{
    background:#007bff;
    color:#fff;
    padding:15px 25px;
    border-radius:10px;
}
.summary-box{
    background:#007bff;
    color:#fff;
    padding:12px 20px;
    border-radius:8px;
    font-weight:bold;
    display:flex;
    align-items:center;
    gap:8px;
    white-space:nowrap;
}
@media(max-width:992px){
  .summary-box{
      width:100%;
      justify-content:center;
  }
}
@media(min-width: 992px){
  .soz{
    display: none;
  }
}