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

:root {
    --primary-color: #4a148c; /* Purple from the logo */
    --secondary-color: #7b1fa2;
    --text-main: #333333;
    --text-light: #666666;
    --bg-color: #f5f7fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --success: #2e7d32;
    --danger: #c62828;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    padding: 40px 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    width: 80px;
    height: auto;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.header h2 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 5px;
}

.header h3 {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-light);
}

.photo-box {
    width: 120px;
    height: 150px;
    border: 1px solid var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--text-light);
    font-size: 14px;
    text-align: center;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
}

.photo-box:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.col {
    flex: 1;
    min-width: 200px;
}

.col-half {
    flex: 0 0 calc(50% - 10px);
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 15px;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 20, 140, 0.1);
}

.radio-group, .checkbox-group {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.radio-item, .checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

input[type="radio"], input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.statement {
    text-indent: 50px;
    margin: 20px 0;
    text-align: justify;
}

.doc-list {
    margin-left: 50px;
    margin-bottom: 30px;
}

.doc-list .checkbox-item {
    margin-bottom: 10px;
}

.signature-section {
    display: flex;
    justify-content: flex-end;
    margin-top: 50px;
}

.signature-box {
    text-align: center;
    width: 300px;
}

.signature-line {
    border-bottom: 1px dotted var(--text-main);
    margin: 10px 0;
    height: 30px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.admin-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px dashed var(--border-color);
    background-color: #fafafa;
    padding: 30px;
    border-radius: 8px;
}

.btn-submit {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
    width: 100%;
    margin-top: 40px;
}

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

.alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}
.alert-success {
    background-color: #e8f5e9;
    color: var(--success);
    border: 1px solid #c8e6c9;
}
.alert-error {
    background-color: #ffebee;
    color: var(--danger);
    border: 1px solid #ffcdd2;
}

@media print {
    body {
        background: none;
        padding: 0;
    }
    .container {
        box-shadow: none;
        padding: 0;
        max-width: 100%;
    }
    .btn-submit, .no-print {
        display: none !important;
    }
}
