@charset "utf-8";
/* ══════════════════════════════════════════════════════════════
   ระบบข้อเสนอแนะ/ร้องเรียน สายตรงคณบดี — ธีมขาว-น้ำเงิน (local 100%)
   ใช้กับ index.php (หน้าฟอร์ม) — ไม่มี dependency ภายนอก
   ══════════════════════════════════════════════════════════════ */

/* ══════════════ Design Token ══════════════ */
:root {
    --primary:       #2563eb;
    --primary-dark:  #1d4ed8;
    --primary-deep:  #1e3a8a;
    --primary-light: #eff6ff;
    --indigo:        #4f46e5;
    --green:         #16a34a;
    --amber:         #d97706;
    --red:           #dc2626;
    --surface:       #ffffff;
    --bg:            #f1f5f9;
    --border:        #e2e8f0;
    --text:          #1e293b;
    --muted:         #64748b;
    --radius:        12px;
    --shadow:        0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md:     0 4px 12px rgba(0,0,0,.09);
    --shadow-lg:     0 10px 30px rgba(30,58,138,.18);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Leelawadee UI', 'Noto Sans Thai', 'Sarabun', 'Prompt', Tahoma, 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

img { max-width: 100%; }

a { color: var(--primary); }

:focus-visible {
    outline: 3px solid rgba(37,99,235,.45);
    outline-offset: 2px;
}

/* ══════════════ Layout ══════════════ */
.sc-wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 20px 20px 40px;
}

/* ══════════════ Hero Header ══════════════ */
.sc-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
    border-radius: var(--radius);
    padding: 26px 28px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: var(--shadow-lg);
    color: #fff;
}
.sc-hero-brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.sc-hero-logo {
    width: 62px; height: 62px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    padding: 8px;
}
.sc-hero-logo img { width: 100%; height: auto; display: block; }
.sc-hero h1 {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: .2px;
    line-height: 1.35;
}
.sc-hero-sub {
    margin: 2px 0 0;
    font-size: 13px;
    opacity: .85;
    font-weight: 400;
}
.sc-hero-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.sc-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255,255,255,.16);
    color: #fff;
    border: 1px solid rgba(255,255,255,.3);
    white-space: nowrap;
}
.sc-badge svg { width: 13px; height: 13px; }

/* ══ Language Toggle ══ */
.sc-lang-toggle {
    display: flex;
    border-radius: 20px;
    overflow: hidden;
    border: 1.5px solid rgba(255,255,255,.45);
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.sc-lang-btn {
    border: none;
    background: rgba(255,255,255,.12);
    color: #fff;
    padding: 5px 13px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
    font-family: inherit;
    letter-spacing: .5px;
}
.sc-lang-btn:hover { background: rgba(255,255,255,.22); }
.sc-lang-btn.active {
    background: rgba(255,255,255,.4);
    box-shadow: 0 0 0 2px rgba(255,255,255,.18) inset;
}

/* ══ Full-width form ══ */
.sc-full { width: 100%; max-width: 900px; margin: 0 auto; }
.sc-full > .sc-card-body { padding: 28px 32px; }
@media (max-width: 768px) {
    .sc-full > .sc-card-body { padding: 20px 16px; }
}

/* ══ Grid 2 คอลัมน์ ══ */
.sc-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    align-items: start;
}
@media (max-width: 991px) {
    .sc-grid { grid-template-columns: 1fr; }
}

/* ══ Info box (แยกกล่องชัดเจน) ══ */
.sc-info-box {
    background: var(--primary-light);
    border: 2px solid #bfdbfe;
    border-left: 5px solid var(--primary);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 16px;
}
.sc-info-box:last-child { margin-bottom: 0; }
.sc-info-box-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-deep);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sc-info-box-title svg { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; }
.sc-info-box p {
    margin: 0 0 8px;
    font-size: 13.5px;
    color: var(--text);
    line-height: 1.65;
}
.sc-info-box p:last-child { margin-bottom: 0; }
.sc-info-box .en { font-size: 12px; color: var(--muted); display: block; margin-top: 2px; }

