* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 13px;
  color: #333;
  background: #e8e8e8;
}

a {
  cursor: pointer;
  text-decoration: none;
  color: #b55400;
}
a:hover {
  color: #e07000;
}

input[type=text],
input[type=password],
textarea,
select {
  padding: 5px 8px;
  border: 1px solid #c0c0c0;
  border-radius: 4px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 13px;
}
input[type=text]:focus,
input[type=password]:focus,
textarea:focus,
select:focus {
  border-color: #CA6400;
  outline: none;
}

input[type=submit] {
  padding: 6px 20px;
  background: linear-gradient(#CA6400, #A04800);
  color: #fff;
  border: 1px solid #8a3a00;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}
input[type=submit]:hover {
  background: linear-gradient(#e07000, #b85200);
}

h1 {
  font-weight: normal;
  font-size: 16px;
  border-bottom: 2px solid #E9BE83;
  padding-bottom: 8px;
  text-transform: uppercase;
  color: #5a3000;
  margin: 0 0 15px 0;
}
h1 select {
  font-size: 16px;
  border: none;
  padding: 0;
  background: none;
}

hr {
  height: 1px;
  border-width: 0;
  background-color: #E9BE83;
}

/* ===== LOGIN ===== */
body.loginpage {
  background: linear-gradient(135deg, #5a3000 0%, #8a4800 30%, #CA6400 60%, #5a3000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

#frmlogin {
  width: 380px;
  background: rgba(255,255,255,0.95);
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  padding: 0;
  overflow: hidden;
}

#loginlogo {
  background: linear-gradient(#CA6400, #A04800);
  padding: 25px 0 15px 0;
  text-align: center;
}
#loginlogo img {
  height: 80px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

#frmlogin h1 {
  text-align: center;
  color: #5a3000;
  border-bottom: 2px solid #E9BE83;
  margin: 0;
  padding: 12px 20px 10px 20px;
  font-size: 16px;
  letter-spacing: 0.5px;
}

#loginfield {
  padding: 10px 30px 0 30px;
}
#loginfield label {
  display: block;
  font-size: 12px;
  font-weight: bold;
  color: #5a3000;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
#loginfield input[type=text],
#loginfield input[type=password] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d0c0a0;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
  background: #faf8f4;
  box-sizing: border-box;
}
#loginfield input[type=text]:focus,
#loginfield input[type=password]:focus {
  border-color: #CA6400;
  outline: none;
  box-shadow: 0 0 0 2px rgba(202,100,0,0.2);
}

#loginbtn {
  padding: 18px 30px 10px 30px;
}
#loginbtn input[type=submit] {
  width: 100%;
  padding: 11px;
  background: linear-gradient(#CA6400, #A04800);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 3px 10px rgba(160,72,0,0.3);
  transition: all 0.2s;
}
#loginbtn input[type=submit]:hover {
  background: linear-gradient(#e07000, #b85200);
  box-shadow: 0 5px 15px rgba(160,72,0,0.4);
  transform: translateY(-1px);
}

#loginfooter {
  text-align: center;
  padding: 12px 20px 18px 20px;
  font-size: 10px;
  color: #999;
  border-top: 1px solid #eee;
}

/* ===== CONTAINER ===== */
#container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== HEADER ===== */
#header {
  background: linear-gradient(135deg, #E7A769 0%, #d4883d 100%);
  text-align: center;
  padding: 10px 0;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#barheader {
  background: linear-gradient(#CA6400, #AD5601);
  color: #fff;
  font-size: 15px;
  text-align: center;
  padding: 8px 10px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

/* ===== CONTENT ===== */
#content {
  background: #fff;
  padding: 20px;
  text-align: center;
  flex: 1;
}
#content td {
  font-size: 13px;
}
#content table {
  margin: 0 auto;
}

/* ===== FOOTER ===== */
#footer {
  background: linear-gradient(#CA6400, #9a4800);
  padding: 15px;
  color: #fff;
  text-align: center;
  font-size: 12px;
}
#footchild {
  font-size: 13px;
  opacity: 0.9;
}

/* ===== MENUBAR (logout) ===== */
#menubar {
  position: absolute;
  right: 0;
  top: 0;
  padding: 10px 15px;
  z-index: 10;
}
#logoutbtn {
  display: inline-block;
  background: rgba(0,0,0,0.25);
  color: #fff;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background 0.2s;
}
#logoutbtn:hover {
  background: rgba(180,40,20,0.85);
}
.logout {
  cursor: pointer;
  opacity: 0.85;
}
.logout:hover {
  opacity: 1;
}

/* ===== BOOK GRID (home page) ===== */
#contentchild {
  max-width: 1100px;
  margin: 0 auto;
}

/* Welcome banner */
#dashwelcome {
  background: linear-gradient(135deg, #fff8e8, #f5e6cc);
  border: 1px solid #e0c898;
  border-radius: 10px;
  padding: 20px 30px;
  margin-bottom: 25px;
  font-size: 18px;
  color: #5a3000;
  text-align: center;
  line-height: 1.6;
}
#dashsub {
  font-size: 13px;
  color: #8a6830;
  font-weight: normal;
}

