.shv-box, .shv-panel {
  border:1px solid #e5e7eb;
  border-left:4px solid #b91c1c;
  background:#fff;
  padding:16px;
  border-radius:12px;
  margin:14px 0;
}
.shv-ok{ border-left-color:#16a34a; }
.shv-warn{ border-left-color:#f59e0b; }

.shv-title, .shv-h2{
  margin:0 0 12px;
  color:#991b1b;
}
.shv-input{
  width:100%;
  padding:10px 12px;
  border:1px solid #d1d5db;
  border-radius:12px;
  margin:6px 0 12px;
}

.shv-btn{
  display:inline-block;
  padding:10px 14px;
  border-radius:999px;
  text-decoration:none;
  font-weight:800;
  border:1px solid transparent;
}
.shv-btn-red{ background:#b91c1c; color:#fff; }
.shv-btn-red:hover{ background:#991b1b; color:#fff; }
.shv-btn-danger{ background:#7f1d1d; color:#fff; }
.shv-btn-danger:hover{ background:#641414; color:#fff; }

.shv-card{
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:14px;
  margin:12px 0;
  background:#fff;
}
.shv-card-head{
  display:flex; justify-content:space-between; align-items:center;
  gap:10px;
  margin-bottom:10px;
}
.shv-subject{ font-weight:900; color:#111827; }
.shv-code{
  font-weight:800;
  font-size:12px;
  padding:4px 10px;
  border-radius:999px;
  background:#fee2e2;
  color:#991b1b;
  border:1px solid #fecaca;
}
.shv-section{ margin-top:10px; }
.shv-section-title{ font-weight:900; color:#991b1b; margin-bottom:6px; }
.shv-muted{ color:#6b7280; font-size:13px; }
.shv-text{ color:#111827; line-height:1.6; }
.shv-links{ margin:0; padding-left:18px; }
.shv-links a{ color:#b91c1c; font-weight:800; }
.shv-links a:hover{ color:#991b1b; }

.shv-card-line{
  display:flex; justify-content:space-between; align-items:center;
  gap:12px;
}
@media (max-width: 700px){
  .shv-card-line{ flex-direction:column; align-items:flex-start; }
}

.shv-badge{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  background:#fef3c7;
  color:#92400e;
  border:1px solid #fde68a;
}

/* Flatsome có thể style form mặc định WP; ép theo style SHV */
.shv-box #loginform input[type="text"],
.shv-box #loginform input[type="password"]{
  width:100% !important;
  padding:10px 12px !important;
  border:1px solid #d1d5db !important;
  border-radius:12px !important;
}

.shv-box #loginform input[type="submit"]{
  background:#b91c1c !important;
  border:1px solid #b91c1c !important;
  color:#fff !important;
  padding:10px 14px !important;
  border-radius:999px !important;
  font-weight:900 !important;
}
.shv-box #loginform input[type="submit"]:hover{
  background:#991b1b !important;
  border-color:#991b1b !important;
}
/* ===== Login form: viền đỏ đều + bỏ gạch đỏ bên trái + nút đăng nhập căn giữa ===== */
.shv-login-box{
  border: 1px solid #b91c1c;        /* viền đỏ */
  border-left: 1px solid #b91c1c;   /* override cái border-left 4px đỏ */
}

/* Căn giữa nút Đăng nhập */
.shv-login-box #loginform p.login-submit{
  text-align: center;
  margin-top: 10px;
}
.shv-login-box #loginform input[type="submit"]{
  display: inline-block !important;
  float: none !important;
  margin: 0 auto !important;
}
/* Nút tài liệu: hiển thị dạng button, tự xuống dòng khi nhiều */
.shv-doc-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

/* Nút nhỏ gọn hơn cho danh sách tài liệu */
.shv-btn-sm{
  padding:8px 12px;
  font-size:14px;
}
/* Nút tài liệu: hiển thị dạng button, tự xuống dòng khi nhiều */
.shv-doc-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

/* Nút nhỏ gọn hơn cho danh sách tài liệu */
.shv-btn-sm{
  padding:8px 12px;
  font-size:14px;
}
/* ===== Link học: thu nhỏ khung + center tiêu đề + dòng gọn ===== */
.shv-panel-links{
  max-width: 720px;     /* thu nhỏ khung tổng */
  margin: 14px auto;    /* căn giữa */
  padding: 14px;        /* gọn hơn */
}

.shv-panel-links .shv-h2{
  text-align: center !important; /* ép center tiêu đề */
}

/* Thu nhỏ từng dòng (card) */
.shv-panel-links .shv-link-row{
  max-width: 640px;     /* thu nhỏ dòng bên trong */
  margin-left: auto;
  margin-right: auto;
  padding: 10px 12px;   /* gọn hơn */
}

/* Tránh tình trạng pill nằm giữa khoảng trống */
.shv-panel-links .shv-card-line > div:first-child{
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}
/* ===== Fix mobile cho Link học: thẳng hàng, gọn đẹp ===== */
@media (max-width: 640px){
  /* khung tổng rộng full mobile */
  .shv-panel-links{
    max-width: 100% !important;
    margin: 10px 12px !important;
    padding: 12px !important;
  }

  /* mỗi dòng link: chuyển sang dạng cột */
  .shv-panel-links .shv-link-row{
    max-width: 100% !important;
    padding: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  /* phần tên môn + badge */
  .shv-panel-links .shv-link-row > div:first-child{
    width: 100% !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    text-align: center !important;
  }

  /* badge (mã/tên lớp) */
  .shv-panel-links .shv-link-row .shv-code{
    margin: 6px auto 0 !important;
  }

  /* phần nút vào học */
  .shv-panel-links .shv-link-row > div:last-child{
    width: 100% !important;
    text-align: center !important;
  }

  /* nút full width cho dễ bấm */
  .shv-panel-links .shv-link-row a.shv-btn{
    width: 100% !important;
    display: block !important;
    text-align: center !important;
  }
}