/* Future Technical Training Institute - Result Portal CSS */
:root {
  --primary-color: #0c1e3d;
  --primary-dark: #071224;
  --accent-red: #c01e28;
  --accent-red-hover: #9e141d;
  --bg-light: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-light);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}
a:hover {
  color: var(--accent-red);
}

/* Header & Topbar */
.site-topbar {
  background: var(--primary-color);
  color: #fff;
  padding: 8px 0;
  font-size: 0.85rem;
  border-bottom: 2px solid var(--accent-red);
}
.site-topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-topbar a {
  color: #f1f5f9;
  margin-left: 15px;
  transition: opacity 0.2s;
}
.site-topbar a:hover {
  opacity: 0.8;
  color: #fff;
}

.site-header {
  background: #fff;
  padding: 18px 0;
  box-shadow: var(--shadow-sm);
}
.header-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}
.logo-container {
  display: flex;
  align-items: center;
  gap: 18px;
}
.logo-img {
  height: 85px;
  max-height: 88px;
  width: auto;
  object-fit: contain;
}
.institute-info h1 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.institute-info p.tagline {
  font-size: 0.85rem;
  color: var(--accent-red);
  font-weight: 600;
  margin-top: 2px;
}
.institute-info p.approval {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.institute-code-badge {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-red);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-color);
}

.container {
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Main Content */
.main-wrapper {
  flex: 1;
  padding: 30px 0;
}

/* Search Card Box */
.search-card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  margin-bottom: 30px;
}
.search-card-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a68 100%);
  color: #fff;
  padding: 16px 24px;
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-card-body {
  padding: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  align-items: flex-end;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background-color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(12, 30, 61, 0.15);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent-red);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-red-hover);
  color: #fff;
}
.btn-secondary {
  background: #64748b;
  color: #fff;
}
.btn-secondary:hover {
  background: #475569;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}
.btn-outline:hover {
  background: #f1f5f9;
}

/* Result Sheet Display (Matches PDF exactly) */
.result-card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  padding: 35px 40px;
  position: relative;
  overflow: hidden;
}
.result-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.04;
  width: 450px;
  pointer-events: none;
}

.result-header {
  text-align: center;
  border-bottom: 2px solid #cbd5e1;
  padding-bottom: 16px;
  margin-bottom: 24px;
}
.result-header .res-logo {
  height: 85px;
  width: auto;
  margin-bottom: 10px;
}
.result-header h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.result-header p.motto {
  font-size: 0.9rem;
  color: var(--accent-red);
  font-weight: 600;
  margin-top: 2px;
}
.result-header p.bteb {
  font-size: 0.8rem;
  color: #475569;
  margin-top: 4px;
}
.result-header p.icode {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-top: 4px;
}
.result-exam-title {
  margin-top: 14px;
  display: inline-block;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 6px 20px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--primary-color);
}

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-color);
  border-bottom: 2px solid var(--accent-red);
  padding-bottom: 6px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Student Information Summary Table */
.summary-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 25px;
  font-size: 0.95rem;
}
.summary-table th, 
.summary-table td {
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  vertical-align: middle;
}
.summary-table th {
  background-color: #f8fafc;
  color: var(--text-main);
  font-weight: 600;
  width: 22%;
}
.summary-table td {
  background-color: #ffffff;
  color: #0f172a;
}
.summary-table .highlight-value {
  font-weight: 700;
  color: var(--primary-color);
}

/* Grade badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}
.badge-success { background: #dcfce7; color: #15803d; }
.badge-primary { background: #dbeafe; color: #1d4ed8; }
.badge-info { background: #e0f2fe; color: #0284c7; }
.badge-secondary { background: #f1f5f9; color: #475569; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-dark { background: #334155; color: #fff; }

.result-footer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-warning {
  background-color: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}
.alert-danger {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.alert-success {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

/* Footer */
.site-footer {
  background: var(--primary-dark);
  color: #94a3b8;
  padding: 25px 0;
  margin-top: auto;
  font-size: 0.88rem;
  border-top: 3px solid var(--accent-red);
}
.site-footer a {
  color: #cbd5e1;
}
.site-footer a:hover {
  color: #fff;
}
.footer-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

/* Responsive */
@media (max-width: 768px) {
  .header-wrapper {
    flex-direction: column;
    text-align: center;
  }
  .logo-container {
    flex-direction: column;
    text-align: center;
  }
  .result-card {
    padding: 20px 15px;
  }
  .summary-table th, .summary-table td {
    padding: 8px 10px;
    font-size: 0.88rem;
  }
}
