/* ===== RESET ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: "Segoe UI", system-ui, sans-serif;
    background: #eef7ff;
    color: #1e293b;
    font-size: 14px;
    line-height: 1.4;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 12px;
}

/* ===== TOPBAR ===== */
.topbar {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 10px 16px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar a {
    color: #e0eaff;
    text-decoration: none;
}
.topbar a:hover {
    text-decoration: underline;
}
.logout {
    border: none;
    padding: 5px 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 12px;
}
.logout:hover {
    background: rgba(255,255,255,0.35);
}

/* ===== CARD ===== */
.card {
    background: white;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(30,58,138,0.1);
    border: 1px solid #d0e2ff;
}
.card h2 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #1e293b;
}
.card h3 {
    font-size: 15px;
    margin-top: 10px;
    margin-bottom: 6px;
}

/* ===== INPUT ===== */
.input {
    border: 1px solid #cbd5e1;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 13px;
    background: white;
}
.input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.3);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 999px;
    border: none;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
}
.btn-blue { background:#3b82f6; color:white; }
.btn-blue:hover { background:#2563eb; }
.btn-green { background:#22c55e; color:white; }
.btn-green:hover { background:#16a34a; }
.btn-red { background:#ef4444; color:white; }
.btn-red:hover { background:#dc2626; }
.btn-gray { background:#e2e8f0; color:#334155; }
.btn-gray:hover { background:#cbd5e1; }

/* ===== TABLE ===== */
table {
    width: 100%;
    border-collapse: collapse;
}
th {
    background: #e8f1ff;
    padding: 8px;
    font-weight: 600;
    border-bottom: 1px solid #dbeafe;
}
td {
    padding: 7px;
    border-bottom: 1px solid #eef2ff;
}
tr:nth-child(even) td {
    background: #f8fbff;
}

/* ===== TAG STATUS ===== */
.tag { padding:2px 8px; font-size:12px; border-radius:999px; font-weight:600; }
.tag.dangnuoi { background:#d1fae5; color:#065f46; }
.tag.trong { background:#e5e7eb; color:#374151; }
.tag.baotri { background:#fee2e2; color:#991b1b; }

/* ===== STAGE TAB ===== */
.stage-tab {
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    align-items:center;
}
.stage-tab a {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:4px 12px;
    border-radius:999px;
    background:white;
    color:#1e293b;
    border:1px solid #bfdbfe;
    white-space:nowrap;
    text-decoration:none;
}
.stage-active {
    background:#3b82f6 !important;
    color:white !important;
    border-color:#2563eb !important;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30,41,59,0.4);
    display: none;
    justify-content: center;
    align-items: center;
}
.modal {
    background:white;
    padding:16px;
    border-radius:12px;
    max-width:500px;
    width:95%;
    box-shadow:0 10px 30px rgba(15,23,42,0.3);
}
.modal-log {
    max-width:900px;
    width:95%;
    max-height:90vh;
    overflow:hidden;
    display:flex;
    flex-direction:column;
}
.modal-log .modal-body {
    overflow-y:auto;
    margin-top:12px;
    max-height:calc(90vh - 60px);
}

/* ===== LOG TYPE ===== */
.log-type { font-size:11px; padding:2px 6px; border-radius:999px; font-weight:600; }
.log-type-nhap { background:#dbeafe; color:#1e40af; }
.log-type-chet { background:#fee2e2; color:#991b1b; }
.log-type-xuat { background:#fef3c7; color:#92400e; }
.log-type-chuyen { background:#cffafe; color:#155e75; }

/* ===== TX-TABLE ===== */
.tx-table th, .tx-table td {
    padding:6px 8px !important;
    line-height:1.4 !important;
    vertical-align:middle !important;
}
.tx-table th { font-weight:500 !important; font-size:14px; }
.tx-actions { text-align:center; white-space:nowrap; }

/* ===== LOG TYPE ===== */
.log-type { font-size:11px; padding:2px 6px; border-radius:999px; font-weight:600; }
.log-type-nhap { background:#dbeafe; color:#1e40af; }
.log-type-chet { background:#fee2e2; color:#991b1b; }
.log-type-xuat { background:#fef3c7; color:#92400e; }
.log-type-chuyen { background:#cffafe; color:#155e75; }

/* ===== TX-TABLE ===== */
.tx-table th, .tx-table td {
    padding:6px 8px !important;
    line-height:1.4 !important;
    vertical-align:middle !important;
}
.tx-table th { font-weight:500 !important; font-size:14px; }
.tx-actions { text-align:center; white-space:nowrap; }

/* ===== MODAL HEADER & CLOSE BUTTON ===== */
.modal-header {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
}

.modal-close-x {
    background:none;
    border:none;
    font-size:20px;
    color:#334155;
    cursor:pointer;
    margin-left:8px;
}

.modal-close-x:hover {
    color:#1e293b;
}

/* ========== MOBILE: DANH SÁCH HỒ CHỈ CÒN 4 CỘT ========== */
@media (max-width: 768px) {

    /* Ẩn các cột: 
       3 = Ghi chú
       5 = KL TB
       6 = Tổng KL
       7 = Công việc hôm nay
    */
    .pond-table thead th:nth-child(3),
    .pond-table thead th:nth-child(5),
    .pond-table thead th:nth-child(6),
    .pond-table thead th:nth-child(7),
    .pond-table tbody td:nth-child(3),
    .pond-table tbody td:nth-child(5),
    .pond-table tbody td:nth-child(6),
    .pond-table tbody td:nth-child(7) {
        display: none;
    }

    /* Chỉnh bảng gọn hơn trên mobile */
    .pond-table th,
    .pond-table td {
        font-size: 12px;
        padding: 6px 4px;
    }

    /* Mã hồ nổi bật */
    .pond-table td:nth-child(1) b {
        font-size: 14px;
    }

    /* Thêm label cho Số cá & Ghi nhận nhanh (nếu bạn muốn) */
    .pond-table tbody td:nth-child(4)::before {
        content: "Số cá: ";
        font-weight: 600;
        color: #6b7280;
        margin-right: 4px;
    }

    .pond-table tbody td:nth-child(8)::before {
        content: "Ghi nhận nhanh: ";
        font-weight: 600;
        color: #6b7280;
        margin-right: 4px;
    }

    .pond-table tbody td:nth-child(8) .btn {
        margin-top: 2px;
    }
}
