/* =====================================================================
   BẾP HỌC ĐƯỜNG - GIAOVIEN.CSS
   CSS riêng cho trang giáo viên (giaovien.html)
   Dùng kèm assets/styles.css. Chủ đạo: cam (#ef6c00) phân biệt vai trò.
   ===================================================================== */

/* Header riêng cho GV */
.gv-header { background: linear-gradient(135deg, #ef6c00, #f9a825) !important; }

/* Card thông tin GV */
.gv-teacher-card { background: linear-gradient(135deg, #fff3e0, #fff8e1); border-left: 5px solid #ef6c00; padding: 18px; border-radius: 10px; margin-bottom: 20px; position: relative; }
.gv-teacher-card .gv-name { font-size: 20px; font-weight: 700; color: #e65100; }
.gv-teacher-card .gv-info { font-size: 13px; color: #555; margin-top: 4px; }
.gv-teacher-card .gv-class-badge { display: inline-block; background: #ef6c00; color: white; padding: 4px 12px; border-radius: 14px; font-size: 13px; font-weight: 600; margin-top: 8px; }
.gv-teacher-card .gv-logout { position: absolute; top: 16px; right: 16px; }

/* Class selector - hiện khi GV chủ nhiệm nhiều lớp */
.gv-class-selector { display: flex; gap: 6px; margin-bottom: 14px; background: white; padding: 8px; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.05); flex-wrap: wrap; align-items: center; }
.gv-class-selector .gv-cs-label { font-size: 13px; color: #777; font-weight: 600; padding: 0 6px; }
.gv-class-btn { background: #fff3e0; color: #ef6c00; border: 2px solid #ffcc80; padding: 8px 16px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 700; transition: all .15s; font-family: inherit; display: flex; align-items: center; gap: 6px; }
.gv-class-btn:hover { background: #ffe0b2; }
.gv-class-btn.active { background: #ef6c00; color: white; border-color: #ef6c00; box-shadow: 0 2px 8px rgba(239,108,0,.3); }
.gv-class-btn .gvc-cnt { background: rgba(255,255,255,.3); padding: 1px 7px; border-radius: 10px; font-size: 11px; font-weight: 500; }
.gv-class-btn:not(.active) .gvc-cnt { background: rgba(239,108,0,.15); color: #ef6c00; }

/* Tabs giáo viên */
.gv-tabs { display: flex; gap: 4px; background: white; padding: 8px; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.05); margin-bottom: 16px; flex-wrap: wrap; overflow-x: auto; }
.gv-tab { background: #f5f5f5; color: #555; border: 2px solid transparent; padding: 10px 18px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; transition: all .15s; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.gv-tab:hover { background: #fff3e0; color: #ef6c00; }
.gv-tab.active { background: #ef6c00; color: white; }
.gv-tab .gv-tab-cnt { background: rgba(255,255,255,.3); padding: 1px 8px; border-radius: 10px; font-size: 11px; }
.gv-tab:not(.active) .gv-tab-cnt { background: #ddd; color: #555; }

/* Điểm danh: header date picker */
.gv-att-header { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; background: #fff8e1; padding: 12px; border-radius: 8px; border: 1px solid #ffcc80; }
.gv-att-header .gv-date-label { font-weight: 700; color: #e65100; font-size: 16px; }
.gv-att-header input[type=date] { width: auto; padding: 6px 10px; border: 1px solid #ffb74d; background: white; }

/* Thẻ thống kê điểm danh nhanh */
.gv-att-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 14px; }
.gv-att-stat { padding: 12px 8px; border-radius: 8px; text-align: center; border: 2px solid transparent; }
.gv-att-stat .ass-num { font-size: 22px; font-weight: 700; }
.gv-att-stat .ass-lbl { font-size: 11px; margin-top: 2px; }
.gv-att-stat.present   { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }
.gv-att-stat.late      { background: #fff3e0; color: #ef6c00; border-color: #ffcc80; }
.gv-att-stat.permitted { background: #e3f2fd; color: #1565c0; border-color: #90caf9; }
.gv-att-stat.sick      { background: #f3e5f5; color: #7b1fa2; border-color: #ce93d8; }
.gv-att-stat.absent    { background: #ffebee; color: #c62828; border-color: #ef9a9a; }
.gv-att-stat.unmarked  { background: #f5f5f5; color: #757575; border-color: #bdbdbd; }

/* Hàng điểm danh HS */
.gv-att-row { display: grid; grid-template-columns: 50px 2fr 4fr; gap: 10px; align-items: center; padding: 10px 12px; background: white; border: 1px solid #eee; border-radius: 8px; margin-bottom: 6px; transition: background .15s; }
.gv-att-row:hover { background: #fafafa; }
.gv-att-row .gv-stt { color: #999; font-size: 13px; font-weight: 600; text-align: center; }
.gv-att-row .gv-st-name { font-weight: 600; font-size: 14px; }
.gv-att-row .gv-st-name small { color: #777; font-weight: 400; font-size: 12px; display: block; margin-top: 2px; }
.gv-att-row .gv-st-name small.code { font-family: monospace; color: #1565c0; }

/* Group nút trạng thái điểm danh */
.gv-att-btn-group { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.gv-att-btn { background: white; border: 2px solid #e0e0e0; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 600; transition: all .15s; display: flex; align-items: center; gap: 4px; font-family: inherit; min-width: 64px; justify-content: center; }
.gv-att-btn:hover { border-color: #999; }
.gv-att-btn.active.present   { background: #43a047; color: white; border-color: #43a047; }
.gv-att-btn.active.late      { background: #ef6c00; color: white; border-color: #ef6c00; }
.gv-att-btn.active.permitted { background: #1565c0; color: white; border-color: #1565c0; }
.gv-att-btn.active.sick      { background: #7b1fa2; color: white; border-color: #7b1fa2; }
.gv-att-btn.active.absent    { background: #c62828; color: white; border-color: #c62828; }

/* Form gửi thông báo */
.gv-notify-form { background: #fff8e1; padding: 18px; border-radius: 10px; border: 1px solid #ffcc80; }
.gv-notify-form textarea { min-height: 100px; resize: vertical; font-family: inherit; }
.gv-type-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.gv-type-btn { background: white; border: 2px solid #ddd; padding: 8px 14px; border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; transition: all .15s; }
.gv-type-btn:hover { border-color: #999; }
.gv-type-btn.active.info   { background: #1565c0; color: white; border-color: #1565c0; }
.gv-type-btn.active.event  { background: #7b1fa2; color: white; border-color: #7b1fa2; }
.gv-type-btn.active.urgent { background: #c62828; color: white; border-color: #c62828; }

/* Card thông báo trong lịch sử */
.gv-notif-card { background: white; border-left: 4px solid #1e88e5; border-radius: 8px; padding: 14px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.gv-notif-card.type-info   { border-left-color: #1565c0; }
.gv-notif-card.type-event  { border-left-color: #7b1fa2; }
.gv-notif-card.type-urgent { border-left-color: #c62828; background: #fff5f5; }
.gv-notif-card .gv-notif-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.gv-notif-card .gv-notif-title { font-weight: 700; font-size: 15px; color: #333; }
.gv-notif-card .gv-notif-meta { font-size: 12px; color: #777; }
.gv-notif-card .gv-notif-message { font-size: 14px; line-height: 1.5; color: #444; white-space: pre-wrap; margin-top: 6px; }
.gv-notif-card .gv-notif-actions { margin-top: 10px; display: flex; gap: 8px; justify-content: flex-end; }

/* Thẻ tóm tắt lớp */
.gv-class-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.gv-class-stat { background: white; padding: 12px; border-radius: 8px; border-left: 3px solid #ef6c00; }
.gv-class-stat .lbl { font-size: 12px; color: #777; }
.gv-class-stat .val { font-size: 22px; font-weight: 700; color: #ef6c00; }

/* Bảng HS với contact phụ huynh */
.gv-student-row { display: grid; grid-template-columns: 50px 1.5fr 1fr 2fr 100px; gap: 10px; align-items: center; padding: 10px 12px; background: white; border-radius: 8px; border: 1px solid #eee; margin-bottom: 6px; }
.gv-student-row .gv-sr-code { font-family: monospace; color: #1565c0; font-weight: 600; font-size: 13px; }
.gv-student-row .gv-sr-name { font-weight: 600; font-size: 14px; }
.gv-student-row .gv-sr-parent { font-size: 13px; }
.gv-student-row .gv-sr-parent small { color: #777; display: block; }
.gv-student-row .gv-sr-actions { text-align: right; }

/* ============== RESPONSIVE ============== */
@media (max-width: 768px) {
  .gv-teacher-card { padding: 14px; }
  .gv-teacher-card .gv-name { font-size: 17px; }
  .gv-teacher-card .gv-logout { position: static; margin-bottom: 10px; display: inline-block; }
  .gv-tab { padding: 8px 12px; font-size: 12px; }
  .gv-class-selector { padding: 6px; gap: 4px; }
  .gv-class-selector .gv-cs-label { font-size: 11px; width: 100%; padding: 4px 6px 0; }
  .gv-class-btn { padding: 6px 12px; font-size: 13px; }
  .gv-att-header { padding: 10px; gap: 8px; }
  .gv-att-header .gv-date-label { font-size: 14px; }
  .gv-att-stats { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .gv-att-stat { padding: 8px 4px; }
  .gv-att-stat .ass-num { font-size: 16px; }
  .gv-att-stat .ass-lbl { font-size: 9px; }
  .gv-att-row { grid-template-columns: 30px 1fr; gap: 6px; padding: 8px; }
  .gv-att-row .gv-st-name { font-size: 13px; }
  .gv-att-row .gv-att-btn-group { grid-column: 1 / -1; justify-content: flex-start; margin-top: 6px; gap: 3px; }
  .gv-att-btn { padding: 4px 6px; font-size: 11px; min-width: 50px; }
  .gv-type-picker { gap: 4px; }
  .gv-type-btn { padding: 6px 10px; font-size: 12px; }
  .gv-notif-card { padding: 12px; }
  .gv-notif-card .gv-notif-title { font-size: 14px; }
  .gv-class-summary { grid-template-columns: repeat(2, 1fr); }
  .gv-student-row { grid-template-columns: 1fr; gap: 4px; padding: 10px; }
  .gv-student-row .gv-sr-actions { text-align: left; }
}

@media (max-width: 480px) {
  .gv-att-stats { grid-template-columns: repeat(2, 1fr); }
  .gv-att-btn { min-width: 44px; padding: 3px 5px; font-size: 10px; }
}
