/* app-form.css
   Modern responsive styling for the provided form.
   No HTML/JS changes required.
*/

/* Google font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root{
  --bg: #f7f9fb;
  --card: #ffffff;
  --muted: #6b7280;
  --accent: #0f62fe; /* primary */
  --accent-600: #0b53cc;
  --border: #e6e9ef;
  --field-bg:#f7f9ff; /* filled background for table inputs */
  --success: #16a34a;
  --danger: #ef4444;
  --shadow: 0 6px 20px rgba(20,24,40,0.06);
  --radius-lg: 12px;
  --radius-sm: 6px;
  font-family: 'Inter', system-ui;
}

/* Page background */
body {
  background: linear-gradient(180deg, #f6f9ff 0%, #e2eb994f 100%);
  color: #111827;
  font-size: 15px;
  line-height: 1.45;
}

/* Card wrapper */
.bg-lightest.border-1px.p-30 {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .08s;
}

/* subtle hover */
.bg-lightest.border-1px.p-30:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(20,24,40,0.08);
}

/* Section titles */
h4.text-uppercase {
  font-weight: 700;
  margin: 0 0 18px 0;
  font-size: 16px;
  background: #57a949;
  border-radius: 10px;
  padding: 12px 14px;
  color: #fff !important;
}

/* Form grid */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -8px;
  gap: 12px;
}
.form-group {
  padding: 0 8px;
  margin-bottom: 12px;
  width: 100%;
  box-sizing: border-box;
}

/* Column control */
.col-md-12 { flex: 0 0 100%; max-width: 100%; }
.col-md-6 { flex: 0 0 48%; max-width: 48%; }
.col-md-4 { flex: 0 0 30.333%; max-width: 30.333%; }
.col-md-3 { flex: 0 0 23%; max-width: 23%; }
.col-sm-3 { flex: 0 0 25%; max-width: 25%; }
.col-sm-9 { flex: 0 0 75%; max-width: 75%; }

/* Labels */
label {
  display: inline-block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
  color: #0b1220;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 3px 3px;
    background: #ffffff;
    border: 1px solid #a1a7b3;
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    
    /* Soft inner+outer shadow */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.08),
                0 2px 6px rgba(0,0,0,0.05);
}

/* Hover effect */
.form-control:hover,
input[type="text"]:hover,
textarea:hover,
select:hover {
    border-color: #0f62fe;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.08),
                0 3px 8px rgba(0,0,0,0.12);
}

/* Focus effect */
.form-control:focus,
input[type="text"]:focus,
textarea:focus,
select:focus {
    border-color: #0f62fe;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(15, 98, 254, 0.20),
                inset 0 1px 3px rgba(0,0,0,0.08);
}


/* Focus effect */
.form-control:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(15,98,254,0.08);
}

/* Textarea */
textarea.form-control {
  min-height: 96px;
  resize: vertical;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
}
table td {
  padding: 8px;
  vertical-align: middle;
}

/* Table header row */
.form-group table tr:nth-child(1) td,
.col-sm-9 table tr:nth-child(1) td {
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

/* Table first column labels */
.form-group table td:first-child,
.col-sm-9 table td:first-child {
  font-weight: 600;
  width: 20%;
}

/* TABLE INPUTS – SAME STYLE FOR BOTH (Qualification + Experience) */
.form-group table input.form-control,
.col-sm-9 table input.form-control,
.form-group table select.form-control,
.col-sm-9 table select.form-control {
  
 width: 100%;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #a1a7b3;
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: all 0.2s 
ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* EXPERIENCE SECTION FIX — matching background like qualification */
.col-sm-3 select.form-control {
  background: var(--field-bg);
  height: 40px;
}

/* Background block after headings */
h4.text-uppercase + .row,
h4.text-uppercase + div,
h4.text-uppercase + table {
  background: #f8faff;
  padding: 16px 18px;
  border-radius: 10px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

/* <hr> styling */
hr {
  border: none;
  border-top: 1px solid #dce2ee;
  margin: 22px 0;
}

/* Buttons */
input[type="submit"].btn-dark {
  background: linear-gradient(90deg, var(--accent), var(--accent-600));
  color: #fff;
  border: none;
  padding: 12px 16px;
  border-radius: 8px;
  width: 100%;
  font-weight: 700;
  cursor: pointer;
  transition: .12s;
}
input[type="submit"].btn-dark:hover {
  opacity: .95;
}

/* Responsive */
@media (max-width: 991px) {
  .col-md-6, .col-md-4, .col-md-3, .col-sm-3, .col-sm-9 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  :root { font-size: 14px; }
}

/* highlight invalid fields when JS adds .error-field */
.error-field {
  border-color: #e63946 !important;
  box-shadow: 0 0 0 4px rgba(230,57,70,0.08) !important;
  background: #fffefc;
}