/* ══ Prominent Logo ══ */
.sc-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
    border-radius: var(--radius);
    padding: 32px 28px 28px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: var(--shadow-lg);
    color: #fff;
}
.sc-hero-brand { display: flex; align-items: center; gap: 22px; min-width: 0; }
.sc-hero-logo {
    width: 96px; height: 96px;
    background: rgba(255,255,255,.2);
    border: 3px solid rgba(255,255,255,.6);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
    transition: transform .2s, box-shadow .2s;
}
.sc-hero-logo:hover { transform: scale(1.05); box-shadow: 0 12px 32px rgba(0,0,0,.25); }
.sc-hero-logo img { width: 100%; height: auto; display: block; }
.sc-hero h1 { font-size: 24px; margin: 0; line-height: 1.3; }
.sc-hero-sub { margin: 4px 0 0; font-size: 13.5px; opacity: .9; font-weight: 400; }
.sc-hero-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.sc-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 16px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255,255,255,.2);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,.4);
    white-space: nowrap;
}
.sc-badge svg { width: 14px; height: 14px; }

/* ══════════════ Card ══════════════ */
.sc-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.sc-card + .sc-card { margin-top: 20px; }
.sc-card-header {
    padding: 15px 22px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}
.sc-card-header svg { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; }
.sc-card-body { padding: 22px; }

/* ══════════════ Aside: คำอธิบาย ══════════════ */
.sc-info-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 13.5px;
    color: var(--text);
}
.sc-info-item:last-child { border-bottom: none; padding-bottom: 0; }
.sc-info-item:first-child { padding-top: 0; }
.sc-info-icon {
    width: 34px; height: 34px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    background: var(--primary-light);
    color: var(--primary);
}
.sc-info-icon svg { width: 17px; height: 17px; }
.sc-info-item strong { color: var(--primary-deep); }
.sc-info-en {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.55;
}
.sc-info-note {
    margin-top: 16px;
    background: var(--primary-light);
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 12.5px;
    color: var(--primary-deep);
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.sc-info-note svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }

/* ══════════════ Form ══════════════ */
.sc-field { margin-bottom: 22px; }
.sc-field:last-of-type { margin-bottom: 0; }
.sc-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.sc-label .req { color: var(--red); margin-left: 2px; }
.sc-hint { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }

.sc-input,
.sc-textarea {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 14.5px;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    appearance: none;
}
.sc-textarea { resize: vertical; min-height: 150px; line-height: 1.7; }
.sc-input::placeholder,
.sc-textarea::placeholder { color: #94a3b8; }
.sc-input:focus,
.sc-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}
.sc-input.is-invalid,
.sc-textarea.is-invalid {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(220,38,38,.10);
}

.sc-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
}
.sc-char-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.sc-char-count.over { color: var(--red); font-weight: 600; }

