﻿/* ===========================
   UI CHUNG CHO DỰ ÁN (ASP.NET)
   Nguyễn Đăng Tuyên - 2025
   =========================== */

/* 1) NỀN, FONT, RESET NHẸ */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #1f2937; /* gray-800 */
}

/* Chỉ áp dụng nền cho trang đăng nhập */
body.login-page {
  background: url("/Resource/images/bg.jpg") no-repeat center center fixed;
  background-size: cover;
}

body {
    /* Overlay mờ + ảnh nền */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

/* 2) THẺ CHỨA FORM (CARD) */
.auth-card {
    width: 100%;
    max-width: 440px;
    background: rgba(255,255,255,.98);
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(2, 6, 23, .18), 0 4px 8px rgba(2, 6, 23, .06);
    overflow: hidden;
    animation: cardIn .35s ease;
}

@keyframes cardIn {
    from {
        transform: translateY(8px);
        opacity: .0
    }

    to {
        transform: none;
        opacity: 1
    }
}

.auth-header {
    padding: 18px 22px 10px;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: #fff;
}

.auth-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .2px;
    text-align: center;
}

.auth-body {
    padding: 22px 22px 24px;
}

/* 3) NHÓM TRƯỜNG & LABEL */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151; /* gray-700 */
    margin-bottom: 6px;
}

/* 4) INPUT – HỖ TRỢ CẢ TRƯỜNG KHÔNG GÁN CssClass */
.form-control,
input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="tel"], input[type="search"], textarea, select {
    width: 100%;
    height: 42px;
    border: 1px solid #d1d5db; /* gray-300 */
    border-radius: 10px;
    background: #fff;
    padding: 10px 12px;
    font-size: 14px;
    transition: border-color .15s ease, box-shadow .15s ease, background .2s;
    outline: none;
}

textarea {
    height: auto;
    min-height: 90px;
    resize: vertical;
}

    .form-control::placeholder,
    input::placeholder, textarea::placeholder {
        color: #9ca3af;
    }

    .form-control:focus,
    input:focus, textarea:focus, select:focus {
        border-color: #3b82f6; /* blue-500 */
        box-shadow: 0 0 0 3px rgba(59,130,246,.15);
    }

/* 5) NÚT BẤM – HỖ TRỢ CẢ asp:Button (render input[type=submit]) */
.btn, .btn-primary,
input[type="submit"], button[type="submit"] {
    width: 100%;
    height: 42px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .2px;
    cursor: pointer;
    transition: transform .05s ease, filter .15s ease, box-shadow .15s ease;
    box-shadow: 0 6px 16px rgba(37, 99, 235, .25);
}

    .btn:hover, .btn-primary:hover,
    input[type="submit"]:hover {
        filter: brightness(1.03);
    }

    .btn:active, .btn-primary:active,
    input[type="submit"]:active {
        transform: translateY(1px);
    }

.btn-secondary {
    width: 100%;
    height: 42px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #111827;
    border-radius: 10px;
    font-weight: 600;
}

    .btn-secondary:hover {
        background: #e5e7eb;
    }

/* 6) THÔNG BÁO */
.alert {
    padding: 10px 12px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 13px;
    margin-bottom: 14px;
}

/* 7) FOOTER NHỎ */
.auth-footer {
    padding: 12px 18px 18px;
    text-align: center;
    font-size: 12px;
    color: #6b7280;
}

    .auth-footer a {
        color: #2563eb;
        text-decoration: none;
    }

        .auth-footer a:hover {
            text-decoration: underline;
        }

/* 8) RESPONSIVE */
@media (max-width: 480px) {
    .auth-body {
        padding: 18px;
    }

    .auth-title {
        font-size: 18px;
    }
}
/* ===========================
   TABLE / GRIDVIEW
   =========================== */

.table-wrap {
    background: rgba(255,255,255,.98);
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(2,6,23,.10);
    overflow: hidden;
}

.table-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: #fff;
    font-weight: 600;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
}

    .table th, .table td {
        padding: 10px 12px;
        font-size: 14px;
        border-bottom: 1px solid #eef2f7;
        vertical-align: middle;
        white-space: nowrap;
    }

    .table thead th {
        position: sticky;
        top: 0;
        z-index: 1;
        background: #f3f6fb;
        color: #0f172a;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .2px;
        border-bottom: 1px solid #e5eaf1;
    }

/* Strip & hover */
.table-striped tbody tr:nth-child(odd) td {
    background: #fafbfe;
}

.table-hover tbody tr:hover td {
    background: #eff6ff;
}

/* Bo góc trên cho header, dưới cho cuối bảng */
.table thead th:first-child {
    border-top-left-radius: 12px;
}

.table thead th:last-child {
    border-top-right-radius: 12px;
}

.table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

/* Kích cỡ thu gọn / rộng rãi */
.table-compact th, .table-compact td {
    padding: 7px 10px;
    font-size: 13px;
}

.table-comfy th, .table-comfy td {
    padding: 12px 14px;
}

/* Căn ô số / text */
.t-right {
    text-align: right;
}

.t-center {
    text-align: center;
}

/* Badge trạng thái */
.badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
}

.badge-success {
    background: #e8f9ef;
    color: #0f7a39;
    border: 1px solid #b8e7c9;
}

.badge-warning {
    background: #fff7e6;
    color: #92400e;
    border: 1px solid #fde1b0;
}

.badge-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.badge-info {
    background: #eef6ff;
    color: #1e40af;
    border: 1px solid #c7ddff;
}

/* Nút hành động nhỏ trong bảng */
.btn-icon, .btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #111827;
    cursor: pointer;
    transition: background .15s ease;
}

    .btn-icon:hover, .btn-sm:hover {
        background: #eef2f7;
    }

/* Pager (GridView) */
.gv-pager {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    padding: 10px 12px;
    background: #f9fbff;
    border-top: 1px solid #e5eaf1;
}

    .gv-pager a, .gv-pager span {
        display: inline-block;
        padding: 6px 10px;
        border-radius: 8px;
        font-size: 13px;
        text-decoration: none;
        color: #1f2937;
        border: 1px solid transparent;
    }

        .gv-pager a:hover {
            background: #eff6ff;
            border-color: #c7ddff;
        }

    .gv-pager .current {
        background: #2563eb;
        color: #fff;
    }

/* Ô tìm kiếm / filter phía trên */
.table-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 14px;
    background: #fff;
    border-bottom: 1px solid #eef2f7;
}

    .table-filters .form-control {
        height: 36px;
    }

/* Scroll ngang khi nhiều cột */
.table-scroll {
    overflow: auto;
    max-width: 100%;
}
/* ============ Góc hiển thị người dùng ============ */
.user-info {
    position: absolute;
    top: 15px;
    right: 25px;
    text-align: right;
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.2;
}

    .user-info .user-name {
        font-weight: 600;
        color: #1a237e;
        font-size: 15px;
    }

    .user-info .user-unit {
        color: #616161;
        font-size: 13px;
    }