/* =================================== */
/* == 1. CÀI ĐẶT CHUNG               == */
/* =================================== */
:root {
    --primary: #2056ac;       /* Màu xanh gốc */
    --primary-dark: #1a438a;
    --header-text: #fe0808;   /* Màu đỏ gốc */
    --footer-bg: #0f2b57;     /* Màu footer gốc */
    --bg-body: #f4f4f9;
}

body {
    font-family: "Roboto", sans-serif;
    background-color: var(--bg-body);
    margin: 0;
    padding: 0;
    line-height: 1.2;
    color: #333;
}

/* =================================== */
/* == 2. HEADER (LOGO TRÊN - MENU DƯỚI) == */
/* =================================== */
.site-header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* PHẦN 1: LOGO & TIÊU ĐỀ */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand img {
    height: 55px;
    width: auto;
}

.brand h1 {
    color: var(--header-text);
    font-size: 1.3em;
    font-weight: 660;
    margin: 0;
    line-height: 1.2;
}

/* Nút 3 gạch Mobile */
.menu-toggle {
    background: none;
    border: none;
    font-size: 2em;
    color: var(--primary);
    cursor: pointer;
    padding: 5px;
}

/* PHẦN 2: THANH MENU (NAV BAR) */
.nav-bar {
    background-color: var(--primary);
    display: none; /* Mặc định ẩn trên mobile */
    flex-direction: column;
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.nav-bar.active {
    display: flex;
}

.nav-bar a {
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.nav-bar a:hover {
    background-color: var(--primary-dark);
}

/* =================================== */
/* == 3. MAIN CONTENT                == */
/* =================================== */
main {
    /*padding: 0px 0px;*/
    min-height: calc(100vh - 260px);
}

h2 {
    font-size: 1.6em;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

/* =================================== */
/* == 4. FORM (BẢN CŨ - RESTORED)    == */
/* =================================== */
.form-container {
    max-width: 400px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.form-container label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

.form-container input[type="text"],
.form-container input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-container button {
    background-color: #2056ac;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
}

.form-container button:hover {
    background-color: #3B82F6;
}

.form-container .checkbox-label {
    font-weight: normal;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}
.form-container .checkbox-label input {
    width: auto;
    margin-right: 10px;
    margin-bottom: 0;
}

/* =================================== */
/* == 5. BUTTONS (THEO FILE INDEX.PHP MỚI) == */
/* =================================== */
.index-container {
    max-width: 535px;
    margin: 0 auto;
    width: 100%;
    padding: 0 10px; /* An toàn cho màn hình nhỏ */
    box-sizing: border-box;
}

/* Wrapper bao quanh mỗi nút */
.button-wrapper {
    margin-bottom: 30px; /* Khoảng cách giữa các nút */
    width: 100%;
}

/* Style cho nút bấm (thẻ a) */
.index-button {
    display: flex;
    align-items: center;
    padding: 25px;
    border-radius: 10px;
    text-decoration: none;
    color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    
    /* Responsive Logic */
    width: 100%; /* Chiếm hết chiều rộng của wrapper */
    box-sizing: border-box; /* Tính cả padding vào chiều rộng */
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Hiệu ứng Hover */
.index-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.index-button:active {
    transform: scale(0.98);
}

/* Icon bên trong nút */
.button-icon {
    font-size: 2em;
    margin-right: 20px;
    width: 40px;
    text-align: center;
    flex-shrink: 0; /* Không bị bóp méo */
}

/* Văn bản bên trong nút */
.button-text {
    flex: 1; /* Chiếm phần còn lại */
    min-width: 0; /* Cho phép text xuống dòng */
}

.button-text strong { 
    display: block; 
    font-size: 1.2em;
    margin-bottom: 5px;
}

.button-text span { 
    font-size: 0.9em; 
    opacity: 0.9;
    line-height: 1.4;
}

/* Màu Gradient cho nút */
.button-info { background: linear-gradient(135deg, #0d9488, #14b8a6); }
.button-change { background: linear-gradient(135deg, #2056ac, #3B82F6); }
.button-reset { background: linear-gradient(135deg, #d83a3a, #f44336); }

/* =================================== */
/* == 5.2. MESSAGE-BOX             == */
/* =================================== */
.message-container {
    width: 90%;
    max-width: 600px;
    margin: 20px auto;
    border-radius: 8px;
    overflow: hidden; /* Để bo góc hoạt động với các .message-box bên trong */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
}
.message-box {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    font-size: 1.1em;
}
.message-box:last-child {
    border-bottom: none;
}
.message-box.success {
    background-color: #e0f8e0;
    border-left: 5px solid #4CAF50;
    color: #333;
}
.message-box.error {
    background-color: #f8e0e0;
    border-left: 5px solid #f44336;
    color: #333;
}
.message-box.info {
    background-color: #e0e8f8;
    border-left: 5px solid #2196F3;
    color: #333;
}
/* =================================== */
/* == 6. FOOTER (BẢN CŨ)             == */
/* =================================== */
footer {
    background-color: var(--footer-bg);
    color: #f4f4f4;
    padding: 10px 20px;
    text-align: center;
    border-top: 3px solid var(--primary);
    margin-top: auto;
}

footer p {
    margin: 0;
    font-size: 0.8em;
    font-style: italic;
}
footer a { color: inherit; text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* =================================== */
/* == 7. RESPONSIVE (PC / TABLET)    == */
/* =================================== */
@media (min-width: 768px) {
    /* Header PC */
    .header-top {
        padding: 20px 40px;
        justify-content: flex-start;
    }
    .brand h1 { font-size: 1.8em; }
    
    .menu-toggle { display: none; }

    /* Nav PC */
    .nav-bar {
        display: block;
        padding: 0 40px;
    }
    .nav-bar a {
        display: inline-block;
        width: auto;
        border-bottom: none;
        padding: 15px 20px;
    }

    /* Main PC */
    main { padding: 30px 40px; }
    h2 { text-align: left; }
    
    /* Footer PC */
    footer {
        text-align: right;
        padding: 10px 40px;
    }
}