/* =============================================
   NYP Online Submission of Photos - Modern UI
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700&family=Merriweather:wght@700&display=swap');

:root {
  --primary: #005ea5;
  --primary-dark: #004b85;
  --primary-light: #eef6fd;
  --accent: #f29f05;
  --accent-dark: #d98d04;
  --text-dark: #1f2937;
  --text-body: #334155;
  --text-muted: #64748b;
  --border: #d9e2ec;
  --bg: #f8fafc;
  --white: #ffffff;
  --success: #059669;
  --success-light: #ecfdf5;
  --error: #dc2626;
  --error-light: #fef2f2;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --radius: 10px;
  --radius-sm: 6px;
  --transition: 0.18s ease;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  color: var(--text-body);
  font-family: 'Source Sans 3', 'Segoe UI', Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  background-image: radial-gradient(circle at 18% -5%, #c6e6ff 0%, transparent 34%),
                    radial-gradient(circle at 88% 12%, #ffeab9 0%, transparent 30%),
                    linear-gradient(180deg, #f8fbff 0%, #f6f8fb 100%);
  min-height: 100vh;
}

/* ---- Layout ---- */
.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

.col-sm-12 { display: block; width: 100%; }
.col-sm-2  { display: inline-block; min-width: 120px; vertical-align: top; }
.col-sm-10 { display: inline-block; }

/* ---- Site Header (shared pages via commonPage.jsp) ---- */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #d9e5f1;
  box-shadow: var(--shadow-sm);
  padding: 10px 0 14px;
  margin-bottom: 0;
}

.logo {
  margin-bottom: 8px;
}

.lgpic1 {
  height: 36px;
  width: auto;
  display: inline-block;
}

.site-header .row {
  margin: 0;
}

.site-header .row h1 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 36px;
  font-weight: 700;
  color: #0c5a9f;
  letter-spacing: 0;
  line-height: 1.15;
  margin: 0;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 16px;
  font-size: 16px;
  font-weight: 500;
  color: #0c5a9f;
  background: #ffffff;
  border: 1px solid #b6cbe1;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  font-family: inherit;
}

.site-header .btn-logout {
  display: inline-flex;
}

.header-actions {
  margin-top: 8px;
}

.btn-logout:hover {
  color: #003f73;
  border-color: #8ab1d1;
  background: #eef6ff;
  text-decoration: none;
}

/* ---- Student info bar ---- */
.student-info-bar {
  background: #ffffff;
  border-top: 1px solid #d9e5f1;
  border-bottom: 1px solid #d9e5f1;
  padding: 10px 0 12px;
  margin-bottom: 24px;
}

.student-info-bar .container {
  display: block;
}

.student-info-panel {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 4px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 28px;
}

.student-info-label {
  font-size: 16px;
  font-weight: 700;
  color: #1f3650;
  margin-bottom: 2px;
  text-transform: none;
  letter-spacing: 0;
}

.student-info-value {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}

.student-info-row {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.student-info-row-wide {
  grid-column: 1 / -1;
}

/* ---- Page card wrapper ---- */
.page-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border-top: 1px solid #d9e5f1;
  padding: 32px 36px;
  margin-bottom: 24px;
}

/* ---- Page title ---- */
.page-title {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 22px;
  padding-bottom: 14px;
  border-bottom: 2px solid #dbe7f3;
  letter-spacing: -0.01em;
}

/* ---- OTP page title ---- */
.otppage-title {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 22px;
  padding-bottom: 14px;
  border-bottom: 2px solid #dbe7f3;
  letter-spacing: -0.01em;
  text-align: center;
}

/* Legacy title class */
font.title, .title {
  font-family: inherit;
  color: var(--text-dark);
  font-size: 20px;
  font-weight: 700;
  display: block;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 20px;
}

/* ---- Typography ---- */
h2 { color: var(--text-dark); font-weight: 600; font-size: 18px; }
h3 { color: var(--text-dark); font-weight: 600; font-size: 16px; }

p.Georgia { font-family: "Georgia", Times, serif; }

a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

/* ---- Buttons ---- */
input[type=submit], input[type=button], button[type=submit], button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 22px;
  font-size: 16px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  letter-spacing: 0.01em;
  text-decoration: none;
}

input[type=submit], button[type=submit] {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

input[type=submit]:hover, button[type=submit]:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 3px 10px rgba(26,86,219,0.28);
  transform: translateY(-1px);
}

input[type=button] {
  background: var(--white);
  color: var(--text-body);
  border-color: var(--border);
}

input[type=button]:hover {
  background: var(--bg);
  border-color: #9ca3af;
}

