@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600&display=swap');

:root {
  --primary-color: #1a365d;
  --primary-light: #2b6cb0;
  --accent-color: #d69e2e;
  --bg-color: #f7fafc;
  --card-bg: #ffffff;
  --text-color: #2d3748;
  --text-muted: #718096;
  --border-color: #e2e8f0;
  --error-bg: #fff5f5;
  --error-text: #c53030;
  --error-border: #feb2b2;
  --success-bg: #f0fff4;
  --success-text: #276749;
  --success-border: #9ae6b4;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Kanit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  padding: 20px 15px;
}

.container {
  max-width: 750px;
  margin: 0 auto;
  background-color: var(--card-bg);
  padding: 30px 40px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.header {
  text-align: center;
  margin-bottom: 30px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 20px;
}

.header h1 {
  color: var(--primary-color);
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.alert-danger {
  background-color: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-border);
}

.alert-success {
  background-color: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.alert ul {
  padding-left: 20px;
  margin-top: 5px;
}

.form-section {
  margin-bottom: 28px;
  transition: all 0.3s ease-in-out;
}

.form-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 16px;
  border-left: 4px solid var(--primary-light);
  padding-left: 10px;
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.form-group {
  flex: 1;
  min-width: 200px;
}

.form-group.full-width {
  flex: 0 0 100%;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

label .required {
  color: #e53e3e;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  background-color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.15);
}

.drive-box {
  background-color: #ebf8ff;
  border: 1px dashed #63b3ed;
  border-radius: 8px;
  padding: 16px;
  margin-top: 15px;
  text-align: center;
  transition: all 0.3s ease-in-out;
}

.drive-box p {
  font-size: 0.9rem;
  color: #2b6cb0;
  margin-bottom: 10px;
}

.drive-link {
  display: inline-block;
  background-color: #3182ce;
  color: #fff;
  padding: 8px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background-color 0.2s;
}

.drive-link:hover {
  background-color: #2b6cb0;
}

.hidden {
  display: none !important;
}

.btn-submit {
  width: 100%;
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  margin-top: 10px;
}

.btn-submit:hover {
  background-color: var(--primary-light);
}

.btn-submit:active {
  transform: translateY(1px);
}

@media (max-width: 600px) {
  .container {
    padding: 20px 18px;
  }
  
  .form-row {
    flex-direction: column;
    gap: 12px;
  }
  
  .form-group {
    min-width: 100%;
  }
}

/* ==========================================
   Check Status Page Styles
   Theme: Modern Esan Illustration
========================================== */

.status-container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.status-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 74, 173, 0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.status-header {
    background: linear-gradient(135deg, #004aad 0%, #1a365d 100%);
    color: #ffffff;
    padding: 24px 30px;
    position: relative;
}

.status-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #fccc14, #9d4215);
}

.status-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.status-subtitle {
    font-size: 0.9rem;
    opacity: 0.85;
}

.status-body {
    padding: 30px;
}

/* ส่วนกล่องค้นหาซ้ำ */
.re-search-box {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px dashed #cbd5e0;
}

.re-search-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 10px auto 0;
}

.re-search-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #cbd5e0;
    border-radius: 6px;
    font-size: 0.95rem;
    outline: none;
}

.re-search-input:focus {
    border-color: #004aad;
}

/* ตารางข้อมูลผู้สมัคร */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.info-item {
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 8px;
    /* border-left: 4px solid #004aad; */
}

.info-label {
    font-size: 0.82rem;
    color: #718096;
    margin-bottom: 2px;
}

.info-value {
    font-size: 1rem;
    font-weight: 500;
    color: #2d3748;
}

/* ฝ่ายที่สมัคร */
.dept-section-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #9d4215;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #edf2f7;
}

.dept-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.dept-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.dept-rank {
    background: #004aad;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.dept-rank.secondary {
    background: #718096;
}

.dept-rank.fallback {
    background: #9d4215;
}

.dept-name {
    font-weight: 500;
    color: #2d3748;
}

/* Alert Boxes & Buttons */
.alert-box {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.alert-warning {
    background: #fffaf0;
    border: 1px solid #feebc8;
    color: #c05621;
}

.btn-back {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 24px;
    background: #004aad;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-back:hover {
    background: #9d4215;
}

/* Styling สำหรับ Boxicons ในหัวข้อ */
.dept-section-title i {
    font-size: 1.35rem;
    color: var(--primary-color);
    padding: 0px 4px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.status-success-banner i {
    font-size: 1.1rem;
}

.alert-warning i {
    font-size: 1.2rem;
    vertical-align: middle;
    margin-right: 4px;
}

/* Google Drive Submission Box */
.drive-submission-box {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.08);
}

.drive-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.drive-icon {
    font-size: 2rem;
    color: #0284c7;
    background: #e0f2fe;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.drive-text-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0369a1;
    margin-bottom: 2px;
}

.drive-text-desc {
    font-size: 0.85rem;
    color: #0c4a6e;
}

.btn-drive {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #0284c7;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-drive:hover {
    background: #0369a1;
    transform: translateY(-1px);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

@media (max-width: 640px) {
    .drive-submission-box {
        flex-direction: column;
        align-items: flex-start;
    }
    .btn-drive {
        width: 100%;
        justify-content: center;
    }
}