:root { --primary-color: #007bff; --secondary-color: #6c757d; --success-color: #28a745; --danger-color: #dc3545; --warning-color: #ffc107; --light-color: #f8f9fa; --dark-color: #343a40; --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --border-radius: 6px; }
* { box-sizing: border-box; }
body { font-family: var(--font-family); margin: 0; background-color: #eef2f7; color: var(--dark-color); line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
a { color: var(--primary-color); text-decoration: none; } a:hover { text-decoration: underline; }
.card { background-color: #fff; border-radius: var(--border-radius); padding: 25px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); margin-bottom: 20px; }
.header { background-color: #fff; padding: 15px 0; box-shadow: 0 2px 4px rgba(0,0,0,0.05); margin-bottom: 30px; }
.header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: bold; color: var(--dark-color); }
.main-nav { display: flex; align-items: center; gap: 20px; }
.main-nav a { color: #555; font-weight: 500; }
.main-nav span { color: #777; }
main.container { padding-top: 20px; padding-bottom: 40px; }
.footer { text-align: center; padding: 20px; margin-top: 30px; color: #888; font-size: 0.9em; }
.button { display: inline-block; background-color: var(--primary-color); color: #fff; padding: 10px 20px; border: none; border-radius: var(--border-radius); cursor: pointer; font-weight: 500; text-align: center; transition: background-color 0.2s; }
.button:hover { background-color: #0056b3; color: #fff; text-decoration: none; }
.button-outline { background-color: transparent; border: 1px solid #ccc; color: #555; }
.button-outline:hover { background-color: #f8f9fa; }
.button-sm { padding: 5px 10px; font-size: 0.9em; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-weight: 500; margin-bottom: 8px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: var(--border-radius); font-size: 1rem; }
.alert { padding: 15px; margin-bottom: 20px; border-radius: var(--border-radius); border: 1px solid transparent; }
.alert-danger { color: #721c24; background-color: #f8d7da; border-color: #f5c6cb; }
.alert-success { color: #155724; background-color: #d4edda; border-color: #c3e6cb; }
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-container { width: 100%; max-width: 420px; }
table { width: 100%; border-collapse: collapse; background-color: #fff; }
table th, table td { padding: 15px; text-align: left; border-bottom: 1px solid #dee2e6; }
table th { font-weight: 600; color: #555; }
table tbody tr:hover { background-color: #f8f9fa; }
.badge { display: inline-block; padding: .35em .65em; font-size: .75em; font-weight: 700; line-height: 1; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: .25rem; color: #fff; }
.badge-primary { background-color: var(--primary-color); } .badge-secondary { background-color: var(--secondary-color); } .badge-success { background-color: var(--success-color); } .badge-danger { background-color: var(--danger-color); } .badge-warning { background-color: var(--warning-color); color: #212529; }
.task-view { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; }
.task-main-info .meta { color: #666; font-size: 0.9em; margin: 10px 0 20px 0; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.task-main-info .description { margin-bottom: 25px; }
.attachments img { max-width: 150px; height: auto; border-radius: var(--border-radius); margin-right: 10px; border: 1px solid #eee; }
.comment-list { max-height: 500px; overflow-y: auto; margin-bottom: 20px; }
.comment-item { padding: 15px; border-bottom: 1px solid #eee; }
.comment-item:last-child { border-bottom: none; }
.comment-author { margin-bottom: 5px; }
.comment-author .badge { margin-left: 10px; }
.comment-body { margin-bottom: 8px; }
.comment-time { font-size: 0.8em; color: #999; }
.comment-form textarea { min-height: 80px; }
.float-right { float: right; }
@media (max-width: 992px) { .task-view { grid-template-columns: 1fr; } }
/* Thêm vào cuối file assets/css/style.css */

/* Search Bar */
.search-bar form {
    display: flex;
    gap: 10px;
}
.search-bar input {
    flex-grow: 1;
}

/* Pagination */
.pagination {
    margin-top: 20px;
    text-align: center;
}
.pagination a {
    color: var(--primary-color);
    padding: 8px 16px;
    text-decoration: none;
    transition: background-color .3s;
    border: 1px solid #ddd;
    margin: 0 4px;
    border-radius: var(--border-radius);
}
.pagination a.active {
    background-color: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}
.pagination a:hover:not(.active) {
    background-color: #ddd;
}

/* User Management */
.user-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.user-management-header h1 {
    margin: 0;
}
.button-danger {
    background-color: var(--danger-color);
}
.button-danger:hover {
    background-color: #c82333;
}
.actions a {
    margin-right: 10px;
}
/* Styling cho phần đính kèm ảnh */
.attachments {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}
.attachments h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1em;
    color: #555;
}
.attachments img {
    max-width: 100px; /* Giảm kích thước ảnh thumbnail */
    height: auto;
    border-radius: var(--border-radius);
    margin-right: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: transform 0.2s;
}
.attachments img:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
}
.comment-attachments {
    border-top: none;
    padding-top: 5px;
    margin-top: 5px;
}
/* Styling cho phần đính kèm ảnh */
.attachments {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}
.attachments h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1em;
    color: #555;
}
.attachments img {
    width: 100px; /* Cố định chiều rộng */
    height: 100px; /* Cố định chiều cao */
    object-fit: cover; /* Giữ tỷ lệ ảnh không bị méo */
    border-radius: var(--border-radius);
    margin-right: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: transform 0.2s;
}
.attachments img:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
}
.comment-attachments {
    border-top: none;
    padding-top: 5px;
    margin-top: 5px;
}
.form-group input[type="file"] {
    padding: 5px;
}
.search-form {
    display: flex;
    gap: 15px;
    align-items: center;
}
.search-form input[type="text"] {
    flex-grow: 1;
}
.form-options {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
/* ============================================= */
/* Cải tiến giao diện khu vực Hành động (v2.0) */
/* ============================================= */

/* Container chính cho các nút hành động */
.actions-container {
    display: flex;       /* Sắp xếp các item trên một hàng */
    flex-wrap: wrap;     /* Cho phép xuống dòng nếu màn hình hẹp */
    align-items: center; /* Căn giữa các item theo chiều dọc */
    gap: 8px;            /* Khoảng cách đồng đều giữa các item */
}

/* Reset margin cho các form bên trong container */
.actions-container form {
    margin: 0;
}

/* Biến form cập nhật trạng thái thành một flex item */
.form-update-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Chỉnh lại style cho ô select để nó trông đẹp hơn và đồng bộ với nút */
.form-update-status select {
    min-width: 120px; /* Giúp ô chọn không bị quá ngắn */
    padding: 5px 8px; /* Đồng bộ padding với button-sm */
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    height: 32px; /* Đồng bộ chiều cao với button-sm */
}

/* Đảm bảo các nút bấm và thẻ <a> dạng nút có style nhất quán */
.actions-container .button, 
.actions-container a.button {
    margin: 0; /* Xóa mọi margin riêng lẻ */
}

/* Xóa các style cũ không cần thiết để tránh xung đột */
.creator-actions, .archive-form {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}
/* ============================================= */
/* Style cho Menu hành động (Dropdown)           */
/* ============================================= */

.action-menu {
    position: relative;
    display: inline-block;
}

.action-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 10px;
    line-height: 1;
    color: #555;
}

.action-button:hover {
    color: var(--primary-color);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #ffffff;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 100;
    border-radius: var(--border-radius);
    overflow: hidden; /* Bo tròn các góc của item bên trong */
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9em;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

/* Style cho link Xóa để có màu đỏ */
.dropdown-content a.danger-link {
    color: var(--danger-color);
}

.dropdown-content a.danger-link:hover {
    background-color: #f8d7da;
}

/* Class 'show' được thêm/xóa bằng JavaScript để ẩn/hiện menu */
.show {
    display: block;
}