
:root {
  --stu: #0069a8;
  --stu-dark: #004879;
  --stu-light: #eaf6ff;
  --red: #d71920;
  --yellow: #ffd23f;
  --text: #17233a;
  --line: #c9d8e6;
  --bg: #f4f8fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

a {
  text-decoration: none;
  color: var(--stu);
}

a:hover {
  text-decoration: underline;
}

.wrap {
  width: 100%;
  max-width: none;
  padding-left: 6.5%;
  padding-right: 6.5%;
}

/* thanh tren cung */
.top-line {
  height: 32px;
  background: var(--stu-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.top-line a {
  color: #fff;
  margin-left: 14px;
}

/* header va logo */
.site-header {
  height: 138px;
  background: linear-gradient(90deg, #0071b8 0%, #0071b8 52%, #d9edf7 52%, #d9edf7 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  
  gap: 25px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand img {
  width: 180px;
  height: 82px;
  object-fit: contain;
  background: transparent;
  padding: 0;
}

.brand h1 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 31px;
  letter-spacing: 1px;
  font-weight: 600;
}

.brand p {
  margin: 0;
  color: rgb(255, 0, 0);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.header-photo {
  height: 135px;
  width: 60%;
  min-width: 430px;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: hidden;
}

.header-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* thanh menu va dropdown */
.main-nav {
  background: #0069a8;
  border-bottom: 3px solid var(--yellow);
  position: relative;
  z-index: 10;
}

.main-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
}

.main-nav li {
  position: relative;
}

.main-nav li > a {
  display: block;
  color: #fff;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 13px;
  padding: 14px 18px;
  border-right: 1px solid rgba(255, 255, 255, .16);
  transition: background .22s, color .22s, transform .22s;
}

.main-nav li.active > a,
.main-nav li:hover > a {
  background: var(--yellow);
  color: #003b67;
  text-decoration: none;
}

.main-nav li:hover > a {
  transform: translateY(-1px);
}

.main-nav .right {
  margin-left: auto;
}

/* menu so xuong */
.dropdown-menu-stu {
  display: block;
  visibility: hidden;
  opacity: 0;
  transform: translateY(12px);
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 245px;
  background: #fff;
  border: 1px solid #c6d6e2;
  box-shadow: 0 10px 20px rgba(0, 0, 0, .18);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
  z-index: 99;
}

.has-dropdown:hover .dropdown-menu-stu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-menu-stu a {
  display: block;
  padding: 11px 15px;
  color: #123;
  border-bottom: 1px solid #eef3f7;
  text-transform: none;
  font-weight: 600;
}

.dropdown-menu-stu a:hover {
  background: #e9f6ff;
  color: var(--red);
  text-decoration: none;
  padding-left: 20px;
}

/* thanh tim kiem nhanh */
.search-strip {
  display: grid;
  grid-template-columns: 250px 1fr 135px 135px;
  gap: 8px;
  background: #e8f3fa;
  padding-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #cdddea;
}

.search-strip input,
.search-strip select {
  height: 37px;
  border: 1px solid #9eb7c9;
  padding: 0 12px;
}

.btn-stu,
.search-strip button {
  height: 37px;
  border: 0;
  background: #007d75;
  color: #fff;
  font-weight: 700;
  padding: 0 14px;
  border-radius: 2px;
  cursor: pointer;
}

.btn-stu:hover,
.search-strip button:hover {
  background: #005f59;
}

.btn-yellow {
  background: var(--yellow);
  color: #0b4469;
}

.btn-red {
  background: var(--red);
  color: #fff;
}

/* thong bao chu chay */
.marquee-box {
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #d5e1ea;
}

.marquee-label {
  background: var(--yellow);
  color: #004879;
  padding: 11px 20px;
  font-weight: 800;
}

.marquee-box marquee {
  color: var(--red);
  font-weight: 700;
  padding-left: 10px;
}

/* cac o chuc nang nhanh */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.quick-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #cfe0ec;
  border-left: 5px solid var(--stu);
  padding: 15px;
  min-height: 84px;
  transition: .25s;
}

.quick-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 87, 140, .16);
  text-decoration: none;
}

.quick-card i {
  font-size: 28px;
  color: var(--stu);
}

.quick-card b {
  display: block;
  color: #003e67;
}

.quick-card span {
  display: block;
  color: #475569;
  font-size: 13px;
  margin-top: 4px;
}

/* noi dung chinh */
.main-wrap {
  padding-top: 0;
  padding-bottom: 30px;
}

.top-grid {
  display: grid;
  grid-template-columns: 2.1fr .95fr;
  gap: 13px;
}

/* slideshow */
.hero {
  position: relative;
  background: #ddd;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid #c9d8e6;
}

.hero img {
  width: 100%;
  height: 430px;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: opacity .3s;
}

.hero-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72));
  color: #fff;
  padding: 58px 25px 22px;
}

.hero-caption strong {
  display: block;
  font-size: 25px;
  letter-spacing: 1px;
}

.hero-caption span {
  font-size: 15px;
}

