/* ------------------------------
 * Base Variables and Reset
 * ------------------------------ */
:root {
    --primary-color: #3c6382;
    --secondary-color: #1e40af;
    --success-color: #16a34a;
    --error-color: #dc2626;
    --background-color: #f1f5f9;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --hover-bg: #f8fafc;
}

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

body {
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* ------------------------------
 * Layout and Container Styles
 * ------------------------------ */
.container {
    max-width: 964px;
    margin: 1rem auto;
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 1rem;
}

/* ------------------------------
 * Card Component
 * ------------------------------ */
.card {
    background: var(--card-background);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 0px;
}

/* ------------------------------
 * Form Styles
 * ------------------------------ */
.form-header {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.5rem 0.5rem 0 0;
}

.form-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 16px;
}

.form-group {
    margin-bottom: 1rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.form-group label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-right: 10px;
    flex: 0 0 25%;
    text-align: left;
}

.form-control {
    width: 75%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
}

/* ------------------------------
 * Button Styles
 * ------------------------------ */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

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

/* ------------------------------
 * Sidebar Styles
 * ------------------------------ */
.sidebar .card {
    background-color: var(--card-background);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 0;
}

.card-header {
    background: linear-gradient(135deg, #0a3d62 0%, #3c6382 100%);
    color: #ffffff;
    padding: 0.7rem;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    border-radius: 10px 10px 0 0;
}

.sidebar-nav {
    list-style: none;
    padding: 10;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 5px;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.sidebar-link:hover {
    background: #f5f6fa;
    color: #0a3d62;
    transform: translateX(5px);
}
    .sidebar-link i {
            width: 20px;
            margin-right: 10px;
        }


/* ------------------------------
 * Table Styles (table_tb1)
 * ------------------------------ */
.table_tb1 {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px 10px 10px 10px;
    overflow: hidden;
    font-family: 'Kanit', sans-serif;
    margin: 10px 0;
    font-size: 14px;
    color: #2c3e50;
    background: white;
    padding: 10px;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;  /* เงาแบบนุ่มนวล */
	
}

.table_tb1 thead th {
    background-color: #2f4c6e;
    color: #ffffff;
    padding: 5px;
    text-align: left;
    font-weight: 400;
    border-bottom: 2px solid #ddd;
}

.table_tb1 thead th:first-child {
    border-top-left-radius: 8px;
}

.table_tb1 thead th:last-child {
    border-top-right-radius: 8px;
}

.table_tb1 tbody tr {
    border-bottom: 1px solid #ddd;
}

.table_tb1 tbody tr:nth-of-type(even) {
    background-color: #f5f9ff;
}

.table_tb1 tbody tr:hover {
    background-color: #eaf3ff;
}

.table_tb1 td {
    padding: 5px 10px;
}

.table_tb1 .action-btn {
    background-color: #2f4c6e;
    color: #ffffff;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 14px;
}

.table_tb1 .action-btn:hover {
    background-color: #1e3b5a;
}



/* ------------------------------
 * Responsive Design
 * ------------------------------ */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        padding: 0 8px;
    }
    .form-header {
        padding: 0.5rem;
        font-size: 1rem;
    }
    .form-group {
        display: block;
    }
    .form-group label {
        display: block;
        width: 100%;
        margin-bottom: 4px;
        font-size: 0.9rem;
    }
    .form-control, .btn {
        width: 100%;
        font-size: 14px;
        padding: 10px;
        margin-bottom: 10px;
    }
    .sidebar {
        grid-row: 2;
        margin-top: 1rem;
    }
    .sidebar .card {
        padding: 1rem;
    }
    .sidebar-link {
        padding: 10px;
        font-size: 14px;
    }
}
