/* ===== Global Layout Fixes ===== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

/* Container */
#container,
#main_content {
  width: 100%;
  max-width: 1200px;
  margin: auto;
  padding: 15px;
}

/* ===== Header ===== */

#header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

#header h1 {
  font-size: 22px;
  margin: 0;
}

/* ===== Navigation ===== */

#left_nav {
  width: 220px;
  float: left;
}

#left_nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#left_nav li {
  border-bottom: 1px solid #ddd;
}

#left_nav a {
  display: block;
  padding: 10px;
  text-decoration: none;
  color: #333;
}

#left_nav a:hover {
  background: #f5f5f5;
}

/* ===== Content Area ===== */

#content {
  margin-left: 240px;
  padding: 10px;
}

/* ===== Tables ===== */

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px;
  border: 1px solid #ddd;
  text-align: left;
}

th {
  background: #f3f3f3;
}

/* Scroll tables on small screens */
.table-responsive {
  overflow-x: auto;
}

/* ===== Forms ===== */

input,
select,
textarea {
  width: 100%;
  padding: 8px;
  margin: 4px 0 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

button,
input[type="submit"] {
  background: #2d89ef;
  color: white;
  border: none;
  padding: 10px 18px;
  cursor: pointer;
  border-radius: 4px;
}

button:hover,
input[type="submit"]:hover {
  background: #1b5fad;
}

/* ===== Mobile Styles ===== */

@media (max-width: 900px) {

  #left_nav {
    width: 100%;
    float: none;
  }

  #content {
    margin-left: 0;
  }

}

@media (max-width: 768px) {

  #header {
    flex-direction: column;
    align-items: flex-start;
  }

  #header h1 {
    font-size: 18px;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    font-size: 14px;
  }

}

@media (max-width: 480px) {

  #container,
  #main_content {
    padding: 10px;
  }

  th,
  td {
    padding: 6px;
  }

  button,
  input[type="submit"] {
    width: 100%;
  }

}