/* Section groups */
#section {
  margin-bottom: 25px;
}

/* Section header */
#sec_header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-radius: 8px 8px 0 0;
  font-size: 14px;
  color: #fff;
  letter-spacing: 0.3px;
  position: relative;
  z-index: 10;
}
#sec_header.sec_a { background: linear-gradient(135deg, #ca6400, #a04800); }
#sec_header.sec_b { background: linear-gradient(135deg, #1565c0, #0d47a1); }
#sec_header.sec_c { background: linear-gradient(135deg, #2e7d32, #1b5e20); }
#sec_header.sec_d { background: linear-gradient(135deg, #6a1b9a, #4a148c); }
#sec_header.sec_e { background: linear-gradient(135deg, #c62828, #b71c1c); }
#sec_icon {
  font-size: 22px;
  line-height: 1;
}

/* Card grid per section */
#sec_grid {
  text-align: center;
  padding: 12px;
  background: #fff;
  border: 1px solid #e0d8c8;
  border-top: none;
  border-radius: 0 0 8px 8px;
  overflow: visible;
}
#sec_grid::after {
  content: '';
  display: table;
  clear: both;
}

/* Individual book card - original format */
.buku {
  text-align: center;
  float: left;
  padding: 5px;
  height: 180px;
  width: 150px;
  margin-right: 10px;
  margin-bottom: 10px;
  border-width: 1px 3px 3px 5px;
  border-style: solid;
  cursor: pointer;
  transition: 300ms ease-in-out;
  position: relative;
  z-index: 1;
  border-color: #555 #555 #555 #999;
}
.buku:hover {
  box-shadow: 0 0 8px #333;
  transform: scale(1.6);
  z-index: 999;
}

/* Model badge (top right) */
.model {
  padding: 1px 3px;
  border: 1px solid #555;
  float: right;
  font-size: 10px;
  font-weight: bold;
}

/* Book title */
.jdlbuku {
  text-transform: uppercase;
  padding-top: 50px;
  text-align: center;
  font-weight: bold;
  font-size: 11px;
}

/* Color variants */
.ylw {
  background: linear-gradient(to right top, #FFF68C, #CBC368);
}
.grn {
  background: linear-gradient(to right top, #8CFF8C, #6ECA6E);
}
.blu {
  background: linear-gradient(to right top, #8CFFD0, #79D3AE);
}
.red {
  background: linear-gradient(to right top, #FF8C8C, #D07171);
}
.pth {
  background: linear-gradient(to right top, #F0F0F0, #CACACA);
}

/* ===== NAVIGATION BAR ===== */
#navigasi {
  background: #f5f0e8;
  border: 1px solid #d9c8a8;
  border-radius: 6px;
  padding: 10px 15px;
  margin-bottom: 15px;
}
#navigasi center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

#navigasihome {
  display: inline-block;
  background: linear-gradient(#CA6400, #A04800);
  color: #fff;
  padding: 6px 18px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 12px;
  letter-spacing: 0.5px;
}
#navigasihome:hover {
  background: linear-gradient(#e07000, #b85200);
}
#navigasihome2 {
  display: inline-block;
  background: #fff;
  border: 1px solid #d9c8a8;
  border-radius: 4px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: bold;
  color: #6a4000;
  text-transform: uppercase;
}
#navigasihome2 select {
  margin-left: 5px;
  border: 1px solid #c0b090;
  border-radius: 3px;
  padding: 3px 5px;
  font-size: 12px;
}
#navigasiexcel {
  display: inline-block;
  background: linear-gradient(#2e7d32, #1b5e20);
  color: #fff;
  padding: 6px 18px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 12px;
  letter-spacing: 0.5px;
}
#navigasiexcel:hover {
  background: linear-gradient(#388e3c, #2e7d32);
}

/* ===== TOOLBAR ===== */
#toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
#toolbar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: all 0.2s;
}
#btn_kembali {
  background: #e0e0e0;
  color: #555;
}
#btn_kembali:hover {
  background: #bdbdbd;
  color: #333;
  transform: scale(1.1);
}
#btn_tambah {
  background: linear-gradient(#2e7d32, #1b5e20);
  color: #fff;
  font-weight: bold;
  font-size: 22px;
}
#btn_tambah:hover {
  background: linear-gradient(#388e3c, #2e7d32);
  color: #fff;
  transform: scale(1.1);
}

/* ===== DATA TABLE ===== */
#table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#table1 {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  border: 1px solid #b09070;
}
#table1 th {
  background: linear-gradient(#CA6400, #a84e00);
  color: #fff;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  border: 1px solid #8a3a00;
  text-align: center;
}
#table1 td {
  padding: 8px 12px;
  font-size: 12px;
  border: 1px solid #d0c0a0;
  background: #fff;
  vertical-align: top;
}
#table1 tr:nth-child(even) td {
  background: #faf5ed;
}
#table1 tr:hover td {
  background: #fff0d8;
}
#table1 td a {
  color: #b55400;
  font-weight: bold;
  font-size: 12px;
  padding: 2px 6px;
}
#table1 td a:hover {
  color: #e07000;
  text-decoration: underline;
}

