﻿
/* ===== Khung chứa tiêu đề ===== */
.page-header-box {
    background-color: #e8f5e9; /* xanh lá nhạt dịu */
    border: 2px solid #ffa726; /* viền cam nhạt */
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin: 0 auto; /* căn giữa theo chiều ngang */
}

/* ===== Tiêu đề trang ===== */
.page-header-title {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: #021e78; /* xanh navy nhẹ */
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
    margin: 0; /* bỏ khoảng trống mặc định */
}


.page-title {
    font-weight: 700;
    margin-bottom: 20px;
}

/* ===== Chuẩn chiều cao chung ===== */
:root {
    --control-height: 44px;
}

/* ===== Input ===== */
.form-input {
    height: var(--control-height);
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #033f9a;
    font-size: 15px;
    box-sizing: border-box;
}

/* ===== Button chung ===== */
.btn-large,
.btn-add {
    height: var(--control-height);
    padding: 0 16px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dashboard-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.dash-card {
    flex: 1;
    padding: 15px;
    border-radius: 10px;
    color: rgb(255, 255, 255);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.dash-label {
    font-size: 14px;
    opacity: 0.9;
}

.dash-value {
    font-size: 24px;
    font-weight: bold;
}

.primary {
    background: #3b82f6;
}

.warning {
    background: #f59e0b;
}

.danger {
    background: #ef4444;
}

.success {
    background: #10b981;
}

.custom-card {
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.status-line {
    margin-bottom: 15px;
}

.ok-text {
    color: #16a34a;
    font-weight: 500;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.btn-add {
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.search-box {
    width: 300px;
    padding: 6px;
}

.hide-done {
    font-size: 14px;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
}

    .custom-table th {
        background: #f3f4f6;
        padding: 10px;
        text-align: left;
    }

    .custom-table td {
        padding: 10px;
        border-bottom: 1px solid #e5e7eb;
    }

.task-title {
    font-weight: 600;
}

.task-desc {
    font-size: 13px;
    color: #6b7280;
}

.btn-small {
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    margin-right: 5px;
    color: white;
    font-size: 12px;
}

    .btn-small.warning {
        background: #f59e0b;
    }

    .btn-small.danger {
        background: #ef4444;
    }

.table-danger {
    background: #fee2e2;
}

.table-success {
    background: #dcfce7;
    text-decoration: none !important;
}

.form-input {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 15px;
}

    .form-input:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
        outline: none;
    }

.btn-large {
    font-weight: 600;
}

.task-done-note {
    font-size: 12px;
    color: #16a34a;
    margin-top: 3px;
    font-style: italic;
}

/* =========================
           MOBILE RESPONSIVE
        ========================= */
/* ===== Task Grid ===== */
.task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

/* ===== Task Card ===== */
.task-card {
    background: white;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

    .task-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 24px rgba(0,0,0,0.08);
    }

/* ===== Content ===== */
.task-content {
    flex: 1;
}

.task-meta {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #6b7280;
}

.time-left {
    font-weight: 600;
}

/* ===== Actions ===== */
.task-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ===== Trạng thái ===== */
.task-overdue {
    background: #fef2f2;
    border-color: #fecaca;
}

.task-done {
    background: #f0fdf4;
    border-color: #bbf7d0;
    opacity: 0.8;
}

    .task-done .task-title {
        color: #6b7280;
    }

/* ===== Circle Complete Button ===== */
.task-left {
    display: flex;
    align-items: center;
    padding-top: 4px;
}

.task-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .task-circle:hover {
        transform: scale(1.1);
        border-color: #2563eb;
    }

    .task-circle.done {
        background: #10b938;
        border-color: #055138;
        color: white;
    }

.checkmark {
    font-size: 14px;
    font-weight: bold;
}

.status-wrapper {
    display: flex;
    justify-content: center;
    margin: 20px 0;

}

.status-box {
    padding: 14px 28px;
    border-radius: 14px;
    border-color: #10b981;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.success-box {
    background: #ecfdf5; /* nền xanh lá rất nhẹ */
    color: #047857; /* chữ xanh lá đậm */
    border: 2px solid #10b981; /* viền xanh */
    border-radius: 12px;
}

.danger-box {
    background: #f8bebe; /* đỏ cực nhẹ */
    color: #1d4ed8; /* xanh dương */
    border: 2px solid #ef4444; /* viền đỏ */
    border-radius: 12px;
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .dashboard-row {
        flex-direction: column;
    }

    .dash-card {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .toolbar {
        flex-direction: column;
        gap: 10px;
    }

    .search-box {
        width: 100%;
    }
    /* Ẩn header bảng */
    .custom-table thead {
        display: none;
    }
    /* Chuyển mỗi dòng thành card */
    .custom-table tr {
        display: block;
        margin-bottom: 15px;
        background: white;
        border-radius: 10px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.06);
        padding: 10px;
    }

    .custom-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none;
        padding: 6px 0;
    }

        .custom-table td::before {
            content: attr(data-label);
            font-weight: 600;
            color: #6b7280;
        }

    .btn-small {
        font-size: 11px;
        padding: 4px 6px;
    }
}

