/* ==== Body & Global ==== */
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #eef2ff;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
html, body {
  height: 100%;
}

/* ==== Main Container ==== */
.container,
.reg-form-box {
  max-width: 650px;
  margin: 40px auto 30px auto;
  background: #fff;
  padding: 55px 36px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(60,80,130,0.09), 0 1.5px 7px rgba(130,130,130,0.03);
  flex: 1 0 auto;
}

/* ==== Headings ==== */
h1, h2, h3 {
  color: #3730a3;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: .7em;
  text-align: center;
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.3rem; }

/* ==== Forms ==== */
form {
  width: 100%;
  margin: 0 auto;
}

.form-row {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}
.form-row label {
  flex: 0 0 150px;
  margin-right: 14px;
  font-weight: 500;
  color: #223c60;
  font-size: 15.2px;
  text-align: right;
}
.form-row input,
.form-row select,
.form-row textarea {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid #c9d4e7;
  border-radius: 5px;
  font-size: 15px;
  background: #f9fbfd;
  transition: border 0.2s;
  outline: none;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border: 1.5px solid #6366f1;
  background: #fff;
}
.form-row textarea {
  resize: vertical;
  min-height: 38px;
  max-height: 120px;
}
input[type="submit"], button[type="submit"], .btn {
  width: 100%;
  background: #6366f1;
  color: #fff;
  border: none;
  padding: 13px 0;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 12px;
  font-weight: 600;
  transition: background 0.2s;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(60,80,130,0.06);
}
input[type="submit"]:hover, button[type="submit"]:hover, .btn:hover {
  background: #3730a3;
}
.btn-secondary {
  background: #64748b;
}
.btn-secondary:hover {
  background: #373b4d;
}
input, select, textarea {
  box-sizing: border-box;
}

/* ==== Messages ==== */
.msgs {
  background: #ffe8e8;
  color: #b80020;
  padding: 10px 16px;
  border-radius: 5px;
  margin-bottom: 18px;
  border: 1.5px solid #fbb;
  font-size: 15px;
}
.success {
  background: #e0ffe3;
  color: #1e8e2f;
  padding: 10px 16px;
  border-radius: 5px;
  margin-bottom: 18px;
  border: 1.5px solid #8fcfae;
  font-size: 15px;
}

label[for], label {
  font-weight: 500;
}

a {
  color: #6366f1;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
a:hover {
  text-decoration: underline;
  color: #3730a3;
}
.reg-form-box p, .container p {
  margin-top: 20px;
  font-size: 15px;
  text-align: center;
}

/* ==== Table Styling ==== */
table {
  width: 100%;
  table-layout: auto; 
  border-collapse: collapse;
  margin-bottom: 24px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
th, td {
  padding: 12px 10px;
  border-bottom: 1px solid #e0e0e0;
  text-align: left;
  word-break: keep-all;
}
th {
  background: #f4f7fb;
  font-weight: 600;
}
tr:nth-child(even) {
  background: #fafbfc;
}
tr:hover {
  background: #f0f8ff;
}
th:nth-child(2), td:nth-child(2) {
  width: 40%;
  min-width: 200px;
}

/* ==== Footer ==== */
footer {
  flex-shrink: 0;
  background: #f0f0f0;
  text-align: center;
  padding: 16px 0;
  width: 100%;
  position: relative;
}

/* ==== Responsive ==== */
@media (max-width: 700px) {
  .container, .reg-form-box {
    max-width: 98vw;
    padding: 12px 4vw;
  }
  .form-row {
    flex-direction: column;
    align-items: stretch;
  }
  .form-row label {
    margin-bottom: 6px;
    text-align: left;
  }
  th, td {
    padding: 10px 6px;
  }
}

/* Prevent footer overlap on all judge dashboard subpages */
body {
    min-height: 100vh;
    box-sizing: border-box;
    position: relative;
    padding-bottom: 90px; /* Adjust this if your footer is taller */
}

.footer, footer {
    width: 100%;
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 100;
    background: #2257a7;
    color: #fff;
    text-align: center;
    padding: 16px 0;
    font-size: 1rem;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
}