/* ===== ACTION BUTTONS ===== */
.tdaksi {
  white-space: nowrap;
  text-align: center;
  padding: 4px 6px !important;
}
#table1 td.tdaksi a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin: 1px 3px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 14px;
  transition: all 0.2s ease;
  border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
#table1 td.tdaksi a:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
  text-decoration: none;
}
#table1 td.tdaksi .btn_edit {
  background: #2196F3;
  color: #fff;
}
#table1 td.tdaksi .btn_edit:hover {
  background: #1976D2;
  color: #fff;
}
#table1 td.tdaksi .btn_hapus {
  background: #e53935;
  color: #fff;
}
#table1 td.tdaksi .btn_hapus:hover {
  background: #c62828;
  color: #fff;
}

/* ===== PAGINATION ===== */
#paginasi_wrap {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
#paginasi_info {
  font-size: 14px;
  color: #666;
  text-align: center;
}
#paginasi_select {
  padding: 4px 8px;
  border: 1px solid #c0b090;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  color: #5a3000;
  background: #fff;
  cursor: pointer;
}
#paginasi_btn {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}
.pg-prev, .pg-next {
  background: linear-gradient(#CA6400, #A04800);
  color: #fff;
}
.pg-prev:hover, .pg-next:hover {
  background: linear-gradient(#e07000, #b85200);
  color: #fff;
}
.pg-num {
  background: #f0e8d8;
  color: #6a4000;
  border: 1px solid #d0c0a0;
}
.pg-num:hover {
  background: #e8d8c0;
}
.pg-active {
  background: linear-gradient(#CA6400, #A04800);
  color: #fff;
  border: 1px solid #8a3a00;
}
.pg-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  color: #888;
  font-size: 16px;
  font-weight: bold;
}

/* ===== LOADING ===== */
#load {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.7);
  z-index: 9999;
  text-align: center;
  padding-top: 200px;
}

/* ===== FORM WRAPPER ===== */
#contentchild2 {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
  position: relative;
}
#btn_kembali_form {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 16px;
  text-decoration: none;
  background: #e0e0e0;
  color: #555;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: all 0.2s;
  margin-bottom: 10px;
}
#btn_kembali_form:hover {
  background: #bdbdbd;
  color: #333;
  transform: scale(1.1);
}
#contentchild2 table {
  width: 100%;
  border-collapse: collapse;
}
#contentchild2 td {
  padding: 6px 8px;
  font-size: 13px;
  vertical-align: top;
}
#contentchild2 td:first-child {
  width: 160px;
  font-weight: bold;
  color: #5a3000;
  text-align: right;
  padding-right: 12px;
  white-space: nowrap;
}
#contentchild2 input[type=text],
#contentchild2 input[type=date],
#contentchild2 select,
#contentchild2 textarea {
  width: 100%;
  max-width: 420px;
  padding: 6px 8px;
  border: 1px solid #c0b090;
  border-radius: 4px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 13px;
}
#contentchild2 textarea {
  height: 70px;
  resize: vertical;
}
#contentchild2 input[type=submit] {
  padding: 8px 30px;
  background: linear-gradient(#2e7d32, #1b5e20);
  color: #fff;
  border: 1px solid #1a5e1a;
  border-radius: 4px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}
#contentchild2 input[type=submit]:hover {
  background: linear-gradient(#388e3c, #2e7d32);
}

#btn_batal {
  display: inline-block;
  padding: 8px 30px;
  background: linear-gradient(#c0392b, #96281b);
  color: #fff;
  border: 1px solid #7a1f14;
  border-radius: 4px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}
#btn_batal:hover {
  background: linear-gradient(#e74c3c, #c0392b);
}

/* ===== FORM LAYOUTS ===== */
table.frm {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  border-collapse: collapse;
}
table.frm td {
  padding: 6px 8px;
  font-size: 13px;
  vertical-align: top;
}
table.frm td:first-child {
  width: 180px;
  font-weight: bold;
  color: #5a3000;
  text-align: right;
  padding-right: 12px;
}
table.frm input[type=text],
table.frm input[type=password],
table.frm textarea,
table.frm select {
  width: 100%;
  max-width: 400px;
}
table.frm textarea {
  height: 80px;
}

.btn-simpan {
  padding: 8px 30px;
  background: linear-gradient(#2e7d32, #1b5e20);
  color: #fff;
  border: 1px solid #1a5e1a;
  border-radius: 4px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}
.btn-simpan:hover {
  background: linear-gradient(#388e3c, #2e7d32);
}
.btn-batal {
  padding: 8px 30px;
  background: linear-gradient(#c0392b, #96281b);
  color: #fff;
  border: 1px solid #7a1f14;
  border-radius: 4px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}
.btn-batal:hover {
  background: linear-gradient(#e74c3c, #c0392b);
}