/* cot phai slideshow */
.side-banners {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 13px;
}

.service-panel {
  background: linear-gradient(135deg, #0084bd, #005c8d);
  color: #fff;
  min-height: 205px;
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.service-panel:after {
  content: "";
  position: absolute;
  right: -35px;
  bottom: -35px;
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, .17);
  border-radius: 50%;
}

.service-panel h3 {
  color: var(--yellow);
  font-weight: 900;
  letter-spacing: 2px;
}

.service-panel p {
  font-size: 17px;
}

.library-photo-card {
  position: relative;
  min-height: 205px;
  overflow: hidden;
}

.library-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.77);
}

.library-photo-card div {
  position: absolute;
  left: 24px;
  bottom: 20px;
  color: #fff;
}

.library-photo-card h3 {
  font-weight: 900;
  letter-spacing: 1px;
}

/* bo cuc noi dung */
.content-grid {
  display: grid;
  grid-template-columns: 2fr .9fr;
  gap: 13px;
  margin-top: 13px;
}

.three-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 13px;
}

/* hop noi dung */
.box {
  background: #fff;
  border: 1px solid #cfdce7;
  margin-bottom: 13px;
}

.box-title {
  height: 39px;
  border-bottom: 1px solid #dbe7ef;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-left: 5px solid var(--stu);
}

.box-title h2 {
  margin: 0;
  color: #004879;
  text-transform: uppercase;
  font-size: 18px;
  font-weight: 900;
}

.box-title .more {
  font-size: 12px;
}

/* hien thi danh sach sach */
.books {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 18px;
}

.book-card {
  position: relative;
  text-align: center;
  border: 1px solid #e1eaf1;
  padding: 12px 8px;
  background: #fff;
  min-height: 282px;
  transition: .2s;
}

.book-card:hover {
  box-shadow: 0 6px 15px rgba(0, 0, 0, .12);
  transform: translateY(-2px);
}

.book-card img {
  width: 95px;
  height: 135px;
  object-fit: cover;
  margin-bottom: 8px;
  border: 1px solid #ddd;
}

.book-card b {
  display: block;
  min-height: 38px;
  color: #004879;
  font-size: 13px;
}

.book-card span {
  display: block;
  color: #555;
  font-size: 12px;
  margin-top: 4px;
}

.book-card .status {
  display: inline-block;
  border-radius: 20px;
  padding: 3px 8px;
  margin: 7px 0;
  font-size: 11px;
  background: #e9f7ef;
  color: #0c6b35;
}

.book-actions {
  display: flex;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}

.book-actions button {
  border: 0;
  border-radius: 2px;
  padding: 5px 7px;
  font-size: 11px;
  background: #e7f1fb;
  color: #004879;
  font-weight: 700;
}

.book-actions button:hover {
  background: var(--yellow);
}

/* danh sach link */
.list-links {
  padding: 10px 15px;
}

.list-links a {
  display: block;
  border-bottom: 1px dotted #c6d5df;
  padding: 8px 0;
  color: #00558d;
}

.list-links a:before {
  content: "◉";
  font-size: 10px;
  color: var(--stu);
  margin-right: 8px;
}

/* tin tuc */
.news-list {
  padding: 12px 15px;
}

.news-item {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 11px;
  border-bottom: 1px solid #e3edf4;
  padding: 9px 0;
}

.news-item img {
  width: 86px;
  height: 58px;
  object-fit: cover;
}

.news-item b {
  color: #00558d;
}

.news-item span {
  display: block;
  font-size: 12px;
  color: #667;
}

/* thong bao */
.notice-list {
  padding: 12px 16px;
}

.notice-list li {
  margin: 8px 0;
}

.notice-list i {
  color: var(--red);
  margin-right: 7px;
}

/* tien ich */
.tool-panel {
  padding: 16px;
}

.tool-panel .btn-stu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 4px 4px 6px 0;
  min-width: 145px;
}

/* footer va ban do */
.footer {
  background: #0069a8;
  color: #fff;
  margin-top: 28px;
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 28px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.footer h3 {
  font-size: 16px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .35);
  padding-bottom: 8px;
}

.footer p {
  margin: 7px 0;
}

.footer iframe {
  width: 100%;
  height: 170px;
  border: 0;
}

.footer-bottom {
  background: #004879;
  display: flex;
  justify-content: space-between;
  padding-top: 11px;
  padding-bottom: 11px;
}

/* tieu de trang con */
.page-title {
  background: #fff;
  border-left: 5px solid var(--stu);
  padding: 16px 18px;
  margin: 18px 0 13px;
}

.page-title h1 {
  font-size: 25px;
  margin: 0;
  color: #004879;
}

/* form nhap lieu */
.form-box {
  background: #fff;
  border: 1px solid #cfdce7;
  padding: 18px;
}

.form-row {
  margin-bottom: 13px;
}

.form-row label {
  font-weight: 700;
  margin-bottom: 5px;
  display: block;
}

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  border: 1px solid #b5c8d7;
  padding: 9px;
}

