/* ========================================
   KSMDBC Faculty Manager – Submission Form
   ======================================== */

.ksmdbc-form-wrap {
    max-width: 780px;
    margin: 40px auto;
    padding: 0 16px 60px;
}

/* Header */
.ksmdbc-form-header {
    background: linear-gradient(135deg, #7a0a0a, #5a0808);
    color: #fff;
    padding: 32px 36px;
    border-radius: 14px 14px 0 0;
    margin-bottom: 0;
}
.ksmdbc-form-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.ksmdbc-form-header p {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
}

/* Form */
.ksmdbc-submit-form {
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* Error Banner */
.ksmdbc-form-error {
    margin: 0;
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    padding: 14px 20px;
    color: #b91c1c;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Sections */
.ksmdbc-form-section {
    padding: 28px 32px;
    border-bottom: 1px solid #f0f0f0;
}
@media(max-width:560px){ .ksmdbc-form-section { padding: 20px 16px; } }

.ksmdbc-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #7a0a0a;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-num {
    width: 26px; height: 26px;
    background: #7a0a0a;
    color: #fff;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Field Grid */
.ksmdbc-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.ksmdbc-field-grid .full { grid-column: 1 / -1; }
@media(max-width:600px){ .ksmdbc-field-grid { grid-template-columns: 1fr; } }

/* Field */
.ksmdbc-field { display: flex; flex-direction: column; gap: 5px; }

.ksmdbc-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}
.req { color: #dc2626; margin-left: 2px; }

.ksmdbc-input {
    padding: 10px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.92rem;
    font-family: inherit;
    color: #1f2937;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}
.ksmdbc-input:focus {
    border-color: #7a0a0a;
    box-shadow: 0 0 0 3px rgba(122,10,10,0.1);
}
.ksmdbc-input.error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}
.ksmdbc-input::placeholder { color: #9ca3af; }
select.ksmdbc-input { cursor: pointer; }
textarea.ksmdbc-input { resize: vertical; line-height: 1.65; }

.field-hint {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
}
.field-error {
    font-size: 0.78rem;
    color: #dc2626;
    font-weight: 500;
    min-height: 16px;
}

/* Photo Upload */
.ksmdbc-photo-upload {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
    background: #fafafa;
}
.ksmdbc-photo-upload:hover { border-color: #7a0a0a; }
.ksmdbc-photo-upload.dragover {
    border-color: #7a0a0a;
    background: #fff5f5;
}

.photo-placeholder {
    padding: 36px 24px;
    text-align: center;
    cursor: pointer;
}
.photo-upload-icon { font-size: 48px; margin-bottom: 10px; }
.photo-upload-text { font-size: 0.95rem; font-weight: 600; color: #374151; margin-bottom: 4px; }
.photo-upload-hint { font-size: 0.78rem; color: #9ca3af; margin-bottom: 16px; }

.ksmdbc-upload-btn {
    padding: 9px 22px;
    background: #7a0a0a;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.ksmdbc-upload-btn:hover { background: #a01414; }

.photo-preview-wrap { position: relative; }
.photo-preview-wrap img {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    object-position: top;
    display: block;
}
.photo-preview-actions {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
}
.ksmdbc-form-btn-sm {
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: rgba(255,255,255,0.9);
    color: #374151;
    transition: background 0.2s;
}
.ksmdbc-form-btn-sm:hover { background: #fff; }
.ksmdbc-form-btn-sm.danger { color: #dc2626; }

/* Submit Area */
.ksmdbc-form-submit {
    padding: 28px 32px;
    background: #fafafa;
    text-align: center;
}
.submit-note {
    font-size: 0.88rem;
    color: #6b7280;
    margin-bottom: 18px;
    line-height: 1.5;
}
.submit-note strong { color: #1f2937; }

.ksmdbc-submit-btn {
    padding: 14px 48px;
    background: #7a0a0a;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(122,10,10,0.35);
    min-width: 220px;
}
.ksmdbc-submit-btn:hover {
    background: #a01414;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(122,10,10,0.4);
}
.ksmdbc-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Success Screen */
.ksmdbc-form-success {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #d1d5db;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    text-align: center;
    padding: 64px 32px;
}
.success-icon { font-size: 72px; margin-bottom: 20px; }
.ksmdbc-form-success h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
}
.ksmdbc-form-success p {
    color: #6b7280;
    font-size: 1rem;
    margin-bottom: 28px;
}
.ksmdbc-form-btn {
    display: inline-block;
    padding: 12px 32px;
    background: #7a0a0a;
    color: #fff;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s;
}
.ksmdbc-form-btn:hover { background: #a01414; color: #fff; }

/* Progress bar */
.ksmdbc-progress {
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    margin: 0 32px 24px;
    overflow: hidden;
    display: none;
}
.ksmdbc-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #7a0a0a, #c89b2a);
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 2px;
}