input[type=submit]:disabled, button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-login {
  width: 100%;
  padding: 11px 24px;
  font-size: 16px;
  font-weight: 600;
  background: linear-gradient(180deg, #0a67b1 0%, #005ea5 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  margin-top: 8px;
}

.btn-login:hover {
  background: linear-gradient(180deg, #0b5b9b 0%, #004b85 100%);
  box-shadow: 0 4px 14px rgba(26,86,219,0.32);
  transform: translateY(-1px);
}

/* ---- Form elements ---- */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

input[type=text], input[type=password], input.form-control, select, textarea {
  width: 100%;
  padding: 9px 13px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input[type=text]:focus, input[type=password]:focus, input.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.12);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #1d4ed8;
  outline-offset: 2px;
}

/* ---- Error / alerts ---- */
font.errorMsg, .errorMsg {
  color: var(--error);
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
}

.alert {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 500;
  margin: 12px 0;
}

.alert-error {
  background: var(--error-light);
  border: 1px solid #fecaca;
  color: var(--error);
}

.alert-success {
  background: var(--success-light);
  border: 1px solid #a7f3d0;
  color: var(--success);
  font-size: 16px;
  padding: 16px 20px;
}

#sf-msg{
              display:inline-block;
              padding:0;
}
.sf-msg-error{
   color:#c00;
  /*margin-left: 10px;*/
}

/* ---- Info / instructions box ---- */
.info-box {
  background: #f2f8ff;
  border: 1px solid #cfe4fb;
  border-left: 4px solid #0d67b2;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 22px;
  font-size: 16px;
  color: var(--primary-dark);
  line-height: 1.7;
}

.info-box ol {
  margin: 8px 0 0;
  padding-left: 20px;
}

.info-box li {
  margin-bottom: 5px;
}

/* ---- Login page ---- */
.login-page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(140deg, #e8f3fe 0%, #f7fbff 52%, #fff5de 100%);
}

.login-card {
  width: 68%;
  max-width: 920px;
  background: var(--white);
  border-radius: 14px;
  border: 1px solid #d9e5f1;
  box-shadow: var(--shadow-lg);
  padding: 42px 40px 36px;
}

.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.login-logo img { height: 52px; }

.login-card-title {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  margin: 0 0 10px;
  line-height: 1.3;
}

.login-card-subtitle {
  font-size: 16px;
  text-align: center;
  color: var(--text-muted);
  margin: 0 0 24px;
}

/* Constrain form fields to a centered column inside the wide card */
.login-form-inner {
  max-width: 400px;
  margin: 0 auto;
}

.login-card hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

.login-announcement {
  background: #f2f8ff;
  border-left: 4px solid #0d67b2;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 16px;
  color: var(--primary-dark);
  margin-bottom: 20px;
}

.login-error {
  background: var(--error-light);
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--error);
  font-size: 16px;
  font-weight: 500;
  margin-top: 14px;
  text-align: center;
}

/* ---- File upload ---- */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  background: var(--white);
  transition: all var(--transition);
  margin-bottom: 16px;
}

.upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

input[type=file] {
  font-family: inherit;
  font-size: 16px;
  color: var(--text-body);
}

/* ---- Photo preview ---- */
.preview-wrap {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.preview-wrap img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-width: 260px;
  border: 2px solid var(--border);
}

/* ---- Action button group ---- */
.action-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* ---- Success page ---- */
.success-icon {
  width: 64px;
  height: 64px;
  background: var(--success-light);
  border: 2px solid #a7f3d0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 20px;
  color: var(--success);
}

/* ---- Dividers ---- */
hr.divider, hr.shadow, hr.footerDivider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 22px 0;
}

/* ---- Footer ---- */
.footer {
  text-align: center;
  padding: 20px 0 28px;
  border-top: 2px solid #d8e4ef;
  margin-top: 20px;
}

.footer a.links {
  color: var(--primary);
  font-size: 16px;
  text-decoration: underline;
}

.footer a.links:hover { text-decoration: underline; }

.footer p {
  color: var(--text-muted);
  font-size: 16px;
  margin-top: 6px;
  margin-bottom: 0;
}

/* Legacy compatibility */
.links { color: var(--primary); }
.readonly { color: var(--text-body); background: var(--bg); }

font.small { color: var(--text-muted); font-size: 16px; }
font.regular { color: var(--primary); font-weight: bold; }
font.regularblack { color: var(--text-dark); font-weight: bold; }
font.notify { color: var(--error); font-weight: bold; }
font.big { color: var(--primary); font-size: 28px; font-weight: bold; }
font.main_heading { color: var(--text-dark); font-size: 26px; }

.title_note { color: var(--primary); font-size: 16px; font-weight: 800; }
.note { color: var(--primary); font-size: 16px; line-height: 1.5; }
.label { color: #6A5ACD; font-size: 16px; font-weight: bold; }
.mainlabel { color: var(--text-dark); font-size: 16px; font-weight: bold; }
.smallnote { color: #818b55; font-size: 16px; font-weight: bold; }

th { color: var(--text-dark); font-size: 16px; background-color: var(--primary-light); }
td { color: var(--text-body); font-size: 16px; }

input.button { font-weight: bold; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .login-card { width: 95%; padding: 28px 20px 24px; }
  .page-card { padding: 20px 16px; }
  .site-header .row h1 { font-size: 28px; }
  .lgpic1 { height: 28px; }
  .login-card-title { font-size: 20px; }
  .student-info-panel { grid-template-columns: 1fr; gap: 10px; padding: 12px; }
  .student-info-row-wide { grid-column: auto; }
  .action-group { flex-direction: column; align-items: center; }
}
