@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;600&display=swap');

:root {
    --primary: #8B5CF6;
    --secondary: #EC4899;
    --bg-color: #0F172A;
    --text-light: #F8FAFC;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Sarabun', sans-serif;
}

body {
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
}

.glass-container {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 50px;
    width: 100%;
    max-width: 900px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.6s ease;
}

h1 {
    font-weight: 600;
    font-size: 2.2rem;
    margin-bottom: 10px;
    text-align: center;
    background: -webkit-linear-gradient(right, #FBBF24, #EC4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-weight: 400;
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.btn {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.4);
}

.card {
    background: rgba(0, 0, 0, 0.25);
    padding: 25px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

form {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input[type="text"],
input[type="password"],
input[type="file"] {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

/* แก้ปัญหา autofill ของ Chrome ที่เปลี่ยนพื้นหลังเป็นสีขาว */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px #1a1440 inset !important;
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

th {
    background: rgba(255, 255, 255, 0.1);
    padding: 18px 15px;
    text-align: left;
    font-weight: 400;
}

td {
    padding: 16px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.alert {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
}

.alert.success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10B981;
    color: #34D399;
}

.alert.error {
    background: rgba(248, 113, 113, 0.2);
    border: 1px solid #F87171;
    color: #FCA5A5;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    body {
        padding: 16px 10px;
    }

    .glass-container {
        padding: 20px 14px;
        border-radius: 16px;
    }

    h1 {
        font-size: 1.5rem;
    }

    table {
        font-size: .82rem;
    }

    th,
    td {
        padding: 9px 6px;
    }

    .user-info {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 14px;
    }

    .user-info span {
        font-size: .95rem;
    }
}