/* style.css - Phiên bản sạch sẽ, chuyên nghiệp, đẹp mắt & responsive */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f1f5f9;
    color: #1e293b;
    line-height: 1.6;
}

/* Header */
header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #f97316;
}

header .user-info {
    font-weight: 500;
    color: #475569;
}

header .user-menu a {
    color: #64748b;
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 500;
    transition: color 0.2s;
}

header .user-menu a:hover {
    color: #f97316;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: #ffffff;
    border-right: 1px solid #e2e8f0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    padding-top: 80px;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
}

.sidebar a {
    display: block;
    padding: 1rem 1.5rem;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.sidebar a:hover, .sidebar a.active {
    background-color: #fff7ed;
    color: #f97316;
    border-left-color: #f97316;
}

/* Main */
.main {
    margin-left: 260px;
    padding: 2rem;
    min-height: 100vh;
}

/* Card thống kê */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.card h3 {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card .big-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #f97316;
    margin: 0.5rem 0;
}

.card .sub-text {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Bảng - Đẹp, rõ ràng */
.table-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow-x: auto;
    margin-bottom: 2rem;
}

.table-container h2 {
    color: #1e293b;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f97316;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background-color: #fff7ed;
    color: #f97316;
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 2px solid #fed7aa;
}

table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
}

table tr:hover {
    background-color: #fffaf0;
}

/* Footer */
footer {
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    padding: 1.5rem;
    color: #64748b;
    font-size: 0.9rem;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
    }
    .sidebar a span {
        display: none;
    }
    .sidebar a {
        text-align: center;
        padding: 1.2rem 0;
    }
    .main {
        margin-left: 80px;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    header .user-menu {
        margin-top: 1rem;
    }
    header .user-menu a {
        margin: 0 0.8rem;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 0.5rem 0;
        display: flex;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
    .sidebar a {
        min-width: 100px;
        padding: 0.8rem 0.5rem;
        text-align: center;
    }
    .sidebar a span {
        display: block;
        font-size: 0.8rem;
        margin-top: 0.3rem;
    }
    .main {
        margin-left: 0;
        padding: 1rem;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .card .big-number {
        font-size: 2.2rem;
    }
}


/* Form chung - đẹp, hiện đại */
.main form {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    max-width: 800px;
    margin: 0 auto;
}

.main form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

/* Input text, password, number, date... */
.main form input[type="text"],
.main form input[type="password"],
.main form input[type="number"],
.main form input[type="email"],
.main form input[type="date"],
.main form input[type="datetime-local"],
.main form select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 1rem;
    background-color: #ffffff;
    transition: all 0.2s ease;
    margin-bottom: 1.2rem;
}

.main form input:focus,
.main form select:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

/* Button chính (Thêm, Lưu, Cập Nhật...) */
.main form button[type="submit"] {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    border: none;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.3);
}

.main form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.4);
}

/* Button phụ (Bỏ Qua) */
.main form button[type="button"],
.main form a button {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    margin-left: 12px;
    transition: all 0.2s ease;
}

.main form button[type="button"]:hover,
.main form a button:hover {
    background: #e5e7eb;
    color: #1f2937;
}

/* Căn chỉnh nút ở cuối form */
.main form .form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Thông báo alert đẹp hơn */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Responsive cho form trên mobile */
@media (max-width: 768px) {
    .main form {
        padding: 1.5rem;
    }
    .main form .form-actions {
        flex-direction: column;
    }
    .main form button[type="submit"],
    .main form button[type="button"],
    .main form a button {
        width: 100%;
        margin: 0.5rem 0;
    }
}




/* style.css - Cập nhật BUTTON ĐẸP, HIỆN ĐẠI, CHUYÊN NGHIỆP (thêm vào cuối file) */

/* Button chung - dùng cho mọi nút trong hệ thống */
button, 
a button,
input[type="submit"],
.btn {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    border: none;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

button:hover,
a button:hover,
input[type="submit"]:hover,
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.4);
}

button:active,
a button:active,
input[type="submit"]:active,
.btn:active {
    transform: translateY(-1px);
}

/* Button phụ (Bỏ Qua, Hủy...) */
button.secondary,
a button.secondary,
button[type="button"] {
    background: #f3f4f6;
    color: #4b5563;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

button.secondary:hover {
    background: #e5e7eb;
    color: #1f2937;
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

/* Button nhỏ (trong bảng hành động) */
.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
    min-width: auto;
    border-radius: 8px;
}

/* Button thêm mới (màu xanh lá để nổi bật) - dùng cho "Thêm Voucher", "Thêm Khách Hàng"... */
.btn-add {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-add:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

/* Hiệu ứng ripple nhẹ khi click */
button::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

button:active::after {
    width: 200px;
    height: 200px;
}

/* Responsive */
@media (max-width: 768px) {
    button, a button, input[type="submit"] {
        width: 100%;
        padding: 14px;
        font-size: 1.1rem;
    }
}