/* CSS dùng chung (CLAUDE.md §6) — chỉ dùng comment kiểu này */
/* Khung tổng cho tìm kiếm */
.filter-wrap{background:#fff;border:1px solid #e9ecef;border-radius:10px;padding:12px;margin-bottom:12px;box-shadow:0 1px 2px rgba(0,0,0,.03);}
/* Tiêu đề nhỏ bên trái */
.filter-title{font-weight:600;color:#6b7280;margin-bottom:8px;}
/* Lưới linh hoạt */
.filter-grid{display:flex;flex-wrap:wrap;gap:10px 14px;align-items:flex-start;margin-bottom:10px;}
/* Mỗi ô filter: min-width để tự xuống dòng */
.fg-item{flex:1 1 220px;min-width:220px;}
/* Nút hành động gom lại, không kéo giãn */
.fg-actions{flex:0 0 auto;display:flex;align-items:center;gap:8px;}
.fg-label{flex:0 0 auto;display:flex;gap:8px;line-height:30px;font-weight:bold;}

/* Bổ sung: khung nằm dưới các khối float; ô lọc chiếm hết bề rộng ô; chữ trên nút không xuống dòng */
.filter-wrap{clear:both;}
.filter-grid:last-child{margin-bottom:0;}
.fg-item .form-control{width:100%;float:none;margin:0;}
.fg-actions .btn{white-space:nowrap;float:none;margin:0;}
/* Ô cuối gộp chung với nút: nút Tìm không bao giờ rớt xuống 1 hàng riêng */
.fg-item.fg-with-actions{display:flex;align-items:center;gap:8px;}
.fg-item.fg-with-actions > .form-control,
.fg-item.fg-with-actions > select,
.fg-item.fg-with-actions > input{flex:1 1 auto;min-width:0;}
.fg-item.fg-with-actions > .fg-actions{flex:0 0 auto;}
/* Ô lọc cần rộng gấp đôi */
.fg-item.fg-wide{flex-basis:440px;}
/* Đẩy nhóm nút sang phải */
.fg-actions.fg-right{margin-left:auto;}
.filter-grid.fg-justify-end{justify-content:flex-end;}
/* Khung bọc bảng danh sách */
.table-wrap{overflow-x:auto;overflow-y:hidden;max-width:1800px;} /* chỉ cuộn ngang: overflow-x:auto tự kéo overflow-y thành auto -> thanh trượt dọc thừa */
/* Form thêm / sửa (admin) */
.form-page{width:100%;}
.form-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:5px 0 12px;}
.form-head h3{margin:0;font-size:22px;}
.form-section{background:#fff;border:1px solid #e9ecef;border-radius:10px;padding:14px 16px;margin-bottom:14px;box-shadow:0 1px 2px rgba(0,0,0,.03);}
.form-section > h4{margin:0 0 12px;font-size:15px;font-weight:600;color:#374151;border-bottom:1px solid #f0f0f0;padding-bottom:8px;}
.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px 18px;}
.form-grid .ff-full{grid-column:1/-1;}
.form-grid .ff-2{grid-column:span 2;}
@media (max-width:767px){.form-grid .ff-2{grid-column:1/-1;}}
.ff{min-width:0;}
.ff > label.control-label{display:block;font-weight:600;margin-bottom:4px;}
.ff .help-block{margin:4px 0 0;font-size:12px;}
.ff textarea.form-control{resize:vertical;}
.choice-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:2px 12px;max-height:230px;overflow:auto;border:1px solid #e5e7eb;border-radius:6px;padding:8px 10px;background:#fafafa;}
.choice-grid .radio-inline,.choice-grid .checkbox-inline{width:auto !important;margin:0 !important;padding-top:4px;}
.form-actions-bar{position:sticky;bottom:0;z-index:5;display:flex;gap:8px;align-items:center;flex-wrap:wrap;background:#fff;border-top:1px solid #e9ecef;padding:10px 0;margin-top:4px;}
.seg-choice{display:inline-flex;gap:6px;flex-wrap:wrap;}
.seg-choice label{margin:0;border:1px solid #d1d5db;border-radius:6px;padding:6px 12px;cursor:pointer;font-weight:normal;background:#fff;}
.seg-choice input{margin-right:4px;}
.seg-choice label.on-ok{border-color:#16a34a;background:#f0fdf4;color:#166534;font-weight:600;}
.seg-choice label.on-no{border-color:#dc2626;background:#fef2f2;color:#991b1b;font-weight:600;}
/* Chia phần form bằng fieldset / legend */
fieldset.form-fieldset{min-width:0;border:1px solid #c9d3df;border-radius:12px;padding:8px 18px 6px;margin:0 0 18px;background:#fff;}
fieldset.form-fieldset > legend{display:block;float:none;width:auto;max-width:100%;margin:0 0 6px;padding:2px 12px;border:1px solid #c9d3df;border-radius:20px;background:#f4f7fb;font-size:15px;line-height:1.4;font-weight:600;color:#1f4e79;}
fieldset.form-fieldset > legend .fa{margin-right:4px;}
fieldset.form-fieldset .form-group > label{font-weight:600;}

/* ===== Trang đăng nhập (com_login) ===== */
.login-wrap{display:flex;justify-content:center;padding:30px 15px 40px;}
.login-card{width:100%;max-width:900px;background:#fff;border:1px solid #e5e7eb;border-radius:12px;box-shadow:0 6px 24px rgba(0,0,0,.08);padding:26px 28px 22px;}
.login-head{text-align:center;margin-bottom:18px;}
.login-head img{height:70px;margin-bottom:8px;}
.login-head h3{margin:0 0 4px;font-size:22px;font-weight:700;color:#c00000;text-transform:uppercase;}
.login-head p{margin:0;color:#6b7280;font-size:13px;}
.login-card .form-group > label{font-weight:600;color:#374151;margin-bottom:5px;}
.login-card .input-group-addon{background:#f9fafb;color:#6b7280;min-width:40px;}
.login-card .form-control{height:38px;box-shadow:none;}
.login-card .form-control:focus{border-color:#c00000;box-shadow:0 0 0 2px rgba(192,0,0,.12);}
.login-card .input-group-btn .btn{height:38px;}
.login-captcha{display:flex;align-items:center;gap:8px;}
.login-captcha img{height:38px;width:auto;border:1px solid #d1d5db;border-radius:4px;flex:0 0 auto;}
.login-captcha .btn{height:38px;flex:0 0 auto;}
.login-captcha .form-control{flex:1 1 auto;min-width:0;text-transform:lowercase;letter-spacing:2px;}
.btn-login{height:42px;font-size:16px;font-weight:600;margin-top:6px;border-radius:6px;}
.login-note{margin-top:14px;text-align:center;font-size:13px;color:#6b7280;}
.login-note a{color:#1d4ed8;font-weight:600;}
.login-card .alert{padding:10px 12px;font-size:14px;}

/* ===== Trang đoàn viên (com_doanvien) ===== */
.text-red{color:#dd4b39 !important;}
.dv-page{padding:10px 0 20px;}
.dv-page .alert{border-radius:8px;}
/* Thanh tiêu đề + menu */
.dv-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;border-bottom:2px solid #c00000;padding-bottom:10px;margin-bottom:16px;}
.dv-title{margin:0;font-size:22px;font-weight:700;color:#c00000;}
.dv-nav{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px;}
.dv-nav li a{display:inline-block;padding:7px 14px;border-radius:20px;border:1px solid #e5e7eb;background:#fff;color:#374151;font-weight:600;text-decoration:none;}
.dv-nav li a:hover{border-color:#c00000;color:#c00000;}
.dv-nav li.active a{background:#c00000;border-color:#c00000;color:#fff;}
.dv-nav li.dv-logout a{color:#6b7280;}
/* Thẻ thông tin sinh viên */
.dv-profile{background:#fff;border:1px solid #e5e7eb;border-radius:12px;box-shadow:0 2px 10px rgba(0,0,0,.05);padding:18px 20px;margin-bottom:18px;}
.dv-profile-top{display:flex;align-items:center;flex-wrap:wrap;gap:16px;padding-bottom:14px;border-bottom:1px dashed #e5e7eb;margin-bottom:14px;}
.dv-avatar{width:64px;height:64px;border-radius:50%;background:#fdecec;color:#c00000;display:flex;align-items:center;justify-content:center;font-size:30px;flex:0 0 auto;}
.dv-profile-name{flex:1 1 220px;min-width:0;}
.dv-name{font-size:20px;font-weight:700;color:#111827;}
.dv-sub{color:#6b7280;margin-top:3px;}
.dv-status{display:inline-block;margin-left:8px;padding:2px 10px;border-radius:12px;background:#f3f4f6;font-size:12px;font-weight:600;}
.dv-stats{display:flex;gap:10px;flex-wrap:wrap;}
.dv-stat{min-width:130px;background:#fff7ed;border:1px solid #fed7aa;border-radius:10px;padding:8px 14px;text-align:center;}
.dv-stat span{display:block;font-size:12px;color:#9a3412;}
.dv-stat b{display:block;font-size:22px;color:#c2410c;line-height:1.3;}
.dv-info-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px 18px;}
.dv-info{display:flex;align-items:baseline;gap:8px;min-width:0;}
.dv-info .fa{color:#c00000;width:16px;text-align:center;}
.dv-info span{color:#6b7280;flex:0 0 auto;}
.dv-info span:after{content:":";}
.dv-info b{color:#111827;overflow-wrap:anywhere;}
/* Tab */
.dv-tabs{clear:both;margin-top:6px;}
.dv-tabs ul.tabs{float:none;height:auto;width:100%;margin:0;padding:0;background:none;border:0;border-bottom:2px solid #e5e7eb;display:flex;flex-wrap:wrap;gap:4px;}
.dv-tabs ul.tabs li{float:none;height:auto;line-height:1.4;margin:0 0 -2px;background:none;overflow:visible;}
.dv-tabs ul.tabs li button,
.dv-tabs ul.tabs li a{cursor:pointer;outline:none;font-family:inherit;font-size:inherit;line-height:1.4;border:1px solid #e5e7eb;border-bottom:0;border-radius:8px 8px 0 0;padding:10px 16px;color:#4b5563;font-weight:600;background:#f3f4f6;}
.dv-tabs ul.tabs li button:hover,
.dv-tabs ul.tabs li a:hover{color:#c00000;background:#fef2f2;}
/* Tab đang mở: nền đỏ, chữ trắng */
.dv-tabs ul.tabs li.active,
.dv-tabs ul.tabs li.active a:hover{background:none;}
.dv-tabs ul.tabs li.active button,
.dv-tabs ul.tabs li.active button:hover,
.dv-tabs ul.tabs li.active a,
.dv-tabs ul.tabs li.active a:hover{background:#c00000;border-color:#c00000;color:#fff !important;}
.dv-tabs ul.tabs{border-bottom:2px solid #c00000 !important;}
.dv-tabs .tab_container{float:none;border-top:0;background:#fff;}
.dv-tabs .tab_content{padding:14px 0 0;}
/* Bảng */
.dv-table{margin-bottom:10px;background:#fff;}
.dv-table > thead > tr > th{background:#f9fafb;color:#374151;vertical-align:middle;text-align:center;font-weight:600;}
.dv-table > tbody > tr > td{vertical-align:middle;}
.dv-note{font-size:90%;padding:10px 12px;background:#fffbeb;border:1px solid #fde68a;border-radius:8px;color:#92400e;}
@media (max-width:767px){
	.dv-head{flex-direction:column;align-items:flex-start;}
	.dv-stats{width:100%;}
	.dv-stat{flex:1 1 0;}
}
