﻿/* --- BIẾN ĐIỀU KHIỂN --- */
:root {
    --primary-color: #0d6efd;
    --sidebar-bg: #2c313c; /* Màu nền tối Sidebar[cite: 9] */
    --sidebar-width: 260px; /* Chiều rộng khi mở[cite: 9] */
    --sidebar-mini-width: 60px; /* Chiều rộng khi thu gọn[cite: 7] */
    --transition-speed: 0.3s; /* Tốc độ trượt mượt mà[cite: 7, 9] */
    /* Màu sắc từ bản thiết kế */
    --primary-gradient: linear-gradient(90deg, #790027 0%, #DF0048 100%);
    --navbar-height: 64px; /* Tăng lên 64px theo thiết kế */
    --subnav-height: 45px; /* Chiều cao thanh thứ hai */

    --bg-dark-red: #790027;
    --text-light: #ffffff;
    --search-bg: rgba(0, 0, 0, 0.1); /* Độ trong suốt cho ô tìm kiếm */
}

/* Navbar: Luôn ở trên cùng[cite: 7, 9] */
.navbar {
    z-index: 1050 !important; /* Cao hơn Sidebar để tránh bị đè[cite: 9] */
    height: var(--navbar-height);
}

/* Tùy chỉnh thanh Navbar */
.custom-topbar {
    background: var(--primary-gradient) !important;
    height: var(--navbar-height) !important;
    display: flex;
    align-items: center;
    border: none !important;
}

/* Ô tìm kiếm trung tâm[cite: 7, 9] */
.search-container {
    max-width: 500px;
    flex-grow: 1;
}

.search-input {
    border-radius: 50px 0 0 50px !important;
}

.search-input-group {
    background: var(--search-bg);
    border-radius: 50px; /* Bo tròn mạnh như thiết kế */
    padding: 5px 20px;
    width: 100%;
    max-width: 500px;
}

    .search-input-group input {
        background: transparent;
        border: none;
        color: white;
        font-size: 0.9rem;
    }

        .search-input-group input::placeholder {
            color: rgba(255,255,255,0.6);
        }

        /* Giữ ô input luôn trong suốt, kể cả khi đang nhập liệu */
        .search-input-group input:focus {
            background: transparent !important; /* Ngăn chặn biến thành màu trắng */
            color: white !important; /* Giữ màu chữ trắng khi nhập */
            box-shadow: none !important; /* Xóa viền bóng mặc định của Bootstrap */
            outline: none !important; /* Xóa viền ngoài */
        }

    /* Tùy chọn: Làm cho cả group sáng lên nhẹ một chút khi focus để người dùng biết đang nhập */
    .search-input-group:focus-within {
        background: rgba(0, 0, 0, 0.3) !important; /* Tăng độ đậm của nền một chút */
        border: 1px solid rgba(255, 255, 255, 0.2); /* Thêm viền mờ */
    }

/* Nút Tạo tài khoản (Trắng) */
.btn-create-account {
    background-color: #ffffff !important;
    color: #000000 !important;
    font-weight: bold;
    padding: 8px 15px !important;
    border-radius: 12px !important; /* Bo góc như ảnh thiết kế */
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

    .btn-create-account:hover {
        background-color: rgba(0, 0, 0, 0.3) !important;
        transform: translateY(-1px);
    }

/* Nút Đăng nhập (Viền trắng) */
.btn-login-custom {
    background-color: transparent !important;
    color: #ffffff !important;
    font-weight: 500;
    padding: 7px 15px !important;
    border: 1px solid #ffffff !important;
    border-radius: 12px !important;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

    .btn-login-custom:hover {
        background-color: rgba(0, 0, 0, 0.3) !important;
        transform: translateY(-1px);
    }

    /* Căn chỉnh Icon bên trong nút */
    .btn-create-account i, .btn-login-custom i {
        font-size: 1rem;
    }

/* Thanh Navigation thứ hai */
.sub-navbar {
    position: fixed !important; /* Cố định vị trí */
    top: var(--navbar-height) !important; /* Nằm ngay dưới Top Bar (64px)[cite: 3] */
    left: 0;
    right: 0;
    height: 45px !important; /* Chiều cao cố định */
    background-color: #303133 !important; /* ĐẶT MÀU NỀN TẠI ĐÂY */
    z-index: 1040 !important; /* Thấp hơn navbar chính (1050) nhưng cao hơn main[cite: 3] */
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e0e0e0; /* Viền dưới mỏng để phân tách */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Đổ bóng nhẹ để tạo chiều sâu */
}

    .sub-navbar .nav-link {
        color: #949494;
        font-size: 0.9rem;
        font-weight: 500;
        padding: 0;
        transition: color 0.2s;
    }

        .sub-navbar .nav-link:hover,
        .sub-navbar .nav-link.active {
            color: #ffffff; /* Màu khi di chuột vào */
        }



/* --- HỆ THỐNG LAYOUT --- */
body {
    background-color: #262626;
    padding-top: calc(var(--navbar-height) + var(--subnav-height)) !important;
    [cite: 3] margin: 0;
}



/* Sidebar: Bắt đầu ngay dưới Navbar[cite: 9] */
.sidebar {
    width: var(--sidebar-width);
    height: calc(100vh - (var(--navbar-height) + var(--subnav-height))) !important;
    position: fixed;
    top: calc(var(--navbar-height) + var(--subnav-height)) !important;
    left: 0;
    background-color: var(--sidebar-bg);
    z-index: 1040;
    transition: all var(--transition-speed) ease-in-out;
    [cite: 7, 9] overflow-x: hidden;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

    /* Khi Sidebar thu gọn thành Mini[cite: 7, 9] */
    .sidebar.collapsed {
        width: var(--sidebar-mini-width);
    }

/* Nội dung chính[cite: 7, 9] */
.main-wrapper {
    margin-left: var(--sidebar-width);
    transition: all var(--transition-speed) ease-in-out;
    [cite: 7, 9] padding: 20px;
}

    .main-wrapper.expanded {
        margin-left: var(--sidebar-mini-width);
        [cite: 7, 9]
    }

/* --- HIỆU ỨNG THU GỌN (COLLAPSED) --- */
/* Ẩn chữ, chỉ để lại Icon khi thu gọn[cite: 7, 9] */
.sidebar.collapsed .sidebar-header span,
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .section-title {
    display: none;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 12px 0;
}

    .sidebar.collapsed .nav-link i {
        margin-right: 0;
        [cite: 7]
    }

/* --- THÀNH PHẦN CHI TIẾT --- */
.sidebar .sidebar-header {
    height: 50px;
}

.sidebar .nav-link {
    color: #adb5bd;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    text-decoration: none;
}

    .sidebar .nav-link:hover {
        background-color: rgba(255,255,255,0.05);
        color: #fff;
        [cite: 9]
    }

    .sidebar .nav-link i {
        font-size: 1.2rem;
        margin-right: 15px;
        min-width: 25px;
        text-align: center;
    }

.sidebar .section-title {
    padding: 20px 20px 10px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: bold;
    color: #6c757d;
    [cite: 9]
}

/* Màu sắc định danh[cite: 7, 9] */
.sidebar .text-danger {
    color: #ff4d4d !important;
}

.sidebar .text-success {
    color: #2ecc71 !important;
}

.sidebar .text-warning {
    color: #f1c40f !important;
}

.sidebar .upload-link {
    color: #ffff00 !important;
    font-weight: bold;
}

.search-btn {
    border-radius: 0 50px 50px 0 !important;
    background-color: #fff;
    border-left: none;
}

#sidebarToggle:focus {
    box-shadow: none;
    [cite: 9]
}

/* Hiệu ứng chung cho thẻ Tag badge */
.tag-badge {
    transition: all 0.3s ease !important;
    cursor: pointer;
    text-decoration: none !important;
    display: inline-block;
}

    .tag-badge:hover {
        background-color: #86002B !important; /* Màu xanh Primary */
        color: white !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

        .tag-badge:hover i {
            color: #ffc107 !important; /* Dấu # đổi sang màu vàng */
        }

.card-title a:hover {
    color: #007bff !important; /* Đổi sang màu xanh khi di chuột vào */
}

/* Nền toàn trang */
.identity-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Card đăng ký/đăng nhập */
.identity-card {
    background: rgba(25, 25, 25, 0.95);
    border: 1px solid #333;
    border-radius: 16px;
    padding: 35px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

    /* Tùy chỉnh các ô nhập liệu (Input) */
    .identity-card .form-control {
        background-color: #121212 !important;
        border: 1px solid #444 !important;
        color: #ffffff !important;
        padding: 12px 15px;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

        .identity-card .form-control:focus {
            border-color: #ff0055 !important;
            box-shadow: 0 0 0 0.2rem rgba(255, 0, 85, 0.25) !important;
            background-color: #1a1a1a !important;
        }

/* Nút bấm Tạo tài khoản (Gradient) */
.btn-identity-primary {
    background: linear-gradient(135deg, #ff0055 0%, #d40047 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 12px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

    .btn-identity-primary:hover {
        transform: translateY(-2px);
        background: linear-gradient(135deg, #ff1a66 0%, #e6004d 100%);
        box-shadow: 0 5px 15px rgba(255, 0, 85, 0.3);
        color: #fff;
    }

/* Nút Đăng nhập Google */
.btn-google {
    background: #222;
    border: 1px solid #444;
    color: #eee;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s;
}

    .btn-google:hover {
        background: #333;
        color: #fff;
    }

.btn-custom-action {
    opacity: 0.5;
    background: #303133; /* Sử dụng màu đỏ rượu bạn đã định nghĩa ở dòng 8 */
    border: none;
    color: white;
    transition: opacity 0.2s;
}

    .btn-custom-action:hover {
        opacity: 1;
        color: white;
    }