.sc-error {
    display: none;
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--red);
    align-items: center;
    gap: 6px;
}
.sc-error.show { display: flex; }
.sc-error svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ══════════════ Radio card (ติดต่อกลับ) ══════════════ */
.sc-radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.sc-radio-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    font-size: 14px;
    background: #fff;
    transition: border-color .15s, background .15s, box-shadow .15s;
    user-select: none;
}
.sc-radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.sc-radio-dot {
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: border-color .15s;
}
.sc-radio-dot::after {
    content: "";
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--primary);
    transform: scale(0);
    transition: transform .15s;
}
.sc-radio-card:hover { border-color: #93c5fd; }
.sc-radio-card.is-checked {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.sc-radio-card.is-checked .sc-radio-dot { border-color: var(--primary); }
.sc-radio-card.is-checked .sc-radio-dot::after { transform: scale(1); }
.sc-radio-card small { display: block; color: var(--muted); font-size: 11.5px; }

.sc-reply-box {
    margin-top: 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 14px;
}
.sc-reply-box[hidden] { display: none; }
.sc-reply-box .sc-input { border-color: #fcd34d; }
.sc-reply-box .sc-input:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(217,119,6,.14); }
.sc-reply-tip {
    margin: 8px 0 0;
    font-size: 12px;
    color: #92400e;
    display: flex; gap: 6px; align-items: flex-start;
}
.sc-reply-tip svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; }

/* ══════════════ Dropzone + ไฟล์แนบ ══════════════ */
.sc-dropzone {
    border: 2px dashed #bfdbfe;
    border-radius: 12px;
    background: var(--primary-light);
    padding: 26px 18px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .1s;
}
.sc-dropzone:hover { border-color: var(--primary); }
.sc-dropzone.dragover {
    border-color: var(--primary);
    background: #dbeafe;
    transform: scale(1.005);
}
.sc-dropzone svg { width: 34px; height: 34px; color: var(--primary); }
.sc-drop-title { font-size: 14px; font-weight: 600; color: var(--primary-deep); margin-top: 8px; }
.sc-drop-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.sc-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.sc-file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.sc-file-grid:empty { display: none; }
.sc-file-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
    box-shadow: var(--shadow);
    min-width: 0;
    animation: sc-pop .18s ease-out;
}
@keyframes sc-pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }
.sc-file-thumb {
    width: 38px; height: 38px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg);
    flex-shrink: 0;
}
.sc-file-meta { min-width: 0; flex: 1; }
.sc-file-name {
    font-size: 12px; font-weight: 600; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sc-file-size { font-size: 11px; color: var(--muted); }
.sc-file-remove {
    border: none; background: transparent;
    color: var(--muted); cursor: pointer;
    width: 26px; height: 26px; border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background .15s, color .15s;
}
.sc-file-remove:hover { background: #fee2e2; color: var(--red); }
.sc-file-remove svg { width: 14px; height: 14px; }

/* ══════════════ reCAPTCHA + Submit ══════════════ */
.sc-captcha {
    display: flex;
    justify-content: center;
    padding: 6px 0 2px;
}
.sc-captcha > div { transform: scale(.95); transform-origin: center; }

.sc-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.sc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    padding: 13px 30px;
    cursor: pointer;
    transition: background .15s, transform .1s, box-shadow .15s, opacity .15s;
}
.sc-btn svg { width: 17px; height: 17px; }
.sc-btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37,99,235,.35);
}
.sc-btn-primary:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); }
.sc-btn-primary:active:not(:disabled) { transform: translateY(0); }
.sc-btn-primary:disabled {
    background: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
    opacity: .75;
}
.sc-btn-ghost {
    background: #fff;
    color: var(--primary);
    border: 1.5px solid #bfdbfe;
}
.sc-btn-ghost:hover { background: var(--primary-light); }
.sc-secure-note {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--muted);
}
.sc-secure-note svg { width: 13px; height: 13px; color: var(--green); }

/* ══════════════ Alerts ══════════════ */
.sc-alert {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border-radius: var(--radius);
    padding: 15px 18px;
    margin-bottom: 20px;
    font-size: 14px;
    box-shadow: var(--shadow);
    border: 1px solid transparent;
}
.sc-alert svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.sc-alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.sc-alert-error svg { color: var(--red); }

/* ══════════════ Success Card ══════════════ */
.sc-success {
    background: var(--surface);
    border: 1px solid #bbf7d0;
    border-top: 5px solid var(--green);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 36px 30px;
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
    animation: sc-rise .35s ease-out;
}
@keyframes sc-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.sc-success-icon {
    width: 74px; height: 74px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #dcfce7;
    color: var(--green);
    display: flex; align-items: center; justify-content: center;
}
.sc-success-icon svg { width: 36px; height: 36px; }
.sc-success h2 { margin: 0 0 6px; font-size: 21px; color: #14532d; }
.sc-success p.lead { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.sc-success-list {
    text-align: left;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 16px 18px;
    margin: 0 0 22px;
    font-size: 13px;
    color: #166534;
}
.sc-success-list li { margin: 6px 0; }
.sc-countdown { font-size: 12.5px; color: var(--muted); }
.sc-countdown strong { color: var(--primary); }

/* ══════════════ Footer ══════════════ */
.sc-footer {
    margin-top: 34px;
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
}
.sc-footer a { color: var(--primary); font-weight: 600; text-decoration: none; }
.sc-footer a:hover { text-decoration: underline; }

/* ══════════════ Responsive ══════════════ */
@media (max-width: 991px) {
    .sc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .sc-wrap { padding: 12px 12px 30px; }
    .sc-hero { padding: 20px 18px; }
    .sc-hero h1 { font-size: 17px; }
    .sc-card-body { padding: 16px; }
    .sc-radio-group { grid-template-columns: 1fr; }
    .sc-actions .sc-btn { width: 100%; }
}
@media (max-width: 480px) {
    .sc-hero-logo { width: 48px; height: 48px; }
    .sc-file-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
