/* style.css - ไฟล์สไตล์ชีตสำหรับระบบ */
body {
    font-family: 'Kanit', sans-serif;
    background-color: #EAE6D7;
    color: #3D2B1F;
    margin: 0;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* --- Header & Navigation --- */
.header {
    background-color: #4E2A84; /* Imperial Purple */
    color: #FFFFFF;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid #D4AF37; /* Imperial Gold */
}
.header h1 {
    margin: 0;
    font-size: 1.5rem;
}
.header a {
    color: #FFFFFF;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid #D4AF37;
    border-radius: 5px;
    transition: all 0.3s ease;
}
.header a:hover {
    background-color: #D4AF37;
    color: #4E2A84;
}

/* --- Forms --- */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.form-group {
    display: flex;
    flex-direction: column;
}
label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}
input[type="text"],
input[type="password"],
input[type="number"],
select {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Kanit', sans-serif;
}
.button, button {
    background-color: #4E2A84;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
    align-self: flex-start;
}
.button:hover, button:hover {
    background-color: #3b206b;
}
.button-danger {
    background-color: #c94c4c;
}
.button-danger:hover {
    background-color: #a33a3a;
}


/* --- Tables --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}
th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
thead th {
    background-color: #f2f2f2;
    font-weight: 700;
    color: #4E2A84;
}
tbody tr:nth-child(even) {
    background-color: #faf6e9;
}

/* --- Dashboard Specific --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.card {
    background: #faf6e9;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 5px solid #D4AF37;
}
.card h2 {
    margin-top: 0;
    color: #4E2A84;
    border-bottom: 2px solid #D4AF37;
    padding-bottom: 0.5rem;
}

/* --- Messages --- */
.message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    border: 1px solid transparent;
}
.message-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}
.message-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .header {
        flex-direction: column;
        gap: 1rem;
    }
}
