:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #2ec4b6;
    --danger: #e63946;
    --success: #06d6a0;
    --warning: #ffbe0b;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #adb5bd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    background-color: #f5f7fa;
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: var(--primary);
    color: white;
    padding: 1.5rem;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
    color: var(--primary);
    border-bottom: 2px solid var(--light);
    padding-bottom: 0.8rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

input[type="text"],
input[type="number"],
.select-dropdown {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
.select-dropdown:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

input[type="number"] {
    text-align: right;
}

button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

button:active {
    transform: translateY(0);
}

.btn-add {
    background-color: var(--secondary);
}

.btn-add:hover {
    background-color: #25a99d;
}

.btn-calculate {
    background-color: var(--success);
    font-weight: bold;
}

.btn-calculate:hover {
    background-color: #05b385;
}

.btn-reset {
    background-color: var(--gray);
}

.btn-reset:hover {
    background-color: #939ba2;
}

.teacher-list {
    margin-bottom: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.teacher-item {
    display: flex;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #eee;
    border-radius: 4px;
    align-items: center;
    transition: all 0.2s ease;
}

.teacher-item:hover {
    background-color: #f9f9f9;
    transform: translateX(5px);
}

.teacher-name {
    flex: 2;
    font-weight: 500;
}

.teacher-income {
    flex: 1;
    text-align: right;
    margin-right: 0.5rem;
    font-family: 'Sarabun', monospace;
}

.btn-remove {
    background-color: var(--danger);
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-remove:hover {
    background-color: #d62b39;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-in-out;
}

th, td {
    border: 1px solid #ddd;
    padding: 0.85rem;
    text-align: center;
}

th {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

tr:hover {
    background-color: #e9e9e9;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.text-success {
    color: var(--success);
    font-weight: bold;
}

.text-danger {
    color: var(--danger);
    font-weight: bold;
}

.font-bold {
    font-weight: bold;
}

.summary-row {
    font-weight: bold;
    background-color: #e9ecef;
}

.notes {
    margin-top: 1.5rem;
    padding: 1.2rem;
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary);
    border-radius: 0 4px 4px 0;
}

.notes h3 {
    margin-bottom: 0.8rem;
    color: var(--primary);
    font-size: 1.2rem;
}

.notes ol {
    margin-left: 1.5rem;
}

.notes li {
    margin-bottom: 0.4rem;
}

.notes .highlight {
    background-color: #e6f4ff;
    padding: 0.8rem;
    border-radius: 4px;
    margin-top: 1rem;
    border: 1px solid #b3d7ff;
    font-weight: 500;
}

.hidden {
    display: none;
}

.actions {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.transfer-details-container {
    margin-bottom: 2rem;
    background-color: #fff;
    border-radius: 6px;
    padding: 1.2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e6e6e6;
}

.transfer-details h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.transfer-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.transfer-table th,
.transfer-table td {
    padding: 0.75rem;
    border: 1px solid #ddd;
}

.transfer-table th {
    background-color: #f5f7fa;
    color: var(--primary);
    font-weight: bold;
}

.transfer-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.transfer-table tr:hover {
    background-color: #f0f4ff;
}

footer {
    margin-top: auto;
    background-color: var(--primary);
    color: white;
    padding: 1.5rem;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

.copyright {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .teacher-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .teacher-income {
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .actions {
        flex-direction: column;
    }
    
    button {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}