/* thanh loc du lieu */
.catalog-toolbar {
  background: #fff;
  border: 1px solid #cfdce7;
  padding: 14px;
  margin-bottom: 13px;
  display: grid;
  grid-template-columns: 1fr 210px 150px;
  gap: 10px;
}

.catalog-toolbar input,
.catalog-toolbar select {
  border: 1px solid #b5c8d7;
  padding: 9px;
}

/* bang du lieu */
.table-wrap {
  background: #fff;
  border: 1px solid #cfdce7;
  padding: 14px;
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: #0069a8;
  color: #fff;
}

.data-table th,
.data-table td {
  border: 1px solid #d8e3eb;
  padding: 9px;
}

.data-table input,
.data-table select {
  width: 100%;
  padding: 6px;
  border: 1px solid #9fb3c0;
}

/* so luong gio */
.cart-badge {
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  padding: 2px 6px;
  margin-left: 4px;
}

/* giao dien admin */
.admin-layout {
  display: grid;
  grid-template-columns: 235px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: #004879;
  color: #fff;
  padding: 18px;
}

.admin-sidebar h4 {
  font-weight: 800;
  margin-bottom: 12px;
}

.admin-sidebar a {
  display: block;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .18);
  padding: 11px;
}

.admin-sidebar a:hover,
.admin-sidebar .active {
  background: #0069a8;
  text-decoration: none;
}

.admin-main {
  padding: 20px;
  background: #f4f8fb;
}

.admin-main h2 {
  margin-bottom: 16px;
  color: #004879;
  font-weight: 800;
}

.admin-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.admin-card {
  background: #fff;
  border-left: 5px solid #0069a8;
  padding: 18px;
  box-shadow: 0 1px 3px #ccd;
}

.admin-card b {
  font-size: 27px;
  color: #0069a8;
}

/* form dang nhap admin */
.login-wrap {
  max-width: 410px;
  margin: 75px auto;
  background: #fff;
  border-top: 7px solid var(--stu);
  box-shadow: 0 5px 25px rgba(0, 0, 0, .15);
  padding: 26px;
}

/* thong bao */
.alert {
  margin: 12px 0;
}

.alert-success {
  display: none;
  background: #e4f7ec;
  border: 1px solid #9fd7b4;
  color: #0f6b35;
  padding: 10px;
  margin-bottom: 12px;
}

/* nut trong bang admin */
.btn-small {
  display: inline-block;
  padding: 5px 9px;
  border: 0;
  margin: 2px;
  cursor: pointer;
  border-radius: 2px;
  text-decoration: none !important;
}

.btn-small:hover {
  text-decoration: none !important;
  opacity: .9;
}

.btn-edit {
  background: var(--yellow);
  color: #123;
}

.btn-del {
  background: #dc3545;
  color: #fff;
}

.btn-ok {
  background: #198754;
  color: #fff;
}

.btn-return {
  background: #0d6efd;
  color: #fff;
}

.btn-renew {
  background: #17a2b8;
  color: #fff;
}

/* trang chi tiet sach */
.detail-box {
  display: flex;
  gap: 24px;
  padding: 20px;
  align-items: flex-start;
}

.detail-box img {
  width: 150px;
  height: 210px;
  object-fit: cover;
  border: 1px solid #ddd;
}

.form-box .row {
  align-items: end;
}

/* responsive cho tablet */
@media(max-width:1200px) {
  .wrap {
    padding-left: 18px;
    padding-right: 18px;
  }

  .books {
    grid-template-columns: repeat(4, 1fr);
  }

  .header-photo {
    width: 38%;
    min-width: 340px;
  }

  .brand h1 {
    font-size: 25px;
  }

  .brand p {
    font-size: 18px;
  }

  .content-grid,
  .top-grid,
  .three-cols,
  .footer-main {
    grid-template-columns: 1fr;
  }

  .side-banners {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .hero img {
    height: 390px;
  }

  .admin-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* responsive cho dien thoai */
@media(max-width:760px) {
  .top-line,
  .site-header,
  .footer-bottom {
    height: auto;
    display: block;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .brand {
    margin-bottom: 10px;
  }

  .brand img {
    width: 90px;
  }

  .brand h1 {
    font-size: 18px;
  }

  .brand p {
    font-size: 15px;
  }

  .header-photo {
    width: 100%;
    min-width: 0;
    height: 120px;
  }

  .main-nav ul {
    display: block;
  }

  .main-nav .right {
    margin-left: 0;
  }

  .dropdown-menu-stu {
    position: static;
    visibility: visible;
    opacity: 1;
    transform: none;
    display: none;
  }

  .has-dropdown:hover .dropdown-menu-stu {
    display: block;
  }

  .search-strip,
  .quick-actions,
  .catalog-toolbar,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .books {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .hero img {
    height: 270px;
  }

  .quick-card {
    min-height: auto;
  }

  .footer-main {
    gap: 10px;
  }

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

  .detail-box {
    display: block;
  }

  .detail-box img {
    margin-bottom: 15px;
  }
}