/* Root variables for easy theming/tuning */
:root {
  --brand-blue: #1e40af; /* IUH blue */
  --brand-red: #dc2626; /* IUH red */
  --card-radius: 12px; /* ID card corner radius */
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --dotted-width: 40%; /* school header dotted line width */
}

/* Font và Body */
body {
  font-family: "Inter", sans-serif;
  background-color: #f3f4f6;
}

/* Thẻ sinh viên */
.student-card {
  width: 6in;
  height: 3.75in;
  box-shadow: var(--card-shadow);
  transform-origin: top left;
  background: white;
  border: 1px solid #e5e7eb;
  font-family: "Times New Roman", Times, serif;
  border-radius: var(--card-radius); /* bo tròn 4 góc thẻ */
  overflow: hidden; /* đảm bảo nội dung bị cắt theo bo góc */
}

/* Toàn bộ chữ trong thẻ hiển thị dạng in đậm */
.student-card,
.student-card * {
  font-weight: 700;
}

/* Giữ kiểu chữ riêng cho phần header trường (không dùng Times & không ép bold) */
.school-header {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif !important;
}
.school-header p {
  font-weight: 700; /* in đậm cho header trường */
}

@media (max-width: 640px) {
  .student-card {
    transform: scale(0.7); /* nhỏ gọn hơn cho mobile nhỏ */
  }
}

/* Bổ sung nhiều breakpoint để hiển thị đẹp trên mọi màn hình */
@media (max-width: 1280px) {
  .student-card {
    transform: scale(0.95);
  }
}
@media (max-width: 1024px) {
  .student-card {
    transform: scale(0.9);
  }
}
@media (max-width: 768px) {
  .student-card {
    transform: scale(0.8);
  }
}
@media (max-width: 480px) {
  .student-card {
    transform: scale(0.65);
  }
}

/* Toast notification */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 24px;
  border-radius: 8px;
  background: #10b981;
  color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
}

.toast.error {
  background: #ef4444;
}

/* Dotted line */
.dotted-line {
  border-bottom: 2px dotted var(--brand-blue);
  padding-bottom: 2px;
}

/* Đường kẻ dưới tên và địa chỉ trường chuyển sang màu đen */
.school-header .dotted-line {
  border-bottom-color: #000000;
  width: var(--dotted-width);
  margin: 8px auto 0 auto; /* canh giữa, ngắn hơn */
}

/* Print optimization - keep size and hide page background */
@media print {
  body {
    background: #fff;
  }
  .student-card {
    box-shadow: none;
  }
}
